[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch] Guile conditional
From: |
Paul Smith |
Subject: |
Re: [patch] Guile conditional |
Date: |
Fri, 03 Jul 2015 10:10:09 -0400 |
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.