elisp: use suffix rules, get rid of 'elisp-comp' script (mostly a rewrite)
authorJack Kelly <jack@jackkelly.name>
Sat, 14 Jul 2012 11:52:43 +0000 (21:52 +1000)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 14 Jul 2012 21:47:01 +0000 (23:47 +0200)
commit226be35fe1dad069485d9fa45c3fc3389f3e92a2
treefd7c517772c80f1fc98c3eb92d6fd7cf9f25a066
parent9bed1c1024afc2ddf5b3fb719b8320fa16ad18df
elisp: use suffix rules, get rid of 'elisp-comp' script (mostly a rewrite)

Motivated by automake bug#11806.

Traditionally, automake byte-compiled emacs-lisp '.el' files by invoking
'elisp-comp' on all of them in a bulk; this involved complex timestamping
and file-locking logic.  It was also brittle in any slightly-unusual
setup, because 'elisp-comp' operated by copying all of the elisp files
to be compiled into a temporary sub-directory and compiling them in there,
the copying the resulting byte-compile files back in the build directory.

This patch removes all of that juggling and chicanery in favour of
defining a much simpler '.el.elc' suffix rule.  Not only this is simpler,
but it also interacts better with "make -jN" calls, which are becoming
more and more common and useful on today's increasingly multicore systems.

* Makefile.am (dist_script_DATA): Remove 'elisp-comp'.
* automake.in (@common_files): Likewise.
(handle_emacs_lisp): Do not require 'elisp-comp'.
* doc/automake.texi: Remove references to 'elisp-comp'.
* lib/am/lisp.am: Define elisp compilation via a suffix rule; this
basically amounts to a complete re-write of the lisp byte-compilation
rules.
* lib/elisp-comp: Remove.
* t/add-missing.tap: Remove elisp-comp test.
* t/dist-auxdir-many-subdirs.sh: Remove reference to elisp-comp.
* t/primary-prefix-invalid-couples.tap: Likewise.
* t/primary-prefix-valid-couples.sh: Likewise.
* t/lisp4.sh: Remove reference to elc-stamp.
* t/lisp5.sh: Likewise.
* t/lisp6.sh: Likewise.
* t/lisp3.sh: Likewise.  Also remove the recompilation check that
involves a (message) call.
* t/lisp7.sh: Remove check for "Warnings can be ignored".  Remove
reference to elc-stamp.
* t/lisp8.sh: Likewise.
* t/lispdry.sh: Remove references to elc-stamp.

Acked-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
16 files changed:
Makefile.am
automake.in
doc/automake.texi
lib/am/lisp.am
lib/elisp-comp [deleted file]
t/add-missing.tap
t/dist-auxdir-many-subdirs.sh
t/lisp3.sh
t/lisp4.sh
t/lisp5.sh
t/lisp6.sh
t/lisp7.sh
t/lisp8.sh
t/lispdry.sh
t/primary-prefix-invalid-couples.tap
t/primary-prefix-valid-couples.sh