%% Seth M LaForge <[EMAIL PROTECTED]> writes:
sml> (Make version 3.79.) Consider:
sml> % cat Makefile
sml> %.1: %.2
sml> cp $< $@
sml> %.2: %.3
sml> cp $< $@
sml> .SECONDARY:
sml> % ls
sml> Makefile foo.3
sml> % make foo.1
sml> cp foo.3 foo.2
sml> cp foo.2 foo.1
sml> rm foo.2
sml> According to the documentation, the .SECONDARY target should
sml> cause all files to be considered secondary (and thus not
sml> deleted), but it doesn't work.
This is obliquely stated in the documentation:
`.SECONDARY'
The targets which `.SECONDARY' depends on are treated as
intermediate files, except that they are never automatically
deleted. *Note Chains of Implicit Rules: Chained Rules.
`.SECONDARY' with no prerequisites marks all file targets mentioned
^^^^^^^^^^^^^^^^^^^^^^^^^^
in the makefile as secondary.
^^^^^^^^^^^^^^^
Note the second paragraph. The targets you give aren't mentioned in the
makefile; they're built using implicit rules.
I agree with you, however, that this is a strange restriction and this
area needs to be revisited, for all of PRECIOUS, INTERMEDIATE, and
SECONDARY.
I'll file an enhancement request about it.
--
-------------------------------------------------------------------------------
Paul D. Smith <[EMAIL PROTECTED]> 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