Build external sources with make
Generally, you'll need to generate a Makefile from an external configuration tool.
-
xbuild
When given aMakefile
source (directly or indirectly), make will build external sources. The target that this rule names is the directory and repository in which this build occurs -
xdist
When given an XBUILD repository source generated from aMakefile
, make will install the external sources binaries, libraries, headers, and, or whichever actions it performs into the configured installation target directory. The target that this rule names is that installation directory and repository
For all make derived XBUILD and XDIST targets the following list of documented features are relevant.
Control make build actions of the XBUILD derived types: XMAKE_SRC_BUILD and XMAKE_EXO_BUILD with properties based on these features:
-
<xmake-env> VAR=value
set environment variable VAR to value -
<xbuild-arg> ARG
ARG passed to make plainly When not set, make receives no argument, taking default action -
<xbuild-jobs> N
Passed to make with the-j
flag
Defaults to a value proportional to invoked boost.build executable's-j
value
Control make install actions of the XDIST derived type XMAKE_DIST with properties based on these features:
-
<xdist-arg> ARG
ARG passed to make plainly
When not set, make receives aninstall
argument -
<xdist-jobs> N
Passed to make as the-j
flag
Defaults to1
When N has the value:%default%
, make will receive a-j
flag which has the same value as default for <xbuild-jobs> feature -
<xdist-location>
Control location of 'xdist' directory. TODO: Document & Test -
<xdist-staged> no | yes
If yes, useDESTDIR={xdist-directory}
as argument to make
Defaults to no
- workspace/log/make-build.log
- workspace/log/make-install.log
XBUILD and XDIST actions execute in serial by using a JAM_SEMAPHORE. This mitigates CPU, memory and other resource utilization.
Type | Base Type | Infer from source file | Generate from | Notes |
---|---|---|---|---|
XMAKEFILE | base type | |||
XMAKEFILE_SRC | XMAKEFILE | Makefile |
source Makefile (not generated) | |
XMAKEFILE_EXO | XMAKEFILE | Makefile Generators | generated Makefile | |
XMAKE_SRC_BUILD | XBUILD | XMAKEFILE_SRC | build in source directory | |
XMAKE_EXO_BUILD | XBUILD | XMAKEFILE_EXO | build out-of-source in clean build directory | |
XMAKE_DIST | XDIST | XMAKE_SRC_BUILD | XMAKE_EXO_BUILD |