esac; \
done
+# `compile-main' tends to be slower than `recompile' but can be parallelized
+# with "make -j" and results in more deterministic compilation warnings.
+all: compile-main
+
doit:
-$(lisp)/cus-load.el:
- touch $@
-# Note that custom-deps and finder-data depend on autoloads rather
-# than on loaddefs.el, so that autoloads does not run in parallel with
-# them under "make -j", because that could delete loaddefs.el from
-# under their feet.
-custom-deps: $(emacs-deps) autoloads $(lisp)/cus-load.el doit
+# custom-deps and finder-data both used to scan _all_ the *.el files.
+# Now they avoid auto-generated files, which should avoid this
+# historical problem:
+# In parallel builds, they should not run at the same time as anything
+# else that might modify any .el files, eg autoloads (or each other).
+# One solution was to add autoloads as a prerequisite:
+# http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-01/msg00469.html
+# http://lists.gnu.org/archive/html/bug-gnu-emacs/2007-12/msg00171.html
+# However, this means that running these targets modifies loaddefs.el,
+# every time (due to time-stamping). Calling these rules from
+# bootstrap-after would modify loaddefs after src/emacs, resulting
+# in make install remaking src/emacs for no real reason:
+# http://lists.gnu.org/archive/html/emacs-devel/2008-02/msg00311.html
+custom-deps: $(emacs-deps) doit
wd=$(lisp); $(setwins_almost); \
echo Directories: $$wins; \
$(emacs) -l cus-dep --eval '(setq generated-custom-dependencies-file "$(lisp)/cus-load.el")' -f custom-make-dependencies $$wins
-finder-data: $(emacs-deps) autoloads doit
+finder-data: $(emacs-deps) doit
wd=$(lisp); $(setwins_almost); \
echo Directories: $$wins; \
$(emacs) -l finder --eval '(setq generated-finder-keywords-file "$(lisp)/finder-inf.el")' -f finder-compile-keywords-make-dist $$wins
$(lisp)/gnus/nngateway.elc \
$(lisp)/gnus/nnheader.elc \
$(lisp)/gnus/nnimap.elc \
+ $(lisp)/gnus/nnir.elc \
$(lisp)/gnus/nnkiboze.elc \
$(lisp)/gnus/nnlistserv.elc \
$(lisp)/gnus/nnmail.elc \
$(lisp)/net/ldap.elc \
$(lisp)/net/net-utils.elc \
$(lisp)/net/netrc.elc \
+ $(lisp)/net/newst-backend.elc \
+ $(lisp)/net/newst-plainview.elc \
+ $(lisp)/net/newst-reader.elc \
+ $(lisp)/net/newst-ticker.elc \
+ $(lisp)/net/newst-treeview.elc \
$(lisp)/net/newsticker.elc \
$(lisp)/net/ntlm.elc \
$(lisp)/net/quickurl.elc \
$(lisp)/org/org-export-latex.elc \
$(lisp)/org/org-faces.elc \
$(lisp)/org/org-gnus.elc \
+ $(lisp)/org/org-id.elc \
$(lisp)/org/org-info.elc \
$(lisp)/org/org-irc.elc \
$(lisp)/org/org-jsinfo.elc \
# date. Some .el files don't get compiled because they set the
# local variable no-byte-compile.
# Calling make recursively because suffix rule cannot have prerequisites.
+# Explicitly pass EMACS (sometimes ../src/bootstrap-emacs) to those
+# sub-makes that run rules that use it, for the sake of some non-GNU makes.
compile: $(emacs-deps) $(LOADDEFS) autoloads compile-first
- $(MAKE) $(MFLAGS) compile-main
- $(MAKE) $(MFLAGS) compile-last
+ $(MAKE) $(MFLAGS) compile-main EMACS=$(EMACS)
+ $(MAKE) $(MFLAGS) compile-last EMACS=$(EMACS)
+
+## Doing this causes make install to dump another emacs.
+# $(MAKE) $(MFLAGS) update-elclist
# Compile all Lisp files. This is like `compile' but compiles files
# unconditionally. Some files don't actually get compiled because they
# set the local variable no-byte-compile.
compile-always: doit
cd $(lisp); rm -f *.elc */*.elc
- $(MAKE) $(MFLAGS) compile
+ $(MAKE) $(MFLAGS) compile EMACS=$(EMACS)
## In case any files are missing from ELCFILES.
compile-last:
$(lisp)/progmodes/cc-mode.el \
$(lisp)/progmodes/cc-langs.el \
$(lisp)/progmodes/cc-defs.el
- $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $@
+ $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $<
# Update MH-E internal autoloads. These are not to be confused with
# the autoloads for the MH-E entry points, which are already in loaddefs.el.
# local changes. (Because loaddefs.el is an automatically generated
# file, we don't want to store it in the source repository).
-bootstrap-prepare:
- if test -x $(EMACS); then \
- $(MAKE) $(MFLAGS) autoloads; \
- fi
-
autogen-clean:
cd $(lisp); rm -f $(AUTOGENEL)
-maintainer-clean: distclean bootstrap-clean autogen-clean
+maintainer-clean: distclean bootstrap-clean
-## NB note that this rules assume only one level of subdirs below lisp/.
-## If nested subdirs are added, it's probably time to switch to:
-## find $(lisp) -name "*.elc" -exec rm -f '{}' ';'
-bootstrap-clean:
+bootstrap-clean: autogen-clean
cd $(lisp); rm -f *.elc */*.elc
# Generate/update files for the bootstrap process.
# Generate/update files after the bootstrap process.
# custom-deps needs `preloaded-file-list'.
-bootstrap-after: finder-data custom-deps update-elclist
+bootstrap-after: finder-data custom-deps
distclean:
-rm -f ./Makefile