comparison make-dist @ 18691:678528c8dd4f

(bogosities): Check subdirs of `lisp' also. (etc): Really avoid symlinks now. (lisp): Don't delete from subdirs the things we never copy.
author Richard M. Stallman <rms@gnu.org>
date Wed, 09 Jul 1997 04:27:54 +0000
parents c5f070514f07
children 7113c3fe2d3a
comparison
equal deleted inserted replaced
18690:df8ab82c73f3 18691:678528c8dd4f
142 them, and try again." >&2 142 them, and try again." >&2
143 exit 1 143 exit 1
144 fi 144 fi
145 145
146 ### Check for .elc files with no corresponding .el file. 146 ### Check for .elc files with no corresponding .el file.
147 ls -1 lisp/[a-z]*.el | sed 's/\.el$/.elc/' > /tmp/el 147 ls -1 lisp/[a-z]*.el lisp/[a-z]*/[a-z]*.el | sed 's/\.el$/.elc/' > /tmp/el
148 ls -1 lisp/[a-z]*.elc > /tmp/elc 148 ls -1 lisp/[a-z]*.elc lisp/[a-z]*/[a-z]*.elc > /tmp/elc
149 bogosities="`comm -13 /tmp/el /tmp/elc`" 149 bogosities="`comm -13 /tmp/el /tmp/elc`"
150 if [ "${bogosities}" != "" ]; then 150 if [ "${bogosities}" != "" ]; then
151 echo "The following .elc files have no corresponding .el files:" 151 echo "The following .elc files have no corresponding .el files:"
152 echo "${bogosities}" 152 echo "${bogosities}"
153 fi 153 fi
154 rm -f /tmp/el /tmp/elc 154 rm -f /tmp/el /tmp/elc
155 155
156 ### Check for .el files with no corresponding .elc file. 156 ### Check for .el files with no corresponding .elc file.
157 (cd lisp; ls -1 [a-z]*.el) > /tmp/el 157 (cd lisp; ls -1 [a-z]*.el [a-z]*/[a-z]*.el) > /tmp/el
158 (cd lisp; ls -1 [a-z]*.elc) | sed 's/\.elc$/.el/' > /tmp/elc 158 (cd lisp; ls -1 [a-z]*.elc [a-z]*/[a-z]*.elc) | sed 's/\.elc$/.el/' > /tmp/elc
159 losers="`comm -23 /tmp/el /tmp/elc`" 159 losers="`comm -23 /tmp/el /tmp/elc`"
160 bogosities= 160 bogosities=
161 for file in $losers; do 161 for file in $losers; do
162 if ! grep -q "dontcompilefiles:.* $file\($\| \)" lisp/Makefile; then 162 if ! grep -q "dontcompilefiles:.* $file\($\| \)" lisp/Makefile; then
163 if [ "$file" != site-init.el ] && [ "$file" != site-load.el ] \ 163 if [ "$file" != site-init.el ] && [ "$file" != site-load.el ] \
290 ln $file/[a-zA-Z]*.el ../${tempdir}/lisp/$file 290 ln $file/[a-zA-Z]*.el ../${tempdir}/lisp/$file
291 ln $file/[a-zA-Z]*.elc ../${tempdir}/lisp/$file 291 ln $file/[a-zA-Z]*.elc ../${tempdir}/lisp/$file
292 if [ -f $file/README ]; then 292 if [ -f $file/README ]; then
293 ln $file/README ../${tempdir}/lisp/$file 293 ln $file/README ../${tempdir}/lisp/$file
294 fi 294 fi
295 rm -f $file/=* $file/TAGS
296 done ) 295 done )
297 296
298 echo "Making links to \`leim' and its subdirectories for the LEIM distribution" 297 echo "Making links to \`leim' and its subdirectories for the LEIM distribution"
299 ### Don't distribute TAGS, or =*.el files. 298 ### Don't distribute TAGS, or =*.el files.
300 (cd leim 299 (cd leim
427 426
428 echo "Making links to \`etc'" 427 echo "Making links to \`etc'"
429 ### Don't distribute = files, TAGS, DOC files, backups, autosaves, or 428 ### Don't distribute = files, TAGS, DOC files, backups, autosaves, or
430 ### tex litter. 429 ### tex litter.
431 (cd etc 430 (cd etc
432 ln `ls -d * | grep -v 'RCS' | grep -v 'Old' | grep -v '^e$'` ../${tempdir}/etc 431 files=`ls -d * | grep -v 'RCS' | grep -v 'Old' | grep -v '^e$'`
432 ln $files ../${tempdir}/etc
433 ## If we ended up with a symlink, or if we did not get anything 433 ## If we ended up with a symlink, or if we did not get anything
434 ## due to a cross-device symlink, copy the file. 434 ## due to a cross-device symlink, copy the file.
435 for file in [a-zA-Z]*.[hcs] [a-zA-Z]*.in [a-zA-Z]*.opt; do 435 for file in $files; do
436 if test -f ../${tempdir}/etc/$file; then 436 if test -f ../${tempdir}/etc/$file; then
437 # test -f appears to succeed for a symlink 437 # test -f appears to succeed for a symlink
438 if test -L ../${tempdir}/etc/$file; then 438 if test -L ../${tempdir}/etc/$file; then
439 rm ../${tempdir}/etc/$file 439 rm ../${tempdir}/etc/$file
440 cp $file ../${tempdir}/etc 440 cp $file ../${tempdir}/etc