help-make
[Top][All Lists]
Advanced

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

.PRECIOUS and .SECONDARY do not overlap?


From: Mark Galeck (CW)
Subject: .PRECIOUS and .SECONDARY do not overlap?
Date: Fri, 21 Oct 2011 23:53:18 -0700

Hello,

The manual says:

.PRECIOUS
(.) 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.

This does not appear to work:

with this makefile:


%/foobar: | %/.
        touch $@        

.SECONDARY: %/.
%/.:
        mkdir -p $@


I get an attempt at removal:
address@hidden: make subdir/foobar
mkdir -p subdir/.
touch subdir/foobar
rm subdir/.make: unlink: subdir/.: Is a directory

If I replace ".SECONDARY" with ".PRECIOUS", then everything works fine.


??

Mark



reply via email to

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