/[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.2 Revision 1.3
1# Copyright 1999-2003 Gentoo Technologies, Inc. 1# Copyright 1999-2003 Gentoo Technologies, Inc.
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.2 2003/10/06 06:38:33 mkennedy Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.3 2003/11/03 10:01:22 mkennedy Exp $
4# 4#
5# Copyright 2002-2003 Matthew Kennedy <mkennedy@gentoo.org> 5# Copyright 2002-2003 Matthew Kennedy <mkennedy@gentoo.org>
6# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com> 6# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com>
7# 7#
8# This is not an eclass, but it does provide emacs-related 8# This is not an eclass, but it does provide emacs-related
52 cat $sf >>${SITELISP}/site-start.el 52 cat $sf >>${SITELISP}/site-start.el
53 done 53 done
54 einfo "" 54 einfo ""
55} 55}
56 56
57# The following Emacs Lisp compilation routine is taken from GNU
58# autotools.
59
60elisp-comp() {
61# Copyright 1995 Free Software Foundation, Inc.
62# François Pinard <pinard@iro.umontreal.ca>, 1995.
63#
64# This program is free software; you can redistribute it and/or modify
65# it under the terms of the GNU General Public License as published by
66# the Free Software Foundation; either version 2, or (at your option)
67# any later version.
68#
69# This program is distributed in the hope that it will be useful,
70# but WITHOUT ANY WARRANTY; without even the implied warranty of
71# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
72# GNU General Public License for more details.
73#
74# You should have received a copy of the GNU General Public License
75# along with this program; if not, write to the Free Software
76# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
77
78# As a special exception to the GNU General Public License, if you
79# distribute this file as part of a program that contains a
80# configuration script generated by Autoconf, you may include it under
81# the same distribution terms that you use for the rest of that program.
82
83# This script byte-compiles all `.el' files which are part of its
84# arguments, using GNU Emacs, and put the resulting `.elc' files into
85# the current directory, so disregarding the original directories used
86# in `.el' arguments.
87#
88# This script manages in such a way that all Emacs LISP files to
89# be compiled are made visible between themselves, in the event
90# they require or load-library one another.
91
92 if test $# = 0; then
93 echo 1>&2 "No files given to $0"
94 exit 1
95 else
96 if test -z "$EMACS" || test "$EMACS" = "t"; then
97 # Value of "t" means we are running in a shell under Emacs.
98 # Just assume Emacs is called "emacs".
99 EMACS=emacs
100 fi
101
102 tempdir=elc.$$
103 mkdir $tempdir
104 cp $* $tempdir
105 cd $tempdir
106
107 echo "(add-to-list 'load-path \"../\")" > script
108 $EMACS -batch -q --no-site-file --no-init-file -l script -f batch-byte-compile *.el
109 mv *.elc ..
110
111 cd ..
112 rm -fr $tempdir
113 fi
114}
115
57# Local Variables: *** 116# Local Variables: ***
58# mode: shell-script *** 117# mode: shell-script ***
59# tab-width: 4 *** 118# tab-width: 4 ***
60# indent-tabs-mode: t *** 119# indent-tabs-mode: t ***
61# End: *** 120# End: ***

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.20