summaryrefslogtreecommitdiff
path: root/include/scan.mk
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2014-08-05 11:24:24 +0000
committerJo-Philipp Wich <jow@openwrt.org>2014-08-05 11:24:24 +0000
commita720dd209f8b345cdfa5d2432287520389404445 (patch)
treef94fed2f4802eff85078645f20a7f829d55026c1 /include/scan.mk
parent1e6ab23098fd8dc49ba005dc0c477671a5ddb500 (diff)
downloadmtk-20170518-a720dd209f8b345cdfa5d2432287520389404445.zip
mtk-20170518-a720dd209f8b345cdfa5d2432287520389404445.tar.gz
mtk-20170518-a720dd209f8b345cdfa5d2432287520389404445.tar.bz2
build: introduce per feed repository support
This changeset implements a new menuconfig option to generate separate repositories for each enabled package feed instead of one monolithic one. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 42002
Diffstat (limited to 'include/scan.mk')
-rw-r--r--include/scan.mk8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/scan.mk b/include/scan.mk
index 4d08ee8..0998333 100644
--- a/include/scan.mk
+++ b/include/scan.mk
@@ -21,15 +21,19 @@ else
endef
endif
+define feedname
+$(if $(patsubst feeds/%,,$(1)),,$(word 2,$(subst /, ,$(1))))
+endef
+
define PackageDir
$(TMP_DIR)/.$(SCAN_TARGET): $(TMP_DIR)/info/.$(SCAN_TARGET)-$(1)
$(TMP_DIR)/info/.$(SCAN_TARGET)-$(1): $(SCAN_DIR)/$(2)/Makefile $(SCAN_STAMP) $(foreach DEP,$(DEPS_$(SCAN_DIR)/$(2)/Makefile) $(SCAN_DEPS),$(wildcard $(if $(filter /%,$(DEP)),$(DEP),$(SCAN_DIR)/$(2)/$(DEP))))
{ \
$$(call progress,Collecting $(SCAN_NAME) info: $(SCAN_DIR)/$(2)) \
echo Source-Makefile: $(SCAN_DIR)/$(2)/Makefile; \
- $(NO_TRACE_MAKE) --no-print-dir -r DUMP=1 -C $(SCAN_DIR)/$(2) $(SCAN_MAKEOPTS) 2>/dev/null || { \
+ $(NO_TRACE_MAKE) --no-print-dir -r DUMP=1 FEED="$(call feedname,$(2))" -C $(SCAN_DIR)/$(2) $(SCAN_MAKEOPTS) 2>/dev/null || { \
mkdir -p "$(TOPDIR)/logs/$(SCAN_DIR)/$(2)"; \
- $(NO_TRACE_MAKE) --no-print-dir -r DUMP=1 -C $(SCAN_DIR)/$(2) $(SCAN_MAKEOPTS) > $(TOPDIR)/logs/$(SCAN_DIR)/$(2)/dump.txt 2>&1; \
+ $(NO_TRACE_MAKE) --no-print-dir -r DUMP=1 FEED="$(call feedname,$(2))" -C $(SCAN_DIR)/$(2) $(SCAN_MAKEOPTS) > $(TOPDIR)/logs/$(SCAN_DIR)/$(2)/dump.txt 2>&1; \
$$(call progress,ERROR: please fix $(SCAN_DIR)/$(2)/Makefile - see logs/$(SCAN_DIR)/$(2)/dump.txt for details\n) \
rm -f $$@; \
}; \