%% Regarding Problem with .INTERMEDIATE;
%% "Chris Rankin" <[EMAIL PROTECTED]> writes:
cr> We are seeing the following problem with GNU make versions 3.77
cr> and 3.78.1 (Makefile below):
cr> $ make bug.o
cr> gcc -c -o bug.o bug.c
cr> rm bug.o
cr> In other words, although we are *explicitly* requesting that this
cr> file be built, GNU make refuses to lift its "intermediate" status
cr> and deletes it again. This feature renders the .INTERMEDIATE
cr> option useless to us
The reason that "normal" intermediate files aren't deleted when
specified on the command line is that make things _any_ explicit mention
of a file in the makefile is enough to remove its "intermediateness".
Make considers a target specified on the command line to have been
"mentioned", so it doesn't mark it as intermediate and doesn't delete
it.
When you explicitly set .INTERMEDIATE, you override that behavior and
force the intermediate flag, and that also overrides the fact that it
was mentioned on the command line.
cr> Would you agree that this is a bug in GNU make?
Actually, I do think this is incorrect behavior. Obviously it doesn't
make sense for make to delete a file you explicitly asked it to build,
irrespective of whether it's marked .INTERMEDIATE.
--
-------------------------------------------------------------------------------
Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at:
http://www.gnu.org http://www.ultranet.com/~pauld/gmake/
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist