aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.in
diff options
context:
space:
mode:
authorPaul Eggert2017-03-17 11:33:48 -0700
committerPaul Eggert2017-03-17 11:42:34 -0700
commit2f8935099c680f5e25afdf290d351180ee42fa39 (patch)
tree900d6f682b94c4b5f5cfe435fd6910f6ad9b6b3e /Makefile.in
parent65faa7bcb59421603ed2b6e961fe4b9ea8cb91b9 (diff)
downloademacs-2f8935099c680f5e25afdf290d351180ee42fa39.tar.gz
emacs-2f8935099c680f5e25afdf290d351180ee42fa39.zip
Fixups for GNU Make switchover
This fixes some minor problems introduced in the recent switch to GNU Make, discovered by further testing. Without some of these changes 'make -j' would sometimes have race conditions caused by missing dependencies. (Bug#26100) * .gitignore: Remove src/stamp-h.in, src/stamp-h1. * Makefile.in ($(MAKEFILE_NAME)): Depend on configure, not src/config.in, since the former's timestamp now represents the latter's. ($(srcdir)/configure): Use plain ./autogen.sh, for consistency with other autogen.sh invocations. ($(srcdir)/src/stamp-h.in): Remove rule, as this file is no longer created. * Makefile.in (top_distclean): * src/Makefile.in (bootstrap-clean): No need to remove stamp-h1, as that was an Automake byproduct and Automake is no longer in use. * lib/Makefile.in, src/Makefile.in: (AUTOCONF_INPUTS, $(top_srcdir)/configure): Remove. (../config.status, Makefile): Simplify by limiting dependencies to files we care about and files in the repository, and by using just one file to represent the timestamps on multiple targets updated by the same rule. * autogen.sh: Do not create or use src/stamp-h.in. Instead, have 'find' test the two output files directly.
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in22
1 files changed, 8 insertions, 14 deletions
diff --git a/Makefile.in b/Makefile.in
index 6c25a1bd8e1..cf8ff84212f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -419,8 +419,10 @@ blessmail: Makefile src
419 $(MAKE) -C lib-src maybe-blessmail 419 $(MAKE) -C lib-src maybe-blessmail
420 420
421# We used to have one rule per */Makefile.in, but that leads to race 421# We used to have one rule per */Makefile.in, but that leads to race
422# conditions with parallel makes, so let's assume that the time stamp on 422# conditions with parallel makes, so assume that the timestamp on
423# ./Makefile is representative of the time stamp on all the other Makefiles. 423# ./Makefile represents the timestamp on all the other Makefiles.
424# Similarly, assume the timestamp on ./configure represents the
425# timestamp on src/config.in.
424# 426#
425# config.status overrides MAKEFILE_NAME with a bogus name when creating 427# config.status overrides MAKEFILE_NAME with a bogus name when creating
426# src/epaths.h, so that 'make epaths-force' does not recursively invoke 428# src/epaths.h, so that 'make epaths-force' does not recursively invoke
@@ -430,7 +432,7 @@ blessmail: Makefile src
430# then attempts to build that file. This forces 'Makefile', 'lib/Makefile', 432# then attempts to build that file. This forces 'Makefile', 'lib/Makefile',
431# etc. to be built without running into similar recursion problems. 433# etc. to be built without running into similar recursion problems.
432MAKEFILE_NAME = Makefile 434MAKEFILE_NAME = Makefile
433$(MAKEFILE_NAME): config.status $(srcdir)/src/config.in \ 435$(MAKEFILE_NAME): config.status $(srcdir)/configure \
434 $(srcdir)/lib/gnulib.mk.in \ 436 $(srcdir)/lib/gnulib.mk.in \
435 $(srcdir)/Makefile.in $(SUBDIR_MAKEFILES_IN) $(CONFIG_STATUS_FILES_IN) 437 $(srcdir)/Makefile.in $(SUBDIR_MAKEFILES_IN) $(CONFIG_STATUS_FILES_IN)
436 MAKE='$(MAKE)' ./config.status 438 MAKE='$(MAKE)' ./config.status
@@ -445,16 +447,8 @@ config.status: ${srcdir}/configure
445 $(CFG) $(srcdir)/configure $(CONFIGURE_FLAGS); \ 447 $(CFG) $(srcdir)/configure $(CONFIGURE_FLAGS); \
446 fi 448 fi
447 449
448$(srcdir)/configure $(srcdir)/src/stamp-h.in: \ 450$(srcdir)/configure: $(srcdir)/configure.ac $(srcdir)/m4/*.m4
449 $(srcdir)/configure.ac $(srcdir)/m4/*.m4 451 cd $(srcdir) && ./autogen.sh
450 cd $(srcdir) && ./autogen.sh autoconf
451
452$(srcdir)/src/config.in: $(srcdir)/src/stamp-h.in
453 @ # Usually, there's no need to rebuild src/config.in just
454 @ # because stamp-h.in has changed (since building stamp-h.in
455 @ # refreshes config.in as well), but if config.in is missing
456 @ # then we really need to do something more.
457 $(if $(wildcard $@),,cd $(srcdir) && ./autogen.sh autoconf)
458 452
459# ==================== Installation ==================== 453# ==================== Installation ====================
460 454
@@ -864,7 +858,7 @@ top_bootclean=\
864top_distclean=\ 858top_distclean=\
865 ${top_bootclean}; \ 859 ${top_bootclean}; \
866 rm -f config.status config.log~ \ 860 rm -f config.status config.log~ \
867 Makefile lib/gnulib.mk stamp-h1 ${SUBDIR_MAKEFILES} 861 Makefile lib/gnulib.mk ${SUBDIR_MAKEFILES}
868 862
869distclean_dirs = $(clean_dirs) leim lisp 863distclean_dirs = $(clean_dirs) leim lisp
870 864