2010-10-08 Paul Eggert <eggert@cs.ucla.edu>
+ bootstrap: add hook for altering gnulib.mk, for Bison
+ * build-aux/bootstrap (gnulib_mk_hook): New function, so that
+ the Bison bootstrapping process can rewrite file names and variables
+ in this file before later parts of 'bootstrap' use the file.
+ Bison wants to include lib/gnulib.mk from the top-level makefile,
+ so it needs the file names in this file to be relative to the top
+ level, not relative to lib; plus it needs variable names to be
+ rewritten.
+ (slurp): Use the new function.
+
bootstrap: reformat for readability
* build-aux/bootstrap: Rewrite to avoid lines longer than 80 columns.
# Any gnulib files needed that are not in modules.
gnulib_files=
+# A function to be called to edit gnulib.mk right after it's created.
+# Override it via your own definition in bootstrap.conf.
+gnulib_mk_hook() { :; }
+
# A function to be called after everything else in this script.
# Override it via your own definition in bootstrap.conf.
bootstrap_epilogue() { :; }
cmp - $dir/$gnulib_mk > /dev/null || {
echo "$0: Copying $1/$dir/$file to $dir/$gnulib_mk ..." &&
rm -f $dir/$gnulib_mk &&
- sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk
+ sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk &&
+ gnulib_mk_hook $dir/$gnulib_mk
}
elif { test "${2+set}" = set && test -r $2/$dir/$file; } ||
version_controlled_file $dir $file; then