help-make
[Top][All Lists]
Advanced

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

Re: question about Generating Prerequisites Automatically


From: Lin George
Subject: Re: question about Generating Prerequisites Automatically
Date: Wed, 3 May 2006 23:01:43 -0700 (PDT)

Hi Paul,


> For "normal" targets, if the file does not exist it
> WILL be remade, and
> that WILL cause the ultimate target to be remade.
> 
> For intermediate files, they won't be remade unless
> needed, EVEN IF THEY
> DON'T EXIST.

I think the above statements mean that if immediate
files are needed, they will be remade. Correct? I
think it is the same as ordinary file.

I think another meaning of above statements is
ordinary file will be remade if they do not exist even
if they are not needed. I can not imagine why they
will be remade even if they are not needed? Could you
show me an example please? :-)

(If it is true, I think make program should be
optimized by reducing the workload to remake
unnecessary un-needed materials.) :-)

while in the above situation, it means intermediate
files will not be remade if they are not needed even
if they do not exist. Right?


regards,
George

--- "Paul D. Smith" <address@hidden> wrote:

> %% Regarding Re: question about Generating
> Prerequisites Automatically;
> %% Lin George <address@hidden> writes:
> 
>   lg> I have read through this section before after
> your recommendation
>   lg> previously. Personally, I do not agree with
> these statements,
> 
> I'm not sure what you mean by saying you "do not
> agree with these
> statements".  Do you think they're not true?  Or...?
> 
> > But if B is an intermediate file, then `make' can
> leave well enough
> > alone.  It won't bother updating B, or the
> ultimate target, unless
> > some prerequisite of B is newer than that target
> or there is some
> > other reason to update that target.
> 
>   lg> The purpose of above statements is to describe
> the different
>   lg> behavior when make deals with intermediate
> file -- but I have not
>   lg> seen any differences because it is the same
> that make will check
>   lg> the prerequisites of B and update B if the
> prerequisites are
>   lg> newer, which behaves the same as the ordinary
> files.
> 
> You have left out the critical context provided by
> the first sentence in
> the paragraph you quoted; the entire paragraph has
> to be read within
> that context:
> 
> >    The first difference is what happens if the
> intermediate file does
> > not exist.
> 
> For "normal" targets, if the file does not exist it
> WILL be remade, and
> that WILL cause the ultimate target to be remade.
> 
> For intermediate files, they won't be remade unless
> needed, EVEN IF THEY
> DON'T EXIST.
> 
> -- 
>
-------------------------------------------------------------------------------
>  Paul D. Smith <address@hidden>          Find some
> GNU make tips at:
>  http://www.gnu.org                     
> http://make.paulandlesley.org
>  "Please remain calm...I may be mad, but I am a
> professional." --Mad Scientist
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




reply via email to

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