summaryrefslogtreecommitdiff
path: root/package/depmaker
diff options
context:
space:
mode:
Diffstat (limited to 'package/depmaker')
-rw-r--r--package/depmaker20
1 files changed, 20 insertions, 0 deletions
diff --git a/package/depmaker b/package/depmaker
new file mode 100644
index 000000000..06f5a9e28
--- /dev/null
+++ b/package/depmaker
@@ -0,0 +1,20 @@
+cd "$(dirname "$0")"
+export TOPDIR=$(realpath ..)
+if gmake --help >/dev/null 2>&1; then
+ export GMAKE=gmake
+else
+ export GMAKE=make
+fi
+
+for subdir in */Makefile; do
+ subdir=${subdir%/*}
+ cd $subdir
+ deps=$($GMAKE show=PKG_BUILDDEP)
+ cd ..
+ [[ -n $deps ]] || continue
+ x="${subdir}-compile:"
+ for dep in $deps; do
+ x="$x ${dep}-compile"
+ done
+ print -r -- $x
+done >Depends.mk