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
+++ Command Substitutions
+++ To incorporate the standard output of a shell command in a
+++ macro, use a definition of the form:
+++
+++ MACRO:sh =command
+++
+++ The command is executed only once, standard error output is
+++ discarded, and NEWLINE characters are replaced with SPACEs.
+++ If the command has a non-zero exit status, make halts with
+++ an error.
+++
+++
+++ To capture the output of a shell command in a macro refer-
+++ ence, use a reference of the form:
+++
+++ $(MACRO:sh)
+++
+++ where MACRO is the name of a macro containing a valid Bourne
+++ shell command line. In this case, the command is executed
+++ whenever the reference is evaluated. As with shell command
+++ substitutions, the reference is replaced with the standard
+++ output of the command. If the command has a non-zero exit
+++ status, make halts with an error.
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss