changeset 96279:534958847ee0

* Makefile.in (Makefile): Use it for its timestamp value as well, and make it depend on all other */.in files. (src/Makefile, src/config.stamp, lib-src/Makefile) (doc/emacs/Makefile, doc/misc/Makefile, doc/lispref/Makefile) (doc/lispintro/Makefile, oldXMenu/Makefile, lwlib/Makefile) (leim/Makefile, lisp/Makefile): Remove those overlapping targets. (leim, ${SUBDIR}, blessmail): Only depend on Makefile now. * configure.in: Don't create src/config.stamp any more.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 25 Jun 2008 15:46:23 +0000
parents 1ce9a2ab1aea
children bfca3297fa0b
files ChangeLog Makefile.in configure.in
diffstat 3 files changed, 30 insertions(+), 43 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Jun 25 15:15:39 2008 +0000
+++ b/ChangeLog	Wed Jun 25 15:46:23 2008 +0000
@@ -1,3 +1,15 @@
+2008-06-25  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* Makefile.in (Makefile): Use it for its timestamp value as well, and
+	make it depend on all other */.in files.
+	(src/Makefile, src/config.stamp, lib-src/Makefile)
+	(doc/emacs/Makefile, doc/misc/Makefile, doc/lispref/Makefile)
+	(doc/lispintro/Makefile, oldXMenu/Makefile, lwlib/Makefile)
+	(leim/Makefile, lisp/Makefile): Remove those overlapping targets.
+	(leim, ${SUBDIR}, blessmail): Only depend on Makefile now.
+
+	* configure.in: Don't create src/config.stamp any more.
+
 2008-06-22  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* Makefile.in (${SUBDIR}): Pass additional BOOTSTRAPEMACS argument.
--- a/Makefile.in	Wed Jun 25 15:15:39 2008 +0000
+++ b/Makefile.in	Wed Jun 25 15:46:23 2008 +0000
@@ -301,15 +301,13 @@
 # "export PARALLEL=0" is for SGI's Make, to prevent it from
 # running more than 1 process in the leim directory, especially for
 # the $TIT files there.
-leim:   src ${SUBDIR_MAKEFILES} FRC
+leim:   src Makefile FRC
 	(export PARALLEL; PARALLEL=0; cd $@; $(MAKE) all $(MFLAGS) \
 	  CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \
 	  LDFLAGS='${LDFLAGS}' MAKE='${MAKE}')
 
 src:	lib-src FRC
 
-lib-src: FRC src/config.stamp
-
 .RECURSIVE: ${SUBDIR} leim
 
 # We need to build `emacs' in `src' to compile the *.elc files in `lisp'.
@@ -324,18 +322,32 @@
 # file src/foo.c forces dumping a new bootstrap-emacs, then re-byte-compiling
 # all preloaded elisp files, and only then dump the actual src/emacs, which
 # is not wrong, but is overkill in 99.99% of the cases.
-${SUBDIR}: ${SUBDIR_MAKEFILES} FRC
+${SUBDIR}: Makefile FRC
 	boot=bootstrap-emacs$(EXEEXT);                         \
 	if [ -x "src/$$boot" ]; then boot=""; fi;                   \
 	cd $@; $(MAKE) all $(MFLAGS)                           \
 	  CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \
 	  LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="$$boot"
 
-blessmail: ${SUBDIR_MAKEFILES} src FRC
+blessmail: Makefile src FRC
 	cd lib-src; $(MAKE) maybe-blessmail $(MFLAGS) \
 	  MAKE='${MAKE}' archlibdir='$(archlibdir)'
 
-Makefile: $(srcdir)/Makefile.in config.status
+# We used to have one rule per */Makefile.in, but that leads to race
+# conditions with parallel makes, so let's assume that the time stamp on
+# ./Makefile is representative of the time stamp on all the other Makefiles.
+Makefile: config.status $(srcdir)/src/config.in \
+          $(srcdir)/Makefile.in \
+          $(srcdir)/src/Makefile.in \
+          $(srcdir)/lib-src/Makefile.in \
+          $(srcdir)/doc/emacs/Makefile.in \
+          $(srcdir)/doc/misc/Makefile.in \
+          $(srcdir)/doc/lispref/Makefile.in \
+          $(srcdir)/doc/lispintro/Makefile.in \
+          $(srcdir)/oldXMenu/Makefile.in \
+          $(srcdir)/lwlib/Makefile.in \
+          $(srcdir)/leim/Makefile.in \
+          $(srcdir)/lisp/Makefile.in
 	./config.status
 
 config.status: ${srcdir}/configure ${srcdir}/lisp/version.el
@@ -353,40 +365,6 @@
 	rm -f $(srcdir)/src/stamp-h.in
 	echo timestamp > $(srcdir)/src/stamp-h.in
 
-src/Makefile: $(srcdir)/src/Makefile.in config.status
-	./config.status
-
-src/config.stamp: $(srcdir)/src/config.in config.status
-	./config.status
-	touch src/config.stamp
-
-lib-src/Makefile: $(srcdir)/lib-src/Makefile.in config.status
-	./config.status
-
-doc/emacs/Makefile: $(srcdir)/doc/emacs/Makefile.in config.status
-	./config.status
-
-doc/misc/Makefile: $(srcdir)/doc/misc/Makefile.in config.status
-	./config.status
-
-doc/lispref/Makefile: $(srcdir)/doc/lispref/Makefile.in config.status
-	./config.status
-
-doc/lispintro/Makefile: $(srcdir)/doc/lispintro/Makefile.in config.status
-	./config.status
-
-oldXMenu/Makefile: $(srcdir)/oldXMenu/Makefile.in config.status
-	./config.status
-
-lwlib/Makefile: $(srcdir)/lwlib/Makefile.in config.status
-	./config.status
-
-leim/Makefile: $(srcdir)/leim/Makefile.in config.status
-	./config.status
-
-lisp/Makefile: $(srcdir)/lisp/Makefile.in config.status
-	./config.status
-
 # ==================== Installation ====================
 
 ## If we let lib-src do its own installation, that means we
--- a/configure.in	Wed Jun 25 15:15:39 2008 +0000
+++ b/configure.in	Wed Jun 25 15:46:23 2008 +0000
@@ -3141,9 +3141,6 @@
   echo source $srcdir/src/.gdbinit > src/.gdbinit
 fi
 
-# This is how we know whether to re-run configure in certain cases.
-touch src/config.stamp
-
 ], [GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"])
 
 m4_if(dnl	Do not change this comment