Sending reply to list...

Hi Bruno,

>   1) The way he suggested it, I should also add .PHONY to the "force"
>      target. But since sometimes we have a dependency
>
>         real-file.c : ... force
>
>      this would violate the documented rule that "A phony target should
>      not be a prerequisite of a real target file".

I would amend that slightly. Certainly for "normal" makefiles this is
the case. But if you have targets which you want remade everytime you
run make, then this is the way to do it.

For example, I typically have a rule like:

FORCE:

.PHONY: FORCE

%.pp : %.c FORCE
   ...run compiler to produce preprocessor output into .pp file...

I normally use this for debugging macros and other oddities. The %.pp
is never a normal target, but always used explicitly on the command
line like so:

make foo.pp

--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to