help-make
[Top][All Lists]
Advanced

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

Re: Intermediate File Deletion. Why?


From: Paul D. Smith
Subject: Re: Intermediate File Deletion. Why?
Date: Wed, 28 May 2003 23:48:43 -0400

%% Ashley Yakeley <address@hidden> writes:

  ay> Why does make delete "intermediate files"? When is this _ever_
  ay> desirable? Someone clearly went to a great deal of effort to
  ay> implement this bug^H^H^Hfeature.

If you have targets that can be built incrementally such as, for
example, libraries, then removing intermediate files can save you lots
of disk space and have no impact on the performance of your builds.

Back in the day, disk space was a much more precious commodity than it
is today.

  ay> I frequently do various clever things with rules in my makefiles,
  ay> and _every time_ I have to work around intermediate file deletion
  ay> (using .PRECIOUS), or else end up perpetually rebuilding
  ay> stuff.

.PRECIOUS is not what you want.  Use .SECONDARY instead: with no
prerequisites, like:

  .SECONDARY:

it applies to every single target.  See the GNU make manual.

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