-define dumpinfo
- @mkdir -p tmp
- @echo -n Collecting $(2) info...
- @-for dir in $(1)/*/; do \
- [ -f "$${dir}/Makefile" ] || continue; \
- $(call progress,Collecting $(2) 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 $(2) info: done))
- @echo
-endef
-
-tmp/.pkginfo:
- $(call dumpinfo,package,package)
-
-tmp/.targetinfo:
- $(call dumpinfo,target/linux,target)
+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-out FORCE, $^)" SCAN_EXTRA=""