From owner-freebsd-bugs Wed Dec 17 00:31:40 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id AAA22675 for bugs-outgoing; Wed, 17 Dec 1997 00:31:40 -0800 (PST) (envelope-from owner-freebsd-bugs) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id AAA22669 for ; Wed, 17 Dec 1997 00:31:32 -0800 (PST) (envelope-from bde@zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.6.9) id TAA25548 for bugs@freebsd.org; Wed, 17 Dec 1997 19:28:42 +1100 Date: Wed, 17 Dec 1997 19:28:42 +1100 From: Bruce Evans Message-Id: <199712170828.TAA25548@godzilla.zeta.org.au> To: bugs@freebsd.org Subject: .PHONY phony Sender: owner-freebsd-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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