Added comment about keeping the invocation of guile-aclocal in sync
[bpt/guile.git] / autogen.sh
1 #!/bin/sh
2 # Usage: sh -x ./autogen.sh [WORKBOOK]
3
4 set -e
5
6 [ -f GUILE-VERSION ] || {
7 echo "autogen.sh: run this command only at the top of guile-core."
8 exit 1
9 }
10
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
24 workbookdistfiles="ANON-CVS HACKING INSTALL SNAPSHOTS"
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
31 ######################################################################
32
33 # Make sure this matches the ACLOCAL invokation in Makefile.am
34
35 ./guile-aclocal.sh
36
37 ######################################################################
38 ### Libtool setup.
39
40 # Get a clean version.
41 rm -rf libltdl
42 libtoolize --force --copy --automake --ltdl
43
44 # Make sure we use a ./configure.in compatible autoconf in ./libltdl/
45 mv libltdl/configure.in libltdl/configure.tmp
46 echo 'AC_PREREQ(2.50)' > libltdl/configure.in
47 cat libltdl/configure.tmp >> libltdl/configure.in
48 rm libltdl/configure.tmp
49 ######################################################################
50
51 autoheader
52 autoconf
53
54 # Automake has a bug that will let it only add one copy of a missing
55 # file. We need two mdate-sh, tho, one in doc/ref/ and one in
56 # doc/tutorial/. We run automake twice as a workaround.
57
58 automake --add-missing
59 automake --add-missing
60
61 # Make sure that libltdl uses the same autoconf version as the rest.
62 #
63 echo "libltdl..."
64 (cd libltdl && autoconf)
65 (cd libltdl && automake --gnu --add-missing)
66
67 echo "guile-readline..."
68 (cd guile-readline && ./autogen.sh)
69
70 echo "Now run configure and make."
71 echo "You must pass the \`--enable-maintainer-mode' option to configure."
72
73 # autogen.sh ends here