help-make
[Top][All Lists]
Advanced

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

Re: include question


From: Noel Yap
Subject: Re: include question
Date: Thu, 09 Dec 2004 12:32:40 -0500
User-agent: Mozilla Thunderbird 0.5 (Windows/20040212)

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




reply via email to

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