Mercurial > hg > octave-lyh > gnulib-hg
changeset 13781:e9b975e48d33
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.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Fri, 08 Oct 2010 10:08:12 -0700 |
parents | dcbf0852769a |
children | 3a4a1b81c846 |
files | ChangeLog build-aux/bootstrap |
diffstat | 2 files changed, 16 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 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.
--- a/build-aux/bootstrap +++ b/build-aux/bootstrap @@ -80,6 +80,10 @@ # 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() { :; } @@ -692,7 +696,8 @@ 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