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
|
70
|
41 EMACS="./src/xemacs"
|
0
|
42 echo " (using $EMACS)"
|
|
43
|
|
44 export EMACS
|
|
45
|
|
46 REAL=`cd \`dirname $EMACS\` ; pwd | sed 's|^/tmp_mnt||'`/`basename $EMACS`
|
|
47
|
167
|
48 echo "Rebuilding autoloads/custom-loads in `pwd|sed 's|^/tmp_mnt||'`"
|
0
|
49 echo " with $REAL..."
|
|
50
|
167
|
51 if [ "`uname -r | sed 's/\(.\).*/\1/'`" -gt 4 ]; then
|
|
52 echon()
|
|
53 {
|
|
54 /bin/echo $* '\c'
|
|
55 }
|
|
56 else
|
|
57 echon()
|
|
58 {
|
|
59 echo -n $*
|
|
60 }
|
|
61 fi
|
|
62
|
|
63 # Compute patterns to ignore when searching for files
|
169
|
64 # These directories don't have autoloads and customizations, or are partially
|
|
65 # broken.
|
|
66 ignore_dirs="cl egg eos ilisp its language locale mel mu sunpro term tooltalk"
|
|
67
|
|
68 # Prepare for autoloading directories with directory-specific instructions
|
|
69 make_special_commands=''
|
|
70 make_special () {
|
|
71 dir="$1"; shift;
|
|
72 ignore_dirs="$ignore_dirs $dir"
|
|
73 make_special_commands="$make_special_commands \
|
|
74 (cd \"lisp/$dir\" && ${MAKE:-make} EMACS=$REAL ${1+$*});"
|
|
75 }
|
167
|
76
|
|
77 # Only use Mule XEmacs to build Mule-specific autoloads & custom-loads.
|
|
78 echon "Checking for Mule support..."
|
|
79 lisp_prog='(princ (featurep (quote mule)))'
|
|
80 mule_p="`$EMACS -batch -no-site-file -eval \"$lisp_prog\"`"
|
|
81 if test "$mule_p" = nil ; then
|
|
82 echo No
|
169
|
83 ignore_dirs="$ignore_dirs mule leim"
|
167
|
84 else
|
|
85 echo Yes
|
|
86 fi
|
|
87
|
177
|
88 ## AUCTeX is a Package now
|
|
89 # if test "$mule_p" = nil ; then
|
|
90 # make_special auctex autoloads
|
|
91 # else
|
|
92 # make_special auctex autoloads MULE_EL=tex-jp.elc
|
|
93 # fi
|
171
|
94 #make_special cc-mode autoloads
|
169
|
95 make_special efs autoloads
|
|
96 #make_special eos autoloads # EOS doesn't have custom or autoloads
|
|
97 make_special hyperbole autoloads
|
|
98 # make_special ilisp autoloads
|
|
99 make_special oobr HYPB_ELC='' autoloads
|
|
100 make_special w3 autoloads
|
|
101
|
78
|
102 dirs=
|
163
|
103 for dir in lisp/*; do
|
167
|
104 if test -d $dir \
|
|
105 -a $dir != lisp/CVS \
|
169
|
106 -a $dir != lisp/SCCS; then
|
167
|
107 for ignore in $ignore_dirs; do
|
|
108 if test $dir = lisp/$ignore; then
|
|
109 continue 2
|
|
110 fi
|
|
111 done
|
|
112 dirs="$dirs $dir"
|
|
113 fi
|
78
|
114 done
|
167
|
115
|
169
|
116 # set -x
|
163
|
117 for dir in $dirs; do
|
|
118 $EMACS -batch -q -l autoload -f batch-update-directory $dir
|
|
119 done
|
169
|
120
|
|
121 eval "$make_special_commands"
|