%% [EMAIL PROTECTED] writes: s> My point is that there are two uses for .PRECIOUS: one is to say s> "don't delete this file after the final target has been made if is s> is created as an intermediate", and the other is to say "don't s> delete this file if the command that is creating it is s> interrupted". These are both controlled by .PRECIOUS, but in my s> case I want only the first of them.
Mentioning a target explicitly _anywhere_ in the makefile is enough to keep it from being considered an intermediate file, and thus removed. Maybe you can create a rule which has as prerequisites all the intermediate files; this rule doesn't have to actually be invoked. For example, if you have: TARGETS = foo.x bar.x .PHONY: all all: $(TARGETS) %.x : %.y ; cp $< $@ %.y : %.z ; cp $< $@ $(TARGETS:.x=.z): ; echo > $@ Then you could add another rule like this, just to keep the .y files from being considered intermediate: .PHONY: intermediates intermediates: $(TARGETS:.x=.y) Who knows, maybe you'll even find that rule handy sometimes :). -- ------------------------------------------------------------------------------- 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 _______________________________________________ Help-make mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/help-make
