diff options
Diffstat (limited to 'package/depmaker')
-rw-r--r-- | package/depmaker | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/package/depmaker b/package/depmaker new file mode 100644 index 000000000..da3923554 --- /dev/null +++ b/package/depmaker @@ -0,0 +1,38 @@ +unset MAKEFLAGS +export MAKEFLAGS=s +cd "$(dirname "$0")" +export TOPDIR=$(realpath ..) +if gmake --help >/dev/null 2>&1; then + export GMAKE=gmake +else + export GMAKE=make +fi +GMAKE="$GMAKE --no-print-directory" +(( x_cols = (COLUMNS > 10) ? COLUMNS - 2 : 80 )) +typeset -L$x_cols pbar + +for dn in */Makefile; do + dn=${dn%/*} + pbar="$dn ..." + print -nu2 "$pbar\r" + 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 +pbar=done +print -u2 "$pbar" |