autogen.sh 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #!/bin/sh
  2. # Usage: sh -x ./autogen.sh [WORKBOOK]
  3. set -e
  4. [ -f GUILE-VERSION ] || {
  5. echo "autogen.sh: run this command only at the top of guile-core."
  6. exit 1
  7. }
  8. ######################################################################
  9. ### Find workbook and make symlinks.
  10. workbook=../workbook # assume "cvs co hack"
  11. test x$1 = x || workbook=$1
  12. if [ ! -d $workbook ] ; then
  13. echo "ERROR: could not find workbook dir"
  14. echo " re-run like so: $0 WORKBOOK"
  15. exit 1
  16. fi
  17. : found workbook at $workbook
  18. workbook=`(cd $workbook ; pwd)`
  19. workbookdistfiles="ANON-CVS HACKING INSTALL SNAPSHOTS"
  20. for f in $workbookdistfiles ; do
  21. rm -f $f
  22. ln -s $workbook/build/dist-files/$f $f
  23. done
  24. rm -f examples/example.gdbinit
  25. ln -s $workbook/build/dist-files/.gdbinit examples/example.gdbinit
  26. # TODO: This should be moved to dist-guile
  27. mscripts=$workbook/../scripts
  28. rm -f BUGS
  29. $mscripts/render-bugs > BUGS
  30. ######################################################################
  31. # Make sure this matches the ACLOCAL invokation in Makefile.am
  32. ./guile-aclocal.sh
  33. ######################################################################
  34. ### Libtool setup.
  35. # Get a clean version.
  36. rm -rf libltdl
  37. libtoolize --force --copy --automake --ltdl
  38. # Make sure we use a ./configure.in compatible autoconf in ./libltdl/
  39. mv libltdl/configure.in libltdl/configure.tmp
  40. echo 'AC_PREREQ(2.50)' > libltdl/configure.in
  41. cat libltdl/configure.tmp >> libltdl/configure.in
  42. rm libltdl/configure.tmp
  43. ######################################################################
  44. autoheader
  45. autoconf
  46. # Automake has a bug that will let it only add one copy of a missing
  47. # file. We need two mdate-sh, tho, one in doc/ref/ and one in
  48. # doc/tutorial/. We run automake twice as a workaround.
  49. automake --add-missing
  50. automake --add-missing
  51. # Make sure that libltdl uses the same autoconf version as the rest.
  52. #
  53. echo "libltdl..."
  54. (cd libltdl && autoconf)
  55. (cd libltdl && automake --gnu --add-missing)
  56. echo "guile-readline..."
  57. (cd guile-readline && ./autogen.sh)
  58. echo "Now run configure and make."
  59. echo "You must pass the \`--enable-maintainer-mode' option to configure."
  60. # autogen.sh ends here