Skip to content
Snippets Groups Projects
Commit c77feae6 authored by John Crispin's avatar John Crispin
Browse files

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: default avatarMathieu Olivari <mathieu@qca.qualcomm.com>

SVN-Revision: 40945
parent 45e3540a
No related branches found
No related tags found
No related merge requests found
...@@ -32,6 +32,12 @@ export HOST_EXTRACFLAGS=-I$(STAGING_DIR_HOST)/include ...@@ -32,6 +32,12 @@ export HOST_EXTRACFLAGS=-I$(STAGING_DIR_HOST)/include
# defined in quilt.mk # defined in quilt.mk
Kernel/Patch:=$(Kernel/Patch/Default) 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_EXTERNAL_KERNEL_TREE)),"")
ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"") ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"")
define Kernel/Prepare/Default define Kernel/Prepare/Default
...@@ -41,7 +47,7 @@ ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"") ...@@ -41,7 +47,7 @@ ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
endef endef
else else
define Kernel/Prepare/Default 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 endef
endif endif
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment