summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2017-03-08 05:33:27 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2017-03-17 04:00:53 +0100
commitf85cada8b7e793086fe140716c4d47622cdbc2b7 (patch)
tree827553fcdcc6d2f1a8258b98a819c00920118e21
parent53065329595d0de0279de9aeda373fa3a9f973db (diff)
mk/host-bottom: Introduce HOST_INSTALL_STYLE
This is helpful when a package could use HOST_STYLE=auto but doesn't provide an install target. In that case, one can now set | HOST_STYLE=auto | HOST_INSTALL_STYLE=manual and define a custom host-install target while still making use of the auto targets for anything else. Signed-off-by: Phil Sutter <phil@nwl.cc>
-rw-r--r--mk/host-bottom.mk8
1 files changed, 5 insertions, 3 deletions
diff --git a/mk/host-bottom.mk b/mk/host-bottom.mk
index 21a28a051..a8f6db773 100644
--- a/mk/host-bottom.mk
+++ b/mk/host-bottom.mk
@@ -84,20 +84,22 @@ endif
${MAKE} host-build $(MAKE_TRACE)
touch $@
+HOST_INSTALL_STYLE?= ${HOST_STYLE}
+
hostpost-install:
host-install: ${ALL_HOSTINST}
${_HOST_FAKE_COOKIE}: ${_HOST_BUILD_COOKIE}
@$(CMD_TRACE) "installing.. "
@mkdir -p ${HOST_WRKINST}
-ifeq (${HOST_STYLE},)
+ifeq (${HOST_INSTALL_STYLE},)
cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
DESTDIR='' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE)
endif
-ifeq (${HOST_STYLE},auto)
+ifeq (${HOST_INSTALL_STYLE},auto)
cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
DESTDIR='${STAGING_HOST_DIR}' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE)
endif
-ifeq (${HOST_STYLE},manual)
+ifeq (${HOST_INSTALL_STYLE},manual)
env ${HOST_MAKE_ENV} ${MAKE} host-install $(MAKE_TRACE)
endif
env ${HOST_MAKE_ENV} ${MAKE} hostpost-install $(MAKE_TRACE)