diff options
| author | Glenn Morris | 2010-10-11 21:32:20 -0700 |
|---|---|---|
| committer | Glenn Morris | 2010-10-11 21:32:20 -0700 |
| commit | baf81c5524e3da91cf6a5b91fbff920f07037017 (patch) | |
| tree | 4b19e11d38df045f9cdd7b42a09a610fa2ea8406 | |
| parent | 8521e69b33a809d293c7b7c92360b62e158d366b (diff) | |
| download | emacs-baf81c5524e3da91cf6a5b91fbff920f07037017.tar.gz emacs-baf81c5524e3da91cf6a5b91fbff920f07037017.zip | |
* make-dist: Update and simplify.
Eg: there are no symlinks in the tree for a long time
Check for version in emacsver.texi.
Clean up *~ etc files using a find at the end.
Add etc/srecode.
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rwxr-xr-x | make-dist | 275 |
2 files changed, 88 insertions, 191 deletions
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-10-12 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * make-dist: Update and simplify. | ||
| 4 | |||
| 1 | 2010-10-12 Eli Zaretskii <eliz@gnu.org> | 5 | 2010-10-12 Eli Zaretskii <eliz@gnu.org> |
| 2 | 6 | ||
| 3 | * make-dist: Don't distribute src/buildobj.h. (Bug#7167) | 7 | * make-dist: Don't distribute src/buildobj.h. (Bug#7167) |
| @@ -1,29 +1,32 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | ### make-dist: create an Emacs distribution tar file from current srcdir | ||
| 2 | 3 | ||
| 3 | #### make-dist: create an Emacs distribution tar file from the current | 4 | ## Copyright (C) 1995, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, |
| 4 | #### source tree. This basically creates a duplicate directory | 5 | ## 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
| 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, | ||
| 7 | #### you should make sure that this script will include it. | ||
| 8 | 6 | ||
| 9 | # Copyright (C) 1995, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, | 7 | ## This file is part of GNU Emacs. |
| 10 | # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 11 | 8 | ||
| 12 | # This file is part of GNU Emacs. | 9 | ## GNU Emacs is free software: you can redistribute it and/or modify |
| 13 | # | 10 | ## it under the terms of the GNU General Public License as published by |
| 14 | # GNU Emacs is free software: you can redistribute it and/or modify | 11 | ## the Free Software Foundation, either version 3 of the License, or |
| 15 | # it under the terms of the GNU General Public License as published by | 12 | ## (at your option) any later version. |
| 16 | # the Free Software Foundation, either version 3 of the License, or | ||
| 17 | # (at your option) any later version. | ||
| 18 | 13 | ||
| 19 | # GNU Emacs is distributed in the hope that it will be useful, | 14 | ## GNU Emacs is distributed in the hope that it will be useful, |
| 20 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 16 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 22 | # GNU General Public License for more details. | 17 | ## GNU General Public License for more details. |
| 23 | 18 | ||
| 24 | # You should have received a copy of the GNU General Public License | 19 | ## You should have received a copy of the GNU General Public License |
| 25 | # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | 20 | ## along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
| 26 | 21 | ||
| 22 | ### Commentary: | ||
| 23 | |||
| 24 | ## This basically creates a duplicate directory structure, and then | ||
| 25 | ## hard links into it only those files that should be distributed. | ||
| 26 | ## This means that if you add a file with an odd name, you should make | ||
| 27 | ## sure that this script will include it. | ||
| 28 | |||
| 29 | ### Code: | ||
| 27 | 30 | ||
| 28 | progname="$0" | 31 | progname="$0" |
| 29 | 32 | ||
| @@ -163,10 +166,10 @@ echo Version numbers are $version and $shortversion | |||
| 163 | 166 | ||
| 164 | if [ $update = yes ]; | 167 | if [ $update = yes ]; |
| 165 | then | 168 | then |
| 166 | if grep -s "@set EMACSVER *${shortversion}" ./doc/emacs/emacs.texi > /dev/null; then | 169 | if grep -s "@set EMACSVER *${shortversion}" ./doc/emacs/emacsver.texi > /dev/null; then |
| 167 | true | 170 | true |
| 168 | else | 171 | else |
| 169 | echo "You must update the version number in \`./doc/emacs/emacs.texi'" | 172 | echo "You must update the version number in \`./doc/emacs/emacsver.texi'" |
| 170 | sleep 5 | 173 | sleep 5 |
| 171 | fi | 174 | fi |
| 172 | fi | 175 | fi |
| @@ -247,7 +250,7 @@ if [ "x`ls -t configure configure.in | sed q`" != "xconfigure" ]; then | |||
| 247 | autoconf || { x=$?; echo Autoconf FAILED! >&2; exit $x; } | 250 | autoconf || { x=$?; echo Autoconf FAILED! >&2; exit $x; } |
| 248 | fi | 251 | fi |
| 249 | 252 | ||
| 250 | ### Make sure src/config-in.stamp is newer than configure.in. | 253 | ### Make sure src/stamp-h.in is newer than configure.in. |
| 251 | if [ "x`ls -t src/stamp-h.in configure.in | sed q`" != "xsrc/stamp-h.in" ]; then | 254 | if [ "x`ls -t src/stamp-h.in configure.in | sed q`" != "xsrc/stamp-h.in" ]; then |
| 252 | echo "\`./configure.in' is newer than \`./src/stamp-h.in'" >&2 | 255 | echo "\`./configure.in' is newer than \`./src/stamp-h.in'" >&2 |
| 253 | echo "Running autoheader" >&2 | 256 | echo "Running autoheader" >&2 |
| @@ -259,10 +262,10 @@ fi | |||
| 259 | if [ $update = yes ]; | 262 | if [ $update = yes ]; |
| 260 | then | 263 | then |
| 261 | echo "Updating Info files" | 264 | echo "Updating Info files" |
| 262 | (cd doc/emacs; make -f Makefile.in srcdir=. info) | 265 | (cd doc/emacs; make info) |
| 263 | (cd doc/misc; make -f Makefile.in srcdir=. info) | 266 | (cd doc/misc; make info) |
| 264 | (cd doc/lispref; make -f Makefile.in srcdir=. info) | 267 | (cd doc/lispref; make info) |
| 265 | (cd doc/lispintro; make -f Makefile.in SHELL=/bin/sh srcdir=. info VPATH=.) | 268 | (cd doc/lispintro; make info) |
| 266 | 269 | ||
| 267 | echo "Updating finder, custom and autoload data" | 270 | echo "Updating finder, custom and autoload data" |
| 268 | (cd lisp; make updates EMACS="$EMACS") | 271 | (cd lisp; make updates EMACS="$EMACS") |
| @@ -314,11 +317,7 @@ echo "Making links to top-level files" | |||
| 314 | ln INSTALL README BUGS move-if-change ${tempdir} | 317 | ln INSTALL README BUGS move-if-change ${tempdir} |
| 315 | ln ChangeLog Makefile.in configure configure.in ${tempdir} | 318 | ln ChangeLog Makefile.in configure configure.in ${tempdir} |
| 316 | ln config.bat make-dist update-subdirs vpath.sed .dir-locals.el ${tempdir} | 319 | ln config.bat make-dist update-subdirs vpath.sed .dir-locals.el ${tempdir} |
| 317 | ### Copy these files; they're cross-filesystem symlinks. | 320 | ln mkinstalldirs config.sub config.guess install-sh ${tempdir} |
| 318 | cp mkinstalldirs ${tempdir} | ||
| 319 | cp config.sub ${tempdir} | ||
| 320 | cp config.guess ${tempdir} | ||
| 321 | cp install-sh ${tempdir} | ||
| 322 | 321 | ||
| 323 | echo "Updating version number in README" | 322 | echo "Updating version number in README" |
| 324 | (cd ${tempdir} | 323 | (cd ${tempdir} |
| @@ -344,7 +343,7 @@ for subdir in lisp site-lisp \ | |||
| 344 | etc/images/smilies etc/images/smilies/grayscale \ | 343 | etc/images/smilies etc/images/smilies/grayscale \ |
| 345 | etc/images/smilies/medium etc/images/tree-widget \ | 344 | etc/images/smilies/medium etc/images/tree-widget \ |
| 346 | etc/images/tree-widget/default etc/images/tree-widget/folder \ | 345 | etc/images/tree-widget/default etc/images/tree-widget/folder \ |
| 347 | etc/refcards etc/schema etc/tutorials info doc doc/emacs \ | 346 | etc/refcards etc/schema etc/srecode etc/tutorials info doc doc/emacs \ |
| 348 | doc/misc doc/man doc/lispref doc/lispintro m4 msdos \ | 347 | doc/misc doc/man doc/lispref doc/lispintro m4 msdos \ |
| 349 | nextstep nextstep/Cocoa nextstep/Cocoa/Emacs.base \ | 348 | nextstep nextstep/Cocoa nextstep/Cocoa/Emacs.base \ |
| 350 | nextstep/Cocoa/Emacs.base/Contents \ | 349 | nextstep/Cocoa/Emacs.base/Contents \ |
| @@ -363,17 +362,14 @@ do | |||
| 363 | done | 362 | done |
| 364 | 363 | ||
| 365 | echo "Making links to \`lisp' and its subdirectories" | 364 | echo "Making links to \`lisp' and its subdirectories" |
| 366 | ### Don't distribute TAGS, =*.el files, site-init.el, site-load.el, or default.el. | 365 | ### Don't distribute site-init.el, site-load.el, or default.el. |
| 367 | (cd lisp | 366 | (cd lisp |
| 368 | ln [a-zA-Z]*.el ../${tempdir}/lisp | 367 | ln [a-zA-Z]*.el ../${tempdir}/lisp |
| 369 | ln [a-zA-Z]*.elc ../${tempdir}/lisp | 368 | ln [a-zA-Z]*.elc ../${tempdir}/lisp |
| 370 | ## simula.el doesn't keep abbreviations in simula.defns any more. | ||
| 371 | ## ln [a-zA-Z]*.defns ../${tempdir}/lisp | ||
| 372 | ln ChangeLog ChangeLog.*[0-9] ../${tempdir}/lisp | 369 | ln ChangeLog ChangeLog.*[0-9] ../${tempdir}/lisp |
| 373 | ln Makefile.in makefile.w32-in ../${tempdir}/lisp | 370 | ln Makefile.in makefile.w32-in ../${tempdir}/lisp |
| 374 | test -f README && ln README ../${tempdir}/lisp | 371 | ln README ../${tempdir}/lisp |
| 375 | (cd ../${tempdir}/lisp | 372 | (cd ../${tempdir}/lisp |
| 376 | rm -f TAGS =* | ||
| 377 | rm -f site-init site-init.el site-init.elc | 373 | rm -f site-init site-init.el site-init.elc |
| 378 | rm -f site-load site-load.el site-load.elc | 374 | rm -f site-load site-load.el site-load.elc |
| 379 | rm -f site-start site-start.el site-start.elc | 375 | rm -f site-start site-start.el site-start.elc |
| @@ -398,22 +394,18 @@ echo "Making links to \`lisp' and its subdirectories" | |||
| 398 | mkdir -p ../${tempdir}/lisp/$file | 394 | mkdir -p ../${tempdir}/lisp/$file |
| 399 | ln $file/[a-zA-Z0-9]*.el ../${tempdir}/lisp/$file | 395 | ln $file/[a-zA-Z0-9]*.el ../${tempdir}/lisp/$file |
| 400 | ln $file/[a-zA-Z0-9]*.elc ../${tempdir}/lisp/$file | 396 | ln $file/[a-zA-Z0-9]*.elc ../${tempdir}/lisp/$file |
| 401 | ## calc/README.priv | 397 | ## calc/README.prev |
| 402 | for f in $file/[a-zA-Z]*.xpm $file/[a-zA-Z]*.[xp]bm \ | 398 | for f in $file/README $file/ChangeLog $file/ChangeLog.*[0-9] \ |
| 403 | $file/README $file/ChangeLog $file/ChangeLog.*[0-9] \ | ||
| 404 | $file/README.prev; do | 399 | $file/README.prev; do |
| 405 | if [ -f $f ]; then | 400 | [ -f $f ] || continue |
| 406 | ln $f ../${tempdir}/lisp/$file | 401 | ln $f ../${tempdir}/lisp/$file |
| 407 | fi | ||
| 408 | done | 402 | done |
| 409 | done ) | 403 | done ) |
| 410 | 404 | ||
| 411 | echo "Making links to \`leim' and its subdirectories" | 405 | echo "Making links to \`leim' and its subdirectories" |
| 412 | ### Don't distribute TAGS, or =*.el files. | ||
| 413 | (cd leim | 406 | (cd leim |
| 414 | ln makefile.w32-in ../${tempdir}/leim | 407 | ln makefile.w32-in ../${tempdir}/leim |
| 415 | ln ChangeLog README ../${tempdir}/leim | 408 | ln ChangeLog README ../${tempdir}/leim |
| 416 | |||
| 417 | ln CXTERM-DIC/README CXTERM-DIC/*.tit ../${tempdir}/leim/CXTERM-DIC | 409 | ln CXTERM-DIC/README CXTERM-DIC/*.tit ../${tempdir}/leim/CXTERM-DIC |
| 418 | ln SKK-DIC/README SKK-DIC/SKK-JISYO.L ../${tempdir}/leim/SKK-DIC | 410 | ln SKK-DIC/README SKK-DIC/SKK-JISYO.L ../${tempdir}/leim/SKK-DIC |
| 419 | ln MISC-DIC/README MISC-DIC/*.* ../${tempdir}/leim/MISC-DIC | 411 | ln MISC-DIC/README MISC-DIC/*.* ../${tempdir}/leim/MISC-DIC |
| @@ -426,43 +418,21 @@ echo "Making links to \`leim' and its subdirectories" | |||
| 426 | rm -f ../${tempdir}/leim/quail/quick-b5.* | 418 | rm -f ../${tempdir}/leim/quail/quick-b5.* |
| 427 | rm -f ../${tempdir}/leim/quail/quick-cns.* | 419 | rm -f ../${tempdir}/leim/quail/quick-cns.* |
| 428 | rm -f ../${tempdir}/leim/quail/tsang-b5.* | 420 | rm -f ../${tempdir}/leim/quail/tsang-b5.* |
| 429 | rm -f ../${tempdir}/leim/quail/tsang-cns.* | 421 | rm -f ../${tempdir}/leim/quail/tsang-cns.*) |
| 430 | |||
| 431 | cd ../${tempdir}/leim | ||
| 432 | rm -f TAGS =* */=*) | ||
| 433 | 422 | ||
| 434 | echo "Making links to \`src'" | 423 | echo "Making links to \`src'" |
| 435 | ### Don't distribute =*.[ch] files, or the configured versions of | 424 | ### Don't distribute =*.[ch] files, or the configured versions of |
| 436 | ### config.in, paths.in, or Makefile.in, or TAGS. | 425 | ### config.in, paths.in, or Makefile.in, or TAGS. |
| 437 | (cd src | 426 | (cd src |
| 438 | echo " (It is ok if ln fails in some cases.)" | 427 | echo " (It is ok if ln fails in some cases.)" |
| 439 | ln [a-zA-Z]*.c ../${tempdir}/src | 428 | ln [a-zA-Z]*.[chm] ../${tempdir}/src |
| 440 | ln [a-zA-Z]*.h ../${tempdir}/src | ||
| 441 | ln [a-zA-Z]*.m ../${tempdir}/src | ||
| 442 | ln [a-zA-Z]*.in ../${tempdir}/src | 429 | ln [a-zA-Z]*.in ../${tempdir}/src |
| 443 | ln [a-zA-Z]*.mk ../${tempdir}/src | 430 | ln [a-zA-Z]*.mk ../${tempdir}/src |
| 444 | ## If we ended up with a symlink, or if we did not get anything | ||
| 445 | ## due to a cross-device symlink, copy the file. | ||
| 446 | for file in [a-zA-Z]*.[hcs] [a-zA-Z]*.in; do | ||
| 447 | if test -f ../${tempdir}/src/$file; then | ||
| 448 | # test -f appears to succeed for a symlink | ||
| 449 | if test -L ../${tempdir}/src/$file; then | ||
| 450 | rm ../${tempdir}/src/$file | ||
| 451 | cp -p $file ../${tempdir}/src | ||
| 452 | chmod a-w ../${tempdir}/src/$file | ||
| 453 | fi | ||
| 454 | else | ||
| 455 | rm ../${tempdir}/src/$file | ||
| 456 | cp -p $file ../${tempdir}/src | ||
| 457 | chmod a-w ../${tempdir}/src/$file | ||
| 458 | fi | ||
| 459 | done | ||
| 460 | ln README ChangeLog ChangeLog.*[0-9] ../${tempdir}/src | 431 | ln README ChangeLog ChangeLog.*[0-9] ../${tempdir}/src |
| 461 | ln makefile.w32-in ../${tempdir}/src | 432 | ln makefile.w32-in ../${tempdir}/src |
| 462 | ln .gdbinit .dbxinit ../${tempdir}/src | 433 | ln .gdbinit .dbxinit ../${tempdir}/src |
| 463 | cd ../${tempdir}/src | 434 | cd ../${tempdir}/src |
| 464 | rm -f config.h epaths.h Makefile buildobj.h | 435 | rm -f config.h epaths.h Makefile buildobj.h) |
| 465 | rm -f =* TAGS) | ||
| 466 | 436 | ||
| 467 | echo "Making links to \`src/bitmaps'" | 437 | echo "Making links to \`src/bitmaps'" |
| 468 | (cd src/bitmaps | 438 | (cd src/bitmaps |
| @@ -482,25 +452,8 @@ echo "Making links to \`lib-src'" | |||
| 482 | ln ChangeLog Makefile.in README testfile vcdiff ../${tempdir}/lib-src | 452 | ln ChangeLog Makefile.in README testfile vcdiff ../${tempdir}/lib-src |
| 483 | ln grep-changelog rcs2log rcs-checkin ../${tempdir}/lib-src | 453 | ln grep-changelog rcs2log rcs-checkin ../${tempdir}/lib-src |
| 484 | ln makefile.w32-in ../${tempdir}/lib-src | 454 | ln makefile.w32-in ../${tempdir}/lib-src |
| 485 | ## If we ended up with a symlink, or if we did not get anything | ||
| 486 | ## due to a cross-device symlink, copy the file. | ||
| 487 | for file in [a-zA-Z]*.[chy]; do | ||
| 488 | if test -f ../${tempdir}/lib-src/$file; then | ||
| 489 | # test -f appears to succeed for a symlink | ||
| 490 | if test -L ../${tempdir}/lib-src/$file; then | ||
| 491 | rm ../${tempdir}/lib-src/$file | ||
| 492 | cp $file ../${tempdir}/lib-src | ||
| 493 | chmod a-w ../${tempdir}/lib-src/$file | ||
| 494 | fi | ||
| 495 | else | ||
| 496 | rm ../${tempdir}/lib-src/$file | ||
| 497 | cp $file ../${tempdir}/lib-src | ||
| 498 | chmod a-w ../${tempdir}/lib-src/$file | ||
| 499 | fi | ||
| 500 | done | ||
| 501 | cd ../${tempdir}/lib-src | 455 | cd ../${tempdir}/lib-src |
| 502 | rm -f getopt.h | 456 | rm -f getopt.h) |
| 503 | rm -f =* TAGS) | ||
| 504 | 457 | ||
| 505 | echo "Making links to \`m4'" | 458 | echo "Making links to \`m4'" |
| 506 | (cd m4 | 459 | (cd m4 |
| @@ -508,10 +461,10 @@ echo "Making links to \`m4'" | |||
| 508 | 461 | ||
| 509 | echo "Making links to \`nt'" | 462 | echo "Making links to \`nt'" |
| 510 | (cd nt | 463 | (cd nt |
| 511 | ln emacs.manifest emacs.rc emacsclient.rc config.nt [a-z]*.c ../${tempdir}/nt | 464 | ln emacs.manifest emacs.rc emacsclient.rc config.nt ../${tempdir}/nt |
| 512 | ln nmake.defs gmake.defs subdirs.el ../${tempdir}/nt | 465 | ln emacs-src.tags nmake.defs gmake.defs subdirs.el ../${tempdir}/nt |
| 513 | ln [a-z]*.bat [a-z]*.h ../${tempdir}/nt | 466 | ln [a-z]*.bat [a-z]*.[ch] ../${tempdir}/nt |
| 514 | ln ChangeLog INSTALL README makefile.w32-in ../${tempdir}/nt) | 467 | ln ChangeLog INSTALL README README.W32 makefile.w32-in ../${tempdir}/nt) |
| 515 | 468 | ||
| 516 | echo "Making links to \`nt/inc'" | 469 | echo "Making links to \`nt/inc'" |
| 517 | (cd nt/inc | 470 | (cd nt/inc |
| @@ -537,14 +490,12 @@ echo "Making links to \`nt/icons'" | |||
| 537 | echo "Making links to \`msdos'" | 490 | echo "Making links to \`msdos'" |
| 538 | (cd msdos | 491 | (cd msdos |
| 539 | ln ChangeLog INSTALL README emacs.ico emacs.pif ../${tempdir}/msdos | 492 | ln ChangeLog INSTALL README emacs.ico emacs.pif ../${tempdir}/msdos |
| 540 | ln is_exec.c sigaction.c mainmake.v2 sed*.inp ../${tempdir}/msdos | 493 | ln is_exec.c sigaction.c mainmake.v2 sed*.inp ../${tempdir}/msdos) |
| 541 | cd ../${tempdir}/msdos | ||
| 542 | rm -f =*) | ||
| 543 | 494 | ||
| 544 | ## FIXME are DEV-NOTES and FOR-RELEASE appropriate? | 495 | ## FIXME are DEV-NOTES and FOR-RELEASE appropriate? |
| 545 | echo "Making links to \`nextstep'" | 496 | echo "Making links to \`nextstep'" |
| 546 | (cd nextstep | 497 | (cd nextstep |
| 547 | ln AUTHORS ChangeLog DEV-NOTES FOR-RELEASE README INSTALL ../${tempdir}/nextstep) | 498 | ln AUTHORS ChangeLog README INSTALL ../${tempdir}/nextstep) |
| 548 | 499 | ||
| 549 | echo "Making links to \`nextstep/Cocoa/Emacs.base/Contents'" | 500 | echo "Making links to \`nextstep/Cocoa/Emacs.base/Contents'" |
| 550 | (cd nextstep/Cocoa/Emacs.base/Contents | 501 | (cd nextstep/Cocoa/Emacs.base/Contents |
| @@ -568,83 +519,57 @@ echo "Making links to \`nextstep/GNUstep/Emacs.base/Resources'" | |||
| 568 | 519 | ||
| 569 | echo "Making links to \`oldXMenu'" | 520 | echo "Making links to \`oldXMenu'" |
| 570 | (cd oldXMenu | 521 | (cd oldXMenu |
| 571 | ln *.c *.h *.in ../${tempdir}/oldXMenu | 522 | ln *.[ch] *.in ../${tempdir}/oldXMenu |
| 572 | ln README ChangeLog ../${tempdir}/oldXMenu) | 523 | ln README ChangeLog ../${tempdir}/oldXMenu) |
| 573 | 524 | ||
| 574 | echo "Making links to \`lwlib'" | 525 | echo "Making links to \`lwlib'" |
| 575 | (cd lwlib | 526 | (cd lwlib |
| 576 | ln *.c *.h *.in ../${tempdir}/lwlib | 527 | ln *.[ch] *.in ../${tempdir}/lwlib |
| 577 | ln README ChangeLog ../${tempdir}/lwlib) | 528 | ln README ChangeLog ../${tempdir}/lwlib) |
| 578 | 529 | ||
| 579 | echo "Making links to \`etc'" | 530 | echo "Making links to \`etc'" |
| 580 | ### Don't distribute = files, TAGS, DOC files, backups, autosaves, or | ||
| 581 | ### tex litter. | ||
| 582 | (cd etc | 531 | (cd etc |
| 583 | files=`ls -d * | grep -v '^e$' \ | 532 | for f in *; do |
| 584 | | grep -v '^charsets$' | grep -v '^gnus$' | grep -v '^images$' | grep -v '^nxml$' \ | 533 | [ -f "$f" ] || continue |
| 585 | | grep -v '^refcards$' | grep -v '^tutorials$'| grep -v '^schema$'` | 534 | case "$f" in |
| 586 | ln $files ../${tempdir}/etc | 535 | DOC*) continue ;; |
| 587 | ## If we ended up with a symlink, or if we did not get anything | 536 | esac |
| 588 | ## due to a cross-device symlink, copy the file. | 537 | ln $f ../${tempdir}/etc |
| 589 | for file in $files; do | 538 | done) |
| 590 | if test -f ../${tempdir}/etc/$file; then | ||
| 591 | # test -f appears to succeed for a symlink | ||
| 592 | if test -L ../${tempdir}/etc/$file; then | ||
| 593 | rm ../${tempdir}/etc/$file | ||
| 594 | cp $file ../${tempdir}/etc | ||
| 595 | chmod a-w ../${tempdir}/etc/$file | ||
| 596 | fi | ||
| 597 | else | ||
| 598 | rm ../${tempdir}/etc/$file | ||
| 599 | cp $file ../${tempdir}/etc | ||
| 600 | chmod a-w ../${tempdir}/etc/$file | ||
| 601 | fi | ||
| 602 | done | ||
| 603 | cd ../${tempdir}/etc | ||
| 604 | rm -f fns*.el | ||
| 605 | rm -f DOC* *~ \#*\# *.dvi *.log *.orig *.rej *,v =* core | ||
| 606 | rm -f TAGS) | ||
| 607 | 539 | ||
| 608 | for dir in etc/charsets etc/e etc/gnus etc/nxml etc/tutorials etc/refcards etc/schema ; do | 540 | for dir in etc/*/; do |
| 541 | case "$dir" in | ||
| 542 | etc/images/) continue ;; | ||
| 543 | esac | ||
| 609 | echo "Making links to \`${dir}'" | 544 | echo "Making links to \`${dir}'" |
| 610 | (cd ${dir} | 545 | (cd ${dir} |
| 611 | ln `ls -d *` ../../${tempdir}/${dir} | 546 | ln * ../../${tempdir}/${dir}) |
| 612 | cd ../../${tempdir}/${dir} | ||
| 613 | rm -f *~ \#*\# *,v =* core) | ||
| 614 | done | 547 | done |
| 615 | 548 | ||
| 616 | echo "Making links to \`etc/images'" | 549 | echo "Making links to \`etc/images'" |
| 617 | (cd etc/images | 550 | (cd etc/images |
| 618 | for f in *; do | 551 | for f in *; do |
| 619 | [ -f "$f" ] || continue | 552 | [ -f "$f" ] || continue |
| 620 | case $f in | ||
| 621 | (*~|\#*\#|*,v|=*|core) continue ;; | ||
| 622 | esac | ||
| 623 | ln $f ../../${tempdir}/etc/images | 553 | ln $f ../../${tempdir}/etc/images |
| 624 | done) | 554 | done) |
| 625 | 555 | ||
| 626 | for dir in etc/images/custom etc/images/ezimage etc/images/gnus \ | 556 | for dir in etc/images/*/; do |
| 627 | etc/images/gud etc/images/icons etc/images/low-color etc/images/mail \ | ||
| 628 | etc/images/mpc etc/images/smilies ; do | ||
| 629 | echo "Making links to \`${dir}'" | 557 | echo "Making links to \`${dir}'" |
| 630 | (cd ${dir} | 558 | (cd ${dir} |
| 631 | for f in *; do | 559 | for f in *; do |
| 632 | [ -f "$f" ] || continue | 560 | [ -f "$f" ] || continue |
| 633 | case $f in | ||
| 634 | (*~|\#*\#|*,v|=*|core) continue ;; | ||
| 635 | esac | ||
| 636 | ln $f ../../../${tempdir}/${dir} | 561 | ln $f ../../../${tempdir}/${dir} |
| 637 | done | 562 | done |
| 638 | ) | 563 | ) |
| 639 | done | 564 | done |
| 640 | 565 | ||
| 641 | for dir in etc/images/tree-widget/default etc/images/tree-widget/folder \ | 566 | for dir in etc/images/*/*/; do |
| 642 | etc/images/smilies/grayscale etc/images/smilies/medium; do | 567 | case "$dir" in |
| 568 | etc/images/icons/hicolor/) continue ;; | ||
| 569 | esac | ||
| 643 | echo "Making links to \`${dir}'" | 570 | echo "Making links to \`${dir}'" |
| 644 | (cd ${dir} | 571 | (cd ${dir} |
| 645 | ln `ls -d *` ../../../../${tempdir}/${dir} | 572 | ln `ls -d *` ../../../../${tempdir}/${dir}) |
| 646 | cd ../../../../${tempdir}/${dir} | ||
| 647 | rm -f *~ \#*\# *,v =* core) | ||
| 648 | done | 573 | done |
| 649 | 574 | ||
| 650 | for dir in etc/images/icons/hicolor/*/apps \ | 575 | for dir in etc/images/icons/hicolor/*/apps \ |
| @@ -652,73 +577,37 @@ for dir in etc/images/icons/hicolor/*/apps \ | |||
| 652 | echo "Making links to \`${dir}'" | 577 | echo "Making links to \`${dir}'" |
| 653 | (cd ${dir} | 578 | (cd ${dir} |
| 654 | ln `ls -d *` ../../../../../../${tempdir}/${dir} | 579 | ln `ls -d *` ../../../../../../${tempdir}/${dir} |
| 655 | cd ../../../../../../${tempdir}/${dir} | 580 | cd ../../../../../../${tempdir}/${dir}) |
| 656 | rm -f *~ \#*\# *,v =* core) | ||
| 657 | done | 581 | done |
| 658 | 582 | ||
| 659 | echo "Making links to \`info'" | 583 | echo "Making links to \`info'" |
| 660 | # Don't distribute backups or autosaves. | ||
| 661 | (cd info | 584 | (cd info |
| 662 | ln `find . -type f -print` ../${tempdir}/info | 585 | ln `find . -type f -print` ../${tempdir}/info) |
| 663 | #ln [a-zA-Z]* ../${tempdir}/info | 586 | |
| 664 | cd ../${tempdir}/info | ||
| 665 | # Avoid an error when expanding the wildcards later. | ||
| 666 | ln emacs dummy~ ; ln emacs \#dummy\# | ||
| 667 | rm -f *~ \#*\# core .arch-inventory .gitignore) | ||
| 668 | |||
| 669 | # FIXME ? Why including *.aux etc? | ||
| 670 | echo "Making links to \`doc/emacs'" | 587 | echo "Making links to \`doc/emacs'" |
| 671 | (cd doc/emacs | 588 | (cd doc/emacs |
| 672 | ln *.texi *.aux *.fns *.kys *.vrs ../../${tempdir}/doc/emacs | 589 | ln *.texi *.in makefile.w32-in ChangeLog* ../../${tempdir}/doc/emacs) |
| 673 | ln makefile.w32-in ../../${tempdir}/doc/emacs | ||
| 674 | test -f Makefile.in && ln Makefile.in ../../${tempdir}/doc/emacs | ||
| 675 | ln ChangeLog ../../${tempdir}/doc/emacs | ||
| 676 | cd ../../${tempdir}/doc/emacs | ||
| 677 | rm -f \#*\# =* *~ core emacs-index* *.Z *.z xmail | ||
| 678 | rm -f emacs.?? termcap.?? gdb.?? *.log *.toc *.dvi *.oaux) | ||
| 679 | 590 | ||
| 680 | echo "Making links to \`doc/misc'" | 591 | echo "Making links to \`doc/misc'" |
| 681 | (cd doc/misc | 592 | (cd doc/misc |
| 682 | ln *.texi *.aux *.fns *.kys *.vrs ../../${tempdir}/doc/misc | 593 | ln *.texi *.tex *.in makefile.w32-in gnus-news.el ChangeLog* ../../${tempdir}/doc/misc) |
| 683 | ln makefile.w32-in ../../${tempdir}/doc/misc | 594 | |
| 684 | ln gnus-news.el ../../${tempdir}/doc/misc | ||
| 685 | test -f README && ln README ../../${tempdir}/doc/misc | ||
| 686 | test -f Makefile.in && ln Makefile.in ../../${tempdir}/doc/misc | ||
| 687 | ln ChangeLog ../../${tempdir}/doc/misc | ||
| 688 | cp texinfo.tex ../../${tempdir}/doc/misc | ||
| 689 | cd ../../${tempdir}/doc/misc | ||
| 690 | rm -f \#*\# =* *~ core emacs-index* *.Z *.z xmail | ||
| 691 | rm -f emacs.?? termcap.?? gdb.?? *.log *.toc *.dvi *.oaux) | ||
| 692 | |||
| 693 | ## FIXME book-spine.texinfo unused? | ||
| 694 | echo "Making links to \`doc/lispref'" | 595 | echo "Making links to \`doc/lispref'" |
| 695 | (cd doc/lispref | 596 | (cd doc/lispref |
| 696 | ln *.texi *.aux *.fns *.kys *.vrs ../../${tempdir}/doc/lispref | 597 | ln *.texi *.in makefile.w32-in README ChangeLog* ../../${tempdir}/doc/lispref |
| 697 | ln *.txt *.el spellfile tindex.pl ../../${tempdir}/doc/lispref | 598 | ln *.txt *.el spellfile tindex.pl ../../${tempdir}/doc/lispref |
| 698 | ln makefile.w32-in ../../${tempdir}/doc/lispref | 599 | ln two-volume.make ../../${tempdir}/doc/lispref) |
| 699 | ln book-spine.texinfo two-volume.make ../../${tempdir}/doc/lispref | ||
| 700 | test -f README && ln README ../../${tempdir}/doc/lispref | ||
| 701 | test -f Makefile.in && ln Makefile.in ../../${tempdir}/doc/lispref | ||
| 702 | ln ChangeLog ../../${tempdir}/doc/lispref | ||
| 703 | cd ../../${tempdir}/doc/lispref | ||
| 704 | rm -f \#*\# =* *~ core elisp-index* *.Z *.z xmail | ||
| 705 | rm -f elisp.?? *.log *.toc *.dvi *.oaux) | ||
| 706 | 600 | ||
| 707 | echo "Making links to \`doc/lispintro'" | 601 | echo "Making links to \`doc/lispintro'" |
| 708 | (cd doc/lispintro | 602 | (cd doc/lispintro |
| 709 | ln *.texi *.aux *.fns *.kys *.vrs *.eps *.pdf ../../${tempdir}/doc/lispintro | 603 | ln *.texi *.in makefile.w32-in *.eps *.pdf ../../${tempdir}/doc/lispintro |
| 710 | ln makefile.w32-in ../../${tempdir}/doc/lispintro | 604 | ln README ChangeLog* ../../${tempdir}/doc/lispintro |
| 711 | test -f README && ln README ../../${tempdir}/doc/lispintro | 605 | cd ../../${tempdir}/doc/lispintro) |
| 712 | test -f Makefile.in && ln Makefile.in ../../${tempdir}/doc/lispintro | ||
| 713 | ln ChangeLog ../../${tempdir}/doc/lispintro | ||
| 714 | cd ../../${tempdir}/doc/lispintro | ||
| 715 | rm -f \#*\# =* *~ core *.Z *.z xmail | ||
| 716 | rm -f emacs-lisp-intro.?? *.log *.toc *.dvi *.oaux) | ||
| 717 | 606 | ||
| 718 | echo "Making links to \`doc/man'" | 607 | echo "Making links to \`doc/man'" |
| 719 | (cd doc/man | 608 | (cd doc/man |
| 720 | ln *.1 ../../${tempdir}/doc/man | 609 | ln ChangeLog* *.1 ../../${tempdir}/doc/man |
| 721 | ln ChangeLog ../../${tempdir}/doc/man) | 610 | cd ../../${tempdir}/doc/man) |
| 722 | 611 | ||
| 723 | ### It would be nice if they could all be symlinks to top-level copy, but | 612 | ### It would be nice if they could all be symlinks to top-level copy, but |
| 724 | ### you're not supposed to have any symlinks in distribution tar files. | 613 | ### you're not supposed to have any symlinks in distribution tar files. |
| @@ -736,6 +625,10 @@ if [ "${newer}" ]; then | |||
| 736 | find ${tempparent} \( -name '*.elc' -o ! -newer ${newer} \) -exec rm -f {} \; | 625 | find ${tempparent} \( -name '*.elc' -o ! -newer ${newer} \) -exec rm -f {} \; |
| 737 | fi | 626 | fi |
| 738 | 627 | ||
| 628 | ## Don't distribute backups, autosaves, etc. | ||
| 629 | echo "Removing unwanted files" | ||
| 630 | find ${tempparent} \( -name '*~' -o -name '#*#' -o -name '.*ignore' -o -name '=*' -o -name 'TAGS' \) -exec rm -f {} \; | ||
| 631 | |||
| 739 | if [ "${make_tar}" = yes ]; then | 632 | if [ "${make_tar}" = yes ]; then |
| 740 | if [ "${default_gzip}" = "" ]; then | 633 | if [ "${default_gzip}" = "" ]; then |
| 741 | echo "Looking for gzip" | 634 | echo "Looking for gzip" |