diff --git a/build-linux.sh b/build-linux.sh index 04eea78f5e9..444795a8c7e 100755 --- a/build-linux.sh +++ b/build-linux.sh @@ -52,15 +52,14 @@ run_cmake() { mkdir -p build cmake . -Bbuild - touch cmake-stamp } run_cmake_if() { - if [[ CMakeLists.txt -nt cmake-stamp ]]; then + if [[ ! -f build/CMakeCache.txt ]]; then run_cmake fi - if [[ ! -d build ]]; then + if [[ CMakeLists.txt -nt build/CMakeCache.txt ]]; then run_cmake fi } @@ -68,17 +67,19 @@ run_cmake_if() run_clean() { if [[ -d build ]]; then - cd build + pushd build make clean + popd fi } run_build() { local flavor=$1 - cd build + pushd build make -j 2 $flavor - + popd + build_suc=$? if [[ $build_suc = 0 ]]; then echo ${GREEN}Build of ${flavor} succeeded${NC} @@ -155,7 +156,7 @@ run_clean_all() run_clean_builds echo "Cleaning additional assets" - rm -rf Makefile surge-vst2.make surge-vst3.make surge-lv2.make surge-headless.make build_logs target obj cmake-stamp build + rm -rf target products build } run_uninstall()