Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Aug 1996 13:57:15 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        current@freebsd.org
Subject:   DEPEND and/or NO_DEPEND broken
Message-ID:  <199608250357.NAA19669@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608250357.NAA19669>