-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathbootstrap
executable file
·110 lines (100 loc) · 3.03 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
103
104
105
106
107
108
#!/bin/sh
# vim:ts=4:sw=4
# Calls autotools to build configure script and Makefile.in.
# Generated automatically using bootstrapper 0.2.1
# http://bootstrapper.sourceforge.net/
#
# Copyright (C) 2002 Anthony Ventimiglia
#
# This bootstrap script is free software; you can redistribute
# it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
#
# Calls proper programs to create configure script and Makefile.in files.
# if run with the --clean option, bootstrap removes files it generates. To
# clean all autogenerated files (eg: for cvs imports) first run
# make distclean, then bootstrap --clean
# see bootstrapper(1) for more infor
set -e
if test x"$1" = x"--help"; then
echo "$0: automatic bootstrapping utility for GNU Autotools"
echo " cleans up old autogenerated files and runs autoconf,"
echo " automake and aclocal on local directory"
echo
echo " --clean clean up auto-generated files without"
echo " creating new scripts"
echo
exit 0
fi
export ACLOCAL="aclocal"
export AUTOCONF="autoconf"
export AUTOHEADER="autoheader"
export AUTOMAKE="automake"
CONFIG_AUX_DIR="build-aux"
#LIBTOOLIZE="/usr/bin/libtoolize --force"
#LIBTOOLIZE_FILES="config.sub ltmain.sh config.guess"
#LIBTOOLIZE="libtoolize --copy"
#LIBTOOLIZE="glibtoolize --copy"
CLEAN_BASE_DIRS="autom4te.cache"
CLEAN_BASE_FILES="configure"
CLEAN_BASE_FILES="$CLEAN_BASE_FILES config.h.in config.h.in~"
CLEAN_BASE_FILES="$CLEAN_BASE_FILES aclocal.m4 acinclude/libtool.m4 acinclude/ltoptions.m4"
CLEAN_BASE_FILES="$CLEAN_BASE_FILES acinclude/ltversion.m4 acinclude/lt~obsolete.m4 acinclude/ltsugar.m4"
CLEAN_AUX_FILES="config.guess compile depcomp mkinstalldirs libtool ltmain.sh missing config.sub install-sh mdate-sh texinfo.tex"
RM="rm -v"
SUBDIRS="$(sed -e '/Makefile/s,[[:space:]]*\([^[:space:]]*\)/\?Makefile,./\1,p;d' configure.ac)"
if libtoolize --version >/dev/null 2>&1; then
export LIBTOOLIZE="libtoolize --force"
else
# for non GNU OS
export LIBTOOLIZE="glibtoolize --force"
fi
# These are files created by configure, so we'll always clean them
for i in $ALWAYS_CLEAN; do
test -f $i && \
$RM $i
done
if test x"$1" = x"--clean"; then
#
#Clean Files left by previous bootstrap run
#
if test -n "$CONFIG_AUX_DIR";
then CONFIG_AUX_DIR="$CONFIG_AUX_DIR/"
fi
# Clean directories in base directory
for cf in $CLEAN_BASE_DIRS; do
if test -d $cf ; then
$RM -r $cf
else
echo "Skipping non existing directory '$cf'"
fi
done
#Clean Automake generated Makefile.in files
for i in $SUBDIRS; do
test -f $i/Makefile.in && \
$RM $i/Makefile.in
done
# Clean files in base directory
for cf in $CLEAN_BASE_FILES; do
if test -f $cf ; then
$RM $cf
else
echo "Skipping non existing file '$cf'"
fi
done
# Clean files in aux directory
for cf in $CLEAN_AUX_FILES; do
cf="$CONFIG_AUX_DIR$cf"
if test -f $cf ; then
$RM $cf
else
echo "Skipping non existing file '$cf'"
fi
done
else
set -x
autoreconf -vi -Wall "$@"
set +x
fi