[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 08/11] build: manually update bootstrap from gnulib, and adap
From: |
Jim Meyering |
Subject: |
Re: [PATCH 08/11] build: manually update bootstrap from gnulib, and adapt |
Date: |
Wed, 18 Jan 2012 22:10:44 +0100 |
Jim Meyering wrote:
> From: Jim Meyering <address@hidden>
>
> Updating to the latest bootstrap from gnulib involves more of a
> change than usual, and updating to the latest gnulib would involve
> its own set of challenges with the upcoming quoting changes, so
> we update bootstrap manually and separately.
> * bootstrap: Update from gnulib.
> * Makefile.am: Initialize more variables to empty, so that gnulib.mk
> can append to them with "+=".
> * bootstrap.conf (gnulib_mk_hook): Remove. No longer honored.
> (bootstrap_epilogue): Instead, run the same command,
> etc/prefix-gnulib-mk lib/$gnulib_mk, from here.
> Temporarily disable "bootstrap_sync=true".
> * etc/prefix-gnulib-mk: Don't prepend "lib/" to tokens like -I$(...
> or "\".
...
> -# Massage lib/gnulib.mk before using it later in the bootstrapping process.
> -gnulib_mk_hook()
> -{
> - etc/prefix-gnulib-mk $1
> -}
> +gnulib_tool_option_extras='--symlink --makefile-name=gnulib.mk'
>
> bootstrap_epilogue()
> {
> + etc/prefix-gnulib-mk lib/$gnulib_mk
The above was not quite right.
While the result bootstrapped and passed 'make distcheck',
there was a key warning from automake about lib_libbison_a_SOURCES.
That led me to realize that we really do need a hook function
like the one I removed, gnulib_mk_hook. It cannot behave quite
the same, since I see no easy way to pass the name of each $gnulib_mk
file, but this incremental seems good enough, and passes all tests,
now warning-free:
I.e., we have to run the hook code between when bootstrap
runs gnulib-tool --import and when it runs automake via autoreconf.
Fall-out from this: I'll have to update gnulib's bootstrap with
this new change.
[Side note, I liked how bison uses automake's subdir-objects feature
(i.e., added efficiency of no recursive make invocations) enough that
I've converted cppi to work the same way. ]
diff --git a/Makefile.am b/Makefile.am
index b5e6202..2a9ad2b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -39,7 +39,6 @@ MOSTLYCLEANFILES =
SUFFIXES =
noinst_LIBRARIES =
MOSTLYCLEANDIRS =
-lib_libbison_a_SOURCES =
include build-aux/local.mk
include data/local.mk
diff --git a/bootstrap b/bootstrap
index 13ec5ae..57202fa 100755
--- a/bootstrap
+++ b/bootstrap
@@ -87,9 +87,9 @@ gnulib_files=
: ${AUTOPOINT=autopoint}
: ${AUTORECONF=autoreconf}
-# A function to be called to edit gnulib.mk right after it's created.
+# A function to be called right after gnulib-tool is run.
# Override it via your own definition in bootstrap.conf.
-gnulib_mk_hook() { :; }
+bootstrap_post_import_hook() { :; }
# A function to be called after everything else in this script.
# Override it via your own definition in bootstrap.conf.
@@ -807,6 +807,8 @@ for file in $gnulib_files; do
symlink_to_dir "$GNULIB_SRCDIR" $file || exit
done
+bootstrap_post_import_hook
+
# Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
# gnulib-populated directories. Such .m4 files would cause aclocal to fail.
# The following requires GNU find 4.2.3 or newer. Considering the usual
diff --git a/bootstrap.conf b/bootstrap.conf
index 19b2414..371f940 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -62,10 +62,14 @@ excluded_files='
gnulib_tool_option_extras='--symlink --makefile-name=gnulib.mk'
-bootstrap_epilogue()
+# Massage lib/gnulib.mk before using it later in the bootstrapping process.
+bootstrap_post_import_hook()
{
etc/prefix-gnulib-mk lib/$gnulib_mk
+}
+bootstrap_epilogue()
+{
# Make sure we don't need src/bison, which usually doesn't exist at
# the time of a bootstrap.
touch src/parse-gram.[ch]
[PATCH 10/11] quote consistently and make tests pass with new quoting from gnulib, Jim Meyering, 2012/01/18