[build-configurations] Make BUILD_DIR configurable

Authored by jasonbcox on Oct 4 2019, 20:48.


[build-configurations] Make BUILD_DIR configurable

Summary: Allows building from any directory. This makes cleaning up the build dir predictable when executing from other scripts, thereby making them more robust.

Test Plan:

ABC_BUILD_NAME=build-without-wallet ./build-configurations.sh  # default
ABC_BUILD_NAME=build-without-wallet BUILD_DIR=../../build-test ./build-configurations.sh

# Make sure build works as expected when the build dir doesn't exist
rm -rf ../../build
ABC_BUILD_NAME=build-without-wallet ./build-configurations.sh

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D4213