bug-make
[Top][All Lists]
Advanced

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

Re: need access to Makefile path


From: Noel Yap
Subject: Re: need access to Makefile path
Date: Tue, 18 May 2004 13:39:59 -0400
User-agent: Mozilla Thunderbird 0.5 (Windows/20040212)

Try:

$ cat >bar.make
include foo.make
$(warning $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))))

Noel

Boris Kolpackov wrote:

Noel Yap <address@hidden> writes:


Unless MAKEFILE_LIST is used before any other includes, using the trick below doesn't work.


$ cat >makefile
include foo.make
include $(CURDIR)/bar.make

$ cat >foo.make

$ cat >bar.make
$(warning $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))))

$ /usr/bin/make --version
GNU Make 3.80

$ /usr/bin/make
/tmp/bar.make:1: /tmp/
make: *** No targets.  Stop.


Seems to work pretty well, huh?

-boris






reply via email to

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