Consider the following Makefile:

# start
.PHONY: a b c d all

BLAH := foo
COMMAND = echo $(BLAH)

all: a b c

a b c:
        @$(COMMAND)

b: BLAH := bar

c: BLAH := bar
c: COMMAND += snafu $(BLAH)

d: c
d: BLAH := baz
# end

With make-3.79.1, running 'make' yields:

foo
bar
foo snafu bar

This seems to indicate a bug in target specific variable management, as
I would expect the third line to be 'bar snafu bar' because COMMAND is a
recursively expanded variable.  Even more interestingly, a 'make d'
yields:

baz snafu bar

which also is not what I expect (which is 'baz snafu baz'), but seems to
be a bit less "incorrect" than the output of target c.

So, is this a real bug, or am I missing something in the docs about target
specific variable limitations?  I have a real makefile that doesn't work
because of this, so knowing whether this is a bug or an error I need to
correct would be useful.

Thanks,

Scott


-- 
Scott Murray
SOMA Networks, Inc.
Toronto, Ontario
e-mail: [EMAIL PROTECTED]


_______________________________________________
Bug-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-make

Reply via email to