bug-make
[Top][All Lists]
Advanced

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

Re: BUG: Setting RM variable does not work


From: Paul Smith
Subject: Re: BUG: Setting RM variable does not work
Date: Fri, 11 May 2018 17:18:44 -0400

On Fri, 2018-05-11 at 16:46 -0400, Jim Anderson wrote:
> However, I do consider this a defect in the software, because it is 
> removing an intermediate file that is actually needed. The default 
> behavior is reasonable, but not being able to override, leaves me in 
> this situation with poor alternatives.

Please keep the mailing list on the CC line, thanks!

As I mentioned in my previous email, there are plenty of ways to
explain to make that a file it may think is intermediate, is actually
not intermediate.  Based on your original request I wasn't sure if that
was what you wanted to do, or if it was something different.

Any file which is mentioned explicitly as a target or a prerequisite in
the makefile is not considered to be intermediate.  So, if you have a
file "foo.bar" that you want to be considered not intermediate: you can
simply add it is an explicit prerequisite anywhere.  This could be your
normal "all" target:

  all: some other files foo.bar

or it could be some completely different target that is not even built
normally:

  force_this_not_intermediate: foo.bar

See https://www.gnu.org/software/make/manual/html_node/Chained-Rules.html
where it says:

> Ordinarily, a file cannot be intermediate if it is mentioned in the
> makefile as a target or prerequisite.

Cheers!



reply via email to

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