Skip to content

Commit

Permalink
script: have run-make.sh honor BUILD_DIR like do_cmake.sh does
Browse files Browse the repository at this point in the history
The BUILD_DIR environment variable is honored by do_cmake.sh in order to
create multiple build output directories. Before this change run-make.sh
did not support BUILD_DIR the same way as do_cmake.sh. This change makes
it possible to use BUILD_DIR with run-make.sh.

Signed-off-by: John Mulligan <[email protected]>
  • Loading branch information
phlogistonjohn committed Feb 7, 2023
1 parent 70bf755 commit 974effa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/script/run-make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,11 @@ function build() {
if test -n "$targets"; then
targets="--target $targets"
fi
$DRY_RUN cd build
local bdir=build
if [ "$BUILD_DIR" ]; then
bdir="$BUILD_DIR"
fi
$DRY_RUN cd "${bdir}"
BUILD_MAKEOPTS=${BUILD_MAKEOPTS:-$DEFAULT_MAKEOPTS}
test "$BUILD_MAKEOPTS" && echo "make will run with option(s) $BUILD_MAKEOPTS"
# older cmake does not support --parallel or -j, so pass it to underlying generator
Expand Down

0 comments on commit 974effa

Please sign in to comment.