Paul D. Smith wrote:


If you don't even want to try reading the file at all when it's already
been included, you have to put the ifndef around the include statement:

    ifndef _defs.mk
    include defs.mk
    endif

IMO, blech.

If one is adventurous, it's possible to create a function that, if the makefile 
content variable exists, evals it, otherwise, it does the actual inclusion.  
Then, all the included makefile does is to define this content variable and 
eval it.

Since we're talking about included makefiles, I've noticed that a circular 
inclusion is detected.  What's the algorithm by which this is done?  I'd like 
to implement the same algorithm in my include-maketfile function.

Thanks,
Noel


_______________________________________________ Help-make mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to