[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: There is a bug in the make manual!!
From: |
ali hagigat |
Subject: |
Re: There is a bug in the make manual!! |
Date: |
Tue, 7 Sep 2010 07:24:06 +0430 |
Luke,
I tested your code by Fedora 12, make version 3.81:
.SECONDEXPANSION:
/tmp/foo.o:
%.o: $$(addsuffix /%.c,foo bar) foo.h
@echo '$+'
and the result is:
make: Nothing to be done for `/tmp/foo.o'.
it did not expand to what you said!
On Mon, Sep 6, 2010 at 8:53 PM, Luke Shumaker <address@hidden> wrote:
> On Mon, 2010-09-06 at 08:21 +0430, ali hagigat wrote:
>> Secondary Expansion of Implicit Rules
>> .SECONDEXPANSION:
>> /tmp/foo.o:
>> %.o: $$(addsuffix /%.c,foo bar) foo.h
>> The prerequisite list after the secondary expansion and directory
>> prefix reconstruction
>> will be ‘/tmp/foo/foo.c /tmp/var/bar/foo.c foo.h’.
>> ----------------------------------------------------------------------------------
>> I copied some lines of the 2010 make manual, page 19. It says
>> prerequisite list will be:
>> /tmp/var/bar/foo.c
>> Where is 'var'?
>> It seems incorrect. Also expansion seems wrong.
>
> Indeed, using `$+' to check what it expands to:
> .SECONDEXPANSION:
>
> /tmp/foo.o:
>
> %.o: $$(addsuffix /%.c,foo bar) foo.h
> address@hidden '$+'
> It does expand to '/tmp/foo/foo.c /tmp/bar/foo.c foo.h'
>
> You should check to make sure this bug hasn't already been filed:
> https://savannah.gnu.org/bugs/?group=make
> And if it hasn't, submit it:
> https://savannah.gnu.org/bugs/?func=additem&group=make
>
> ~ LukeShu
>
>