[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Wording in GNU Make manual regarding phony targets
From: |
Dave Hylands |
Subject: |
Re: Wording in GNU Make manual regarding phony targets |
Date: |
Tue, 20 Dec 2005 10:54:13 -0800 |
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/
- Wording in GNU Make manual regarding phony targets, R. Bernstein, 2005/12/19
- Re: Wording in GNU Make manual regarding phony targets, Paul D. Smith, 2005/12/19
- Re: Wording in GNU Make manual regarding phony targets, R. Bernstein, 2005/12/20
- Re: Wording in GNU Make manual regarding phony targets, Bruno Haible, 2005/12/20
- Re: Wording in GNU Make manual regarding phony targets,
Dave Hylands <=
- Re: Wording in GNU Make manual regarding phony targets, Johan Bezem, 2005/12/20
- Re: Wording in GNU Make manual regarding phony targets, Dave Hylands, 2005/12/20
- Re: Wording in GNU Make manual regarding phony targets, Johan Bezem, 2005/12/21
- Re: Wording in GNU Make manual regarding phony targets, Dave Hylands, 2005/12/21
- Re: Wording in GNU Make manual regarding phony targets, Johan Bezem, 2005/12/22