help-make
[Top][All Lists]
Advanced

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

Re: trouble cleaning the right files ..


From: Philip Guenther
Subject: Re: trouble cleaning the right files ..
Date: Mon, 18 Jun 2007 15:02:44 -0600

On 6/18/07, sharan basappa <address@hidden> wrote:
I have a question regarding the target specific variable :

How will a construct clean_dir1: local_objs := $(local_objs) do the work
since this will be followed by same rule
clean_dir1 :
         \rm $(local_objs)

In this case too the variable assignment will be deferred. Isnt it ?

The expansion of the value being assigned is not deferred, because the
assignment was done using ":=".  So, the value will be the current
value of local_objs at that point in the makefile.  What is deferred
is the 'availability' of the target-specific assignment: it is only
present during the running of the commands for the clean_dir1
target**.


Philip Guenther

**  ...and for any target which is being rebuilt as a recursive
dependency of clean_dir1, of which there are none in this case,
because clean_dir1 has no dependencies.




reply via email to

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