summaryrefslogtreecommitdiff
path: root/package/depmaker
diff options
context:
space:
mode:
authorThorsten Glaser <tg@mirbsd.org>2009-12-19 22:53:46 +0059
committerWaldemar Brodkorb <wbx@openadk.org>2009-12-20 10:35:02 +0100
commit1c8d49e1ee453e44af6c57f10e8b929d5ccdd3a2 (patch)
treead61904908c100a16ef60192fbe0676a79a2d877 /package/depmaker
parent72ea86f8f4d9a00ca5f509eba515b38968924172 (diff)
create package/Depends.mk dynamically; add PKG_BUILDDEP to all Makefiles
Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
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