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/



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

Reply via email to