-
Notifications
You must be signed in to change notification settings - Fork 6
/
bootstrap
executable file
·58 lines (52 loc) · 2 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
#!/usr/bin/env bash
# The contents of this file are subject to the MonetDB Public License
# Version 1.1 (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://www.monetdb.org/Legal/MonetDBLicense
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
# License for the specific language governing rights and limitations
# under the License.
#
# The Original Code is the MonetDB Database System.
#
# The Initial Developer of the Original Code is CWI.
# Portions created by CWI are Copyright (C) 1997-July 2008 CWI.
# Copyright August 2008-2013 MonetDB B.V.
# All Rights Reserved.
# NOTE: if you happen to have bootstrap failures due to missing M4
# macros, export M4DIRS as a space separated list of directories where
# aclocal should look in your environment.
PYTHONPATH=${PWD:-$(pwd)}/buildtools/autogen${PYTHONPATH:+:$PYTHONPATH}
export PYTHONPATH
# cope with systems where libtool is not GNU libtool, e.g. Darwin
type -P glibtoolize > /dev/null \
&& libtoolize=glibtoolize \
|| libtoolize=libtoolize
_m4_extra_dirs=
if [[ -n ${M4DIRS} ]] ; then
for d in ${M4DIRS} ; do
case ${d} in
"-I") d= ;;
"-I"*) d=${d#-I} ;;
esac
[[ -n ${d} ]] && _m4_extra_dirs="${_m4_extra_dirs} -I ${d}"
done
fi
python buildtools/autogen/autogen.py &&
(
# replace the line starting with AC_CONFIG_FILES in configure.ag with
# the command to substitute the configure results into the .in files,
# making sure executable files remain executable.
sed -n '/^AC_CONFIG_FILES/s/.*/AC_CONFIG_FILES([/;1,/^AC_CONFIG_FILES/p' configure.ag
while read f; do [ -x $f.in ] || echo $f; done < acout.in
echo '])'
while read f; do [ -x $f.in ] && echo "AC_CONFIG_FILES([$f], [chmod +x $f])"; done < acout.in
sed '1,/^AC_CONFIG_FILES/d' configure.ag
) > configure.ac &&
$libtoolize -c -f &&
aclocal ${_m4_extra_dirs} &&
autoheader &&
automake --add-missing --copy --foreign &&
autoconf