diff options
| author | Stefan Monnier | 2008-06-21 01:38:39 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2008-06-21 01:38:39 +0000 |
| commit | fc46d2193603d395a8aaf254fa07e450744e2eb2 (patch) | |
| tree | 7cbffce7d24ea4adeabe982dea16e52561300668 /src | |
| parent | 5989ba2f87b231d9421ec13fb9e0811767921aa5 (diff) | |
| download | emacs-fc46d2193603d395a8aaf254fa07e450744e2eb2.tar.gz emacs-fc46d2193603d395a8aaf254fa07e450744e2eb2.zip | |
Make "make" do a bootstrap if needed.
* src/Makefile.in (emacs${EXEEXT}): Link the new emacs to bootstrap-emacs.
(bootstrapclean): Remove.
(.el.elc): New rule.
(PRECOMP): New var.
(../lisp/subdirs.el): Remove.
(bootstrap-emacs${EXEEXT}): Remove subdirs.el and charpro.el dependency.
(witness-emacs): New target.
(mostlyclean): Remove witness-emacs as well.
(../lisp/loaddefs.el, ${lisp} ${SOME_MACHINE_LISP}):
Add witness-emacs dependency.
* lisp/loadup.el: Don't add emacs-<VERS> name when bootstrapping.
* lisp/Makefile.in (emacs-deps): Remove.
($(lisp)/cus-load.el, $(lisp)/finder-inf.el): Re-add.
(all): Use them.
(autogen-clean): Remove.
* Makefile.in (maybe_bootstrap, src/bootstrap-emacs${EXEEXT})
(bootstrap-build): Remove.
(top_bootclean): New var.
(top_distclean, bootstrap-clean): Use it.
(bootstrap): Don't recheck config. Make normally.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 13 | ||||
| -rw-r--r-- | src/Makefile.in | 52 |
2 files changed, 53 insertions, 12 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 83405f2e414..c3476f667d8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,16 @@ | |||
| 1 | 2008-06-21 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * Makefile.in (emacs${EXEEXT}): Link the new emacs to bootstrap-emacs. | ||
| 4 | (bootstrapclean): Remove. | ||
| 5 | (.el.elc): New rule. | ||
| 6 | (PRECOMP): New var. | ||
| 7 | (../lisp/subdirs.el): Remove. | ||
| 8 | (bootstrap-emacs${EXEEXT}): Remove subdirs.el and charpro.el dependency. | ||
| 9 | (witness-emacs): New target. | ||
| 10 | (mostlyclean): Remove witness-emacs as well. | ||
| 11 | (../lisp/loaddefs.el, ${lisp} ${SOME_MACHINE_LISP}): | ||
| 12 | Add witness-emacs dependency. | ||
| 13 | |||
| 1 | 2008-06-20 Chong Yidong <cyd@stupidchicken.com> | 14 | 2008-06-20 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 15 | ||
| 3 | * font.c (Ffont_face_attributes): Omit key-attribute pairs not | 16 | * font.c (Ffont_face_attributes): Omit key-attribute pairs not |
diff --git a/src/Makefile.in b/src/Makefile.in index 85b1c6c0f34..7f93441039a 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -912,6 +912,9 @@ emacs${EXEEXT}: temacs${EXEEXT} ${etc}DOC ${lisp} ${SOME_MACHINE_LISP} | |||
| 912 | ln temacs${EXEEXT} emacs${EXEEXT} | 912 | ln temacs${EXEEXT} emacs${EXEEXT} |
| 913 | #else | 913 | #else |
| 914 | LC_ALL=C $(RUN_TEMACS) -batch -l loadup dump | 914 | LC_ALL=C $(RUN_TEMACS) -batch -l loadup dump |
| 915 | @: This new Emacs is as functional and more efficient then | ||
| 916 | @: bootstrap-emacs, so let us replace it. | ||
| 917 | -ln -f emacs${EXEEXT} bootstrap-emacs${EXEEXT} | ||
| 915 | #endif /* ! defined (CANNOT_DUMP) */ | 918 | #endif /* ! defined (CANNOT_DUMP) */ |
| 916 | -./emacs -q -batch -f list-load-path-shadows | 919 | -./emacs -q -batch -f list-load-path-shadows |
| 917 | 920 | ||
| @@ -1268,12 +1271,10 @@ ${emacsapp}Contents/MacOS/Emacs: emacs${EXEEXT} | |||
| 1268 | cd ${emacsapp}Contents/MacOS/; cp ../../../../src/emacs${EXEEXT} Emacs${EXEEXT} | 1271 | cd ${emacsapp}Contents/MacOS/; cp ../../../../src/emacs${EXEEXT} Emacs${EXEEXT} |
| 1269 | #endif | 1272 | #endif |
| 1270 | 1273 | ||
| 1271 | bootstrapclean: | ||
| 1272 | rm -f bootstrap-emacs${EXEEXT} emacs-${version}${EXEEXT} | ||
| 1273 | mostlyclean: | 1274 | mostlyclean: |
| 1274 | rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a | 1275 | rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a |
| 1275 | rm -f ../etc/DOC | 1276 | rm -f ../etc/DOC |
| 1276 | rm -f bootstrap-emacs${EXEEXT} emacs-${version}${EXEEXT} | 1277 | rm -f bootstrap-emacs${EXEEXT} emacs-${version}${EXEEXT} witness-emacs |
| 1277 | rm -f buildobj.lst | 1278 | rm -f buildobj.lst |
| 1278 | clean: mostlyclean | 1279 | clean: mostlyclean |
| 1279 | rm -f emacs-*.*.*${EXEEXT} emacs${EXEEXT} | 1280 | rm -f emacs-*.*.*${EXEEXT} emacs${EXEEXT} |
| @@ -1319,22 +1320,49 @@ tags: TAGS TAGS-LISP $(lwlibdir)TAGS | |||
| 1319 | 1320 | ||
| 1320 | 1321 | ||
| 1321 | /* Bootstrapping. */ | 1322 | /* Bootstrapping. */ |
| 1322 | 1323 | /* Bootstrapping right is difficult because of the circular dependencies. | |
| 1323 | bootstrap: bootstrap-emacs${EXEEXT} | 1324 | Furthermore, we have to deal with the fact that many compilation targets |
| 1324 | 1325 | such as loaddefs.el or *.elc can typically be produced by any old | |
| 1325 | ../lisp/subdirs.el: | 1326 | Emacs executable, so we would like to avoid rebuilding them whenever |
| 1326 | cd $(lispsource); $(MAKE) update-subdirs | 1327 | we build a new Emacs executable. |
| 1327 | 1328 | To solve the circularity, we use 2 different Emacs executables, | |
| 1328 | ../lisp/loaddefs.el: bootstrap-emacs${EXEEXT} | 1329 | "emacs" is the main target and "bootstrap-emacs" is the one used |
| 1329 | cd $(lispsource); $(MAKE) autoloads EMACS=../src/bootstrap-emacs${EXEEXT} | 1330 | to build the *.elc and loaddefs.el files. |
| 1331 | To solve the freshness issue, we use a third file "witness-emacs" | ||
| 1332 | which is used to witness the fact that there is a bootstrap-emacs | ||
| 1333 | executable. */ | ||
| 1334 | |||
| 1335 | /* These suffix rules do not allow additional dependencies, sadly, so | ||
| 1336 | adding a bootstrap-emacs%{EXEEXT} dependency does not work --Stef */ | ||
| 1337 | .el.elc: | ||
| 1338 | cd ${lispsource}; $(MAKE) $(MFLAGS) $@ EMACS=../src/bootstrap-emacs${EXEEXT} | ||
| 1339 | |||
| 1340 | /* Files that need to be compiled early to speed up further compilation. */ | ||
| 1341 | PRECOMP=../lisp/emacs-lisp/bytecomp.elc ../lisp/emacs-lisp/byte-opt.elc | ||
| 1342 | ${PRECOMP}: witness-emacs | ||
| 1343 | |||
| 1344 | /* Since the .el.elc rule cannot specify an extra dependency, we do it here. | ||
| 1345 | The byte-compiler dependency is not necessary, but it substantially | ||
| 1346 | speeds up byte-compilation of the other files. | ||
| 1347 | Of course, it also has the downside of forcing a recompilation of all | ||
| 1348 | those files whenever a file in $PRECOMP changes. */ | ||
| 1349 | ${lisp} ${SOME_MACHINE_LISP}: witness-emacs ${PRECOMP} | ||
| 1350 | |||
| 1351 | ../lisp/loaddefs.el: witness-emacs | ||
| 1352 | cd $(lispsource); $(MAKE) $(MFLAGS) autoloads EMACS=../src/bootstrap-emacs${EXEEXT} | ||
| 1330 | 1353 | ||
| 1331 | /* Dump an Emacs executable named bootstrap-emacs containing the | 1354 | /* Dump an Emacs executable named bootstrap-emacs containing the |
| 1332 | files from loadup.el in source form. */ | 1355 | files from loadup.el in source form. */ |
| 1333 | 1356 | ||
| 1334 | bootstrap-emacs${EXEEXT}: temacs${EXEEXT} ${lispsource}international/charprop.el ../lisp/subdirs.el | 1357 | bootstrap-emacs${EXEEXT}: temacs${EXEEXT} |
| 1335 | #ifdef CANNOT_DUMP | 1358 | #ifdef CANNOT_DUMP |
| 1336 | ln temacs${EXEEXT} bootstrap-emacs${EXEEXT} | 1359 | ln temacs${EXEEXT} bootstrap-emacs${EXEEXT} |
| 1337 | #else | 1360 | #else |
| 1338 | $(RUN_TEMACS) --batch --load loadup bootstrap | 1361 | $(RUN_TEMACS) --batch --load loadup bootstrap |
| 1339 | mv -f emacs${EXEEXT} bootstrap-emacs${EXEEXT} | 1362 | mv -f emacs${EXEEXT} bootstrap-emacs${EXEEXT} |
| 1340 | #endif /* ! defined (CANNOT_DUMP) */ | 1363 | #endif /* ! defined (CANNOT_DUMP) */ |
| 1364 | |||
| 1365 | witness-emacs: | ||
| 1366 | cd $(lispsource); $(MAKE) $(MFLAGS) update-subdirs | ||
| 1367 | $(MAKE) $(MFLAGS) bootstrap-emacs${EXEEXT} | ||
| 1368 | touch witness-emacs | ||