help-make
[Top][All Lists]
Advanced

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

Re: intermediate files being removed despite .PRECIOUS


From: Paul D. Smith
Subject: Re: intermediate files being removed despite .PRECIOUS
Date: Thu, 29 Mar 2001 00:00:29 -0500

%% Damian Marriott <address@hidden> writes:

  dm> I am having problem with GNU make 3.78.  I've tried the newsgroups
  dm> and found a pointer to this email address (and nothing else of
  dm> assistance).  I'm hoping you can help.

You might consider upgrading.  GNU make 3.79.1 is the latest.  There
have been fixes to .SECONDARY, etc. in later versions.

  dm> Now, I understand that intermediate files are removed by default,
  dm> which can be overridden by .PRECIOUS.  The prerequisties for .PRECIOUS
  dm> that I list are in terms of variables which contain '%' for patterns.

Please note that you can't use just any old pattern as a prerequisite
for .PRECIOUS.  The pattern you use _MUST_ be a pattern that matches the
target pattern of an implicit rule.  Only those targets which are built
using that implicit rule will be considered .PRECIOUS (even targets
which match the pattern, but _weren't_ built using the implicit rule, are
not considered .PRECIOUS).

If you simply want no files removed due to intermediate deletion, you
can give .SECONDARY with no prerequisites, the manual sez:

  ...
     `.SECONDARY' with no prerequisites causes all targets to be treated
     as secondary (i.e., no target is removed because it is considered
     intermediate).
  ...

HTH.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://www.paulandlesley.org/gmake/
 "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]