diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-07-01 20:27:19 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-07-01 20:27:19 +0000 |
commit | c389e6d809c8e50b42421cf4ed381b68eb64127c (patch) | |
tree | 946ce97f197f9dd87f4b8fd17f9702822010b6c5 /Mk | |
parent | Update to 5.0.3 (diff) |
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
Notes
Notes:
svn path=/head/; revision=391121
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/Scripts/all-depends-list.sh | 39 | ||||
-rw-r--r-- | Mk/bsd.port.mk | 35 |
2 files changed, 45 insertions, 29 deletions
diff --git a/Mk/Scripts/all-depends-list.sh b/Mk/Scripts/all-depends-list.sh new file mode 100644 index 000000000000..982878dff556 --- /dev/null +++ b/Mk/Scripts/all-depends-list.sh @@ -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} diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index c95af6ab0022..d308af557b6d 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -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}"; \ |