diff options
author | Ulrich Müller <ulm@gentoo.org> | 2008-08-27 06:53:41 +0000 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2008-08-27 06:53:41 +0000 |
commit | 28486b276319cf8c6045111d74a3a1dfc4805f76 (patch) | |
tree | 0638df49a2eebb615aa210d490576daac99f2d42 /eclass/elisp-common.eclass | |
parent | Automated update of use.local.desc (diff) | |
download | historical-28486b276319cf8c6045111d74a3a1dfc4805f76.tar.gz historical-28486b276319cf8c6045111d74a3a1dfc4805f76.tar.bz2 historical-28486b276319cf8c6045111d74a3a1dfc4805f76.zip |
Sync eclasses from Emacs overlay (revision 1137).
elisp-common.eclass:
Add current directory to load-path in elisp-compile.
New variable BYTECOMPFLAGS.
Document EMACS and EMACSFLAGS as eclass variables.
Diffstat (limited to 'eclass/elisp-common.eclass')
-rw-r--r-- | eclass/elisp-common.eclass | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/eclass/elisp-common.eclass b/eclass/elisp-common.eclass index 4dc9ed3f277c..6111ab1c9cac 100644 --- a/eclass/elisp-common.eclass +++ b/eclass/elisp-common.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.42 2008/08/10 16:54:22 ulm Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.43 2008/08/27 06:53:41 ulm Exp $ # # Copyright 2002-2004 Matthew Kennedy <mkennedy@gentoo.org> # Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com> @@ -33,20 +33,20 @@ # src_compile() usage: # # An elisp file is compiled by the elisp-compile() function defined here and -# simply takes the source files as arguments. +# simply takes the source files as arguments. The case of interdependent +# elisp files is also supported, since the current directory is added to the +# load-path which makes sure that all files are loadable. # # elisp-compile *.el || die "elisp-compile failed" # -# In the case of interdependent elisp files, you can use the elisp-comp() -# function which makes sure all files are loadable. -# -# elisp-comp *.el || die "elisp-comp failed" +# Formerly, function elisp-comp() was used for compilation of interdependent +# elisp files. This usage is considered as obsolete. # # Function elisp-make-autoload-file() can be used to generate a file with # autoload definitions for the lisp functions. It takes the output file name # (default: "${PN}-autoloads.el") and a list of directories (default: working # directory) as its arguments. Use of this function requires that the elisp -# source files contain magic ";;;###autoload" comments. See the Emacs Lisp +# source files contain magic ";;;###autoload" comments. See the Emacs Lisp # Reference Manual (node "Autoload") for a detailed explanation. # # .SS @@ -140,18 +140,38 @@ SITEETC=/usr/share/emacs/etc # Name of package's site-init file. SITEFILE=50${PN}-gentoo.el +# @ECLASS-VARIABLE: EMACS +# @DESCRIPTION: +# Path of Emacs executable. EMACS=/usr/bin/emacs -# The following works for Emacs versions 18-23, don't change it. + +# @ECLASS-VARIABLE: EMACSFLAGS +# @DESCRIPTION: +# Flags for executing Emacs in batch mode. +# These work for Emacs versions 18-23, so don't change them. EMACSFLAGS="-batch -q --no-site-file" +# @ECLASS-VARIABLE: BYTECOMPFLAGS +# @DESCRIPTION: +# Emacs flags used for byte-compilation in elisp-compile(). +BYTECOMPFLAGS="-L ." + # @FUNCTION: elisp-compile # @USAGE: <list of elisp files> # @DESCRIPTION: # Byte-compile Emacs Lisp files. +# +# This function uses GNU Emacs to byte-compile all ".el" specified by its +# arguments. The resulting byte-code (".elc") files are placed in the same +# directory as their corresponding source file. +# +# The current directory is added to the load-path. This will ensure that +# interdependent Emacs Lisp files are visible between themselves, in case +# they require or load one another. elisp-compile() { ebegin "Compiling GNU Emacs Elisp files" - ${EMACS} ${EMACSFLAGS} -f batch-byte-compile "$@" + ${EMACS} ${EMACSFLAGS} ${BYTECOMPFLAGS} -f batch-byte-compile "$@" eend $? "batch-byte-compile failed" } |