cd "$(dirname "$0")" export TOPDIR=$(realpath ..) if gmake --help >/dev/null 2>&1; then export GMAKE=gmake else export GMAKE=make fi for dn in */Makefile; do dn=${dn%/*} case $dn { (@(?(e)g|uc|)libc|libpthread|uclibc++) ;; (*) # dnu: directory name, uppercase, y/-+/_X/ typeset -u dnu=${dn//-/_} dnu=${dnu//+/X} print "package-\$(ADK_COMPILE_${dnu}) += $dn" ;; } cd $dn deps=$($GMAKE show=PKG_BUILDDEP) cd .. [[ -n $deps ]] || continue x="${dn}-compile:" for dep in $deps; do x="$x ${dep}-compile" done print -r -- $x done >Depends.mk