aboutsummaryrefslogtreecommitdiffstats
path: root/target/sdk
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2016-01-12 09:25:45 +0000
committerJo-Philipp Wich <jow@openwrt.org>2016-01-12 09:25:45 +0000
commit59c6e6e2a1fed3d1782ae236ff0f2447d2b3d1be (patch)
tree249abff95a4ee6b9ea66ec37e251be4327008ac3 /target/sdk
parent15e0d9b0284e53d6ba0fe1a4d2916862ddc7396a (diff)
downloadmaster-187ad058-59c6e6e2a1fed3d1782ae236ff0f2447d2b3d1be.tar.gz
master-187ad058-59c6e6e2a1fed3d1782ae236ff0f2447d2b3d1be.tar.bz2
master-187ad058-59c6e6e2a1fed3d1782ae236ff0f2447d2b3d1be.zip
sdk: add base repository fallback
When the build system cannot infer its own repository url then let it fall back to http://git.openwrt.org/ for the base feed. The path to openwrt.git is guessed from the VERSION_NUMBER variable: "unknown" or "r12345" -> http://git.openwrt.org/openwrt.git "15.05.1" -> http://git.openwrt.org/15.05/openwrt.git Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48212 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/sdk')
-rw-r--r--target/sdk/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/target/sdk/Makefile b/target/sdk/Makefile
index d0d113de90..857a6b76f5 100644
--- a/target/sdk/Makefile
+++ b/target/sdk/Makefile
@@ -37,6 +37,7 @@ SDK_DIRS = \
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'))
+BASE_FEED:=$(if $(BASE_FEED),$(BASE_FEED),src-git base https://git.openwrt.org/$(filter-out unknown/ r%/,$(subst $(space),.,$(wordlist 1,2,$(subst .,$(space),$(VERSION_NUMBER))))/)openwrt.git)
KDIR_BASE = $(patsubst $(TOPDIR)/%,%,$(LINUX_DIR))