]> code.delx.au - gnu-emacs/blobdiff - make-dist
Merge from emacs--rel--22
[gnu-emacs] / make-dist
index 93a5a5a2e887530fee55bd7ff77e69bf45b7cb14..6d91e7cf56dbee372be53bf93a9291f5ec1d63ce 100755 (executable)
--- a/make-dist
+++ b/make-dist
@@ -6,13 +6,14 @@
 #### be distributed.  This means that if you add a file with an odd name,
 #### you should make sure that this script will include it.
 
-# Copyright (C) 1995, 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1995, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005,
+#   2006, 2007, 2008  Free Software Foundation, Inc.
 #
 # This file is part of GNU Emacs.
 #
 # GNU Emacs is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
+# the Free Software Foundation; either version 3, or (at your option)
 # any later version.
 #
 # GNU Emacs is distributed in the hope that it will be useful,
@@ -22,8 +23,8 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with GNU Emacs; see the file COPYING.  If not, write to the
-# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
+# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
 
 progname="$0"
 
@@ -80,6 +81,14 @@ while [ $# -gt 0 ]; do
     "--compress")
       default_gzip="compress"
     ;;
+    ## Same with bzip2.
+    "--bzip2")
+      default_gzip="bzip2"
+    ;;
+    ## Same with lzma.
+    "--lzma")
+      default_gzip="lzma"
+    ;;
 
     "--snapshot")
       clean_up=yes
@@ -91,8 +100,10 @@ while [ $# -gt 0 ]; do
     "--help")
       echo "Usage: ${progname} [options]"
       echo ""
+      echo "  --bzip2  use bzip2 instead of gzip"
       echo "  --clean-up       delete staging directories when done"
       echo "  --compress       use compress instead of gzip"
+      echo "  --lzma   use lzma instead of gzip"
       echo "  --newer=TIME     don't include files older than TIME"
       echo "  --no-check       don't check for bad file names etc."
       echo "  --no-update      don't recompile or do analogous things"
@@ -119,8 +130,7 @@ if [ ! -d src -o ! -f src/lisp.h -o ! -d lisp -o ! -f lisp/version.el ]; then
 fi
 
 ### Find where to run Emacs.
-### (We don't accept EMACS=t as an answer, since that probably only means
-### that the shell is running in an Emacs window.)
+### (Accept only absolute file names.)
 if [ $update = yes ];
 then
   unset EMACS_UNIBYTE
@@ -128,11 +138,15 @@ then
   then
     EMACS=`pwd`/src/emacs
   else
-    if [ "x$EMACS" = "x" -o "x$EMACS" = "xt" ];
-    then
-      echo You must specify the EMACS environment variable 2>&1
-      exit 1
-    fi
+    case $EMACS in
+      /*) ;;
+      *)
+       if [ ! -f "$EMACS" ]; then
+         echo "$0: You must specify the EMACS environment variable " \
+              "to an absolute file name." 2>&1
+         exit 1
+       fi;;
+    esac
   fi
 fi
 
@@ -150,10 +164,10 @@ echo Version numbers are $version and $shortversion
 
 if [ $update = yes ];
 then
-  if grep -s "@set EMACSVER  *${shortversion}" ./man/emacs.texi > /dev/null; then
+  if grep -s "@set EMACSVER  *${shortversion}" ./doc/emacs/emacs.texi > /dev/null; then
     true
   else
-    echo "You must update the version number in \`./man/emacs.texi'"
+    echo "You must update the version number in \`./doc/emacs/emacs.texi'"
     sleep 5
   fi
 fi
@@ -183,9 +197,9 @@ fi
 if [ $check = yes ];
 then
   ### Check for .elc files with no corresponding .el file.
-  ls -1 lisp/[a-z]*.el lisp/[a-z]*/[a-z]*.el \
+  ls -1 lisp/[a-zA-Z]*.el lisp/[a-z]*/[a-zA-Z0-9]*.el \
        leim/[a-z]*/[a-z]*.el | sed 's/\.el$/.elc/' > /tmp/el
-  ls -1 lisp/[a-z]*.elc lisp/[a-z]*/[a-z]*.elc \
+  ls -1 lisp/[a-zA-Z]*.elc lisp/[a-z]*/[a-zA-Z0-9]*.elc \
        leim/[a-z]*/[a-z]*.elc > /tmp/elc
   bogosities="`comm -13 /tmp/el /tmp/elc`"
   if [ "${bogosities}" != "" ]; then
@@ -195,21 +209,17 @@ then
   rm -f /tmp/el /tmp/elc
 
   ### Check for .el files with no corresponding .elc file.
-  (cd lisp; ls -1 [a-z]*.el [a-z]*/[a-z]*.el ; \
-   cd ../leim; ls -1 [a-z]*/[a-z]*.el) > /tmp/el
-  (cd lisp; ls -1 [a-z]*.elc [a-z]*/[a-z]*.elc; \
-   cd ../leim; ls -1 [a-z]*/[a-z]*.elc) | sed 's/\.elc$/.el/' > /tmp/elc
+  ls -1 lisp/[a-zA-Z]*.el lisp/[a-z]*/[a-zA-Z0-9]*.el \
+       leim/[a-z]*/[a-z]*.el > /tmp/el
+  ls -1 lisp/[a-zA-Z]*.elc lisp/[a-z]*/[a-zA-Z0-9]*.elc \
+       leim/[a-z]*/[a-z]*.elc | sed 's/\.elc$/.el/' > /tmp/elc
   losers="`comm -23 /tmp/el /tmp/elc`"
   bogosities=
   for file in $losers; do
-    file1=`echo $file | sed -e "s|.*/||"`
-    if ! sed -n -e "/^DONTCOMPILE/,/[^\\]\$/p" lisp/Makefile.in |
-        grep -q "[     ]$file1\($\| \)"; then
+    if ! grep -q "no-byte-compile: t" $file; then
       case $file in
        site-init.el | site-load.el | site-start.el | default.el)
          ;;
-       term/*)
-         ;;
        *)
          bogosities="$file $bogosities"
          ;;
@@ -221,13 +231,6 @@ then
     echo "${bogosities}"
   fi
   rm -f /tmp/el /tmp/elc
-
-  ### Check for .el files that would overflow the 14-char limit if compiled.
-  long=`find lisp leim -name '[a-zA-Z0-9]??????????*.el' -print`
-  if [ "$long" != "" ]; then
-    echo "The following .el file names are too long:"
-    echo "$long"
-  fi
 fi
 
 ### Make sure configure is newer than configure.in.
@@ -249,9 +252,10 @@ fi
 if [ $update = yes ];
 then
   echo "Updating Info files"
-  (cd man; make -f Makefile.in srcdir=. info)
-  (cd lispref; make -f Makefile.in srcdir=. info)
-  (cd lispintro; make -f Makefile.in SHELL=/bin/sh srcdir=. info VPATH=.)
+  (cd doc/emacs; make -f Makefile.in srcdir=. info)
+  (cd doc/misc; make -f Makefile.in srcdir=. info)
+  (cd doc/lispref; make -f Makefile.in srcdir=. info)
+  (cd doc/lispintro; make -f Makefile.in SHELL=/bin/sh srcdir=. info VPATH=.)
 
   echo "Updating finder, custom and autoload data"
   (cd lisp; make updates EMACS="$EMACS")
@@ -300,7 +304,7 @@ mkdir ${tempdir}
 ### tar file; this means that people can start reading the INSTALL and
 ### README while the rest of the tar file is still unpacking.  Whoopee.
 echo "Making links to top-level files"
-ln AUTHORS FTP INSTALL README BUGS move-if-change ${tempdir}
+ln INSTALL README BUGS move-if-change ${tempdir}
 ln ChangeLog Makefile.in configure configure.in ${tempdir}
 ln config.bat make-dist update-subdirs vpath.sed ${tempdir}
 ### Copy these files; they're cross-filesystem symlinks.
@@ -319,13 +323,22 @@ echo "Updating version number in README"
 
 
 echo "Creating subdirectories"
-for subdir in lisp site-lisp lispref lispintro \
+for subdir in lisp site-lisp \
              leim leim/CXTERM-DIC leim/MISC-DIC \
              leim/SKK-DIC leim/ja-dic leim/quail \
              src src/m src/s src/bitmaps lib-src oldXMenu lwlib \
              nt nt/inc nt/inc/sys nt/inc/arpa nt/inc/netinet nt/icons \
-             etc etc/e info man msdos vms mac mac/inc mac/inc/sys \
-             mac/src mac/Emacs.app mac/Emacs.app/Contents \
+             etc etc/e etc/gnus etc/nxml \
+             etc/images etc/images/ezimage etc/images/gnus etc/images/gud \
+             etc/images/icons etc/images/icons/hicolor \
+             etc/images/icons/hicolor/*x* etc/images/icons/hicolor/*x*/apps \
+             etc/images/low-color etc/images/mail \
+             etc/images/smilies etc/images/smilies/grayscale \
+             etc/images/smilies/medium etc/images/tree-widget \
+             etc/images/tree-widget/default etc/images/tree-widget/folder \
+             etc/refcards etc/schema etc/tutorials info doc doc/emacs \
+             doc/misc doc/man doc/lispref doc/lispintro m4 msdos vms mac \
+             mac/inc mac/inc/sys mac/src mac/Emacs.app mac/Emacs.app/Contents \
              mac/Emacs.app/Contents/MacOS mac/Emacs.app/Contents/Resources \
              mac/Emacs.app/Contents/Resources/English.lproj
 do
@@ -347,8 +360,8 @@ echo "Making links to \`lisp' and its subdirectories"
  done
  ## simula.el doesn't keep abbreviations in simula.defns any more.
  ## ln [a-zA-Z]*.defns ../${tempdir}/lisp
- ln ChangeLog Makefile.in makefile.nt ChangeLog.? ../${tempdir}/lisp
- ln makefile.w32-in ../${tempdir}/lisp
+ ln ChangeLog ChangeLog.*[0-9] ../${tempdir}/lisp
+ ln Makefile.in makefile.w32-in ../${tempdir}/lisp
  test -f README && ln README ../${tempdir}/lisp
  (cd ../${tempdir}/lisp
   rm -f TAGS =*
@@ -373,7 +386,7 @@ echo "Making links to \`lisp' and its subdirectories"
 
  for file in $subdirs; do
    echo "  lisp/$file"
-   mkdir ../${tempdir}/lisp/$file
+   mkdir -p ../${tempdir}/lisp/$file
    ln $file/[a-zA-Z0-9]*.el ../${tempdir}/lisp/$file
    ln $file/[a-zA-Z0-9]*.elc ../${tempdir}/lisp/$file
    for img in $file/[a-zA-Z]*.xpm $file/[a-zA-Z]*.xbm $file/[a-zA-Z]*.pbm; do
@@ -387,7 +400,7 @@ echo "Making links to \`lisp' and its subdirectories"
 
    if [ -f $file/ChangeLog ]; then
      ln $file/ChangeLog ../${tempdir}/lisp/$file
-     for f in $file/ChangeLog.[0-9]; do
+     for f in $file/ChangeLog.*[0-9]; do
        if [ -f $f ]; then
         ln $f ../${tempdir}/lisp/$file
        fi
@@ -398,7 +411,7 @@ echo "Making links to \`lisp' and its subdirectories"
 echo "Making links to \`leim' and its subdirectories"
 ### Don't distribute TAGS, or =*.el files.
 (cd leim
- ln makefile.nt makefile.w32-in ../${tempdir}/leim
+ ln makefile.w32-in ../${tempdir}/leim
  ln ChangeLog README ../${tempdir}/leim
 
  ln CXTERM-DIC/*.tit ../${tempdir}/leim/CXTERM-DIC
@@ -406,6 +419,9 @@ echo "Making links to \`leim' and its subdirectories"
  ln MISC-DIC/*.* ../${tempdir}/leim/MISC-DIC
  ln ja-dic/*.el ja-dic/*.elc ../${tempdir}/leim/ja-dic
  ln Makefile.in ../${tempdir}/leim/Makefile.in
+ ln leim-ext.el ../${tempdir}/leim/leim-ext.el
+ ## Lisp files that start with a capital are generated from TIT
+ ## dictionaries so we don't distribute them.
  ln quail/[a-z]*.el quail/[a-z]*.elc ../${tempdir}/leim/quail
  rm -f ../${tempdir}/leim/quail/quick-b5.*
  rm -f ../${tempdir}/leim/quail/quick-cns.*
@@ -442,7 +458,7 @@ echo "Making links to \`src'"
    fi
  done
  ln README ChangeLog ChangeLog.*[0-9] ../${tempdir}/src
- ln makefile.nt makefile.w32-in ../${tempdir}/src
+ ln makefile.w32-in ../${tempdir}/src
  ln .gdbinit .dbxinit ../${tempdir}/src
  cd ../${tempdir}/src
  rm -f config.h epaths.h Makefile Makefile.c
@@ -465,7 +481,7 @@ echo "Making links to \`lib-src'"
 (cd lib-src
  ln [a-zA-Z]*.[chy] ../${tempdir}/lib-src
  ln ChangeLog Makefile.in README testfile vcdiff ../${tempdir}/lib-src
- ln grep-changelog rcs2log rcs-checkin makefile.nt ../${tempdir}/lib-src
+ ln grep-changelog rcs2log rcs-checkin ../${tempdir}/lib-src
  ln makefile.w32-in ../${tempdir}/lib-src
  ## If we ended up with a symlink, or if we did not get anything
  ## due to a cross-device symlink, copy the file.
@@ -485,13 +501,18 @@ echo "Making links to \`lib-src'"
  done
  cd ../${tempdir}/lib-src
  rm -f Makefile.c
+ rm -f getopt.h
  rm -f =* TAGS)
 
+echo "Making links to \`m4'"
+(cd m4
+ ln *.m4 ../${tempdir}/m4)
+
 echo "Making links to \`nt'"
 (cd nt
- ln emacs.rc config.nt [a-z]*.c ../${tempdir}/nt
+ ln emacs.manifest emacs.rc config.nt [a-z]*.c ../${tempdir}/nt
  ln nmake.defs gmake.defs subdirs.el ../${tempdir}/nt
- ln [a-z]*.bat [a-z]*.h makefile.def makefile.nt ../${tempdir}/nt
+ ln [a-z]*.bat [a-z]*.h ../${tempdir}/nt
  ln ChangeLog INSTALL README makefile.w32-in ../${tempdir}/nt)
 
 echo "Making links to \`nt/inc'"
@@ -517,7 +538,7 @@ echo "Making links to \`nt/icons'"
 
 echo "Making links to \`mac'"
 (cd mac
- ln ChangeLog INSTALL README *.xml *.MPW ../${tempdir}/mac)
+ ln ChangeLog INSTALL README make-package *.xml *.MPW ../${tempdir}/mac)
 
 echo "Making links to \`mac/inc'"
 (cd mac/inc
@@ -535,6 +556,10 @@ echo "Making links to \`mac/Emacs.app/Contents'"
 (cd mac/Emacs.app/Contents
  ln Info.plist PkgInfo ../../../${tempdir}/mac/Emacs.app/Contents)
 
+echo "Making links to \`mac/Emacs.app/Contents/Resources'"
+(cd mac/Emacs.app/Contents/Resources
+ ln Emacs.icns ../../../../${tempdir}/mac/Emacs.app/Contents/Resources)
+
 echo "Making links to \`mac/Emacs.app/Contents/Resources/English.lproj'"
 (cd mac/Emacs.app/Contents/Resources/English.lproj
  ln InfoPlist.strings ../../../../../${tempdir}/mac/Emacs.app/Contents/Resources/English.lproj)
@@ -549,7 +574,7 @@ echo "Making links to \`msdos'"
 echo "Making links to \`oldXMenu'"
 (cd oldXMenu
  ln *.c *.h *.in ../${tempdir}/oldXMenu
- ln README Imakefile ChangeLog ../${tempdir}/oldXMenu
+ ln README ChangeLog ../${tempdir}/oldXMenu
  ln compile.com descrip.mms ../${tempdir}/oldXMenu)
 
 echo "Making links to \`lwlib'"
@@ -560,9 +585,10 @@ echo "Making links to \`lwlib'"
 echo "Making links to \`etc'"
 ### Don't distribute = files, TAGS, DOC files, backups, autosaves, or
 ### tex litter.
-### Don't distribute gfdl.1, since no man page references it.
 (cd etc
- files=`ls -d * | grep -v CVS | grep -v RCS | grep -v 'Old' | grep -v '^e$'`
+ files=`ls -d * | grep -v CVS | grep -v RCS | grep -v 'Old' | grep -v '^e$' \
+        | grep -v '^gnus$' | grep -v '^images$' | grep -v '^nxml$' \
+        | grep -v '^refcards$' | grep -v '^tutorials$'| grep -v '^schema$'`
  ln $files ../${tempdir}/etc
  ## If we ended up with a symlink, or if we did not get anything
  ## due to a cross-device symlink, copy the file.
@@ -581,15 +607,51 @@ echo "Making links to \`etc'"
    fi
  done
  cd ../${tempdir}/etc
- rm -f fns*.el gfdl.1
+ rm -f fns*.el
  rm -f DOC* *~ \#*\# *.dvi *.log *.orig *.rej *,v =* core
  rm -f TAGS)
 
-echo "Making links to \`etc/e'"
-(cd etc/e
- ln `ls -d * | grep -v CVS | grep -v RCS` ../../${tempdir}/etc/e
- cd ../../${tempdir}/etc/e
- rm -f *~ \#*\# *,v =* core)
+for dir in etc/e etc/gnus etc/nxml etc/tutorials etc/refcards etc/schema ; do
+    echo "Making links to \`${dir}'"
+    (cd ${dir}
+       ln `ls -d * | grep -v CVS | grep -v RCS` ../../${tempdir}/${dir}
+       cd ../../${tempdir}/${dir}
+       rm -f *~ \#*\# *,v =* core)
+done
+
+echo "Making links to \`etc/images'"
+(cd etc/images
+ for img in README [a-zA-Z]*.xpm [a-zA-Z]*.xbm [a-zA-Z]*.pbm; do
+   if [ -f $img ]; then
+     ln $img ../../${tempdir}/etc/images
+   fi
+ done)
+
+for dir in etc/images/ezimage etc/images/gnus etc/images/gud etc/images/icons \
+           etc/images/low-color etc/images/mail etc/images/smilies ; do
+    echo "Making links to \`${dir}'"
+    (cd ${dir}
+     ln `ls -d * | grep -v CVS | grep -v RCS` ../../../${tempdir}/${dir}
+     cd ../../../${tempdir}/${dir}
+     rm -f *~ \#*\# *,v =* core)
+done
+
+for dir in etc/images/tree-widget/default etc/images/tree-widget/folder \
+    etc/images/smilies/grayscale  etc/images/smilies/medium; do
+    echo "Making links to \`${dir}'"
+    (cd ${dir}
+     ln `ls -d * | grep -v CVS | grep -v RCS` ../../../../${tempdir}/${dir}
+     cd ../../../../${tempdir}/${dir}
+     rm -f *~ \#*\# *,v =* core)
+done
+
+for dir in etc/images/icons/hicolor/*x*/apps ; do
+    echo "Making links to \`${dir}'"
+    (cd ${dir}
+     ln `ls -d * | grep -v CVS | grep -v RCS` ../../../../../../${tempdir}/${dir}
+     cd ../../../../../../${tempdir}/${dir}
+     rm -f *~ \#*\# *,v =* core)
+done
 
 echo "Making links to \`info'"
 # Don't distribute backups or autosaves.
@@ -601,41 +663,59 @@ echo "Making links to \`info'"
  ln emacs dummy~ ; ln emacs \#dummy\#
  rm -f *~ \#*\# core)
 
-echo "Making links to \`man'"
-(cd man
- ln *.texi *.aux *.cps *.fns *.kys *.vrs ../${tempdir}/man
- test -f README && ln README ../${tempdir}/man
- test -f Makefile.in && ln Makefile.in ../${tempdir}/man
- ln ChangeLog ../${tempdir}/man
- test -f split-man && ln split-man ../${tempdir}/man
- cp texinfo.tex ../${tempdir}/man
- cd ../${tempdir}/man
+echo "Making links to \`doc/emacs'"
+(cd doc/emacs
+ ln *.texi *.aux *.cps *.fns *.kys *.vrs ../../${tempdir}/doc/emacs
+ ln makefile.w32-in ../../${tempdir}/doc/emacs
+ test -f README && ln README ../../${tempdir}/doc/emacs
+ test -f Makefile.in && ln Makefile.in ../../${tempdir}/doc/emacs
+ ln ChangeLog ../../${tempdir}/doc/emacs
+ cp texinfo.tex ../../${tempdir}/doc/emacs
+ cd ../../${tempdir}/doc/emacs
  rm -f \#*\# =* *~ core emacs-index* *.Z *.z xmail
  rm -f emacs.?? termcap.?? gdb.?? *.log *.toc *.dvi *.oaux)
 
-echo "Making links to \`lispref'"
-(cd lispref
- ln `ls -1 *.texi` ../${tempdir}/lispref
- ln *.aux *.cps *.fns *.kys *.vrs index.*perm ../${tempdir}/lispref
- ln *.txt *.el spellfile permute-index tindex.pl ../${tempdir}/lispref
- test -f README && ln README ../${tempdir}/lispref
- test -f Makefile.in && ln Makefile.in ../${tempdir}/lispref
- ln ChangeLog ../${tempdir}/lispref
- cd ../${tempdir}/lispref
+echo "Making links to \`doc/misc'"
+(cd doc/misc
+ ln *.texi *.aux *.cps *.fns *.kys *.vrs ../../${tempdir}/doc/misc
+ ln makefile.w32-in ../../${tempdir}/doc/misc
+ test -f README && ln README ../../${tempdir}/doc/misc
+ test -f Makefile.in && ln Makefile.in ../../${tempdir}/doc/misc
+ ln ChangeLog ../../${tempdir}/doc/misc
+ cp texinfo.tex ../../${tempdir}/doc/misc
+ cd ../../${tempdir}/doc/misc
+ rm -f \#*\# =* *~ core emacs-index* *.Z *.z xmail
+ rm -f emacs.?? termcap.?? gdb.?? *.log *.toc *.dvi *.oaux)
+
+echo "Making links to \`doc/lispref'"
+(cd doc/lispref
+ ln `ls -1 *.texi` ../../${tempdir}/doc/lispref
+ ln *.aux *.cps *.fns *.kys *.vrs ../../${tempdir}/doc/lispref
+ ln *.txt *.el spellfile tindex.pl ../../${tempdir}/doc/lispref
+ ln makefile.w32-in ../../${tempdir}/doc/lispref
+ test -f README && ln README ../../${tempdir}/doc/lispref
+ test -f Makefile.in && ln Makefile.in ../../${tempdir}/doc/lispref
+ ln ChangeLog ../../${tempdir}/doc/lispref
+ cd ../../${tempdir}/doc/lispref
  rm -f \#*\# =* *~ core elisp-index* *.Z *.z xmail
  rm -f elisp.?? *.log *.toc *.dvi *.oaux)
 
-echo "Making links to \`lispintro'"
-(cd lispintro
- ln *.texi *.aux *.cps *.fns *.kys *.vrs *.eps ../${tempdir}/lispintro
- test -f texinfo.tex && ln texinfo.tex ../${tempdir}/lispintro
- test -f README && ln README ../${tempdir}/lispintro
- test -f Makefile.in && ln Makefile.in ../${tempdir}/lispintro
- ln ChangeLog ../${tempdir}/lispintro
- cd ../${tempdir}/lispintro
+echo "Making links to \`doc/lispintro'"
+(cd doc/lispintro
+ ln *.texi *.aux *.cps *.fns *.kys *.vrs *.eps ../../${tempdir}/doc/lispintro
+ ln makefile.w32-in ../../${tempdir}/doc/lispintro
+ test -f texinfo.tex && ln texinfo.tex ../../${tempdir}/doc/lispintro
+ test -f README && ln README ../../${tempdir}/doc/lispintro
+ test -f Makefile.in && ln Makefile.in ../../${tempdir}/doc/lispintro
+ ln ChangeLog ../../${tempdir}/doc/lispintro
+ cd ../../${tempdir}/doc/lispintro
  rm -f \#*\# =* *~ core *.Z *.z xmail
  rm -f emacs-lisp-intro.?? *.log *.toc *.dvi *.oaux)
 
+echo "Making links to \`doc/man'"
+(cd doc/man
+ ln *.1 ../../${tempdir}/doc/man)
+
 echo "Making links to \`vms'"
 (cd vms
  test -f README && ln README ../${tempdir}/vms
@@ -650,21 +730,6 @@ for subdir in . etc info leim lib-src lisp lwlib mac msdos nt src; do
   cp COPYING ${tempdir}/${subdir}
 done
 
-#### Make sure that there aren't any hard links between files in the
-#### distribution; people with afs can't deal with that.  Okay,
-#### actually we just re-copy anything with a link count greater
-#### than two.  (Yes, strictly greater than 2 is correct; since we
-#### created these files by linking them in from the original tree,
-#### they'll have exactly two links normally.)
-####
-#### Commented out since it's not strictly necessary; it should suffice
-#### to just break the link on alloca.c.
-#echo "Breaking intra-tree links."
-#find ${tempdir} ! -type d -links +2 \
-#  -exec cp -p {} $$ \; -exec rm -f {} \; -exec mv $$ {} \;
-rm -f $tempdir/lib-src/alloca.c
-cp $tempdir/src/alloca.c $tempdir/lib-src/alloca.c
-
 if [ "${newer}" ]; then
   echo "Removing files older than $newer"
   ## We remove .elc files unconditionally, on the theory that anyone picking
@@ -688,7 +753,9 @@ if [ "${make_tar}" = yes ]; then
     )`
   fi
   case "${default_gzip}" in
+    bzip2)      gzip_extension=.bz2 ;;
     compress* ) gzip_extension=.Z ;;
+    lzma)       gzip_extension=.lzma ;;
     * )         gzip_extension=.gz ;;
   esac
   echo "Creating tar file"