annotate build-aux/elisp-comp @ 9080:9bcf14d7e570

autoupdate
author Karl Berry <karl@freefriends.org>
date Sun, 08 Jul 2007 12:51:58 +0000
parents c49e5940a04f
children 4bd575733685
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7196
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
1 #!/bin/sh
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
2 # Copyright (C) 1995, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
3
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
4 scriptversion=2005-05-14.22
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
5
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
6 # Franc,ois Pinard <pinard@iro.umontreal.ca>, 1995.
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
7 #
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
8 # This program is free software; you can redistribute it and/or modify
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
9 # it under the terms of the GNU General Public License as published by
9080
9bcf14d7e570 autoupdate
Karl Berry <karl@freefriends.org>
parents: 7196
diff changeset
10 # the Free Software Foundation; either version 3, or (at your option)
7196
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
11 # any later version.
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
12 #
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
13 # This program is distributed in the hope that it will be useful,
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
16 # GNU General Public License for more details.
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
17 #
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
18 # You should have received a copy of the GNU General Public License
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
19 # along with this program; if not, write to the Free Software
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
20 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
21
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
22 # As a special exception to the GNU General Public License, if you
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
23 # distribute this file as part of a program that contains a
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
24 # configuration script generated by Autoconf, you may include it under
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
25 # the same distribution terms that you use for the rest of that program.
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
26
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
27 # This file is maintained in Automake, please report
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
28 # bugs to <bug-automake@gnu.org> or send patches to
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
29 # <automake-patches@gnu.org>.
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
30
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
31 case $1 in
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
32 '')
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
33 echo "$0: No files. Try \`$0 --help' for more information." 1>&2
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
34 exit 1;
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
35 ;;
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
36 -h | --h*)
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
37 cat <<\EOF
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
38 Usage: elisp-comp [--help] [--version] FILES...
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
39
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
40 This script byte-compiles all `.el' files listed as FILES using GNU
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
41 Emacs, and put the resulting `.elc' files into the current directory,
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
42 so disregarding the original directories used in `.el' arguments.
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
43
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
44 This script manages in such a way that all Emacs LISP files to
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
45 be compiled are made visible between themselves, in the event
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
46 they require or load-library one another.
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
47
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
48 Report bugs to <bug-automake@gnu.org>.
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
49 EOF
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
50 exit $?
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
51 ;;
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
52 -v | --v*)
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
53 echo "elisp-comp $scriptversion"
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
54 exit $?
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
55 ;;
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
56 esac
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
57
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
58 if test -z "$EMACS" || test "$EMACS" = "t"; then
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
59 # Value of "t" means we are running in a shell under Emacs.
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
60 # Just assume Emacs is called "emacs".
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
61 EMACS=emacs
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
62 fi
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
63
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
64 tempdir=elc.$$
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
65
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
66 # Cleanup the temporary directory on exit.
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
67 trap 'ret=$?; rm -rf "$tempdir" && exit $ret' 0
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
68 trap '(exit $?); exit' 1 2 13 15
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
69
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
70 mkdir $tempdir
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
71 cp "$@" $tempdir
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
72
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
73 (
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
74 cd $tempdir
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
75 echo "(setq load-path (cons nil load-path))" > script
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
76 $EMACS -batch -q -l script -f batch-byte-compile *.el || exit $?
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
77 mv *.elc ..
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
78 ) || exit $?
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
79
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
80 (exit 0); exit 0
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
81
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
82 # Local Variables:
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
83 # mode: shell-script
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
84 # sh-indentation: 2
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
85 # eval: (add-hook 'write-file-hooks 'time-stamp)
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
86 # time-stamp-start: "scriptversion="
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
87 # time-stamp-format: "%:y-%02m-%02d.%02H"
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
88 # time-stamp-end: "$"
c49e5940a04f * MODULES.html.sh (Support for building libraries and executables):
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
89 # End: