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: Sat, 21 Jun 2008 01:38:41 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        08/06/21 01:38:39

Index: src/Makefile.in
===================================================================
RCS file: /sources/emacs/emacs/src/Makefile.in,v
retrieving revision 1.389
retrieving revision 1.390
diff -u -b -r1.389 -r1.390
--- src/Makefile.in     20 Jun 2008 21:48:17 -0000      1.389
+++ src/Makefile.in     21 Jun 2008 01:38:39 -0000      1.390
@@ -912,6 +912,9 @@
        ln temacs${EXEEXT} emacs${EXEEXT}
 #else
        LC_ALL=C $(RUN_TEMACS) -batch -l loadup dump
+       @: This new Emacs is as functional and more efficient then
+       @: bootstrap-emacs, so let us replace it.
+       -ln -f emacs${EXEEXT} bootstrap-emacs${EXEEXT}
 #endif /* ! defined (CANNOT_DUMP) */
        -./emacs -q -batch -f list-load-path-shadows
 
@@ -1268,12 +1271,10 @@
        cd ${emacsapp}Contents/MacOS/; cp ../../../../src/emacs${EXEEXT} 
Emacs${EXEEXT}
 #endif
 
-bootstrapclean:
-       rm -f bootstrap-emacs${EXEEXT} emacs-${version}${EXEEXT}
 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}
+       rm -f bootstrap-emacs${EXEEXT} emacs-${version}${EXEEXT} witness-emacs
        rm -f buildobj.lst
 clean: mostlyclean
        rm -f emacs-*.*.*${EXEEXT} emacs${EXEEXT}
@@ -1319,22 +1320,49 @@
 
 
 /* Bootstrapping.  */
+/* Bootstrapping right is difficult because of the circular dependencies.
+   Furthermore, we have to deal with the fact that many compilation targets
+   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.
+   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.  */
+
+/* These suffix rules do not allow additional dependencies, sadly, so
+   adding a bootstrap-emacs%{EXEEXT} dependency does not work --Stef */
+.el.elc:
+       cd ${lispsource}; $(MAKE) $(MFLAGS) $@ 
EMACS=../src/bootstrap-emacs${EXEEXT}
+
+/* Files that need to be compiled early to speed up further compilation.  */
+PRECOMP=../lisp/emacs-lisp/bytecomp.elc ../lisp/emacs-lisp/byte-opt.elc
+${PRECOMP}: witness-emacs
+
+/* 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 ${PRECOMP}
 
-bootstrap: bootstrap-emacs${EXEEXT}
-
-../lisp/subdirs.el:
-       cd $(lispsource); $(MAKE) update-subdirs
-
-../lisp/loaddefs.el: bootstrap-emacs${EXEEXT}
-       cd $(lispsource); $(MAKE) autoloads 
EMACS=../src/bootstrap-emacs${EXEEXT}
+../lisp/loaddefs.el: witness-emacs
+       cd $(lispsource); $(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} 
${lispsource}international/charprop.el ../lisp/subdirs.el
+bootstrap-emacs${EXEEXT}: temacs${EXEEXT}
 #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:
+       cd $(lispsource); $(MAKE) $(MFLAGS) update-subdirs
+       $(MAKE) $(MFLAGS) bootstrap-emacs${EXEEXT}
+       touch witness-emacs




reply via email to

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