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, 2009, 2010 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 of the License, or
17 # (at your option) any later version.
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. If not, see <http://www.gnu.org/licenses/>.
30 ### Exit if a command fails.
33 ### Print out each line we read, for debugging's sake.
40 export LANGUAGE LC_ALL LC_MESSAGES LANG
42 ## Don't restrict access to any files.
51 while [ $# -gt 0 ]; do
53 ## This option tells make-dist to delete the staging directory
54 ## when done. It is useless to use this unless you make a tar file.
58 ## This option tells make-dist to make a tar file.
62 ## This option tells make-dist not to recompile or do analogous things.
66 ## This option says don't check for bad file names, etc.
70 ## This option tells make-dist to make the distribution normally, then
71 ## remove all files older than the given timestamp file. This is useful
72 ## for creating incremental or patch distributions.
78 ## This option tells make-dist to use `compress' instead of gzip.
79 ## Normally, make-dist uses gzip whenever it is present.
81 default_gzip
="compress"
100 echo "Usage: ${progname} [options]"
102 echo " --bzip2 use bzip2 instead of gzip"
103 echo " --clean-up delete staging directories when done"
104 echo " --compress use compress instead of gzip"
105 echo " --lzma use lzma instead of gzip"
106 echo " --newer=TIME don't include files older than TIME"
107 echo " --no-check don't check for bad file names etc."
108 echo " --no-update don't recompile or do analogous things"
109 echo " --snapshot same as --clean-up --no-update --tar --no-check"
110 echo " --tar make a tar file"
116 echo "${progname}: Unrecognized argument: $1" >&2
123 ### Make sure we're running in the right place.
124 if [ ! -d src
-o ! -f src
/lisp.h
-o ! -d lisp
-o ! -f lisp
/version.el
]; then
125 echo "${progname}: Can't find \`src/lisp.h' and \`lisp/version.el'." >&2
126 echo "${progname} must be run in the top directory of the Emacs" >&2
127 echo "distribution tree. cd to that directory and try again." >&2
131 ### Find where to run Emacs.
132 ### (Accept only absolute file names.)
133 if [ $update = yes ];
138 EMACS
=`pwd`/src
/emacs
143 if [ ! -f "$EMACS" ]; then
144 echo "$0: You must set the EMACS environment variable " \
145 "to an absolute file name." 2>&1
152 ### Find out which version of Emacs this is.
153 shortversion
=`grep 'defconst[ ]*emacs-version' lisp/version.el \
154 | sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`
155 version
=`grep 'defconst[ ]*emacs-version' lisp/version.el \
156 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
157 if [ ! "${version}" ]; then
158 echo "${progname}: can't find current Emacs version in \`./lisp/version.el'" >&2
162 echo Version numbers are
$version and
$shortversion
164 if [ $update = yes ];
166 if grep -s "@set EMACSVER *${shortversion}" .
/doc
/emacs
/emacs.texi
> /dev
/null
; then
169 echo "You must update the version number in \`./doc/emacs/emacs.texi'"
174 ### Make sure we don't already have a directory emacs-${version}.
176 emacsname
="emacs-${version}${new_extension}"
178 if [ -d ${emacsname} ]
180 echo Directory
"${emacsname}" already exists
>&2
184 ### Make sure the subdirectory is available.
185 tempparent
="make-dist.tmp.$$"
186 if [ -d ${tempparent} ]; then
187 echo "${progname}: staging directory \`${tempparent}' already exists.
188 Perhaps a previous invocation of \`${progname}' failed to clean up after
189 itself. Check that directories whose names are of the form
190 \`make-dist.tmp.NNNNN' don't contain any important information, remove
191 them, and try again." >&2
195 ### Find where to run Emacs.
198 ### Check for .elc files with no corresponding .el file.
199 ls -1 lisp
/[a-zA-Z
]*.el lisp
/[a-z
]*/[a-zA-Z0-9
]*.el \
200 lisp
/[a-z
]*/[a-z
]*/[a-zA-Z0-9
]*.el \
201 lisp
/[a-z
]*/[a-z
]*/[a-z
]*/[a-zA-Z0-9
]*.el \
202 leim
/[a-z
]*/[a-z
]*.el |
sed 's/\.el$/.elc/' > /tmp
/el
203 ls -1 lisp
/[a-zA-Z
]*.elc lisp
/[a-z
]*/[a-zA-Z0-9
]*.elc \
204 lisp
/[a-z
]*/[a-z
]*/[a-zA-Z0-9
]*.elc \
205 lisp
/[a-z
]*/[a-z
]*/[a-z
]*/[a-zA-Z0-9
]*.elc \
206 leim
/[a-z
]*/[a-z
]*.elc
> /tmp
/elc
207 bogosities
="`comm -13 /tmp/el /tmp/elc`"
208 if [ "${bogosities}" != "" ]; then
209 echo "The following .elc files have no corresponding .el files:"
212 rm -f /tmp
/el
/tmp
/elc
214 ### Check for .el files with no corresponding .elc file.
215 ls -1 lisp
/[a-zA-Z
]*.el lisp
/[a-z
]*/[a-zA-Z0-9
]*.el \
216 lisp
/[a-z
]*/[a-z
]*/[a-zA-Z0-9
]*.el \
217 lisp
/[a-z
]*/[a-z
]*/[a-z
]*/[a-zA-Z0-9
]*.el \
218 leim
/[a-z
]*/[a-z
]*.el
> /tmp
/el
219 ls -1 lisp
/[a-zA-Z
]*.elc lisp
/[a-z
]*/[a-zA-Z0-9
]*.elc \
220 lisp
/[a-z
]*/[a-z
]*/[a-zA-Z0-9
]*.el \
221 lisp
/[a-z
]*/[a-z
]*/[a-z
]*/[a-zA-Z0-9
]*.el \
222 leim
/[a-z
]*/[a-z
]*.elc |
sed 's/\.elc$/.el/' > /tmp
/elc
223 losers
="`comm -23 /tmp/el /tmp/elc`"
225 for file in $losers; do
226 if ! grep -q "no-byte-compile: t" $file; then
228 site-init.el | site-load.el | site-start.el | default.el
)
231 bogosities
="$file $bogosities"
236 if [ x
"${bogosities}" != x
"" ]; then
237 echo "The following .el files have no corresponding .elc files:"
240 rm -f /tmp
/el
/tmp
/elc
243 ### Make sure configure is newer than configure.in.
244 if [ "x`ls -t configure configure.in | sed q`" != "xconfigure" ]; then
245 echo "\`./configure.in' is newer than \`./configure'" >&2
246 echo "Running autoconf" >&2
247 autoconf ||
{ x
=$?
; echo Autoconf FAILED
! >&2; exit $x; }
250 ### Make sure src/config-in.stamp is newer than configure.in.
251 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
253 echo "Running autoheader" >&2
254 autoheader ||
{ x
=$?
; echo Autoheader FAILED
! >&2; exit $x; }
256 echo timestamp
> src
/stamp-h.
in
259 if [ $update = yes ];
261 echo "Updating Info files"
262 (cd doc
/emacs
; make -f Makefile.
in srcdir
=. info
)
263 (cd doc
/misc
; make -f Makefile.
in srcdir
=. info
)
264 (cd doc
/lispref
; make -f Makefile.
in srcdir
=. info
)
265 (cd doc
/lispintro
; make -f Makefile.
in SHELL
=/bin
/sh srcdir
=. info VPATH
=.
)
267 echo "Updating finder, custom and autoload data"
268 (cd lisp
; make updates EMACS
="$EMACS")
270 if test -f leim
/leim-list.el
; then
271 echo "Updating leim-list.el"
272 (cd leim
; make leim-list.el EMACS
="$EMACS")
275 echo "Recompiling Lisp files"
276 $EMACS -batch -f batch-byte-recompile-directory lisp leim
279 echo "Making lisp/MANIFEST"
282 files
=`echo [!=]*.el | sed -e 's/ subdirs.el / /' -e 's/ default.el / /'`
284 if [ -d $dir ] && [ $dir != term
] && [ $dir != CVS
] && [ $dir != RCS
]
287 thisdir
=`echo $dir/[!=]*.el | sed -e 's/ subdirs.el / /'`
288 files
="$files $thisdir"
292 do sed -n 's/^;;; //p; q' $file
293 done |
sort > MANIFEST
)
295 echo "Creating staging directory: \`${tempparent}'"
298 tempdir
="${tempparent}/${emacsname}"
300 ### This trap ensures that the staging directory will be cleaned up even
301 ### when the script is interrupted in mid-career.
302 if [ "${clean_up}" = yes ]; then
303 trap "echo 'Interrupted...cleaning up the staging directory'; rm -rf ${tempparent}; exit 1" 1 2 15
306 echo "Creating top directory: \`${tempdir}'"
309 ### We copy in the top-level files before creating the subdirectories in
310 ### hopes that this will make the top-level files appear first in the
311 ### tar file; this means that people can start reading the INSTALL and
312 ### README while the rest of the tar file is still unpacking. Whoopee.
313 echo "Making links to top-level files"
314 ln INSTALL README BUGS move-if-change
${tempdir}
315 ln ChangeLog Makefile.
in configure configure.
in ${tempdir}
316 ln config.bat make-dist update-subdirs vpath.
sed .dir-locals.el
${tempdir}
317 ### Copy these files; they're cross-filesystem symlinks.
318 cp mkinstalldirs
${tempdir}
319 cp config.sub
${tempdir}
320 cp config.guess
${tempdir}
321 cp install-sh
${tempdir}
323 echo "Updating version number in README"
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
)
332 echo "Creating subdirectories"
333 for subdir
in lisp site-lisp \
334 leim leim
/CXTERM-DIC leim
/MISC-DIC \
335 leim
/SKK-DIC leim
/ja-dic leim
/quail \
336 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 \
338 etc etc
/charsets etc
/e etc
/gnus etc
/nxml \
339 etc
/images etc
/images
/custom etc
/images
/ezimage etc
/images
/gnus \
340 etc
/images
/gud etc
/images
/icons etc
/images
/icons
/hicolor \
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 \
350 nextstep
/Cocoa
/Emacs.base
/Contents \
351 nextstep
/Cocoa
/Emacs.base
/Contents
/Resources \
352 nextstep
/Cocoa
/Emacs.base
/Contents
/Resources
/English.lproj \
353 nextstep
/Cocoa
/Emacs.xcodeproj \
355 nextstep
/GNUstep
/Emacs.base \
356 nextstep
/GNUstep
/Emacs.base
/Resources
358 ## site-lisp for in-place installs (?).
359 [ "$subdir" = "site-lisp" ] ||
[ -d "$subdir" ] || \
360 echo "WARNING: $subdir not found, making anyway"
361 echo " ${tempdir}/${subdir}"
362 mkdir
${tempdir}/${subdir}
365 echo "Making links to \`lisp' and its subdirectories"
366 ### Don't distribute TAGS, =*.el files, site-init.el, site-load.el, or default.el.
368 ln [a-zA-Z
]*.el ..
/${tempdir}/lisp
369 ln [a-zA-Z
]*.elc ..
/${tempdir}/lisp
370 ## simula.el doesn't keep abbreviations in simula.defns any more.
371 ## ln [a-zA-Z]*.defns ../${tempdir}/lisp
372 ln ChangeLog ChangeLog.
*[0-9] ..
/${tempdir}/lisp
373 ln Makefile.
in makefile.w32-in ..
/${tempdir}/lisp
374 test -f README
&& ln README ..
/${tempdir}/lisp
375 (cd ..
/${tempdir}/lisp
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
383 ## Find all subdirs of lisp dir
384 for file in `find . -type d -print`; do
386 . | .. |
*/Old |
*/CVS |
*/RCS |
*/=*)
389 if [ -d $file ]; then
390 subdirs
="$file $subdirs"
396 for file in $subdirs; do
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, nxml/TODO
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
$file/TODO
; do
406 ln $f ..
/${tempdir}/lisp
/$file
411 echo "Making links to \`leim' and its subdirectories"
412 ### Don't distribute TAGS, or =*.el files.
414 ln makefile.w32-in ..
/${tempdir}/leim
415 ln ChangeLog README ..
/${tempdir}/leim
417 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
419 ln MISC-DIC
/README MISC-DIC
/*.
* ..
/${tempdir}/leim
/MISC-DIC
420 ln ja-dic
/*.el ja-dic
/*.elc ..
/${tempdir}/leim
/ja-dic
421 ln Makefile.
in ..
/${tempdir}/leim
/Makefile.
in
422 ln leim-ext.el ..
/${tempdir}/leim
/leim-ext.el
423 ## Lisp files that start with a capital (also 4Corner.el) are
424 ## generated from TIT dictionaries so we don't distribute them.
425 ln quail
/[a-z
]*.el quail
/[a-z
]*.elc ..
/${tempdir}/leim
/quail
426 rm -f ..
/${tempdir}/leim
/quail
/quick-b5.
*
427 rm -f ..
/${tempdir}/leim
/quail
/quick-cns.
*
428 rm -f ..
/${tempdir}/leim
/quail
/tsang-b5.
*
429 rm -f ..
/${tempdir}/leim
/quail
/tsang-cns.
*
431 cd ..
/${tempdir}/leim
434 echo "Making links to \`src'"
435 ### Don't distribute =*.[ch] files, or the configured versions of
436 ### config.in, paths.in, or Makefile.in, or TAGS.
438 echo " (It is ok if ln fails in some cases.)"
439 ln [a-zA-Z
]*.c ..
/${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
443 ## If we ended up with a symlink, or if we did not get anything
444 ## due to a cross-device symlink, copy the file.
445 for file in [a-zA-Z
]*.
[hcs
] [a-zA-Z
]*.
in; do
446 if test -f ..
/${tempdir}/src
/$file; then
447 # test -f appears to succeed for a symlink
448 if test -L ..
/${tempdir}/src
/$file; then
449 rm ..
/${tempdir}/src
/$file
450 cp -p $file ..
/${tempdir}/src
451 chmod a-w ..
/${tempdir}/src
/$file
454 rm ..
/${tempdir}/src
/$file
455 cp -p $file ..
/${tempdir}/src
456 chmod a-w ..
/${tempdir}/src
/$file
459 ln README ChangeLog ChangeLog.
*[0-9] ..
/${tempdir}/src
460 ln makefile.w32-in ..
/${tempdir}/src
461 ln .gdbinit .dbxinit ..
/${tempdir}/src
463 rm -f config.h epaths.h Makefile Makefile.c
466 echo "Making links to \`src/bitmaps'"
468 ln README
*.xbm ..
/..
/${tempdir}/src
/bitmaps
)
470 echo "Making links to \`src/m'"
472 ln README
[a-zA-Z0-9
]*.h ..
/..
/${tempdir}/src
/m
)
474 echo "Making links to \`src/s'"
476 ln README
[a-zA-Z0-9
]*.h ..
/..
/${tempdir}/src
/s
)
478 echo "Making links to \`lib-src'"
480 ln [a-zA-Z
]*.
[chmy
] ..
/${tempdir}/lib-src
481 ln ChangeLog Makefile.
in README testfile vcdiff ..
/${tempdir}/lib-src
482 ln b2m.pl grep-changelog rcs2log rcs-checkin ..
/${tempdir}/lib-src
483 ln makefile.w32-in ..
/${tempdir}/lib-src
484 ## If we ended up with a symlink, or if we did not get anything
485 ## due to a cross-device symlink, copy the file.
486 for file in [a-zA-Z
]*.
[chy
]; do
487 if test -f ..
/${tempdir}/lib-src
/$file; then
488 # test -f appears to succeed for a symlink
489 if test -L ..
/${tempdir}/lib-src
/$file; then
490 rm ..
/${tempdir}/lib-src
/$file
491 cp $file ..
/${tempdir}/lib-src
492 chmod a-w ..
/${tempdir}/lib-src
/$file
495 rm ..
/${tempdir}/lib-src
/$file
496 cp $file ..
/${tempdir}/lib-src
497 chmod a-w ..
/${tempdir}/lib-src
/$file
500 cd ..
/${tempdir}/lib-src
505 echo "Making links to \`m4'"
507 ln *.
m4 ..
/${tempdir}/m4)
509 echo "Making links to \`nt'"
511 ln emacs.manifest emacs.rc emacsclient.rc config.nt
[a-z
]*.c ..
/${tempdir}/nt
512 ln nmake.defs gmake.defs subdirs.el ..
/${tempdir}/nt
513 ln [a-z
]*.bat
[a-z
]*.h ..
/${tempdir}/nt
514 ln ChangeLog INSTALL README makefile.w32-in ..
/${tempdir}/nt
)
516 echo "Making links to \`nt/inc'"
518 ln [a-z
]*.h ..
/..
/${tempdir}/nt
/inc
)
520 echo "Making links to \`nt/inc/sys'"
522 ln [a-z
]*.h ..
/..
/..
/${tempdir}/nt
/inc
/sys
)
524 echo "Making links to \`nt/inc/arpa'"
526 ln [a-z
]*.h ..
/..
/..
/${tempdir}/nt
/inc
/arpa
)
528 echo "Making links to \`nt/inc/netinet'"
530 ln [a-z
]*.h ..
/..
/..
/${tempdir}/nt
/inc
/netinet
)
532 echo "Making links to \`nt/icons'"
534 ln README
[a-z
]*.ico ..
/..
/${tempdir}/nt
/icons
535 ln [a-z
]*.cur ..
/..
/${tempdir}/nt
/icons
)
537 echo "Making links to \`msdos'"
539 ln ChangeLog INSTALL README emacs.ico emacs.pif ..
/${tempdir}/msdos
540 ln is_exec.c sigaction.c mainmake mainmake.v2
sed*.inp ..
/${tempdir}/msdos
541 cd ..
/${tempdir}/msdos
544 ## FIXME are DEV-NOTES and FOR-RELEASE appropriate?
545 echo "Making links to \`nextstep'"
547 ln AUTHORS ChangeLog DEV-NOTES FOR-RELEASE README INSTALL ..
/${tempdir}/nextstep
)
549 echo "Making links to \`nextstep/Cocoa/Emacs.base/Contents'"
550 (cd nextstep
/Cocoa
/Emacs.base
/Contents
551 ln Info.plist PkgInfo ..
/..
/..
/..
/${tempdir}/nextstep
/Cocoa
/Emacs.base
/Contents
)
553 echo "Making links to \`nextstep/Cocoa/Emacs.base/Contents/Resources'"
554 (cd nextstep
/Cocoa
/Emacs.base
/Contents
/Resources
555 ln Credits.html
*.icns ..
/..
/..
/..
/..
/${tempdir}/nextstep
/Cocoa
/Emacs.base
/Contents
/Resources
)
557 echo "Making links to \`nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj'"
558 (cd nextstep
/Cocoa
/Emacs.base
/Contents
/Resources
/English.lproj
559 ln InfoPlist.
strings ..
/..
/..
/..
/..
/..
/${tempdir}/nextstep
/Cocoa
/Emacs.base
/Contents
/Resources
/English.lproj
)
561 echo "Making links to \`nextstep/Cocoa/Emacs.xcodeproj'"
562 (cd nextstep
/Cocoa
/Emacs.xcodeproj
563 ln project.pbxproj ..
/..
/..
/${tempdir}/nextstep
/Cocoa
/Emacs.xcodeproj
)
565 echo "Making links to \`nextstep/GNUstep/Emacs.base/Resources'"
566 (cd nextstep
/GNUstep
/Emacs.base
/Resources
567 ln Emacs.desktop Info-gnustep.plist README emacs.tiff ..
/..
/..
/..
/${tempdir}/nextstep
/GNUstep
/Emacs.base
/Resources
)
569 echo "Making links to \`oldXMenu'"
571 ln *.c
*.h
*.
in ..
/${tempdir}/oldXMenu
572 ln README ChangeLog ..
/${tempdir}/oldXMenu
)
574 echo "Making links to \`lwlib'"
576 ln *.c
*.h
*.
in ..
/${tempdir}/lwlib
577 ln README ChangeLog ..
/${tempdir}/lwlib
)
579 echo "Making links to \`etc'"
580 ### Don't distribute = files, TAGS, DOC files, backups, autosaves, or
583 files
=`ls -d * | grep -v CVS | grep -v RCS | grep -v 'Old' | grep -v '^e$' \
584 | grep -v '^charsets$' | grep -v '^gnus$' | grep -v '^images$' | grep -v '^nxml$' \
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
598 rm ..
/${tempdir}/etc
/$file
599 cp $file ..
/${tempdir}/etc
600 chmod a-w ..
/${tempdir}/etc
/$file
605 rm -f DOC
* *~ \
#*\# *.dvi *.log *.orig *.rej *,v =* core
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}'"
611 ln `ls -d * | grep -v CVS | grep -v RCS` ..
/..
/${tempdir}/${dir}
612 cd ..
/..
/${tempdir}/${dir}
613 rm -f *~ \
#*\# *,v =* core)
616 echo "Making links to \`etc/images'"
619 [ -f "$f" ] ||
continue
621 (*~|\
#*\#|*,v|=*|core) continue ;;
623 ln $f ..
/..
/${tempdir}/etc
/images
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}'"
632 [ -f "$f" ] ||
continue
634 (*~|\
#*\#|*,v|=*|core) continue ;;
636 ln $f ..
/..
/..
/${tempdir}/${dir}
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}'"
645 ln `ls -d * | grep -v CVS | grep -v RCS` ..
/..
/..
/..
/${tempdir}/${dir}
646 cd ..
/..
/..
/..
/${tempdir}/${dir}
647 rm -f *~ \
#*\# *,v =* core)
650 for dir
in etc
/images
/icons
/hicolor
/*/apps \
651 etc
/images
/icons
/hicolor
/*/mimetypes
; do
652 echo "Making links to \`${dir}'"
654 ln `ls -d * | grep -v CVS | grep -v RCS` ..
/..
/..
/..
/..
/..
/${tempdir}/${dir}
655 cd ..
/..
/..
/..
/..
/..
/${tempdir}/${dir}
656 rm -f *~ \
#*\# *,v =* core)
659 echo "Making links to \`info'"
660 # Don't distribute backups or autosaves.
662 ln `find . -type f -print | grep -v CVS | grep -v RCS | grep -v cvsignore` ..
/${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)
669 echo "Making links to \`doc/emacs'"
671 ln *.texi
*.aux
*.fns
*.kys
*.vrs ..
/..
/${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
)
679 echo "Making links to \`doc/misc'"
681 ln *.texi
*.aux
*.fns
*.kys
*.vrs ..
/..
/${tempdir}/doc
/misc
682 ln makefile.w32-in ..
/..
/${tempdir}/doc
/misc
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
)
692 ## FIXME book-spine.texinfo unused?
693 echo "Making links to \`doc/lispref'"
695 ln *.texi
*.aux
*.fns
*.kys
*.vrs ..
/..
/${tempdir}/doc
/lispref
696 ln *.txt
*.el spellfile tindex.pl ..
/..
/${tempdir}/doc
/lispref
697 ln makefile.w32-in ..
/..
/${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
)
706 echo "Making links to \`doc/lispintro'"
708 ln *.texi
*.aux
*.fns
*.kys
*.vrs
*.eps
*.pdf ..
/..
/${tempdir}/doc
/lispintro
709 ln makefile.w32-in ..
/..
/${tempdir}/doc
/lispintro
710 test -f README
&& ln README ..
/..
/${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
)
717 echo "Making links to \`doc/man'"
719 ln *.1 ..
/..
/${tempdir}/doc
/man
720 ln ChangeLog ..
/..
/${tempdir}/doc
/man
)
722 ### 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.
724 echo "Making sure copying notices are all copies of \`COPYING'"
725 for subdir
in . etc info leim lib-src lisp lwlib msdos nt src
; do
726 rm -f ${tempdir}/${subdir}/COPYING
727 cp COPYING
${tempdir}/${subdir}
730 if [ "${newer}" ]; then
731 echo "Removing files older than $newer"
732 ## We remove .elc files unconditionally, on the theory that anyone picking
733 ## up an incremental distribution already has a running Emacs to byte-compile
735 find ${tempparent} \( -name '*.elc' -o ! -newer ${newer} \) -exec rm -f {} \
;
738 if [ "${make_tar}" = yes ]; then
739 if [ "${default_gzip}" = "" ]; then
740 echo "Looking for gzip"
741 temppath
=`echo $PATH | sed 's/^:/.:/
746 for dir in ${temppath}; do
747 if [ -f ${dir}/gzip ]; then echo 'gzip --best'; exit 0; fi
752 case "${default_gzip}" in
753 bzip2) gzip_extension
=.bz2
;;
754 compress* ) gzip_extension
=.Z
;;
755 lzma
) gzip_extension
=.lzma
;;
756 * ) gzip_extension
=.gz
;;
758 echo "Creating tar file"
759 (cd ${tempparent} ; tar cvf
- ${emacsname} ) \
761 > ${emacsname}.
tar${gzip_extension}
764 if [ "${clean_up}" = yes ]; then
765 echo "Cleaning up the staging directory"
768 (cd ${tempparent}; mv ${emacsname} ..
)
772 # arch-tag: 26e3eb50-a394-4ab2-82b2-d8e5af500de7
773 ### make-dist ends here