[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Target specific variable problems

From: Scott Murray
Subject: Target specific variable problems
Date: Mon, 13 Nov 2000 16:20:20 -0500 (EST)

Consider the following Makefile:

# start
.PHONY: a b c d all

BLAH := foo
COMMAND = echo $(BLAH)

all: a b c

a b c:

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 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'

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.



Scott Murray
SOMA Networks, Inc.
Toronto, Ontario
e-mail: address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]