List Info

Thread: .INCLUDE_DIRS question




.INCLUDE_DIRS question
user name
2006-05-04 18:39:53
I am try to come up with a working example of .INCLUDE_DIRS
(new in make 
3.81), but I don't get it. Here is a snippet:

$(shell mkdir -p m && echo VAR=Hello > m/m.mk)

.INCLUDE_DIRS: m
include m.mk

all:
 	echo $(VAR)

Is this the way it should be used? How should I set the
search path for 
the make included files?

Thanks,
Martin


_______________________________________________
Help-make mailing list
Help-makegnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make
.INCLUDE_DIRS question
user name
2006-05-04 19:22:46
%% "Martin d'Anjou" <mdanjouneterion.com> writes:

  md> I am try to come up with a working example of
.INCLUDE_DIRS (new in make 
  md> 3.81), but I don't get it. Here is a snippet:

  md> .INCLUDE_DIRS: m

.INCLUDE_DIRS is a variable, not a target.

-- 
------------------------------------------------------------
-------------------
 Paul D. Smith <psmithgnu.org>          Find
some GNU make tips at:
 http://www.gnu.org        
             http://make.paulandlesl
ey.org
 "Please remain calm...I may be mad, but I am a
professional." --Mad Scientist


_______________________________________________
Help-make mailing list
Help-makegnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make
.INCLUDE_DIRS question
user name
2006-05-04 20:49:21
>%% "Martin d'Anjou" <mdanjouneterion.com> writes:
>
>  md> I am try to come up with a working example of
.INCLUDE_DIRS (new in 
>make
>  md> 3.81), but I don't get it. Here is a snippet:
>
>  md> .INCLUDE_DIRS: m
>
>.INCLUDE_DIRS is a variable, not a target.

Ok, I try this:

$(shell mkdir -p m && echo VAR=Hello > m/m.mk)
.INCLUDE_DIRS=m
include m.mk
all:
 	echo $(VAR)

% make
Makefile:4: m.mk: No such file or directory
make: *** No rule to make target `m.mk'.  Stop.

Martin


_______________________________________________
Help-make mailing list
Help-makegnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make
.INCLUDE_DIRS question
user name
2006-05-04 21:05:18
On 5/4/06, Martin d'Anjou <mdanjouneterion.com> wrote:
...
> $(shell mkdir -p m && echo VAR=Hello >
m/m.mk)
> .INCLUDE_DIRS=m
> include m.mk
> all:
>         echo $(VAR)
>
> % make
> Makefile:4: m.mk: No such file or directory
> make: *** No rule to make target `m.mk'.  Stop.

The .INCLUDE_DIRS variable only permits inspection of the
list of
directories, not alteration of it.  To alter the list of
directories
use the -I or --include-dir option on the command line.

(While section 5.7.3 of the info pages seem to imply that
setting the
MAKEFLAGS variable in a Makefile should cause the listed
option to be
parsed immediately, it appears that it really is restricted
to
affecting recursive invocations of make.  So, there's no
way for a
Makefile to modify the include path used in its own parsing
except by
recursively invoking itself.)


Philip Guenther


_______________________________________________
Help-make mailing list
Help-makegnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make
[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )