host-build: always define Host/Prepare/Default
authorChristian Marangi <ansuelsmth@gmail.com>
Wed, 22 May 2024 09:38:49 +0000 (11:38 +0200)
committerRISCi_ATOM <bob@bobcall.me>
Tue, 4 Jun 2024 15:52:14 +0000 (11:52 -0400)
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@gmail.com>
(cherry picked from commit 725389b7c745b0fa68426986c9bca14171f16887)

include/host-build.mk

index dba6b819da6349837ba84edb58bd38deea22889f..2d0c416f6e25a99eec91d09cf5f2e2845bf69be2 100644 (file)
@@ -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)