]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - all
targets targets targets targets ;) ./all compile wgl
[xonotic/xonotic.git] / all
diff --git a/all b/all
index 593736e7e2a392d81acbe5b5e738a58c920a04a7..15a98b79b908adf03a2fdb14155ec56ce402215d 100755 (executable)
--- a/all
+++ b/all
@@ -119,6 +119,16 @@ repos_urls="
        netradiant
 "
 
+repos_urls=`
+       for X in $repos_urls; do 
+               d="${X%%@*}"
+               p="${d%dir}"
+               if [ x"$p" = x"$d" ] || [ -d "$d" ] || ! [ -f "$p" ]; then
+                       echo "$X"
+               fi
+       done
+`
+
 repos=`for X in $repos_urls; do echo "${X%%@*}"; done`
 
 if [ "$#" = 0 ]; then
@@ -342,6 +352,25 @@ case "$cmd" in
                done
                ;;
        compile)
+               if [ -n "$WE_HATE_OUR_USERS" ]; then
+                       TARGETS="sv-debug cl-debug"
+               else
+                       TARGETS="sv-debug cl-debug sdl-debug"
+               fi
+               case "$1" in
+                       sdl)
+                               TARGETS="sdl-debug"
+                               shift
+                               ;;
+                       glx|agl|wgl)
+                               TARGETS="cl-debug"
+                               shift
+                               ;;
+                       dedicated)
+                               TARGETS="sv-debug"
+                               shift
+                               ;;
+               esac
                if [ -z "$MAKEFLAGS" ]; then
                        if [ -f /proc/cpuinfo ]; then
                                ncpus=$((`grep -c '^processor   :' /proc/cpuinfo`+0))
@@ -355,11 +384,9 @@ case "$cmd" in
                enter "$d0/data/xonotic-data.pk3dir" verbose
                verbose make FTEQCC="$d0/fteqcc/fteqcc.bin" $MAKEFLAGS
                enter "$d0/darkplaces" verbose
-               verbose make $MAKEFLAGS sv-debug
-               verbose make $MAKEFLAGS cl-debug
-               if ! [ -n "$WE_HATE_OUR_USERS" ]; then
-                       verbose make $MAKEFLAGS sdl-debug
-               fi
+               for T in $TARGETS; do
+                       verbose make $MAKEFLAGS "$T"
+               done
                ;;
        run)
                if [ -n "$WE_HATE_OUR_USERS" ]; then