1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-24 00:48:27 +02:00

fix metadata scan for profile split

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6515 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2007-03-04 21:07:29 +00:00
parent 4efb08ae2d
commit 1d45d04ef7
2 changed files with 17 additions and 5 deletions

View File

@ -45,7 +45,7 @@ ifeq ($(FORCE),)
endif endif
define stamp define stamp
tmp/info/.stamp-$(1)-$(shell ls $(2)/*/Makefile | (md5sum || md5) 2>/dev/null | cut -d' ' -f1) tmp/info/.stamp-$(1)-$(shell ls $(2)/*/Makefile $(5) | (md5sum || md5) 2>/dev/null | cut -d' ' -f1)
endef endef
STAMP_pkginfo=$(call stamp,pkginfo,package) STAMP_pkginfo=$(call stamp,pkginfo,package)
@ -57,19 +57,23 @@ $(STAMP_$(1)):
@rm -f tmp/info/.stamp-$(1)* @rm -f tmp/info/.stamp-$(1)*
@touch $$@ @touch $$@
$(foreach FILE,$(shell ls $(2)/*/Makefile), $(foreach FILE,$(shell ls $(2)/*/Makefile $(5)),
tmp/.$(1): $(FILE) tmp/.$(1): $(FILE)
$(FILE): $(FILE):
) )
ifneq ($(5),)
tmp/.$(1): $(shell ls $(5))
endif
tmp/.$(1): $(STAMP_$(1)) $(4) tmp/.$(1): $(STAMP_$(1)) $(4)
@echo -n Collecting $(3) info... @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)" @$(NO_TRACE_MAKE) -s -f include/scan.mk SCAN_TARGET="$(1)" SCAN_DIR="$(2)" SCAN_NAME="$(3)" SCAN_DEPS="$(4)" SCAN_EXTRA="$(5)"
endef endef
$(eval $(call scan_info,pkginfo,package,package,include/package.mk)) $(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)) $(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

View File

@ -24,10 +24,18 @@ tmp/.$(SCAN_TARGET):
@($(call progress,Collecting $(SCAN_NAME) info: done)) @($(call progress,Collecting $(SCAN_NAME) info: done))
@echo @echo
ifneq ($(SCAN_EXTRA),)
SCAN_STAMP=tmp/info/.scan-$(SCAN_TARGET)-$(shell ls $(SCAN_EXTRA) 2>/dev/null | (md5sum || md5) 2>/dev/null | cut -d' ' -f1)
$(SCAN_STAMP):
rm -f tmp/info/.scan-$(SCAN_TARGET)-*
mkdir -p $(shell dirname $@)
touch $@
endif
define scanfiles define scanfiles
$(foreach FILE,$(SCAN), $(foreach FILE,$(SCAN),
tmp/.$(SCAN_TARGET): tmp/info/.$(SCAN_TARGET)-$(FILE) FORCE tmp/.$(SCAN_TARGET): tmp/info/.$(SCAN_TARGET)-$(FILE) FORCE
tmp/info/.$(SCAN_TARGET)-$(FILE): $(SCAN_DEPS) $(SCAN_DIR)/$(FILE)/Makefile tmp/info/.$(SCAN_TARGET)-$(FILE): $(SCAN_DEPS) $(SCAN_DIR)/$(FILE)/Makefile $(SCAN_STAMP)
{ \ { \
$$(call progress,Collecting $(SCAN_NAME) info: $(SCAN_DIR)/$(FILE)) \ $$(call progress,Collecting $(SCAN_NAME) info: $(SCAN_DIR)/$(FILE)) \
echo Source-Makefile: $(SCAN_DIR)/$(FILE)/Makefile; \ echo Source-Makefile: $(SCAN_DIR)/$(FILE)/Makefile; \