[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
make -q and phony targets
From: |
Bruno Haible |
Subject: |
make -q and phony targets |
Date: |
Sun, 14 Aug 2011 01:00:25 +0200 |
User-agent: |
KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; ) |
Hi,
Paul Eggert discovered that phony targets cause "make -q" to fail.
How to reproduce:
======================== Makefile ========================
all : sanity foo
sanity :
@test `expr 1 + 1` = 2
foo :
echo > foo
.PHONY: sanity
==========================================================
$ make --version | head -n 1
GNU Make 3.82
$ make
echo > foo
$ make
$ echo $?
0
$ make -q
$ echo $?
1
More details what's going on:
$ make -q -d
...
No implicit rule found for `all'.
Considering target file `sanity'.
File `sanity' does not exist.
Finished prerequisites of target file `sanity'.
Must remake target `sanity'.
Invoking recipe from Makefile:4 to update target `sanity'.
Target file `sanity' needs remade under -q.
Finished prerequisites of target file `all'.
Giving up on target file `all'.
It fails because "Target file `sanity' needs remade under -q".
But I told 'make' already through the .PHONY target that the 'sanity' target
has nothing to do with the file system and serves only the purpose to give
some structure to the Makefile.
Please, can you change the way '.PHONY' targets are considered for "make -q"?
Or, if not, Paul Eggert's suggestion [1] is to invent a new special built-in
target for this purpose.
Bruno
PS: Please let me know if I should have written into the bug tracker instead
of to the mailing list.
[1] http://lists.gnu.org/archive/html/bug-gnulib/2011-08/msg00107.html
--
In memoriam Paul Richter <http://de.wikipedia.org/wiki/Paul_Richter_(Pfarrer)>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- make -q and phony targets,
Bruno Haible <=