comparison lib-src/update-elc.sh @ 30:ec9a17fef872 r19-15b98

Import from CVS: tag r19-15b98
author cvs
date Mon, 13 Aug 2007 08:52:29 +0200
parents 441bb1e64a06
children e04119814345
comparison
equal deleted inserted replaced
29:7976500f47f9 30:ec9a17fef872
1 #!/bin/sh 1 #!/bin/sh
2 ### update-elc.sh --- recompile all missing or out-or-date .elc files 2 ### update-elc.sh --- recompile all missing or out-or-date .elc files
3 3
4 # Author: Jamie Zawinski <jwz@lucid.com> 4 # Author: Jamie Zawinski <jwz@lucid.com>
5 # Maintainer: Ben Wing <ben.wing@Eng.Sun.COM> 5 # Maintainer: Steve Baur <steve@altair.xemacs.org>
6 # Created: ? 6 # Created: ?
7 # Version: 1.0 7 # Version: 1.0
8 # Modified: 94/07/13 16:18:44
9 # Keywords: recompile .el .elc 8 # Keywords: recompile .el .elc
10 9
11 ### Commentary: 10 ### Commentary:
12 ## Recompile all .elc files that need recompilation. Requires a working 11 ## Recompile all .elc files that need recompilation. Requires a working
13 ## version of 'xemacs'. Correctly handles the case where the .elc files 12 ## version of 'xemacs'. Correctly handles the case where the .elc files
56 REAL=`cd \`dirname $EMACS\` ; pwd | sed 's|^/tmp_mnt||'`/`basename $EMACS` 55 REAL=`cd \`dirname $EMACS\` ; pwd | sed 's|^/tmp_mnt||'`/`basename $EMACS`
57 BYTECOMP="$REAL -batch -q -no-site-file " 56 BYTECOMP="$REAL -batch -q -no-site-file "
58 echo "Recompiling in `pwd|sed 's|^/tmp_mnt||'`" 57 echo "Recompiling in `pwd|sed 's|^/tmp_mnt||'`"
59 echo " with $REAL..." 58 echo " with $REAL..."
60 59
60 $EMACS -batch -q -no-site-file -l cleantree -f batch-remove-old-elc lisp
61
61 prune_vc="( -name SCCS -o -name RCS -o -name CVS ) -prune -o" 62 prune_vc="( -name SCCS -o -name RCS -o -name CVS ) -prune -o"
62 63
63 tmp1=/tmp/rcl1.$$ 64 tmp1=/tmp/rcl1.$$
64 tmp2=/tmp/rcl2.$$ 65 tmp2=/tmp/rcl2.$$
65 rm -f $tmp1 $tmp2 66 rm -f $tmp1 $tmp2
72 echon "Deleting .elc files without .el files... " 73 echon "Deleting .elc files without .el files... "
73 # (except for vm/vm.elc) 74 # (except for vm/vm.elc)
74 comm -13 $tmp1 $tmp2 | sed 's/\(.*\)\.el$/echo \1.elc ; rm \1.elc/' | sh 75 comm -13 $tmp1 $tmp2 | sed 's/\(.*\)\.el$/echo \1.elc ; rm \1.elc/' | sh
75 echo done. 76 echo done.
76 77
77
78 # first recompile the byte-compiler, so that the other compiles take place 78 # first recompile the byte-compiler, so that the other compiles take place
79 # with the latest version (assuming we're compiling the lisp dir of the emacs 79 # with the latest version (assuming we're compiling the lisp dir of the emacs
80 # we're running, which might not be the case, but often is.) 80 # we're running, which might not be the case, but often is.)
81 # 81 #
82 echon "Checking the byte compiler... " 82 echon "Checking the byte compiler... "
83 $BYTECOMP -f batch-byte-recompile-directory lisp/bytecomp 83 $BYTECOMP -f batch-byte-recompile-directory lisp/bytecomp
84 84
85 # vm is hard, and must be done first ...
86 #
87 echon "Compiling VM... "
88 ( cd lisp/vm ; make EMACS=$REAL )
89 echo done.
90
85 echo Compiling files without .elc... 91 echo Compiling files without .elc...
86 92
87 # Isn't it wonderful the number of different ways you can 93 # Isn't it wonderful the number of different ways you can
88 # iterate over a list of files? 94 # iterate over a list of files?
89 95
90 # 96 #
91 # First compile all files which don't have a .elc version, except for these: 97 # Second compile all files which don't have a .elc version, except for these:
92 # 98 #
93 99
94 NUMTOCOMPILE=20 # compile up to 20 files with each invocation 100 NUMTOCOMPILE=20 # compile up to 20 files with each invocation
95 101
96 comm -23 $tmp1 $tmp2 | sed ' 102 comm -23 $tmp1 $tmp2 | sed '
122 \!/quail/!d 128 \!/quail/!d
123 ' | xargs -t -n$NUMTOCOMPILE $BYTECOMP -f batch-byte-compile 129 ' | xargs -t -n$NUMTOCOMPILE $BYTECOMP -f batch-byte-compile
124 130
125 rm -f $tmp1 $tmp2 131 rm -f $tmp1 $tmp2
126 echo Done. 132 echo Done.
127
128 # vm is hard...
129 #
130 echon "Compiling VM... "
131 ( cd lisp/vm ; make EMACS=$REAL )
132 echo done.
133 133
134 if [ -d lisp/ediff ]; then 134 if [ -d lisp/ediff ]; then
135 echo Compiling EDIFF... 135 echo Compiling EDIFF...
136 ( cd lisp/ediff ; make EMACS=$REAL elc ) 136 ( cd lisp/ediff ; make EMACS=$REAL elc )
137 echo EDIFF done. 137 echo EDIFF done.