[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [bug #23928] Add MAKEFILE variable
From: |
Martin Dorey |
Subject: |
RE: [bug #23928] Add MAKEFILE variable |
Date: |
Mon, 28 Jul 2008 12:19:11 -0700 |
> "A B C" when parsing C and
> "A B D" when parsing D
That would break the use of $(MAKEFILE_LIST) in dependencies to cause
recompilation when any of the makefiles change. I use that extensively
so, if this were to be implemented, I'd rather it used an additional
variable, perhaps called MAKEFILE_STACK.
-----Original Message-----
From: address@hidden [mailto:address@hidden
Sent: Monday, July 28, 2008 03:01
To: address@hidden
Cc: address@hidden; Martin Dorey; address@hidden;
address@hidden
Subject: RE: [bug #23928] Add MAKEFILE variable
Philip Guenther wrote:
>BTW, $(lastword ${MAKEFILE_LIST}) is _not_ always the makefile
>being parsed
>at that moment, particularly when there's an 'include'
>directive earlier in
>the makefile. There's in fact no 100% general and reliable
>way to get the
>name of the file that's being parsed.
Hmm...
Wouldn't MAKEFILE_LIST be more useful if it always contained the list of
makefiles that lead from the top makefile to the current one?
E.g. given makefiles A, B, C and D. If A includes B and B includes D and
then C. Then MAKEFILE_LIST would contain:
"A" when parsing A,
"A B" when parsing B,
"A B C" when parsing C and
"A B D" when parsing D
Wouldn't that make more sense?
/Lasse
>-----Original Message-----
>From: address@hidden
>[mailto:address@hidden On
>Behalf Of ext anonymous
>Sent: Saturday, July 26, 2008 08:44
>To: Icarus Sparry; Martin Dorey; address@hidden;
>address@hidden; address@hidden
>Subject: [bug #23928] Add MAKEFILE variable
>
>
>Follow-up Comment #3, bug #23928 (project make):
>
>Icarus Sparry wrote:
>> You probably want lastword, rather than firstword.
>
>Nope. To quote the original request:
>
>> It is often useful to recursively call the current makefile
>> as part of a rule. Sometimes rules are included from a
>> different file. The included file may not know the name of
>> the make file used to start the make process.
>
>The request was for the name of "the make file used to start the make
>process", which would be $(firstword ${MAKEFILE_LIST}).
>
>(The use of the phrase "current makefile" is slightly
>ambiguous, but I think
>the last sentence makes it clear that it is meant to refer to
>the makefile
>that started the whole deal.)
>
>
>
>
>
>
> _______________________________________________________
>
>Reply to this item at:
>
> <http://savannah.gnu.org/bugs/?23928>
>
>_______________________________________________
> Message sent via/by Savannah
> http://savannah.gnu.org/
>
>
>
>_______________________________________________
>Bug-make mailing list
>address@hidden
>http://lists.gnu.org/mailman/listinfo/bug-make
>