[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #28983] forcing a target matching a pattern rule shadows the rule's
From: |
Matt McCutchen |
Subject: |
[bug #28983] forcing a target matching a pattern rule shadows the rule's actions |
Date: |
Fri, 07 May 2010 23:11:46 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100419 Fedora/3.5.9-1.custom.fc12 Shiretoko/3.5.9 |
Follow-up Comment #5, bug #28983 (project make):
I don't understand how the second quote defeats my statement. The point is
that marking the "clean" target phony prevents the accidental existence of a
file by that name from confusing the build system. If you're trying to argue
from that quote that marking a target phony is a general way to force it to be
rebuilt, you're wrong.
I don't understand your objection to the FORCE idiom either. Here is your
makefile rewritten to use FORCE:
default: file.o
FORCE:
.PHONY: FORCE
file.o: FORCE
file.c:
echo Auto-generating "$@"...
touch "$@"
%.o: %.c
echo Making "$@" from "$^"...
touch "$@"
The only "pre-requisite of .PHONY" (let's just call it a phony target) is
FORCE itself, and the purpose of marking it phony is to _not_ be affected by a
file of the that name, though such a file should never exist anyway. What is
the potential name clash you mention?
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?28983>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/