616
|
1 #!/bin/sh
|
1628
|
2
|
|
3 #### make-dist: create an Emacs distribution tar file from the current
|
1688
|
4 #### source tree. This basically creates a duplicate directory
|
1628
|
5 #### structure, and then hard links into it only those files that should
|
|
6 #### be distributed. This means that if you add a file with an odd name,
|
|
7 #### you should make sure that this script will include it.
|
616
|
8
|
11287
|
9 # Copyright (C) 1995 Free Software Foundation, Inc.
|
|
10 #
|
|
11 # This file is part of GNU Emacs.
|
|
12 #
|
|
13 # GNU Emacs is free software; you can redistribute it and/or modify
|
|
14 # it under the terms of the GNU General Public License as published by
|
|
15 # the Free Software Foundation; either version 2, or (at your option)
|
|
16 # any later version.
|
|
17 #
|
|
18 # GNU Emacs is distributed in the hope that it will be useful,
|
|
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
21 # GNU General Public License for more details.
|
|
22 #
|
|
23 # You should have received a copy of the GNU General Public License
|
15742
|
24 # along with GNU Emacs; see the file COPYING. If not, write to the
|
|
25 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
26 # Boston, MA 02111-1307, USA.
|
11287
|
27
|
616
|
28 progname="$0"
|
|
29
|
1628
|
30 ### Exit if a command fails.
|
|
31 ### set -e
|
616
|
32
|
1628
|
33 ### Print out each line we read, for debugging's sake.
|
|
34 ### set -v
|
616
|
35
|
16806
|
36 update=yes
|
15060
|
37 clean_up=no
|
|
38 make_tar=no
|
992
|
39 newer=""
|
616
|
40
|
|
41 while [ $# -gt 0 ]; do
|
|
42 case "$1" in
|
15060
|
43 ## This option tells make-dist to delete the staging directory
|
|
44 ## when done. It is useless to use this unless you make a tar file.
|
|
45 "--clean-up" )
|
|
46 clean_up=yes
|
621
|
47 ;;
|
15060
|
48 ## This option tells make-dist to make a tar file.
|
|
49 "--tar" )
|
|
50 make_tar=yes
|
616
|
51 ;;
|
16806
|
52 ## This option tells make-dist not to recompile or do analogous things.
|
|
53 "--no-update" )
|
|
54 update=no
|
|
55 ;;
|
1628
|
56 ## This option tells make-dist to make the distribution normally, then
|
2263
4b57c6f61299
Corrected typo, fixed it to discard = and TAGS files in some cases where it
Eric S. Raymond <esr@snark.thyrsus.com>
diff
changeset
|
57 ## remove all files older than the given timestamp file. This is useful
|
4b57c6f61299
Corrected typo, fixed it to discard = and TAGS files in some cases where it
Eric S. Raymond <esr@snark.thyrsus.com>
diff
changeset
|
58 ## for creating incremental or patch distributions.
|
992
|
59 "--newer")
|
999
|
60 newer="$2"
|
|
61 new_extension=".new"
|
992
|
62 shift
|
|
63 ;;
|
2254
|
64 ## This option tells make-dist to use `compress' instead of gzip.
|
|
65 ## Normally, make-dist uses gzip whenever it is present.
|
|
66 "--compress")
|
|
67 default_gzip="compress"
|
|
68 ;;
|
616
|
69 * )
|
|
70 echo "${progname}: Unrecognized argument: $1" >&2
|
|
71 exit 1
|
|
72 ;;
|
|
73 esac
|
|
74 shift
|
|
75 done
|
|
76
|
1628
|
77 ### Make sure we're running in the right place.
|
616
|
78 if [ ! -d src -o ! -f src/lisp.h -o ! -d lisp -o ! -f lisp/version.el ]; then
|
992
|
79 echo "${progname}: Can't find \`src/lisp.h' and \`lisp/version.el'." >&2
|
|
80 echo "${progname} must be run in the top directory of the Emacs" >&2
|
4168
|
81 echo "distribution tree. cd to that directory and try again." >&2
|
616
|
82 exit 1
|
|
83 fi
|
|
84
|
16806
|
85 ### Find where to run Emacs.
|
|
86 if [ $update = yes ];
|
|
87 then
|
|
88 if [ -f src/emacs ];
|
|
89 then
|
|
90 EMACS=`pwd`/src/emacs
|
|
91 else
|
|
92 if [ x$EMACS = x ];
|
|
93 then
|
|
94 echo You must specify the EMACS environment variable 2>&1
|
|
95 exit 1
|
|
96 fi
|
|
97 fi
|
|
98 fi
|
|
99
|
1628
|
100 ### Find out which version of Emacs this is.
|
7259
|
101 shortversion=`grep 'defconst[ ]*emacs-version' lisp/version.el \
|
7755
|
102 | sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`
|
7259
|
103 version=`grep 'defconst[ ]*emacs-version' lisp/version.el \
|
|
104 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
|
616
|
105 if [ ! "${version}" ]; then
|
14102
|
106 echo "${progname}: can't find current Emacs version in \`./lisp/version.el'" >&2
|
616
|
107 exit 1
|
|
108 fi
|
|
109
|
14102
|
110 echo Version numbers are $version and $shortversion
|
7755
|
111
|
16806
|
112 if [ $update = yes ];
|
|
113 then
|
|
114 if grep -s "GNU Emacs version ${shortversion}" ./man/emacs.texi > /dev/null; then
|
|
115 true
|
|
116 else
|
|
117 echo "You must update the version number in \`./man/emacs.texi'"
|
|
118 sleep 5
|
|
119 fi
|
2959
|
120 fi
|
|
121
|
5206
|
122 ### Make sure we don't already have a directory emacs-${version}.
|
|
123
|
|
124 emacsname="emacs-${version}${new_extension}"
|
|
125
|
|
126 if [ -d ${emacsname} ]
|
|
127 then
|
|
128 echo Directory "${emacsname}" already exists >&2
|
|
129 exit 1
|
|
130 fi
|
|
131
|
1628
|
132 ### Make sure the subdirectory is available.
|
992
|
133 tempparent="make-dist.tmp.$$"
|
616
|
134 if [ -d ${tempparent} ]; then
|
992
|
135 echo "${progname}: staging directory \`${tempparent}' already exists.
|
|
136 Perhaps a previous invocation of \`${progname}' failed to clean up after
|
|
137 itself. Check that directories whose names are of the form
|
|
138 \`make-dist.tmp.NNNNN' don't contain any important information, remove
|
|
139 them, and try again." >&2
|
616
|
140 exit 1
|
|
141 fi
|
|
142
|
3144
|
143 ### Check for .elc files with no corresponding .el file.
|
|
144 ls -1 lisp/*.el | sed 's/\.el$/.elc/' > /tmp/el
|
|
145 ls -1 lisp/*.elc > /tmp/elc
|
3146
|
146 bogosities="`comm -13 /tmp/el /tmp/elc`"
|
|
147 if [ "${bogosities}" != "" ]; then
|
|
148 echo "The following .elc files have no corresponding .el files:"
|
|
149 echo "${bogosities}"
|
|
150 fi
|
3155
|
151 rm -f /tmp/el /tmp/elc
|
3144
|
152
|
15301
|
153 ### Check for .el files that would overflow the 14-char limit if compiled.
|
15569
|
154 long=`find lisp -name '[a-zA-Z0-9]??????????*.el' -print`
|
15301
|
155 if [ "$long" != "" ]; then
|
|
156 echo "The following .el file names are too long:"
|
|
157 echo "$long"
|
|
158 fi
|
|
159
|
3258
|
160 ### Make sure configure is newer than configure.in.
|
|
161 if [ "x`ls -t configure configure.in | head -1`" != "xconfigure" ]; then
|
14102
|
162 echo "\`./configure.in' is newer than \`./configure'" >&2
|
|
163 echo "Running autoconf" >&2
|
14978
c92fad046dd3
Wed Apr 10 06:08:48 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
Roland McGrath <roland@gnu.org>
diff
changeset
|
164 autoconf || { x=$?; echo Autoconf FAILED! >&2; exit $x; }
|
3258
|
165 fi
|
|
166
|
16806
|
167 if [ $update = yes ];
|
|
168 then
|
|
169 echo "Updating Info files"
|
8345
|
170
|
16806
|
171 (cd man; make info)
|
14102
|
172
|
16806
|
173 echo "Updating finder-inf.el"
|
14102
|
174
|
16806
|
175 (cd lisp; $EMACS -batch -l finder -f finder-compile-keywords-make-dist)
|
8201
|
176
|
16806
|
177 echo "Recompiling Lisp files"
|
14102
|
178
|
16806
|
179 $EMACS -batch -f batch-byte-recompile-directory lisp
|
14102
|
180
|
16806
|
181 echo "Updating autoloads"
|
|
182
|
|
183 $EMACS -batch -f batch-update-autoloads lisp
|
|
184 fi
|
8201
|
185
|
13382
|
186 echo "Making lisp/MANIFEST"
|
|
187
|
15002
|
188 (cd lisp; head -1 [!=]*.el | grep '^;' | sed -e 's/;;; //' > MANIFEST)
|
13382
|
189
|
992
|
190 echo "Creating staging directory: \`${tempparent}'"
|
5206
|
191
|
616
|
192 mkdir ${tempparent}
|
|
193 tempdir="${tempparent}/${emacsname}"
|
|
194
|
1628
|
195 ### This trap ensures that the staging directory will be cleaned up even
|
|
196 ### when the script is interrupted in mid-career.
|
994
|
197 if [ "${clean_up}" = yes ]; then
|
14102
|
198 trap "echo 'Interrupted...cleaning up the staging directory'; rm -rf ${tempparent}; exit 1" 1 2 15
|
994
|
199 fi
|
|
200
|
992
|
201 echo "Creating top directory: \`${tempdir}'"
|
616
|
202 mkdir ${tempdir}
|
|
203
|
1628
|
204 ### We copy in the top-level files before creating the subdirectories in
|
|
205 ### hopes that this will make the top-level files appear first in the
|
|
206 ### tar file; this means that people can start reading the INSTALL and
|
|
207 ### README while the rest of the tar file is still unpacking. Whoopee.
|
14102
|
208 echo "Making links to top-level files"
|
7883
|
209 ln GETTING.GNU.SOFTWARE INSTALL PROBLEMS README BUGS move-if-change ${tempdir}
|
9505
|
210 ln ChangeLog Makefile.in configure configure.in ${tempdir}
|
9578
|
211 ln config.bat make-dist update-subdirs vpath.sed ${tempdir}
|
5206
|
212 ### Copy these files; they're cross-filesystem symlinks.
|
11223
|
213 cp mkinstalldirs ${tempdir}
|
1628
|
214 cp config.sub ${tempdir}
|
3374
|
215 cp config.guess ${tempdir}
|
5206
|
216 cp install.sh ${tempdir}
|
616
|
217
|
14102
|
218 echo "Updating version number in README"
|
2959
|
219 (cd ${tempdir}
|
|
220 awk \
|
|
221 '$1 " " $2 " " $3 " " $4 " " $5 == "This directory tree holds version" { $6 = version; print $0 }
|
|
222 $1 " " $2 " " $3 " " $4 " " $5 != "This directory tree holds version"' \
|
|
223 version=${version} README > tmp.README
|
|
224 mv tmp.README README)
|
|
225
|
|
226
|
14102
|
227 echo "Creating subdirectories"
|
4018
|
228 for subdir in lisp lisp/term site-lisp \
|
5629
|
229 src src/m src/s src/bitmaps lib-src oldXMenu lwlib \
|
15158
|
230 nt nt/inc nt/inc/sys nt/inc/arpa nt/inc/netinet \
|
11185
|
231 etc etc/e lock cpp info man msdos vms; do
|
616
|
232 mkdir ${tempdir}/${subdir}
|
|
233 done
|
|
234
|
14102
|
235 echo "Making links to \`lisp'"
|
2263
4b57c6f61299
Corrected typo, fixed it to discard = and TAGS files in some cases where it
Eric S. Raymond <esr@snark.thyrsus.com>
diff
changeset
|
236 ### Don't distribute TAGS, =*.el files, site-init.el, site-load.el, or default.el.
|
616
|
237 (cd lisp
|
|
238 ln [a-zA-Z]*.el ../${tempdir}/lisp
|
|
239 ln [a-zA-Z]*.elc ../${tempdir}/lisp
|
5033
|
240 ln [a-zA-Z]*.dat ../${tempdir}/lisp
|
1628
|
241 ## simula.el doesn't keep abbreviations in simula.defns any more.
|
|
242 ## ln [a-zA-Z]*.defns ../${tempdir}/lisp
|
14955
|
243 ln ChangeLog Makefile makefile.nt ChangeLog.? README ../${tempdir}/lisp
|
616
|
244 cd ../${tempdir}/lisp
|
2263
4b57c6f61299
Corrected typo, fixed it to discard = and TAGS files in some cases where it
Eric S. Raymond <esr@snark.thyrsus.com>
diff
changeset
|
245 rm -f TAGS =*
|
13652
|
246 rm -f subdirs.el
|
616
|
247 rm -f site-init site-init.el site-init.elc
|
999
|
248 rm -f site-load site-load.el site-load.elc
|
13445
|
249 rm -f site-start site-start.el site-start.elc
|
999
|
250 rm -f default default.el default.elc)
|
616
|
251
|
14102
|
252 #echo "Making links to \`lisp/calc-2.02'"
|
2676
|
253 #### Don't distribute =*.el files, TAGS or backups.
|
|
254 #(cd lisp/calc-2.02
|
|
255 # ln [a-zA-Z]*.el ../../${tempdir}/lisp/calc-2.02
|
|
256 # ln [a-zA-Z]*.elc ../../${tempdir}/lisp/calc-2.02
|
|
257 # ln calc.info* calc.texinfo calc-refcard.* ../../${tempdir}/lisp/calc-2.02
|
|
258 # ln INSTALL Makefile README README.prev ../../${tempdir}/lisp/calc-2.02
|
|
259 # cd ../../${tempdir}/lisp/calc-2.02
|
|
260 # rm -f *~ TAGS)
|
1792
|
261
|
14102
|
262 echo "Making links to \`lisp/term'"
|
2263
4b57c6f61299
Corrected typo, fixed it to discard = and TAGS files in some cases where it
Eric S. Raymond <esr@snark.thyrsus.com>
diff
changeset
|
263 ### Don't distribute =*.el files or TAGS.
|
616
|
264 (cd lisp/term
|
|
265 ln [a-zA-Z]*.el ../../${tempdir}/lisp/term
|
|
266 ln [a-zA-Z]*.elc ../../${tempdir}/lisp/term
|
3817
|
267 ln README ../../${tempdir}/lisp/term
|
2263
4b57c6f61299
Corrected typo, fixed it to discard = and TAGS files in some cases where it
Eric S. Raymond <esr@snark.thyrsus.com>
diff
changeset
|
268 rm -f =* TAGS)
|
616
|
269
|
14102
|
270 echo "Making links to \`src'"
|
1628
|
271 ### Don't distribute =*.[ch] files, or the configured versions of
|
13325
5a333a8e0ee1
Use new names config.in, paths.in, and {src,lib-src}/Makefile.in.
Richard M. Stallman <rms@gnu.org>
diff
changeset
|
272 ### config.in, paths.in, or Makefile.in, or TAGS.
|
616
|
273 (cd src
|
16806
|
274 echo " (It is ok if ln fails in some cases.)"
|
616
|
275 ln [a-zA-Z]*.c ../${tempdir}/src
|
|
276 ln [a-zA-Z]*.h ../${tempdir}/src
|
|
277 ln [a-zA-Z]*.s ../${tempdir}/src
|
16806
|
278 ln [a-zA-Z]*.in ../${tempdir}/src
|
|
279 ln [a-zA-Z]*.opt ../${tempdir}/src
|
|
280 ## If we ended up with a symlink, or if we did not get anything
|
|
281 ## due to a cross-device symlink, copy the file.
|
|
282 for file in [a-zA-Z]*.[hcs] [a-zA-Z]*.in [a-zA-Z]*.opt; do
|
|
283 if test -f ../${tempdir}/src/$file; then
|
|
284 # test -f appears to succeed for a symlink
|
|
285 if test -L ../${tempdir}/src/$file; then
|
|
286 rm ../${tempdir}/src/$file
|
|
287 cp $file ../${tempdir}/src
|
|
288 chmod a-w ../${tempdir}/src/$file
|
|
289 fi
|
|
290 else
|
|
291 rm ../${tempdir}/src/$file
|
|
292 cp $file ../${tempdir}/src
|
|
293 chmod a-w ../${tempdir}/src/$file
|
|
294 fi
|
|
295 done
|
|
296 ln README ChangeLog ChangeLog.*[0-9] ../${tempdir}/src
|
|
297 ln makefile.nt vms-pp.trans ../${tempdir}/src
|
4489
|
298 ln .gdbinit .dbxinit ../${tempdir}/src
|
616
|
299 cd ../${tempdir}/src
|
13383
|
300 rm -f config.h paths.h Makefile Makefile.c
|
2263
4b57c6f61299
Corrected typo, fixed it to discard = and TAGS files in some cases where it
Eric S. Raymond <esr@snark.thyrsus.com>
diff
changeset
|
301 rm -f =* TAGS)
|
616
|
302
|
14102
|
303 echo "Making links to \`src/bitmaps'"
|
2180
|
304 (cd src/bitmaps
|
|
305 ln README *.xbm ../../${tempdir}/src/bitmaps)
|
|
306
|
14102
|
307 echo "Making links to \`src/m'"
|
616
|
308 (cd src/m
|
8578
|
309 # We call files for miscellaneous input (to linker etc) .inp.
|
|
310 ln README [a-zA-Z0-9]*.h *.inp ../../${tempdir}/src/m)
|
616
|
311
|
14102
|
312 echo "Making links to \`src/s'"
|
616
|
313 (cd src/s
|
11666
|
314 ln README [a-zA-Z0-9]*.h ../../${tempdir}/src/s)
|
616
|
315
|
14102
|
316 echo "Making links to \`lib-src'"
|
616
|
317 (cd lib-src
|
11226
|
318 ln [a-zA-Z]*.[chy] ../${tempdir}/lib-src
|
13325
5a333a8e0ee1
Use new names config.in, paths.in, and {src,lib-src}/Makefile.in.
Richard M. Stallman <rms@gnu.org>
diff
changeset
|
319 ln ChangeLog Makefile.in README testfile vcdiff ../${tempdir}/lib-src
|
9805
|
320 ln emacs.csh rcs2log rcs-checkin makefile.nt ../${tempdir}/lib-src
|
16806
|
321 ## If we ended up with a symlink, or if we did not get anything
|
|
322 ## due to a cross-device symlink, copy the file.
|
|
323 for file in [a-zA-Z]*.[chy]; do
|
|
324 if test -f ../${tempdir}/lib-src/$file; then
|
|
325 # test -f appears to succeed for a symlink
|
|
326 if test -L ../${tempdir}/lib-src/$file; then
|
|
327 rm ../${tempdir}/lib-src/$file
|
|
328 cp $file ../${tempdir}/lib-src
|
|
329 chmod a-w ../${tempdir}/lib-src/$file
|
|
330 fi
|
|
331 else
|
|
332 rm ../${tempdir}/lib-src/$file
|
|
333 cp $file ../${tempdir}/lib-src
|
|
334 chmod a-w ../${tempdir}/lib-src/$file
|
|
335 fi
|
|
336 done
|
992
|
337 cd ../${tempdir}/lib-src
|
16806
|
338 rm -f Makefile.c
|
2263
4b57c6f61299
Corrected typo, fixed it to discard = and TAGS files in some cases where it
Eric S. Raymond <esr@snark.thyrsus.com>
diff
changeset
|
339 rm -f =* TAGS)
|
616
|
340
|
14102
|
341 echo "Making links to \`nt'"
|
9805
|
342 (cd nt
|
15158
|
343 ln emacs.ico emacs.rc config.nt [a-z]*.in [a-z]*.c ../${tempdir}/nt
|
12308
|
344 ln [a-z]*.bat [a-z]*.h makefile.def makefile.nt ../${tempdir}/nt
|
13544
34c4ee840e09
(nt): Rename install, readme, and todo to INSTALL, README, and TODO.
Geoff Voelker <voelker@cs.washington.edu>
diff
changeset
|
345 ln TODO ChangeLog INSTALL README ../${tempdir}/nt)
|
9805
|
346
|
14102
|
347 echo "Making links to \`nt/inc'"
|
9805
|
348 (cd nt/inc
|
11666
|
349 ln [a-z]*.h ../../${tempdir}/nt/inc)
|
9805
|
350
|
14102
|
351 echo "Making links to \`nt/inc/sys'"
|
9805
|
352 (cd nt/inc/sys
|
11666
|
353 ln [a-z]*.h ../../../${tempdir}/nt/inc/sys)
|
9805
|
354
|
15158
|
355 echo "Making links to \`nt/inc/arpa'"
|
|
356 (cd nt/inc/arpa
|
|
357 ln [a-z]*.h ../../../${tempdir}/nt/inc/arpa)
|
|
358
|
|
359 echo "Making links to \`nt/inc/netinet'"
|
|
360 (cd nt/inc/netinet
|
|
361 ln [a-z]*.h ../../../${tempdir}/nt/inc/netinet)
|
|
362
|
14102
|
363 echo "Making links to \`msdos'"
|
5471
|
364 (cd msdos
|
|
365 ln ChangeLog emacs.ico emacs.pif ../${tempdir}/msdos
|
15823
|
366 ln is_exec.c sigaction.c mainmake mainmake.v2 sed*.inp ../${tempdir}/msdos
|
5471
|
367 cd ../${tempdir}/msdos
|
|
368 rm -f =*)
|
|
369
|
14102
|
370 echo "Making links to \`oldXMenu'"
|
616
|
371 (cd oldXMenu
|
2832
47d8f937a4bc
* make-dist: Include any *.in files in oldXMenu in the distribution.
Jim Blandy <jimb@redhat.com>
diff
changeset
|
372 ln *.c *.h *.in ../${tempdir}/oldXMenu
|
2833
|
373 ln README Imakefile ChangeLog ../${tempdir}/oldXMenu
|
2487
|
374 ln compile.com descrip.mms ../${tempdir}/oldXMenu)
|
616
|
375
|
14102
|
376 echo "Making links to \`lwlib'"
|
5629
|
377 (cd lwlib
|
|
378 ln *.c *.h *.in ../${tempdir}/lwlib
|
14258
|
379 ln README Imakefile ChangeLog ../${tempdir}/lwlib
|
|
380 cd ../${tempdir}/lwlib
|
|
381 rm -f lwlib-Xol*)
|
5629
|
382
|
14102
|
383 echo "Making links to \`etc'"
|
2487
|
384 ### Don't distribute = files, TAGS, DOC files, backups, autosaves, or
|
|
385 ### tex litter.
|
616
|
386 (cd etc
|
11226
|
387 ln `ls -d * | grep -v 'RCS' | grep -v 'Old' | grep -v '^e$'` ../${tempdir}/etc
|
616
|
388 cd ../${tempdir}/etc
|
13634
|
389 rm -f DOC* *~ \#*\# *.dvi *.log *.orig *.rej *,v =* core
|
2487
|
390 rm -f TAGS)
|
616
|
391
|
14102
|
392 echo "Making links to \`etc/e'"
|
10065
|
393 (cd etc/e
|
11226
|
394 ln `ls -d * | grep -v 'RCS'` ../../${tempdir}/etc/e
|
13383
|
395 cd ../../${tempdir}/etc/e
|
11226
|
396 rm -f *~ \#*\# *,v =* core)
|
10065
|
397
|
14102
|
398 echo "Making links to \`cpp'"
|
1792
|
399 (cd cpp
|
|
400 ln cccp.c cexp.y Makefile README ../${tempdir}/cpp)
|
|
401
|
14102
|
402 echo "Making links to \`info'"
|
2792
|
403 # Don't distribute backups or autosaves.
|
|
404 (cd info
|
|
405 ln [a-zA-Z]* ../${tempdir}/info
|
|
406 cd ../${tempdir}/info
|
|
407 # Avoid an error when expanding the wildcards later.
|
|
408 ln emacs dummy~ ; ln emacs \#dummy\#
|
|
409 rm -f *~ \#*\# core)
|
1792
|
410
|
14102
|
411 echo "Making links to \`man'"
|
1792
|
412 (cd man
|
4970
|
413 ln *.texi *.aux *.cps *.fns *.kys *.vrs ../${tempdir}/man
|
1942
|
414 test -f README && ln README ../${tempdir}/man
|
10065
|
415 test -f Makefile.in && ln Makefile.in ../${tempdir}/man
|
2676
|
416 ln ChangeLog split-man ../${tempdir}/man
|
11226
|
417 cp texinfo.tex ../${tempdir}/man
|
2684
|
418 cd ../${tempdir}/man
|
2676
|
419 rm -f \#*\# =* *~ core emacs-index* *.Z *.z xmail
|
|
420 rm -f emacs.?? termcap.?? gdb.?? *.log *.toc *.dvi *.oaux)
|
616
|
421
|
14102
|
422 echo "Making links to \`vms'"
|
1364
|
423 (cd vms
|
|
424 ln [0-9a-zA-Z]* ../${tempdir}/vms
|
|
425 cd ../${tempdir}/vms
|
|
426 rm -f *~)
|
|
427
|
1700
|
428 ### It would be nice if they could all be symlinks to etc's copy, but
|
|
429 ### you're not supposed to have any symlinks in distribution tar files.
|
14102
|
430 echo "Making sure copying notices are all copies of \`etc/COPYING'"
|
992
|
431 rm -f ${tempdir}/etc/COPYING
|
|
432 cp etc/COPYING ${tempdir}/etc/COPYING
|
11185
|
433 for subdir in lisp src lib-src info msdos; do
|
616
|
434 if [ -f ${tempdir}/${subdir}/COPYING ]; then
|
|
435 rm ${tempdir}/${subdir}/COPYING
|
|
436 fi
|
1790
|
437 cp etc/COPYING ${tempdir}/${subdir}
|
616
|
438 done
|
|
439
|
2986
|
440 #### Make sure that there aren't any hard links between files in the
|
|
441 #### distribution; people with afs can't deal with that. Okay,
|
|
442 #### actually we just re-copy anything with a link count greater
|
11226
|
443 #### than two. (Yes, strictly greater than 2 is correct; since we
|
|
444 #### created these files by linking them in from the original tree,
|
|
445 #### they'll have exactly two links normally.)
|
13406
|
446 ####
|
14018
|
447 #### Commented out since it's not strictly necessary; it should suffice
|
13406
|
448 #### to just break the link on alloca.c.
|
12480
|
449 #echo "Breaking intra-tree links."
|
|
450 #find ${tempdir} ! -type d -links +2 \
|
|
451 # -exec cp -p {} $$ \; -exec rm -f {} \; -exec mv $$ {} \;
|
13406
|
452 rm -f $tempdir/lib-src/alloca.c
|
|
453 cp $tempdir/src/alloca.c $tempdir/lib-src/alloca.c
|
2986
|
454
|
992
|
455 if [ "${newer}" ]; then
|
14102
|
456 echo "Removing files older than $newer"
|
1628
|
457 ## We remove .elc files unconditionally, on the theory that anyone picking
|
|
458 ## up an incremental distribution already has a running Emacs to byte-compile
|
|
459 ## them with.
|
992
|
460 find ${tempparent} \( -name '*.elc' -o ! -newer ${newer} \) -exec rm -f {} \;
|
|
461 fi
|
|
462
|
621
|
463 if [ "${make_tar}" = yes ]; then
|
2254
|
464 if [ "${default_gzip}" = "" ]; then
|
14102
|
465 echo "Looking for gzip"
|
2254
|
466 temppath=`echo $PATH | sed 's/^:/.:/
|
|
467 s/::/:.:/g
|
|
468 s/:$/:./
|
|
469 s/:/ /g'`
|
|
470 default_gzip=`(
|
|
471 for dir in ${temppath}; do
|
|
472 if [ -f ${dir}/gzip ]; then echo 'gzip --best'; exit 0; fi
|
|
473 done
|
|
474 echo compress
|
|
475 )`
|
|
476 fi
|
2487
|
477 case "${default_gzip}" in
|
|
478 compress* ) gzip_extension=.Z ;;
|
3818
ec5cc4995395
* make-dist: If using gzip, create distribution with '.gz' extension.
Jim Blandy <jimb@redhat.com>
diff
changeset
|
479 * ) gzip_extension=.gz ;;
|
2487
|
480 esac
|
14102
|
481 echo "Creating tar file"
|
2487
|
482 (cd ${tempparent} ; tar cvf - ${emacsname} ) \
|
|
483 | ${default_gzip} \
|
|
484 > ${emacsname}.tar${gzip_extension}
|
621
|
485 fi
|
616
|
486
|
621
|
487 if [ "${clean_up}" = yes ]; then
|
14102
|
488 echo "Cleaning up the staging directory"
|
2487
|
489 rm -rf ${tempparent}
|
5206
|
490 else
|
|
491 (cd ${tempparent}; mv ${emacsname} ..)
|
|
492 rm -rf ${tempparent}
|
616
|
493 fi
|
994
|
494
|
1628
|
495 ### make-dist ends here
|