Meta/Make: do not check old-style-def while compiling older revisions.
Junio C Hamano committed
Jun 15, 2007 at 22:43 UTC
c36a84426abe837b28ee25eea55a0a53da2385d0
1 file changed
+9
-1
Make
+9
-1
@@ -13,6 +13,8 @@ export PATH LANG LC_CTYPE
13
#GIT_SVN_NO_LIB=1
14
#export GIT_SVN_NO_LIB
15
16
+old_style_def_fix=b79d18c92d9f4841a6a1a29b7b2373a8ff9871e1
17
+
18
head=`git symbolic-ref HEAD 2>/dev/null` &&
19
branch=`expr "$head" : 'refs/heads/\(.*\)'` || branch=detached
20
@@ -37,7 +39,13 @@ while case $# in 0) break ;; esac
39
do
40
case "$1" in
41
-pedantic)
40
- O="$O -Werror -Wall -Wold-style-definition -ansi -pedantic -std=c99"
42
+ o= &&
43
+ rev=$(git-rev-parse HEAD) &&
44
+ case "$(git-merge-base "$old_style_def_fix" "$rev")" in
45
+ $old_style_def_fix)
46
+ o=-Wold-style-definition ;;
47
+ esac
48
+ O="$O -Werror -Wall $o -ansi -pedantic -std=c99"
49
;;
50
--)
51
shift