Lines 33-47
Link Here
|
33 |
# src_compile() usage: |
33 |
# src_compile() usage: |
34 |
# |
34 |
# |
35 |
# An elisp file is compiled by the elisp-compile() function defined here and |
35 |
# An elisp file is compiled by the elisp-compile() function defined here and |
36 |
# simply takes the source files as arguments. |
36 |
# simply takes the source files as arguments. The case of interdependent |
|
|
37 |
# elisp files is also supported, since the current directory is added to the |
38 |
# load-path which makes sure that all files are loadable. |
37 |
# |
39 |
# |
38 |
# elisp-compile *.el || die "elisp-compile failed" |
40 |
# elisp-compile *.el || die "elisp-compile failed" |
39 |
# |
41 |
# |
40 |
# In the case of interdependent elisp files, you can use the elisp-comp() |
42 |
# Formerly, function elisp-comp() was used for compilation of interdependent |
41 |
# function which makes sure all files are loadable. |
43 |
# elisp files. This usage is considered as obsolete. |
42 |
# |
44 |
# |
43 |
# elisp-comp *.el || die "elisp-comp failed" |
|
|
44 |
# |
45 |
# Function elisp-make-autoload-file() can be used to generate a file with |
45 |
# Function elisp-make-autoload-file() can be used to generate a file with |
46 |
# autoload definitions for the lisp functions. It takes the output file name |
46 |
# autoload definitions for the lisp functions. It takes the output file name |
47 |
# (default: "${PN}-autoloads.el") and a list of directories (default: working |
47 |
# (default: "${PN}-autoloads.el") and a list of directories (default: working |
Lines 148-157
Link Here
|
148 |
# @USAGE: <list of elisp files> |
148 |
# @USAGE: <list of elisp files> |
149 |
# @DESCRIPTION: |
149 |
# @DESCRIPTION: |
150 |
# Byte-compile Emacs Lisp files. |
150 |
# Byte-compile Emacs Lisp files. |
|
|
151 |
# |
152 |
# This function uses GNU Emacs to byte-compile all ".el" specified by its |
153 |
# arguments. The resulting byte-code (".elc") files are placed in the same |
154 |
# directory as their corresponding source file. |
155 |
# |
156 |
# The current directory is added to the load-path. This will ensure that |
157 |
# interdependent Emacs Lisp files are visible between themselves, in case they |
158 |
# require or load one another. |
151 |
|
159 |
|
152 |
elisp-compile() { |
160 |
elisp-compile() { |
153 |
ebegin "Compiling GNU Emacs Elisp files" |
161 |
ebegin "Compiling GNU Emacs Elisp files" |
154 |
${EMACS} ${EMACSFLAGS} -f batch-byte-compile "$@" |
162 |
${EMACS} ${EMACSFLAGS} -L . -f batch-byte-compile "$@" |
155 |
eend $? "batch-byte-compile failed" |
163 |
eend $? "batch-byte-compile failed" |
156 |
} |
164 |
} |
157 |
|
165 |
|