Dill, John wrote:

I am still trying to track down where exactly my lag time is coming from, and it 
doesn't >appear to be from using the include directive by itself.  My question 
is how makefile
evaluates variables that are defined using ':=' with respect to include files.

If I have a file include_me.mk which contains:

my_var:=$(shell script)

and I have included this file several times (indirectly through my file's 
dependent
include files).  Does make re-evaluate this variable assignment each time 
'include
include_me.mk' appears?

If that's the case, then I think that's where my problem is.

I did some more investigation and found that this is where my performance problem is. It appears that time increases linearly with the number of times the include file with ':=' variables are included, which means make is evaluating it each time it is seen like it should. Adding inclusion guards to my include files should fix my performance problem.

This makes sense. The := is evaluated at the time of the assignment (rather than at the time of usage as with =). As Paul has said $(system) is an expensive call.

Noel


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

Reply via email to