forked from DLR-AMR/t8code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap
executable file
·65 lines (54 loc) · 1.88 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
#! /bin/sh
# Call this without arguments if t8code is the toplevel package.
# Call this with two arguments if t8code is itself a subdirectory:
# ./bootstrap <sc config directory> <p4est config directory>
# RUNNING BOOTSTRAP FOR LIBSC
# override by option argument
SC_CONFIG="sc/config"
if test -n "$1" ; then
SC_CONFIG="$1"
if test ! -d "$SC_CONFIG" ; then
echo "Cannot find directory $SC_CONFIG"
echo " If you just called ./bootstrap from a fresh clone of t8code"
echo " you may need to checkout the submodules sc and p4est:"
echo " \$ git submodule init && git submodule update"
exit 1
fi
fi
# convert into an absolute path
SC_CONFIG=`cd "$SC_CONFIG" && pwd`
if test -x "sc/bootstrap" ; then
echo "Running bootstrap in subdirectory sc"
(cd sc && ./bootstrap)
fi
# RUNNING BOOTSTRAP FOR P4EST
#override by option argument
P4EST_CONFIG="p4est/config"
if test -n "$2" ; then
P4EST_CONFIG="$2"
if test ! -d "$P4EST_CONFIG" ; then
echo "Cannot find directory $P4EST_CONFIG"
echo " If you just called ./bootstrap from a fresh clone of t8code"
echo " you may need to checkout the submodules sc and p4est:"
echo " \$ git submodule init && git submodule update"
exit
fi
fi
#convert into an absolute path
P4EST_CONFIG=`cd "$P4EST_CONFIG" && pwd`
if test -x "p4est/bootstrap" ; then
echo "Running bootstrap in subdirectory p4est"
(cd p4est && ./bootstrap "$SC_CONFIG")
fi
echo "--- This is the bootstrap script for t8code ---"
echo "Current directory is $PWD"
rm -rf autom4te.cache
LIBTOOLIZE=`which glibtoolize`
if test ! -x "$LIBTOOLIZE" ; then LIBTOOLIZE=`which libtoolize` ; fi
if test ! -x "$LIBTOOLIZE" ; then echo "bootstrap requires libtoolize" ; \
exit 1 ; fi
aclocal -Wall -I config -I "$SC_CONFIG" -I "$P4EST_CONFIG"
autoconf -Wall --force
autoheader -Wall --force
"$LIBTOOLIZE" --install --copy
automake -Wall --add-missing --copy