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>
This commit is contained in:
Michael Pratt 2024-07-11 02:36:18 -04:00 committed by Robert Marko
parent edf927690e
commit 0a8ed4c122
1 changed files with 3 additions and 1 deletions

View File

@ -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