1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-16 12:14:01 +02:00

nuke some unnecessary complexity in the metadata scanning - simply call include/scan.mk on every make invocation (does not add any noticeable performance impact)

SVN-Revision: 6745
This commit is contained in:
Felix Fietkau 2007-03-28 18:01:46 +00:00
parent 92f558c4be
commit e71ae20b0b

View File

@ -44,36 +44,11 @@ ifeq ($(FORCE),)
world: tmp/.prereq-packages tmp/.prereq-target world: tmp/.prereq-packages tmp/.prereq-target
endif endif
define stamp tmp/.pkginfo: FORCE
tmp/info/.stamp-$(1)-$(shell ls $(2)/*/Makefile $(5) | (md5sum || md5) 2>/dev/null | cut -d' ' -f1) @$(NO_TRACE_MAKE) -s -f include/scan.mk SCAN_TARGET="pkginfo" SCAN_DIR="package" SCAN_NAME="package" SCAN_DEPS="$(shell ls include/package*.mk) include/kernel.mk" SCAN_EXTRA=""
endef
STAMP_pkginfo=$(call stamp,pkginfo,package) tmp/.targetinfo: FORCE
STAMP_targetinfo=$(call stamp,targetinfo,target/linux) @$(NO_TRACE_MAKE) -s -f include/scan.mk SCAN_TARGET="targetinfo" SCAN_DIR="target/linux" SCAN_NAME="target" SCAN_DEPS="$(shell ls include/kernel*.mk)" SCAN_EXTRA=""
define scan_info
$(STAMP_$(1)):
@mkdir -p tmp/info
@rm -f tmp/info/.stamp-$(1)*
@touch $$@
$(foreach FILE,$(shell ls $(2)/*/Makefile $(5)),
tmp/.$(1): $(FILE)
$(FILE):
)
ifneq ($(5),)
tmp/.$(1): $(shell ls $(5))
endif
tmp/.$(1): $(STAMP_$(1)) $(4)
@echo -n Collecting $(3) info...
@$(NO_TRACE_MAKE) -s -f include/scan.mk SCAN_TARGET="$(1)" SCAN_DIR="$(2)" SCAN_NAME="$(3)" SCAN_DEPS="$(4)" SCAN_EXTRA="$(5)"
endef
$(eval $(call scan_info,pkginfo,package,package,include/package.mk))
$(eval $(call scan_info,targetinfo,target/linux,target,include/kernel-build.mk include/kernel-version.mk,target/linux/*/profiles/*.mk))
tmpinfo-clean: FORCE tmpinfo-clean: FORCE
@-rm -rf tmp/.pkginfo tmp/.targetinfo @-rm -rf tmp/.pkginfo tmp/.targetinfo