emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r117420: Replace BOOTSTRAPEMACS with an order-only d


From: Glenn Morris
Subject: [Emacs-diffs] trunk r117420: Replace BOOTSTRAPEMACS with an order-only dependence on bootstrap-emacs
Date: Fri, 27 Jun 2014 00:41:26 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117420
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/2151
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Thu 2014-06-26 20:41:23 -0400
message:
  Replace BOOTSTRAPEMACS with an order-only dependence on bootstrap-emacs
  
  * Makefile.in (src): No more need to pass BOOTSTRAPEMACS.
  
  * src/Makefile.in (.el.elc): Replace suffix rule with pattern rule.
  (%.elc): New pattern rule, with order-only prerequisite.
  ($(lisp)): No more need to depend on BOOTSTRAPEMACS.
  ($(lispsource)/loaddefs.el): Use an order-only prerequisite
  in place of BOOTSTRAPEMACS.
modified:
  ChangeLog                      changelog-20091113204419-o5vbwnq5f7feedwu-1538
  Makefile.in                    makefile.in-20091113204419-o5vbwnq5f7feedwu-446
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/Makefile.in                makefile.in-20091113204419-o5vbwnq5f7feedwu-631
=== modified file 'ChangeLog'
--- a/ChangeLog 2014-06-27 00:36:06 +0000
+++ b/ChangeLog 2014-06-27 00:41:23 +0000
@@ -1,5 +1,7 @@
 2014-06-27  Glenn Morris  <address@hidden>
 
+       * Makefile.in (src): No more need to pass BOOTSTRAPEMACS.
+
        * make-dist: Exclude test/automated/*.log.
 
 2014-06-26  Glenn Morris  <address@hidden>

=== modified file 'Makefile.in'
--- a/Makefile.in       2014-06-26 05:47:10 +0000
+++ b/Makefile.in       2014-06-27 00:41:23 +0000
@@ -368,16 +368,6 @@
 lib lib-src lisp nt: Makefile
        $(MAKE) -C $@ all
 
-# Pass to src/Makefile.in an additional BOOTSTRAPEMACS variable which
-# is either set to bootstrap-emacs (in case bootstrap-emacs has not been
-# constructed yet) or the empty string (otherwise).
-# src/Makefile.in uses it to implement conditional dependencies, so that
-# files that need bootstrap-emacs to be built do not additionally need
-# to be kept fresher than bootstrap-emacs.  Otherwise changing a single
-# 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.
-#
 # Note the use of single quotes in the value of vcswitness.
 # This passes an unexpanded $srcdir to src's Makefile, which then
 # expands it using its own value of srcdir (which points to the
@@ -386,10 +376,7 @@
        dirstate='.bzr/checkout/dirstate';                              \
        vcswitness='$$(srcdir)/../'$$dirstate;                          \
        [ -r "$(srcdir)/$$dirstate" ] || vcswitness='';                 \
-       cd $@ || exit;                                                  \
-       boot=bootstrap-emacs$(EXEEXT);                                  \
-       [ ! -x "$$boot" ] || boot='';                                   \
-       $(MAKE) all BOOTSTRAPEMACS="$$boot" VCSWITNESS="$$vcswitness"
+       $(MAKE) -C $@ all VCSWITNESS="$$vcswitness"
 
 blessmail: Makefile src
        $(MAKE) -C lib-src maybe-blessmail

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-06-26 07:13:13 +0000
+++ b/src/ChangeLog     2014-06-27 00:41:23 +0000
@@ -1,3 +1,13 @@
+2014-06-27  Glenn Morris  <address@hidden>
+
+       * Makefile.in: Replace BOOTSTRAPEMACS sleight-of-hand
+       with an order-only dependence on bootstrap-emacs.  (Bug#2151)
+       (.el.elc): Replace suffix rule with pattern rule.
+       (%.elc): New pattern rule, with order-only prerequisite.
+       ($(lisp)): No more need to depend on BOOTSTRAPEMACS.
+       ($(lispsource)/loaddefs.el): Use an order-only prerequisite
+       in place of BOOTSTRAPEMACS.
+
 2014-06-26  Dmitry Antipov  <address@hidden>
 
        * fns.c (Fcompare_strings): Use FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE.

=== modified file 'src/Makefile.in'
--- a/src/Makefile.in   2014-06-16 22:38:17 +0000
+++ b/src/Makefile.in   2014-06-27 00:41:23 +0000
@@ -1,7 +1,7 @@
 ### @configure_input@
 
-# Copyright (C) 1985, 1987-1988, 1993-1995, 1999-2014 Free Software
-# Foundation, Inc.
+# Copyright (C) 1985, 1987-1988, 1993-1995, 1999-2014
+#   Free Software Foundation, Inc.
 
 # This file is part of GNU Emacs.
 
@@ -594,40 +594,28 @@
 ## such as loaddefs.el or *.elc can typically be produced by any old
 ## Emacs executable, so we would like to avoid rebuilding them whenever
 ## we build a new Emacs executable.
+##
+## (In other words, changing a single file src/foo.c would force
+## 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.)
+##
 ## To solve the circularity, we use 2 different Emacs executables,
 ## "emacs" is the main target and "bootstrap-emacs" is the one used
 ## to build the *.elc and loaddefs.el files.
-## To solve the freshness issue, we used to use a third file "witness-emacs"
-## which was used to witness the fact that there is a bootstrap-emacs
-## executable, and then have dependencies on witness-emacs rather than
-## bootstrap-emacs, but that lead to problems in parallel builds (because
-## witness-emacs needed to be free from dependencies (to avoid rebuilding
-## it), so it was compiled in parallel, leading typically to having 2
-## processes dumping bootstrap-emacs at the same time).
-## So instead, we replace the witness-emacs dependencies by conditional
-## bootstrap-dependencies (via $(BOOTSTRAPEMACS)).  Of course, since we do
-## not want to rely on GNU Make features, we have to rely on an external
-## script to do the conditional part of the dependency
-## (i.e. see the $(SUBDIR) rule ../Makefile.in).
-
-.SUFFIXES: .elc .el
-
-## These suffix rules do not allow additional dependencies, sadly, so
-## instead of adding a $(BOOTSTRAPEMACS) dependency here, we add it
-## separately below.
-## With GNU Make, we would just say "%.el : %.elc $(BOOTSTRAPEMACS)"
-.el.elc:
+## To solve the freshness issue, in the past we tried various clever tricks,
+## but now that we require GNU make, we can simply specify
+## bootstrap-emacs$(EXEEXT) as an order-only prerequisite.
+
+%.elc: %.el | bootstrap-emacs$(EXEEXT)
        @$(MAKE) -C ../lisp compile-onefile THEFILE=$< EMACS="$(bootstrap_exe)"
 
-## Since the .el.elc rule cannot specify an extra dependency, we do it here.
-$(lisp): $(BOOTSTRAPEMACS)
-
 ## VCSWITNESS points to the file that holds info about the current checkout.
 ## We use it as a heuristic to decide when to rebuild loaddefs.el.
 ## If empty it is ignored; the parent makefile can set it to some other value.
 VCSWITNESS =
 
-$(lispsource)/loaddefs.el: $(BOOTSTRAPEMACS) $(VCSWITNESS)
+$(lispsource)/loaddefs.el: $(VCSWITNESS) | bootstrap-emacs$(EXEEXT)
        $(MAKE) -C ../lisp autoloads EMACS="$(bootstrap_exe)"
 
 ## Dump an Emacs executable named bootstrap-emacs containing the


reply via email to

[Prev in Thread] Current Thread [Next in Thread]