+ (cd lispref; $(MAKE) $(MFLAGS) elisp.dvi)
+ (cd lispintro; $(MAKE) $(MFLAGS) emacs-lisp-intro.dvi)
+
+#### Bootstrapping.
+
+### This is meant for Emacs maintainers only. It first cleans the
+### lisp subdirectory, removing all compiled Lisp files. Then a
+### special emacs executable is built from Lisp sources, which is then
+### used to compile Lisp files. The last step is a "normal" make.
+
+.PHONY: bootstrap bootstrap-lisp-1 boostrap-src bootstrap-lisp bootstrap-clean
+.PHONY: maybe_bootstrap
+
+maybe_bootstrap:
+ @if [ ! -f $(srcdir)/lisp/abbrev.elc ]; then \
+ echo "Essential Lisp files seem to be missing. You should either"; \
+ echo "do \`make bootstrap' or create \`lisp/abbrev.elc' somehow."; \
+ exit 1;\
+ fi
+
+bootstrap: bootstrap-clean-before bootstrap-lisp-1 bootstrap-src bootstrap-lisp bootstrap-clean-after all info
+
+bootstrap-lisp-1:
+ (cd lisp; $(MAKE) $(MFLAGS) bootstrap-clean)
+
+bootstrap-lisp:
+ (cd lisp; $(MAKE) $(MFLAGS) bootstrap EMACS=../src/bootstrap-emacs)
+
+bootstrap-src:
+ (cd src; $(MAKE) $(MFLAGS) bootstrap)
+
+### Used for `bootstrap' to avoid deleting existing dumped Emacs executables.
+bootstrap-clean-before: FRC
+ (cd src; $(MAKE) $(MFLAGS) mostlyclean)
+ (cd oldXMenu; $(MAKE) $(MFLAGS) clean)
+ (cd lwlib; $(MAKE) $(MFLAGS) clean)
+ (cd lib-src; $(MAKE) $(MFLAGS) clean)
+ -(cd man && $(MAKE) $(MFLAGS) clean)
+ -(cd lispref && $(MAKE) $(MFLAGS) clean)
+ -(cd lispintro && $(MAKE) $(MFLAGS) clean)
+ (cd leim; $(MAKE) $(MFLAGS) clean)
+
+bootstrap-clean-after:
+ (cd src; $(MAKE) $(MFLAGS) mostlyclean)