On Mon, Jun 29, 2009 at 9:32 AM, <jida...@jidanni.org> wrote:
> You fellows have a lot of explaining to do. (On the Info page, not to me.)
>
> In (info "(make) Special Targets")
> `.PRECIOUS'
>     ...Also, if the target is an intermediate file, it will not be
>     deleted after it is no longer needed, as is normally done... In
>     this latter respect it overlaps with the `.SECONDARY' special
>     target.

If you keep reading you'll see this:

     You can also list the target pattern of an implicit rule (such as
     `%.o') as a prerequisite file of the special target `.PRECIOUS' to
     preserve intermediate files created by rules whose target patterns
     match that file's name.

In contrast, the description of .SECONDARY only mentions targets and
not target patterns.


> However we see that only genuine .PRECIOUS will preserve the
> intermediate file. .SECONDARY, on the other hand, will blow - it - away.
>
> $ ls
> Makefile  u.kml
> $ cat Makefile
> .SECONDARY:%.kmz

As documented, .SECONDARY does not support target patterns, so the
difference in behavior is expected.



Philip Guenther


_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to