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