|
|
# src_compile() usage: | # src_compile() usage: |
# | # |
# An elisp file is compiled by the elisp-compile() function defined here and | # 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" | # elisp-compile *.el || die "elisp-compile failed" |
# | # |
# In the case of interdependent elisp files, you can use the elisp-comp() |
# Formerly, function elisp-comp() was used for compilation of interdependent |
# function which makes sure all files are loadable. |
# elisp files. This usage is considered as obsolete. |
# | # |
# elisp-comp *.el || die "elisp-comp failed" |
|
# |
|
# Function elisp-make-autoload-file() can be used to generate a file with | # 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 | # autoload definitions for the lisp functions. It takes the output file name |
# (default: "${PN}-autoloads.el") and a list of directories (default: working | # (default: "${PN}-autoloads.el") and a list of directories (default: working |
|
|
# @USAGE: <list of elisp files> | # @USAGE: <list of elisp files> |
# @DESCRIPTION: | # @DESCRIPTION: |
# Byte-compile Emacs Lisp files. | # 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() { | elisp-compile() { |
ebegin "Compiling GNU Emacs Elisp files" | ebegin "Compiling GNU Emacs Elisp files" |
${EMACS} ${EMACSFLAGS} -f batch-byte-compile "$@" |
${EMACS} ${EMACSFLAGS} -L . -f batch-byte-compile "$@" |
eend $? "batch-byte-compile failed" | eend $? "batch-byte-compile failed" |
} | } |
| |