[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: |
Paul D. Smith |
Subject: |
Re: Wording in GNU Make manual regarding phony targets |
Date: |
Mon, 19 Dec 2005 13:06:19 -0500 |
%% "R. Bernstein" <address@hidden> writes:
rb> Recently Bruno Haible point this out from the GNU Make manual:
rb> A phony target should not be a prerequisite of a real target file;
rb> if it is, its commands are run every time make goes to update
rb> that file. As long as a phony target is never a prerequisite of a
rb> real target, the phony target commands will be executed only when the
rb> phony target is a specified goal.
rb> He also observed that in "force" targets this is usually the
rb> situation. Another situation where this doesn't hold would be in those
rb> cases where one tracing, profiling, or debugging code working by
rb> instrumenting/augmenting the Makefile. Given this, I think the wording
rb> above should be changed to something more akin to a heuristic or
rb> guideline.
Hi; I'm certainly not adverse to changing the wording to be more clear,
but I'd like to understand what you mean first.
You say "[Bruno] also observed that in "force" targets this is usually
the situation" ... I didn't understand that comment?
Second, you discuss using .PHONY targets "where one tracing, profiling,
or debugging code working by instrumenting/augmenting the Makefile"; I
don't follow that either. A mark of .PHONY is transitive: by that I
mean that if you mark a target as .PHONY then all the targets that
depend on that target are ALSO implicitly .PHONY; they will always be
rebuilt.
So, I don't see how it can be used for temporary measures like debugging
or tracing...? Unless you mean editing the file to turn on/off the
.PHONY-ness; but in that case wouldn't it be simpler to just use -W or
similar?
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
- 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 <=
- 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, 2005/12/20
- 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