comparison make-dist @ 88155:d7ddb3e565de

sync with trunk
author Henrik Enberg <henrik.enberg@telia.com>
date Mon, 16 Jan 2006 00:03:54 +0000
parents 23a1cea22d13
children
comparison
equal deleted inserted replaced
88154:8ce476d3ba36 88155:d7ddb3e565de
4 #### source tree. This basically creates a duplicate directory 4 #### source tree. This basically creates a duplicate directory
5 #### structure, and then hard links into it only those files that should 5 #### structure, and then hard links into it only those files that should
6 #### be distributed. This means that if you add a file with an odd name, 6 #### be distributed. This means that if you add a file with an odd name,
7 #### you should make sure that this script will include it. 7 #### you should make sure that this script will include it.
8 8
9 # Copyright (C) 1995, 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. 9 # Copyright (C) 1995, 1997, 1998, 2000, 2001, 2002, 2005
10 # Free Software Foundation, Inc.
10 # 11 #
11 # This file is part of GNU Emacs. 12 # This file is part of GNU Emacs.
12 # 13 #
13 # GNU Emacs is free software; you can redistribute it and/or modify 14 # GNU Emacs is free software; you can redistribute it and/or modify
14 # it under the terms of the GNU General Public License as published by 15 # it under the terms of the GNU General Public License as published by
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 # GNU General Public License for more details. 22 # GNU General Public License for more details.
22 # 23 #
23 # You should have received a copy of the GNU General Public License 24 # You should have received a copy of the GNU General Public License
24 # along with GNU Emacs; see the file COPYING. If not, write to the 25 # along with GNU Emacs; see the file COPYING. If not, write to the
25 # Free Software Foundation, Inc., 59 Temple Place - Suite 330, 26 # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
26 # Boston, MA 02111-1307, USA. 27 # Boston, MA 02110-1301, USA.
27 28
28 progname="$0" 29 progname="$0"
29 30
30 ### Exit if a command fails. 31 ### Exit if a command fails.
31 #set -e 32 #set -e
181 182
182 ### Find where to run Emacs. 183 ### Find where to run Emacs.
183 if [ $check = yes ]; 184 if [ $check = yes ];
184 then 185 then
185 ### Check for .elc files with no corresponding .el file. 186 ### Check for .elc files with no corresponding .el file.
186 ls -1 lisp/[a-z]*.el lisp/[a-z]*/[a-z]*.el \ 187 ls -1 lisp/[a-zA-Z]*.el lisp/[a-z]*/[a-zA-Z0-9]*.el \
187 leim/[a-z]*/[a-z]*.el | sed 's/\.el$/.elc/' > /tmp/el 188 leim/[a-z]*/[a-z]*.el | sed 's/\.el$/.elc/' > /tmp/el
188 ls -1 lisp/[a-z]*.elc lisp/[a-z]*/[a-z]*.elc \ 189 ls -1 lisp/[a-zA-Z]*.elc lisp/[a-z]*/[a-zA-Z0-9]*.elc \
189 leim/[a-z]*/[a-z]*.elc > /tmp/elc 190 leim/[a-z]*/[a-z]*.elc > /tmp/elc
190 bogosities="`comm -13 /tmp/el /tmp/elc`" 191 bogosities="`comm -13 /tmp/el /tmp/elc`"
191 if [ "${bogosities}" != "" ]; then 192 if [ "${bogosities}" != "" ]; then
192 echo "The following .elc files have no corresponding .el files:" 193 echo "The following .elc files have no corresponding .el files:"
193 echo "${bogosities}" 194 echo "${bogosities}"
194 fi 195 fi
195 rm -f /tmp/el /tmp/elc 196 rm -f /tmp/el /tmp/elc
196 197
197 ### Check for .el files with no corresponding .elc file. 198 ### Check for .el files with no corresponding .elc file.
198 (cd lisp; ls -1 [a-z]*.el [a-z]*/[a-z]*.el ; \ 199 ls -1 lisp/[a-zA-Z]*.el lisp/[a-z]*/[a-zA-Z0-9]*.el \
199 cd ../leim; ls -1 [a-z]*/[a-z]*.el) > /tmp/el 200 leim/[a-z]*/[a-z]*.el > /tmp/el
200 (cd lisp; ls -1 [a-z]*.elc [a-z]*/[a-z]*.elc; \ 201 ls -1 lisp/[a-zA-Z]*.elc lisp/[a-z]*/[a-zA-Z0-9]*.elc \
201 cd ../leim; ls -1 [a-z]*/[a-z]*.elc) | sed 's/\.elc$/.el/' > /tmp/elc 202 leim/[a-z]*/[a-z]*.elc | sed 's/\.elc$/.el/' > /tmp/elc
202 losers="`comm -23 /tmp/el /tmp/elc`" 203 losers="`comm -23 /tmp/el /tmp/elc`"
203 bogosities= 204 bogosities=
204 for file in $losers; do 205 for file in $losers; do
205 file1=`echo $file | sed -e "s|.*/||"` 206 if ! grep -q "no-byte-compile: t" $file; then
206 if ! sed -n -e "/^DONTCOMPILE/,/[^\\]\$/p" lisp/Makefile.in |
207 grep -q "[ ]$file1\($\| \)"; then
208 case $file in 207 case $file in
209 site-init.el | site-load.el | site-start.el | default.el) 208 site-init.el | site-load.el | site-start.el | default.el)
210 ;;
211 term/*)
212 ;; 209 ;;
213 *) 210 *)
214 bogosities="$file $bogosities" 211 bogosities="$file $bogosities"
215 ;; 212 ;;
216 esac 213 esac
219 if [ x"${bogosities}" != x"" ]; then 216 if [ x"${bogosities}" != x"" ]; then
220 echo "The following .el files have no corresponding .elc files:" 217 echo "The following .el files have no corresponding .elc files:"
221 echo "${bogosities}" 218 echo "${bogosities}"
222 fi 219 fi
223 rm -f /tmp/el /tmp/elc 220 rm -f /tmp/el /tmp/elc
224
225 ### Check for .el files that would overflow the 14-char limit if compiled.
226 long=`find lisp leim -name '[a-zA-Z0-9]??????????*.el' -print`
227 if [ "$long" != "" ]; then
228 echo "The following .el file names are too long:"
229 echo "$long"
230 fi
231 fi 221 fi
232 222
233 ### Make sure configure is newer than configure.in. 223 ### Make sure configure is newer than configure.in.
234 if [ "x`ls -t configure configure.in | sed q`" != "xconfigure" ]; then 224 if [ "x`ls -t configure configure.in | sed q`" != "xconfigure" ]; then
235 echo "\`./configure.in' is newer than \`./configure'" >&2 225 echo "\`./configure.in' is newer than \`./configure'" >&2
322 for subdir in lisp site-lisp lispref lispintro \ 312 for subdir in lisp site-lisp lispref lispintro \
323 leim leim/CXTERM-DIC leim/MISC-DIC \ 313 leim leim/CXTERM-DIC leim/MISC-DIC \
324 leim/SKK-DIC leim/ja-dic leim/quail \ 314 leim/SKK-DIC leim/ja-dic leim/quail \
325 src src/m src/s src/bitmaps lib-src oldXMenu lwlib \ 315 src src/m src/s src/bitmaps lib-src oldXMenu lwlib \
326 nt nt/inc nt/inc/sys nt/inc/arpa nt/inc/netinet nt/icons \ 316 nt nt/inc nt/inc/sys nt/inc/arpa nt/inc/netinet nt/icons \
327 etc etc/e info man msdos vms mac mac/inc mac/inc/sys \ 317 etc etc/e \
328 mac/src mac/Emacs.app mac/Emacs.app/Contents \ 318 etc/images etc/images/ezimage etc/images/gnus etc/images/gud \
319 etc/images/icons etc/images/low-color etc/images/mail \
320 etc/images/smilies etc/tree-widget etc/tree-widget/default \
321 etc/tree-widget/folder info man m4 msdos vms mac mac/inc \
322 mac/inc/sys mac/src mac/Emacs.app mac/Emacs.app/Contents \
329 mac/Emacs.app/Contents/MacOS mac/Emacs.app/Contents/Resources \ 323 mac/Emacs.app/Contents/MacOS mac/Emacs.app/Contents/Resources \
330 mac/Emacs.app/Contents/Resources/English.lproj 324 mac/Emacs.app/Contents/Resources/English.lproj
331 do 325 do
332 echo " ${tempdir}/${subdir}" 326 echo " ${tempdir}/${subdir}"
333 mkdir ${tempdir}/${subdir} 327 mkdir ${tempdir}/${subdir}
345 ln $img ../${tempdir}/lisp 339 ln $img ../${tempdir}/lisp
346 fi 340 fi
347 done 341 done
348 ## simula.el doesn't keep abbreviations in simula.defns any more. 342 ## simula.el doesn't keep abbreviations in simula.defns any more.
349 ## ln [a-zA-Z]*.defns ../${tempdir}/lisp 343 ## ln [a-zA-Z]*.defns ../${tempdir}/lisp
350 ln ChangeLog Makefile.in makefile.nt ChangeLog.? ../${tempdir}/lisp 344 ln ChangeLog ChangeLog.*[0-9] ../${tempdir}/lisp
351 ln makefile.w32-in ../${tempdir}/lisp 345 ln Makefile.in makefile.w32-in ../${tempdir}/lisp
352 test -f README && ln README ../${tempdir}/lisp 346 test -f README && ln README ../${tempdir}/lisp
353 (cd ../${tempdir}/lisp 347 (cd ../${tempdir}/lisp
354 rm -f TAGS =* 348 rm -f TAGS =*
355 rm -f site-init site-init.el site-init.elc 349 rm -f site-init site-init.el site-init.elc
356 rm -f site-load site-load.el site-load.elc 350 rm -f site-load site-load.el site-load.elc
385 ln $file/README ../${tempdir}/lisp/$file 379 ln $file/README ../${tempdir}/lisp/$file
386 fi 380 fi
387 381
388 if [ -f $file/ChangeLog ]; then 382 if [ -f $file/ChangeLog ]; then
389 ln $file/ChangeLog ../${tempdir}/lisp/$file 383 ln $file/ChangeLog ../${tempdir}/lisp/$file
390 for f in $file/ChangeLog.[0-9]; do 384 for f in $file/ChangeLog.*[0-9]; do
391 if [ -f $f ]; then 385 if [ -f $f ]; then
392 ln $f ../${tempdir}/lisp/$file 386 ln $f ../${tempdir}/lisp/$file
393 fi 387 fi
394 done 388 done
395 fi 389 fi
396 done ) 390 done )
397 391
398 echo "Making links to \`leim' and its subdirectories" 392 echo "Making links to \`leim' and its subdirectories"
399 ### Don't distribute TAGS, or =*.el files. 393 ### Don't distribute TAGS, or =*.el files.
400 (cd leim 394 (cd leim
401 ln makefile.nt makefile.w32-in ../${tempdir}/leim 395 ln makefile.w32-in ../${tempdir}/leim
402 ln ChangeLog README ../${tempdir}/leim 396 ln ChangeLog README ../${tempdir}/leim
403 397
404 ln CXTERM-DIC/*.tit ../${tempdir}/leim/CXTERM-DIC 398 ln CXTERM-DIC/*.tit ../${tempdir}/leim/CXTERM-DIC
405 ln SKK-DIC/README SKK-DIC/SKK-JISYO.L ../${tempdir}/leim/SKK-DIC 399 ln SKK-DIC/README SKK-DIC/SKK-JISYO.L ../${tempdir}/leim/SKK-DIC
406 ln MISC-DIC/*.* ../${tempdir}/leim/MISC-DIC 400 ln MISC-DIC/*.* ../${tempdir}/leim/MISC-DIC
407 ln ja-dic/*.el ja-dic/*.elc ../${tempdir}/leim/ja-dic 401 ln ja-dic/*.el ja-dic/*.elc ../${tempdir}/leim/ja-dic
408 ln Makefile.in ../${tempdir}/leim/Makefile.in 402 ln Makefile.in ../${tempdir}/leim/Makefile.in
403 ln leim-ext.el ../${tempdir}/leim/leim-ext.el
404 ## Lisp files that start with a capital are generated from TIT
405 ## dictionaries so we don't distribute them.
409 ln quail/[a-z]*.el quail/[a-z]*.elc ../${tempdir}/leim/quail 406 ln quail/[a-z]*.el quail/[a-z]*.elc ../${tempdir}/leim/quail
410 rm -f ../${tempdir}/leim/quail/quick-b5.* 407 rm -f ../${tempdir}/leim/quail/quick-b5.*
411 rm -f ../${tempdir}/leim/quail/quick-cns.* 408 rm -f ../${tempdir}/leim/quail/quick-cns.*
412 rm -f ../${tempdir}/leim/quail/tsang-b5.* 409 rm -f ../${tempdir}/leim/quail/tsang-b5.*
413 rm -f ../${tempdir}/leim/quail/tsang-cns.* 410 rm -f ../${tempdir}/leim/quail/tsang-cns.*
440 cp -p $file ../${tempdir}/src 437 cp -p $file ../${tempdir}/src
441 chmod a-w ../${tempdir}/src/$file 438 chmod a-w ../${tempdir}/src/$file
442 fi 439 fi
443 done 440 done
444 ln README ChangeLog ChangeLog.*[0-9] ../${tempdir}/src 441 ln README ChangeLog ChangeLog.*[0-9] ../${tempdir}/src
445 ln makefile.nt makefile.w32-in ../${tempdir}/src 442 ln makefile.w32-in ../${tempdir}/src
446 ln .gdbinit .dbxinit ../${tempdir}/src 443 ln .gdbinit .dbxinit ../${tempdir}/src
447 cd ../${tempdir}/src 444 cd ../${tempdir}/src
448 rm -f config.h epaths.h Makefile Makefile.c 445 rm -f config.h epaths.h Makefile Makefile.c
449 rm -f =* TAGS) 446 rm -f =* TAGS)
450 447
463 460
464 echo "Making links to \`lib-src'" 461 echo "Making links to \`lib-src'"
465 (cd lib-src 462 (cd lib-src
466 ln [a-zA-Z]*.[chy] ../${tempdir}/lib-src 463 ln [a-zA-Z]*.[chy] ../${tempdir}/lib-src
467 ln ChangeLog Makefile.in README testfile vcdiff ../${tempdir}/lib-src 464 ln ChangeLog Makefile.in README testfile vcdiff ../${tempdir}/lib-src
468 ln grep-changelog rcs2log rcs-checkin makefile.nt ../${tempdir}/lib-src 465 ln grep-changelog rcs2log rcs-checkin ../${tempdir}/lib-src
469 ln makefile.w32-in ../${tempdir}/lib-src 466 ln makefile.w32-in ../${tempdir}/lib-src
470 ## If we ended up with a symlink, or if we did not get anything 467 ## If we ended up with a symlink, or if we did not get anything
471 ## due to a cross-device symlink, copy the file. 468 ## due to a cross-device symlink, copy the file.
472 for file in [a-zA-Z]*.[chy]; do 469 for file in [a-zA-Z]*.[chy]; do
473 if test -f ../${tempdir}/lib-src/$file; then 470 if test -f ../${tempdir}/lib-src/$file; then
483 chmod a-w ../${tempdir}/lib-src/$file 480 chmod a-w ../${tempdir}/lib-src/$file
484 fi 481 fi
485 done 482 done
486 cd ../${tempdir}/lib-src 483 cd ../${tempdir}/lib-src
487 rm -f Makefile.c 484 rm -f Makefile.c
485 rm -f getopt.h
488 rm -f =* TAGS) 486 rm -f =* TAGS)
487
488 echo "Making links to \`m4'"
489 (cd m4
490 ln *.m4 ../${tempdir}/m4)
489 491
490 echo "Making links to \`nt'" 492 echo "Making links to \`nt'"
491 (cd nt 493 (cd nt
492 ln emacs.rc config.nt [a-z]*.c ../${tempdir}/nt 494 ln emacs.rc config.nt [a-z]*.c ../${tempdir}/nt
493 ln nmake.defs gmake.defs subdirs.el ../${tempdir}/nt 495 ln nmake.defs gmake.defs subdirs.el ../${tempdir}/nt
494 ln [a-z]*.bat [a-z]*.h makefile.def makefile.nt ../${tempdir}/nt 496 ln [a-z]*.bat [a-z]*.h ../${tempdir}/nt
495 ln ChangeLog INSTALL README makefile.w32-in ../${tempdir}/nt) 497 ln ChangeLog INSTALL README makefile.w32-in ../${tempdir}/nt)
496 498
497 echo "Making links to \`nt/inc'" 499 echo "Making links to \`nt/inc'"
498 (cd nt/inc 500 (cd nt/inc
499 ln [a-z]*.h ../../${tempdir}/nt/inc) 501 ln [a-z]*.h ../../${tempdir}/nt/inc)
510 (cd nt/inc/netinet 512 (cd nt/inc/netinet
511 ln [a-z]*.h ../../../${tempdir}/nt/inc/netinet) 513 ln [a-z]*.h ../../../${tempdir}/nt/inc/netinet)
512 514
513 echo "Making links to \`nt/icons'" 515 echo "Making links to \`nt/icons'"
514 (cd nt/icons 516 (cd nt/icons
515 ln [a-z]*.ico ../../${tempdir}/nt/icons) 517 ln [a-z]*.ico ../../${tempdir}/nt/icons
518 ln [a-z]*.cur ../../${tempdir}/nt/icons)
516 519
517 echo "Making links to \`mac'" 520 echo "Making links to \`mac'"
518 (cd mac 521 (cd mac
519 ln ChangeLog INSTALL README *.xml *.MPW ../${tempdir}/mac) 522 ln ChangeLog INSTALL README *.xml *.MPW ../${tempdir}/mac)
520 523
559 echo "Making links to \`etc'" 562 echo "Making links to \`etc'"
560 ### Don't distribute = files, TAGS, DOC files, backups, autosaves, or 563 ### Don't distribute = files, TAGS, DOC files, backups, autosaves, or
561 ### tex litter. 564 ### tex litter.
562 ### Don't distribute gfdl.1, since no man page references it. 565 ### Don't distribute gfdl.1, since no man page references it.
563 (cd etc 566 (cd etc
564 files=`ls -d * | grep -v CVS | grep -v RCS | grep -v 'Old' | grep -v '^e$'` 567 files=`ls -d * | grep -v CVS | grep -v RCS | grep -v 'Old' | grep -v '^e$' \
568 | grep -v '^images$' | grep -v '^tree-widget$'`
565 ln $files ../${tempdir}/etc 569 ln $files ../${tempdir}/etc
566 ## If we ended up with a symlink, or if we did not get anything 570 ## If we ended up with a symlink, or if we did not get anything
567 ## due to a cross-device symlink, copy the file. 571 ## due to a cross-device symlink, copy the file.
568 for file in $files; do 572 for file in $files; do
569 if test -f ../${tempdir}/etc/$file; then 573 if test -f ../${tempdir}/etc/$file; then
588 (cd etc/e 592 (cd etc/e
589 ln `ls -d * | grep -v CVS | grep -v RCS` ../../${tempdir}/etc/e 593 ln `ls -d * | grep -v CVS | grep -v RCS` ../../${tempdir}/etc/e
590 cd ../../${tempdir}/etc/e 594 cd ../../${tempdir}/etc/e
591 rm -f *~ \#*\# *,v =* core) 595 rm -f *~ \#*\# *,v =* core)
592 596
597 echo "Making links to \`etc/images'"
598 (cd etc/images
599 for img in [a-zA-Z]*.xpm [a-zA-Z]*.xbm [a-zA-Z]*.pbm; do
600 if [ -f $img ]; then
601 ln $img ../../${tempdir}/etc/images
602 fi
603 done)
604
605 for dir in etc/images/ezimage etc/images/gnus etc/images/gud etc/images/icons \
606 etc/images/low-color etc/images/mail etc/images/smilies \
607 etc/tree-widget/default etc/tree-widget/folder ; do
608 echo "Making links to \`${dir}'"
609 (cd ${dir}
610 ln `ls -d * | grep -v CVS | grep -v RCS` ../../../${tempdir}/${dir}
611 cd ../../../${tempdir}/${dir}
612 rm -f *~ \#*\# *,v =* core)
613 done
614
593 echo "Making links to \`info'" 615 echo "Making links to \`info'"
594 # Don't distribute backups or autosaves. 616 # Don't distribute backups or autosaves.
595 (cd info 617 (cd info
596 ln `find . -type f -print | grep -v CVS | grep -v RCS | grep -v cvsignore` ../${tempdir}/info 618 ln `find . -type f -print | grep -v CVS | grep -v RCS | grep -v cvsignore` ../${tempdir}/info
597 #ln [a-zA-Z]* ../${tempdir}/info 619 #ln [a-zA-Z]* ../${tempdir}/info
612 rm -f \#*\# =* *~ core emacs-index* *.Z *.z xmail 634 rm -f \#*\# =* *~ core emacs-index* *.Z *.z xmail
613 rm -f emacs.?? termcap.?? gdb.?? *.log *.toc *.dvi *.oaux) 635 rm -f emacs.?? termcap.?? gdb.?? *.log *.toc *.dvi *.oaux)
614 636
615 echo "Making links to \`lispref'" 637 echo "Making links to \`lispref'"
616 (cd lispref 638 (cd lispref
617 ln `ls -1 *.texi | grep -v index.texi` ../${tempdir}/lispref 639 ln `ls -1 *.texi` ../${tempdir}/lispref
618 ln *.aux *.cps *.fns *.kys *.vrs index.*perm ../${tempdir}/lispref 640 ln *.aux *.cps *.fns *.kys *.vrs ../${tempdir}/lispref
619 ln *.txt *.el spellfile permute-index tindex.pl ../${tempdir}/lispref 641 ln *.txt *.el spellfile tindex.pl ../${tempdir}/lispref
620 test -f README && ln README ../${tempdir}/lispref 642 test -f README && ln README ../${tempdir}/lispref
621 test -f Makefile.in && ln Makefile.in ../${tempdir}/lispref 643 test -f Makefile.in && ln Makefile.in ../${tempdir}/lispref
622 ln ChangeLog ../${tempdir}/lispref 644 ln ChangeLog ../${tempdir}/lispref
623 cd ../${tempdir}/lispref 645 cd ../${tempdir}/lispref
624 rm -f \#*\# =* *~ core elisp-index* *.Z *.z xmail 646 rm -f \#*\# =* *~ core elisp-index* *.Z *.z xmail
702 else 724 else
703 (cd ${tempparent}; mv ${emacsname} ..) 725 (cd ${tempparent}; mv ${emacsname} ..)
704 rm -rf ${tempparent} 726 rm -rf ${tempparent}
705 fi 727 fi
706 728
729 # arch-tag: 26e3eb50-a394-4ab2-82b2-d8e5af500de7
707 ### make-dist ends here 730 ### make-dist ends here