|
From: | Noel Yap |
Subject: | Re: need access to Makefile path |
Date: | Tue, 18 May 2004 14:07:43 -0400 |
User-agent: | Mozilla Thunderbird 0.5 (Windows/20040212) |
BTW, I also said that such a variable can be overwritten by the included makefile. I think it has a pretty high probability of being overwritten and the probability increases the more makefiles are included. For example, adding to the example below: # foo.make p := $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))) include another.make $(warning $p) # another.make p := $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))) include one-more.make $(warning $p) How are you going to guarantee that the names of the variables are unique? Do you still think that MAKEFILE_LIST is a scalable, viable solution? Noel Boris Kolpackov wrote:
Noel Yap <address@hidden> writes:Try: $ cat >bar.make include foo.make $(warning $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))))You gotta be kidding me! p := $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))) include foo.make $(warning $p)
[Prev in Thread] | Current Thread | [Next in Thread] |