]> git.rm.cloudns.org Git - xonotic/xonotic.git/commitdiff
add a dash in front of MAKEFLAGS with single letter options
authorkiwixz <kiwixz@outlook.com>
Mon, 16 Jan 2023 17:58:58 +0000 (18:58 +0100)
committerkiwixz <kiwixz@outlook.com>
Sun, 28 May 2023 14:10:58 +0000 (16:10 +0200)
misc/tools/all/xonotic.subr

index 3acd42e51926e4dd2c93d70dfae106f1a244711c..0f65ac263311e02cc4beabf5f98774b8ba0ccd8a 100644 (file)
@@ -134,6 +134,8 @@ case "$cmd" in
                        if [ -n "$WE_HATE_OUR_USERS" ]; then
                                MAKEFLAGS="$MAKEFLAGS DP_MAKE_TARGET=mingw"
                        fi
+               elif echo $MAKEFLAGS | head -c1 | grep -qv -; then # MAKEFLAGS starts with a single letter option
+                       MAKEFLAGS=-$(echo $MAKEFLAGS)                  # echo here and above will trim whitespaces
                fi
 
                if [ -n "$WE_HATE_OUR_USERS" ]; then