From owner-freebsd-current Sat Aug 24 21:02:42 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id VAA00510 for current-outgoing; Sat, 24 Aug 1996 21:02:42 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id VAA00487 for ; Sat, 24 Aug 1996 21:02:32 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.12/8.6.9) id NAA19669 for current@freebsd.org; Sun, 25 Aug 1996 13:57:15 +1000 Date: Sun, 25 Aug 1996 13:57:15 +1000 From: Bruce Evans Message-Id: <199608250357.NAA19669@godzilla.zeta.org.au> To: current@freebsd.org Subject: DEPEND and/or NO_DEPEND broken Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk bsd.prog.mk and bsd.prog.mk now have ${DEPEND} in the dependencies for the `all' target, but ${DEPEND} is usually null at this point. (Dependencies are evaluated as they are read, using the current values of variables. This is why the `depend' target should not be part of the `all' target.) ${DEPEND} can be set to `depend' in /etc/make.conf or on the command line. Setting it on the command line is more work than just specifying the `depend' target on the command line. The NO_DEPEND ifdef in bsd.port.mk is completely useless. It sets ${DEPEND} after ${DEPEND} has been completely used. The caching effect of making dependencies at the "same" time as objects could be obtained by changing (simplifying) the SUBDIR processing to pass all targets to the sub-makes. (Run `make -n depend all install' in /usr/src to see the target-first order for the current version.) Then `make depend all' would work like the DEPEND changes were supposed to work - not completely correctly, because new dependencies might be overlooked, but good enough in most cases. The SUBDIR processing could even be changed to special- case the `depend' target so that `make depend all' is split into `make depend; make all' for subdirectories. This would be dangerous because people might depend on it and it wouldn't work in general (in particular, in leaf directories). The SUBDIR processing might need to special-case only the `depend' target so that the other targets don't get messed up. OTOH, `make all install' would probably benefit from it too. E.g., libraries would be installed earlier so programs would be linked to up to date versions of the libraries. Bruce