X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Fscan.mk;h=d9cd4f7e8c30845a3de2725275e1188c694ed3a5;hb=f61359e16ef911a8fc01e7028942d9cad0bd8a96;hp=9b361f8b3b3b4b9c3e64b08e98a7a1d2c24515ca;hpb=a891e5e14f34d79005de0606eebf32b292f86023;p=openwrt%2Fopenwrt.git diff --git a/include/scan.mk b/include/scan.mk index 9b361f8b3b..d9cd4f7e8c 100644 --- a/include/scan.mk +++ b/include/scan.mk @@ -3,8 +3,6 @@ TMP_DIR:=$(TOPDIR)/tmp all: $(TMP_DIR)/.$(SCAN_TARGET) -include $(TOPDIR)/include/host.mk - SCAN_TARGET ?= packageinfo SCAN_NAME ?= package SCAN_DIR ?= package @@ -12,10 +10,24 @@ TARGET_STAMP:=$(TMP_DIR)/info/.files-$(SCAN_TARGET).stamp FILELIST:=$(TMP_DIR)/info/.files-$(SCAN_TARGET)-$(SCAN_COOKIE) OVERRIDELIST:=$(TMP_DIR)/info/.overrides-$(SCAN_TARGET)-$(SCAN_COOKIE) +export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH) + +ifeq ($(SCAN_NAME),target) + SCAN_DEPS=image/Makefile profiles/*.mk $(TOPDIR)/include/kernel*.mk $(TOPDIR)/include/target.mk image/*.mk +else + SCAN_DEPS=$(TOPDIR)/include/package*.mk +endif + ifeq ($(IS_TTY),1) - define progress + ifneq ($(strip $(NO_COLOR)),1) + define progress printf "\033[M\r$(1)" >&2; - endef + endef + else + define progress + printf "\r$(1)" >&2; + endef + endif else define progress :; @@ -51,12 +63,12 @@ $(OVERRIDELIST): ifeq ($(SCAN_NAME),target) GREP_STRING=BuildTarget else - GREP_STRING=(Build/DefaultTargets|BuildPackage) + GREP_STRING=(Build/DefaultTargets|BuildPackage|KernelPackage) endif $(FILELIST): $(OVERRIDELIST) rm -f $(TMP_DIR)/info/.files-$(SCAN_TARGET)-* - $(call FIND_L, $(SCAN_DIR)) $(SCAN_EXTRA) -mindepth 1 $(if $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) -name Makefile | xargs grep -aHE 'call $(GREP_STRING)' | sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq | awk -v of=$(OVERRIDELIST) -f include/scan.awk > $@ + find -L $(SCAN_DIR) $(SCAN_EXTRA) -mindepth 1 $(if $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) -name Makefile | xargs grep -aHE 'call $(GREP_STRING)' | sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq | awk -v of=$(OVERRIDELIST) -f include/scan.awk > $@ $(TMP_DIR)/info/.files-$(SCAN_TARGET).mk: $(FILELIST) ( \