[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #28456] Expansion of $$< is incorrect
From: |
Kirill Smelkov |
Subject: |
[bug #28456] Expansion of $$< is incorrect |
Date: |
Wed, 10 Feb 2010 12:53:30 +0000 |
User-agent: |
Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.10 (like Gecko) (Debian) |
Follow-up Comment #1, bug #28456 (project make):
I think I was also beaten by this. Consider:
---- 8< ----
$ cat bug-28456.mk
.SUFFIXES:
all : 1.o
show-vars =
$(info $$@ : $@)
$(info $$< : $<)
$(info $$^ : $^)
$(info $$+ : $+)
$(info $$? : $?)
.SECONDEXPANSION:
%.o : %.c $$(show-vars)
$(info --------)
$(show-vars)
$(CC) $(CFLAGS) -o $@ -c $<
$ touch 1.c && make -f bug-28456.mk
$@ : 1.o
$< : 1.o
$^ :
$+ :
$? :
--------
$@ : 1.o
$< : 1.c
$^ : 1.c
$+ : 1.c
$? : 1.c
cc -o 1.o -c 1.c
---- 8< ----
So as you can see $$< is wrongly second-expanded to 1.o (instead of 1.c), and
$$^, $$+, $$? are second-expanded to empty strings (instead of 1.c too).
Tested on make 3.81 and latest CVS (3.81.90; last commit on Fri Dec 11
15:55:16 2009 +0000 by eliz)
Thanks beforehand,
Kirill
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?28456>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #28456] Expansion of $$< is incorrect,
Kirill Smelkov <=