/[gentoo-x86]/eclass/elisp-common.eclass
Gentoo

Diff of /eclass/elisp-common.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.83 Revision 1.84
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2013 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.83 2013/01/04 21:22:43 ulm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.84 2013/03/16 08:55:30 ulm Exp $
4# 4#
5# @ECLASS: elisp-common.eclass 5# @ECLASS: elisp-common.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Gentoo Emacs team <emacs@gentoo.org> 7# Gentoo Emacs team <emacs@gentoo.org>
8# @AUTHOR: 8# @AUTHOR:
48# here and simply takes the source files as arguments. The case of 48# here and simply takes the source files as arguments. The case of
49# interdependent elisp files is also supported, since the current 49# interdependent elisp files is also supported, since the current
50# directory is added to the load-path which makes sure that all files 50# directory is added to the load-path which makes sure that all files
51# are loadable. 51# are loadable.
52# 52#
53# elisp-compile *.el || die 53# elisp-compile *.el
54# 54#
55# Function elisp-make-autoload-file() can be used to generate a file 55# Function elisp-make-autoload-file() can be used to generate a file
56# with autoload definitions for the lisp functions. It takes the output 56# with autoload definitions for the lisp functions. It takes the output
57# file name (default: "${PN}-autoloads.el") and a list of directories 57# file name (default: "${PN}-autoloads.el") and a list of directories
58# (default: working directory) as its arguments. Use of this function 58# (default: working directory) as its arguments. Use of this function
68# of elisp-install(). The following parameters are the files to be put 68# of elisp-install(). The following parameters are the files to be put
69# in that directory. Usually the subdirectory should be ${PN}, you can 69# in that directory. Usually the subdirectory should be ${PN}, you can
70# choose something else, but remember to tell elisp-site-file-install() 70# choose something else, but remember to tell elisp-site-file-install()
71# (see below) the change, as it defaults to ${PN}. 71# (see below) the change, as it defaults to ${PN}.
72# 72#
73# elisp-install ${PN} *.el *.elc || die 73# elisp-install ${PN} *.el *.elc
74# 74#
75# To let the Emacs support be activated by Emacs on startup, you need 75# To let the Emacs support be activated by Emacs on startup, you need
76# to provide a site file (shipped in ${FILESDIR}) which contains the 76# to provide a site file (shipped in ${FILESDIR}) which contains the
77# startup code (have a look in the documentation of your software). 77# startup code (have a look in the documentation of your software).
78# Normally this would look like this: 78# Normally this would look like this:
110# 110#
111# SITEFILE="50${PN}-gentoo.el" 111# SITEFILE="50${PN}-gentoo.el"
112# 112#
113# Which is then installed by 113# Which is then installed by
114# 114#
115# elisp-site-file-install "${FILESDIR}/${SITEFILE}" || die 115# elisp-site-file-install "${FILESDIR}/${SITEFILE}"
116# 116#
117# in src_install(). Any characters after the "-gentoo" part and before 117# in src_install(). Any characters after the "-gentoo" part and before
118# the extension will be stripped from the destination file's name. 118# the extension will be stripped from the destination file's name.
119# For example, a file "50${PN}-gentoo-${PV}.el" will be installed as 119# For example, a file "50${PN}-gentoo-${PV}.el" will be installed as
120# "50${PN}-gentoo.el". If your subdirectory is not named ${PN}, give 120# "50${PN}-gentoo.el". If your subdirectory is not named ${PN}, give
166# @DESCRIPTION: 166# @DESCRIPTION:
167# Emacs flags used for byte-compilation in elisp-compile(). 167# Emacs flags used for byte-compilation in elisp-compile().
168BYTECOMPFLAGS="-L ." 168BYTECOMPFLAGS="-L ."
169 169
170# @FUNCTION: elisp-emacs-version 170# @FUNCTION: elisp-emacs-version
171# @RETURN: exit status of Emacs
171# @DESCRIPTION: 172# @DESCRIPTION:
172# Output version of currently active Emacs. 173# Output version of currently active Emacs.
173 174
174elisp-emacs-version() { 175elisp-emacs-version() {
175 local ret 176 local ret
221# in case they require or load one another. 222# in case they require or load one another.
222 223
223elisp-compile() { 224elisp-compile() {
224 ebegin "Compiling GNU Emacs Elisp files" 225 ebegin "Compiling GNU Emacs Elisp files"
225 ${EMACS} ${EMACSFLAGS} ${BYTECOMPFLAGS} -f batch-byte-compile "$@" 226 ${EMACS} ${EMACSFLAGS} ${BYTECOMPFLAGS} -f batch-byte-compile "$@"
226 eend $? "elisp-compile: batch-byte-compile failed" 227 eend $? "elisp-compile: batch-byte-compile failed" || die
227} 228}
228 229
229# @FUNCTION: elisp-make-autoload-file 230# @FUNCTION: elisp-make-autoload-file
230# @USAGE: [output file] [list of directories] 231# @USAGE: [output file] [list of directories]
231# @DESCRIPTION: 232# @DESCRIPTION:
257 ${EMACS} ${EMACSFLAGS} \ 258 ${EMACS} ${EMACSFLAGS} \
258 --eval "(setq make-backup-files nil)" \ 259 --eval "(setq make-backup-files nil)" \
259 --eval "(setq generated-autoload-file (expand-file-name \"${f}\"))" \ 260 --eval "(setq generated-autoload-file (expand-file-name \"${f}\"))" \
260 -f batch-update-autoloads "${@-.}" 261 -f batch-update-autoloads "${@-.}"
261 262
262 eend $? "elisp-make-autoload-file: batch-update-autoloads failed" 263 eend $? "elisp-make-autoload-file: batch-update-autoloads failed" || die
263} 264}
264 265
265# @FUNCTION: elisp-install 266# @FUNCTION: elisp-install
266# @USAGE: <subdirectory> <list of files> 267# @USAGE: <subdirectory> <list of files>
267# @DESCRIPTION: 268# @DESCRIPTION:
273 ebegin "Installing Elisp files for GNU Emacs support" 274 ebegin "Installing Elisp files for GNU Emacs support"
274 ( # subshell to avoid pollution of calling environment 275 ( # subshell to avoid pollution of calling environment
275 insinto "${SITELISP}/${subdir}" 276 insinto "${SITELISP}/${subdir}"
276 doins "$@" 277 doins "$@"
277 ) 278 )
278 eend $? "elisp-install: doins failed" 279 eend $? "elisp-install: doins failed" || die
279} 280}
280 281
281# @FUNCTION: elisp-site-file-install 282# @FUNCTION: elisp-site-file-install
282# @USAGE: <site-init file> [subdirectory] 283# @USAGE: <site-init file> [subdirectory]
283# @DESCRIPTION: 284# @DESCRIPTION:
303 insinto "${SITELISP}/site-gentoo.d" 304 insinto "${SITELISP}/site-gentoo.d"
304 doins "${sf}" 305 doins "${sf}"
305 ) 306 )
306 ret=$? 307 ret=$?
307 rm -f "${sf}" 308 rm -f "${sf}"
308 eend ${ret} "elisp-site-file-install: doins failed" 309 eend ${ret} "elisp-site-file-install: doins failed" || die
309} 310}
310 311
311# @FUNCTION: elisp-site-regen 312# @FUNCTION: elisp-site-regen
312# @DESCRIPTION: 313# @DESCRIPTION:
313# Regenerate the site-gentoo.el file, based on packages' site 314# Regenerate the site-gentoo.el file, based on packages' site

Legend:
Removed from v.1.83  
changed lines
  Added in v.1.84

  ViewVC Help
Powered by ViewVC 1.1.20