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-make mailing list
Bug-make@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to