Move all-depends-list to a regular script

The benefice beside being more readable is to allow support for dependency line
without ${PORTSDIR}

This is also necessary to be able to easily hack on it for FLAVORS/SUBPACKAGE
support
This commit is contained in:
Baptiste Daroussin 2015-07-01 20:27:19 +00:00
parent 1ab22a9539
commit c389e6d809
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=391121
2 changed files with 45 additions and 29 deletions

View file

@ -0,0 +1,39 @@
#!/bin/sh
# MAINTAINER: portmgr@FreeBSD.org
# $FreeBSD$
set -e
. ${dp_SCRIPTSDIR}/functions.sh
validate_env dp_ALLDEPENDS dp_PORTSDIR dp_PKGNAME dp_MAKE
set -u
check_dep() {
for _dep ; do
myifs=${IFS}
IFS=:
set -- ${_dep}
IFS=${myifs}
case "${2}" in
/*) d=${2} ;;
*) d=${dp_PORTSDIR}/${2} ;;
esac
case " ${checked} " in
*\ ${d}\ *) continue ;; # Already checked
esac
checked="${checked} ${d}"
if [ ! -d ]; then
echo "${dp_PKGNAME}: \"${d}\" non-existent -- dependency list incomplete" >&2
continue
fi
echo ${d}
check_dep $(${dp_MAKE} -C ${d} -V_UNIFIED_DEPENDS)
done
}
checked=
check_dep ${dp_ALLDEPENDS}

View file

@ -4368,35 +4368,12 @@ all-depends-list:
@${ALL-DEPENDS-LIST}
ALL-DEPENDS-LIST= \
L="${_DEPEND_DIRS}"; \
checked=""; \
while [ -n "$$L" ]; do \
l=""; \
for d in $$L; do \
case $$checked in \
$$d\ *|*\ $$d\ *|*\ $$d) \
continue;; \
esac; \
checked="$$checked $$d"; \
if [ ! -d $$d ]; then \
${ECHO_MSG} "${PKGNAME}: \"$$d\" non-existent -- dependency list incomplete" >&2; \
continue; \
fi; \
${ECHO_CMD} $$d; \
if ! children=$$(cd $$d && ${MAKE} -V _DEPEND_DIRS); then\
${ECHO_MSG} "${PKGNAME}: \"$$d\" erroneous -- dependency list incomplete" >&2; \
continue; \
fi; \
for child in $$children; do \
case "$$checked $$l" in \
$$child\ *|*\ $$child\ *|*\ $$child) \
continue;; \
esac; \
l="$$l $$child"; \
done; \
done; \
L=$$l; \
done
@${SETENV} dp_ALLDEPENDS="${_UNIFIED_DEPENDS}" \
dp_PORTSDIR="${PORTSDIR}" \
dp_MAKE="${MAKE}" \
dp_PKGNAME="${PKGNAME}" \
dp_SCRIPTSDIR="${SCRIPTSDIR}" \
${SH} ${SCRIPTSDIR}/all-depends-list.sh
CLEAN-DEPENDS-FULL= \
L="${_DEPEND_DIRS}"; \