/[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.48 Revision 1.49
1# Copyright 1999-2008 Gentoo Foundation 1# Copyright 1999-2008 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.48 2008/10/05 13:56:08 ulm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.49 2008/10/12 19:48:21 ulm Exp $
4# 4#
5# Copyright 2002-2004 Matthew Kennedy <mkennedy@gentoo.org> 5# Copyright 2002-2004 Matthew Kennedy <mkennedy@gentoo.org>
6# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com> 6# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com>
7# Copyright 2004-2005 Mamoru Komachi <usata@gentoo.org> 7# Copyright 2004-2005 Mamoru Komachi <usata@gentoo.org>
8# Copyright 2007-2008 Christian Faulhammer <opfer@gentoo.org> 8# Copyright 2007-2008 Christian Faulhammer <opfer@gentoo.org>
172# they require or load one another. 172# they require or load one another.
173 173
174elisp-compile() { 174elisp-compile() {
175 ebegin "Compiling GNU Emacs Elisp files" 175 ebegin "Compiling GNU Emacs Elisp files"
176 ${EMACS} ${EMACSFLAGS} ${BYTECOMPFLAGS} -f batch-byte-compile "$@" 176 ${EMACS} ${EMACSFLAGS} ${BYTECOMPFLAGS} -f batch-byte-compile "$@"
177 eend $? "batch-byte-compile failed" 177 eend $? "elisp-compile: batch-byte-compile failed"
178} 178}
179 179
180# #FUNCTION: elisp-comp 180# #FUNCTION: elisp-comp
181# #USAGE: <list of elisp files> 181# #USAGE: <list of elisp files>
182# #DESCRIPTION: 182# #DESCRIPTION:
217 mv *.elc .. 217 mv *.elc ..
218 218
219 popd 219 popd
220 rm -fr ${tempdir} 220 rm -fr ${tempdir}
221 221
222 eend ${ret} "batch-byte-compile failed" 222 eend ${ret} "elisp-comp: batch-byte-compile failed"
223 return ${ret}
224} 223}
225 224
226# @FUNCTION: elisp-emacs-version 225# @FUNCTION: elisp-emacs-version
227# @DESCRIPTION: 226# @DESCRIPTION:
228# Output version of currently active Emacs. 227# Output version of currently active Emacs.
264 ${EMACS} ${EMACSFLAGS} \ 263 ${EMACS} ${EMACSFLAGS} \
265 --eval "(setq make-backup-files nil)" \ 264 --eval "(setq make-backup-files nil)" \
266 --eval "(setq generated-autoload-file (expand-file-name \"${f}\"))" \ 265 --eval "(setq generated-autoload-file (expand-file-name \"${f}\"))" \
267 -f batch-update-autoloads "${@-.}" 266 -f batch-update-autoloads "${@-.}"
268 267
269 eend $? "batch-update-autoloads failed" 268 eend $? "elisp-make-autoload-file: batch-update-autoloads failed"
270} 269}
271 270
272# @FUNCTION: elisp-install 271# @FUNCTION: elisp-install
273# @USAGE: <subdirectory> <list of files> 272# @USAGE: <subdirectory> <list of files>
274# @DESCRIPTION: 273# @DESCRIPTION:
280 ebegin "Installing Elisp files for GNU Emacs support" 279 ebegin "Installing Elisp files for GNU Emacs support"
281 ( # subshell to avoid pollution of calling environment 280 ( # subshell to avoid pollution of calling environment
282 insinto "${SITELISP}/${subdir}" 281 insinto "${SITELISP}/${subdir}"
283 doins "$@" 282 doins "$@"
284 ) 283 )
285 eend $? "doins failed" 284 eend $? "elisp-install: doins failed"
286} 285}
287 286
288# @FUNCTION: elisp-site-file-install 287# @FUNCTION: elisp-site-file-install
289# @USAGE: <site-init file> [subdirectory] 288# @USAGE: <site-init file> [subdirectory]
290# @DESCRIPTION: 289# @DESCRIPTION:
300 insinto "${SITELISP}/site-gentoo.d" 299 insinto "${SITELISP}/site-gentoo.d"
301 doins "${sf}" 300 doins "${sf}"
302 ) 301 )
303 ret=$? 302 ret=$?
304 rm -f "${sf}" 303 rm -f "${sf}"
305 eend ${ret} "doins failed" 304 eend ${ret} "elisp-site-file-install: doins failed"
306} 305}
307 306
308# @FUNCTION: elisp-site-regen 307# @FUNCTION: elisp-site-regen
309# @DESCRIPTION: 308# @DESCRIPTION:
310# Regenerate the site-gentoo.el file, based on packages' site initialisation 309# Regenerate the site-gentoo.el file, based on packages' site initialisation
319 local -a sflist 318 local -a sflist
320 # Work around Paludis borkage: variable T is empty in pkg_postrm 319 # Work around Paludis borkage: variable T is empty in pkg_postrm
321 local tmpdir=${T:-$(mktemp -d)} 320 local tmpdir=${T:-$(mktemp -d)}
322 321
323 if [ ! -d "${ROOT}${SITELISP}" ]; then 322 if [ ! -d "${ROOT}${SITELISP}" ]; then
324 eerror "Directory ${SITELISP} does not exist" 323 eerror "elisp-site-regen: Directory ${SITELISP} does not exist"
325 return 1 324 return 1
326 fi 325 fi
327 326
328 [ -e "${ROOT}${SITELISP}"/site-gentoo.el ] || firstrun=t 327 [ -e "${ROOT}${SITELISP}"/site-gentoo.el ] || firstrun=t
329 328

Legend:
Removed from v.1.48  
changed lines
  Added in v.1.49

  ViewVC Help
Powered by ViewVC 1.1.20