diff options
| author | Stefan Monnier | 2010-10-15 17:55:33 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2010-10-15 17:55:33 -0400 |
| commit | 0c747cb143fa227e78f350ac353d703f489209df (patch) | |
| tree | 5b434055c797bd75eaa1e3d9d0773e586d44daee /make-dist | |
| parent | a01a7932080e8a6e7bc8472c58cefabcc2c37df3 (diff) | |
| parent | aa095b2db98ae149737f8de00ee733b1d257ed33 (diff) | |
| download | emacs-0c747cb143fa227e78f350ac353d703f489209df.tar.gz emacs-0c747cb143fa227e78f350ac353d703f489209df.zip | |
Merge from trunk
Diffstat (limited to 'make-dist')
| -rwxr-xr-x | make-dist | 463 |
1 files changed, 118 insertions, 345 deletions
| @@ -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 | ||
| @@ -46,6 +49,7 @@ update=yes | |||
| 46 | check=yes | 49 | check=yes |
| 47 | clean_up=no | 50 | clean_up=no |
| 48 | make_tar=no | 51 | make_tar=no |
| 52 | default_gzip=gzip | ||
| 49 | newer="" | 53 | newer="" |
| 50 | 54 | ||
| 51 | while [ $# -gt 0 ]; do | 55 | while [ $# -gt 0 ]; do |
| @@ -75,12 +79,7 @@ while [ $# -gt 0 ]; do | |||
| 75 | new_extension=".new" | 79 | new_extension=".new" |
| 76 | shift | 80 | shift |
| 77 | ;; | 81 | ;; |
| 78 | ## This option tells make-dist to use `compress' instead of gzip. | 82 | ## This option tells make-dist to use `bzip2' instead of gzip. |
| 79 | ## Normally, make-dist uses gzip whenever it is present. | ||
| 80 | "--compress") | ||
| 81 | default_gzip="compress" | ||
| 82 | ;; | ||
| 83 | ## Same with bzip2. | ||
| 84 | "--bzip2") | 83 | "--bzip2") |
| 85 | default_gzip="bzip2" | 84 | default_gzip="bzip2" |
| 86 | ;; | 85 | ;; |
| @@ -101,7 +100,6 @@ while [ $# -gt 0 ]; do | |||
| 101 | echo "" | 100 | echo "" |
| 102 | echo " --bzip2 use bzip2 instead of gzip" | 101 | echo " --bzip2 use bzip2 instead of gzip" |
| 103 | echo " --clean-up delete staging directories when done" | 102 | echo " --clean-up delete staging directories when done" |
| 104 | echo " --compress use compress instead of gzip" | ||
| 105 | echo " --lzma use lzma instead of gzip" | 103 | echo " --lzma use lzma instead of gzip" |
| 106 | echo " --newer=TIME don't include files older than TIME" | 104 | echo " --newer=TIME don't include files older than TIME" |
| 107 | echo " --no-check don't check for bad file names etc." | 105 | echo " --no-check don't check for bad file names etc." |
| @@ -150,23 +148,19 @@ then | |||
| 150 | fi | 148 | fi |
| 151 | 149 | ||
| 152 | ### Find out which version of Emacs this is. | 150 | ### Find out which version of Emacs this is. |
| 153 | shortversion=`grep 'char emacs_version' src/emacs.c \ | 151 | version=`sed -n '/char emacs_version/ s/^[^"]*"\([^"]*\)".*$/\1/p' src/emacs.c` |
| 154 | | sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'` | ||
| 155 | version=`grep 'char emacs_version' src/emacs.c \ | ||
| 156 | | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'` | ||
| 157 | if [ ! "${version}" ]; then | 152 | if [ ! "${version}" ]; then |
| 158 | echo "${progname}: can't find current Emacs version in \`./src/emacs.c'" >&2 | 153 | echo "${progname}: can't find current Emacs version in \`./src/emacs.c'" >&2 |
| 159 | exit 1 | 154 | exit 1 |
| 160 | fi | 155 | fi |
| 161 | 156 | ||
| 162 | echo Version numbers are $version and $shortversion | 157 | echo Version number is $version |
| 163 | 158 | ||
| 164 | if [ $update = yes ]; | 159 | if [ $update = yes ]; then |
| 165 | then | 160 | if ! grep -q "@set EMACSVER *${version}" doc/emacs/emacsver.texi || \ |
| 166 | if grep -s "@set EMACSVER *${shortversion}" ./doc/emacs/emacs.texi > /dev/null; then | 161 | ! grep -q "tree holds version *${version}" README; then |
| 167 | true | 162 | echo "WARNING: README and/or emacsver.texi have the wrong version number" |
| 168 | else | 163 | echo "Consider running M-x set-version from admin/admin.el" |
| 169 | echo "You must update the version number in \`./doc/emacs/emacs.texi'" | ||
| 170 | sleep 5 | 164 | sleep 5 |
| 171 | fi | 165 | fi |
| 172 | fi | 166 | fi |
| @@ -247,7 +241,7 @@ if [ "x`ls -t configure configure.in | sed q`" != "xconfigure" ]; then | |||
| 247 | autoconf || { x=$?; echo Autoconf FAILED! >&2; exit $x; } | 241 | autoconf || { x=$?; echo Autoconf FAILED! >&2; exit $x; } |
| 248 | fi | 242 | fi |
| 249 | 243 | ||
| 250 | ### Make sure src/config-in.stamp is newer than configure.in. | 244 | ### 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 | 245 | 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 | 246 | echo "\`./configure.in' is newer than \`./src/stamp-h.in'" >&2 |
| 253 | echo "Running autoheader" >&2 | 247 | echo "Running autoheader" >&2 |
| @@ -259,10 +253,10 @@ fi | |||
| 259 | if [ $update = yes ]; | 253 | if [ $update = yes ]; |
| 260 | then | 254 | then |
| 261 | echo "Updating Info files" | 255 | echo "Updating Info files" |
| 262 | (cd doc/emacs; make -f Makefile.in srcdir=. info) | 256 | (cd doc/emacs; make info) |
| 263 | (cd doc/misc; make -f Makefile.in srcdir=. info) | 257 | (cd doc/misc; make info) |
| 264 | (cd doc/lispref; make -f Makefile.in srcdir=. info) | 258 | (cd doc/lispref; make info) |
| 265 | (cd doc/lispintro; make -f Makefile.in SHELL=/bin/sh srcdir=. info VPATH=.) | 259 | (cd doc/lispintro; make info) |
| 266 | 260 | ||
| 267 | echo "Updating finder, custom and autoload data" | 261 | echo "Updating finder, custom and autoload data" |
| 268 | (cd lisp; make updates EMACS="$EMACS") | 262 | (cd lisp; make updates EMACS="$EMACS") |
| @@ -276,21 +270,17 @@ then | |||
| 276 | $EMACS -batch -f batch-byte-recompile-directory lisp leim | 270 | $EMACS -batch -f batch-byte-recompile-directory lisp leim |
| 277 | fi | 271 | fi |
| 278 | 272 | ||
| 273 | ## What is this file for? It goes in srcdir, not the tarfile. | ||
| 274 | ## Why does it exclude term/ ? | ||
| 279 | echo "Making lisp/MANIFEST" | 275 | echo "Making lisp/MANIFEST" |
| 280 | 276 | ||
| 281 | (cd lisp; | 277 | files=`find lisp -type f -name '*.el'` |
| 282 | files=`echo [!=]*.el | sed -e 's/ subdirs.el / /' -e 's/ default.el / /'` | 278 | for file in $files; do |
| 283 | for dir in [!=]*; do | 279 | case "$file" in |
| 284 | if [ -d $dir ] && [ $dir != term ] | 280 | */subdirs.el|*/default.el|*/loaddefs.el|*/term/*) continue ;; |
| 285 | then | 281 | esac |
| 286 | echo $dir | 282 | sed -n 's/^;;; //p; q' $file |
| 287 | thisdir=`echo $dir/[!=]*.el | sed -e 's/ subdirs.el / /'` | 283 | done | sort > lisp/MANIFEST |
| 288 | files="$files $thisdir" | ||
| 289 | fi | ||
| 290 | done | ||
| 291 | for file in $files | ||
| 292 | do sed -n 's/^;;; //p; q' $file | ||
| 293 | done | sort > MANIFEST) | ||
| 294 | 284 | ||
| 295 | echo "Creating staging directory: \`${tempparent}'" | 285 | echo "Creating staging directory: \`${tempparent}'" |
| 296 | 286 | ||
| @@ -300,7 +290,7 @@ tempdir="${tempparent}/${emacsname}" | |||
| 300 | ### This trap ensures that the staging directory will be cleaned up even | 290 | ### This trap ensures that the staging directory will be cleaned up even |
| 301 | ### when the script is interrupted in mid-career. | 291 | ### when the script is interrupted in mid-career. |
| 302 | if [ "${clean_up}" = yes ]; then | 292 | if [ "${clean_up}" = yes ]; then |
| 303 | trap "echo 'Interrupted...cleaning up the staging directory'; rm -rf ${tempparent}; exit 1" 1 2 15 | 293 | trap "echo 'Cleaning up the staging directory'; rm -rf ${tempparent}" EXIT |
| 304 | fi | 294 | fi |
| 305 | 295 | ||
| 306 | echo "Creating top directory: \`${tempdir}'" | 296 | echo "Creating top directory: \`${tempdir}'" |
| @@ -314,38 +304,17 @@ echo "Making links to top-level files" | |||
| 314 | ln INSTALL README BUGS move-if-change ${tempdir} | 304 | ln INSTALL README BUGS move-if-change ${tempdir} |
| 315 | ln ChangeLog Makefile.in configure configure.in ${tempdir} | 305 | ln ChangeLog Makefile.in configure configure.in ${tempdir} |
| 316 | ln config.bat make-dist update-subdirs vpath.sed .dir-locals.el ${tempdir} | 306 | ln config.bat make-dist update-subdirs vpath.sed .dir-locals.el ${tempdir} |
| 317 | ### Copy these files; they're cross-filesystem symlinks. | 307 | 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 | |||
| 323 | echo "Updating version number in README" | ||
| 324 | (cd ${tempdir} | ||
| 325 | awk \ | ||
| 326 | '$1 " " $2 " " $3 " " $4 " " $5 == "This directory tree holds version" { $6 = version; print $0 } | ||
| 327 | $1 " " $2 " " $3 " " $4 " " $5 != "This directory tree holds version"' \ | ||
| 328 | version=${version} README > tmp.README | ||
| 329 | mv -f tmp.README README) | ||
| 330 | |||
| 331 | 308 | ||
| 332 | echo "Creating subdirectories" | 309 | echo "Creating subdirectories" |
| 333 | for subdir in lisp site-lisp \ | 310 | for subdir in site-lisp \ |
| 334 | leim leim/CXTERM-DIC leim/MISC-DIC \ | 311 | leim leim/CXTERM-DIC leim/MISC-DIC \ |
| 335 | leim/SKK-DIC leim/ja-dic leim/quail \ | 312 | leim/SKK-DIC leim/ja-dic leim/quail \ |
| 336 | src src/m src/s src/bitmaps lib-src oldXMenu lwlib \ | 313 | src src/m src/s src/bitmaps lib-src oldXMenu lwlib \ |
| 337 | nt nt/inc nt/inc/sys nt/inc/arpa nt/inc/netinet nt/icons \ | 314 | nt nt/inc nt/inc/sys nt/inc/arpa nt/inc/netinet nt/icons \ |
| 338 | etc etc/charsets etc/e etc/gnus etc/nxml \ | 315 | `find etc lisp -type d` \ |
| 339 | etc/images etc/images/custom etc/images/ezimage etc/images/gnus \ | 316 | doc doc/emacs doc/misc doc/man doc/lispref doc/lispintro \ |
| 340 | etc/images/gud etc/images/icons etc/images/icons/hicolor \ | 317 | info m4 msdos \ |
| 341 | etc/images/icons/hicolor/*x* etc/images/icons/hicolor/scalable \ | ||
| 342 | etc/images/icons/hicolor/*/apps etc/images/icons/hicolor/*/mimetypes \ | ||
| 343 | etc/images/low-color etc/images/mail etc/images/mpc \ | ||
| 344 | etc/images/smilies etc/images/smilies/grayscale \ | ||
| 345 | etc/images/smilies/medium etc/images/tree-widget \ | ||
| 346 | etc/images/tree-widget/default etc/images/tree-widget/folder \ | ||
| 347 | etc/refcards etc/schema etc/tutorials info doc doc/emacs \ | ||
| 348 | doc/misc doc/man doc/lispref doc/lispintro m4 msdos \ | ||
| 349 | nextstep nextstep/Cocoa nextstep/Cocoa/Emacs.base \ | 318 | nextstep nextstep/Cocoa nextstep/Cocoa/Emacs.base \ |
| 350 | nextstep/Cocoa/Emacs.base/Contents \ | 319 | nextstep/Cocoa/Emacs.base/Contents \ |
| 351 | nextstep/Cocoa/Emacs.base/Contents/Resources \ | 320 | nextstep/Cocoa/Emacs.base/Contents/Resources \ |
| @@ -363,57 +332,21 @@ do | |||
| 363 | done | 332 | done |
| 364 | 333 | ||
| 365 | echo "Making links to \`lisp' and its subdirectories" | 334 | echo "Making links to \`lisp' and its subdirectories" |
| 366 | ### Don't distribute TAGS, =*.el files, site-init.el, site-load.el, or default.el. | 335 | files=`find lisp \( -name '*.el' -o -name '*.elc' -o -name 'ChangeLog*' \ |
| 367 | (cd lisp | 336 | -o -name 'README*' \)` |
| 368 | ln [a-zA-Z]*.el ../${tempdir}/lisp | 337 | |
| 369 | ln [a-zA-Z]*.elc ../${tempdir}/lisp | 338 | ### Don't distribute site-init.el, site-load.el, or default.el. |
| 370 | ## simula.el doesn't keep abbreviations in simula.defns any more. | 339 | for file in lisp/Makefile.in lisp/makefile.w32-in $files; do |
| 371 | ## ln [a-zA-Z]*.defns ../${tempdir}/lisp | 340 | case $file in |
| 372 | ln ChangeLog ChangeLog.*[0-9] ../${tempdir}/lisp | 341 | */site-init*|*/site-load*|*/default*) continue ;; |
| 373 | ln Makefile.in makefile.w32-in ../${tempdir}/lisp | 342 | esac |
| 374 | test -f README && ln README ../${tempdir}/lisp | 343 | ln $file $tempdir/$file |
| 375 | (cd ../${tempdir}/lisp | 344 | done |
| 376 | rm -f TAGS =* | ||
| 377 | rm -f site-init site-init.el site-init.elc | ||
| 378 | rm -f site-load site-load.el site-load.elc | ||
| 379 | rm -f site-start site-start.el site-start.elc | ||
| 380 | rm -f default default.el default.elc | ||
| 381 | ) | ||
| 382 | |||
| 383 | ## Find all subdirs of lisp dir | ||
| 384 | for file in `find . -type d -print`; do | ||
| 385 | case $file in | ||
| 386 | . | .. | */=*) | ||
| 387 | ;; | ||
| 388 | *) | ||
| 389 | if [ -d $file ]; then | ||
| 390 | subdirs="$file $subdirs" | ||
| 391 | fi | ||
| 392 | ;; | ||
| 393 | esac | ||
| 394 | done | ||
| 395 | |||
| 396 | for file in $subdirs; do | ||
| 397 | echo " lisp/$file" | ||
| 398 | mkdir -p ../${tempdir}/lisp/$file | ||
| 399 | ln $file/[a-zA-Z0-9]*.el ../${tempdir}/lisp/$file | ||
| 400 | ln $file/[a-zA-Z0-9]*.elc ../${tempdir}/lisp/$file | ||
| 401 | ## calc/README.priv | ||
| 402 | for f in $file/[a-zA-Z]*.xpm $file/[a-zA-Z]*.[xp]bm \ | ||
| 403 | $file/README $file/ChangeLog $file/ChangeLog.*[0-9] \ | ||
| 404 | $file/README.prev; do | ||
| 405 | if [ -f $f ]; then | ||
| 406 | ln $f ../${tempdir}/lisp/$file | ||
| 407 | fi | ||
| 408 | done | ||
| 409 | done ) | ||
| 410 | 345 | ||
| 411 | echo "Making links to \`leim' and its subdirectories" | 346 | echo "Making links to \`leim' and its subdirectories" |
| 412 | ### Don't distribute TAGS, or =*.el files. | ||
| 413 | (cd leim | 347 | (cd leim |
| 414 | ln makefile.w32-in ../${tempdir}/leim | 348 | ln makefile.w32-in ../${tempdir}/leim |
| 415 | ln ChangeLog README ../${tempdir}/leim | 349 | ln ChangeLog README ../${tempdir}/leim |
| 416 | |||
| 417 | ln CXTERM-DIC/README CXTERM-DIC/*.tit ../${tempdir}/leim/CXTERM-DIC | 350 | 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 | 351 | ln SKK-DIC/README SKK-DIC/SKK-JISYO.L ../${tempdir}/leim/SKK-DIC |
| 419 | ln MISC-DIC/README MISC-DIC/*.* ../${tempdir}/leim/MISC-DIC | 352 | ln MISC-DIC/README MISC-DIC/*.* ../${tempdir}/leim/MISC-DIC |
| @@ -426,43 +359,21 @@ echo "Making links to \`leim' and its subdirectories" | |||
| 426 | rm -f ../${tempdir}/leim/quail/quick-b5.* | 359 | rm -f ../${tempdir}/leim/quail/quick-b5.* |
| 427 | rm -f ../${tempdir}/leim/quail/quick-cns.* | 360 | rm -f ../${tempdir}/leim/quail/quick-cns.* |
| 428 | rm -f ../${tempdir}/leim/quail/tsang-b5.* | 361 | rm -f ../${tempdir}/leim/quail/tsang-b5.* |
| 429 | rm -f ../${tempdir}/leim/quail/tsang-cns.* | 362 | rm -f ../${tempdir}/leim/quail/tsang-cns.*) |
| 430 | |||
| 431 | cd ../${tempdir}/leim | ||
| 432 | rm -f TAGS =* */=*) | ||
| 433 | 363 | ||
| 434 | echo "Making links to \`src'" | 364 | echo "Making links to \`src'" |
| 435 | ### Don't distribute =*.[ch] files, or the configured versions of | 365 | ### Don't distribute the configured versions of |
| 436 | ### config.in, paths.in, or Makefile.in, or TAGS. | 366 | ### config.in, paths.in, buildobj.h, or Makefile.in. |
| 437 | (cd src | 367 | (cd src |
| 438 | echo " (It is ok if ln fails in some cases.)" | 368 | echo " (It is ok if ln fails in some cases.)" |
| 439 | ln [a-zA-Z]*.c ../${tempdir}/src | 369 | 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 | 370 | ln [a-zA-Z]*.in ../${tempdir}/src |
| 443 | ln [a-zA-Z]*.mk ../${tempdir}/src | 371 | 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 | 372 | ln README ChangeLog ChangeLog.*[0-9] ../${tempdir}/src |
| 461 | ln makefile.w32-in ../${tempdir}/src | 373 | ln makefile.w32-in ../${tempdir}/src |
| 462 | ln .gdbinit .dbxinit ../${tempdir}/src | 374 | ln .gdbinit .dbxinit ../${tempdir}/src |
| 463 | cd ../${tempdir}/src | 375 | cd ../${tempdir}/src |
| 464 | rm -f config.h epaths.h Makefile | 376 | rm -f config.h epaths.h Makefile buildobj.h) |
| 465 | rm -f =* TAGS) | ||
| 466 | 377 | ||
| 467 | echo "Making links to \`src/bitmaps'" | 378 | echo "Making links to \`src/bitmaps'" |
| 468 | (cd src/bitmaps | 379 | (cd src/bitmaps |
| @@ -478,56 +389,29 @@ echo "Making links to \`src/s'" | |||
| 478 | 389 | ||
| 479 | echo "Making links to \`lib-src'" | 390 | echo "Making links to \`lib-src'" |
| 480 | (cd lib-src | 391 | (cd lib-src |
| 481 | ln [a-zA-Z]*.[chmy] ../${tempdir}/lib-src | 392 | ln [a-zA-Z]*.[ch] ../${tempdir}/lib-src |
| 482 | ln ChangeLog Makefile.in README testfile vcdiff ../${tempdir}/lib-src | 393 | ln ChangeLog Makefile.in README testfile vcdiff ../${tempdir}/lib-src |
| 483 | ln b2m.pl grep-changelog rcs2log rcs-checkin ../${tempdir}/lib-src | 394 | ln grep-changelog rcs2log rcs-checkin ../${tempdir}/lib-src |
| 484 | ln makefile.w32-in ../${tempdir}/lib-src | 395 | 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 | 396 | cd ../${tempdir}/lib-src |
| 502 | rm -f getopt.h | 397 | rm -f getopt.h) |
| 503 | rm -f =* TAGS) | ||
| 504 | 398 | ||
| 505 | echo "Making links to \`m4'" | 399 | echo "Making links to \`m4'" |
| 506 | (cd m4 | 400 | (cd m4 |
| 507 | ln *.m4 ../${tempdir}/m4) | 401 | ln *.m4 ../${tempdir}/m4) |
| 508 | 402 | ||
| 403 | ## Exclude README.W32 because it is specific to pre-built binaries(?). | ||
| 509 | echo "Making links to \`nt'" | 404 | echo "Making links to \`nt'" |
| 510 | (cd nt | 405 | (cd nt |
| 511 | ln emacs.manifest emacs.rc emacsclient.rc config.nt [a-z]*.c ../${tempdir}/nt | 406 | ln emacs.manifest emacs.rc emacsclient.rc config.nt ../${tempdir}/nt |
| 512 | ln nmake.defs gmake.defs subdirs.el ../${tempdir}/nt | 407 | ln emacs-src.tags nmake.defs gmake.defs subdirs.el ../${tempdir}/nt |
| 513 | ln [a-z]*.bat [a-z]*.h ../${tempdir}/nt | 408 | ln [a-z]*.bat [a-z]*.[ch] ../${tempdir}/nt |
| 514 | ln ChangeLog INSTALL README makefile.w32-in ../${tempdir}/nt) | 409 | ln ChangeLog INSTALL README makefile.w32-in ../${tempdir}/nt) |
| 515 | 410 | ||
| 516 | echo "Making links to \`nt/inc'" | 411 | echo "Making links to \`nt/inc' and its subdirectories" |
| 517 | (cd nt/inc | 412 | for f in `find nt/inc -type f -name '[a-z]*.h'`; do |
| 518 | ln [a-z]*.h ../../${tempdir}/nt/inc) | 413 | ln $f $tempdir/$f |
| 519 | 414 | done | |
| 520 | echo "Making links to \`nt/inc/sys'" | ||
| 521 | (cd nt/inc/sys | ||
| 522 | ln [a-z]*.h ../../../${tempdir}/nt/inc/sys) | ||
| 523 | |||
| 524 | echo "Making links to \`nt/inc/arpa'" | ||
| 525 | (cd nt/inc/arpa | ||
| 526 | ln [a-z]*.h ../../../${tempdir}/nt/inc/arpa) | ||
| 527 | |||
| 528 | echo "Making links to \`nt/inc/netinet'" | ||
| 529 | (cd nt/inc/netinet | ||
| 530 | ln [a-z]*.h ../../../${tempdir}/nt/inc/netinet) | ||
| 531 | 415 | ||
| 532 | echo "Making links to \`nt/icons'" | 416 | echo "Making links to \`nt/icons'" |
| 533 | (cd nt/icons | 417 | (cd nt/icons |
| @@ -537,14 +421,11 @@ echo "Making links to \`nt/icons'" | |||
| 537 | echo "Making links to \`msdos'" | 421 | echo "Making links to \`msdos'" |
| 538 | (cd msdos | 422 | (cd msdos |
| 539 | ln ChangeLog INSTALL README emacs.ico emacs.pif ../${tempdir}/msdos | 423 | ln ChangeLog INSTALL README emacs.ico emacs.pif ../${tempdir}/msdos |
| 540 | ln is_exec.c sigaction.c mainmake.v2 sed*.inp ../${tempdir}/msdos | 424 | ln is_exec.c sigaction.c mainmake.v2 sed*.inp ../${tempdir}/msdos) |
| 541 | cd ../${tempdir}/msdos | ||
| 542 | rm -f =*) | ||
| 543 | 425 | ||
| 544 | ## FIXME are DEV-NOTES and FOR-RELEASE appropriate? | ||
| 545 | echo "Making links to \`nextstep'" | 426 | echo "Making links to \`nextstep'" |
| 546 | (cd nextstep | 427 | (cd nextstep |
| 547 | ln AUTHORS ChangeLog DEV-NOTES FOR-RELEASE README INSTALL ../${tempdir}/nextstep) | 428 | ln ChangeLog README INSTALL ../${tempdir}/nextstep) |
| 548 | 429 | ||
| 549 | echo "Making links to \`nextstep/Cocoa/Emacs.base/Contents'" | 430 | echo "Making links to \`nextstep/Cocoa/Emacs.base/Contents'" |
| 550 | (cd nextstep/Cocoa/Emacs.base/Contents | 431 | (cd nextstep/Cocoa/Emacs.base/Contents |
| @@ -568,156 +449,49 @@ echo "Making links to \`nextstep/GNUstep/Emacs.base/Resources'" | |||
| 568 | 449 | ||
| 569 | echo "Making links to \`oldXMenu'" | 450 | echo "Making links to \`oldXMenu'" |
| 570 | (cd oldXMenu | 451 | (cd oldXMenu |
| 571 | ln *.c *.h *.in ../${tempdir}/oldXMenu | 452 | ln *.[ch] *.in ../${tempdir}/oldXMenu |
| 572 | ln README ChangeLog ../${tempdir}/oldXMenu) | 453 | ln README ChangeLog ../${tempdir}/oldXMenu) |
| 573 | 454 | ||
| 574 | echo "Making links to \`lwlib'" | 455 | echo "Making links to \`lwlib'" |
| 575 | (cd lwlib | 456 | (cd lwlib |
| 576 | ln *.c *.h *.in ../${tempdir}/lwlib | 457 | ln *.[ch] *.in ../${tempdir}/lwlib |
| 577 | ln README ChangeLog ../${tempdir}/lwlib) | 458 | ln README ChangeLog ../${tempdir}/lwlib) |
| 578 | 459 | ||
| 579 | echo "Making links to \`etc'" | 460 | echo "Making links to \`etc' and its subdirectories" |
| 580 | ### Don't distribute = files, TAGS, DOC files, backups, autosaves, or | 461 | for f in `find etc -type f`; do |
| 581 | ### tex litter. | 462 | case $f in |
| 582 | (cd etc | 463 | etc/DOC*) continue ;; |
| 583 | files=`ls -d * | grep -v '^e$' \ | 464 | esac |
| 584 | | grep -v '^charsets$' | grep -v '^gnus$' | grep -v '^images$' | grep -v '^nxml$' \ | 465 | ln $f $tempdir/$f |
| 585 | | grep -v '^refcards$' | grep -v '^tutorials$'| grep -v '^schema$'` | ||
| 586 | ln $files ../${tempdir}/etc | ||
| 587 | ## If we ended up with a symlink, or if we did not get anything | ||
| 588 | ## due to a cross-device symlink, copy the file. | ||
| 589 | for file in $files; do | ||
| 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 | |||
| 608 | for dir in etc/charsets etc/e etc/gnus etc/nxml etc/tutorials etc/refcards etc/schema ; do | ||
| 609 | echo "Making links to \`${dir}'" | ||
| 610 | (cd ${dir} | ||
| 611 | ln `ls -d *` ../../${tempdir}/${dir} | ||
| 612 | cd ../../${tempdir}/${dir} | ||
| 613 | rm -f *~ \#*\# *,v =* core) | ||
| 614 | done | ||
| 615 | |||
| 616 | echo "Making links to \`etc/images'" | ||
| 617 | (cd etc/images | ||
| 618 | for f in *; do | ||
| 619 | [ -f "$f" ] || continue | ||
| 620 | case $f in | ||
| 621 | (*~|\#*\#|*,v|=*|core) continue ;; | ||
| 622 | esac | ||
| 623 | ln $f ../../${tempdir}/etc/images | ||
| 624 | done) | ||
| 625 | |||
| 626 | for dir in etc/images/custom etc/images/ezimage etc/images/gnus \ | ||
| 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}'" | ||
| 630 | (cd ${dir} | ||
| 631 | for f in *; do | ||
| 632 | [ -f "$f" ] || continue | ||
| 633 | case $f in | ||
| 634 | (*~|\#*\#|*,v|=*|core) continue ;; | ||
| 635 | esac | ||
| 636 | ln $f ../../../${tempdir}/${dir} | ||
| 637 | done | ||
| 638 | ) | ||
| 639 | done | ||
| 640 | |||
| 641 | for dir in etc/images/tree-widget/default etc/images/tree-widget/folder \ | ||
| 642 | etc/images/smilies/grayscale etc/images/smilies/medium; do | ||
| 643 | echo "Making links to \`${dir}'" | ||
| 644 | (cd ${dir} | ||
| 645 | ln `ls -d *` ../../../../${tempdir}/${dir} | ||
| 646 | cd ../../../../${tempdir}/${dir} | ||
| 647 | rm -f *~ \#*\# *,v =* core) | ||
| 648 | done | ||
| 649 | |||
| 650 | for dir in etc/images/icons/hicolor/*/apps \ | ||
| 651 | etc/images/icons/hicolor/*/mimetypes; do | ||
| 652 | echo "Making links to \`${dir}'" | ||
| 653 | (cd ${dir} | ||
| 654 | ln `ls -d *` ../../../../../../${tempdir}/${dir} | ||
| 655 | cd ../../../../../../${tempdir}/${dir} | ||
| 656 | rm -f *~ \#*\# *,v =* core) | ||
| 657 | done | 466 | done |
| 658 | 467 | ||
| 659 | echo "Making links to \`info'" | 468 | echo "Making links to \`info'" |
| 660 | # Don't distribute backups or autosaves. | 469 | ln `find info -type f -print` ${tempdir}/info |
| 661 | (cd info | ||
| 662 | ln `find . -type f -print` ../${tempdir}/info | ||
| 663 | #ln [a-zA-Z]* ../${tempdir}/info | ||
| 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 | 470 | ||
| 669 | echo "Making links to \`doc/emacs'" | 471 | echo "Making links to \`doc/emacs'" |
| 670 | (cd doc/emacs | 472 | (cd doc/emacs |
| 671 | ln *.texi *.aux *.fns *.kys *.vrs ../../${tempdir}/doc/emacs | 473 | ln *.texi *.in makefile.w32-in ChangeLog* ../../${tempdir}/doc/emacs) |
| 672 | ln makefile.w32-in ../../${tempdir}/doc/emacs | ||
| 673 | test -f Makefile.in && ln Makefile.in ../../${tempdir}/doc/emacs | ||
| 674 | ln ChangeLog ../../${tempdir}/doc/emacs | ||
| 675 | cd ../../${tempdir}/doc/emacs | ||
| 676 | rm -f \#*\# =* *~ core emacs-index* *.Z *.z xmail | ||
| 677 | rm -f emacs.?? termcap.?? gdb.?? *.log *.toc *.dvi *.oaux) | ||
| 678 | 474 | ||
| 679 | echo "Making links to \`doc/misc'" | 475 | echo "Making links to \`doc/misc'" |
| 680 | (cd doc/misc | 476 | (cd doc/misc |
| 681 | ln *.texi *.aux *.fns *.kys *.vrs ../../${tempdir}/doc/misc | 477 | ln *.texi *.tex *.in makefile.w32-in gnus-news.el ChangeLog* ../../${tempdir}/doc/misc) |
| 682 | ln makefile.w32-in ../../${tempdir}/doc/misc | 478 | |
| 683 | ln gnus-news.el ../../${tempdir}/doc/misc | ||
| 684 | test -f README && ln README ../../${tempdir}/doc/misc | ||
| 685 | test -f Makefile.in && ln Makefile.in ../../${tempdir}/doc/misc | ||
| 686 | ln ChangeLog ../../${tempdir}/doc/misc | ||
| 687 | cp texinfo.tex ../../${tempdir}/doc/misc | ||
| 688 | cd ../../${tempdir}/doc/misc | ||
| 689 | rm -f \#*\# =* *~ core emacs-index* *.Z *.z xmail | ||
| 690 | rm -f emacs.?? termcap.?? gdb.?? *.log *.toc *.dvi *.oaux) | ||
| 691 | |||
| 692 | ## FIXME book-spine.texinfo unused? | ||
| 693 | echo "Making links to \`doc/lispref'" | 479 | echo "Making links to \`doc/lispref'" |
| 694 | (cd doc/lispref | 480 | (cd doc/lispref |
| 695 | ln *.texi *.aux *.fns *.kys *.vrs ../../${tempdir}/doc/lispref | 481 | ln *.texi *.in makefile.w32-in README ChangeLog* ../../${tempdir}/doc/lispref |
| 696 | ln *.txt *.el spellfile tindex.pl ../../${tempdir}/doc/lispref | 482 | ln *.txt *.el spellfile tindex.pl ../../${tempdir}/doc/lispref |
| 697 | ln makefile.w32-in ../../${tempdir}/doc/lispref | 483 | ln two-volume.make ../../${tempdir}/doc/lispref) |
| 698 | ln book-spine.texinfo two-volume.make ../../${tempdir}/doc/lispref | ||
| 699 | test -f README && ln README ../../${tempdir}/doc/lispref | ||
| 700 | test -f Makefile.in && ln Makefile.in ../../${tempdir}/doc/lispref | ||
| 701 | ln ChangeLog ../../${tempdir}/doc/lispref | ||
| 702 | cd ../../${tempdir}/doc/lispref | ||
| 703 | rm -f \#*\# =* *~ core elisp-index* *.Z *.z xmail | ||
| 704 | rm -f elisp.?? *.log *.toc *.dvi *.oaux) | ||
| 705 | 484 | ||
| 706 | echo "Making links to \`doc/lispintro'" | 485 | echo "Making links to \`doc/lispintro'" |
| 707 | (cd doc/lispintro | 486 | (cd doc/lispintro |
| 708 | ln *.texi *.aux *.fns *.kys *.vrs *.eps *.pdf ../../${tempdir}/doc/lispintro | 487 | ln *.texi *.in makefile.w32-in *.eps *.pdf ../../${tempdir}/doc/lispintro |
| 709 | ln makefile.w32-in ../../${tempdir}/doc/lispintro | 488 | ln README ChangeLog* ../../${tempdir}/doc/lispintro |
| 710 | test -f README && ln README ../../${tempdir}/doc/lispintro | 489 | cd ../../${tempdir}/doc/lispintro) |
| 711 | test -f Makefile.in && ln Makefile.in ../../${tempdir}/doc/lispintro | ||
| 712 | ln ChangeLog ../../${tempdir}/doc/lispintro | ||
| 713 | cd ../../${tempdir}/doc/lispintro | ||
| 714 | rm -f \#*\# =* *~ core *.Z *.z xmail | ||
| 715 | rm -f emacs-lisp-intro.?? *.log *.toc *.dvi *.oaux) | ||
| 716 | 490 | ||
| 717 | echo "Making links to \`doc/man'" | 491 | echo "Making links to \`doc/man'" |
| 718 | (cd doc/man | 492 | (cd doc/man |
| 719 | ln *.1 ../../${tempdir}/doc/man | 493 | ln ChangeLog* *.1 ../../${tempdir}/doc/man |
| 720 | ln ChangeLog ../../${tempdir}/doc/man) | 494 | cd ../../${tempdir}/doc/man) |
| 721 | 495 | ||
| 722 | ### It would be nice if they could all be symlinks to top-level copy, but | 496 | ### It would be nice if they could all be symlinks to top-level copy, but |
| 723 | ### you're not supposed to have any symlinks in distribution tar files. | 497 | ### you're not supposed to have any symlinks in distribution tar files. |
| @@ -735,25 +509,28 @@ if [ "${newer}" ]; then | |||
| 735 | find ${tempparent} \( -name '*.elc' -o ! -newer ${newer} \) -exec rm -f {} \; | 509 | find ${tempparent} \( -name '*.elc' -o ! -newer ${newer} \) -exec rm -f {} \; |
| 736 | fi | 510 | fi |
| 737 | 511 | ||
| 512 | ## Don't distribute backups, autosaves, etc. | ||
| 513 | echo "Removing unwanted files" | ||
| 514 | find ${tempparent} \( -name '*~' -o -name '#*#' -o -name '.*ignore' -o -name '=*' -o -name 'TAGS' \) -exec rm -f {} \; | ||
| 515 | |||
| 738 | if [ "${make_tar}" = yes ]; then | 516 | if [ "${make_tar}" = yes ]; then |
| 739 | if [ "${default_gzip}" = "" ]; then | 517 | echo "Looking for $default_gzip" |
| 740 | echo "Looking for gzip" | 518 | found=0 |
| 741 | temppath=`echo $PATH | sed 's/^:/.:/ | 519 | temppath=`echo $PATH | sed -e 's/^:/.:/' -e 's/::/:.:/g' -e 's/:$/:./' \ |
| 742 | s/::/:.:/g | 520 | -e 's/:/ /g'` |
| 743 | s/:$/:./ | 521 | for dir in ${temppath}; do |
| 744 | s/:/ /g'` | 522 | [ -x ${dir}/$default_gzip ] || continue |
| 745 | default_gzip=`( | 523 | found=1; break |
| 746 | for dir in ${temppath}; do | 524 | done |
| 747 | if [ -f ${dir}/gzip ]; then echo 'gzip --best'; exit 0; fi | 525 | if [ "$found" = "0" ]; then |
| 748 | done | 526 | echo "WARNING: \`$default_gzip' not found, will not compress" >&2 |
| 749 | echo compress | 527 | default_gzip=cat |
| 750 | )` | ||
| 751 | fi | 528 | fi |
| 752 | case "${default_gzip}" in | 529 | case "${default_gzip}" in |
| 753 | bzip2) gzip_extension=.bz2 ;; | 530 | bzip2) gzip_extension=.bz2 ;; |
| 754 | compress* ) gzip_extension=.Z ;; | 531 | lzma) gzip_extension=.lzma ;; |
| 755 | lzma) gzip_extension=.lzma ;; | 532 | gzip) gzip_extension=.gz ; default_gzip="gzip --best";; |
| 756 | * ) gzip_extension=.gz ;; | 533 | *) gzip_extension= ;; |
| 757 | esac | 534 | esac |
| 758 | echo "Creating tar file" | 535 | echo "Creating tar file" |
| 759 | (cd ${tempparent} ; tar cvf - ${emacsname} ) \ | 536 | (cd ${tempparent} ; tar cvf - ${emacsname} ) \ |
| @@ -761,13 +538,9 @@ if [ "${make_tar}" = yes ]; then | |||
| 761 | > ${emacsname}.tar${gzip_extension} | 538 | > ${emacsname}.tar${gzip_extension} |
| 762 | fi | 539 | fi |
| 763 | 540 | ||
| 764 | if [ "${clean_up}" = yes ]; then | 541 | if [ "${clean_up}" != yes ]; then |
| 765 | echo "Cleaning up the staging directory" | ||
| 766 | rm -rf ${tempparent} | ||
| 767 | else | ||
| 768 | (cd ${tempparent}; mv ${emacsname} ..) | 542 | (cd ${tempparent}; mv ${emacsname} ..) |
| 769 | rm -rf ${tempparent} | 543 | rm -rf ${tempparent} |
| 770 | fi | 544 | fi |
| 771 | 545 | ||
| 772 | # arch-tag: 26e3eb50-a394-4ab2-82b2-d8e5af500de7 | ||
| 773 | ### make-dist ends here | 546 | ### make-dist ends here |