diff options
author | John Crispin <blogic@openwrt.org> | 2014-06-02 12:45:19 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2014-06-02 12:45:19 +0000 |
commit | eeb79d7591215bfe2196a072db019f50f5f9c78b (patch) | |
tree | 64e1fc97cf1e3c670d668a9e3b23f50924004b14 /include | |
parent | 2c1b67136203729dea719ca40a33b44a0c73defb (diff) | |
download | upstream-eeb79d7591215bfe2196a072db019f50f5f9c78b.tar.gz upstream-eeb79d7591215bfe2196a072db019f50f5f9c78b.tar.bz2 upstream-eeb79d7591215bfe2196a072db019f50f5f9c78b.zip |
include: Clean-up kernel git command options management
The way git options are managed in kernel-defaults.mk makes additions
difficult. If requires different code path for each option; it's
ok so far as we handle only one option, but if we want to make the git
clone mechanism more flexible, more option will be required, which
will become tedious.
So; we'll move the GIT options into a variable, that may or may not be
set depending on the configuration, and we'll pass this variable to the
git command.
Signed-off-by: Mathieu Olivari <mathieu@qca.qualcomm.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40945 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include')
-rw-r--r-- | include/kernel-defaults.mk | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk index 499ecdf3d8..fd75a3f79f 100644 --- a/include/kernel-defaults.mk +++ b/include/kernel-defaults.mk @@ -32,6 +32,12 @@ export HOST_EXTRACFLAGS=-I$(STAGING_DIR_HOST)/include # defined in quilt.mk Kernel/Patch:=$(Kernel/Patch/Default) + +KERNEL_GIT_OPTS:= +ifneq ($(strip $(CONFIG_KERNEL_GIT_LOCAL_REPOSITORY)),"") + KERNEL_GIT_OPTS+=--reference $(CONFIG_KERNEL_GIT_LOCAL_REPOSITORY) +endif + ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"") ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"") define Kernel/Prepare/Default @@ -41,7 +47,7 @@ ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"") endef else define Kernel/Prepare/Default - git clone $(CONFIG_KERNEL_GIT_CLONE_URI) $(LINUX_DIR) + git clone $(KERNEL_GIT_OPTS) $(CONFIG_KERNEL_GIT_CLONE_URI) $(LINUX_DIR) endef endif else |