Follow-up Comment #6, bug #28983 (project make):
The following tests show that .PHONY's pre-requisites are normally rebuilt
regardless of existence of a file with the same name.
This works,
$ cat test-force.mak
default: file.o
.PHONY: file.o
file.o:
echo Building $...@... > $@
$ make -f test-force.mak
echo Building file.o... > file.o
$ ls -al file.o
-rw-r--r-- 1 ilatypov Domain Users 19 May 7 19:58 file.o
$ rm file.o
$ make -f test-force.mak
echo Building file.o... > file.o
$ ls -al file.o
-rw-r--r-- 1 ilatypov Domain Users 19 May 7 19:58 file.o
$ make -f test-force.mak
echo Building file.o... > file.o
+verbatim-
And this works,
$ cat test-force2.mak
default: file.o
.PHONY: file.o
file.c:
echo Auto-generating $...@... > $@
file.o: file.c
@echo Building $@ from $^...
cat $^ > $@
$ rm file.c file.o
$ make -f test-force2.mak
echo Auto-generating file.c... > file.c
Building file.o from file.c...
cat file.c > file.o
$ make -f test-force2.mak
Building file.o from file.c...
cat file.c > file.o
$ make -f test-force2.mak
Building file.o from file.c...
cat file.c > file.o
$ rm file.o
$ make -f test-force2.mak
Building file.o from file.c...
cat file.c > file.o
+verbatim-
But this does not,
$ cat test-force3.mak
default: file.o
.PHONY: file.o
file.c:
echo Auto-generating $...@... > $@
%.o: %.c
@echo Building $@ from $^...
cat $^ > $@
$ rm -f file.c file.o
$ make -f test-force3.mak
make: Nothing to be done for `default'.
+verbatim-
This allows me to think that my expectation in the original bug report was
valid. And a pattern rule should not be affected by the phoniness of a
target.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?28983>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-make