2 ### make-dist: create an Emacs distribution tar file from current srcdir
4 ## Copyright (C) 1995, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005,
5 ## 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
7 ## This file is part of GNU Emacs.
9 ## GNU Emacs is free software: you can redistribute it and/or modify
10 ## it under the terms of the GNU General Public License as published by
11 ## the Free Software Foundation, either version 3 of the License, or
12 ## (at your option) any later version.
14 ## GNU Emacs is distributed in the hope that it will be useful,
15 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ## GNU General Public License for more details.
19 ## You should have received a copy of the GNU General Public License
20 ## along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
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.
33 ### Exit if a command fails.
36 ### Print out each line we read, for debugging's sake.
43 export LANGUAGE LC_ALL LC_MESSAGES LANG
45 ## Don't restrict access to any files.
54 while [ $# -gt 0 ]; do
56 ## This option tells make-dist to delete the staging directory
57 ## when done. It is useless to use this unless you make a tar file.
61 ## This option tells make-dist to make a tar file.
65 ## This option tells make-dist not to recompile or do analogous things.
69 ## This option says don't check for bad file names, etc.
73 ## This option tells make-dist to make the distribution normally, then
74 ## remove all files older than the given timestamp file. This is useful
75 ## for creating incremental or patch distributions.
81 ## This option tells make-dist to use `compress' instead of gzip.
82 ## Normally, make-dist uses gzip whenever it is present.
84 default_gzip
="compress"
103 echo "Usage: ${progname} [options]"
105 echo " --bzip2 use bzip2 instead of gzip"
106 echo " --clean-up delete staging directories when done"
107 echo " --compress use compress instead of gzip"
108 echo " --lzma use lzma instead of gzip"
109 echo " --newer=TIME don't include files older than TIME"
110 echo " --no-check don't check for bad file names etc."
111 echo " --no-update don't recompile or do analogous things"
112 echo " --snapshot same as --clean-up --no-update --tar --no-check"
113 echo " --tar make a tar file"
119 echo "${progname}: Unrecognized argument: $1" >&2
126 ### Make sure we're running in the right place.
127 if [ ! -d src
-o ! -f src
/lisp.h
-o ! -d lisp
-o ! -f lisp
/subr.el
]; then
128 echo "${progname}: Can't find \`src/lisp.h' and \`lisp/subr.el'." >&2
129 echo "${progname} must be run in the top directory of the Emacs" >&2
130 echo "distribution tree. cd to that directory and try again." >&2
134 ### Find where to run Emacs.
135 ### (Accept only absolute file names.)
136 if [ $update = yes ];
141 EMACS
=`pwd`/src
/emacs
146 if [ ! -f "$EMACS" ]; then
147 echo "$0: You must set the EMACS environment variable " \
148 "to an absolute file name." 2>&1
155 ### Find out which version of Emacs this is.
156 shortversion
=`grep 'char emacs_version' src/emacs.c \
157 | sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`
158 version
=`grep 'char emacs_version' src/emacs.c \
159 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
160 if [ ! "${version}" ]; then
161 echo "${progname}: can't find current Emacs version in \`./src/emacs.c'" >&2
165 echo Version numbers are
$version and
$shortversion
167 if [ $update = yes ];
169 if grep -s "@set EMACSVER *${shortversion}" .
/doc
/emacs
/emacsver.texi
> /dev
/null
; then
172 echo "You must update the version number in \`./doc/emacs/emacsver.texi'"
177 ### Make sure we don't already have a directory emacs-${version}.
179 emacsname
="emacs-${version}${new_extension}"
181 if [ -d ${emacsname} ]
183 echo Directory
"${emacsname}" already exists
>&2
187 ### Make sure the subdirectory is available.
188 tempparent
="make-dist.tmp.$$"
189 if [ -d ${tempparent} ]; then
190 echo "${progname}: staging directory \`${tempparent}' already exists.
191 Perhaps a previous invocation of \`${progname}' failed to clean up after
192 itself. Check that directories whose names are of the form
193 \`make-dist.tmp.NNNNN' don't contain any important information, remove
194 them, and try again." >&2
198 ### Find where to run Emacs.
201 ### Check for .elc files with no corresponding .el file.
202 ls -1 lisp
/[a-zA-Z
]*.el lisp
/[a-z
]*/[a-zA-Z0-9
]*.el \
203 lisp
/[a-z
]*/[a-z
]*/[a-zA-Z0-9
]*.el \
204 lisp
/[a-z
]*/[a-z
]*/[a-z
]*/[a-zA-Z0-9
]*.el \
205 leim
/[a-z
]*/[a-z
]*.el |
sed 's/\.el$/.elc/' > /tmp
/el
206 ls -1 lisp
/[a-zA-Z
]*.elc lisp
/[a-z
]*/[a-zA-Z0-9
]*.elc \
207 lisp
/[a-z
]*/[a-z
]*/[a-zA-Z0-9
]*.elc \
208 lisp
/[a-z
]*/[a-z
]*/[a-z
]*/[a-zA-Z0-9
]*.elc \
209 leim
/[a-z
]*/[a-z
]*.elc
> /tmp
/elc
210 bogosities
="`comm -13 /tmp/el /tmp/elc`"
211 if [ "${bogosities}" != "" ]; then
212 echo "The following .elc files have no corresponding .el files:"
215 rm -f /tmp
/el
/tmp
/elc
217 ### Check for .el files with no corresponding .elc file.
218 ls -1 lisp
/[a-zA-Z
]*.el lisp
/[a-z
]*/[a-zA-Z0-9
]*.el \
219 lisp
/[a-z
]*/[a-z
]*/[a-zA-Z0-9
]*.el \
220 lisp
/[a-z
]*/[a-z
]*/[a-z
]*/[a-zA-Z0-9
]*.el \
221 leim
/[a-z
]*/[a-z
]*.el
> /tmp
/el
222 ls -1 lisp
/[a-zA-Z
]*.elc lisp
/[a-z
]*/[a-zA-Z0-9
]*.elc \
223 lisp
/[a-z
]*/[a-z
]*/[a-zA-Z0-9
]*.el \
224 lisp
/[a-z
]*/[a-z
]*/[a-z
]*/[a-zA-Z0-9
]*.el \
225 leim
/[a-z
]*/[a-z
]*.elc |
sed 's/\.elc$/.el/' > /tmp
/elc
226 losers
="`comm -23 /tmp/el /tmp/elc`"
228 for file in $losers; do
229 if ! grep -q "no-byte-compile: t" $file; then
231 site-init.el | site-load.el | site-start.el | default.el
)
234 bogosities
="$file $bogosities"
239 if [ x
"${bogosities}" != x
"" ]; then
240 echo "The following .el files have no corresponding .elc files:"
243 rm -f /tmp
/el
/tmp
/elc
246 ### Make sure configure is newer than configure.in.
247 if [ "x`ls -t configure configure.in | sed q`" != "xconfigure" ]; then
248 echo "\`./configure.in' is newer than \`./configure'" >&2
249 echo "Running autoconf" >&2
250 autoconf ||
{ x
=$?
; echo Autoconf FAILED
! >&2; exit $x; }
253 ### Make sure src/stamp-h.in is newer than configure.in.
254 if [ "x`ls -t src/stamp-h.in configure.in | sed q`" != "xsrc/stamp-h.in" ]; then
255 echo "\`./configure.in' is newer than \`./src/stamp-h.in'" >&2
256 echo "Running autoheader" >&2
257 autoheader ||
{ x
=$?
; echo Autoheader FAILED
! >&2; exit $x; }
259 echo timestamp
> src
/stamp-h.
in
262 if [ $update = yes ];
264 echo "Updating Info files"
265 (cd doc
/emacs
; make info
)
266 (cd doc
/misc
; make info
)
267 (cd doc
/lispref
; make info
)
268 (cd doc
/lispintro
; make info
)
270 echo "Updating finder, custom and autoload data"
271 (cd lisp
; make updates EMACS
="$EMACS")
273 if test -f leim
/leim-list.el
; then
274 echo "Updating leim-list.el"
275 (cd leim
; make leim-list.el EMACS
="$EMACS")
278 echo "Recompiling Lisp files"
279 $EMACS -batch -f batch-byte-recompile-directory lisp leim
282 echo "Making lisp/MANIFEST"
285 files
=`echo [!=]*.el | sed -e 's/ subdirs.el / /' -e 's/ default.el / /'`
287 if [ -d $dir ] && [ $dir != term
]
290 thisdir
=`echo $dir/[!=]*.el | sed -e 's/ subdirs.el / /'`
291 files
="$files $thisdir"
295 do sed -n 's/^;;; //p; q' $file
296 done |
sort > MANIFEST
)
298 echo "Creating staging directory: \`${tempparent}'"
301 tempdir
="${tempparent}/${emacsname}"
303 ### This trap ensures that the staging directory will be cleaned up even
304 ### when the script is interrupted in mid-career.
305 if [ "${clean_up}" = yes ]; then
306 trap "echo 'Interrupted...cleaning up the staging directory'; rm -rf ${tempparent}; exit 1" 1 2 15
309 echo "Creating top directory: \`${tempdir}'"
312 ### We copy in the top-level files before creating the subdirectories in
313 ### hopes that this will make the top-level files appear first in the
314 ### tar file; this means that people can start reading the INSTALL and
315 ### README while the rest of the tar file is still unpacking. Whoopee.
316 echo "Making links to top-level files"
317 ln INSTALL README BUGS move-if-change
${tempdir}
318 ln ChangeLog Makefile.
in configure configure.
in ${tempdir}
319 ln config.bat make-dist update-subdirs vpath.
sed .dir-locals.el
${tempdir}
320 ln mkinstalldirs config.sub config.guess install-sh
${tempdir}
322 echo "Updating version number in README"
325 '$1 " " $2 " " $3 " " $4 " " $5 == "This directory tree holds version" { $6 = version; print $0 }
326 $1 " " $2 " " $3 " " $4 " " $5 != "This directory tree holds version"' \
327 version
=${version} README
> tmp.README
328 mv -f tmp.README README
)
331 echo "Creating subdirectories"
332 for subdir
in lisp site-lisp \
333 leim leim
/CXTERM-DIC leim
/MISC-DIC \
334 leim
/SKK-DIC leim
/ja-dic leim
/quail \
335 src src
/m src
/s src
/bitmaps lib-src oldXMenu lwlib \
336 nt nt
/inc nt
/inc
/sys nt
/inc
/arpa nt
/inc
/netinet nt
/icons \
337 etc etc
/charsets etc
/e etc
/gnus etc
/nxml \
338 etc
/images etc
/images
/custom etc
/images
/ezimage etc
/images
/gnus \
339 etc
/images
/gud etc
/images
/icons etc
/images
/icons
/hicolor \
340 etc
/images
/icons
/hicolor
/*x
* etc
/images
/icons
/hicolor
/scalable \
341 etc
/images
/icons
/hicolor
/*/apps etc
/images
/icons
/hicolor
/*/mimetypes \
342 etc
/images
/low-color etc
/images
/mail etc
/images
/mpc \
343 etc
/images
/smilies etc
/images
/smilies
/grayscale \
344 etc
/images
/smilies
/medium etc
/images
/tree-widget \
345 etc
/images
/tree-widget
/default etc
/images
/tree-widget
/folder \
346 etc
/refcards etc
/schema etc
/srecode etc
/tutorials info doc
doc
/emacs \
347 doc
/misc
doc
/man
doc
/lispref
doc
/lispintro
m4 msdos \
348 nextstep nextstep
/Cocoa nextstep
/Cocoa
/Emacs.base \
349 nextstep
/Cocoa
/Emacs.base
/Contents \
350 nextstep
/Cocoa
/Emacs.base
/Contents
/Resources \
351 nextstep
/Cocoa
/Emacs.base
/Contents
/Resources
/English.lproj \
352 nextstep
/Cocoa
/Emacs.xcodeproj \
354 nextstep
/GNUstep
/Emacs.base \
355 nextstep
/GNUstep
/Emacs.base
/Resources
357 ## site-lisp for in-place installs (?).
358 [ "$subdir" = "site-lisp" ] ||
[ -d "$subdir" ] || \
359 echo "WARNING: $subdir not found, making anyway"
360 echo " ${tempdir}/${subdir}"
361 mkdir
${tempdir}/${subdir}
364 echo "Making links to \`lisp' and its subdirectories"
365 ### Don't distribute site-init.el, site-load.el, or default.el.
367 ln [a-zA-Z
]*.el ..
/${tempdir}/lisp
368 ln [a-zA-Z
]*.elc ..
/${tempdir}/lisp
369 ln ChangeLog ChangeLog.
*[0-9] ..
/${tempdir}/lisp
370 ln Makefile.
in makefile.w32-in ..
/${tempdir}/lisp
371 ln README ..
/${tempdir}/lisp
372 (cd ..
/${tempdir}/lisp
373 rm -f site-init site-init.el site-init.elc
374 rm -f site-load site-load.el site-load.elc
375 rm -f site-start site-start.el site-start.elc
376 rm -f default default.el default.elc
379 ## Find all subdirs of lisp dir
380 for file in `find . -type d -print`; do
385 if [ -d $file ]; then
386 subdirs
="$file $subdirs"
392 for file in $subdirs; do
394 mkdir
-p ..
/${tempdir}/lisp
/$file
395 ln $file/[a-zA-Z0-9
]*.el ..
/${tempdir}/lisp
/$file
396 ln $file/[a-zA-Z0-9
]*.elc ..
/${tempdir}/lisp
/$file
398 for f
in $file/README
$file/ChangeLog
$file/ChangeLog.
*[0-9] \
399 $file/README.prev
; do
400 [ -f $f ] ||
continue
401 ln $f ..
/${tempdir}/lisp
/$file
405 echo "Making links to \`leim' and its subdirectories"
407 ln makefile.w32-in ..
/${tempdir}/leim
408 ln ChangeLog README ..
/${tempdir}/leim
409 ln CXTERM-DIC
/README CXTERM-DIC
/*.tit ..
/${tempdir}/leim
/CXTERM-DIC
410 ln SKK-DIC
/README SKK-DIC
/SKK-JISYO.L ..
/${tempdir}/leim
/SKK-DIC
411 ln MISC-DIC
/README MISC-DIC
/*.
* ..
/${tempdir}/leim
/MISC-DIC
412 ln ja-dic
/*.el ja-dic
/*.elc ..
/${tempdir}/leim
/ja-dic
413 ln Makefile.
in ..
/${tempdir}/leim
/Makefile.
in
414 ln leim-ext.el ..
/${tempdir}/leim
/leim-ext.el
415 ## Lisp files that start with a capital (also 4Corner.el) are
416 ## generated from TIT dictionaries so we don't distribute them.
417 ln quail
/[a-z
]*.el quail
/[a-z
]*.elc ..
/${tempdir}/leim
/quail
418 rm -f ..
/${tempdir}/leim
/quail
/quick-b5.
*
419 rm -f ..
/${tempdir}/leim
/quail
/quick-cns.
*
420 rm -f ..
/${tempdir}/leim
/quail
/tsang-b5.
*
421 rm -f ..
/${tempdir}/leim
/quail
/tsang-cns.
*)
423 echo "Making links to \`src'"
424 ### Don't distribute =*.[ch] files, or the configured versions of
425 ### config.in, paths.in, or Makefile.in, or TAGS.
427 echo " (It is ok if ln fails in some cases.)"
428 ln [a-zA-Z
]*.
[chm
] ..
/${tempdir}/src
429 ln [a-zA-Z
]*.
in ..
/${tempdir}/src
430 ln [a-zA-Z
]*.mk ..
/${tempdir}/src
431 ln README ChangeLog ChangeLog.
*[0-9] ..
/${tempdir}/src
432 ln makefile.w32-in ..
/${tempdir}/src
433 ln .gdbinit .dbxinit ..
/${tempdir}/src
435 rm -f config.h epaths.h Makefile buildobj.h
)
437 echo "Making links to \`src/bitmaps'"
439 ln README
*.xbm ..
/..
/${tempdir}/src
/bitmaps
)
441 echo "Making links to \`src/m'"
443 ln README
[a-zA-Z0-9
]*.h ..
/..
/${tempdir}/src
/m
)
445 echo "Making links to \`src/s'"
447 ln README
[a-zA-Z0-9
]*.h ..
/..
/${tempdir}/src
/s
)
449 echo "Making links to \`lib-src'"
451 ln [a-zA-Z
]*.
[chmy
] ..
/${tempdir}/lib-src
452 ln ChangeLog Makefile.
in README testfile vcdiff ..
/${tempdir}/lib-src
453 ln grep-changelog rcs2log rcs-checkin ..
/${tempdir}/lib-src
454 ln makefile.w32-in ..
/${tempdir}/lib-src
455 cd ..
/${tempdir}/lib-src
458 echo "Making links to \`m4'"
460 ln *.
m4 ..
/${tempdir}/m4)
462 echo "Making links to \`nt'"
464 ln emacs.manifest emacs.rc emacsclient.rc config.nt ..
/${tempdir}/nt
465 ln emacs-src.tags nmake.defs gmake.defs subdirs.el ..
/${tempdir}/nt
466 ln [a-z
]*.bat
[a-z
]*.
[ch
] ..
/${tempdir}/nt
467 ln ChangeLog INSTALL README README.W32 makefile.w32-in ..
/${tempdir}/nt
)
469 echo "Making links to \`nt/inc'"
471 ln [a-z
]*.h ..
/..
/${tempdir}/nt
/inc
)
473 echo "Making links to \`nt/inc/sys'"
475 ln [a-z
]*.h ..
/..
/..
/${tempdir}/nt
/inc
/sys
)
477 echo "Making links to \`nt/inc/arpa'"
479 ln [a-z
]*.h ..
/..
/..
/${tempdir}/nt
/inc
/arpa
)
481 echo "Making links to \`nt/inc/netinet'"
483 ln [a-z
]*.h ..
/..
/..
/${tempdir}/nt
/inc
/netinet
)
485 echo "Making links to \`nt/icons'"
487 ln README
[a-z
]*.ico ..
/..
/${tempdir}/nt
/icons
488 ln [a-z
]*.cur ..
/..
/${tempdir}/nt
/icons
)
490 echo "Making links to \`msdos'"
492 ln ChangeLog INSTALL README emacs.ico emacs.pif ..
/${tempdir}/msdos
493 ln is_exec.c sigaction.c mainmake.v2
sed*.inp ..
/${tempdir}/msdos
)
495 ## FIXME are DEV-NOTES and FOR-RELEASE appropriate?
496 echo "Making links to \`nextstep'"
498 ln AUTHORS ChangeLog README INSTALL ..
/${tempdir}/nextstep
)
500 echo "Making links to \`nextstep/Cocoa/Emacs.base/Contents'"
501 (cd nextstep
/Cocoa
/Emacs.base
/Contents
502 ln Info.plist PkgInfo ..
/..
/..
/..
/${tempdir}/nextstep
/Cocoa
/Emacs.base
/Contents
)
504 echo "Making links to \`nextstep/Cocoa/Emacs.base/Contents/Resources'"
505 (cd nextstep
/Cocoa
/Emacs.base
/Contents
/Resources
506 ln Credits.html
*.icns ..
/..
/..
/..
/..
/${tempdir}/nextstep
/Cocoa
/Emacs.base
/Contents
/Resources
)
508 echo "Making links to \`nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj'"
509 (cd nextstep
/Cocoa
/Emacs.base
/Contents
/Resources
/English.lproj
510 ln InfoPlist.
strings ..
/..
/..
/..
/..
/..
/${tempdir}/nextstep
/Cocoa
/Emacs.base
/Contents
/Resources
/English.lproj
)
512 echo "Making links to \`nextstep/Cocoa/Emacs.xcodeproj'"
513 (cd nextstep
/Cocoa
/Emacs.xcodeproj
514 ln project.pbxproj ..
/..
/..
/${tempdir}/nextstep
/Cocoa
/Emacs.xcodeproj
)
516 echo "Making links to \`nextstep/GNUstep/Emacs.base/Resources'"
517 (cd nextstep
/GNUstep
/Emacs.base
/Resources
518 ln Emacs.desktop Info-gnustep.plist README emacs.tiff ..
/..
/..
/..
/${tempdir}/nextstep
/GNUstep
/Emacs.base
/Resources
)
520 echo "Making links to \`oldXMenu'"
522 ln *.
[ch
] *.
in ..
/${tempdir}/oldXMenu
523 ln README ChangeLog ..
/${tempdir}/oldXMenu
)
525 echo "Making links to \`lwlib'"
527 ln *.
[ch
] *.
in ..
/${tempdir}/lwlib
528 ln README ChangeLog ..
/${tempdir}/lwlib
)
530 echo "Making links to \`etc'"
533 [ -f "$f" ] ||
continue
537 ln $f ..
/${tempdir}/etc
540 for dir
in etc
/*/; do
542 etc
/images
/) continue ;;
544 echo "Making links to \`${dir}'"
546 ln * ..
/..
/${tempdir}/${dir})
549 echo "Making links to \`etc/images'"
552 [ -f "$f" ] ||
continue
553 ln $f ..
/..
/${tempdir}/etc
/images
556 for dir
in etc
/images
/*/; do
557 echo "Making links to \`${dir}'"
560 [ -f "$f" ] ||
continue
561 ln $f ..
/..
/..
/${tempdir}/${dir}
566 for dir
in etc
/images
/*/*/; do
568 etc
/images
/icons
/hicolor
/) continue ;;
570 echo "Making links to \`${dir}'"
572 ln `ls -d *` ..
/..
/..
/..
/${tempdir}/${dir})
575 for dir
in etc
/images
/icons
/hicolor
/*/apps \
576 etc
/images
/icons
/hicolor
/*/mimetypes
; do
577 echo "Making links to \`${dir}'"
579 ln `ls -d *` ..
/..
/..
/..
/..
/..
/${tempdir}/${dir}
580 cd ..
/..
/..
/..
/..
/..
/${tempdir}/${dir})
583 echo "Making links to \`info'"
585 ln `find . -type f -print` ..
/${tempdir}/info
)
587 echo "Making links to \`doc/emacs'"
589 ln *.texi
*.
in makefile.w32-in ChangeLog
* ..
/..
/${tempdir}/doc
/emacs
)
591 echo "Making links to \`doc/misc'"
593 ln *.texi
*.tex
*.
in makefile.w32-in gnus-news.el ChangeLog
* ..
/..
/${tempdir}/doc
/misc
)
595 echo "Making links to \`doc/lispref'"
597 ln *.texi
*.
in makefile.w32-in README ChangeLog
* ..
/..
/${tempdir}/doc
/lispref
598 ln *.txt
*.el spellfile tindex.pl ..
/..
/${tempdir}/doc
/lispref
599 ln two-volume.
make ..
/..
/${tempdir}/doc
/lispref
)
601 echo "Making links to \`doc/lispintro'"
603 ln *.texi
*.
in makefile.w32-in
*.eps
*.pdf ..
/..
/${tempdir}/doc
/lispintro
604 ln README ChangeLog
* ..
/..
/${tempdir}/doc
/lispintro
605 cd ..
/..
/${tempdir}/doc
/lispintro
)
607 echo "Making links to \`doc/man'"
609 ln ChangeLog
* *.1 ..
/..
/${tempdir}/doc
/man
610 cd ..
/..
/${tempdir}/doc
/man
)
612 ### It would be nice if they could all be symlinks to top-level copy, but
613 ### you're not supposed to have any symlinks in distribution tar files.
614 echo "Making sure copying notices are all copies of \`COPYING'"
615 for subdir
in . etc info leim lib-src lisp lwlib msdos nt src
; do
616 rm -f ${tempdir}/${subdir}/COPYING
617 cp COPYING
${tempdir}/${subdir}
620 if [ "${newer}" ]; then
621 echo "Removing files older than $newer"
622 ## We remove .elc files unconditionally, on the theory that anyone picking
623 ## up an incremental distribution already has a running Emacs to byte-compile
625 find ${tempparent} \( -name '*.elc' -o ! -newer ${newer} \) -exec rm -f {} \
;
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 {} \
;
632 if [ "${make_tar}" = yes ]; then
633 if [ "${default_gzip}" = "" ]; then
634 echo "Looking for gzip"
635 temppath
=`echo $PATH | sed 's/^:/.:/
640 for dir in ${temppath}; do
641 if [ -f ${dir}/gzip ]; then echo 'gzip --best'; exit 0; fi
646 case "${default_gzip}" in
647 bzip2) gzip_extension
=.bz2
;;
648 compress* ) gzip_extension
=.Z
;;
649 lzma
) gzip_extension
=.lzma
;;
650 * ) gzip_extension
=.gz
;;
652 echo "Creating tar file"
653 (cd ${tempparent} ; tar cvf
- ${emacsname} ) \
655 > ${emacsname}.
tar${gzip_extension}
658 if [ "${clean_up}" = yes ]; then
659 echo "Cleaning up the staging directory"
662 (cd ${tempparent}; mv ${emacsname} ..
)
666 ### make-dist ends here