I shouldn't have to do this. This should have been spotted by the loser
who changed tcsh's Makefile. Brad should have noticed it no longer builds
and fixed this, along with mtree/BSD.local.dist...
dir-depends: list of SUBDIRS this port depends on (with flavors, subpackages),
to use with tsort.
build-depends-list, run-depends-list: list of pkgspec:dir needed for this
port, no recursion. To use for INDEX.
- move FLAVOR_EXT up so that WRK* are correct when they're needed for
dependencies.
- build a list of _PACKAGE_COOKIES, one for each subpackage.
- let package go through an indirection:
package: ${_PACKAGE_COOKIES}
_PACKAGE_COOKIE_${SUB}:
SUBPACKAGE=${SUB} ${MAKE} _package
so that all packages are `flat', and subpackages can depend on each other
freely.
don't work, as they propagate down subdirs.
Use `FLAVOR=a make' (sh) or `env FLAVOR=a make' (csh) instead.
Error out with a useful error message if old usage is encountered.
always define _ALWAYS_DEP, _BUILD_DEP, _RUN_DEP and test for emptiness
instead of definedness, so that the code is still optimized away when
dependency lists are defined, but empty.
Use eval to simplify passing those to submakes.
Note that the preferred separator is ',', not ':'.
(Because ':' can't be used unambiguously in *_DEPENDS, whereas ',' can)
NetBSD did this a while ago, this is a natural idea. It just took me
some time to figure out how to do that in a MULTI_PACKAGE context,
while maintaining compatibility with existing stuff.
* pull every dependency under the same rule, using specialized fragments.
* re-check after the dependency is expanded, unless earlyexit is true.
* explicitly recognize /nonexistent as a specific way to have always
triggered dependencies, use it to handle DEPENDS in a uniform way.
* parse dependencies fully. Note that we know have a pkg variable that will
be used.
Thanks to naddy@ for useful tweaks.
This is probably not quite perfect yet, stuff may break. Other stuff that
remain to be done:
- handle library dependencies better, so that lib.10 will match only
lib.10.x and not lib.100.
- handle default FLAVORS correctly. This involves not
passing FLAVOR='', but rearranging ${MAKE} ${_DEPEND_THRU} to remove
FLAVOR from the environment and from MAKEFLAGS (yucky).