bug-make
[Top][All Lists]
Advanced

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

Variable is assigned wrong value


From: Sam Ravnborg
Subject: Variable is assigned wrong value
Date: Wed, 30 Jul 2003 22:19:10 +0200
User-agent: Mutt/1.4.1i

When a variable is followed by a comment the variable is assigned a value
containing a space.

Sample Makefile:
------------------------------
var1 := X
var2 := X # Comment
$(warning var1=-$(var1)-)
$(warning var2=-$(var2)-)

all:
------------------------------
Output:
$make -v
GNU Make 3.80
Copyright (C) 2002  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
$
$make
Makefile:4: var1=-X-
Makefile:5: var2=-X -
make: Nothing to be done for `all'.

Note that var2 is assigned a value including a trailing space.

        Sam




reply via email to

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