On Fri, 2015-07-03 at 08:52 +0300, Dmitry Bogatov wrote:
> > > This patch integrate them a little deeper. And, by the way (VAR !=
> ls
> > > -A) assignment is very like this.
> 
> The following two assignments is same:
> 
> FOO != ls -A
> FOO := $(shell ls -A | sed-magic)

Oh I see; you're thinking of the shorthand.  I was thinking of the real
functional difference between these two: != sets the value to the result
of calling the shell, but the variable FOO is a recursive variable not a
simple variable.  So for example:

   BAR = before
   BANG != echo '$$(BAR)'
   BAR = after

   all: ; @echo 'BANG = $(BANG)'

will output:

   BANG = after

However, even though != actually implements a capability that you can't
quite achieve using other GNU make abilities, I really only added != to
GNU make to enable that syntax to be added to the next POSIX standard
definition for make.  If it hadn't been for that requirement I'm not
sure I would have added it.


_______________________________________________
Bug-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to