Commit | Line | Data |
---|---|---|
5d94b2fe | 1 | #!/bin/sh |
3be5cdf2 | 2 | # Usage: sh -x ./autogen.sh [WORKBOOK] |
5d94b2fe | 3 | |
fc4fc6f6 RB |
4 | set -e |
5 | ||
0b49b6ae | 6 | [ -f GUILE-VERSION ] || { |
3be5cdf2 | 7 | echo "autogen.sh: run this command only at the top of guile-core." |
0b49b6ae JB |
8 | exit 1 |
9 | } | |
10 | ||
3be5cdf2 TTN |
11 | ###################################################################### |
12 | ### Find workbook and make symlinks. | |
13 | ||
14 | workbook=../workbook # assume "cvs co hack" | |
15 | test x$1 = x || workbook=$1 | |
16 | if [ ! -d $workbook ] ; then | |
17 | echo "ERROR: could not find workbook dir" | |
18 | echo " re-run like so: $0 WORKBOOK" | |
19 | exit 1 | |
20 | fi | |
21 | : found workbook at $workbook | |
22 | workbook=`(cd $workbook ; pwd)` | |
23 | ||
2e562f3a | 24 | workbookdistfiles="ANON-CVS HACKING SNAPSHOTS" |
3be5cdf2 TTN |
25 | for f in $workbookdistfiles ; do |
26 | rm -f $f | |
27 | ln -s $workbook/build/dist-files/$f $f | |
28 | done | |
29 | rm -f examples/example.gdbinit | |
30 | ln -s $workbook/build/dist-files/.gdbinit examples/example.gdbinit | |
0859b96a TTN |
31 | |
32 | # TODO: This should be moved to dist-guile | |
feec7802 | 33 | mscripts=../guile-scripts |
0859b96a TTN |
34 | rm -f BUGS |
35 | $mscripts/render-bugs > BUGS | |
36 | ||
3be5cdf2 TTN |
37 | ###################################################################### |
38 | ||
af304e84 MV |
39 | # Make sure this matches the ACLOCAL invokation in Makefile.am |
40 | ||
65545721 ML |
41 | ./guile-aclocal.sh |
42 | ||
fc4fc6f6 RB |
43 | ###################################################################### |
44 | ### Libtool setup. | |
45 | ||
46 | # Get a clean version. | |
99fd355a | 47 | libtoolize --force --copy --automake |
0f59dd5f | 48 | |
fc4fc6f6 RB |
49 | ###################################################################### |
50 | ||
34d19ef6 HWN |
51 | |
52 | # configure.in reqs autoconf-2.53; try to find it | |
53 | for suf in "-2.53" "2.53" "" false; do | |
54 | version=`autoconf$suf --version 2>/dev/null | head -1 | awk '{print $NF}' | awk -F. '{print $1 * 100 + $2}'` | |
55 | if test "0$version" -eq 253; then | |
56 | autoconf=autoconf$suf | |
57 | autoheader=autoheader$suf | |
58 | break | |
59 | fi | |
60 | done | |
61 | ||
62 | if test -z "$autoconf"; then | |
63 | echo "ERROR: Please install autoconf 2.53" | |
64 | exit 1 | |
65 | fi | |
afc8e572 HWN |
66 | ################################################################ |
67 | ||
68 | #detect automake version | |
69 | ||
70 | ||
71 | # configure.in reqs autoconf-2.53; try to find it | |
72 | for suf in "-1.6" "1.6" "" false; do | |
73 | version=`automake$suf --version 2>/dev/null | head -1 | awk '{print $NF}' | awk -F. '{print $1 * 10 + $2}'` | |
74 | if test "0$version" -eq 16; then | |
75 | automake=automake$suf | |
76 | break | |
77 | fi | |
78 | done | |
79 | ||
80 | if test -z "$automake"; then | |
81 | echo "ERROR: Please install automake 1.6.x" | |
82 | exit 1 | |
83 | fi | |
34d19ef6 HWN |
84 | |
85 | ||
86 | ################################################################ | |
87 | $autoheader | |
88 | $autoconf | |
1901873f MV |
89 | |
90 | # Automake has a bug that will let it only add one copy of a missing | |
91 | # file. We need two mdate-sh, tho, one in doc/ref/ and one in | |
92 | # doc/tutorial/. We run automake twice as a workaround. | |
93 | ||
afc8e572 HWN |
94 | $automake --add-missing |
95 | $automake --add-missing | |
0b49b6ae | 96 | |
cebb2d1f MV |
97 | # Make sure that libltdl uses the same autoconf version as the rest. |
98 | # | |
fc4fc6f6 | 99 | echo "libltdl..." |
feec7802 | 100 | (cd libltdl && aclocal) |
fc4fc6f6 | 101 | (cd libltdl && autoconf) |
afc8e572 | 102 | (cd libltdl && $automake --gnu --add-missing) |
cebb2d1f | 103 | |
fc4fc6f6 RB |
104 | echo "guile-readline..." |
105 | (cd guile-readline && ./autogen.sh) | |
9e74987f MV |
106 | |
107 | echo "Now run configure and make." | |
f2ae4555 | 108 | echo "You must pass the \`--enable-maintainer-mode' option to configure." |
3be5cdf2 TTN |
109 | |
110 | # autogen.sh ends here |