On 05/14/12 04:37 PM, [email protected] wrote:
>>> I also adjusted the definitions of CHANGESET, ARCH and REV in a similar
>>> manner since it simplies their definition a bit as well.
>>
>> ... except I think that would drastically reduce the performance. What's
>> nice about
>>
>> ARCH.cmd = uname -p
>> ARCH = $(ARCH.cmd:sh)
>>
>> is that "uname -p" gets run once -- when $(ARCH) is defined. With
>>
>> ARCH:sh = uname -p
>>
>> it gets run every time $(ARCH) is referenced. And it's referenced a fair
>> amount. So I think I like the way you had it before better, even if it's a
>> bit longer.
>
> I'm happy to put it back but I'm seeing the oppostite results,
> actually. Namely, the two-line construct above seems to result in far
> more uname(1) invocations than the latter. The make(1) man page seems
> to indicate that should be the case as well
It won't help for the general case, but for the special case of ARCH, you can
get there with no forks, since Solaris make predefines $(TARGET_ARCH) to be
`mach` (aka uname -p) with an extra '-' in front for you to strip off:
ARCH=$(TARGET_ARCH:-%=%)
--
-Alan Coopersmith- [email protected]
Oracle Solaris Engineering - http://blogs.oracle.com/alanc
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss