[openwrt/openwrt] build: add support for host building in a subdirectory

LEDE Commits lede-commits at lists.infradead.org
Sat Jul 27 11:32:25 PDT 2024


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0a8ed4c122efe34963ba14d1ebe98dee13272a30

commit 0a8ed4c122efe34963ba14d1ebe98dee13272a30
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Thu Jul 11 02:36:18 2024 -0400

    build: add support for host building in a subdirectory
    
    Add HOST_MAKE_PATH and use it in order to execute Make
    in a subdirectory of the build directory
    and in a similar way that MAKE_PATH is used for target building.
    
    Signed-off-by: Michael Pratt <mcpratt at pm.me>
    Link: https://github.com/openwrt/openwrt/pull/15991
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 include/host-build.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/host-build.mk b/include/host-build.mk
index 8313dbfbb3..4dfa055db9 100644
--- a/include/host-build.mk
+++ b/include/host-build.mk
@@ -111,9 +111,11 @@ define Host/Configure
   $(call Host/Configure/Default)
 endef
 
+HOST_MAKE_PATH ?= .
+
 define Host/Compile/Default
 	+$(HOST_MAKE_VARS) \
-	$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \
+	$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/$(HOST_MAKE_PATH) \
 		$(HOST_MAKE_FLAGS) \
 		$(1)
 endef




More information about the lede-commits mailing list