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
|
74439
|
9 # Copyright (C) 1995, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005,
|
75348
|
10 # 2006, 2007 Free Software Foundation, Inc.
|
11287
|
11 #
|
|
12 # This file is part of GNU Emacs.
|
|
13 #
|
|
14 # GNU Emacs is free software; you can redistribute it and/or modify
|
|
15 # it under the terms of the GNU General Public License as published by
|
78276
|
16 # the Free Software Foundation; either version 3, or (at your option)
|
11287
|
17 # any later version.
|
|
18 #
|
|
19 # GNU Emacs is distributed in the hope that it will be useful,
|
|
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
22 # GNU General Public License for more details.
|
|
23 #
|
|
24 # You should have received a copy of the GNU General Public License
|
15742
|
25 # along with GNU Emacs; see the file COPYING. If not, write to the
|
64079
|
26 # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
27 # Boston, MA 02110-1301, USA.
|
11287
|
28
|
616
|
29 progname="$0"
|
|
30
|
1628
|
31 ### Exit if a command fails.
|
34081
|
32 #set -e
|
616
|
33
|
1628
|
34 ### Print out each line we read, for debugging's sake.
|
34081
|
35 #set -v
|
616
|
36
|
37925
|
37 LANGUAGE=C
|
|
38 LC_ALL=C
|
|
39 LC_MESSAGES=
|
|
40 LANG=
|
|
41 export LANGUAGE LC_ALL LC_MESSAGES LANG
|
|
42
|
20361
036dac77f78f
Changed the comment about `umask 0' to say `Don't restrict access to any
Joel N. Weber II <devnull@gnu.org>
diff
changeset
|
43 ## Don't restrict access to any files.
|
17603
|
44 umask 0
|
|
45
|
16806
|
46 update=yes
|
20785
|
47 check=yes
|
15060
|
48 clean_up=no
|
|
49 make_tar=no
|
992
|
50 newer=""
|
616
|
51
|
|
52 while [ $# -gt 0 ]; do
|
|
53 case "$1" in
|
15060
|
54 ## This option tells make-dist to delete the staging directory
|
|
55 ## when done. It is useless to use this unless you make a tar file.
|
|
56 "--clean-up" )
|
|
57 clean_up=yes
|
621
|
58 ;;
|
15060
|
59 ## This option tells make-dist to make a tar file.
|
|
60 "--tar" )
|
|
61 make_tar=yes
|
616
|
62 ;;
|
16806
|
63 ## This option tells make-dist not to recompile or do analogous things.
|
|
64 "--no-update" )
|
|
65 update=no
|
|
66 ;;
|
20785
|
67 ## This option says don't check for bad file names, etc.
|
|
68 "--no-check" )
|
|
69 check=no
|
|
70 ;;
|
1628
|
71 ## 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
|
72 ## 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
|
73 ## for creating incremental or patch distributions.
|
992
|
74 "--newer")
|
999
|
75 newer="$2"
|
|
76 new_extension=".new"
|
992
|
77 shift
|
|
78 ;;
|
2254
|
79 ## This option tells make-dist to use `compress' instead of gzip.
|
|
80 ## Normally, make-dist uses gzip whenever it is present.
|
|
81 "--compress")
|
|
82 default_gzip="compress"
|
|
83 ;;
|
29671
|
84
|
|
85 "--snapshot")
|
|
86 clean_up=yes
|
|
87 make_tar=yes
|
|
88 update=no
|
|
89 check=no
|
|
90 ;;
|
|
91
|
|
92 "--help")
|
|
93 echo "Usage: ${progname} [options]"
|
|
94 echo ""
|
|
95 echo " --clean-up delete staging directories when done"
|
|
96 echo " --compress use compress instead of gzip"
|
|
97 echo " --newer=TIME don't include files older than TIME"
|
|
98 echo " --no-check don't check for bad file names etc."
|
|
99 echo " --no-update don't recompile or do analogous things"
|
|
100 echo " --snapshot same as --clean-up --no-update --tar --no-check"
|
|
101 echo " --tar make a tar file"
|
|
102 echo ""
|
|
103 exit 0
|
|
104 ;;
|
|
105
|
616
|
106 * )
|
|
107 echo "${progname}: Unrecognized argument: $1" >&2
|
|
108 exit 1
|
|
109 ;;
|
|
110 esac
|
|
111 shift
|
|
112 done
|
|
113
|
1628
|
114 ### Make sure we're running in the right place.
|
616
|
115 if [ ! -d src -o ! -f src/lisp.h -o ! -d lisp -o ! -f lisp/version.el ]; then
|
992
|
116 echo "${progname}: Can't find \`src/lisp.h' and \`lisp/version.el'." >&2
|
|
117 echo "${progname} must be run in the top directory of the Emacs" >&2
|
4168
|
118 echo "distribution tree. cd to that directory and try again." >&2
|
616
|
119 exit 1
|
|
120 fi
|
|
121
|
16806
|
122 ### Find where to run Emacs.
|
72833
81a55a7dc3c3
* etc/NEWS: In terminal-oriented subshells, the EMACS environment
Paul Eggert <eggert@twinsun.com>
diff
changeset
|
123 ### (Accept only absolute file names.)
|
16806
|
124 if [ $update = yes ];
|
|
125 then
|
24878
|
126 unset EMACS_UNIBYTE
|
16806
|
127 if [ -f src/emacs ];
|
|
128 then
|
|
129 EMACS=`pwd`/src/emacs
|
|
130 else
|
72833
81a55a7dc3c3
* etc/NEWS: In terminal-oriented subshells, the EMACS environment
Paul Eggert <eggert@twinsun.com>
diff
changeset
|
131 case $EMACS in
|
81a55a7dc3c3
* etc/NEWS: In terminal-oriented subshells, the EMACS environment
Paul Eggert <eggert@twinsun.com>
diff
changeset
|
132 /*) ;;
|
81a55a7dc3c3
* etc/NEWS: In terminal-oriented subshells, the EMACS environment
Paul Eggert <eggert@twinsun.com>
diff
changeset
|
133 *)
|
81a55a7dc3c3
* etc/NEWS: In terminal-oriented subshells, the EMACS environment
Paul Eggert <eggert@twinsun.com>
diff
changeset
|
134 if [ ! -f "$EMACS" ]; then
|
81a55a7dc3c3
* etc/NEWS: In terminal-oriented subshells, the EMACS environment
Paul Eggert <eggert@twinsun.com>
diff
changeset
|
135 echo "$0: You must specify the EMACS environment variable " \
|
81a55a7dc3c3
* etc/NEWS: In terminal-oriented subshells, the EMACS environment
Paul Eggert <eggert@twinsun.com>
diff
changeset
|
136 "to an absolute file name." 2>&1
|
81a55a7dc3c3
* etc/NEWS: In terminal-oriented subshells, the EMACS environment
Paul Eggert <eggert@twinsun.com>
diff
changeset
|
137 exit 1
|
81a55a7dc3c3
* etc/NEWS: In terminal-oriented subshells, the EMACS environment
Paul Eggert <eggert@twinsun.com>
diff
changeset
|
138 fi;;
|
81a55a7dc3c3
* etc/NEWS: In terminal-oriented subshells, the EMACS environment
Paul Eggert <eggert@twinsun.com>
diff
changeset
|
139 esac
|
16806
|
140 fi
|
|
141 fi
|
|
142
|
1628
|
143 ### Find out which version of Emacs this is.
|
7259
|
144 shortversion=`grep 'defconst[ ]*emacs-version' lisp/version.el \
|
7755
|
145 | sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`
|
7259
|
146 version=`grep 'defconst[ ]*emacs-version' lisp/version.el \
|
|
147 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
|
616
|
148 if [ ! "${version}" ]; then
|
14102
|
149 echo "${progname}: can't find current Emacs version in \`./lisp/version.el'" >&2
|
616
|
150 exit 1
|
|
151 fi
|
|
152
|
14102
|
153 echo Version numbers are $version and $shortversion
|
7755
|
154
|
16806
|
155 if [ $update = yes ];
|
|
156 then
|
42652
e13df10b6b63
Make version checking in emacs.texi consistent with how we set it there.
Eli Zaretskii <eliz@gnu.org>
diff
changeset
|
157 if grep -s "@set EMACSVER *${shortversion}" ./man/emacs.texi > /dev/null; then
|
16806
|
158 true
|
|
159 else
|
|
160 echo "You must update the version number in \`./man/emacs.texi'"
|
|
161 sleep 5
|
|
162 fi
|
2959
|
163 fi
|
|
164
|
5206
|
165 ### Make sure we don't already have a directory emacs-${version}.
|
|
166
|
|
167 emacsname="emacs-${version}${new_extension}"
|
|
168
|
|
169 if [ -d ${emacsname} ]
|
|
170 then
|
|
171 echo Directory "${emacsname}" already exists >&2
|
|
172 exit 1
|
|
173 fi
|
|
174
|
1628
|
175 ### Make sure the subdirectory is available.
|
992
|
176 tempparent="make-dist.tmp.$$"
|
616
|
177 if [ -d ${tempparent} ]; then
|
992
|
178 echo "${progname}: staging directory \`${tempparent}' already exists.
|
|
179 Perhaps a previous invocation of \`${progname}' failed to clean up after
|
|
180 itself. Check that directories whose names are of the form
|
|
181 \`make-dist.tmp.NNNNN' don't contain any important information, remove
|
|
182 them, and try again." >&2
|
616
|
183 exit 1
|
|
184 fi
|
|
185
|
20785
|
186 ### Find where to run Emacs.
|
|
187 if [ $check = yes ];
|
|
188 then
|
|
189 ### Check for .elc files with no corresponding .el file.
|
61546
|
190 ls -1 lisp/[a-zA-Z]*.el lisp/[a-z]*/[a-zA-Z0-9]*.el \
|
27562
|
191 leim/[a-z]*/[a-z]*.el | sed 's/\.el$/.elc/' > /tmp/el
|
61546
|
192 ls -1 lisp/[a-zA-Z]*.elc lisp/[a-z]*/[a-zA-Z0-9]*.elc \
|
27562
|
193 leim/[a-z]*/[a-z]*.elc > /tmp/elc
|
20785
|
194 bogosities="`comm -13 /tmp/el /tmp/elc`"
|
|
195 if [ "${bogosities}" != "" ]; then
|
|
196 echo "The following .elc files have no corresponding .el files:"
|
|
197 echo "${bogosities}"
|
|
198 fi
|
|
199 rm -f /tmp/el /tmp/elc
|
3144
|
200
|
20785
|
201 ### Check for .el files with no corresponding .elc file.
|
61546
|
202 ls -1 lisp/[a-zA-Z]*.el lisp/[a-z]*/[a-zA-Z0-9]*.el \
|
61525
|
203 leim/[a-z]*/[a-z]*.el > /tmp/el
|
61546
|
204 ls -1 lisp/[a-zA-Z]*.elc lisp/[a-z]*/[a-zA-Z0-9]*.elc \
|
61525
|
205 leim/[a-z]*/[a-z]*.elc | sed 's/\.elc$/.el/' > /tmp/elc
|
20785
|
206 losers="`comm -23 /tmp/el /tmp/elc`"
|
|
207 bogosities=
|
|
208 for file in $losers; do
|
61525
|
209 if ! grep -q "no-byte-compile: t" $file; then
|
20785
|
210 case $file in
|
|
211 site-init.el | site-load.el | site-start.el | default.el)
|
|
212 ;;
|
|
213 *)
|
|
214 bogosities="$file $bogosities"
|
|
215 ;;
|
|
216 esac
|
|
217 fi
|
|
218 done
|
|
219 if [ x"${bogosities}" != x"" ]; then
|
|
220 echo "The following .el files have no corresponding .elc files:"
|
|
221 echo "${bogosities}"
|
18039
|
222 fi
|
20785
|
223 rm -f /tmp/el /tmp/elc
|
15301
|
224 fi
|
|
225
|
3258
|
226 ### Make sure configure is newer than configure.in.
|
43410
|
227 if [ "x`ls -t configure configure.in | sed q`" != "xconfigure" ]; then
|
14102
|
228 echo "\`./configure.in' is newer than \`./configure'" >&2
|
|
229 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
|
230 autoconf || { x=$?; echo Autoconf FAILED! >&2; exit $x; }
|
3258
|
231 fi
|
|
232
|
44597
|
233 ### Make sure src/config-in.stamp is newer than configure.in.
|
|
234 if [ "x`ls -t src/stamp-h.in configure.in | sed q`" != "xsrc/stamp-h.in" ]; then
|
|
235 echo "\`./configure.in' is newer than \`./src/stamp-h.in'" >&2
|
|
236 echo "Running autoheader" >&2
|
|
237 autoheader || { x=$?; echo Autoheader FAILED! >&2; exit $x; }
|
|
238 rm -f src/stamp-h.in
|
|
239 echo timestamp > src/stamp-h.in
|
|
240 fi
|
|
241
|
16806
|
242 if [ $update = yes ];
|
|
243 then
|
|
244 echo "Updating Info files"
|
24359
|
245 (cd man; make -f Makefile.in srcdir=. info)
|
40885
|
246 (cd lispref; make -f Makefile.in srcdir=. info)
|
42220
|
247 (cd lispintro; make -f Makefile.in SHELL=/bin/sh srcdir=. info VPATH=.)
|
14102
|
248
|
17747
|
249 echo "Updating finder, custom and autoload data"
|
24878
|
250 (cd lisp; make updates EMACS="$EMACS")
|
18992
|
251
|
27562
|
252 if test -f leim/leim-list.el; then
|
|
253 echo "Updating leim-list.el"
|
|
254 (cd leim; make leim-list.el EMACS="$EMACS")
|
|
255 fi
|
19820
|
256
|
|
257 echo "Recompiling Lisp files"
|
|
258 $EMACS -batch -f batch-byte-recompile-directory lisp leim
|
16806
|
259 fi
|
8201
|
260
|
13382
|
261 echo "Making lisp/MANIFEST"
|
|
262
|
22389
|
263 (cd lisp;
|
|
264 files=`echo [!=]*.el | sed -e 's/ subdirs.el / /' -e 's/ default.el / /'`
|
|
265 for dir in [!=]*; do
|
27562
|
266 if [ -d $dir ] && [ $dir != term ] && [ $dir != CVS ] && [ $dir != RCS ]
|
|
267 then
|
22389
|
268 echo $dir
|
|
269 thisdir=`echo $dir/[!=]*.el | sed -e 's/ subdirs.el / /'`
|
|
270 files="$files $thisdir"
|
|
271 fi
|
|
272 done
|
43410
|
273 for file in $files
|
|
274 do sed -n 's/^;;; //p; q' $file
|
|
275 done | sort > MANIFEST)
|
13382
|
276
|
992
|
277 echo "Creating staging directory: \`${tempparent}'"
|
5206
|
278
|
616
|
279 mkdir ${tempparent}
|
|
280 tempdir="${tempparent}/${emacsname}"
|
|
281
|
1628
|
282 ### This trap ensures that the staging directory will be cleaned up even
|
|
283 ### when the script is interrupted in mid-career.
|
994
|
284 if [ "${clean_up}" = yes ]; then
|
14102
|
285 trap "echo 'Interrupted...cleaning up the staging directory'; rm -rf ${tempparent}; exit 1" 1 2 15
|
994
|
286 fi
|
|
287
|
992
|
288 echo "Creating top directory: \`${tempdir}'"
|
616
|
289 mkdir ${tempdir}
|
|
290
|
1628
|
291 ### We copy in the top-level files before creating the subdirectories in
|
|
292 ### hopes that this will make the top-level files appear first in the
|
|
293 ### tar file; this means that people can start reading the INSTALL and
|
|
294 ### README while the rest of the tar file is still unpacking. Whoopee.
|
14102
|
295 echo "Making links to top-level files"
|
71623
|
296 ln AUTHORS FTP INSTALL README BUGS CONTRIBUTE move-if-change ${tempdir}
|
41783
84b7e5da33e2
Do not try to link removed files (aclocal.m4, _emacs, TODO, vms-pp.trans
Pavel Janík <Pavel@Janik.cz>
diff
changeset
|
297 ln ChangeLog Makefile.in configure configure.in ${tempdir}
|
9578
|
298 ln config.bat make-dist update-subdirs vpath.sed ${tempdir}
|
5206
|
299 ### Copy these files; they're cross-filesystem symlinks.
|
11223
|
300 cp mkinstalldirs ${tempdir}
|
1628
|
301 cp config.sub ${tempdir}
|
3374
|
302 cp config.guess ${tempdir}
|
28821
|
303 cp install-sh ${tempdir}
|
616
|
304
|
14102
|
305 echo "Updating version number in README"
|
2959
|
306 (cd ${tempdir}
|
|
307 awk \
|
|
308 '$1 " " $2 " " $3 " " $4 " " $5 == "This directory tree holds version" { $6 = version; print $0 }
|
|
309 $1 " " $2 " " $3 " " $4 " " $5 != "This directory tree holds version"' \
|
|
310 version=${version} README > tmp.README
|
20238
|
311 mv -f tmp.README README)
|
2959
|
312
|
|
313
|
14102
|
314 echo "Creating subdirectories"
|
41435
|
315 for subdir in lisp site-lisp lispref lispintro \
|
42218
|
316 leim leim/CXTERM-DIC leim/MISC-DIC \
|
42211
|
317 leim/SKK-DIC leim/ja-dic leim/quail \
|
5629
|
318 src src/m src/s src/bitmaps lib-src oldXMenu lwlib \
|
24181
|
319 nt nt/inc nt/inc/sys nt/inc/arpa nt/inc/netinet nt/icons \
|
66102
|
320 etc etc/e \
|
66168
|
321 etc/images etc/images/ezimage etc/images/gnus etc/images/gud \
|
67078
|
322 etc/images/icons etc/images/low-color etc/images/mail \
|
82763
|
323 etc/images/smilies etc/images/tree-widget \
|
|
324 etc/images/tree-widget/default etc/images/tree-widget/folder \
|
|
325 etc/refcards etc/tutorials info man m4 msdos vms mac mac/inc \
|
67078
|
326 mac/inc/sys mac/src mac/Emacs.app mac/Emacs.app/Contents \
|
44890
01b93e5e53a7
Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
diff
changeset
|
327 mac/Emacs.app/Contents/MacOS mac/Emacs.app/Contents/Resources \
|
01b93e5e53a7
Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
diff
changeset
|
328 mac/Emacs.app/Contents/Resources/English.lproj
|
33572
|
329 do
|
|
330 echo " ${tempdir}/${subdir}"
|
616
|
331 mkdir ${tempdir}/${subdir}
|
|
332 done
|
|
333
|
17603
|
334 echo "Making links to \`lisp' and its subdirectories"
|
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
|
335 ### Don't distribute TAGS, =*.el files, site-init.el, site-load.el, or default.el.
|
616
|
336 (cd lisp
|
|
337 ln [a-zA-Z]*.el ../${tempdir}/lisp
|
|
338 ln [a-zA-Z]*.elc ../${tempdir}/lisp
|
5033
|
339 ln [a-zA-Z]*.dat ../${tempdir}/lisp
|
31916
|
340 for img in [a-zA-Z]*.xpm [a-zA-Z]*.xbm [a-zA-Z]*.pbm; do
|
31732
|
341 # If there are no images, the shell won't expand the pattern.
|
|
342 if [ -f $img ]; then
|
|
343 ln $img ../${tempdir}/lisp
|
|
344 fi
|
|
345 done
|
1628
|
346 ## simula.el doesn't keep abbreviations in simula.defns any more.
|
|
347 ## ln [a-zA-Z]*.defns ../${tempdir}/lisp
|
61546
|
348 ln ChangeLog ChangeLog.*[0-9] ../${tempdir}/lisp
|
|
349 ln Makefile.in makefile.w32-in ../${tempdir}/lisp
|
27562
|
350 test -f README && ln README ../${tempdir}/lisp
|
17603
|
351 (cd ../${tempdir}/lisp
|
|
352 rm -f TAGS =*
|
|
353 rm -f site-init site-init.el site-init.elc
|
|
354 rm -f site-load site-load.el site-load.elc
|
|
355 rm -f site-start site-start.el site-start.elc
|
|
356 rm -f default default.el default.elc
|
|
357 )
|
616
|
358
|
17603
|
359 ## Find all subdirs of lisp dir
|
|
360 for file in `find . -type d -print`; do
|
|
361 case $file in
|
27562
|
362 . | .. | */Old | */CVS | */RCS | */=*)
|
49600
|
363 ;;
|
17603
|
364 *)
|
|
365 if [ -d $file ]; then
|
|
366 subdirs="$file $subdirs"
|
|
367 fi
|
|
368 ;;
|
|
369 esac
|
|
370 done
|
1792
|
371
|
17603
|
372 for file in $subdirs; do
|
|
373 echo " lisp/$file"
|
|
374 mkdir ../${tempdir}/lisp/$file
|
33572
|
375 ln $file/[a-zA-Z0-9]*.el ../${tempdir}/lisp/$file
|
|
376 ln $file/[a-zA-Z0-9]*.elc ../${tempdir}/lisp/$file
|
|
377 for img in $file/[a-zA-Z]*.xpm $file/[a-zA-Z]*.xbm $file/[a-zA-Z]*.pbm; do
|
31732
|
378 if [ -f $img ]; then
|
|
379 ln $img ../${tempdir}/lisp/$file
|
|
380 fi
|
|
381 done
|
17603
|
382 if [ -f $file/README ]; then
|
|
383 ln $file/README ../${tempdir}/lisp/$file
|
|
384 fi
|
33572
|
385
|
24735
|
386 if [ -f $file/ChangeLog ]; then
|
|
387 ln $file/ChangeLog ../${tempdir}/lisp/$file
|
61546
|
388 for f in $file/ChangeLog.*[0-9]; do
|
33572
|
389 if [ -f $f ]; then
|
|
390 ln $f ../${tempdir}/lisp/$file
|
|
391 fi
|
|
392 done
|
24735
|
393 fi
|
17603
|
394 done )
|
17138
|
395
|
42211
|
396 echo "Making links to \`leim' and its subdirectories"
|
18654
|
397 ### Don't distribute TAGS, or =*.el files.
|
|
398 (cd leim
|
62151
|
399 ln makefile.w32-in ../${tempdir}/leim
|
42211
|
400 ln ChangeLog README ../${tempdir}/leim
|
18654
|
401
|
42211
|
402 ln CXTERM-DIC/*.tit ../${tempdir}/leim/CXTERM-DIC
|
|
403 ln SKK-DIC/README SKK-DIC/SKK-JISYO.L ../${tempdir}/leim/SKK-DIC
|
|
404 ln MISC-DIC/*.* ../${tempdir}/leim/MISC-DIC
|
|
405 ln ja-dic/*.el ja-dic/*.elc ../${tempdir}/leim/ja-dic
|
|
406 ln Makefile.in ../${tempdir}/leim/Makefile.in
|
56178
|
407 ln leim-ext.el ../${tempdir}/leim/leim-ext.el
|
61546
|
408 ## Lisp files that start with a capital are generated from TIT
|
|
409 ## dictionaries so we don't distribute them.
|
42211
|
410 ln quail/[a-z]*.el quail/[a-z]*.elc ../${tempdir}/leim/quail
|
|
411 rm -f ../${tempdir}/leim/quail/quick-b5.*
|
|
412 rm -f ../${tempdir}/leim/quail/quick-cns.*
|
|
413 rm -f ../${tempdir}/leim/quail/tsang-b5.*
|
|
414 rm -f ../${tempdir}/leim/quail/tsang-cns.*
|
27562
|
415
|
42211
|
416 cd ../${tempdir}/leim
|
18654
|
417 rm -f TAGS =* */=*)
|
|
418
|
14102
|
419 echo "Making links to \`src'"
|
1628
|
420 ### 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
|
421 ### config.in, paths.in, or Makefile.in, or TAGS.
|
616
|
422 (cd src
|
16806
|
423 echo " (It is ok if ln fails in some cases.)"
|
616
|
424 ln [a-zA-Z]*.c ../${tempdir}/src
|
|
425 ln [a-zA-Z]*.h ../${tempdir}/src
|
|
426 ln [a-zA-Z]*.s ../${tempdir}/src
|
16806
|
427 ln [a-zA-Z]*.in ../${tempdir}/src
|
|
428 ln [a-zA-Z]*.opt ../${tempdir}/src
|
|
429 ## If we ended up with a symlink, or if we did not get anything
|
|
430 ## due to a cross-device symlink, copy the file.
|
|
431 for file in [a-zA-Z]*.[hcs] [a-zA-Z]*.in [a-zA-Z]*.opt; do
|
|
432 if test -f ../${tempdir}/src/$file; then
|
|
433 # test -f appears to succeed for a symlink
|
|
434 if test -L ../${tempdir}/src/$file; then
|
|
435 rm ../${tempdir}/src/$file
|
19962
|
436 cp -p $file ../${tempdir}/src
|
16806
|
437 chmod a-w ../${tempdir}/src/$file
|
|
438 fi
|
|
439 else
|
|
440 rm ../${tempdir}/src/$file
|
19962
|
441 cp -p $file ../${tempdir}/src
|
16806
|
442 chmod a-w ../${tempdir}/src/$file
|
|
443 fi
|
|
444 done
|
|
445 ln README ChangeLog ChangeLog.*[0-9] ../${tempdir}/src
|
62151
|
446 ln makefile.w32-in ../${tempdir}/src
|
4489
|
447 ln .gdbinit .dbxinit ../${tempdir}/src
|
616
|
448 cd ../${tempdir}/src
|
34081
|
449 rm -f config.h epaths.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
|
450 rm -f =* TAGS)
|
616
|
451
|
14102
|
452 echo "Making links to \`src/bitmaps'"
|
2180
|
453 (cd src/bitmaps
|
|
454 ln README *.xbm ../../${tempdir}/src/bitmaps)
|
|
455
|
14102
|
456 echo "Making links to \`src/m'"
|
616
|
457 (cd src/m
|
8578
|
458 # We call files for miscellaneous input (to linker etc) .inp.
|
|
459 ln README [a-zA-Z0-9]*.h *.inp ../../${tempdir}/src/m)
|
616
|
460
|
14102
|
461 echo "Making links to \`src/s'"
|
616
|
462 (cd src/s
|
11666
|
463 ln README [a-zA-Z0-9]*.h ../../${tempdir}/src/s)
|
616
|
464
|
14102
|
465 echo "Making links to \`lib-src'"
|
616
|
466 (cd lib-src
|
11226
|
467 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
|
468 ln ChangeLog Makefile.in README testfile vcdiff ../${tempdir}/lib-src
|
62151
|
469 ln grep-changelog rcs2log rcs-checkin ../${tempdir}/lib-src
|
33572
|
470 ln makefile.w32-in ../${tempdir}/lib-src
|
16806
|
471 ## If we ended up with a symlink, or if we did not get anything
|
|
472 ## due to a cross-device symlink, copy the file.
|
|
473 for file in [a-zA-Z]*.[chy]; do
|
|
474 if test -f ../${tempdir}/lib-src/$file; then
|
|
475 # test -f appears to succeed for a symlink
|
|
476 if test -L ../${tempdir}/lib-src/$file; then
|
|
477 rm ../${tempdir}/lib-src/$file
|
|
478 cp $file ../${tempdir}/lib-src
|
|
479 chmod a-w ../${tempdir}/lib-src/$file
|
|
480 fi
|
|
481 else
|
|
482 rm ../${tempdir}/lib-src/$file
|
|
483 cp $file ../${tempdir}/lib-src
|
|
484 chmod a-w ../${tempdir}/lib-src/$file
|
|
485 fi
|
|
486 done
|
992
|
487 cd ../${tempdir}/lib-src
|
16806
|
488 rm -f Makefile.c
|
64639
|
489 rm -f getopt.h
|
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
|
490 rm -f =* TAGS)
|
616
|
491
|
64639
|
492 echo "Making links to \`m4'"
|
|
493 (cd m4
|
|
494 ln *.m4 ../${tempdir}/m4)
|
|
495
|
14102
|
496 echo "Making links to \`nt'"
|
9805
|
497 (cd nt
|
41783
84b7e5da33e2
Do not try to link removed files (aclocal.m4, _emacs, TODO, vms-pp.trans
Pavel Janík <Pavel@Janik.cz>
diff
changeset
|
498 ln emacs.rc config.nt [a-z]*.c ../${tempdir}/nt
|
84b7e5da33e2
Do not try to link removed files (aclocal.m4, _emacs, TODO, vms-pp.trans
Pavel Janík <Pavel@Janik.cz>
diff
changeset
|
499 ln nmake.defs gmake.defs subdirs.el ../${tempdir}/nt
|
62151
|
500 ln [a-z]*.bat [a-z]*.h ../${tempdir}/nt
|
41783
84b7e5da33e2
Do not try to link removed files (aclocal.m4, _emacs, TODO, vms-pp.trans
Pavel Janík <Pavel@Janik.cz>
diff
changeset
|
501 ln ChangeLog INSTALL README makefile.w32-in ../${tempdir}/nt)
|
9805
|
502
|
14102
|
503 echo "Making links to \`nt/inc'"
|
9805
|
504 (cd nt/inc
|
11666
|
505 ln [a-z]*.h ../../${tempdir}/nt/inc)
|
9805
|
506
|
14102
|
507 echo "Making links to \`nt/inc/sys'"
|
9805
|
508 (cd nt/inc/sys
|
11666
|
509 ln [a-z]*.h ../../../${tempdir}/nt/inc/sys)
|
9805
|
510
|
15158
|
511 echo "Making links to \`nt/inc/arpa'"
|
|
512 (cd nt/inc/arpa
|
|
513 ln [a-z]*.h ../../../${tempdir}/nt/inc/arpa)
|
|
514
|
|
515 echo "Making links to \`nt/inc/netinet'"
|
|
516 (cd nt/inc/netinet
|
|
517 ln [a-z]*.h ../../../${tempdir}/nt/inc/netinet)
|
|
518
|
24181
|
519 echo "Making links to \`nt/icons'"
|
|
520 (cd nt/icons
|
53521
|
521 ln [a-z]*.ico ../../${tempdir}/nt/icons
|
|
522 ln [a-z]*.cur ../../${tempdir}/nt/icons)
|
24181
|
523
|
33572
|
524 echo "Making links to \`mac'"
|
|
525 (cd mac
|
73512
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
diff
changeset
|
526 ln ChangeLog INSTALL README make-package *.xml *.MPW ../${tempdir}/mac)
|
33572
|
527
|
|
528 echo "Making links to \`mac/inc'"
|
|
529 (cd mac/inc
|
|
530 ln [a-z]*.h ../../${tempdir}/mac/inc)
|
|
531
|
|
532 echo "Making links to \`mac/inc/sys'"
|
|
533 (cd mac/inc/sys
|
|
534 ln [a-z]*.h ../../../${tempdir}/mac/inc/sys)
|
|
535
|
|
536 echo "Making links to \`mac/src'"
|
|
537 (cd mac/src
|
|
538 ln [a-z]*.c *.r ../../${tempdir}/mac/src)
|
|
539
|
44890
01b93e5e53a7
Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
diff
changeset
|
540 echo "Making links to \`mac/Emacs.app/Contents'"
|
01b93e5e53a7
Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
diff
changeset
|
541 (cd mac/Emacs.app/Contents
|
01b93e5e53a7
Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
diff
changeset
|
542 ln Info.plist PkgInfo ../../../${tempdir}/mac/Emacs.app/Contents)
|
01b93e5e53a7
Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
diff
changeset
|
543
|
73512
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
diff
changeset
|
544 echo "Making links to \`mac/Emacs.app/Contents/Resources'"
|
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
diff
changeset
|
545 (cd mac/Emacs.app/Contents/Resources
|
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
diff
changeset
|
546 ln Emacs.icns ../../../../${tempdir}/mac/Emacs.app/Contents/Resources)
|
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
diff
changeset
|
547
|
44890
01b93e5e53a7
Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
diff
changeset
|
548 echo "Making links to \`mac/Emacs.app/Contents/Resources/English.lproj'"
|
01b93e5e53a7
Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
diff
changeset
|
549 (cd mac/Emacs.app/Contents/Resources/English.lproj
|
01b93e5e53a7
Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
Andrew Choi <akochoi@shaw.ca>
diff
changeset
|
550 ln InfoPlist.strings ../../../../../${tempdir}/mac/Emacs.app/Contents/Resources/English.lproj)
|
49600
|
551
|
14102
|
552 echo "Making links to \`msdos'"
|
5471
|
553 (cd msdos
|
|
554 ln ChangeLog emacs.ico emacs.pif ../${tempdir}/msdos
|
15823
|
555 ln is_exec.c sigaction.c mainmake mainmake.v2 sed*.inp ../${tempdir}/msdos
|
5471
|
556 cd ../${tempdir}/msdos
|
|
557 rm -f =*)
|
|
558
|
14102
|
559 echo "Making links to \`oldXMenu'"
|
616
|
560 (cd oldXMenu
|
2832
47d8f937a4bc
* make-dist: Include any *.in files in oldXMenu in the distribution.
Jim Blandy <jimb@redhat.com>
diff
changeset
|
561 ln *.c *.h *.in ../${tempdir}/oldXMenu
|
76171
|
562 ln README ChangeLog ../${tempdir}/oldXMenu
|
2487
|
563 ln compile.com descrip.mms ../${tempdir}/oldXMenu)
|
616
|
564
|
14102
|
565 echo "Making links to \`lwlib'"
|
5629
|
566 (cd lwlib
|
|
567 ln *.c *.h *.in ../${tempdir}/lwlib
|
44958
|
568 ln README ChangeLog ../${tempdir}/lwlib)
|
5629
|
569
|
14102
|
570 echo "Making links to \`etc'"
|
2487
|
571 ### Don't distribute = files, TAGS, DOC files, backups, autosaves, or
|
|
572 ### tex litter.
|
41400
|
573 ### Don't distribute gfdl.1, since no man page references it.
|
616
|
574 (cd etc
|
62151
|
575 files=`ls -d * | grep -v CVS | grep -v RCS | grep -v 'Old' | grep -v '^e$' \
|
82763
|
576 | grep -v '^images$' | grep -v '^refcards$' | grep -v '^tutorials$'`
|
18691
|
577 ln $files ../${tempdir}/etc
|
18515
|
578 ## If we ended up with a symlink, or if we did not get anything
|
|
579 ## due to a cross-device symlink, copy the file.
|
18691
|
580 for file in $files; do
|
18515
|
581 if test -f ../${tempdir}/etc/$file; then
|
|
582 # test -f appears to succeed for a symlink
|
|
583 if test -L ../${tempdir}/etc/$file; then
|
|
584 rm ../${tempdir}/etc/$file
|
|
585 cp $file ../${tempdir}/etc
|
|
586 chmod a-w ../${tempdir}/etc/$file
|
|
587 fi
|
|
588 else
|
|
589 rm ../${tempdir}/etc/$file
|
|
590 cp $file ../${tempdir}/etc
|
|
591 chmod a-w ../${tempdir}/etc/$file
|
|
592 fi
|
|
593 done
|
616
|
594 cd ../${tempdir}/etc
|
41400
|
595 rm -f fns*.el gfdl.1
|
13634
|
596 rm -f DOC* *~ \#*\# *.dvi *.log *.orig *.rej *,v =* core
|
2487
|
597 rm -f TAGS)
|
616
|
598
|
82763
|
599 for dir in etc/e etc/tutorials etc/refcards ; do
|
|
600 echo "Making links to \`${dir}'"
|
|
601 (cd ${dir}
|
|
602 ln `ls -d * | grep -v CVS | grep -v RCS` ../../${tempdir}/${dir}
|
|
603 cd ../../${tempdir}/${dir}
|
|
604 rm -f *~ \#*\# *,v =* core)
|
|
605 done
|
10065
|
606
|
65898
|
607 echo "Making links to \`etc/images'"
|
|
608 (cd etc/images
|
76171
|
609 for img in README [a-zA-Z]*.xpm [a-zA-Z]*.xbm [a-zA-Z]*.pbm; do
|
65898
|
610 if [ -f $img ]; then
|
|
611 ln $img ../../${tempdir}/etc/images
|
|
612 fi
|
|
613 done)
|
|
614
|
67078
|
615 for dir in etc/images/ezimage etc/images/gnus etc/images/gud etc/images/icons \
|
82763
|
616 etc/images/low-color etc/images/mail etc/images/smilies ; do
|
62151
|
617 echo "Making links to \`${dir}'"
|
|
618 (cd ${dir}
|
|
619 ln `ls -d * | grep -v CVS | grep -v RCS` ../../../${tempdir}/${dir}
|
|
620 cd ../../../${tempdir}/${dir}
|
|
621 rm -f *~ \#*\# *,v =* core)
|
|
622 done
|
|
623
|
82763
|
624 for dir in etc/images/tree-widget/default etc/images/tree-widget/folder ; do
|
|
625 echo "Making links to \`${dir}'"
|
|
626 (cd ${dir}
|
|
627 ln `ls -d * | grep -v CVS | grep -v RCS` ../../../../${tempdir}/${dir}
|
|
628 cd ../../../../${tempdir}/${dir}
|
|
629 rm -f *~ \#*\# *,v =* core)
|
|
630 done
|
|
631
|
14102
|
632 echo "Making links to \`info'"
|
2792
|
633 # Don't distribute backups or autosaves.
|
|
634 (cd info
|
33572
|
635 ln `find . -type f -print | grep -v CVS | grep -v RCS | grep -v cvsignore` ../${tempdir}/info
|
27562
|
636 #ln [a-zA-Z]* ../${tempdir}/info
|
2792
|
637 cd ../${tempdir}/info
|
|
638 # Avoid an error when expanding the wildcards later.
|
|
639 ln emacs dummy~ ; ln emacs \#dummy\#
|
|
640 rm -f *~ \#*\# core)
|
1792
|
641
|
14102
|
642 echo "Making links to \`man'"
|
1792
|
643 (cd man
|
4970
|
644 ln *.texi *.aux *.cps *.fns *.kys *.vrs ../${tempdir}/man
|
73549
e68d05a41cab
* make-dist: Add makefile.w32-in to the man, lispref and lispintro
Chong Yidong <cyd@stupidchicken.com>
diff
changeset
|
645 ln makefile.w32-in ../${tempdir}/man
|
1942
|
646 test -f README && ln README ../${tempdir}/man
|
10065
|
647 test -f Makefile.in && ln Makefile.in ../${tempdir}/man
|
27562
|
648 ln ChangeLog ../${tempdir}/man
|
|
649 test -f split-man && ln split-man ../${tempdir}/man
|
37728
|
650 cp texinfo.tex ../${tempdir}/man
|
2684
|
651 cd ../${tempdir}/man
|
2676
|
652 rm -f \#*\# =* *~ core emacs-index* *.Z *.z xmail
|
|
653 rm -f emacs.?? termcap.?? gdb.?? *.log *.toc *.dvi *.oaux)
|
616
|
654
|
40885
|
655 echo "Making links to \`lispref'"
|
|
656 (cd lispref
|
53696
|
657 ln `ls -1 *.texi` ../${tempdir}/lispref
|
54007
|
658 ln *.aux *.cps *.fns *.kys *.vrs ../${tempdir}/lispref
|
|
659 ln *.txt *.el spellfile tindex.pl ../${tempdir}/lispref
|
73549
e68d05a41cab
* make-dist: Add makefile.w32-in to the man, lispref and lispintro
Chong Yidong <cyd@stupidchicken.com>
diff
changeset
|
660 ln makefile.w32-in ../${tempdir}/lispref
|
40885
|
661 test -f README && ln README ../${tempdir}/lispref
|
|
662 test -f Makefile.in && ln Makefile.in ../${tempdir}/lispref
|
|
663 ln ChangeLog ../${tempdir}/lispref
|
|
664 cd ../${tempdir}/lispref
|
|
665 rm -f \#*\# =* *~ core elisp-index* *.Z *.z xmail
|
|
666 rm -f elisp.?? *.log *.toc *.dvi *.oaux)
|
|
667
|
41435
|
668 echo "Making links to \`lispintro'"
|
|
669 (cd lispintro
|
|
670 ln *.texi *.aux *.cps *.fns *.kys *.vrs *.eps ../${tempdir}/lispintro
|
73549
e68d05a41cab
* make-dist: Add makefile.w32-in to the man, lispref and lispintro
Chong Yidong <cyd@stupidchicken.com>
diff
changeset
|
671 ln makefile.w32-in ../${tempdir}/lispintro
|
41435
|
672 test -f texinfo.tex && ln texinfo.tex ../${tempdir}/lispintro
|
|
673 test -f README && ln README ../${tempdir}/lispintro
|
|
674 test -f Makefile.in && ln Makefile.in ../${tempdir}/lispintro
|
|
675 ln ChangeLog ../${tempdir}/lispintro
|
|
676 cd ../${tempdir}/lispintro
|
|
677 rm -f \#*\# =* *~ core *.Z *.z xmail
|
|
678 rm -f emacs-lisp-intro.?? *.log *.toc *.dvi *.oaux)
|
|
679
|
14102
|
680 echo "Making links to \`vms'"
|
1364
|
681 (cd vms
|
27562
|
682 test -f README && ln README ../${tempdir}/vms
|
1364
|
683 cd ../${tempdir}/vms
|
|
684 rm -f *~)
|
|
685
|
41906
|
686 ### It would be nice if they could all be symlinks to top-level copy, but
|
1700
|
687 ### you're not supposed to have any symlinks in distribution tar files.
|
41682
|
688 echo "Making sure copying notices are all copies of \`COPYING'"
|
41895
80482c216b03
Copy COPYING to leim/, lwlib/, mac/ and nt/ when creating distribution.
Pavel Janík <Pavel@Janik.cz>
diff
changeset
|
689 for subdir in . etc info leim lib-src lisp lwlib mac msdos nt src; do
|
41663
1cc9127ddf72
Add COPYING to the top-level directory of the distribution. Simplify the
Pavel Janík <Pavel@Janik.cz>
diff
changeset
|
690 rm -f ${tempdir}/${subdir}/COPYING
|
41682
|
691 cp COPYING ${tempdir}/${subdir}
|
616
|
692 done
|
|
693
|
2986
|
694 #### Make sure that there aren't any hard links between files in the
|
|
695 #### distribution; people with afs can't deal with that. Okay,
|
|
696 #### actually we just re-copy anything with a link count greater
|
11226
|
697 #### than two. (Yes, strictly greater than 2 is correct; since we
|
|
698 #### created these files by linking them in from the original tree,
|
|
699 #### they'll have exactly two links normally.)
|
13406
|
700 ####
|
14018
|
701 #### Commented out since it's not strictly necessary; it should suffice
|
13406
|
702 #### to just break the link on alloca.c.
|
12480
|
703 #echo "Breaking intra-tree links."
|
|
704 #find ${tempdir} ! -type d -links +2 \
|
|
705 # -exec cp -p {} $$ \; -exec rm -f {} \; -exec mv $$ {} \;
|
13406
|
706 rm -f $tempdir/lib-src/alloca.c
|
|
707 cp $tempdir/src/alloca.c $tempdir/lib-src/alloca.c
|
2986
|
708
|
992
|
709 if [ "${newer}" ]; then
|
14102
|
710 echo "Removing files older than $newer"
|
1628
|
711 ## We remove .elc files unconditionally, on the theory that anyone picking
|
|
712 ## up an incremental distribution already has a running Emacs to byte-compile
|
|
713 ## them with.
|
992
|
714 find ${tempparent} \( -name '*.elc' -o ! -newer ${newer} \) -exec rm -f {} \;
|
|
715 fi
|
|
716
|
621
|
717 if [ "${make_tar}" = yes ]; then
|
2254
|
718 if [ "${default_gzip}" = "" ]; then
|
14102
|
719 echo "Looking for gzip"
|
2254
|
720 temppath=`echo $PATH | sed 's/^:/.:/
|
|
721 s/::/:.:/g
|
|
722 s/:$/:./
|
|
723 s/:/ /g'`
|
|
724 default_gzip=`(
|
|
725 for dir in ${temppath}; do
|
|
726 if [ -f ${dir}/gzip ]; then echo 'gzip --best'; exit 0; fi
|
|
727 done
|
|
728 echo compress
|
|
729 )`
|
|
730 fi
|
2487
|
731 case "${default_gzip}" in
|
|
732 compress* ) gzip_extension=.Z ;;
|
3818
ec5cc4995395
* make-dist: If using gzip, create distribution with '.gz' extension.
Jim Blandy <jimb@redhat.com>
diff
changeset
|
733 * ) gzip_extension=.gz ;;
|
2487
|
734 esac
|
42211
|
735 echo "Creating tar file"
|
2487
|
736 (cd ${tempparent} ; tar cvf - ${emacsname} ) \
|
|
737 | ${default_gzip} \
|
|
738 > ${emacsname}.tar${gzip_extension}
|
621
|
739 fi
|
616
|
740
|
621
|
741 if [ "${clean_up}" = yes ]; then
|
14102
|
742 echo "Cleaning up the staging directory"
|
2487
|
743 rm -rf ${tempparent}
|
5206
|
744 else
|
42211
|
745 (cd ${tempparent}; mv ${emacsname} ..)
|
5206
|
746 rm -rf ${tempparent}
|
616
|
747 fi
|
994
|
748
|
52401
|
749 # arch-tag: 26e3eb50-a394-4ab2-82b2-d8e5af500de7
|
1628
|
750 ### make-dist ends here
|