[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: .SECONDARY vs. .PRECIOUS doc of danger
From: |
Philip Guenther |
Subject: |
Re: .SECONDARY vs. .PRECIOUS doc of danger |
Date: |
Mon, 29 Jun 2009 11:15:26 -0700 |
On Mon, Jun 29, 2009 at 9:32 AM, <address@hidden> 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