Changeset View
Changeset View
Standalone View
Standalone View
Mk/Scripts/depends-list.sh
Context not available. | |||||
. ${dp_SCRIPTSDIR}/functions.sh | . ${dp_SCRIPTSDIR}/functions.sh | ||||
flavors=0 | |||||
recursive=0 | recursive=0 | ||||
missing=0 | missing=0 | ||||
requires_wrkdir=0 | requires_wrkdir=0 | ||||
while getopts "mrw" FLAG; do | while getopts "fmrw" FLAG; do | ||||
case "${FLAG}" in | case "${FLAG}" in | ||||
f) | |||||
flavors=1 | |||||
;; | |||||
m) | m) | ||||
missing=1 | missing=1 | ||||
recursive=1 | recursive=1 | ||||
Context not available. | |||||
case "${d}" in | case "${d}" in | ||||
*@*/*) ;; # Ignore @ in the path which would not be a flavor | *@*/*) ;; # Ignore @ in the path which would not be a flavor | ||||
*@*) d=${d%@*} ;; | *@*) [ "$flavors" -eq 1 ] || d=${d%@*} ;; | ||||
esac | esac | ||||
case " ${checked} " in | case " ${checked} " in | ||||
Context not available. | |||||
esac | esac | ||||
checked="${checked} ${d}" | checked="${checked} ${d}" | ||||
# Check if the dependency actually exists or skip otherwise. | # Check if the dependency actually exists or skip otherwise. | ||||
if [ ! -d ${d} ]; then | if [ ! -d ${d%@*} ]; then | ||||
echo "${dp_PKGNAME}: \"${d}\" non-existent -- dependency list incomplete" >&2 | echo "${dp_PKGNAME}: \"${d}\" non-existent -- dependency list incomplete" >&2 | ||||
continue | continue | ||||
fi | fi | ||||
Context not available. | |||||
# Grab any needed vars from the port. | # Grab any needed vars from the port. | ||||
if [ ${requires_wrkdir} -eq 1 ]; then | if [ ${requires_wrkdir} -eq 1 ]; then | ||||
set -- $(${dp_MAKE} -C ${d} -VWRKDIR -V_UNIFIED_DEPENDS) | set -- $(${dp_MAKE} -C ${d%@*} -VWRKDIR -V_UNIFIED_DEPENDS) | ||||
wrkdir="$1" | wrkdir="$1" | ||||
shift | shift | ||||
elif [ ${recursive} -eq 1 ]; then | elif [ ${recursive} -eq 1 ]; then | ||||
set -- $(${dp_MAKE} -C ${d} -V_UNIFIED_DEPENDS) | set -- $(${dp_MAKE} -C ${d%@*} -V_UNIFIED_DEPENDS) | ||||
fi | fi | ||||
# If a WRKDIR is required to show the dependency, check for it. | # If a WRKDIR is required to show the dependency, check for it. | ||||
Context not available. |