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 <jmulligan@redhat.com>
(cherry picked from commit
974effaa95ddbc9816a37e382a96e691f4e3cbdd)
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