File: emacsen.install

package info (click to toggle)
auctex 9.9j-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 1,248 kB
  • ctags: 767
  • sloc: lisp: 11,580; makefile: 290; sh: 223
file content (88 lines) | stat: -rw-r--r-- 3,258 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/bin/bash -e
#
# elisp install file for Debian auctex package.
# $Id: emacsen.install,v 1.15 1998/10/20 23:29:00 salve Exp $
#
# Copyright  Davide G. M. Salvetti <salve@debian.org>, 1998.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to: The Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
#
# On Debian GNU/Linux System you can find a copy of the GNU General Public
# License in /usr/doc/copyright/GPL.

set -o posix

PACKAGE=auctex
FLAVOR=$1
ELDIR=/usr/share/emacs/site-lisp/$PACKAGE/
ELCDIR=/usr/share/$FLAVOR/site-lisp/$PACKAGE/
LOG=CompilationLog
#-=-
SOURCES="auc-old.el tex.el tex-buf.el latex.el tex-info.el multi-prompt.el texmathp.el \
	 bib-cite.el font-latex.el"
MULESRC="tex-jp.el"
# This shouldn't compile without X, and we have font-latex.el anyway.
# XSRC="hilit-LaTeX.el"
STYLES="style/slides.el    style/foils.el    style/amstex.el \
	style/article.el   style/book.el     style/letter.el \
	style/report.el    style/amsart.el   style/amsbook.el \
	style/epsf.el      style/psfig.el    style/latexinfo.el \
	style/dutch.el     style/german.el   style/dk.el \
	style/j-article.el style/j-book.el   style/j-report.el \
	style/jarticle.el  style/jbook.el    style/jreport.el \
	style/dinbrief.el  style/virtex.el   style/plfonts.el \
	style/plhb.el      style/harvard.el	style/swedish.el \
	style/danish.el    style/slovak.el   style/czech.el \
	style/amsmath.el   style/amstext.el  style/amsbsy.el \
	style/amsopn.el    style/amsthm.el	style/natbib.el"
EFLAGS="-batch -q -l lpath.el -f batch-byte-compile"
EMULEFLAGS="-batch -q -l lpath-jp.el -f batch-byte-compile"
#-=-

case "$FLAVOR" in
    emacs19|emacs20)
	echo -n "install/$PACKAGE: Byte-compiling for $FLAVOR..."
	install -m 755 -d $ELCDIR $ELCDIR/style/
	for i in $SOURCES; do cp $ELDIR/$i $ELCDIR/$i; done
	for i in $STYLES; do cp $ELDIR/$i $ELCDIR/$i; done
	cat <<-EOF >$ELCDIR/lpath.el
		(setq load-path (cons "." load-path)
		    TeX-lisp-directory "<none>")
	EOF
	(cd $ELCDIR && $FLAVOR $EFLAGS $SOURCES $STYLES 2>&1 | gzip -9qf > $LOG.gz)
	if [ "$FLAVOR" = "emacs20" ]; then
		# We have MULE.
		for i in $MULESRC; do cp $ELDIR/$i $ELCDIR/$i; done
		# This contains an hack to allow byte-compiling with japanese multibyte chars
		cat <<-EOF >$ELCDIR/lpath-jp.el
			(setq load-path (cons "." load-path)
				TeX-lisp-directory "<none>")
			(set-language-environment 'Japanese);') <- beauty stuff
		EOF
		(cd $ELCDIR && $FLAVOR $EMULEFLAGS $MULESRC 2>&1 | gzip -9qf >> $LOG.gz)
	fi
	rm $ELCDIR/*.el $ELCDIR/style/*.el
	echo "done."
    ;;
    *)
	echo "install/$PACKAGE: Ignoring emacsen flavor $FLAVOR."
    ;;
esac

exit 0

### Local Variables:
### mode: shell-script
### End: