Alexander Leidinger wrote:
Quoting Andrew Pantyukhin <[EMAIL PROTECTED]> (from Tue, 22 May 2007 17:34:32 +0400):

On 5/22/07, Stephen Montgomery-Smith <[EMAIL PROTECTED]> wrote:

Incidently if you want to save a few more != assignments, I notice that
setting the variables
ARCH=i386
OPSYS=FreeBSD
OSREL=6.2
OSVERSION=602110
in /etc/make.conf will do this for you.

A seemingly better way may be to make these system vars
available in make by default. They may even be compiled
in - to achieve virtually no performance impact (except
for a bit larger default var table).

OPSYS can be made static (cvs commit to bsd.port.mk).

Before embarking on plans to implement it this way or that, how about some reports on whether this saves much time. My initial profiling indicates that for an individual make, it might save a few tenths of a second, but when you do a whole bunch of makes in a row (like in pkg_version), somehow the run of things like "uname -p" gets cached, and it turns into a few hundreths of a second per make. I might also add that the OSVERSION (which is the result of awk) seems to be very quick compared to the invokations of uname (which is what the others are).

In other words, the time savings might just not be that worthwhile pursuing.

Stephen

_______________________________________________
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to