help-make
[Top][All Lists]
Advanced

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

Re: A behavior I wonder about


From: Der Herr Hofrat
Subject: Re: A behavior I wonder about
Date: Thu, 12 Sep 2002 08:26:09 +0200 (CEST)

> Hello,
> 
> Using GNU 'make' in various unusual ways, I have discovered a thing that
> seemed a bit odd to me at first. 
> 
> If I want to access, from inside a Makefile, the directories which are
> going to be searched for included makefiles (via the 'include'
> directive), I may look at the built-in macro MAKEFLAGS or MFLAGS. Is
> there any other possibility that I missed in the documentation? It would
> be cool if there was a macro like "MAKEDIRS" that could be checked. 

the directories that are searched are a fixed sheme so you can put together
your search list by adding the paths up

 * anything you specified with -l and --include-dir
   if it start with a slash - its an absolute path 
   else prepend the current directory (if the result exists)
 * standard search paths
   /usr/gnu/include
   /usr/include
   /usr/local/include
   PREFIX/include

so if you put all your -l and --include-dir into defined variables then 
add the standard paths you have your search path together and don't need 
to extract it from the MFLAGS or MAKEFLAGS. 

hofrat




reply via email to

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