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
|
|
8 ### This file is part of XEmacs
|
|
9
|
|
10 ### Commentary:
|
|
11
|
|
12 ### Code:
|
|
13
|
0
|
14 set -eu
|
|
15
|
|
16 # This means we're running in a Sun workspace
|
70
|
17 test -d ../era-specific && cd ../editor
|
0
|
18
|
|
19 # get to the right directory
|
70
|
20 test ! -d ./lisp -a -d ../lisp && cd ..
|
|
21 if test ! -d ./lisp ; then
|
167
|
22 echo $0: neither ./lisp/ nor ../lisp/ exist
|
|
23 exit 1
|
0
|
24 fi
|
|
25
|
70
|
26 EMACS="./src/xemacs"
|
0
|
27 echo " (using $EMACS)"
|
|
28
|
|
29 export EMACS
|
|
30
|
|
31 REAL=`cd \`dirname $EMACS\` ; pwd | sed 's|^/tmp_mnt||'`/`basename $EMACS`
|
|
32
|
167
|
33 echo "Rebuilding autoloads/custom-loads in `pwd|sed 's|^/tmp_mnt||'`"
|
0
|
34 echo " with $REAL..."
|
|
35
|
167
|
36 if [ "`uname -r | sed 's/\(.\).*/\1/'`" -gt 4 ]; then
|
|
37 echon()
|
|
38 {
|
|
39 /bin/echo $* '\c'
|
|
40 }
|
|
41 else
|
|
42 echon()
|
|
43 {
|
|
44 echo -n $*
|
|
45 }
|
|
46 fi
|
|
47
|
|
48 # Compute patterns to ignore when searching for files
|
169
|
49 # These directories don't have autoloads and customizations, or are partially
|
|
50 # broken.
|
|
51 ignore_dirs="cl egg eos ilisp its language locale mel mu sunpro term tooltalk"
|
|
52
|
|
53 # Prepare for autoloading directories with directory-specific instructions
|
|
54 make_special_commands=''
|
|
55 make_special () {
|
|
56 dir="$1"; shift;
|
|
57 ignore_dirs="$ignore_dirs $dir"
|
|
58 make_special_commands="$make_special_commands \
|
|
59 (cd \"lisp/$dir\" && ${MAKE:-make} EMACS=$REAL ${1+$*});"
|
|
60 }
|
167
|
61
|
|
62 # Only use Mule XEmacs to build Mule-specific autoloads & custom-loads.
|
|
63 echon "Checking for Mule support..."
|
|
64 lisp_prog='(princ (featurep (quote mule)))'
|
|
65 mule_p="`$EMACS -batch -no-site-file -eval \"$lisp_prog\"`"
|
|
66 if test "$mule_p" = nil ; then
|
|
67 echo No
|
169
|
68 ignore_dirs="$ignore_dirs mule leim"
|
167
|
69 else
|
|
70 echo Yes
|
|
71 fi
|
|
72
|
177
|
73 ## AUCTeX is a Package now
|
|
74 # if test "$mule_p" = nil ; then
|
|
75 # make_special auctex autoloads
|
|
76 # else
|
|
77 # make_special auctex autoloads MULE_EL=tex-jp.elc
|
|
78 # fi
|
171
|
79 #make_special cc-mode autoloads
|
169
|
80 make_special efs autoloads
|
|
81 #make_special eos autoloads # EOS doesn't have custom or autoloads
|
|
82 make_special hyperbole autoloads
|
|
83 # make_special ilisp autoloads
|
|
84 make_special oobr HYPB_ELC='' autoloads
|
|
85 make_special w3 autoloads
|
|
86
|
78
|
87 dirs=
|
163
|
88 for dir in lisp/*; do
|
167
|
89 if test -d $dir \
|
|
90 -a $dir != lisp/CVS \
|
169
|
91 -a $dir != lisp/SCCS; then
|
167
|
92 for ignore in $ignore_dirs; do
|
|
93 if test $dir = lisp/$ignore; then
|
|
94 continue 2
|
|
95 fi
|
|
96 done
|
|
97 dirs="$dirs $dir"
|
|
98 fi
|
78
|
99 done
|
167
|
100
|
169
|
101 # set -x
|
163
|
102 for dir in $dirs; do
|
|
103 $EMACS -batch -q -l autoload -f batch-update-directory $dir
|
|
104 done
|
169
|
105
|
|
106 eval "$make_special_commands"
|