Meta/Dothem: pass --locale=* to underlying Meta/Make
[git/spearce.git] / Make
blobafef94ae26725626bc5ad2d8978fab4204f09462
1 #!/bin/sh
3 # DDD=' -DUSE_SYMLINK_HEAD=0'
4 # PATH=/usr/bin:/bin
6 G=/opt/packrat/playpen/public/in-place/git/index/gitweb_config.perl
7 for i in active maint master next
8 do
9 GIT="$HOME/git-$i/bin/git"
10 test -f "$GIT" && break
11 done
12 test -f "$GIT" || {
13 echo >&2 "No git to bootstrap"
15 PATH=/usr/bin:/bin
16 export PATH
18 LANG=C
19 old_style_def_fix=b79d18c92d9f4841a6a1a29b7b2373a8ff9871e1
21 head=`$GIT symbolic-ref HEAD 2>/dev/null` &&
22 branch=`expr "$head" : 'refs/heads/\(.*\)'` || branch=detached
24 case "$branch" in
25 next | maint | master | pu | jch)
26 prefix="$HOME/git-$branch"
28 snap)
29 v=`$GIT describe HEAD`
30 expr "$v" : '.*-g[0-9a-f]*$' >/dev/null && {
31 echo >&2 "You are on 'snap' but $v is not an official version."
32 exit 1
34 prefix="$HOME/git-snap-$v"
37 prefix="$HOME/git-test" ;;
38 esac
39 d="prefix=$prefix"
41 : ${O=-O2}
43 Wall=-Wall tests=
44 while case $# in 0) break ;; esac
45 do
46 case "$1" in
47 -pedantic | --pedantic)
48 o= &&
49 rev=$($GIT rev-parse HEAD) &&
50 case "$($GIT merge-base "$old_style_def_fix" "$rev")" in
51 $old_style_def_fix)
52 o=-Wold-style-definition ;;
53 esac
54 O="$O -Werror $o -std=c99 -Wno-pointer-to-int-cast"
55 # O="$O -fwrapv -fno-strict-overflow"
57 -loose | --loose)
58 Wall=
60 --locale=*)
61 LANG=${1#*=}
63 --test=*)
64 tests=$(
65 cd t &&
66 for t in ${1#*=}
68 eval echo "t$t-*.sh"
69 done | tr '\012' ' '
72 --)
73 shift
74 break
76 -*)
77 echo >&2 "Eh $1?"
78 exit 1
81 break
82 ;;
83 esac
84 shift
85 done
87 LC_ALL=$LANG
88 export LANG LC_ALL
90 sh -c 'git describe --abbrev=4 HEAD' >/dev/null 2>&1 || {
91 $GIT describe --abbrev=4 HEAD | sed -e 's/-/./g' >version
94 d="$d ASCIIDOC_NO_ROFF=YesPlease ASCIIDOC8=YesPlease"
96 CFLAGS="$O $Wall -Wdeclaration-after-statement -g"
98 make $d \
99 GITWEB_CONFIG=$G \
100 PYTHON_PATH=/usr/bin/python2.4 \
101 ETC_GITCONFIG=$prefix/etc/gitconfig \
102 CFLAGS="$CFLAGS" \
103 ${tests:+"T=$tests"} \
104 "$@"
105 status=$?
106 rm -f version
107 exit $status