Allow -loose building

Junio C Hamano committed Aug 20, 2008 at 17:32 UTC 3169eb477b47f40fd4666264210959413d86c30a
1 file changed +8 -2
Make
+8 -2
@@ -27,7 +27,7 @@ head=`$GIT symbolic-ref HEAD 2>/dev/null` &&
27 branch=`expr "$head" : 'refs/heads/\(.*\)'` || branch=detached
28
29 case "$branch" in
30 -next | maint | master | pu)
30 +next | maint | master | pu | jch)
31 prefix="$HOME/git-$branch"
32 ;;
33 snap)
@@ -45,6 +45,7 @@ d="prefix=$prefix"
45
46 : ${O=-O2}
47
48 +Wall=-Wall
49 while case $# in 0) break ;; esac
50 do
51 case "$1" in
@@ -58,6 +59,9 @@ do
59 O="$O -Werror $o -std=c99 -Wno-pointer-to-int-cast"
60 # O="$O -fwrapv -fno-strict-overflow"
61 ;;
62 + -loose)
63 + Wall=
64 + ;;
65 --)
66 shift
67 break
@@ -77,11 +81,13 @@ sh -c 'git describe --abbrev=4 HEAD' >/dev/null 2>&1 || {
81 $GIT describe --abbrev=4 HEAD | sed -e 's/-/./g' >version
82 }
83
84 +CFLAGS="$O $Wall -Wdeclaration-after-statement -g"
85 +
86 make $d \
87 GITWEB_CONFIG=$G \
88 PYTHON_PATH=/usr/bin/python2.4 \
89 ETC_GITCONFIG=$prefix/etc/gitconfig \
84 - CFLAGS="$O -Wall -Wdeclaration-after-statement -g" \
90 + CFLAGS="$CFLAGS" \
91 "$@"
92 status=$?
93 rm -f version