Mercurial > emacs
diff src/Makefile.in @ 96196:568f14ebb684
* Makefile.in ${SUBDIR}: Pass additional BOOTSTRAPEMACS argument.
* Makefile.in (${lisp} ${SOME_MACHINE_LISP}, ../lisp/loaddefs.el):
Use $(BOOTSTRAPEMACS) rather than witness-emacs.
(bootstrap-emacs${EXEEXT}): Merge witness-emacs into it.
(witness-emacs): Remove.
(lisp, shortlisp): Move loaddefs.el earlier.
(mostlyclean): Forget about witness-emacs.
* Makefile.in (COMPILE_FIRST): Trim down and add autoload.el.
| author | Stefan Monnier <monnier@iro.umontreal.ca> |
|---|---|
| date | Sun, 22 Jun 2008 13:57:28 +0000 |
| parents | bcaa09123239 |
| children | 366bb0df9a46 |
line wrap: on
line diff
--- a/src/Makefile.in Sun Jun 22 02:29:32 2008 +0000 +++ b/src/Makefile.in Sun Jun 22 13:57:28 2008 +0000 @@ -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). */ + +.SUFFIXES: .elc .el /* These suffix rules do not allow additional dependencies, sadly, so - adding a bootstrap-emacs%{EXEEXT} dependency does not work --Stef */ -.SUFFIXES: .elc .el - + 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} + 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}
