From 7e1866ade9cafcae5614a9953d35def5dc807f27 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sat, 23 Dec 2017 23:38:21 -0600 Subject: [PATCH] Remove permanent build directory --- Makefile | 14 +++++++------- build/Makefile | 42 ------------------------------------------ scripts/check | 1 - scripts/cibuild | 8 -------- scripts/newcpp | 15 --------------- scripts/run-make | 14 ++++++++++++++ 6 files changed, 21 insertions(+), 73 deletions(-) delete mode 100644 build/Makefile delete mode 100755 scripts/check delete mode 100755 scripts/cibuild delete mode 100755 scripts/newcpp create mode 100755 scripts/run-make diff --git a/Makefile b/Makefile index fe537bf9..d140a605 100644 --- a/Makefile +++ b/Makefile @@ -14,21 +14,21 @@ ifneq ($(shell which docker),) endif make: - ${ENV_RUN} ${MAKE} -j -C build HOST_ENV=${HOST_ENV} + ${ENV_RUN} ./scripts/run-make build gba-pkg: - ${ENV_RUN} ${MAKE} -j -C build ARGS="install" HOST_ENV=${HOST_ENV} - ${ENV_RUN} ${MAKE} -j -C build HOST_ENV=${HOST_ENV} + ${ENV_RUN} ./scripts/run-make build install + ${ENV_RUN} ./scripts/run-make build ${ENV_RUN} ./scripts/gba-pkg preinstall: - ${ENV_RUN} ${MAKE} -j -C build ARGS="preinstall" HOST_ENV=${HOST_ENV} + ${ENV_RUN} ./scripts/run-make build preinstall install: - ${ENV_RUN} ${MAKE} -j -C build ARGS="install" HOST_ENV=${HOST_ENV} + ${ENV_RUN} ./scripts/run-make build install clean: - ${ENV_RUN} ${MAKE} -j -C build ARGS="clean" HOST_ENV=${HOST_ENV} + ${ENV_RUN} ./scripts/run-make build clean purge: ${ENV_RUN} rm -rf $$(find build -mindepth 1 -maxdepth 1 -type d) dist test: - ${ENV_RUN} ${MAKE} -j -C build ARGS="test" HOST_ENV=${HOST_ENV} + ${ENV_RUN} ./scripts/run-make build test run: install ./dist/current/bin/nostalgia -debug diff --git a/build/Makefile b/build/Makefile deleted file mode 100644 index 05a1aa2a..00000000 --- a/build/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -all: gba_build gba_debug_build native_build native_debug_build native_asan_build windows_release windows_debug - -ifneq ($(shell which gmake),) -MAKE="gmake" -else -MAKE="make" -endif - -gba_build: - @if [ -d gba-release ]; then \ - ${MAKE} -C gba-release ${ARGS}; \ - fi - -gba_debug_build: - @if [ -d gba-debug ]; then \ - ${MAKE} -C gba-debug ${ARGS}; \ - fi - -native_build: - @if [ -d ${HOST_ENV}-release ]; then \ - ${MAKE} -C ${HOST_ENV}-release ${ARGS}; \ - fi - -native_debug_build: - @if [ -d ${HOST_ENV}-debug ]; then \ - ${MAKE} -C ${HOST_ENV}-debug ${ARGS}; \ - fi - -native_asan_build: - @if [ -d ${HOST_ENV}-asan ]; then \ - ${MAKE} -C ${HOST_ENV}-asan ${ARGS}; \ - fi - -windows_release: - @if [ -d windows-release ]; then \ - ${MAKE} -C windows-release ${ARGS}; \ - fi - -windows_debug: - @if [ -d windows-debug ]; then \ - ${MAKE} -C windows-debug ${ARGS}; \ - fi diff --git a/scripts/check b/scripts/check deleted file mode 100755 index 74346523..00000000 --- a/scripts/check +++ /dev/null @@ -1 +0,0 @@ -clang-check `find . | grep "\.cpp" | grep -v CMakeFiles | grep -v editormodels\.cpp` diff --git a/scripts/cibuild b/scripts/cibuild deleted file mode 100755 index 32577b92..00000000 --- a/scripts/cibuild +++ /dev/null @@ -1,8 +0,0 @@ -BRANCH=$1 -./scripts/setup_build -make -j4 -C build/sdl clean wombat -rm -rf wombat wombat-*-*.tar.gz -mkdir wombat -git rev-parse HEAD > wombat/revision.txt -cp -pr wombat_path build/sdl/src/wombat/wombat wombat -tar -cvzf wombat-${BRANCH}-`date "+%y%m%d%H%M"`.tar.gz wombat diff --git a/scripts/newcpp b/scripts/newcpp deleted file mode 100755 index 9e38da5e..00000000 --- a/scripts/newcpp +++ /dev/null @@ -1,15 +0,0 @@ -#! /usr/bin/env python - -import sys - -if len(sys.argv) < 3: - sys.exit(1) - -pkg = sys.argv[1] -name = sys.argv[2] -namespace = "namespace nostalgia {\nnamespace %s {\n\n}\n}" % pkg -hpp = "#pragma once\n" -cpp = "#include \"%s.hpp\"\n\n%s" % (name, namespace) - -open("src/nostalgia/%s/%s.hpp" % (pkg, name), "w").write(hpp) -open("src/nostalgia/%s/%s.cpp" % (pkg, name), "w").write(cpp) diff --git a/scripts/run-make b/scripts/run-make new file mode 100755 index 00000000..a77a6e4f --- /dev/null +++ b/scripts/run-make @@ -0,0 +1,14 @@ +#! /usr/bin/env bash + +set -e + +if [$(which gmake) != 'gmake not found']; then + MAKE="gmake" +else + MAKE="make" +fi + +for f in $(find $1 -maxdepth 1 -mindepth 1 -type d) +do + $MAKE -s -j -C "$f" $2 +done