Greg Chicares wrote:
Is there any way to determine the name of the current makefile?

Try

    THIS_MAKEFILE := $(words $(word $(MAKEFILE_LIST)),$(MAKEFILE_LIST))

Or if you are using GNU Make 3.81:

    THIS_MAKEFILE := $(lastword $(MAKEFILE_LIST))

Note that you must do this _before_ any 'include' statement in the Makefile otherwise THIS_MAKEFILE will be incorrect.

John.
--
John Graham-Cumming
[EMAIL PROTECTED]

Home: http://www.jgc.org/
Blog: http://www.jgc.org/blog/

POPFile: http://getpopfile.org/
GNU Make Standard Library: http://gmsl.sf.net/
GNU Make Debugger: http://gmd.sf.net/
Fast, Parallel Builds: http://www.electric-cloud.com/

Sign up for my Spam and Anti-spam Newsletter
at http://www.jgc.org/


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to