]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Meta/Make: make it strict by default
authorJunio C Hamano <gitster@pobox.com>
Thu, 5 Feb 2015 22:18:45 +0000 (14:18 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 5 Feb 2015 22:19:00 +0000 (14:19 -0800)
Dothem
Make

diff --git a/Dothem b/Dothem
index f8affa86ab3e03028fabae7b92fd5195f25b98fa..cff2949a9ee4618b62c4e5897b9c3d4dfdf8aaec 100755 (executable)
--- a/Dothem
+++ b/Dothem
@@ -31,6 +31,7 @@ while case "$1" in
        --base=*) BUILDBASE=${1#*=} ;;
        --branches=*) branches=${1#*=} ;;
        -j*) jobs=$1 ;;
+       --) shift; break ;;
        -*) echo >&2 "Unknown option: $1"; exit 1 ;;
        *) break ;;
        esac
@@ -195,7 +196,7 @@ do
 
                save=$(git rev-parse HEAD) &&
 
-               Meta/Make $M ${test+"$test"} $jobs -- ${with_dash:+SHELL_PATH=/bin/dash} $dotest &&
+               Meta/Make $M ${test+"$test"} $jobs -- ${with_dash:+SHELL_PATH=/bin/dash} "$@" $dotest &&
 
                {
                        test -n "$skip_doc" ||
@@ -212,7 +213,7 @@ do
                        test z$install = znoinstall ||
                        if test "$save" = "$(git rev-parse HEAD)"
                        then
-                               Meta/Make $M -- ${with_dash:+SHELL_PATH=/bin/dash} install
+                               Meta/Make $M -- ${with_dash:+SHELL_PATH=/bin/dash} "$@" install
                        else
                                echo >&2 "Head moved--not installing"
                        fi
diff --git a/Make b/Make
index 70be5d6d9a11fc9a8d041272e9a82cccbebfb8a2..21771a669e6b4f632ecd7ddec30dd131aafc8701 100755 (executable)
--- a/Make
+++ b/Make
@@ -96,21 +96,20 @@ determine_long_version () {
        sed -e 's/-/./g'
 }
 
+case "$NO_PEDANTIC" in
+?*)    ;;
+'')
+       PEDANT="-Werror -Wold-style-definition -std=c99 $PEDANT"
+       PEDANT="-Wpointer-arith -Woverflow -Wunused $PEDANT"
+       PEDANT="-Wold-style-declaration -Wstrict-prototypes $PEDANT"
+       ;;
+esac
+
 while case $# in 0) break ;; esac
 do 
        case "$1" in
-       -pedantic | --pedantic)
-               case "$NO_PEDANTIC" in
-               ?*)     ;;
-               '')
-                       O="-Werror -Wold-style-definition -std=c99 $O"
-                       O="-Wno-pointer-to-int-cast $O"
-                       O="-Wpointer-arith -Woverflow -Wunused $O"
-                       O="-Wold-style-declaration -Wstrict-prototypes $O"
-                       ;;
-               esac
-               # -Wvla
-               # O="$O -fwrapv -fno-strict-overflow"
+       --pedantic)
+               echo >&2 "(no need to say --pedantic)"
                ;;
        -j*)
                case "$NO_JOBS" in
@@ -122,7 +121,7 @@ do
                oldtest=t
                ;;
        -loose | --loose)
-               Wall=
+               PEDANT= Wall=
                ;;
        --locale=*)
                LANG=${1#*=}
@@ -153,6 +152,7 @@ do
        esac
        shift
 done
+O="${PEDANT}${PEDANT:+ }$O"
 
 test -f /bin/dash || with_dash=