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 /Makefile.in | |
| 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 'Makefile.in')
| -rw-r--r-- | Makefile.in | 53 |
1 files changed, 17 insertions, 36 deletions
diff --git a/Makefile.in b/Makefile.in index 2b313dffa56..ceb1d3abe3b 100644 --- a/Makefile.in +++ b/Makefile.in | |||
| @@ -54,8 +54,8 @@ | |||
| 54 | # Still more severe - delete backup and autosave files, too. | 54 | # Still more severe - delete backup and autosave files, too. |
| 55 | # | 55 | # |
| 56 | # make bootstrap | 56 | # make bootstrap |
| 57 | # Recompiles all the Emacs Lisp files using the latest source, | 57 | # Removes all the compiled files to force a new bootstrap from a |
| 58 | # then rebuilds Emacs. | 58 | # clean slate, and then build in the normal way. |
| 59 | 59 | ||
| 60 | SHELL = /bin/sh | 60 | SHELL = /bin/sh |
| 61 | 61 | ||
| @@ -315,7 +315,7 @@ lib-src: FRC src/config.stamp | |||
| 315 | # We need to build `emacs' in `src' to compile the *.elc files in `lisp'. | 315 | # We need to build `emacs' in `src' to compile the *.elc files in `lisp'. |
| 316 | lisp: src | 316 | lisp: src |
| 317 | 317 | ||
| 318 | ${SUBDIR}: maybe_bootstrap ${SUBDIR_MAKEFILES} FRC | 318 | ${SUBDIR}: ${SUBDIR_MAKEFILES} FRC |
| 319 | cd $@; $(MAKE) all $(MFLAGS) \ | 319 | cd $@; $(MAKE) all $(MFLAGS) \ |
| 320 | CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \ | 320 | CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \ |
| 321 | LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' | 321 | LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' |
| @@ -706,6 +706,11 @@ clean: FRC | |||
| 706 | -(cd doc/lispintro && $(MAKE) $(MFLAGS) clean) | 706 | -(cd doc/lispintro && $(MAKE) $(MFLAGS) clean) |
| 707 | (cd leim; $(MAKE) $(MFLAGS) clean) | 707 | (cd leim; $(MAKE) $(MFLAGS) clean) |
| 708 | 708 | ||
| 709 | ### `bootclean' | ||
| 710 | ### Delete all files that need to be remade for a clean bootstrap. | ||
| 711 | top_bootclean=\ | ||
| 712 | rm -f config.cache config.log ; \ | ||
| 713 | if [ -d lock ] ; then (cd lock && (rm -f * || true)); else true; fi | ||
| 709 | ### `distclean' | 714 | ### `distclean' |
| 710 | ### Delete all files from the current directory that are created by | 715 | ### Delete all files from the current directory that are created by |
| 711 | ### configuring or building the program. If you have unpacked the | 716 | ### configuring or building the program. If you have unpacked the |
| @@ -713,9 +718,8 @@ clean: FRC | |||
| 713 | ### `make distclean' should leave only the files that were in the | 718 | ### `make distclean' should leave only the files that were in the |
| 714 | ### distribution. | 719 | ### distribution. |
| 715 | top_distclean=\ | 720 | top_distclean=\ |
| 716 | rm -f config.cache config.log ; \ | 721 | ${top_bootclean}; \ |
| 717 | rm -f Makefile ${SUBDIR_MAKEFILES} ; \ | 722 | rm -f config.status Makefile ${SUBDIR_MAKEFILES} |
| 718 | if [ -d lock ] ; then (cd lock && (rm -f * || true)); else true; fi | ||
| 719 | distclean: FRC | 723 | distclean: FRC |
| 720 | (cd src; $(MAKE) $(MFLAGS) distclean) | 724 | (cd src; $(MAKE) $(MFLAGS) distclean) |
| 721 | (cd oldXMenu; $(MAKE) $(MFLAGS) distclean) | 725 | (cd oldXMenu; $(MAKE) $(MFLAGS) distclean) |
| @@ -742,8 +746,8 @@ bootstrap-clean: FRC | |||
| 742 | -(cd doc/lispref && $(MAKE) $(MFLAGS) maintainer-clean) | 746 | -(cd doc/lispref && $(MAKE) $(MFLAGS) maintainer-clean) |
| 743 | -(cd doc/lispintro && $(MAKE) $(MFLAGS) maintainer-clean) | 747 | -(cd doc/lispintro && $(MAKE) $(MFLAGS) maintainer-clean) |
| 744 | (cd leim; $(MAKE) $(MFLAGS) maintainer-clean) | 748 | (cd leim; $(MAKE) $(MFLAGS) maintainer-clean) |
| 745 | (cd lisp; $(MAKE) $(MFLAGS) maintainer-clean) | 749 | (cd lisp; $(MAKE) $(MFLAGS) bootstrap-clean) |
| 746 | ${top_distclean} | 750 | ${top_bootclean} |
| 747 | 751 | ||
| 748 | ### `maintainer-clean' | 752 | ### `maintainer-clean' |
| 749 | ### Delete everything from the current directory that can be | 753 | ### Delete everything from the current directory that can be |
| @@ -756,9 +760,10 @@ bootstrap-clean: FRC | |||
| 756 | ### Makefile. More generally, `make maintainer-clean' should not delete | 760 | ### Makefile. More generally, `make maintainer-clean' should not delete |
| 757 | ### anything that needs to exist in order to run `configure' and then | 761 | ### anything that needs to exist in order to run `configure' and then |
| 758 | ### begin to build the program. | 762 | ### begin to build the program. |
| 759 | maintainer-clean: bootstrap-clean | 763 | maintainer-clean: bootstrap-clean FRC |
| 760 | (cd src; $(MAKE) $(MFLAGS) maintainer-clean) | 764 | (cd src; $(MAKE) $(MFLAGS) maintainer-clean) |
| 761 | -rm -f config.status | 765 | (cd lisp; $(MAKE) $(MFLAGS) maintainer-clean) |
| 766 | ${top_distclean} | ||
| 762 | 767 | ||
| 763 | ### This doesn't actually appear in the coding standards, but Karl | 768 | ### This doesn't actually appear in the coding standards, but Karl |
| 764 | ### says GCC supports it, and that's where the configuration part of | 769 | ### says GCC supports it, and that's where the configuration part of |
| @@ -829,41 +834,17 @@ dvi: | |||
| 829 | #### Bootstrapping. | 834 | #### Bootstrapping. |
| 830 | 835 | ||
| 831 | ### This first cleans the lisp subdirectory, removing all compiled | 836 | ### This first cleans the lisp subdirectory, removing all compiled |
| 832 | ### Lisp files. Then a special emacs executable is built from Lisp | 837 | ### Lisp files. Then re-run make to build all the files anew. |
| 833 | ### sources, which is then used to compile Lisp files. The last step | ||
| 834 | ### is a "normal" make. | ||
| 835 | 838 | ||
| 836 | .PHONY: bootstrap | 839 | .PHONY: bootstrap |
| 837 | .PHONY: bootstrap-build | ||
| 838 | .PHONY: maybe_bootstrap | ||
| 839 | |||
| 840 | maybe_bootstrap: | ||
| 841 | @bar="`echo $(srcdir)/lisp/*.elc`"; \ | ||
| 842 | if [ \( "$$bar" = '$(srcdir)/lisp/*.elc' \) -o \( "$$bar" = '' \) ]; then \ | ||
| 843 | echo "Your tree does not include the compiled Lisp files."; \ | ||
| 844 | echo "You need to do \`make bootstrap' to build Emacs."; \ | ||
| 845 | exit 1;\ | ||
| 846 | fi | ||
| 847 | 840 | ||
| 848 | bootstrap: bootstrap-clean FRC | 841 | bootstrap: bootstrap-clean FRC |
| 849 | if [ -x ./config.status ]; then \ | 842 | if [ -x ./config.status ]; then \ |
| 850 | ./config.status --recheck; \ | ||
| 851 | ./config.status; \ | 843 | ./config.status; \ |
| 852 | else \ | 844 | else \ |
| 853 | ./configure --enable-maintainer-mode; \ | 845 | ./configure --enable-maintainer-mode; \ |
| 854 | fi | 846 | fi |
| 855 | $(MAKE) $(MFLAGS) info bootstrap-build | 847 | $(MAKE) $(MFLAGS) info all |
| 856 | |||
| 857 | src/bootstrap-emacs${EXEEXT}: | ||
| 858 | (cd src; $(MAKE) $(MFLAGS) bootstrap-emacs${EXEEXT}) | ||
| 859 | |||
| 860 | ## There used to be a src; mostlyclean before all, but it does not | ||
| 861 | ## seem to serve any purpose, and compiles things twice. | ||
| 862 | ## http://lists.gnu.org/archive/html/emacs-devel/2008-06/msg00104.html | ||
| 863 | bootstrap-build: src/bootstrap-emacs$(EXEEXT) FRC | ||
| 864 | (cd lisp; $(MAKE) $(MFLAGS) bootstrap EMACS=../src/bootstrap-emacs${EXEEXT}) | ||
| 865 | $(MAKE) $(MFLAGS) all | ||
| 866 | (cd lisp; $(MAKE) $(MFLAGS) bootstrap-after) | ||
| 867 | 848 | ||
| 868 | .PHONY: check-declare | 849 | .PHONY: check-declare |
| 869 | 850 | ||