-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap
executable file
·78 lines (67 loc) · 2.12 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
#! /bin/sh
if [ -z "$(which automake | grep .nix-profile)" ] ; then
# Automake not provided by Nix; try to find suitable native one.
if [ -f /etc/gentoo-release ] ; then
# Environment variables for our Gentoo friends.
export WANT_AUTOMAKE="1.8"
export WANT_AUTOCONF="2.59"
fi
fi
# elif [ -f /etc/debian_version ] ; then
# # Environment variables for our Debian friends.
# export ACLOCAL=/usr/bin/aclocal-1.9
# export AUTOMAKE=/usr/bin/automake-1.9
# fi
# Determine autoxt to use.
if test -z "$STRATEGOXT_BASELINE"; then
echo "***********************************************************"
echo " WARNING"
echo ""
echo "The environment variable STRATEGOXT_BASELINE is not set."
echo "It is recommended to set this variable to make sure that"
echo "the right autoxt is used for bootstrapping Stratego/XT. I"
echo "assume that the baseline you want to use is on the path."
echo "***********************************************************"
AUTOXT="autoxt"
else
test -x "$STRATEGOXT_BASELINE/bin/autoxt"
if test $? -eq 0; then
AUTOXT="$STRATEGOXT_BASELINE/bin/autoxt"
else
echo "error: $STRATEGOXT_BASELINE/bin/autoxt does not exist."
echo "Please check your STRATEGOXT_BASELINE environment variable"
exit 1
fi
fi
echo "bootstrap: using autoxt at $AUTOXT"
# $AUTOXT || exit 1
# mv ./autoxt.m4 ./config/ || exit 1
echo "WARNING: hack: using our own autoxt.m4"
cp ./autoxt/autoxt.m4 ./config/ || exit 1
echo "WARNING: hack: using our own Makefile.xt"
cp ./autoxt/Makefile.xt . || exit 1
autoreconf -ifv || exit 1
# Bootstrap the subpackages
PKGS="autoxt xtc strc-core gpp c-tools concrete-syntax \
aterm-front stratego-front asfix-tools sdf-front sdf-tools \
stratego-regular xml-front stratego-libraries"
cp ./config/autoxt.m4 stratego-libraries/config
for dir in $PKGS
do
echo
echo "bootstrap: bootstrapping in $dir"
echo
cd $dir
if test "$dir" != "autoxt"
then
rm -f Makefile.xt
cp ../Makefile.xt .
fi
if test -e "../svn-revision"
then
rm -f
cp ../svn-revision .
fi
autoreconf -ifv || exit 1
cd ..
done