summaryrefslogtreecommitdiff
path: root/autogen.sh
blob: 9a9823396dea8f5c68d4aa28db82f4a919d8be97 (plain)
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
43
44
45
46
47
48
49
50
# Bootstrap script for Open Endless SDK
# Run this script on a clean source checkout to get ready for building.

FILE_MUST_EXIST=endless/endless.h
POT_FILE=po/eos-sdk.pot

test -n "$srcdir" || srcdir=`dirname "$0"`
test -n "$srcdir" || srcdir=.
olddir=`pwd`

cd $srcdir
test -f $FILE_MUST_EXIST || {
    echo "You must run this script in the top-level checkout directory"
    exit 1
}

# Install our commit message script if a git repo
if [ -d .git ]; then
    cp commit-msg .git/hooks/commit-msg
    chmod +x .git/hooks/commit-msg
fi

# GNU gettext automake support doesn't get along with git
# https://bugzilla.gnome.org/show_bug.cgi?id=661128
touch -t 200001010000 $POT_FILE

# NOCONFIGURE is used by gnome-common
if test -z "$NOCONFIGURE"; then
    echo "This script will run ./configure automatically. If you wish to pass "
    echo "any arguments to it, please specify them on the $0 "
    echo "command line. To disable this behavior, have NOCONFIGURE=1 in your "
    echo "environment."
fi

am_ver=`automake --version | grep -m 1 -o '[^ ]*$'`
# Autmake 1.11.x doesn't grasp the 'serial-tests' option. Add a m4 file which
# defines HAS_SERIAL_TESTS_OPTION so we can keep our configure.ac forward
# compatible
case $am_ver in
    1.11*|1.12*) echo '';;
    *) echo 'm4_define([HAS_SERIAL_TESTS_OPTION], [1])';;
esac > m4/serial-tests.m4

# Run the actual tools to prepare the clean checkout
gtkdocize || exit $?
autoreconf -fi || exit $?
rm -f po/Makevars.template

cd "$olddir"
test -n "$NOCONFIGURE" || "./configure" "$@"