-
Notifications
You must be signed in to change notification settings - Fork 1
/
bootstrap
executable file
·102 lines (77 loc) · 1.98 KB
/
bootstrap
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#!/bin/sh
user_opts="$*"
verbose_mode=""
subdir_mode="--no-recursive"
install_mode=""
arg_install="--install "
# The directory for the autoconf files
TOOLSDIR=""
# autoconf supports env variable WARNING
# when not set, disable all warnings for the user
if [ -n "$WARNINGS" ]
then
echo "found WARNINGS: $WARNINGS"
verbose_mode="--verbose"
fi
if [ -z "$WARNINGS" ]
then
WARNINGS="none"
verbose_mode=""
fi
# maintainer should see all warnings
# probably bail out with an error
#
if [ -n "$MAINTAINER_MODE" -o -n "$MAINTAINERMODE" ]
then
WARNINGS="all"
verbose_mode=" --verbose"
echo "MAINTAINER_MODE activated: $MAINTAINER_MODE / $MAINTAINERMODE"
fi
export WARNINGS="$WARNINGS"
# #########################################
# Find the directory for the autoconf files
if [ -z "$TOOLSDIR" ]
then
TOOLSDIR="`grep "AC_CONFIG_AUX_DIR" configure.ac | cut -b 18- | tr -d "([])" `"
fi
if [ -z "$TOOLSDIR" ]
then
TOOLSDIR="`grep "AC_CONFIG_MACRO_DIR" configure.ac | cut -b 20- | tr -d "([])" `"
fi
# when we found the dir name, create the dir, when needed
if [ -n "$TOOLSDIR" ]
then
[ -d "$TOOLSDIR" ] || mkdir "$TOOLSDIR"
fi
# when no tools dir was set, use the project root dir
if [ -z "$TOOLSDIR" ]
then
TOOLSDIR="."
fi
###########################################################
# When a needed file is missing, let "autoreconf" create it
if [ ! -e "$TOOLSDIR""/compile" ]
then
install_mode="$arg_install"
fi
if [ ! -e "$TOOLSDIR""/defcomp" ]
then
install_mode="$arg_install"
fi
if [ ! -e "$TOOLSDIR""/install-sh" ]
then
install_mode="$arg_install"
fi
if [ ! -e "$TOOLSDIR""/missing" ]
then
install_mode="$arg_install"
fi
# ####################################
# cleanup the m4 cache, when available
rm 2>/dev/null -rf autom4te.cache
# ################################
# autoreconf commandline parameter
# --install: install scripts in the project
# long: --warnings=all
# short: -Wall
exec ${AUTORECONF:-autoreconf} $install_mode $verbose_mode $subdir_mode $user_opts