diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2015-05-28 09:47:37 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2015-05-28 09:47:37 +0000 |
commit | 3c5357d6efe1a8d603f0071ce64d6807a6ebdfb6 (patch) | |
tree | 287839d2c13fa7b1309c60e1feffa34adfe85cb4 /include/feeds.mk | |
parent | 21e16964bf40bb89a759a8e250e29af63d1402cf (diff) | |
download | mtk-20170518-3c5357d6efe1a8d603f0071ce64d6807a6ebdfb6.zip mtk-20170518-3c5357d6efe1a8d603f0071ce64d6807a6ebdfb6.tar.gz mtk-20170518-3c5357d6efe1a8d603f0071ce64d6807a6ebdfb6.tar.bz2 |
feeds: use common macro "FeedSourcesAppend" to populate opkg configurations
This introduces a common macro to assemble the correct url templates to
avoid code duplication and have the feed config handling in a central place.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
SVN-Revision: 45799
Diffstat (limited to 'include/feeds.mk')
-rw-r--r-- | include/feeds.mk | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/feeds.mk b/include/feeds.mk index 695b03b..b1a8f81 100644 --- a/include/feeds.mk +++ b/include/feeds.mk @@ -24,3 +24,16 @@ $(strip $(if $(CONFIG_PER_FEED_REPO), \ $(abspath $(PACKAGE_DIR)/$(if $(Package/$(1)/feed),$(Package/$(1)/feed),base)), \ $(PACKAGE_DIR))) endef + +# 1: destination file +define FeedSourcesAppend +( \ + $(strip $(if $(CONFIG_PER_FEED_REPO), \ + $(foreach feed,base $(FEEDS_ENABLED),echo "src/gz %n_$(feed) %U/$(feed)";) \ + $(if $(CONFIG_PER_FEED_REPO_ADD_DISABLED), \ + $(foreach feed,$(FEEDS_DISABLED),echo "$(if $(CONFIG_PER_FEED_REPO_ADD_COMMENTED),# )src/gz %n_$(feed) %U/$(feed)";)) \ + , \ + echo "src/gz %n %U"; \ + )) \ +) >> $(1) +endef |