-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: $(wildcard package/*/Makefile include/package*.mk include/kernel.mk) FORCE
+tmp/.targetinfo: $(wildcard target/*/Makefile include/kernel*.mk) FORCE
+tmp/.%info:
+ mkdir -p tmp/info
+ $(NO_TRACE_MAKE) -s -f include/scan.mk SCAN_TARGET="$*info" SCAN_DIR="$(patsubst target,target/linux,$*)" SCAN_NAME="$*" SCAN_DEPS="$(filter FORCE, $^)" SCAN_EXTRA=""