diff options
author | linimon <linimon@FreeBSD.org> | 2007-09-30 12:01:39 +0800 |
---|---|---|
committer | linimon <linimon@FreeBSD.org> | 2007-09-30 12:01:39 +0800 |
commit | 4aae8757d6a15768aabad30509387595804a549a (patch) | |
tree | f4bd490e5b0ee7fc77f54cf48f0804114ca67bc5 /Mk | |
parent | 9bfdd5fe5d580e48a0694197bd5d7c4295d6f094 (diff) | |
download | freebsd-ports-graphics-4aae8757d6a15768aabad30509387595804a549a.tar.gz freebsd-ports-graphics-4aae8757d6a15768aabad30509387595804a549a.tar.zst freebsd-ports-graphics-4aae8757d6a15768aabad30509387595804a549a.zip |
Add an anti-foot-shooting measure that protects against a dependent port
being null, resulting in an entire category being depended on. This was
seen with missing USE_PERL5 definitions, for which there is now a test;
however, it could theoretically be tripped over by other bad port
Makefiles. Since the failure mode is painful and seems unrelated to
the lack of the definition (the build will fail at some random point
within that entire category), IMHO it's worth the complexity tradeoff
to put this in.
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/bsd.port.mk | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 35896f59385..1e149d7c85a 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -4774,6 +4774,10 @@ ${deptype:L}-depends: .if !defined(NO_DEPENDS) @for i in `${ECHO_CMD} "${${deptype}_DEPENDS}"`; do \ prog=`${ECHO_CMD} $$i | ${SED} -e 's/:.*//'`; \ + if [ -z "$$prog" ]; then \ + ${ECHO_MSG} "Error: there is an empty port dependency in ${deptype}_DEPENDS."; \ + break; \ + fi; \ dir=`${ECHO_CMD} $$i | ${SED} -e 's/[^:]*://'`; \ if ${EXPR} "$$dir" : '.*:' > /dev/null; then \ target=`${ECHO_CMD} $$dir | ${SED} -e 's/.*://'`; \ |