[PATCH 05/20] build: merge Kernel/Prepare steps together

Elliott Mitchell ehem+openwrt at m5p.com
Tue Nov 14 17:04:46 PST 2023


Date: Mon, 30 Oct 2023 14:46:24 -0700

The two Kernel/Prepare/Default implementations had become identical.
As such merge the identical sections together, and only have the
extra piece be conditional.

Signed-off-by: Elliott Mitchell <ehem+openwrt at m5p.com>
---
 include/kernel-defaults.mk | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
index d9842fd82a..05ec9afe09 100644
--- a/include/kernel-defaults.mk
+++ b/include/kernel-defaults.mk
@@ -21,17 +21,13 @@ else
 endif
 
 ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
-  ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"")
-    define Kernel/Prepare/Default
+  define Kernel/Prepare/Default
 	$(LINUX_CAT) $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS)
+    ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"")
 	$(Kernel/Patch)
 	$(if $(QUILT),touch $(LINUX_DIR)/.quilt_used)
-    endef
-  else
-    define Kernel/Prepare/Default
-	$(LINUX_CAT) $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS)
-    endef
-  endif
+    endif
+  endef
 else
   define Kernel/Prepare/Default
 	mkdir -p $(KERNEL_BUILD_DIR)
-- 
(\___(\___(\______          --=> 8-) EHM <=--          ______/)___/)___/)
 \BS (    |       ehem+openwrt at m5p.com     PGP 87145445       |    )   /
  \_CS\   |  _____  -O #include <stddisclaimer.h> O-   _____  |   /  _/
8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445






More information about the openwrt-devel mailing list