+/* 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 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
+ 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}
+
+/* Since the .el.elc rule cannot specify an extra dependency, we do it here. */
+${lisp} ${SOME_MACHINE_LISP}: $(BOOTSTRAPEMACS)
+
+${lispsource}loaddefs.el: $(BOOTSTRAPEMACS)
+ cd ../lisp; $(MAKE) $(MFLAGS) autoloads EMACS=../src/bootstrap-emacs${EXEEXT}