depmaker 376 B

1234567891011121314151617181920
  1. cd "$(dirname "$0")"
  2. export TOPDIR=$(realpath ..)
  3. if gmake --help >/dev/null 2>&1; then
  4. export GMAKE=gmake
  5. else
  6. export GMAKE=make
  7. fi
  8. for subdir in */Makefile; do
  9. subdir=${subdir%/*}
  10. cd $subdir
  11. deps=$($GMAKE show=PKG_BUILDDEP)
  12. cd ..
  13. [[ -n $deps ]] || continue
  14. x="${subdir}-compile:"
  15. for dep in $deps; do
  16. x="$x ${dep}-compile"
  17. done
  18. print -r -- $x
  19. done >Depends.mk