-define dumpinfo
- @mkdir -p tmp
- @echo -n Collecting package info...
- @-for dir in $(1)/*/; do \
- [ -f "$${dir}/Makefile" ] || continue; \
- $(call progress,Collecting package info... $${dir%%/}) \
- echo Source-Makefile: $${dir}Makefile; \
- $(NO_TRACE_MAKE) --no-print-dir DUMP=1 -C $$dir 3>/dev/null || echo "ERROR: please fix $${dir}Makefile" >&2; \
- echo; \
- done > $@
- $(call progress,Collecting package info... done)
- echo
-endef
-
-tmp/.pkginfo:
- $(call dumpinfo,package)
-
-tmp/.targetinfo:
- $(call dumpinfo,target/linux)
+tmp/.packageinfo tmp/.targetinfo: FORCE
+ mkdir -p tmp/info
+ $(NO_TRACE_MAKE) -s -f include/scan.mk SCAN_TARGET="targetinfo" SCAN_DIR="target/linux" SCAN_NAME="target" SCAN_DEPS="" SCAN_TARGET_DEPS="$(wildcard target/*/Makefile include/kernel*.mk)" SCAN_EXTRA=""
+ $(NO_TRACE_MAKE) -s -f include/scan.mk SCAN_TARGET="packageinfo" SCAN_DIR="package" SCAN_NAME="package" SCAN_DEPS="$(wildcard package/*/Makefile include/package*.mk include/kernel.mk)" SCAN_EXTRA=""