[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #23928] Add MAKEFILE variable

From: anonymous
Subject: [bug #23928] Add MAKEFILE variable
Date: Sat, 26 Jul 2008 06:44:19 +0000
User-agent: Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv: Gecko/20080630 Firefox/

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.)

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.

Philip Guenther


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]