packages: uboot-sunxi: fix SATA powerup on Bananapro
[openwrt/svn-archive/archive.git] / include / feeds.mk
1 #
2 # Copyright (C) 2014 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 -include $(TMP_DIR)/.packagesubdirs
9
10 FEEDS_AVAILABLE:=$(shell $(SCRIPT_DIR)/feeds list -n)
11 FEEDS_INSTALLED:=$(notdir $(wildcard $(TOPDIR)/package/feeds/*))
12 FEEDS_ENABLED:=$(foreach feed,$(FEEDS_INSTALLED),$(if $(CONFIG_FEED_$(feed)),$(feed)))
13 FEEDS_DISABLED:=$(filter-out $(FEEDS_ENABLED),$(FEEDS_AVAILABLE))
14
15 PKG_CONFIG_DEPENDS += \
16 CONFIG_PER_FEED_REPO \
17 CONFIG_PER_FEED_REPO_ADD_DISABLED \
18 CONFIG_PER_FEED_REPO_ADD_COMMENTED \
19 $(foreach feed,$(FEEDS_INSTALLED),CONFIG_FEED_$(feed))
20
21 # 1: package name
22 define FeedPackageDir
23 $(strip $(if $(CONFIG_PER_FEED_REPO), \
24 $(abspath $(PACKAGE_DIR)/$(if $(Package/$(1)/subdir),$(Package/$(1)/subdir),base)), \
25 $(PACKAGE_DIR)))
26 endef
27
28 # 1: destination file
29 define FeedSourcesAppend
30 ( \
31 $(strip $(if $(CONFIG_PER_FEED_REPO), \
32 $(foreach feed,base kernel $(FEEDS_ENABLED),echo "src/gz %n_$(feed) %U/$(feed)";) \
33 $(if $(CONFIG_PER_FEED_REPO_ADD_DISABLED), \
34 $(foreach feed,$(FEEDS_DISABLED),echo "$(if $(CONFIG_PER_FEED_REPO_ADD_COMMENTED),# )src/gz %n_$(feed) %U/$(feed)";)) \
35 , \
36 echo "src/gz %n %U"; \
37 )) \
38 ) >> $(1)
39 endef