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: Paul D. Smith
Subject: Re: question about Generating Prerequisites Automatically
Date: Mon, 8 May 2006 07:27:05 -0400

%% Lin George <address@hidden> writes:

  lg> Why in the sample you made, when bar.o is deleted,
  lg> then it will not be remade when we make prog again? I
  lg> think the target prog needs bar.o and bar.o does not
  lg> exist -- so it should be remade. Any rules mentioned
  lg> in GNU make manual prevents it from being remade?

???!?!

It's not remade because I declared it to be intermediate:

  > prog: foo.o bar.o
  > .INTERMEDIATE: foo.o bar.o

And I did this because you asked why make didn't treat all targets in
the way it treats intermediate targets, to avoid extra compilation:

  lg> Another comment is that, I think the way how make deals with
  lg> intermediate files is smarter than the way dealing with ordinary
  lg> files -- by saving time of remaking unnecessary files. So, why
  lg> make does not change the way dealing with ordinary file to the
  lg> (smarter) way dealing with the intermediate file?

I'm showing you how this wouldn't work.

-- 
-------------------------------------------------------------------------------
 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




reply via email to

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