From 04866573645299ddfc36f057a75b702a6e68350c Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Thu, 29 Jun 2017 20:02:36 -0400 Subject: [PATCH] fixed bug with dumping custom_4coder.so into the code path --- build.bat | 2 -- buildsuper.sh | 15 ++++----------- meta/build.cpp | 1 + 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/build.bat b/build.bat index a08832aa..9c47c1af 100644 --- a/build.bat +++ b/build.bat @@ -17,5 +17,3 @@ popd ..\build\build if %ERRORLEVEL% neq 0 (set FirstError=1) -:END - diff --git a/buildsuper.sh b/buildsuper.sh index 8da4e2fc..a64415ed 100755 --- a/buildsuper.sh +++ b/buildsuper.sh @@ -1,5 +1,8 @@ #!/bin/bash +# Store the real CWD +REAL_PWD="$PWD" + # Find the code home folder TARGET_FILE="$0" cd `dirname $TARGET_FILE` @@ -32,19 +35,9 @@ done PHYS_DIR=`pwd -P` SOURCE=$PHYS_DIR/$TARGET_FILE -# Detect the OS and choose appropriate flags -chmod 777 "$CODE_HOME/detect_os.sh" -os=$("$CODE_HOME/detect_os.sh") -echo "Building on $os" - -if [[ "$os" == "linux" ]]; then -FLAGS="-Wno-write-strings" -elif [[ "$os" == "mac" ]]; then -FLAGS="-Wno-null-dereference -Wno-comment -Wno-switch -Wno-writable-strings" -fi - FLAGS="-Wno-write-strings -Wno-null-dereference -Wno-comment -Wno-switch -Wno-writable-strings" +cd "$REAL_PWD" echo "Building custom_4coders.so from $SOURCE" g++ -I"$CODE_HOME" $FLAGS -std=gnu++0x "$SOURCE" -shared -o custom_4coder.so -fPIC diff --git a/meta/build.cpp b/meta/build.cpp index 53f994a5..245a3e2e 100644 --- a/meta/build.cpp +++ b/meta/build.cpp @@ -385,6 +385,7 @@ buildsuper(char *code_path, char *out_path, char *filename, b32 x86_build){ } #elif defined(IS_GCC) { + fprintf(stdout, "out_path: %s\n", out_path); systemf("\"%s/buildsuper.sh\" \"%s\"", code_path, filename); } #else