summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2017-01-03 17:46:40 +0200
committerEli Zaretskii <eliz@gnu.org>2017-01-03 17:46:40 +0200
commit10444dcf77711bf3360f865fcb0d446a83e1bfb5 (patch)
treec5e6586bbae9bb3fdbfd2a7727f9ec9fc0fe8f4a /autogen.sh
parent134e86b360cab0d0a5cb634b71a4b06ec26c5f1f (diff)
downloademacs-10444dcf77711bf3360f865fcb0d446a83e1bfb5.tar.gz
Generate nt/gnulib.mk from lib/gnulib.mk
This was proposed by Paul Eggert <eggert@cs.ucla.edu>, with the purpose of avoiding manual maintenance of nt/gnulib.mk. * nt/gnulib-modules-to-delete.cfg: New file. * nt/Makefile.in (AM_V_GEN, am__v_GEN_, am__v_GEN_0) (am__v_GEN_1): New variables. (${srcdir}/gnulib.mk): Rules to generate gnulib.mk from lib/gnulib.mk and list of modules in gnulib-modules-to-delete.cfg. * make-dist (nt): Add gnulib-modules-to-delete.cfg to the list of files to link. * configure.ac (GNULIB_MK): Compute the value according to $opsys. * autogen.sh: Create nt/gnulib.mk if it doesn't exist, before running autoreconf. * Makefile.in (gnulib_mk): New variable. ($(srcdir)/nt/gnulib.mk): Rule to produce it. (AUTOMAKE_INPUTS): Use $(gnulib_mk) instead of a literal file name. * .gitignore: Add nt/gnulib.mk. * src/w32.c (acl_errno_valid): Implement it here, as we no longer build the acl-permissions module from Gnulib.
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/autogen.sh b/autogen.sh
index 7381bc32342..91e1e2cea23 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -220,8 +220,13 @@ Please report any problems with this script to bug-gnu-emacs@gnu.org .'
fi
echo 'Your system has the required tools.'
- echo "Running 'autoreconf -fi -I m4' ..."
+ ## Create nt/gnulib.mk if it doesn't exist, as autoreconf will need it.
+ if test ! -f nt/gnulib.mk; then
+ sed '/^[^#]/s|^.*$|/^## begin *gnulib module &/,/^## end *gnulib module &/c ## gnulib module & removed|' nt/gnulib-modules-to-delete.cfg | sed -f- lib/gnulib.mk > nt/gnulib.mk
+ fi
+
+ echo "Running 'autoreconf -fi -I m4' ..."
## Let autoreconf figure out what, if anything, needs doing.
## Use autoreconf's -f option in case autoreconf itself has changed.