Paul Eggert wrote:
> > I wouldn't want to kill all
> > phony targets from all Makefiles, just for "make -q".
>
> Sorry, I see that I wasn't clear earlier. Not all phony targets have
> the problem. For example, the following works fine:
>
> .PHONY: all
>
> all: foo
>
> foo: /etc/motd
> cat /etc/motd >$@
>
> The problem occurs only when a phony target has a nonempty action,
> and when "make -q" depends on the phony target.
Thanks for explaining. But I'm still not sure I understand. What is
the difference between your test case
---------------------------------
all: foo
foo: /etc/motd
cat /etc/motd >$@
---------------------------------
and the snippet from modules/relocatable-prog
---------------------------------------
uninstall-hook: uninstall-relocwrapper
uninstall-relocwrapper:
some-statements;
---------------------------------------
and the pattern from po/Makefile.in.in:
---------------------------------
all : sanity
all : foo
sanity :
@test `expr 1 + 1` = 2
foo :
echo > foo
---------------------------------
The target has non-empty statements in each case.
> If you can program a sanity check this way:
>
> sanity:
> @$(SANITY)
>
> where SANITY expands to the empty string if the check succeeds,
> and to 'false' if it fails, then 'make -q' should work. This is
> true regardless of whether 'sanity' is phony.
An interesting idea. But in the special case of po/Makefile.in.in
I cannot use it, without making use of GNU make $(...) function call
expressions.
Bruno
--
In memoriam Maximilian Kolbe <http://en.wikipedia.org/wiki/Maximilian_Kolbe>