diff options
Diffstat (limited to 'build_and_test.sh')
-rwxr-xr-x | build_and_test.sh | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/build_and_test.sh b/build_and_test.sh index b2a72d0..517ae4a 100755 --- a/build_and_test.sh +++ b/build_and_test.sh @@ -5,6 +5,8 @@ USE_COMPILER= DESTINATION= EXTRA_OPTIONS= EXTRA_LINK_OPTIONS= +SKIP_TESTS=0 +REBUILD=0 while [ $# -gt 0 ]; do case $1 in @@ -19,6 +21,8 @@ while [ $# -gt 0 ]; do echo " -d --destination - Set destination path" echo " -o --options - Set additional options for the compiler" echo " -l --link - Set additional options for the linker" + echo " -S --skip-tests - Skip tests" + echo " -R --rebuild - Rebuild the whole project" echo "" exit 0 ;; @@ -47,6 +51,14 @@ while [ $# -gt 0 ]; do shift shift ;; + -S|--skip-tests) + SKIP_TESTS=1 + shift + ;; + -R|--rebuild) + REBUILD=1 + shift + ;; *) echo "Unknown option $1" shift @@ -198,7 +210,8 @@ echo "Compiler options: $FLAGS" echo "Link options: $LINK_FLAGS" echo "" -if [ ! -f "$FOLDER/_dep${OBJ_POSTFIX}" ] || \ +if [ $REBUILD -ne 0 ] || \ + [ ! -f "$FOLDER/_dep${OBJ_POSTFIX}" ] || \ [ "source/saw/_dep.c" -nt "$FOLDER/_dep${OBJ_POSTFIX}" ]; then echo "Rebuild dependencies" $COMPILE ${FLAGS} \ @@ -219,7 +232,7 @@ if [ $? -ne 0 ]; then exit 1 fi -if [ "$COMPILE" = "emcc" ]; then +if [ $SKIP_TESTS -ne 0 ] || [ "$COMPILE" = "emcc" ]; then exit 0 fi |