]> git.notmuchmail.org Git - notmuch/commit
emacs: Compute build dependencies to fix byte compile issues
authorAustin Clements <amdragon@MIT.EDU>
Fri, 17 May 2013 20:13:31 +0000 (16:13 -0400)
committerDavid Bremner <bremner@debian.org>
Thu, 23 May 2013 11:06:12 +0000 (08:06 -0300)
commit68720286ebc5bf53c2b89a3486b7fcd691443783
tree773dc338ba9358000f0b4e552633baa34c1f8ffe
parented9ef5dc5a281fd1a3a9bba235ef297f6496e24d
emacs: Compute build dependencies to fix byte compile issues

Previously, we simply byte compiled each Elisp source file
independently.  This is actually the wrong thing to do and can lead to
issues with macros and performance issues with substitutions because
1) when the byte compiler encounters a (require 'x) form, it will load
x.elc in preference to x.el, even if x.el is newer, and as a result
may load old macro and substitution definitions and 2) if we update a
macro or substitution definition in one file, we currently won't
re-compile other files that depend on the file containing the
definition.

This patch addresses these problems by computing make dependency rules
from the (require 'x) forms in the Elisp source files, which we inject
into make's dependency database.
emacs/Makefile.local
emacs/make-deps.el [new file with mode: 0644]