Mercurial > emacs
comparison make-dist @ 111572:b3f9490f0b7f
merge trunk
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Mon, 08 Nov 2010 14:19:24 +0900 |
parents | 495ef3733d20 |
children | 88da5c66a589 |
comparison
equal
deleted
inserted
replaced
111571:91de9477a77a | 111572:b3f9490f0b7f |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 | 2 ### make-dist: create an Emacs distribution tar file from current srcdir |
3 #### make-dist: create an Emacs distribution tar file from the current | 3 |
4 #### source tree. This basically creates a duplicate directory | 4 ## Copyright (C) 1995, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, |
5 #### structure, and then hard links into it only those files that should | 5 ## 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
6 #### be distributed. This means that if you add a file with an odd name, | 6 |
7 #### you should make sure that this script will include it. | 7 ## This file is part of GNU Emacs. |
8 | 8 |
9 # Copyright (C) 1995, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, | 9 ## GNU Emacs is free software: you can redistribute it and/or modify |
10 # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | 10 ## it under the terms of the GNU General Public License as published by |
11 | 11 ## the Free Software Foundation, either version 3 of the License, or |
12 # This file is part of GNU Emacs. | 12 ## (at your option) any later version. |
13 # | 13 |
14 # GNU Emacs is free software: you can redistribute it and/or modify | 14 ## GNU Emacs is distributed in the hope that it will be useful, |
15 # it under the terms of the GNU General Public License as published by | 15 ## but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 # the Free Software Foundation, either version 3 of the License, or | 16 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 # (at your option) any later version. | 17 ## GNU General Public License for more details. |
18 | 18 |
19 # GNU Emacs is distributed in the hope that it will be useful, | 19 ## You should have received a copy of the GNU General Public License |
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 20 ## along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 21 |
22 # GNU General Public License for more details. | 22 ### Commentary: |
23 | 23 |
24 # You should have received a copy of the GNU General Public License | 24 ## This basically creates a duplicate directory structure, and then |
25 # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | 25 ## hard links into it only those files that should be distributed. |
26 | 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 |
30 ### Exit if a command fails. | 33 ### Exit if a command fails. |
31 #set -e | 34 #set -e |
148 esac | 151 esac |
149 fi | 152 fi |
150 fi | 153 fi |
151 | 154 |
152 ### Find out which version of Emacs this is. | 155 ### Find out which version of Emacs this is. |
153 shortversion=`grep 'char emacs_version' src/emacs.c \ | 156 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 | 157 if [ ! "${version}" ]; then |
158 echo "${progname}: can't find current Emacs version in \`./src/emacs.c'" >&2 | 158 echo "${progname}: can't find current Emacs version in \`./src/emacs.c'" >&2 |
159 exit 1 | 159 exit 1 |
160 fi | 160 fi |
161 | 161 |
162 echo Version numbers are $version and $shortversion | 162 echo Version number is $version |
163 | 163 |
164 if [ $update = yes ]; | 164 if [ $update = yes ]; |
165 then | 165 then |
166 if grep -s "@set EMACSVER *${shortversion}" ./doc/emacs/emacs.texi > /dev/null; then | 166 if grep -s "@set EMACSVER *${version}" ./doc/emacs/emacsver.texi > /dev/null; then |
167 true | 167 true |
168 else | 168 else |
169 echo "You must update the version number in \`./doc/emacs/emacs.texi'" | 169 echo "You must update the version number in \`./doc/emacs/emacsver.texi'" |
170 sleep 5 | 170 sleep 5 |
171 fi | 171 fi |
172 fi | 172 fi |
173 | 173 |
174 ### Make sure we don't already have a directory emacs-${version}. | 174 ### Make sure we don't already have a directory emacs-${version}. |
245 echo "\`./configure.in' is newer than \`./configure'" >&2 | 245 echo "\`./configure.in' is newer than \`./configure'" >&2 |
246 echo "Running autoconf" >&2 | 246 echo "Running autoconf" >&2 |
247 autoconf || { x=$?; echo Autoconf FAILED! >&2; exit $x; } | 247 autoconf || { x=$?; echo Autoconf FAILED! >&2; exit $x; } |
248 fi | 248 fi |
249 | 249 |
250 ### Make sure src/config-in.stamp is newer than configure.in. | 250 ### 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 | 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 | 252 echo "\`./configure.in' is newer than \`./src/stamp-h.in'" >&2 |
253 echo "Running autoheader" >&2 | 253 echo "Running autoheader" >&2 |
254 autoheader || { x=$?; echo Autoheader FAILED! >&2; exit $x; } | 254 autoheader || { x=$?; echo Autoheader FAILED! >&2; exit $x; } |
255 rm -f src/stamp-h.in | 255 rm -f src/stamp-h.in |
257 fi | 257 fi |
258 | 258 |
259 if [ $update = yes ]; | 259 if [ $update = yes ]; |
260 then | 260 then |
261 echo "Updating Info files" | 261 echo "Updating Info files" |
262 (cd doc/emacs; make -f Makefile.in srcdir=. info) | 262 (cd doc/emacs; make info) |
263 (cd doc/misc; make -f Makefile.in srcdir=. info) | 263 (cd doc/misc; make info) |
264 (cd doc/lispref; make -f Makefile.in srcdir=. info) | 264 (cd doc/lispref; make info) |
265 (cd doc/lispintro; make -f Makefile.in SHELL=/bin/sh srcdir=. info VPATH=.) | 265 (cd doc/lispintro; make info) |
266 | 266 |
267 echo "Updating finder, custom and autoload data" | 267 echo "Updating finder, custom and autoload data" |
268 (cd lisp; make updates EMACS="$EMACS") | 268 (cd lisp; make updates EMACS="$EMACS") |
269 | 269 |
270 if test -f leim/leim-list.el; then | 270 if test -f leim/leim-list.el; then |
274 | 274 |
275 echo "Recompiling Lisp files" | 275 echo "Recompiling Lisp files" |
276 $EMACS -batch -f batch-byte-recompile-directory lisp leim | 276 $EMACS -batch -f batch-byte-recompile-directory lisp leim |
277 fi | 277 fi |
278 | 278 |
279 ## What is this file for? It goes in srcdir, not the tarfile. | |
280 ## Why does it exclude term/ ? | |
279 echo "Making lisp/MANIFEST" | 281 echo "Making lisp/MANIFEST" |
280 | 282 |
281 (cd lisp; | 283 files=`find lisp -type f -name '*.el'` |
282 files=`echo [!=]*.el | sed -e 's/ subdirs.el / /' -e 's/ default.el / /'` | 284 for file in $files; do |
283 for dir in [!=]*; do | 285 case "$file" in |
284 if [ -d $dir ] && [ $dir != term ] | 286 */subdirs.el|*/default.el|*/loaddefs.el|*/term/*) continue ;; |
285 then | 287 esac |
286 echo $dir | 288 sed -n 's/^;;; //p; q' $file |
287 thisdir=`echo $dir/[!=]*.el | sed -e 's/ subdirs.el / /'` | 289 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 | 290 |
295 echo "Creating staging directory: \`${tempparent}'" | 291 echo "Creating staging directory: \`${tempparent}'" |
296 | 292 |
297 mkdir ${tempparent} | 293 mkdir ${tempparent} |
298 tempdir="${tempparent}/${emacsname}" | 294 tempdir="${tempparent}/${emacsname}" |
299 | 295 |
300 ### This trap ensures that the staging directory will be cleaned up even | 296 ### This trap ensures that the staging directory will be cleaned up even |
301 ### when the script is interrupted in mid-career. | 297 ### when the script is interrupted in mid-career. |
302 if [ "${clean_up}" = yes ]; then | 298 if [ "${clean_up}" = yes ]; then |
303 trap "echo 'Interrupted...cleaning up the staging directory'; rm -rf ${tempparent}; exit 1" 1 2 15 | 299 trap "echo 'Cleaning up the staging directory'; rm -rf ${tempparent}" EXIT |
304 fi | 300 fi |
305 | 301 |
306 echo "Creating top directory: \`${tempdir}'" | 302 echo "Creating top directory: \`${tempdir}'" |
307 mkdir ${tempdir} | 303 mkdir ${tempdir} |
308 | 304 |
312 ### README while the rest of the tar file is still unpacking. Whoopee. | 308 ### README while the rest of the tar file is still unpacking. Whoopee. |
313 echo "Making links to top-level files" | 309 echo "Making links to top-level files" |
314 ln INSTALL README BUGS move-if-change ${tempdir} | 310 ln INSTALL README BUGS move-if-change ${tempdir} |
315 ln ChangeLog Makefile.in configure configure.in ${tempdir} | 311 ln ChangeLog Makefile.in configure configure.in ${tempdir} |
316 ln config.bat make-dist update-subdirs vpath.sed .dir-locals.el ${tempdir} | 312 ln config.bat make-dist update-subdirs vpath.sed .dir-locals.el ${tempdir} |
317 ### Copy these files; they're cross-filesystem symlinks. | 313 ln mkinstalldirs config.sub config.guess install-sh ${tempdir} |
318 cp mkinstalldirs ${tempdir} | 314 |
319 cp config.sub ${tempdir} | 315 ## FIXME why do we bother doing this? set-version in admin/admin.el |
320 cp config.guess ${tempdir} | 316 ## does this, and more besides. |
321 cp install-sh ${tempdir} | |
322 | |
323 echo "Updating version number in README" | 317 echo "Updating version number in README" |
324 (cd ${tempdir} | 318 (cd ${tempdir} |
325 awk \ | 319 awk \ |
326 '$1 " " $2 " " $3 " " $4 " " $5 == "This directory tree holds version" { $6 = version; print $0 } | 320 '$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"' \ | 321 $1 " " $2 " " $3 " " $4 " " $5 != "This directory tree holds version"' \ |
328 version=${version} README > tmp.README | 322 version=${version} README > tmp.README |
329 mv -f tmp.README README) | 323 mv -f tmp.README README) |
330 | 324 |
331 | 325 |
332 echo "Creating subdirectories" | 326 echo "Creating subdirectories" |
333 for subdir in lisp site-lisp \ | 327 for subdir in site-lisp \ |
334 leim leim/CXTERM-DIC leim/MISC-DIC \ | 328 leim leim/CXTERM-DIC leim/MISC-DIC \ |
335 leim/SKK-DIC leim/ja-dic leim/quail \ | 329 leim/SKK-DIC leim/ja-dic leim/quail \ |
336 src src/m src/s src/bitmaps lib-src oldXMenu lwlib \ | 330 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 \ | 331 nt nt/inc nt/inc/sys nt/inc/arpa nt/inc/netinet nt/icons \ |
338 etc etc/charsets etc/e etc/gnus etc/nxml \ | 332 `find etc lisp -type d` \ |
339 etc/images etc/images/custom etc/images/ezimage etc/images/gnus \ | 333 doc doc/emacs doc/misc doc/man doc/lispref doc/lispintro \ |
340 etc/images/gud etc/images/icons etc/images/icons/hicolor \ | 334 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 \ | 335 nextstep nextstep/Cocoa nextstep/Cocoa/Emacs.base \ |
350 nextstep/Cocoa/Emacs.base/Contents \ | 336 nextstep/Cocoa/Emacs.base/Contents \ |
351 nextstep/Cocoa/Emacs.base/Contents/Resources \ | 337 nextstep/Cocoa/Emacs.base/Contents/Resources \ |
352 nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj \ | 338 nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj \ |
353 nextstep/Cocoa/Emacs.xcodeproj \ | 339 nextstep/Cocoa/Emacs.xcodeproj \ |
361 echo " ${tempdir}/${subdir}" | 347 echo " ${tempdir}/${subdir}" |
362 mkdir ${tempdir}/${subdir} | 348 mkdir ${tempdir}/${subdir} |
363 done | 349 done |
364 | 350 |
365 echo "Making links to \`lisp' and its subdirectories" | 351 echo "Making links to \`lisp' and its subdirectories" |
366 ### Don't distribute TAGS, =*.el files, site-init.el, site-load.el, or default.el. | 352 files=`find lisp \( -name '*.el' -o -name '*.elc' -o -name 'ChangeLog*' \ |
367 (cd lisp | 353 -o -name 'README*' \)` |
368 ln [a-zA-Z]*.el ../${tempdir}/lisp | 354 |
369 ln [a-zA-Z]*.elc ../${tempdir}/lisp | 355 ### Don't distribute site-init.el, site-load.el, or default.el. |
370 ## simula.el doesn't keep abbreviations in simula.defns any more. | 356 for file in lisp/Makefile.in lisp/makefile.w32-in $files; do |
371 ## ln [a-zA-Z]*.defns ../${tempdir}/lisp | 357 case $file in |
372 ln ChangeLog ChangeLog.*[0-9] ../${tempdir}/lisp | 358 */site-init*|*/site-load*|*/default*) continue ;; |
373 ln Makefile.in makefile.w32-in ../${tempdir}/lisp | 359 esac |
374 test -f README && ln README ../${tempdir}/lisp | 360 ln $file $tempdir/$file |
375 (cd ../${tempdir}/lisp | 361 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 | 362 |
411 echo "Making links to \`leim' and its subdirectories" | 363 echo "Making links to \`leim' and its subdirectories" |
412 ### Don't distribute TAGS, or =*.el files. | |
413 (cd leim | 364 (cd leim |
414 ln makefile.w32-in ../${tempdir}/leim | 365 ln makefile.w32-in ../${tempdir}/leim |
415 ln ChangeLog README ../${tempdir}/leim | 366 ln ChangeLog README ../${tempdir}/leim |
416 | |
417 ln CXTERM-DIC/README CXTERM-DIC/*.tit ../${tempdir}/leim/CXTERM-DIC | 367 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 | 368 ln SKK-DIC/README SKK-DIC/SKK-JISYO.L ../${tempdir}/leim/SKK-DIC |
419 ln MISC-DIC/README MISC-DIC/*.* ../${tempdir}/leim/MISC-DIC | 369 ln MISC-DIC/README MISC-DIC/*.* ../${tempdir}/leim/MISC-DIC |
420 ln ja-dic/*.el ja-dic/*.elc ../${tempdir}/leim/ja-dic | 370 ln ja-dic/*.el ja-dic/*.elc ../${tempdir}/leim/ja-dic |
421 ln Makefile.in ../${tempdir}/leim/Makefile.in | 371 ln Makefile.in ../${tempdir}/leim/Makefile.in |
424 ## generated from TIT dictionaries so we don't distribute them. | 374 ## generated from TIT dictionaries so we don't distribute them. |
425 ln quail/[a-z]*.el quail/[a-z]*.elc ../${tempdir}/leim/quail | 375 ln quail/[a-z]*.el quail/[a-z]*.elc ../${tempdir}/leim/quail |
426 rm -f ../${tempdir}/leim/quail/quick-b5.* | 376 rm -f ../${tempdir}/leim/quail/quick-b5.* |
427 rm -f ../${tempdir}/leim/quail/quick-cns.* | 377 rm -f ../${tempdir}/leim/quail/quick-cns.* |
428 rm -f ../${tempdir}/leim/quail/tsang-b5.* | 378 rm -f ../${tempdir}/leim/quail/tsang-b5.* |
429 rm -f ../${tempdir}/leim/quail/tsang-cns.* | 379 rm -f ../${tempdir}/leim/quail/tsang-cns.*) |
430 | |
431 cd ../${tempdir}/leim | |
432 rm -f TAGS =* */=*) | |
433 | 380 |
434 echo "Making links to \`src'" | 381 echo "Making links to \`src'" |
435 ### Don't distribute =*.[ch] files, or the configured versions of | 382 ### Don't distribute the configured versions of |
436 ### config.in, paths.in, or Makefile.in, or TAGS. | 383 ### config.in, paths.in, buildobj.h, or Makefile.in. |
437 (cd src | 384 (cd src |
438 echo " (It is ok if ln fails in some cases.)" | 385 echo " (It is ok if ln fails in some cases.)" |
439 ln [a-zA-Z]*.c ../${tempdir}/src | 386 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 | 387 ln [a-zA-Z]*.in ../${tempdir}/src |
443 ln [a-zA-Z]*.mk ../${tempdir}/src | 388 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 | 389 ln README ChangeLog ChangeLog.*[0-9] ../${tempdir}/src |
461 ln makefile.w32-in ../${tempdir}/src | 390 ln makefile.w32-in ../${tempdir}/src |
462 ln .gdbinit .dbxinit ../${tempdir}/src | 391 ln .gdbinit .dbxinit ../${tempdir}/src |
463 cd ../${tempdir}/src | 392 cd ../${tempdir}/src |
464 rm -f config.h epaths.h Makefile | 393 rm -f config.h epaths.h Makefile buildobj.h) |
465 rm -f =* TAGS) | |
466 | 394 |
467 echo "Making links to \`src/bitmaps'" | 395 echo "Making links to \`src/bitmaps'" |
468 (cd src/bitmaps | 396 (cd src/bitmaps |
469 ln README *.xbm ../../${tempdir}/src/bitmaps) | 397 ln README *.xbm ../../${tempdir}/src/bitmaps) |
470 | 398 |
476 (cd src/s | 404 (cd src/s |
477 ln README [a-zA-Z0-9]*.h ../../${tempdir}/src/s) | 405 ln README [a-zA-Z0-9]*.h ../../${tempdir}/src/s) |
478 | 406 |
479 echo "Making links to \`lib-src'" | 407 echo "Making links to \`lib-src'" |
480 (cd lib-src | 408 (cd lib-src |
481 ln [a-zA-Z]*.[chmy] ../${tempdir}/lib-src | 409 ln [a-zA-Z]*.[ch] ../${tempdir}/lib-src |
482 ln ChangeLog Makefile.in README testfile vcdiff ../${tempdir}/lib-src | 410 ln ChangeLog Makefile.in README testfile vcdiff ../${tempdir}/lib-src |
483 ln b2m.pl grep-changelog rcs2log rcs-checkin ../${tempdir}/lib-src | 411 ln grep-changelog rcs2log rcs-checkin ../${tempdir}/lib-src |
484 ln makefile.w32-in ../${tempdir}/lib-src | 412 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 | 413 cd ../${tempdir}/lib-src |
502 rm -f getopt.h | 414 rm -f getopt.h) |
503 rm -f =* TAGS) | |
504 | 415 |
505 echo "Making links to \`m4'" | 416 echo "Making links to \`m4'" |
506 (cd m4 | 417 (cd m4 |
507 ln *.m4 ../${tempdir}/m4) | 418 ln *.m4 ../${tempdir}/m4) |
508 | 419 |
509 echo "Making links to \`nt'" | 420 echo "Making links to \`nt'" |
510 (cd nt | 421 (cd nt |
511 ln emacs.manifest emacs.rc emacsclient.rc config.nt [a-z]*.c ../${tempdir}/nt | 422 ln emacs.manifest emacs.rc emacsclient.rc config.nt ../${tempdir}/nt |
512 ln nmake.defs gmake.defs subdirs.el ../${tempdir}/nt | 423 ln emacs-src.tags nmake.defs gmake.defs subdirs.el ../${tempdir}/nt |
513 ln [a-z]*.bat [a-z]*.h ../${tempdir}/nt | 424 ln [a-z]*.bat [a-z]*.[ch] ../${tempdir}/nt |
514 ln ChangeLog INSTALL README makefile.w32-in ../${tempdir}/nt) | 425 ln ChangeLog INSTALL README README.W32 makefile.w32-in ../${tempdir}/nt) |
515 | 426 |
516 echo "Making links to \`nt/inc'" | 427 echo "Making links to \`nt/inc'" |
517 (cd nt/inc | 428 (cd nt/inc |
518 ln [a-z]*.h ../../${tempdir}/nt/inc) | 429 ln [a-z]*.h ../../${tempdir}/nt/inc) |
519 | 430 |
535 ln [a-z]*.cur ../../${tempdir}/nt/icons) | 446 ln [a-z]*.cur ../../${tempdir}/nt/icons) |
536 | 447 |
537 echo "Making links to \`msdos'" | 448 echo "Making links to \`msdos'" |
538 (cd msdos | 449 (cd msdos |
539 ln ChangeLog INSTALL README emacs.ico emacs.pif ../${tempdir}/msdos | 450 ln ChangeLog INSTALL README emacs.ico emacs.pif ../${tempdir}/msdos |
540 ln is_exec.c sigaction.c mainmake.v2 sed*.inp ../${tempdir}/msdos | 451 ln is_exec.c sigaction.c mainmake.v2 sed*.inp ../${tempdir}/msdos) |
541 cd ../${tempdir}/msdos | 452 |
542 rm -f =*) | |
543 | |
544 ## FIXME are DEV-NOTES and FOR-RELEASE appropriate? | |
545 echo "Making links to \`nextstep'" | 453 echo "Making links to \`nextstep'" |
546 (cd nextstep | 454 (cd nextstep |
547 ln AUTHORS ChangeLog DEV-NOTES FOR-RELEASE README INSTALL ../${tempdir}/nextstep) | 455 ln AUTHORS ChangeLog README INSTALL ../${tempdir}/nextstep) |
548 | 456 |
549 echo "Making links to \`nextstep/Cocoa/Emacs.base/Contents'" | 457 echo "Making links to \`nextstep/Cocoa/Emacs.base/Contents'" |
550 (cd nextstep/Cocoa/Emacs.base/Contents | 458 (cd nextstep/Cocoa/Emacs.base/Contents |
551 ln Info.plist PkgInfo ../../../../${tempdir}/nextstep/Cocoa/Emacs.base/Contents) | 459 ln Info.plist PkgInfo ../../../../${tempdir}/nextstep/Cocoa/Emacs.base/Contents) |
552 | 460 |
566 (cd nextstep/GNUstep/Emacs.base/Resources | 474 (cd nextstep/GNUstep/Emacs.base/Resources |
567 ln Emacs.desktop Info-gnustep.plist README emacs.tiff ../../../../${tempdir}/nextstep/GNUstep/Emacs.base/Resources ) | 475 ln Emacs.desktop Info-gnustep.plist README emacs.tiff ../../../../${tempdir}/nextstep/GNUstep/Emacs.base/Resources ) |
568 | 476 |
569 echo "Making links to \`oldXMenu'" | 477 echo "Making links to \`oldXMenu'" |
570 (cd oldXMenu | 478 (cd oldXMenu |
571 ln *.c *.h *.in ../${tempdir}/oldXMenu | 479 ln *.[ch] *.in ../${tempdir}/oldXMenu |
572 ln README ChangeLog ../${tempdir}/oldXMenu) | 480 ln README ChangeLog ../${tempdir}/oldXMenu) |
573 | 481 |
574 echo "Making links to \`lwlib'" | 482 echo "Making links to \`lwlib'" |
575 (cd lwlib | 483 (cd lwlib |
576 ln *.c *.h *.in ../${tempdir}/lwlib | 484 ln *.[ch] *.in ../${tempdir}/lwlib |
577 ln README ChangeLog ../${tempdir}/lwlib) | 485 ln README ChangeLog ../${tempdir}/lwlib) |
578 | 486 |
579 echo "Making links to \`etc'" | 487 echo "Making links to \`etc' and its subdirectories" |
580 ### Don't distribute = files, TAGS, DOC files, backups, autosaves, or | 488 for f in `find etc -type f`; do |
581 ### tex litter. | 489 case $f in |
582 (cd etc | 490 etc/DOC*) continue ;; |
583 files=`ls -d * | grep -v '^e$' \ | 491 esac |
584 | grep -v '^charsets$' | grep -v '^gnus$' | grep -v '^images$' | grep -v '^nxml$' \ | 492 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 | 493 done |
615 | 494 |
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 | |
658 | |
659 echo "Making links to \`info'" | 495 echo "Making links to \`info'" |
660 # Don't distribute backups or autosaves. | |
661 (cd info | 496 (cd info |
662 ln `find . -type f -print` ../${tempdir}/info | 497 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 | 498 |
669 echo "Making links to \`doc/emacs'" | 499 echo "Making links to \`doc/emacs'" |
670 (cd doc/emacs | 500 (cd doc/emacs |
671 ln *.texi *.aux *.fns *.kys *.vrs ../../${tempdir}/doc/emacs | 501 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 | 502 |
679 echo "Making links to \`doc/misc'" | 503 echo "Making links to \`doc/misc'" |
680 (cd doc/misc | 504 (cd doc/misc |
681 ln *.texi *.aux *.fns *.kys *.vrs ../../${tempdir}/doc/misc | 505 ln *.texi *.tex *.in makefile.w32-in gnus-news.el ChangeLog* ../../${tempdir}/doc/misc) |
682 ln makefile.w32-in ../../${tempdir}/doc/misc | 506 |
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'" | 507 echo "Making links to \`doc/lispref'" |
694 (cd doc/lispref | 508 (cd doc/lispref |
695 ln *.texi *.aux *.fns *.kys *.vrs ../../${tempdir}/doc/lispref | 509 ln *.texi *.in makefile.w32-in README ChangeLog* ../../${tempdir}/doc/lispref |
696 ln *.txt *.el spellfile tindex.pl ../../${tempdir}/doc/lispref | 510 ln *.txt *.el spellfile tindex.pl ../../${tempdir}/doc/lispref |
697 ln makefile.w32-in ../../${tempdir}/doc/lispref | 511 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 | 512 |
706 echo "Making links to \`doc/lispintro'" | 513 echo "Making links to \`doc/lispintro'" |
707 (cd doc/lispintro | 514 (cd doc/lispintro |
708 ln *.texi *.aux *.fns *.kys *.vrs *.eps *.pdf ../../${tempdir}/doc/lispintro | 515 ln *.texi *.in makefile.w32-in *.eps *.pdf ../../${tempdir}/doc/lispintro |
709 ln makefile.w32-in ../../${tempdir}/doc/lispintro | 516 ln README ChangeLog* ../../${tempdir}/doc/lispintro |
710 test -f README && ln README ../../${tempdir}/doc/lispintro | 517 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 | 518 |
717 echo "Making links to \`doc/man'" | 519 echo "Making links to \`doc/man'" |
718 (cd doc/man | 520 (cd doc/man |
719 ln *.1 ../../${tempdir}/doc/man | 521 ln ChangeLog* *.1 ../../${tempdir}/doc/man |
720 ln ChangeLog ../../${tempdir}/doc/man) | 522 cd ../../${tempdir}/doc/man) |
721 | 523 |
722 ### It would be nice if they could all be symlinks to top-level copy, but | 524 ### 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. | 525 ### you're not supposed to have any symlinks in distribution tar files. |
724 echo "Making sure copying notices are all copies of \`COPYING'" | 526 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 | 527 for subdir in . etc info leim lib-src lisp lwlib msdos nt src; do |
732 ## We remove .elc files unconditionally, on the theory that anyone picking | 534 ## We remove .elc files unconditionally, on the theory that anyone picking |
733 ## up an incremental distribution already has a running Emacs to byte-compile | 535 ## up an incremental distribution already has a running Emacs to byte-compile |
734 ## them with. | 536 ## them with. |
735 find ${tempparent} \( -name '*.elc' -o ! -newer ${newer} \) -exec rm -f {} \; | 537 find ${tempparent} \( -name '*.elc' -o ! -newer ${newer} \) -exec rm -f {} \; |
736 fi | 538 fi |
539 | |
540 ## Don't distribute backups, autosaves, etc. | |
541 echo "Removing unwanted files" | |
542 find ${tempparent} \( -name '*~' -o -name '#*#' -o -name '.*ignore' -o -name '=*' -o -name 'TAGS' \) -exec rm -f {} \; | |
737 | 543 |
738 if [ "${make_tar}" = yes ]; then | 544 if [ "${make_tar}" = yes ]; then |
739 if [ "${default_gzip}" = "" ]; then | 545 if [ "${default_gzip}" = "" ]; then |
740 echo "Looking for gzip" | 546 echo "Looking for gzip" |
741 temppath=`echo $PATH | sed 's/^:/.:/ | 547 temppath=`echo $PATH | sed 's/^:/.:/ |
759 (cd ${tempparent} ; tar cvf - ${emacsname} ) \ | 565 (cd ${tempparent} ; tar cvf - ${emacsname} ) \ |
760 | ${default_gzip} \ | 566 | ${default_gzip} \ |
761 > ${emacsname}.tar${gzip_extension} | 567 > ${emacsname}.tar${gzip_extension} |
762 fi | 568 fi |
763 | 569 |
764 if [ "${clean_up}" = yes ]; then | 570 if [ "${clean_up}" != yes ]; then |
765 echo "Cleaning up the staging directory" | |
766 rm -rf ${tempparent} | |
767 else | |
768 (cd ${tempparent}; mv ${emacsname} ..) | 571 (cd ${tempparent}; mv ${emacsname} ..) |
769 rm -rf ${tempparent} | 572 rm -rf ${tempparent} |
770 fi | 573 fi |
771 | 574 |
772 # arch-tag: 26e3eb50-a394-4ab2-82b2-d8e5af500de7 | |
773 ### make-dist ends here | 575 ### make-dist ends here |