diff options
author | Bryan Drewery <bdrewery@FreeBSD.org> | 2015-10-09 18:00:44 +0000 |
---|---|---|
committer | Bryan Drewery <bdrewery@FreeBSD.org> | 2015-10-09 18:00:44 +0000 |
commit | 78aeec8db1250df4686bd384cc3c2d3a34473093 (patch) | |
tree | ac031204b78d33fadfdcd7a90a9b1e2061095992 /Mk | |
parent | e69f11baee890ac6eeec516a8de6bb3747e4fdea (diff) | |
download | ports-78aeec8db1250df4686bd384cc3c2d3a34473093.tar.gz ports-78aeec8db1250df4686bd384cc3c2d3a34473093.zip |
Notes
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/Scripts/all-depends-list.sh | 39 | ||||
-rw-r--r-- | Mk/Scripts/depends-list.sh | 17 | ||||
-rw-r--r-- | Mk/bsd.port.mk | 2 |
3 files changed, 18 insertions, 40 deletions
diff --git a/Mk/Scripts/all-depends-list.sh b/Mk/Scripts/all-depends-list.sh deleted file mode 100644 index 6afcac26b606..000000000000 --- a/Mk/Scripts/all-depends-list.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/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 ${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/Scripts/depends-list.sh b/Mk/Scripts/depends-list.sh index 8409607873f2..ebb541c33173 100644 --- a/Mk/Scripts/depends-list.sh +++ b/Mk/Scripts/depends-list.sh @@ -6,7 +6,21 @@ set -e . ${dp_SCRIPTSDIR}/functions.sh +recursive=0 +while getopts "r" FLAG; do + case "${FLAG}" in + r) + recursive=1 + ;; + *) + echo "Unknown flag" >&2 + exit 1 + ;; + esac +done + validate_env dp_ALLDEPENDS dp_PORTSDIR dp_PKGNAME +[ ${recursive} -eq 1 ] && validate_env dp_MAKE set -u @@ -31,6 +45,9 @@ check_dep() { continue fi echo ${d} + if [ ${recursive} -eq 1 ]; then + check_dep $(${dp_MAKE} -C ${d} -V_UNIFIED_DEPENDS) + fi done } diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 12c49074030e..cf390402f56f 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -4369,7 +4369,7 @@ ALL-DEPENDS-LIST= \ dp_MAKE="${MAKE}" \ dp_PKGNAME="${PKGNAME}" \ dp_SCRIPTSDIR="${SCRIPTSDIR}" \ - ${SH} ${SCRIPTSDIR}/all-depends-list.sh + ${SH} ${SCRIPTSDIR}/depends-list.sh -r CLEAN-DEPENDS-LIST= \ ${SETENV} dp_ALLDEPENDS="${_UNIFIED_DEPENDS}" \ |