[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #25140] Pattern-specific variable assignment behaves differently co
From: |
Boris Kolpackov |
Subject: |
[bug #25140] Pattern-specific variable assignment behaves differently compared to normal variables |
Date: |
Sun, 21 Dec 2008 10:21:02 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.3) Gecko/20070310 Iceweasel/2.0.0.3 (Debian-2.0.0.3-1) |
URL:
<http://savannah.gnu.org/bugs/?25140>
Summary: Pattern-specific variable assignment behaves
differently compared to normal variables
Project: make
Submitted by: bosk
Submitted on: Sun 21 Dec 2008 10:20:54 AM GMT
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Component Version: 3.81
Operating System: Any
Fixed Release: None
_______________________________________________________
Details:
Consider this makefile:
v := two
%.bar: var := one
%.bar: var += $(v)
%.bar: var += three
v :=
%.bar: ; @echo $(var)
all: foo.bar
When used with 3.81, it prints 'one three' while I would expect it to print
'one two three'. If I change pattern-specific to target-specific assignment,
it works as expected:
foo.bar: var := one
foo.bar: var += $(v)
foo.bar: var += three
The workaround for this problem is to use temporary variable:
tmp := one
tmp += $(v)
tmp += three
%.bar: var := $(tmp)
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?25140>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #25140] Pattern-specific variable assignment behaves differently compared to normal variables,
Boris Kolpackov <=