summaryrefslogtreecommitdiff
path: root/Makefile.in
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 /Makefile.in
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 'Makefile.in')
-rw-r--r--Makefile.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in
index 3cb1f5e2ab6..b9aaf5babc2 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -98,6 +98,9 @@ configuration=@configuration@
### The nt/ subdirectory gets built only for MinGW
NTDIR=@NTDIR@
+### $(srcdir)/nt/gnulib.mk for MinGW, else $(srcdir)/lib/gnulib.mk
+gnulib_mk=@GNULIB_MK@
+
# 'make' verbosity.
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
@@ -451,10 +454,13 @@ $(srcdir)/aclocal.m4: $(ACLOCAL_INPUTS)
cd $(srcdir) && ACLOCAL_PATH='$(ACLOCAL_PATH)' $(ACLOCAL) -I m4
AUTOMAKE_INPUTS = $(srcdir)/aclocal.m4 $(srcdir)/lib/Makefile.am \
- $(srcdir)/lib/gnulib.mk
+ $(gnulib_mk)
$(srcdir)/lib/Makefile.in: $(AUTOMAKE_INPUTS)
cd $(srcdir) && $(AUTOMAKE) --gnu -a -c lib/Makefile
+$(srcdir)/nt/gnulib.mk: $(srcdir)/lib/Makefile.in
+ $(MAKE) -C $(srcdir)/nt gnulib.mk
+
# Regenerate files that this makefile would have made, if this makefile
# had been built by Automake. The name 'am--refresh' is for
# compatibility with subsidiary Automake-generated makefiles.