[openwrt/openwrt] host-build: always define Host/Prepare/Default

LEDE Commits lede-commits at lists.infradead.org
Wed May 22 03:01:00 PDT 2024


ansuel pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/d1fc2ea8c78db13a07c129296453454f72108bec

commit d1fc2ea8c78db13a07c129296453454f72108bec
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed May 22 11:38:49 2024 +0200

    host-build: always define Host/Prepare/Default
    
    We currently skip defining Host/Prepare/Default if HOST_UNPACK is not
    defined.
    
    This is mostly the case for Host packages that just provide files with
    the src directory and don't need to be downloaded/extracted.
    
    This was probably done lots of times ago due to quilt causing error as
    the patches directory wasn't present.
    This has changed now and quilt can correctly detect if no patches needs
    to be applied (instead of terminating with error)
    
    Always define Host/Prepare/Default to make tools/refresh correctly works
    as HOST_QUILT is hardcoded enabled for this make target and will
    complain for tool not prepared for quilt patches.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
    (cherry picked from commit 725389b7c745b0fa68426986c9bca14171f16887)
---
 include/host-build.mk | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/include/host-build.mk b/include/host-build.mk
index dba6b819da..2d0c416f6e 100644
--- a/include/host-build.mk
+++ b/include/host-build.mk
@@ -35,13 +35,11 @@ include $(INCLUDE_DIR)/autotools.mk
 _host_target:=$(if $(HOST_QUILT),,.)
 
 Host/Patch:=$(Host/Patch/Default)
-ifneq ($(strip $(HOST_UNPACK)),)
-  define Host/Prepare/Default
-	$(HOST_UNPACK)
+define Host/Prepare/Default
+	$(if $(strip $(HOST_UNPACK)),$(HOST_UNPACK))
 	[ ! -d ./src/ ] || $(CP) ./src/* $(HOST_BUILD_DIR)
 	$(Host/Patch)
-  endef
-endif
+endef
 
 define Host/Prepare
   $(call Host/Prepare/Default)




More information about the lede-commits mailing list