diff --git a/scripts/build_static_deps.sh b/scripts/build_static_deps.sh index a61c52e..736e6ba 100755 --- a/scripts/build_static_deps.sh +++ b/scripts/build_static_deps.sh @@ -23,6 +23,14 @@ BUILD_DEST="${REPO_DIR}/build/lib" git submodule update --init +if ${MAKE} -C "${ROCKSDB_LIB_DIR}" --dry-run static_lib | grep -q 'Nothing to be done'; then + echo "RocksDb static libraries already built. Skipping build." + exit 0 +else + ${REPO_DIR}/scripts/clean_build_artifacts.sh + echo "Building RocksDb static libraries." +fi + export DISABLE_WARNING_AS_ERROR=1 export ROCKSDB_DISABLE_SNAPPY=1 diff --git a/scripts/clean_build_artifacts.sh b/scripts/clean_build_artifacts.sh index 52f6d24..5fcf68a 100755 --- a/scripts/clean_build_artifacts.sh +++ b/scripts/clean_build_artifacts.sh @@ -13,7 +13,9 @@ set -e cd "$(dirname "${BASH_SOURCE[0]}")"/.. +echo "Cleaning up RocksDb build artifacts." + rm -rf build -make -C vendor/rocksdb clean +make -C vendor/rocksdb clean --no-print-directory > /dev/null -git submodule foreach --recursive git clean -fdx +git submodule foreach --recursive git clean -fdx > /dev/null