automake: Emacs Lisp

1 
1 10.1 Emacs Lisp
1 ===============
1 
1 Automake provides some support for Emacs Lisp.  The ‘LISP’ primary is
1 used to hold a list of ‘.el’ files.  Possible prefixes for this primary
1 are ‘lisp_’ and ‘noinst_’.  Note that if ‘lisp_LISP’ is defined, then
1 ‘configure.ac’ must run ‘AM_PATH_LISPDIR’ (⇒Macros).
1 
1    Lisp sources are not distributed by default.  You can prefix the
1 ‘LISP’ primary with ‘dist_’, as in ‘dist_lisp_LISP’ or
1 ‘dist_noinst_LISP’, to indicate that these files should be distributed.
1 
1    Automake will byte-compile all Emacs Lisp source files using the
1 Emacs found by ‘AM_PATH_LISPDIR’, if any was found.  When performing
1 such byte-compilation, the flags specified in the (developer-reserved)
1 ‘AM_ELCFLAGS’ and (user-reserved) ‘ELCFLAGS’ make variables will be
1 passed to the Emacs invocation.
1 
1    Byte-compiled Emacs Lisp files are not portable among all versions of
1 Emacs, so it makes sense to turn this off if you expect sites to have
1 more than one version of Emacs installed.  Furthermore, many packages
1 don’t actually benefit from byte-compilation.  Still, we recommend that
1 you byte-compile your Emacs Lisp sources.  It is probably better for
1 sites with strange setups to cope for themselves than to make the
1 installation less nice for everybody else.
1 
1    There are two ways to avoid byte-compiling.  Historically, we have
1 recommended the following construct.
1 
1      lisp_LISP = file1.el file2.el
1      ELCFILES =
1 
1 ‘ELCFILES’ is an internal Automake variable that normally lists all
1 ‘.elc’ files that must be byte-compiled.  Automake defines ‘ELCFILES’
1 automatically from ‘lisp_LISP’.  Emptying this variable explicitly
1 prevents byte-compilation.
1 
1    Since Automake 1.8, we now recommend using ‘lisp_DATA’ instead:
1 
1      lisp_DATA = file1.el file2.el
1 
1    Note that these two constructs are not equivalent.  ‘_LISP’ will not
1 install a file if Emacs is not installed, while ‘_DATA’ will always
1 install its files.
1