%% "Noel L Yap" <[EMAIL PROTECTED]> writes:

  nly> If a MAKEFILE macro existed that was set to the current
  nly> makefile's filename (eg some/path/Makefile), modular makefiles
  nly> would be easier to support.  For example, one could have the
  nly> following directory/file structure:

  nly> project/Makefile
  nly> project/component0/Makefile
  nly> project/component0/component0.mk

  nly> where project/Makefile contains:
  nly>      include component0/component0.mk

  nly> project/component0/Makefile contains:
  nly>      include component0.mk

  nly> and project/component0/component0.mk has something like:
  nly>      component0.D:=$(dir $(MAKEFILE))

  nly>      $(component0.D)/target: $(component0.D)/dependency
  nly>           # build the stuff

  nly> Any comments?

Can't you do this much more simply with the already-existing CURDIR
variable, or even $(shell pwd)?

I have had requests for a variable like this, but I don't see a need for
it for this particular situation.

The problem is, what exactly would the variable contain?  Just the
"main" makefile?  What about included makefiles?  What about the
contents of MAKEFILES?

Etc.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[EMAIL PROTECTED]>          Find some GNU make tips at:
 http://www.gnu.org                      http://www.paulandlesley.org/gmake/
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

Reply via email to