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

Contents of /eclass/elisp-common.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Mon Oct 6 06:38:33 2003 UTC (10 years, 9 months ago) by mkennedy
Branch: MAIN
Changes since 1.1: +8 -2 lines
added improvements and cleanups from Jeremy Maitin-Shepard
<jbms@attbi.com> bug 29698

1 # Copyright 1999-2003 Gentoo Technologies, Inc.
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /home/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.1 2003/09/21 01:40:41 mkennedy Exp $
4 #
5 # Copyright 2002-2003 Matthew Kennedy <mkennedy@gentoo.org>
6 # Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com>
7 #
8 # This is not an eclass, but it does provide emacs-related
9 # installation utilities.
10
11 ECLASS=elisp-common
12 INHERITED="$INHERITED $ECLASS"
13
14 SITELISP=/usr/share/emacs/site-lisp
15
16 elisp-compile() {
17 /usr/bin/emacs --batch -f batch-byte-compile --no-site-file --no-init-file $*
18 }
19
20 elisp-install() {
21 local subdir=$1
22 dodir ${SITELISP}/${subdir}
23 insinto ${SITELISP}/${subdir}
24 shift
25 doins $@
26 }
27
28 elisp-site-file-install() {
29 local sitefile=$1
30 pushd ${S}
31 cp ${sitefile} .
32 D=${S}/ dosed "s:@SITELISP@:${SITELISP}/${PN}:g" $(basename ${sitefile})
33 insinto ${SITELISP}
34 doins ${S}/$(basename ${sitefile})
35 popd
36 }
37
38 elisp-site-regen() {
39 einfo "Regenerating ${SITELISP}/site-start.el..."
40 einfo ""
41 cat <<EOF >${SITELISP}/site-start.el
42 ;;; DO NOT EDIT THIS FILE -- IT IS GENERATED AUTOMATICALLY BY PORTAGE
43 ;;; -----------------------------------------------------------------
44
45 EOF
46 ls ${SITELISP}/[0-9][0-9]* |sort -n |grep -vE '~$' | \
47 while read sf
48 do
49 einfo " Adding $sf..."
50 # Great for debugging, too noisy and slow for users though
51 # echo "(message \"Loading $sf...\")" >>${SITELISP}/site-start.el
52 cat $sf >>${SITELISP}/site-start.el
53 done
54 einfo ""
55 }
56
57 # Local Variables: ***
58 # mode: shell-script ***
59 # tab-width: 4 ***
60 # indent-tabs-mode: t ***
61 # End: ***

  ViewVC Help
Powered by ViewVC 1.1.20