annotate lib-src/update-autoloads.sh @ 392:1f50e6fe4f3f r21-2-11

Import from CVS: tag r21-2-11
author cvs
date Mon, 13 Aug 2007 11:10:50 +0200
parents cc15677e0335
children 74fd4e045ea6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 #!/bin/sh
80
1ce6082ce73f Import from CVS: tag r20-0b90
cvs
parents: 78
diff changeset
2 ### update-autoloads.sh --- update auto-autoloads.el as necessary
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
4 # Author: Jamie Zawinski, Ben Wing, Martin Buchholz, Steve Baur
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
5 # Maintainer: Steve Baur
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
6 # Keywords: internal
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
7
181
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
8 # This file is part of XEmacs.
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
9
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
10 # XEmacs is free software; you can redistribute it and/or modify it
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
11 # under the terms of the GNU General Public License as published by
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
12 # the Free Software Foundation; either version 2, or (at your option)
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
13 # any later version.
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
14
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
15 # XEmacs is distributed in the hope that it will be useful, but
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
16 # WITHOUT ANY WARRANTY; without even the implied warranty of
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
18 # General Public License for more details.
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
19
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
20 # You should have received a copy of the GNU General Public License
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
21 # along with XEmacs; see the file COPYING. If not, write to
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
22 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents: 177
diff changeset
23 # Boston, MA 02111-1307, USA.
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
24
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
25 ### Commentary:
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
26
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
27 ### Code:
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
28
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 set -eu
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 # This means we're running in a Sun workspace
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 12
diff changeset
32 test -d ../era-specific && cd ../editor
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 # get to the right directory
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 12
diff changeset
35 test ! -d ./lisp -a -d ../lisp && cd ..
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 12
diff changeset
36 if test ! -d ./lisp ; then
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
37 echo $0: neither ./lisp/ nor ../lisp/ exist
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
38 exit 1
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 fi
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40
280
7df0dd720c89 Import from CVS: tag r21-0b38
cvs
parents: 276
diff changeset
41 test -z "$EMACS" && EMACS="./src/xemacs"
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 echo " (using $EMACS)"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 export EMACS
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45
392
1f50e6fe4f3f Import from CVS: tag r21-2-11
cvs
parents: 371
diff changeset
46 EMACS_DIR=`cd \`dirname $EMACS\` && pwd`;
1f50e6fe4f3f Import from CVS: tag r21-2-11
cvs
parents: 371
diff changeset
47 CANON_PWD=`pwd`
1f50e6fe4f3f Import from CVS: tag r21-2-11
cvs
parents: 371
diff changeset
48 # Account for various system automounter configurations
1f50e6fe4f3f Import from CVS: tag r21-2-11
cvs
parents: 371
diff changeset
49 if test -d "/net"; then
1f50e6fe4f3f Import from CVS: tag r21-2-11
cvs
parents: 371
diff changeset
50 if test -d "/tmp_mnt/net"; then tdir="/tmp_mnt/net"; else tdir="/tmp_mnt"; fi
1f50e6fe4f3f Import from CVS: tag r21-2-11
cvs
parents: 371
diff changeset
51 EMACS_DIR=`echo "$EMACS_DIR" | \
1f50e6fe4f3f Import from CVS: tag r21-2-11
cvs
parents: 371
diff changeset
52 sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
1f50e6fe4f3f Import from CVS: tag r21-2-11
cvs
parents: 371
diff changeset
53 CANON_PWD=`echo "$CANON_PWD" | \
1f50e6fe4f3f Import from CVS: tag r21-2-11
cvs
parents: 371
diff changeset
54 sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
1f50e6fe4f3f Import from CVS: tag r21-2-11
cvs
parents: 371
diff changeset
55 fi
1f50e6fe4f3f Import from CVS: tag r21-2-11
cvs
parents: 371
diff changeset
56 REAL="$EMACS_DIR/`basename $EMACS`"
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57
392
1f50e6fe4f3f Import from CVS: tag r21-2-11
cvs
parents: 371
diff changeset
58 echo "Rebuilding autoloads in $CANON_PWD"
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 echo " with $REAL..."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
61 if [ "`uname -r | sed 's/\(.\).*/\1/'`" -gt 4 ]; then
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
62 echon()
392
1f50e6fe4f3f Import from CVS: tag r21-2-11
cvs
parents: 371
diff changeset
63 {
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
64 /bin/echo $* '\c'
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
65 }
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
66 else
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
67 echon()
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
68 {
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
69 echo -n $*
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
70 }
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
71 fi
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
72
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
73 # Compute patterns to ignore when searching for files
195
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents: 181
diff changeset
74 # These directories don't have autoloads or are partially broken.
207
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 201
diff changeset
75 ignore_dirs="egg eos ilisp its locale mel mu sunpro term tooltalk"
169
15872534500d Import from CVS: tag r20-3b11
cvs
parents: 167
diff changeset
76
15872534500d Import from CVS: tag r20-3b11
cvs
parents: 167
diff changeset
77 # Prepare for autoloading directories with directory-specific instructions
15872534500d Import from CVS: tag r20-3b11
cvs
parents: 167
diff changeset
78 make_special_commands=''
15872534500d Import from CVS: tag r20-3b11
cvs
parents: 167
diff changeset
79 make_special () {
15872534500d Import from CVS: tag r20-3b11
cvs
parents: 167
diff changeset
80 dir="$1"; shift;
15872534500d Import from CVS: tag r20-3b11
cvs
parents: 167
diff changeset
81 ignore_dirs="$ignore_dirs $dir"
15872534500d Import from CVS: tag r20-3b11
cvs
parents: 167
diff changeset
82 make_special_commands="$make_special_commands \
15872534500d Import from CVS: tag r20-3b11
cvs
parents: 167
diff changeset
83 (cd \"lisp/$dir\" && ${MAKE:-make} EMACS=$REAL ${1+$*});"
15872534500d Import from CVS: tag r20-3b11
cvs
parents: 167
diff changeset
84 }
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
85
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
86 # Only use Mule XEmacs to build Mule-specific autoloads & custom-loads.
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
87 echon "Checking for Mule support..."
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
88 lisp_prog='(princ (featurep (quote mule)))'
239
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 219
diff changeset
89 mule_p="`$EMACS -batch -q -no-site-file -eval \"$lisp_prog\"`"
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
90 if test "$mule_p" = nil ; then
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
91 echo No
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
92 ignore_dirs="$ignore_dirs mule leim language skk"
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
93 else
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
94 echo Yes
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
95 fi
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
96
177
6075d714658b Import from CVS: tag r20-3b15
cvs
parents: 171
diff changeset
97 ## AUCTeX is a Package now
6075d714658b Import from CVS: tag r20-3b15
cvs
parents: 171
diff changeset
98 # if test "$mule_p" = nil ; then
6075d714658b Import from CVS: tag r20-3b15
cvs
parents: 171
diff changeset
99 # make_special auctex autoloads
6075d714658b Import from CVS: tag r20-3b15
cvs
parents: 171
diff changeset
100 # else
6075d714658b Import from CVS: tag r20-3b15
cvs
parents: 171
diff changeset
101 # make_special auctex autoloads MULE_EL=tex-jp.elc
6075d714658b Import from CVS: tag r20-3b15
cvs
parents: 171
diff changeset
102 # fi
171
929b76928fce Import from CVS: tag r20-3b12
cvs
parents: 169
diff changeset
103 #make_special cc-mode autoloads
207
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 201
diff changeset
104 # EFS is now packaged
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 201
diff changeset
105 #make_special efs autoloads
169
15872534500d Import from CVS: tag r20-3b11
cvs
parents: 167
diff changeset
106 #make_special eos autoloads # EOS doesn't have custom or autoloads
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents: 207
diff changeset
107 # Hyperbole is now packaged
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents: 207
diff changeset
108 # make_special hyperbole autoloads
169
15872534500d Import from CVS: tag r20-3b11
cvs
parents: 167
diff changeset
109 # make_special ilisp autoloads
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents: 207
diff changeset
110 # oobr is now packaged
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents: 207
diff changeset
111 # make_special oobr HYPB_ELC='' autoloads
201
eb5470882647 Import from CVS: tag r20-3b27
cvs
parents: 195
diff changeset
112 ## W3 is a package now
eb5470882647 Import from CVS: tag r20-3b27
cvs
parents: 195
diff changeset
113 ##make_special w3 autoloads
169
15872534500d Import from CVS: tag r20-3b11
cvs
parents: 167
diff changeset
114
78
c7528f8e288d Import from CVS: tag r20-0b34
cvs
parents: 74
diff changeset
115 dirs=
163
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 151
diff changeset
116 for dir in lisp/*; do
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
117 if test -d $dir \
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
118 -a $dir != lisp/CVS \
169
15872534500d Import from CVS: tag r20-3b11
cvs
parents: 167
diff changeset
119 -a $dir != lisp/SCCS; then
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
120 for ignore in $ignore_dirs; do
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
121 if test $dir = lisp/$ignore; then
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
122 continue 2
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
123 fi
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
124 done
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
125 dirs="$dirs $dir"
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
126 fi
78
c7528f8e288d Import from CVS: tag r20-0b34
cvs
parents: 74
diff changeset
127 done
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
128
239
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 219
diff changeset
129 $EMACS -batch -q -no-site-file -eval '(setq autoload-package-name "Standard")' \
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents: 209
diff changeset
130 -l autoload -f batch-update-directory lisp
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents: 209
diff changeset
131
169
15872534500d Import from CVS: tag r20-3b11
cvs
parents: 167
diff changeset
132 # set -x
163
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 151
diff changeset
133 for dir in $dirs; do
239
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 219
diff changeset
134 $EMACS -batch -q -no-site-file -l autoload -f batch-update-directory $dir
163
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 151
diff changeset
135 done
169
15872534500d Import from CVS: tag r20-3b11
cvs
parents: 167
diff changeset
136
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents: 239
diff changeset
137 # eval "$make_special_commands"