diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2014-10-16 16:28:12 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2014-10-16 16:28:12 +0000 |
commit | cc97eaff10d02be5e467ff190934589029620339 (patch) | |
tree | 4cd92ed0d974f0f17268daeaed43e8c3d2af38c3 /target/sdk | |
parent | 6358368500e45848b4d86e42d0555ccdba4355e3 (diff) | |
download | mtk-20170518-cc97eaff10d02be5e467ff190934589029620339.zip mtk-20170518-cc97eaff10d02be5e467ff190934589029620339.tar.gz mtk-20170518-cc97eaff10d02be5e467ff190934589029620339.tar.bz2 |
sdk: improve feed setup
- Add current buildroot scm url as base feed to feeds.conf
- Prefer feeds.conf over feeds.conf.default when generating the SDK feeds.conf.default
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
SVN-Revision: 42935
Diffstat (limited to 'target/sdk')
-rw-r--r-- | target/sdk/Makefile | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/target/sdk/Makefile b/target/sdk/Makefile index 1c696d5..8973b28 100644 --- a/target/sdk/Makefile +++ b/target/sdk/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2008 OpenWrt.org +# Copyright (C) 2006-2014 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -38,7 +38,9 @@ SDK_DIRS = \ $(STAGING_SUBDIR_TARGET) \ $(STAGING_SUBDIR_TOOLCHAIN) -SVN_PACKAGE_URL=$(shell svn info ../../package | awk '/^URL:/ { print $$2; }') +BASE_FEED:=$(shell git config --get remote.origin.url 2>/dev/null | sed -ne 's/^/src-git base /p') +BASE_FEED:=$(if $(BASE_FEED),$(BASE_FEED),$(shell cd $(TOPDIR); LC_ALL=C git svn info 2>/dev/null | sed -ne 's/^URL: /src-gitsvn base /p')) +BASE_FEED:=$(if $(BASE_FEED),$(BASE_FEED),$(shell cd $(TOPDIR); LC_ALL=C svn info 2>/dev/null | sed -ne 's/^URL: /src-svn base /p')) KDIR_BASE = $(patsubst $(TOPDIR)/%,%,$(LINUX_DIR)) @@ -102,11 +104,14 @@ $(BIN_DIR)/$(SDK_NAME).tar.bz2: clean $(CP) \ $(TOPDIR)/package/Makefile \ $(SDK_BUILD_DIR)/package/ - $(if $(SVN_PACKAGE_URL),echo "src-svn trunk $(SVN_PACKAGE_URL)" \ - > $(SDK_BUILD_DIR)/feeds.conf.default,\ - -rm -f $(SDK_BUILD_DIR)/feeds.conf.default) - cat $(TOPDIR)/feeds.conf.default \ - >> $(SDK_BUILD_DIR)/feeds.conf.default + + -rm -f $(SDK_BUILD_DIR)/feeds.conf.default + $(if $(BASE_FEED),echo "$(BASE_FEED)" > $(SDK_BUILD_DIR)/feeds.conf.default) + if [ -f $(TOPDIR)/feeds.conf ]; then \ + cat $(TOPDIR)/feeds.conf >> $(SDK_BUILD_DIR)/feeds.conf.default; \ + else \ + cat $(TOPDIR)/feeds.conf.default >> $(SDK_BUILD_DIR)/feeds.conf.default; \ + fi $(SED) 's,^# REVISION:=.*,REVISION:=$(REVISION),g' $(SDK_BUILD_DIR)/include/version.mk $(SED) '/LINUX_VERMAGIC:=/ { s,unknown,$(LINUX_VERMAGIC),g }' $(SDK_BUILD_DIR)/include/kernel.mk find $(SDK_BUILD_DIR) -name .git | $(XARGS) rm -rf |