summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Pratt2024-07-11 06:36:18 +0000
committerRobert Marko2024-07-27 18:32:20 +0000
commit0a8ed4c122efe34963ba14d1ebe98dee13272a30 (patch)
treee004269bf6a5c7dacc5c52cc2a8dc365287aaa0d
parentedf927690ec1bb6d3b96255be19c0588f1a94a45 (diff)
downloadopenwrt-0a8ed4c122efe34963ba14d1ebe98dee13272a30.tar.gz
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@pm.me> Link: https://github.com/openwrt/openwrt/pull/15991 Signed-off-by: Robert Marko <robimarko@gmail.com>
-rw-r--r--include/host-build.mk4
1 files changed, 3 insertions, 1 deletions
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