emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/src/Makefile.in,v


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/src/Makefile.in,v
Date: Sun, 22 Jun 2008 13:57:30 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        08/06/22 13:57:28

Index: src/Makefile.in
===================================================================
RCS file: /sources/emacs/emacs/src/Makefile.in,v
retrieving revision 1.398
retrieving revision 1.399
diff -u -b -r1.398 -r1.399
--- src/Makefile.in     22 Jun 2008 02:29:22 -0000      1.398
+++ src/Makefile.in     22 Jun 2008 13:57:28 -0000      1.399
@@ -680,7 +680,11 @@
    Files included conditionally here should be included (unconditionally)
    in SOME_MACHINE_LISP.  */
 
+/* Please loaddefs.el first, so it gets generated first, since it is on
+   the critical path (relevant in parallel compilations).  */
+
 lisp= \
+       ${lispsource}loaddefs.el \
        ${lispsource}abbrev.elc \
        ${lispsource}buff-menu.elc \
        ${lispsource}button.elc \
@@ -705,7 +709,6 @@
        ${lispsource}isearch.elc \
        ${lispsource}rfn-eshadow.elc \
        ${lispsource}loadup.el \
-       ${lispsource}loaddefs.el \
        ${lispsource}bindings.elc \
        ${lispsource}emacs-lisp/map-ynp.elc \
        ${lispsource}menu-bar.elc \
@@ -775,6 +778,7 @@
    It need not contain the files that are loaded conditionally
    because SOME_MACHINE_LISP has those.  */
 shortlisp= \
+       ../lisp/loaddefs.el \
        ../lisp/abbrev.elc \
        ../lisp/buff-menu.elc \
        ../lisp/button.elc \
@@ -797,7 +801,6 @@
        ../lisp/isearch.elc \
        ../lisp/rfn-eshadow.elc \
        ../lisp/loadup.el \
-       ../lisp/loaddefs.el \
        ../lisp/bindings.elc \
        ../lisp/emacs-lisp/map-ynp.elc \
        ../lisp/env.elc \
@@ -1274,7 +1277,7 @@
 mostlyclean:
        rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o 
libXMenu11.a liblw.a
        rm -f ../etc/DOC
-       rm -f bootstrap-emacs${EXEEXT} emacs-${version}${EXEEXT} witness-emacs
+       rm -f bootstrap-emacs${EXEEXT} emacs-${version}${EXEEXT}
        rm -f buildobj.lst
 clean: mostlyclean
        rm -f emacs-*.*.*${EXEEXT} emacs${EXEEXT}
@@ -1328,42 +1331,45 @@
    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 use a third file "witness-emacs"
-   which is used to witness the fact that there is a bootstrap-emacs
-   executable.  */
+   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).  */
 
-/* These suffix rules do not allow additional dependencies, sadly, so
-   adding a bootstrap-emacs%{EXEEXT} dependency does not work --Stef */
 .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:
        @cd ../lisp; $(MAKE) $(MFLAGS) compile-onefile \
                            THEFILE=$< EMACS=../src/bootstrap-emacs${EXEEXT}
 
-/* Since the .el.elc rule cannot specify an extra dependency, we do it here.
-   The byte-compiler dependency is not necessary, but it substantially
-   speeds up byte-compilation of the other files.
-   Of course, it also has the downside of forcing a recompilation of all
-   those files whenever a file in $PRECOMP changes.  */
-${lisp} ${SOME_MACHINE_LISP}: witness-emacs
+/* Since the .el.elc rule cannot specify an extra dependency, we do it here.  
*/
+${lisp} ${SOME_MACHINE_LISP}: $(BOOTSTRAPEMACS)
 
-../lisp/loaddefs.el: witness-emacs
+../lisp/loaddefs.el: $(BOOTSTRAPEMACS)
        cd ../lisp; $(MAKE) $(MFLAGS) autoloads 
EMACS=../src/bootstrap-emacs${EXEEXT}
 
 /* Dump an Emacs executable named bootstrap-emacs containing the
    files from loadup.el in source form.  */
 
 bootstrap-emacs${EXEEXT}: temacs${EXEEXT}
+       cd ../lisp; $(MAKE) $(MFLAGS) update-subdirs
 #ifdef CANNOT_DUMP
        ln temacs${EXEEXT} bootstrap-emacs${EXEEXT}
 #else
        $(RUN_TEMACS) --batch --load loadup bootstrap
        mv -f emacs${EXEEXT} bootstrap-emacs${EXEEXT}
 #endif /* ! defined (CANNOT_DUMP) */
-
-witness-emacs: temacs${EXEEXT}
-       cd ../lisp; $(MAKE) $(MFLAGS) update-subdirs
-       $(MAKE) $(MFLAGS) bootstrap-emacs${EXEEXT}
-       touch witness-emacs
        @: Compile some files earlier to speed up further compilation.
        cd ../lisp; $(MAKE) $(MFLAGS) compile-first 
EMACS=../src/bootstrap-emacs${EXEEXT}




reply via email to

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