diff bootstrap.conf @ 15920:b91fc9348e2e

use hook functions for gnulib's bootrap script instead of our wrapper script * bootstrap: Rename from build-aux/bootstrap_gnulib, replacing our bootstrap wrapper script. * bootstrap.conf: Rename from build-aux/bootstrap_gnulib.conf. (AUTOMAKE): Define here instead of in top-level bootstrap wrapper script. (bootstrap_epilogue, bootstrap_post_import_hook): New functions to perform pre- and post- autoreconf bootstrap actions. * Makefile.am (EXTRA_DIST): Distribute bootstrap.conf. Remove build-aux/bootstrap_gnulib and build-aux/bootstrap_gnulib.conf from the list.
author John W. Eaton <jwe@octave.org>
date Thu, 10 Jan 2013 10:28:43 -0500
parents build-aux/bootstrap_gnulib.conf@9b9f6dba39e0
children 8122286c69a9
line wrap: on
line diff
copy from build-aux/bootstrap_gnulib.conf
copy to bootstrap.conf
--- a/build-aux/bootstrap_gnulib.conf
+++ b/bootstrap.conf
@@ -140,3 +140,53 @@
 gnulib_tool_option_extras="--libtool"
 gnulib_name="libgnu"
 source_base="libgnu"
+
+## Use --foreign since we auto-generate the AUTHORS file and the default
+## --gnu strictness level doesn't like it if the AUTHORS file is missing.
+
+AUTOMAKE="automake --foreign --warnings=no-portability"
+export AUTOMAKE
+
+bootstrap_post_import_hook ()
+{
+  ## Check for files that automake --gnu would normally look for, except
+  ## AUTHORS, which we autogenerate from the documentation files along
+  ## with building the rest of Octave, and INSTALL, which is linked from
+  ## gnulib/doc/INSTALL by the bootstrap script.
+
+  for f in NEWS README COPYING; do
+    if ! test -f $f; then
+      echo "required file $f is missing" 2>&1
+      exit 1
+    fi
+  done
+
+  echo "generating source lists for liboctave/operators/module.mk..."
+
+  (cd liboctave/operators; ./config-ops.sh)
+
+  echo "generating doc/interpreter/images.mk..."
+
+  (cd doc/interpreter; ./config-images.sh)
+
+  echo "generating libinterp/dldfcn/module.mk..."
+
+  (cd libinterp/dldfcn; ./config-module.sh)
+}
+
+bootstrap_epilogue ()
+{
+  ## G77 is obsolete, but it is still the first option in the autoconf
+  ## Fortran macros.  We should avoid it, because mixing old versions of
+  ## g77 with modern gcc and g++ causes trouble.  The following will
+  ## make it harder (but not impossible) for users to make this mistake.
+  ##
+  ## FIXME -- we should really work to fix autoconf so that it prefers
+  ## gfortran over g77 even when searching for a Fortran 77 compiler.
+
+  echo "replacing all occurrences of g77 with gfortran in configure script..."
+
+  sed 's/g77/gfortran/g' configure > configure.t
+  mv configure.t configure
+  chmod 755 configure
+}