forked from irstlm-team/irstlm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
regenerate-makefiles.sh
executable file
·84 lines (66 loc) · 1.54 KB
/
regenerate-makefiles.sh
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/bash
# NOTE:
# Versions 1.9 (or higher) of aclocal and automake are required.
# Version 2.59 (or higher) of autoconf is required.
# For Mac OSX users:
# Standard distribution usually includes versions 1.6 for aclocal and automake.
# Get versions 1.9 or higher
# Set the following variable to the correct paths
#ACLOCAL="/path/to/aclocal-1.9"
#AUTOMAKE="/path/to/automake-1.9"
force=$1;
# set parameter force to the value "--force" if you want to recreate all links to the autotools
die () {
echo "$@" >&2
exit 1
}
if [ -z "$ACLOCAL" ]
then
ACLOCAL=`which aclocal`
fi
if [ -z "$AUTOMAKE" ]
then
AUTOMAKE=`which automake`
fi
if [ -z "$AUTORECONF" ]
then
AUTORECONF=`which autoreconf`
fi
if [ -z "$AUTOCONF" ]
then
AUTOCONF=`which autoconf`
fi
if [ -z "$LIBTOOLIZE" ]
then
LIBTOOLIZE=`which libtoolize`
if [ -z "$LIBTOOLIZE" ]
then
LIBTOOLIZE=`which glibtoolize`
fi
fi
if [ ! -d m4 ] ;
then
mkdir m4
fi
echo "Calling $AUTORECONF"
$AUTORECONF
ret=$?
if [ $ret -ne 0 ] ; then
echo "autoreconf FAILED"
echo "trying '$LIBTOOLIZE --force; $AUTOMAKE --add-missing ; $AUTORECONF'"
$LIBTOOLIZE --force
$AUTOMAKE --add-missing
$AUTORECONF
if [ ! -e config.guess ] ; then
$AUTOMAKE --add-missing
$AUTORECONF
fi
fi
#echo "Calling $LIBTOOLIZE $force"
#$LIBTOOLIZE $force || die "libtoolize failed"
#echo "Calling $ACLOCAL..."
#$ACLOCAL -I m4 || die "aclocal failed"
#echo "Calling $AUTOCONF..."
#$AUTOCONF || die "autoconf failed"
#echo "Calling $AUTOMAKE --add-missing..."
#$AUTOMAKE --add-missing || die "automake failed"