Mercurial > hg > xemacs-beta
comparison lib-src/update-autoloads.sh @ 167:85ec50267440 r20-3b10
Import from CVS: tag r20-3b10
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:45:46 +0200 |
parents | 5a88923fcbfe |
children | 15872534500d |
comparison
equal
deleted
inserted
replaced
166:7a77eb660975 | 167:85ec50267440 |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 ### update-autoloads.sh --- update auto-autoloads.el as necessary | 2 ### update-autoloads.sh --- update auto-autoloads.el as necessary |
3 | |
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: | |
3 | 13 |
4 set -eu | 14 set -eu |
5 | 15 |
6 # This means we're running in a Sun workspace | 16 # This means we're running in a Sun workspace |
7 test -d ../era-specific && cd ../editor | 17 test -d ../era-specific && cd ../editor |
8 | 18 |
9 # get to the right directory | 19 # get to the right directory |
10 test ! -d ./lisp -a -d ../lisp && cd .. | 20 test ! -d ./lisp -a -d ../lisp && cd .. |
11 if test ! -d ./lisp ; then | 21 if test ! -d ./lisp ; then |
12 echo $0: neither ./lisp/ nor ../lisp/ exist | 22 echo $0: neither ./lisp/ nor ../lisp/ exist |
13 exit 1 | 23 exit 1 |
14 fi | 24 fi |
15 | 25 |
16 EMACS="./src/xemacs" | 26 EMACS="./src/xemacs" |
17 echo " (using $EMACS)" | 27 echo " (using $EMACS)" |
18 | 28 |
19 export EMACS | 29 export EMACS |
20 | 30 |
21 REAL=`cd \`dirname $EMACS\` ; pwd | sed 's|^/tmp_mnt||'`/`basename $EMACS` | 31 REAL=`cd \`dirname $EMACS\` ; pwd | sed 's|^/tmp_mnt||'`/`basename $EMACS` |
22 | 32 |
23 echo "Recompiling in `pwd|sed 's|^/tmp_mnt||'`" | 33 echo "Rebuilding autoloads/custom-loads in `pwd|sed 's|^/tmp_mnt||'`" |
24 echo " with $REAL..." | 34 echo " with $REAL..." |
35 | |
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 | |
49 ignore_dirs="" | |
50 | |
51 # Only use Mule XEmacs to build Mule-specific autoloads & custom-loads. | |
52 echon "Checking for Mule support..." | |
53 lisp_prog='(princ (featurep (quote mule)))' | |
54 mule_p="`$EMACS -batch -no-site-file -eval \"$lisp_prog\"`" | |
55 if test "$mule_p" = nil ; then | |
56 echo No | |
57 ignore_dirs="$ignore_dirs its egg mule leim" | |
58 else | |
59 echo Yes | |
60 fi | |
25 | 61 |
26 dirs= | 62 dirs= |
27 for dir in lisp/*; do | 63 for dir in lisp/*; do |
28 if test -d $dir \ | 64 if test -d $dir \ |
29 -a $dir != lisp/CVS \ | 65 -a $dir != lisp/CVS \ |
30 -a $dir != lisp/SCCS \ | 66 -a $dir != lisp/SCCS \ |
31 -a $dir != lisp/egg \ | 67 -a $dir != lisp/language; then |
32 -a $dir != lisp/its \ | 68 for ignore in $ignore_dirs; do |
33 -a $dir != lisp/language \ | 69 if test $dir = lisp/$ignore; then |
34 -a $dir != lisp/leim; then | 70 continue 2 |
35 dirs="$dirs $dir" | 71 fi |
36 fi | 72 done |
73 dirs="$dirs $dir" | |
74 fi | |
37 done | 75 done |
38 # cat > lisp/prim/auto-autoloads.el << EOF | 76 |
39 # ;;; Do NOT edit this file! | |
40 # ;;; It is automatically generated using "make autoloads" | |
41 # ;;; See update-autoloads.sh and autoload.el for more details. | |
42 # | |
43 # EOF | |
44 set -x | 77 set -x |
45 for dir in $dirs; do | 78 for dir in $dirs; do |
46 $EMACS -batch -q -l autoload -f batch-update-directory $dir | 79 $EMACS -batch -q -l autoload -f batch-update-directory $dir |
47 done | 80 done |