Date: Wed, 17 Dec 1997 19:28:42 +1100 From: Bruce Evans <bde@zeta.org.au> To: bugs@freebsd.org Subject: .PHONY phony Message-ID: <199712170828.TAA25548@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
The phony targets `all', `depend', `install', etc, in *mk don't work right, and .PHONY doesn't work right enough to fix them. E.g., 1) `make -t' usually touches `objwarn', `all-man' and `all'. 2) The bootstrap phase of `make world' creates some bogus targets named `install'. This happens because NOINFO is defined, and the install rule for info directories is null in this case, and some contrib source directories contain a file named `install.sh'. This causes `make' to use the null suffix rule for .sh to create `install' by copying `install.sh'. If you define NOCLEAN, then the file breaks installation when NOINFO is unset later. With gnu make, declaring the special targets as `.PHONY' fixes all prolems like this. With BSD make, it only fixes the last one (it just forces the special rule to run even if the target already exists). Problem 1) can be fixed using the .OPTIONAL attribute. There doesn't seem to be any way to prevent null rules getting replaced by suffix rules. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712170828.TAA25548>