3 #### make-dist: create an Emacs distribution tar file from the current
4 #### source tree. This basically creates a duplicate directory
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.
9 # Copyright (C) 1995, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005,
10 # 2006, 2007, 2008 Free Software Foundation, Inc.
12 # This file is part of GNU Emacs.
14 # GNU Emacs is free software; you can redistribute it and/or modify
15 # it under the terms of the GNU General Public License as published by
16 # the Free Software Foundation; either version 3, or (at your option)
19 # GNU Emacs is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU General Public License for more details.
24 # You should have received a copy of the GNU General Public License
25 # along with GNU Emacs; see the file COPYING. If not, write to the
26 # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
27 # Boston, MA 02110-1301, USA.
31 ### Exit if a command fails.
34 ### Print out each line we read, for debugging's sake.
41 export LANGUAGE LC_ALL LC_MESSAGES LANG
43 ## Don't restrict access to any files.
52 while [ $# -gt 0 ]; do
54 ## This option tells make-dist to delete the staging directory
55 ## when done. It is useless to use this unless you make a tar file.
59 ## This option tells make-dist to make a tar file.
63 ## This option tells make-dist not to recompile or do analogous things.
67 ## This option says don't check for bad file names, etc.
71 ## This option tells make-dist to make the distribution normally, then
72 ## remove all files older than the given timestamp file. This is useful
73 ## for creating incremental or patch distributions.
79 ## This option tells make-dist to use `compress' instead of gzip.
80 ## Normally, make-dist uses gzip whenever it is present.
82 default_gzip
="compress"
97 echo "Usage: ${progname} [options]"
99 echo " --bzip2 use bzip2 instead of gzip"
100 echo " --clean-up delete staging directories when done"
101 echo " --compress use compress instead of gzip"
102 echo " --newer=TIME don't include files older than TIME"
103 echo " --no-check don't check for bad file names etc."
104 echo " --no-update don't recompile or do analogous things"
105 echo " --snapshot same as --clean-up --no-update --tar --no-check"
106 echo " --tar make a tar file"
112 echo "${progname}: Unrecognized argument: $1" >&2
119 ### Make sure we're running in the right place.
120 if [ ! -d src
-o ! -f src
/lisp.h
-o ! -d lisp
-o ! -f lisp
/version.el
]; then
121 echo "${progname}: Can't find \`src/lisp.h' and \`lisp/version.el'." >&2
122 echo "${progname} must be run in the top directory of the Emacs" >&2
123 echo "distribution tree. cd to that directory and try again." >&2
127 ### Find where to run Emacs.
128 ### (Accept only absolute file names.)
129 if [ $update = yes ];
134 EMACS
=`pwd`/src
/emacs
139 if [ ! -f "$EMACS" ]; then
140 echo "$0: You must specify the EMACS environment variable " \
141 "to an absolute file name." 2>&1
148 ### Find out which version of Emacs this is.
149 shortversion
=`grep 'defconst[ ]*emacs-version' lisp/version.el \
150 | sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`
151 version
=`grep 'defconst[ ]*emacs-version' lisp/version.el \
152 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
153 if [ ! "${version}" ]; then
154 echo "${progname}: can't find current Emacs version in \`./lisp/version.el'" >&2
158 echo Version numbers are
$version and
$shortversion
160 if [ $update = yes ];
162 if grep -s "@set EMACSVER *${shortversion}" .
/doc
/emacs
/emacs.texi
> /dev
/null
; then
165 echo "You must update the version number in \`./doc/emacs/emacs.texi'"
170 ### Make sure we don't already have a directory emacs-${version}.
172 emacsname
="emacs-${version}${new_extension}"
174 if [ -d ${emacsname} ]
176 echo Directory
"${emacsname}" already exists
>&2
180 ### Make sure the subdirectory is available.
181 tempparent
="make-dist.tmp.$$"
182 if [ -d ${tempparent} ]; then
183 echo "${progname}: staging directory \`${tempparent}' already exists.
184 Perhaps a previous invocation of \`${progname}' failed to clean up after
185 itself. Check that directories whose names are of the form
186 \`make-dist.tmp.NNNNN' don't contain any important information, remove
187 them, and try again." >&2
191 ### Find where to run Emacs.
194 ### Check for .elc files with no corresponding .el file.
195 ls -1 lisp
/[a-zA-Z
]*.el lisp
/[a-z
]*/[a-zA-Z0-9
]*.el \
196 leim
/[a-z
]*/[a-z
]*.el |
sed 's/\.el$/.elc/' > /tmp
/el
197 ls -1 lisp
/[a-zA-Z
]*.elc lisp
/[a-z
]*/[a-zA-Z0-9
]*.elc \
198 leim
/[a-z
]*/[a-z
]*.elc
> /tmp
/elc
199 bogosities
="`comm -13 /tmp/el /tmp/elc`"
200 if [ "${bogosities}" != "" ]; then
201 echo "The following .elc files have no corresponding .el files:"
204 rm -f /tmp
/el
/tmp
/elc
206 ### Check for .el files with no corresponding .elc file.
207 ls -1 lisp
/[a-zA-Z
]*.el lisp
/[a-z
]*/[a-zA-Z0-9
]*.el \
208 leim
/[a-z
]*/[a-z
]*.el
> /tmp
/el
209 ls -1 lisp
/[a-zA-Z
]*.elc lisp
/[a-z
]*/[a-zA-Z0-9
]*.elc \
210 leim
/[a-z
]*/[a-z
]*.elc |
sed 's/\.elc$/.el/' > /tmp
/elc
211 losers
="`comm -23 /tmp/el /tmp/elc`"
213 for file in $losers; do
214 if ! grep -q "no-byte-compile: t" $file; then
216 site-init.el | site-load.el | site-start.el | default.el
)
219 bogosities
="$file $bogosities"
224 if [ x
"${bogosities}" != x
"" ]; then
225 echo "The following .el files have no corresponding .elc files:"
228 rm -f /tmp
/el
/tmp
/elc
231 ### Make sure configure is newer than configure.in.
232 if [ "x`ls -t configure configure.in | sed q`" != "xconfigure" ]; then
233 echo "\`./configure.in' is newer than \`./configure'" >&2
234 echo "Running autoconf" >&2
235 autoconf ||
{ x
=$?
; echo Autoconf FAILED
! >&2; exit $x; }
238 ### Make sure src/config-in.stamp is newer than configure.in.
239 if [ "x`ls -t src/stamp-h.in configure.in | sed q`" != "xsrc/stamp-h.in" ]; then
240 echo "\`./configure.in' is newer than \`./src/stamp-h.in'" >&2
241 echo "Running autoheader" >&2
242 autoheader ||
{ x
=$?
; echo Autoheader FAILED
! >&2; exit $x; }
244 echo timestamp
> src
/stamp-h.
in
247 if [ $update = yes ];
249 echo "Updating Info files"
250 (cd doc
/emacs
; make -f Makefile.
in srcdir
=. info
)
251 (cd doc
/misc
; make -f Makefile.
in srcdir
=. info
)
252 (cd doc
/lispref
; make -f Makefile.
in srcdir
=. info
)
253 (cd doc
/lispintro
; make -f Makefile.
in SHELL
=/bin
/sh srcdir
=. info VPATH
=.
)
255 echo "Updating finder, custom and autoload data"
256 (cd lisp
; make updates EMACS
="$EMACS")
258 if test -f leim
/leim-list.el
; then
259 echo "Updating leim-list.el"
260 (cd leim
; make leim-list.el EMACS
="$EMACS")
263 echo "Recompiling Lisp files"
264 $EMACS -batch -f batch-byte-recompile-directory lisp leim
267 echo "Making lisp/MANIFEST"
270 files
=`echo [!=]*.el | sed -e 's/ subdirs.el / /' -e 's/ default.el / /'`
272 if [ -d $dir ] && [ $dir != term
] && [ $dir != CVS
] && [ $dir != RCS
]
275 thisdir
=`echo $dir/[!=]*.el | sed -e 's/ subdirs.el / /'`
276 files
="$files $thisdir"
280 do sed -n 's/^;;; //p; q' $file
281 done |
sort > MANIFEST
)
283 echo "Creating staging directory: \`${tempparent}'"
286 tempdir
="${tempparent}/${emacsname}"
288 ### This trap ensures that the staging directory will be cleaned up even
289 ### when the script is interrupted in mid-career.
290 if [ "${clean_up}" = yes ]; then
291 trap "echo 'Interrupted...cleaning up the staging directory'; rm -rf ${tempparent}; exit 1" 1 2 15
294 echo "Creating top directory: \`${tempdir}'"
297 ### We copy in the top-level files before creating the subdirectories in
298 ### hopes that this will make the top-level files appear first in the
299 ### tar file; this means that people can start reading the INSTALL and
300 ### README while the rest of the tar file is still unpacking. Whoopee.
301 echo "Making links to top-level files"
302 ln INSTALL README BUGS move-if-change
${tempdir}
303 ln ChangeLog Makefile.
in configure configure.
in ${tempdir}
304 ln config.bat make-dist update-subdirs vpath.
sed ${tempdir}
305 ### Copy these files; they're cross-filesystem symlinks.
306 cp mkinstalldirs
${tempdir}
307 cp config.sub
${tempdir}
308 cp config.guess
${tempdir}
309 cp install-sh
${tempdir}
311 echo "Updating version number in README"
314 '$1 " " $2 " " $3 " " $4 " " $5 == "This directory tree holds version" { $6 = version; print $0 }
315 $1 " " $2 " " $3 " " $4 " " $5 != "This directory tree holds version"' \
316 version
=${version} README
> tmp.README
317 mv -f tmp.README README
)
320 echo "Creating subdirectories"
321 for subdir
in lisp site-lisp \
322 leim leim
/CXTERM-DIC leim
/MISC-DIC \
323 leim
/SKK-DIC leim
/ja-dic leim
/quail \
324 src src
/m src
/s src
/bitmaps lib-src oldXMenu lwlib \
325 nt nt
/inc nt
/inc
/sys nt
/inc
/arpa nt
/inc
/netinet nt
/icons \
326 etc etc
/e etc
/gnus etc
/nxml \
327 etc
/images etc
/images
/ezimage etc
/images
/gnus etc
/images
/gud \
328 etc
/images
/icons etc
/images
/icons
/hicolor \
329 etc
/images
/icons
/hicolor
/*x
* etc
/images
/icons
/hicolor
/*x
*/apps \
330 etc
/images
/low-color etc
/images
/mail \
331 etc
/images
/smilies etc
/images
/smilies
/grayscale \
332 etc
/images
/smilies
/medium etc
/images
/tree-widget \
333 etc
/images
/tree-widget
/default etc
/images
/tree-widget
/folder \
334 etc
/refcards etc
/schema etc
/tutorials info doc
doc
/emacs \
335 doc
/misc
doc
/man
doc
/lispref
doc
/lispintro
m4 msdos vms mac \
336 mac
/inc mac
/inc
/sys mac
/src mac
/Emacs.app mac
/Emacs.app
/Contents \
337 mac
/Emacs.app
/Contents
/MacOS mac
/Emacs.app
/Contents
/Resources \
338 mac
/Emacs.app
/Contents
/Resources
/English.lproj
340 echo " ${tempdir}/${subdir}"
341 mkdir
${tempdir}/${subdir}
344 echo "Making links to \`lisp' and its subdirectories"
345 ### Don't distribute TAGS, =*.el files, site-init.el, site-load.el, or default.el.
347 ln [a-zA-Z
]*.el ..
/${tempdir}/lisp
348 ln [a-zA-Z
]*.elc ..
/${tempdir}/lisp
349 ln [a-zA-Z
]*.dat ..
/${tempdir}/lisp
350 for img
in [a-zA-Z
]*.xpm
[a-zA-Z
]*.xbm
[a-zA-Z
]*.pbm
; do
351 # If there are no images, the shell won't expand the pattern.
353 ln $img ..
/${tempdir}/lisp
356 ## simula.el doesn't keep abbreviations in simula.defns any more.
357 ## ln [a-zA-Z]*.defns ../${tempdir}/lisp
358 ln ChangeLog ChangeLog.
*[0-9] ..
/${tempdir}/lisp
359 ln Makefile.
in makefile.w32-in ..
/${tempdir}/lisp
360 test -f README
&& ln README ..
/${tempdir}/lisp
361 (cd ..
/${tempdir}/lisp
363 rm -f site-init site-init.el site-init.elc
364 rm -f site-load site-load.el site-load.elc
365 rm -f site-start site-start.el site-start.elc
366 rm -f default default.el default.elc
369 ## Find all subdirs of lisp dir
370 for file in `find . -type d -print`; do
372 . | .. |
*/Old |
*/CVS |
*/RCS |
*/=*)
375 if [ -d $file ]; then
376 subdirs
="$file $subdirs"
382 for file in $subdirs; do
384 mkdir
-p ..
/${tempdir}/lisp
/$file
385 ln $file/[a-zA-Z0-9
]*.el ..
/${tempdir}/lisp
/$file
386 ln $file/[a-zA-Z0-9
]*.elc ..
/${tempdir}/lisp
/$file
387 for img
in $file/[a-zA-Z
]*.xpm
$file/[a-zA-Z
]*.xbm
$file/[a-zA-Z
]*.pbm
; do
389 ln $img ..
/${tempdir}/lisp
/$file
392 if [ -f $file/README
]; then
393 ln $file/README ..
/${tempdir}/lisp
/$file
396 if [ -f $file/ChangeLog
]; then
397 ln $file/ChangeLog ..
/${tempdir}/lisp
/$file
398 for f
in $file/ChangeLog.
*[0-9]; do
400 ln $f ..
/${tempdir}/lisp
/$file
406 echo "Making links to \`leim' and its subdirectories"
407 ### Don't distribute TAGS, or =*.el files.
409 ln makefile.w32-in ..
/${tempdir}/leim
410 ln ChangeLog README ..
/${tempdir}/leim
412 ln CXTERM-DIC
/*.tit ..
/${tempdir}/leim
/CXTERM-DIC
413 ln SKK-DIC
/README SKK-DIC
/SKK-JISYO.L ..
/${tempdir}/leim
/SKK-DIC
414 ln MISC-DIC
/*.
* ..
/${tempdir}/leim
/MISC-DIC
415 ln ja-dic
/*.el ja-dic
/*.elc ..
/${tempdir}/leim
/ja-dic
416 ln Makefile.
in ..
/${tempdir}/leim
/Makefile.
in
417 ln leim-ext.el ..
/${tempdir}/leim
/leim-ext.el
418 ## Lisp files that start with a capital are generated from TIT
419 ## dictionaries so we don't distribute them.
420 ln quail
/[a-z
]*.el quail
/[a-z
]*.elc ..
/${tempdir}/leim
/quail
421 rm -f ..
/${tempdir}/leim
/quail
/quick-b5.
*
422 rm -f ..
/${tempdir}/leim
/quail
/quick-cns.
*
423 rm -f ..
/${tempdir}/leim
/quail
/tsang-b5.
*
424 rm -f ..
/${tempdir}/leim
/quail
/tsang-cns.
*
426 cd ..
/${tempdir}/leim
429 echo "Making links to \`src'"
430 ### Don't distribute =*.[ch] files, or the configured versions of
431 ### config.in, paths.in, or Makefile.in, or TAGS.
433 echo " (It is ok if ln fails in some cases.)"
434 ln [a-zA-Z
]*.c ..
/${tempdir}/src
435 ln [a-zA-Z
]*.h ..
/${tempdir}/src
436 ln [a-zA-Z
]*.s ..
/${tempdir}/src
437 ln [a-zA-Z
]*.
in ..
/${tempdir}/src
438 ln [a-zA-Z
]*.opt ..
/${tempdir}/src
439 ## If we ended up with a symlink, or if we did not get anything
440 ## due to a cross-device symlink, copy the file.
441 for file in [a-zA-Z
]*.
[hcs
] [a-zA-Z
]*.
in [a-zA-Z
]*.opt
; do
442 if test -f ..
/${tempdir}/src
/$file; then
443 # test -f appears to succeed for a symlink
444 if test -L ..
/${tempdir}/src
/$file; then
445 rm ..
/${tempdir}/src
/$file
446 cp -p $file ..
/${tempdir}/src
447 chmod a-w ..
/${tempdir}/src
/$file
450 rm ..
/${tempdir}/src
/$file
451 cp -p $file ..
/${tempdir}/src
452 chmod a-w ..
/${tempdir}/src
/$file
455 ln README ChangeLog ChangeLog.
*[0-9] ..
/${tempdir}/src
456 ln makefile.w32-in ..
/${tempdir}/src
457 ln .gdbinit .dbxinit ..
/${tempdir}/src
459 rm -f config.h epaths.h Makefile Makefile.c
462 echo "Making links to \`src/bitmaps'"
464 ln README
*.xbm ..
/..
/${tempdir}/src
/bitmaps
)
466 echo "Making links to \`src/m'"
468 # We call files for miscellaneous input (to linker etc) .inp.
469 ln README
[a-zA-Z0-9
]*.h
*.inp ..
/..
/${tempdir}/src
/m
)
471 echo "Making links to \`src/s'"
473 ln README
[a-zA-Z0-9
]*.h ..
/..
/${tempdir}/src
/s
)
475 echo "Making links to \`lib-src'"
477 ln [a-zA-Z
]*.
[chy
] ..
/${tempdir}/lib-src
478 ln ChangeLog Makefile.
in README testfile vcdiff ..
/${tempdir}/lib-src
479 ln grep-changelog rcs2log rcs-checkin ..
/${tempdir}/lib-src
480 ln makefile.w32-in ..
/${tempdir}/lib-src
481 ## If we ended up with a symlink, or if we did not get anything
482 ## due to a cross-device symlink, copy the file.
483 for file in [a-zA-Z
]*.
[chy
]; do
484 if test -f ..
/${tempdir}/lib-src
/$file; then
485 # test -f appears to succeed for a symlink
486 if test -L ..
/${tempdir}/lib-src
/$file; then
487 rm ..
/${tempdir}/lib-src
/$file
488 cp $file ..
/${tempdir}/lib-src
489 chmod a-w ..
/${tempdir}/lib-src
/$file
492 rm ..
/${tempdir}/lib-src
/$file
493 cp $file ..
/${tempdir}/lib-src
494 chmod a-w ..
/${tempdir}/lib-src
/$file
497 cd ..
/${tempdir}/lib-src
502 echo "Making links to \`m4'"
504 ln *.
m4 ..
/${tempdir}/m4)
506 echo "Making links to \`nt'"
508 ln emacs.rc config.nt
[a-z
]*.c ..
/${tempdir}/nt
509 ln nmake.defs gmake.defs subdirs.el ..
/${tempdir}/nt
510 ln [a-z
]*.bat
[a-z
]*.h ..
/${tempdir}/nt
511 ln ChangeLog INSTALL README makefile.w32-in ..
/${tempdir}/nt
)
513 echo "Making links to \`nt/inc'"
515 ln [a-z
]*.h ..
/..
/${tempdir}/nt
/inc
)
517 echo "Making links to \`nt/inc/sys'"
519 ln [a-z
]*.h ..
/..
/..
/${tempdir}/nt
/inc
/sys
)
521 echo "Making links to \`nt/inc/arpa'"
523 ln [a-z
]*.h ..
/..
/..
/${tempdir}/nt
/inc
/arpa
)
525 echo "Making links to \`nt/inc/netinet'"
527 ln [a-z
]*.h ..
/..
/..
/${tempdir}/nt
/inc
/netinet
)
529 echo "Making links to \`nt/icons'"
531 ln [a-z
]*.ico ..
/..
/${tempdir}/nt
/icons
532 ln [a-z
]*.cur ..
/..
/${tempdir}/nt
/icons
)
534 echo "Making links to \`mac'"
536 ln ChangeLog INSTALL README make-package
*.xml
*.MPW ..
/${tempdir}/mac
)
538 echo "Making links to \`mac/inc'"
540 ln [a-z
]*.h ..
/..
/${tempdir}/mac
/inc
)
542 echo "Making links to \`mac/inc/sys'"
544 ln [a-z
]*.h ..
/..
/..
/${tempdir}/mac
/inc
/sys
)
546 echo "Making links to \`mac/src'"
548 ln [a-z
]*.c
*.r ..
/..
/${tempdir}/mac
/src
)
550 echo "Making links to \`mac/Emacs.app/Contents'"
551 (cd mac
/Emacs.app
/Contents
552 ln Info.plist PkgInfo ..
/..
/..
/${tempdir}/mac
/Emacs.app
/Contents
)
554 echo "Making links to \`mac/Emacs.app/Contents/Resources'"
555 (cd mac
/Emacs.app
/Contents
/Resources
556 ln Emacs.icns ..
/..
/..
/..
/${tempdir}/mac
/Emacs.app
/Contents
/Resources
)
558 echo "Making links to \`mac/Emacs.app/Contents/Resources/English.lproj'"
559 (cd mac
/Emacs.app
/Contents
/Resources
/English.lproj
560 ln InfoPlist.
strings ..
/..
/..
/..
/..
/${tempdir}/mac
/Emacs.app
/Contents
/Resources
/English.lproj
)
562 echo "Making links to \`msdos'"
564 ln ChangeLog emacs.ico emacs.pif ..
/${tempdir}/msdos
565 ln is_exec.c sigaction.c mainmake mainmake.v2
sed*.inp ..
/${tempdir}/msdos
566 cd ..
/${tempdir}/msdos
569 echo "Making links to \`oldXMenu'"
571 ln *.c
*.h
*.
in ..
/${tempdir}/oldXMenu
572 ln README ChangeLog ..
/${tempdir}/oldXMenu
573 ln compile.com descrip.mms ..
/${tempdir}/oldXMenu
)
575 echo "Making links to \`lwlib'"
577 ln *.c
*.h
*.
in ..
/${tempdir}/lwlib
578 ln README ChangeLog ..
/${tempdir}/lwlib
)
580 echo "Making links to \`etc'"
581 ### Don't distribute = files, TAGS, DOC files, backups, autosaves, or
584 files
=`ls -d * | grep -v CVS | grep -v RCS | grep -v 'Old' | grep -v '^e$' \
585 | grep -v '^gnus$' | grep -v '^images$' | grep -v '^nxml$' \
586 | grep -v '^refcards$' | grep -v '^tutorials$'| grep -v '^schema$'`
587 ln $files ..
/${tempdir}/etc
588 ## If we ended up with a symlink, or if we did not get anything
589 ## due to a cross-device symlink, copy the file.
590 for file in $files; do
591 if test -f ..
/${tempdir}/etc
/$file; then
592 # test -f appears to succeed for a symlink
593 if test -L ..
/${tempdir}/etc
/$file; then
594 rm ..
/${tempdir}/etc
/$file
595 cp $file ..
/${tempdir}/etc
596 chmod a-w ..
/${tempdir}/etc
/$file
599 rm ..
/${tempdir}/etc
/$file
600 cp $file ..
/${tempdir}/etc
601 chmod a-w ..
/${tempdir}/etc
/$file
606 rm -f DOC
* *~ \
#*\# *.dvi *.log *.orig *.rej *,v =* core
609 for dir
in etc
/e etc
/gnus etc
/nxml etc
/tutorials etc
/refcards etc
/schema
; do
610 echo "Making links to \`${dir}'"
612 ln `ls -d * | grep -v CVS | grep -v RCS` ..
/..
/${tempdir}/${dir}
613 cd ..
/..
/${tempdir}/${dir}
614 rm -f *~ \
#*\# *,v =* core)
617 echo "Making links to \`etc/images'"
619 for img
in README
[a-zA-Z
]*.xpm
[a-zA-Z
]*.xbm
[a-zA-Z
]*.pbm
; do
621 ln $img ..
/..
/${tempdir}/etc
/images
625 for dir
in etc
/images
/ezimage etc
/images
/gnus etc
/images
/gud etc
/images
/icons \
626 etc
/images
/low-color etc
/images
/mail etc
/images
/smilies
; do
627 echo "Making links to \`${dir}'"
629 ln `ls -d * | grep -v CVS | grep -v RCS` ..
/..
/..
/${tempdir}/${dir}
630 cd ..
/..
/..
/${tempdir}/${dir}
631 rm -f *~ \
#*\# *,v =* core)
634 for dir
in etc
/images
/tree-widget
/default etc
/images
/tree-widget
/folder \
635 etc
/images
/smilies
/grayscale etc
/images
/smilies
/medium
; do
636 echo "Making links to \`${dir}'"
638 ln `ls -d * | grep -v CVS | grep -v RCS` ..
/..
/..
/..
/${tempdir}/${dir}
639 cd ..
/..
/..
/..
/${tempdir}/${dir}
640 rm -f *~ \
#*\# *,v =* core)
643 for dir
in etc
/images
/icons
/hicolor
/*x
*/apps
; do
644 echo "Making links to \`${dir}'"
646 ln `ls -d * | grep -v CVS | grep -v RCS` ..
/..
/..
/..
/..
/..
/${tempdir}/${dir}
647 cd ..
/..
/..
/..
/..
/..
/${tempdir}/${dir}
648 rm -f *~ \
#*\# *,v =* core)
651 echo "Making links to \`info'"
652 # Don't distribute backups or autosaves.
654 ln `find . -type f -print | grep -v CVS | grep -v RCS | grep -v cvsignore` ..
/${tempdir}/info
655 #ln [a-zA-Z]* ../${tempdir}/info
656 cd ..
/${tempdir}/info
657 # Avoid an error when expanding the wildcards later.
658 ln emacs dummy~
; ln emacs \
#dummy\#
661 echo "Making links to \`doc/emacs'"
663 ln *.texi
*.aux
*.cps
*.fns
*.kys
*.vrs ..
/..
/${tempdir}/doc
/emacs
664 ln makefile.w32-in ..
/..
/${tempdir}/doc
/emacs
665 test -f README
&& ln README ..
/..
/${tempdir}/doc
/emacs
666 test -f Makefile.
in && ln Makefile.
in ..
/..
/${tempdir}/doc
/emacs
667 ln ChangeLog ..
/..
/${tempdir}/doc
/emacs
668 cp texinfo.tex ..
/..
/${tempdir}/doc
/emacs
669 cd ..
/..
/${tempdir}/doc
/emacs
670 rm -f \
#*\# =* *~ core emacs-index* *.Z *.z xmail
671 rm -f emacs.?? termcap.?? gdb.??
*.log
*.toc
*.dvi
*.oaux
)
673 echo "Making links to \`doc/misc'"
675 ln *.texi
*.aux
*.cps
*.fns
*.kys
*.vrs ..
/..
/${tempdir}/doc
/misc
676 ln makefile.w32-in ..
/..
/${tempdir}/doc
/misc
677 test -f README
&& ln README ..
/..
/${tempdir}/doc
/misc
678 test -f Makefile.
in && ln Makefile.
in ..
/..
/${tempdir}/doc
/misc
679 ln ChangeLog ..
/..
/${tempdir}/doc
/misc
680 cp texinfo.tex ..
/..
/${tempdir}/doc
/misc
681 cd ..
/..
/${tempdir}/doc
/misc
682 rm -f \
#*\# =* *~ core emacs-index* *.Z *.z xmail
683 rm -f emacs.?? termcap.?? gdb.??
*.log
*.toc
*.dvi
*.oaux
)
685 echo "Making links to \`doc/lispref'"
687 ln `ls -1 *.texi` ..
/..
/${tempdir}/doc
/lispref
688 ln *.aux
*.cps
*.fns
*.kys
*.vrs ..
/..
/${tempdir}/doc
/lispref
689 ln *.txt
*.el spellfile tindex.pl ..
/..
/${tempdir}/doc
/lispref
690 ln makefile.w32-in ..
/..
/${tempdir}/doc
/lispref
691 test -f README
&& ln README ..
/..
/${tempdir}/doc
/lispref
692 test -f Makefile.
in && ln Makefile.
in ..
/..
/${tempdir}/doc
/lispref
693 ln ChangeLog ..
/..
/${tempdir}/doc
/lispref
694 cd ..
/..
/${tempdir}/doc
/lispref
695 rm -f \
#*\# =* *~ core elisp-index* *.Z *.z xmail
696 rm -f elisp.??
*.log
*.toc
*.dvi
*.oaux
)
698 echo "Making links to \`doc/lispintro'"
700 ln *.texi
*.aux
*.cps
*.fns
*.kys
*.vrs
*.eps ..
/..
/${tempdir}/doc
/lispintro
701 ln makefile.w32-in ..
/..
/${tempdir}/doc
/lispintro
702 test -f texinfo.tex
&& ln texinfo.tex ..
/..
/${tempdir}/doc
/lispintro
703 test -f README
&& ln README ..
/..
/${tempdir}/doc
/lispintro
704 test -f Makefile.
in && ln Makefile.
in ..
/..
/${tempdir}/doc
/lispintro
705 ln ChangeLog ..
/..
/${tempdir}/doc
/lispintro
706 cd ..
/..
/${tempdir}/doc
/lispintro
707 rm -f \
#*\# =* *~ core *.Z *.z xmail
708 rm -f emacs-lisp-intro.??
*.log
*.toc
*.dvi
*.oaux
)
710 echo "Making links to \`doc/man'"
712 ln *.1 ..
/..
/${tempdir}/doc
/man
)
714 echo "Making links to \`vms'"
716 test -f README
&& ln README ..
/${tempdir}/vms
720 ### It would be nice if they could all be symlinks to top-level copy, but
721 ### you're not supposed to have any symlinks in distribution tar files.
722 echo "Making sure copying notices are all copies of \`COPYING'"
723 for subdir
in . etc info leim lib-src lisp lwlib mac msdos nt src
; do
724 rm -f ${tempdir}/${subdir}/COPYING
725 cp COPYING
${tempdir}/${subdir}
728 if [ "${newer}" ]; then
729 echo "Removing files older than $newer"
730 ## We remove .elc files unconditionally, on the theory that anyone picking
731 ## up an incremental distribution already has a running Emacs to byte-compile
733 find ${tempparent} \( -name '*.elc' -o ! -newer ${newer} \) -exec rm -f {} \
;
736 if [ "${make_tar}" = yes ]; then
737 if [ "${default_gzip}" = "" ]; then
738 echo "Looking for gzip"
739 temppath
=`echo $PATH | sed 's/^:/.:/
744 for dir in ${temppath}; do
745 if [ -f ${dir}/gzip ]; then echo 'gzip --best'; exit 0; fi
750 case "${default_gzip}" in
751 bzip2) gzip_extension
=.bz2
;;
752 compress* ) gzip_extension
=.Z
;;
753 * ) gzip_extension
=.gz
;;
755 echo "Creating tar file"
756 (cd ${tempparent} ; tar cvf
- ${emacsname} ) \
758 > ${emacsname}.
tar${gzip_extension}
761 if [ "${clean_up}" = yes ]; then
762 echo "Cleaning up the staging directory"
765 (cd ${tempparent}; mv ${emacsname} ..
)
769 # arch-tag: 26e3eb50-a394-4ab2-82b2-d8e5af500de7
770 ### make-dist ends here