annotate make-dist @ 112310:e838cdd68eae

Use gnulib's getopt-gnu module.
author Paul Eggert <eggert@cs.ucla.edu>
date Sat, 08 Jan 2011 23:29:26 -0800
parents 1bd15f32eeb7
children 17e0028efc29
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111811
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
1 #!/bin/sh
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
2 ### make-dist: create an Emacs distribution tar file from current srcdir
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
3
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
4 ## Copyright (C) 1995, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005,
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
5 ## 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
6
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
7 ## This file is part of GNU Emacs.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
8
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
9 ## GNU Emacs is free software: you can redistribute it and/or modify
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
10 ## it under the terms of the GNU General Public License as published by
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
11 ## the Free Software Foundation, either version 3 of the License, or
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
12 ## (at your option) any later version.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
13
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
14 ## GNU Emacs is distributed in the hope that it will be useful,
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
15 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
16 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
17 ## GNU General Public License for more details.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
18
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
19 ## You should have received a copy of the GNU General Public License
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
20 ## along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
21
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
22 ### Commentary:
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
23
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
24 ## This basically creates a duplicate directory structure, and then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
25 ## hard links into it only those files that should be distributed.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
26 ## This means that if you add a file with an odd name, you should make
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
27 ## sure that this script will include it.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
28
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
29 ### Code:
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
30
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
31 progname="$0"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
32
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
33 ### Exit if a command fails.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
34 #set -e
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
35
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
36 ### Print out each line we read, for debugging's sake.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
37 #set -v
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
38
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
39 LANGUAGE=C
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
40 LC_ALL=C
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
41 LC_MESSAGES=
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
42 LANG=
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
43 export LANGUAGE LC_ALL LC_MESSAGES LANG
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
44
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
45 ## Don't restrict access to any files.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
46 umask 0
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
47
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
48 update=yes
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
49 check=yes
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
50 clean_up=no
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
51 make_tar=no
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
52 default_gzip=gzip
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
53 newer=""
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
54
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
55 while [ $# -gt 0 ]; do
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
56 case "$1" in
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
57 ## This option tells make-dist to delete the staging directory
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
58 ## when done. It is useless to use this unless you make a tar file.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
59 "--clean-up" )
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
60 clean_up=yes
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
61 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
62 ## This option tells make-dist to make a tar file.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
63 "--tar" )
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
64 make_tar=yes
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
65 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
66 ## This option tells make-dist not to recompile or do analogous things.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
67 "--no-update" )
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
68 update=no
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
69 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
70 ## This option says don't check for bad file names, etc.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
71 "--no-check" )
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
72 check=no
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
73 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
74 ## This option tells make-dist to make the distribution normally, then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
75 ## remove all files older than the given timestamp file. This is useful
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
76 ## for creating incremental or patch distributions.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
77 "--newer")
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
78 newer="$2"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
79 new_extension=".new"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
80 shift
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
81 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
82 ## This option tells make-dist to use `bzip2' instead of gzip.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
83 "--bzip2")
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
84 default_gzip="bzip2"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
85 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
86 ## Same with lzma.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
87 "--lzma")
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
88 default_gzip="lzma"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
89 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
90
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
91 "--snapshot")
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
92 clean_up=yes
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
93 make_tar=yes
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
94 update=no
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
95 check=no
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
96 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
97
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
98 "--help")
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
99 echo "Usage: ${progname} [options]"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
100 echo ""
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
101 echo " --bzip2 use bzip2 instead of gzip"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
102 echo " --clean-up delete staging directories when done"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
103 echo " --lzma use lzma instead of gzip"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
104 echo " --newer=TIME don't include files older than TIME"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
105 echo " --no-check don't check for bad file names etc."
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
106 echo " --no-update don't recompile or do analogous things"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
107 echo " --snapshot same as --clean-up --no-update --tar --no-check"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
108 echo " --tar make a tar file"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
109 echo ""
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
110 exit 0
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
111 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
112
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
113 * )
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
114 echo "${progname}: Unrecognized argument: $1" >&2
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
115 exit 1
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
116 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
117 esac
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
118 shift
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
119 done
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
120
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
121 ### Make sure we're running in the right place.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
122 if [ ! -d src -o ! -f src/lisp.h -o ! -d lisp -o ! -f lisp/subr.el ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
123 echo "${progname}: Can't find \`src/lisp.h' and \`lisp/subr.el'." >&2
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
124 echo "${progname} must be run in the top directory of the Emacs" >&2
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
125 echo "distribution tree. cd to that directory and try again." >&2
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
126 exit 1
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
127 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
128
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
129 ### Find where to run Emacs.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
130 ### (Accept only absolute file names.)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
131 if [ $update = yes ];
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
132 then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
133 if [ -f src/emacs ];
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
134 then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
135 EMACS=`pwd`/src/emacs
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
136 else
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
137 case $EMACS in
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
138 /*) ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
139 *)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
140 if [ ! -f "$EMACS" ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
141 echo "$0: You must set the EMACS environment variable " \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
142 "to an absolute file name." 2>&1
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
143 exit 1
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
144 fi;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
145 esac
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
146 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
147 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
148
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
149 ### Find out which version of Emacs this is.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
150 version=`sed -n '/char emacs_version/ s/^[^"]*"\([^"]*\)".*$/\1/p' src/emacs.c`
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
151 if [ ! "${version}" ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
152 echo "${progname}: can't find current Emacs version in \`./src/emacs.c'" >&2
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
153 exit 1
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
154 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
155
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
156 echo Version number is $version
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
157
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
158 if [ $update = yes ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
159 if ! grep -q "@set EMACSVER *${version}" doc/emacs/emacsver.texi || \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
160 ! grep -q "tree holds version *${version}" README; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
161 echo "WARNING: README and/or emacsver.texi have the wrong version number"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
162 echo "Consider running M-x set-version from admin/admin.el"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
163 sleep 5
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
164 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
165 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
166
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
167 ### Make sure we don't already have a directory emacs-${version}.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
168
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
169 emacsname="emacs-${version}${new_extension}"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
170
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
171 if [ -d ${emacsname} ]
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
172 then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
173 echo Directory "${emacsname}" already exists >&2
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
174 exit 1
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
175 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
176
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
177 ### Make sure the subdirectory is available.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
178 tempparent="make-dist.tmp.$$"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
179 if [ -d ${tempparent} ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
180 echo "${progname}: staging directory \`${tempparent}' already exists.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
181 Perhaps a previous invocation of \`${progname}' failed to clean up after
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
182 itself. Check that directories whose names are of the form
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
183 \`make-dist.tmp.NNNNN' don't contain any important information, remove
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
184 them, and try again." >&2
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
185 exit 1
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
186 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
187
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
188 if [ $check = yes ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
189 ls -1 lisp/[a-zA-Z]*.el lisp/[a-z]*/[a-zA-Z0-9]*.el \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
190 lisp/[a-z]*/[a-z]*/[a-zA-Z0-9]*.el \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
191 lisp/[a-z]*/[a-z]*/[a-z]*/[a-zA-Z0-9]*.el \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
192 leim/[a-z]*/[a-z]*.el > /tmp/el
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
193
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
194 ls -1 lisp/[a-zA-Z]*.elc lisp/[a-z]*/[a-zA-Z0-9]*.elc \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
195 lisp/[a-z]*/[a-z]*/[a-zA-Z0-9]*.elc \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
196 lisp/[a-z]*/[a-z]*/[a-z]*/[a-zA-Z0-9]*.elc \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
197 leim/[a-z]*/[a-z]*.elc > /tmp/elc
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
198
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
199 ## Check for .elc files with no corresponding .el file.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
200 sed 's/\.el$/.elc/' /tmp/el > /tmp/elelc
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
201
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
202 bogosities="`comm -13 /tmp/elelc /tmp/elc`"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
203 if [ x"${bogosities}" != x"" ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
204 echo "The following .elc files have no corresponding .el files:"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
205 echo "${bogosities}"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
206 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
207
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
208 ### Check for .el files with no corresponding .elc file.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
209 sed 's/\.elc$/.el/' /tmp/elc > /tmp/elcel
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
210 losers="`comm -23 /tmp/el /tmp/elcel`"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
211
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
212 rm -f /tmp/el /tmp/elc /tmp/elcel /tmp/elelc
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
213
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
214 bogosities=
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
215 for file in $losers; do
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
216 grep -q "no-byte-compile: t" $file && continue
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
217 case $file in
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
218 site-init.el | site-load.el | site-start.el | default.el) continue ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
219 esac
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
220
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
221 bogosities="$file $bogosities"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
222
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
223 done
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
224 if [ x"${bogosities}" != x"" ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
225 echo "The following .el files have no corresponding .elc files:"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
226 echo "${bogosities}"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
227 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
228 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
229
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
230 if [ $update = yes ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
231
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
232 ## Make sure configure is newer than configure.in.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
233 if [ "x`ls -t configure configure.in | sed q`" != "xconfigure" ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
234 echo "\`./configure.in' is newer than \`./configure'" >&2
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
235 echo "Running autoconf" >&2
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
236 autoconf || { x=$?; echo Autoconf FAILED! >&2; exit $x; }
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
237 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
238
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
239 ## Make sure src/stamp-h.in is newer than configure.in.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
240 if [ "x`ls -t src/stamp-h.in configure.in | sed q`" != "xsrc/stamp-h.in" ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
241 echo "\`./configure.in' is newer than \`./src/stamp-h.in'" >&2
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
242 echo "Running autoheader" >&2
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
243 autoheader || { x=$?; echo Autoheader FAILED! >&2; exit $x; }
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
244 rm -f src/stamp-h.in
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
245 echo timestamp > src/stamp-h.in
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
246 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
247
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
248 echo "Updating Info files"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
249 (cd doc/emacs; make info)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
250 (cd doc/misc; make info)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
251 (cd doc/lispref; make info)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
252 (cd doc/lispintro; make info)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
253
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
254 echo "Updating finder, custom and autoload data"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
255 (cd lisp; make updates EMACS="$EMACS")
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
256
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
257 if test -f leim/leim-list.el; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
258 echo "Updating leim-list.el"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
259 (cd leim; make leim-list.el EMACS="$EMACS")
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
260 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
261
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
262 echo "Recompiling Lisp files"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
263 $EMACS -batch -f batch-byte-recompile-directory lisp leim
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
264 fi # $update = yes
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
265
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
266 echo "Creating staging directory: \`${tempparent}'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
267
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
268 mkdir ${tempparent}
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
269 tempdir="${tempparent}/${emacsname}"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
270
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
271 ### This trap ensures that the staging directory will be cleaned up even
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
272 ### when the script is interrupted in mid-career.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
273 if [ "${clean_up}" = yes ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
274 trap "echo 'Cleaning up the staging directory'; rm -rf ${tempparent}" EXIT
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
275 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
276
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
277 echo "Creating top directory: \`${tempdir}'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
278 mkdir ${tempdir}
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
279
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
280 ### We copy in the top-level files before creating the subdirectories in
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
281 ### hopes that this will make the top-level files appear first in the
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
282 ### tar file; this means that people can start reading the INSTALL and
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
283 ### README while the rest of the tar file is still unpacking. Whoopee.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
284 echo "Making links to top-level files"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
285 ln INSTALL README BUGS move-if-change ${tempdir}
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
286 ln ChangeLog Makefile.in configure configure.in ${tempdir}
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
287 ln config.bat make-dist update-subdirs vpath.sed .dir-locals.el ${tempdir}
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
288 ln mkinstalldirs config.sub config.guess install-sh ${tempdir}
112302
c428fb33aede Automate syncing from gnulib.
Paul Eggert <eggert@cs.ucla.edu>
parents: 111873
diff changeset
289 ln aclocal.m4 ${tempdir}
c428fb33aede Automate syncing from gnulib.
Paul Eggert <eggert@cs.ucla.edu>
parents: 111873
diff changeset
290 ln compile depcomp missing ${tempdir}
112306
1bd15f32eeb7 Use gnulib's mktime module.
Paul Eggert <eggert@cs.ucla.edu>
parents: 112302
diff changeset
291 ln arg-nonnull.h c++defs.h warn-on-use.h ${tempdir}
111811
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
292
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
293 echo "Creating subdirectories"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
294 for subdir in site-lisp \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
295 leim leim/CXTERM-DIC leim/MISC-DIC \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
296 leim/SKK-DIC leim/ja-dic leim/quail \
112302
c428fb33aede Automate syncing from gnulib.
Paul Eggert <eggert@cs.ucla.edu>
parents: 111873
diff changeset
297 src src/m src/s src/bitmaps lib lib-src oldXMenu lwlib \
111811
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
298 nt nt/inc nt/inc/sys nt/inc/arpa nt/inc/netinet nt/icons \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
299 `find etc lisp -type d` \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
300 doc doc/emacs doc/misc doc/man doc/lispref doc/lispintro \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
301 info m4 msdos \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
302 nextstep nextstep/Cocoa nextstep/Cocoa/Emacs.base \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
303 nextstep/Cocoa/Emacs.base/Contents \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
304 nextstep/Cocoa/Emacs.base/Contents/Resources \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
305 nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
306 nextstep/Cocoa/Emacs.xcodeproj \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
307 nextstep/GNUstep \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
308 nextstep/GNUstep/Emacs.base \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
309 nextstep/GNUstep/Emacs.base/Resources
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
310 do
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
311 ## site-lisp for in-place installs (?).
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
312 [ "$subdir" = "site-lisp" ] || [ -d "$subdir" ] || \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
313 echo "WARNING: $subdir not found, making anyway"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
314 echo " ${tempdir}/${subdir}"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
315 mkdir ${tempdir}/${subdir}
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
316 done
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
317
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
318 echo "Making links to \`lisp' and its subdirectories"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
319 files=`find lisp \( -name '*.el' -o -name '*.elc' -o -name 'ChangeLog*' \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
320 -o -name 'README*' \)`
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
321
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
322 ### Don't distribute site-init.el, site-load.el, or default.el.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
323 for file in lisp/Makefile.in lisp/makefile.w32-in $files; do
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
324 case $file in
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
325 */site-init*|*/site-load*|*/default*) continue ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
326 esac
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
327 ln $file $tempdir/$file
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
328 done
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
329
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
330 echo "Making links to \`leim' and its subdirectories"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
331 (cd leim
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
332 ln makefile.w32-in ../${tempdir}/leim
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
333 ln ChangeLog README ../${tempdir}/leim
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
334 ln CXTERM-DIC/README CXTERM-DIC/*.tit ../${tempdir}/leim/CXTERM-DIC
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
335 ln SKK-DIC/README SKK-DIC/SKK-JISYO.L ../${tempdir}/leim/SKK-DIC
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
336 ln MISC-DIC/README MISC-DIC/*.* ../${tempdir}/leim/MISC-DIC
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
337 ln ja-dic/*.el ja-dic/*.elc ../${tempdir}/leim/ja-dic
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
338 ln Makefile.in ../${tempdir}/leim/Makefile.in
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
339 ln leim-ext.el ../${tempdir}/leim/leim-ext.el
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
340 ## Lisp files that start with a capital (also 4Corner.el) are
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
341 ## generated from TIT dictionaries so we don't distribute them.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
342 ln quail/[a-z]*.el quail/[a-z]*.elc ../${tempdir}/leim/quail
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
343 rm -f ../${tempdir}/leim/quail/quick-b5.*
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
344 rm -f ../${tempdir}/leim/quail/quick-cns.*
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
345 rm -f ../${tempdir}/leim/quail/tsang-b5.*
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
346 rm -f ../${tempdir}/leim/quail/tsang-cns.*)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
347
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
348 echo "Making links to \`src'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
349 ### Don't distribute the configured versions of
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
350 ### config.in, paths.in, buildobj.h, or Makefile.in.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
351 (cd src
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
352 echo " (It is ok if ln fails in some cases.)"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
353 ln [a-zA-Z]*.[chm] ../${tempdir}/src
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
354 ln [a-zA-Z]*.in ../${tempdir}/src
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
355 ln [a-zA-Z]*.mk ../${tempdir}/src
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
356 ln README ChangeLog ChangeLog.*[0-9] ../${tempdir}/src
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
357 ln makefile.w32-in ../${tempdir}/src
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
358 ln .gdbinit .dbxinit ../${tempdir}/src
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
359 cd ../${tempdir}/src
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
360 rm -f config.h epaths.h Makefile buildobj.h)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
361
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
362 echo "Making links to \`src/bitmaps'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
363 (cd src/bitmaps
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
364 ln README *.xbm ../../${tempdir}/src/bitmaps)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
365
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
366 echo "Making links to \`src/m'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
367 (cd src/m
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
368 ln README [a-zA-Z0-9]*.h ../../${tempdir}/src/m)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
369
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
370 echo "Making links to \`src/s'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
371 (cd src/s
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
372 ln README [a-zA-Z0-9]*.h ../../${tempdir}/src/s)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
373
112302
c428fb33aede Automate syncing from gnulib.
Paul Eggert <eggert@cs.ucla.edu>
parents: 111873
diff changeset
374 echo "Making links to \`lib'"
c428fb33aede Automate syncing from gnulib.
Paul Eggert <eggert@cs.ucla.edu>
parents: 111873
diff changeset
375 (build_aux_h=`(ls *.h)`
c428fb33aede Automate syncing from gnulib.
Paul Eggert <eggert@cs.ucla.edu>
parents: 111873
diff changeset
376 cd lib
c428fb33aede Automate syncing from gnulib.
Paul Eggert <eggert@cs.ucla.edu>
parents: 111873
diff changeset
377 ln [a-zA-Z]*.[ch] ../${tempdir}/lib
c428fb33aede Automate syncing from gnulib.
Paul Eggert <eggert@cs.ucla.edu>
parents: 111873
diff changeset
378 ln gnulib.mk Makefile.am Makefile.in ../${tempdir}/lib
c428fb33aede Automate syncing from gnulib.
Paul Eggert <eggert@cs.ucla.edu>
parents: 111873
diff changeset
379 cd ../${tempdir}/lib
c428fb33aede Automate syncing from gnulib.
Paul Eggert <eggert@cs.ucla.edu>
parents: 111873
diff changeset
380 rm -f `(echo "$build_aux_h"; ls *.in.h) | sed '/[*]/d; s/.in.h$/.h/'`)
c428fb33aede Automate syncing from gnulib.
Paul Eggert <eggert@cs.ucla.edu>
parents: 111873
diff changeset
381
111811
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
382 echo "Making links to \`lib-src'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
383 (cd lib-src
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
384 ln [a-zA-Z]*.[ch] ../${tempdir}/lib-src
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
385 ln ChangeLog Makefile.in README testfile vcdiff ../${tempdir}/lib-src
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
386 ln grep-changelog rcs2log rcs-checkin ../${tempdir}/lib-src
112310
e838cdd68eae Use gnulib's getopt-gnu module.
Paul Eggert <eggert@cs.ucla.edu>
parents: 112306
diff changeset
387 ln makefile.w32-in ../${tempdir}/lib-src)
111811
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
388
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
389 echo "Making links to \`m4'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
390 (cd m4
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
391 ln *.m4 ../${tempdir}/m4)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
392
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
393 ## Exclude README.W32 because it is specific to pre-built binaries(?).
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
394 echo "Making links to \`nt'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
395 (cd nt
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
396 ln emacs.manifest emacs.rc emacsclient.rc config.nt ../${tempdir}/nt
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
397 ln emacs-src.tags nmake.defs gmake.defs subdirs.el ../${tempdir}/nt
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
398 ln [a-z]*.bat [a-z]*.[ch] ../${tempdir}/nt
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
399 ln ChangeLog INSTALL README makefile.w32-in ../${tempdir}/nt)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
400
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
401 echo "Making links to \`nt/inc' and its subdirectories"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
402 for f in `find nt/inc -type f -name '[a-z]*.h'`; do
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
403 ln $f $tempdir/$f
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
404 done
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
405
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
406 echo "Making links to \`nt/icons'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
407 (cd nt/icons
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
408 ln README [a-z]*.ico ../../${tempdir}/nt/icons
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
409 ln [a-z]*.cur ../../${tempdir}/nt/icons)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
410
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
411 echo "Making links to \`msdos'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
412 (cd msdos
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
413 ln ChangeLog INSTALL README emacs.ico emacs.pif ../${tempdir}/msdos
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
414 ln is_exec.c sigaction.c mainmake.v2 sed*.inp ../${tempdir}/msdos)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
415
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
416 echo "Making links to \`nextstep'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
417 (cd nextstep
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
418 ln ChangeLog README INSTALL ../${tempdir}/nextstep)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
419
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
420 echo "Making links to \`nextstep/Cocoa/Emacs.base/Contents'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
421 (cd nextstep/Cocoa/Emacs.base/Contents
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
422 ln Info.plist PkgInfo ../../../../${tempdir}/nextstep/Cocoa/Emacs.base/Contents)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
423
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
424 echo "Making links to \`nextstep/Cocoa/Emacs.base/Contents/Resources'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
425 (cd nextstep/Cocoa/Emacs.base/Contents/Resources
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
426 ln Credits.html *.icns ../../../../../${tempdir}/nextstep/Cocoa/Emacs.base/Contents/Resources)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
427
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
428 echo "Making links to \`nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
429 (cd nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
430 ln InfoPlist.strings ../../../../../../${tempdir}/nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
431
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
432 echo "Making links to \`nextstep/Cocoa/Emacs.xcodeproj'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
433 (cd nextstep/Cocoa/Emacs.xcodeproj
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
434 ln project.pbxproj ../../../${tempdir}/nextstep/Cocoa/Emacs.xcodeproj)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
435
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
436 echo "Making links to \`nextstep/GNUstep/Emacs.base/Resources'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
437 (cd nextstep/GNUstep/Emacs.base/Resources
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
438 ln Emacs.desktop Info-gnustep.plist README emacs.tiff ../../../../${tempdir}/nextstep/GNUstep/Emacs.base/Resources )
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
439
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
440 echo "Making links to \`oldXMenu'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
441 (cd oldXMenu
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
442 ln *.[ch] *.in ../${tempdir}/oldXMenu
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
443 ln README ChangeLog ../${tempdir}/oldXMenu)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
444
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
445 echo "Making links to \`lwlib'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
446 (cd lwlib
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
447 ln *.[ch] *.in ../${tempdir}/lwlib
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
448 ln README ChangeLog ../${tempdir}/lwlib)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
449
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
450 echo "Making links to \`etc' and its subdirectories"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
451 for f in `find etc -type f`; do
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
452 case $f in
111873
2e087a5593f8 * make-dist: Exclude etc/*.pyc.
Glenn Morris <rgm@gnu.org>
parents: 111811
diff changeset
453 etc/DOC*|etc/*.pyc) continue ;;
111811
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
454 esac
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
455 ln $f $tempdir/$f
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
456 done
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
457
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
458 echo "Making links to \`info'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
459 ln `find info -type f -print` ${tempdir}/info
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
460
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
461 echo "Making links to \`doc/emacs'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
462 (cd doc/emacs
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
463 ln *.texi *.in makefile.w32-in ChangeLog* ../../${tempdir}/doc/emacs)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
464
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
465 echo "Making links to \`doc/misc'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
466 (cd doc/misc
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
467 ln *.texi *.tex *.in makefile.w32-in gnus-news.el ChangeLog* ../../${tempdir}/doc/misc)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
468
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
469 echo "Making links to \`doc/lispref'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
470 (cd doc/lispref
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
471 ln *.texi *.in makefile.w32-in README ChangeLog* ../../${tempdir}/doc/lispref
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
472 ln *.txt *.el spellfile tindex.pl ../../${tempdir}/doc/lispref
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
473 ln two-volume.make ../../${tempdir}/doc/lispref)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
474
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
475 echo "Making links to \`doc/lispintro'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
476 (cd doc/lispintro
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
477 ln *.texi *.in makefile.w32-in *.eps *.pdf ../../${tempdir}/doc/lispintro
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
478 ln README ChangeLog* ../../${tempdir}/doc/lispintro
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
479 cd ../../${tempdir}/doc/lispintro)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
480
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
481 echo "Making links to \`doc/man'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
482 (cd doc/man
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
483 ln ChangeLog* *.1 ../../${tempdir}/doc/man
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
484 cd ../../${tempdir}/doc/man)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
485
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
486 ### It would be nice if they could all be symlinks to top-level copy, but
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
487 ### you're not supposed to have any symlinks in distribution tar files.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
488 echo "Making sure copying notices are all copies of \`COPYING'"
112302
c428fb33aede Automate syncing from gnulib.
Paul Eggert <eggert@cs.ucla.edu>
parents: 111873
diff changeset
489 for subdir in . etc info leim lib lib-src lisp lwlib msdos nt src; do
111811
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
490 rm -f ${tempdir}/${subdir}/COPYING
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
491 cp COPYING ${tempdir}/${subdir}
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
492 done
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
493
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
494 if [ "${newer}" ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
495 echo "Removing files older than $newer"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
496 ## We remove .elc files unconditionally, on the theory that anyone picking
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
497 ## up an incremental distribution already has a running Emacs to byte-compile
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
498 ## them with.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
499 find ${tempparent} \( -name '*.elc' -o ! -newer ${newer} \) -exec rm -f {} \;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
500 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
501
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
502 ## Don't distribute backups, autosaves, etc.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
503 echo "Removing unwanted files"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
504 find ${tempparent} \( -name '*~' -o -name '#*#' -o -name '.*ignore' -o -name '=*' -o -name 'TAGS' \) -exec rm -f {} \;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
505
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
506 if [ "${make_tar}" = yes ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
507 echo "Looking for $default_gzip"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
508 found=0
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
509 temppath=`echo $PATH | sed -e 's/^:/.:/' -e 's/::/:.:/g' -e 's/:$/:./' \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
510 -e 's/:/ /g'`
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
511 for dir in ${temppath}; do
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
512 [ -x ${dir}/$default_gzip ] || continue
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
513 found=1; break
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
514 done
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
515 if [ "$found" = "0" ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
516 echo "WARNING: \`$default_gzip' not found, will not compress" >&2
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
517 default_gzip=cat
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
518 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
519 case "${default_gzip}" in
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
520 bzip2) gzip_extension=.bz2 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
521 lzma) gzip_extension=.lzma ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
522 gzip) gzip_extension=.gz ; default_gzip="gzip --best";;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
523 *) gzip_extension= ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
524 esac
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
525 echo "Creating tar file"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
526 (cd ${tempparent} ; tar cvf - ${emacsname} ) \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
527 | ${default_gzip} \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
528 > ${emacsname}.tar${gzip_extension}
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
529 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
530
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
531 if [ "${clean_up}" != yes ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
532 (cd ${tempparent}; mv ${emacsname} ..)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
533 rm -rf ${tempparent}
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
534 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
535
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
536 ### make-dist ends here