]> git.xonotic.org Git - xonotic/xonotic.git/commitdiff
new all function: ./all -c compile, does "make clean" too
authorRudolf Polzer <divverent@alientrap.org>
Thu, 6 May 2010 18:16:46 +0000 (20:16 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Thu, 6 May 2010 18:16:46 +0000 (20:16 +0200)
all

diff --git a/all b/all
index c5914d8e59251a3b4e0a9b3f37b4c34875988e9c..6bbac8fe7df098081e5af0f300833436d44a9972 100755 (executable)
--- a/all
+++ b/all
@@ -405,6 +405,15 @@ case "$cmd" in
                else
                        TARGETS="sv-debug cl-debug sdl-debug"
                fi
+               case "$1" in
+                       -c)
+                               clean=true
+                               shift
+                               ;;
+                       *)
+                               clean=false
+                               ;;
+               esac
                case "$1" in
                        sdl)
                                TARGETS="sdl-debug"
@@ -426,14 +435,28 @@ case "$cmd" in
                                        MAKEFLAGS=-j$ncpus
                                fi
                        fi
+                       case "`uname`" in
+                               Linux|*BSD)
+                                       MAKEFLAGS="$MAKEFLAGS DP_LINK_TO_LIBJPEG=1"
+                                       ;;
+                       esac
                fi
                enter "$d0/fteqcc" verbose
+               if $clean; then
+                       verbose make $MAKEFLAGS clean
+               fi
                verbose make $MAKEFLAGS
                enter "$d0/data/xonotic-data.pk3dir" verbose
-               verbose make FTEQCC="$d0/fteqcc/fteqcc.bin" $MAKEFLAGS
+               if $clean; then
+                       verbose make $MAKEFLAGS clean
+               fi
+               verbose make FTEQCC="$d0/fteqcc/fteqcc.bin" "$@" $MAKEFLAGS
                enter "$d0/darkplaces" verbose
+               if $clean; then
+                       verbose make $MAKEFLAGS clean
+               fi
                for T in $TARGETS; do
-                       verbose make $MAKEFLAGS "$T"
+                       verbose make $MAKEFLAGS "$@" "$T"
                done
                ;;
        run)
@@ -579,8 +602,8 @@ case "$cmd" in
                echo "  $SELF branch [<remote>] <branchname>"
                echo "  $SELF branch <remote> <branchname> <srcbranchname>"
                echo "  $SELF checkout [<remote>] <branchname>"
-               echo "  $SELF compile"
-               echo "  $SELF run <client> <options>"
+               echo "  $SELF compile [-c] [<client>] <options>"
+               echo "  $SELF run [<client>] <options>"
                echo "  $SELF each <command>"
                ;;
 esac