help-make
[Top][All Lists]
Advanced

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

how to prevent make from considering included makefiles as targets?


From: Mark Galeck (CW)
Subject: how to prevent make from considering included makefiles as targets?
Date: Thu, 12 Nov 2009 20:12:36 -0800

Hello, 

 

When I include submakefiles with

 

-include foobar

 

 

I would like for make to just read the file if there is one, and do nothing otherwise.  Do not consider “foobar” to be a target or anything else.  Just read it if there is one, no other action. 

 

Bart Robinson wrote here that to get of rid of implicit rule search, one can use:

 

foobar: ;

 

Yes but I already use “make –r” so this does not help.  make still tries looks at “foobar” as a target, and tries to find if it should update it;  with thousands of such “targets”, it is an efficiency problem. 

 

Myself I found a rule to prevent looping, that can be used here:

 

foobar::                ;

 

This works better, less time is spent than with one colon, but still, some time is spent by make on this “target”.  How do I force make to not spend _any_ time on foobar being a target?? 

 

Mark


reply via email to

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