X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=include%2Fscan.mk;fp=include%2Fscan.mk;h=c2a8f7eabb39f74555bc532f368134435ad571ba;hb=50a5a8df2259ebdcc03dae3491e119fc2225e1ed;hp=c3015793d2e7d0c5acee48c5ce8781ee62d4b4dd;hpb=1592f3f607e242de18c38b76b95399119439157f;p=openwrt%2Fstaging%2Flynxis%2Fomap.git diff --git a/include/scan.mk b/include/scan.mk index c3015793d2..c2a8f7eabb 100644 --- a/include/scan.mk +++ b/include/scan.mk @@ -47,9 +47,15 @@ $(OVERRIDELIST): rm -f $(TMP_DIR)/info/.overrides-$(SCAN_TARGET)-* touch $@ +ifeq ($(SCAN_NAME),target) + GREP_STRING=BuildTarget +else + GREP_STRING=(Build/DefaultTargets|BuildPackage|.+Package) +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 -HE 'call (Build/DefaultTargets|Build(Package|Target)|.+Package)' | sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq | awk -v of=$(OVERRIDELIST) -f include/scan.awk > $@ + $(call FIND_L, $(SCAN_DIR)) $(SCAN_EXTRA) -mindepth 1 $(if $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) -name Makefile | xargs grep -HE '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) ( \