-
Notifications
You must be signed in to change notification settings - Fork 154
Expand file tree
/
Copy pathgitcompile
More file actions
executable file
·42 lines (39 loc) · 1.28 KB
/
gitcompile
File metadata and controls
executable file
·42 lines (39 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
error() {
echo "$@"
exit 1
}
GETTEXTIZE=$(which gettextize)
if test -z "$GETTEXTIZE"; then
echo "gettextize not found"
exit 1
fi
if test -d ../alsa-lib/utils && ! test -r `aclocal --print-ac-dir`/alsa.m4; then
ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I ../alsa-lib/utils"
fi
# save original files to avoid stupid modifications by gettextize
cp Makefile.am Makefile.am.ok || error "cp Makefile.am"
cp configure.ac configure.ac.ok || error "cp configure.ac"
# modify gettexize to not wait for Enter
grep -v -E "(/dev/tty|Press Return)" "$GETTEXTIZE" > gettextize || error "grep $GETTEXTIZE"
chmod 755 gettextize || error "chmod 755 gettexize"
./gettextize -c -f --no-changelog || error "gettexize"
rm ./gettextize
echo "EXTRA_DIST = gettext.m4" > m4/Makefile.am
cp Makefile.am.ok Makefile.am
cp configure.ac.ok configure.ac
touch ltconfig
libtoolize --force --copy --automake || error "libtoolize"
aclocal $ACLOCAL_FLAGS -Im4 || error "aclocal"
autoheader || error "autoheader"
automake --foreign --copy --add-missing || error "automake"
touch depcomp # for older automake
autoconf || error "autoconf"
export CFLAGS='-O2 -Wall -W -Wunused-const-variable=0 -pipe -g'
echo "CFLAGS=$CFLAGS"
echo "./configure $@"
./configure $@ || exit 1
unset CFLAGS
if [ -z "$GITCOMPILE_NO_MAKE" ]; then
make
fi