Mercurial > emacs
annotate make-dist @ 2267:825bf20b2122
Added 900-line support
author | Eric S. Raymond <esr@snark.thyrsus.com> |
---|---|
date | Fri, 19 Mar 1993 19:16:04 +0000 |
parents | 4b57c6f61299 |
children | 990694465b0f |
rev | line source |
---|---|
616 | 1 #!/bin/sh |
1628
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
2 |
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
3 #### make-dist: create an Emacs distribution tar file from the current |
1688
c4da55e6cfd3
* make-dist: Don't bother creating an arch-lib directory; that's
Jim Blandy <jimb@redhat.com>
parents:
1640
diff
changeset
|
4 #### source tree. This basically creates a duplicate directory |
1628
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
5 #### structure, and then hard links into it only those files that should |
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
6 #### be distributed. This means that if you add a file with an odd name, |
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
7 #### you should make sure that this script will include it. |
616 | 8 |
9 progname="$0" | |
10 | |
1628
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
11 ### Exit if a command fails. |
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
12 ### set -e |
616 | 13 |
1628
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
14 ### Print out each line we read, for debugging's sake. |
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
15 ### set -v |
616 | 16 |
621 | 17 clean_up=yes |
18 make_tar=yes | |
992
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
19 newer="" |
616 | 20 |
21 while [ $# -gt 0 ]; do | |
22 case "$1" in | |
1628
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
23 ## This option tells make-dist not to delete the staging directory |
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
24 ## after it's done making the tar file. |
992
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
25 "--no-clean-up" ) |
621 | 26 clean_up=no |
27 ;; | |
1628
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
28 ## This option tells make-dist not to make a tar file. Since it's |
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
29 ## rather pointless to build the whole staging directory and then |
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
30 ## nuke it, using this option also selects '--no-clean-up'. |
621 | 31 "--no-tar" ) |
32 make_tar=no | |
33 clean_up=no | |
616 | 34 ;; |
1628
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
35 ## 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>
parents:
2254
diff
changeset
|
36 ## 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>
parents:
2254
diff
changeset
|
37 ## for creating incremental or patch distributions. |
992
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
38 "--newer") |
999 | 39 newer="$2" |
40 new_extension=".new" | |
992
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
41 shift |
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
42 ;; |
2254
9f90d3406b46
Add a --compress option to force make-dist to use compress.
Jim Blandy <jimb@redhat.com>
parents:
2253
diff
changeset
|
43 ## This option tells make-dist to use `compress' instead of gzip. |
9f90d3406b46
Add a --compress option to force make-dist to use compress.
Jim Blandy <jimb@redhat.com>
parents:
2253
diff
changeset
|
44 ## Normally, make-dist uses gzip whenever it is present. |
9f90d3406b46
Add a --compress option to force make-dist to use compress.
Jim Blandy <jimb@redhat.com>
parents:
2253
diff
changeset
|
45 "--compress") |
9f90d3406b46
Add a --compress option to force make-dist to use compress.
Jim Blandy <jimb@redhat.com>
parents:
2253
diff
changeset
|
46 default_gzip="compress" |
9f90d3406b46
Add a --compress option to force make-dist to use compress.
Jim Blandy <jimb@redhat.com>
parents:
2253
diff
changeset
|
47 ;; |
616 | 48 * ) |
49 echo "${progname}: Unrecognized argument: $1" >&2 | |
50 exit 1 | |
51 ;; | |
52 esac | |
53 shift | |
54 done | |
55 | |
1628
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
56 ### Make sure we're running in the right place. |
616 | 57 if [ ! -d src -o ! -f src/lisp.h -o ! -d lisp -o ! -f lisp/version.el ]; then |
992
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
58 echo "${progname}: Can't find \`src/lisp.h' and \`lisp/version.el'." >&2 |
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
59 echo "${progname} must be run in the top directory of the Emacs" >&2 |
616 | 60 echo "distribution tree. Cd to that directory and try again." >&2 |
61 exit 1 | |
62 fi | |
63 | |
1628
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
64 ### Find out which version of Emacs this is. |
616 | 65 version=`grep 'defconst[ ]*emacs-version' lisp/version.el \ |
1112 | 66 | sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\)\..*$/\1/'` |
616 | 67 if [ ! "${version}" ]; then |
992
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
68 echo "${progname}: can't find current emacs version in \`./lisp/version.el'." >&2 |
616 | 69 exit 1 |
70 fi | |
71 | |
1628
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
72 ### Make sure the subdirectory is available. |
992
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
73 tempparent="make-dist.tmp.$$" |
616 | 74 if [ -d ${tempparent} ]; then |
992
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
75 echo "${progname}: staging directory \`${tempparent}' already exists. |
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
76 Perhaps a previous invocation of \`${progname}' failed to clean up after |
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
77 itself. Check that directories whose names are of the form |
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
78 \`make-dist.tmp.NNNNN' don't contain any important information, remove |
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
79 them, and try again." >&2 |
616 | 80 exit 1 |
81 fi | |
82 | |
992
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
83 echo "Creating staging directory: \`${tempparent}'" |
616 | 84 mkdir ${tempparent} |
999 | 85 emacsname="emacs-${version}${new_extension}" |
616 | 86 tempdir="${tempparent}/${emacsname}" |
87 | |
1628
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
88 ### This trap ensures that the staging directory will be cleaned up even |
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
89 ### when the script is interrupted in mid-career. |
994
5b2a1922c4d5
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
992
diff
changeset
|
90 if [ "${clean_up}" = yes ]; then |
5b2a1922c4d5
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
992
diff
changeset
|
91 trap "echo 'Interrupted...cleaning up the staging directory.'; rm -rf ${tempparent}; exit 1" 1 2 15 |
5b2a1922c4d5
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
992
diff
changeset
|
92 fi |
5b2a1922c4d5
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
992
diff
changeset
|
93 |
992
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
94 echo "Creating top directory: \`${tempdir}'" |
616 | 95 mkdir ${tempdir} |
96 | |
1628
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
97 ### We copy in the top-level files before creating the subdirectories in |
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
98 ### hopes that this will make the top-level files appear first in the |
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
99 ### tar file; this means that people can start reading the INSTALL and |
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
100 ### README while the rest of the tar file is still unpacking. Whoopee. |
992
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
101 echo "Making links to top-level files." |
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
102 ln GETTING.GNU.SOFTWARE INSTALL PROBLEMS README move-if-change ${tempdir} |
1628
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
103 ln ChangeLog Makefile.in build-install.in configure ${tempdir} |
1574
352988418dbd
* make-dist: Don't forget that the way to avoid filenames starting
Jim Blandy <jimb@redhat.com>
parents:
1560
diff
changeset
|
104 ln make-dist ${tempdir} |
1628
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
105 ### Copy config.sub; it's a cross-filesystem symlink. |
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
106 cp config.sub ${tempdir} |
616 | 107 |
108 echo "Creating subdirectories." | |
1901
3be68763709f
* make-dist: Don't distribute the external-lisp directory anymore.
Jim Blandy <jimb@redhat.com>
parents:
1823
diff
changeset
|
109 # I think we're not going to distribute anything in external-lisp, so |
3be68763709f
* make-dist: Don't distribute the external-lisp directory anymore.
Jim Blandy <jimb@redhat.com>
parents:
1823
diff
changeset
|
110 # I've removed it from this list. |
3be68763709f
* make-dist: Don't distribute the external-lisp directory anymore.
Jim Blandy <jimb@redhat.com>
parents:
1823
diff
changeset
|
111 for subdir in lisp lisp/calc-2.02 lisp/term local-lisp \ |
2180
0b629ab3f06a
* make-dist: Distribute `src/bitmaps' too.
Jim Blandy <jimb@redhat.com>
parents:
1997
diff
changeset
|
112 src src/m src/s src/bitmaps lib-src oldXMenu \ |
1688
c4da55e6cfd3
* make-dist: Don't bother creating an arch-lib directory; that's
Jim Blandy <jimb@redhat.com>
parents:
1640
diff
changeset
|
113 etc lock cpp info man shortnames vms; do |
616 | 114 mkdir ${tempdir}/${subdir} |
115 done | |
116 | |
992
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
117 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>
parents:
2254
diff
changeset
|
118 ### Don't distribute TAGS, =*.el files, site-init.el, site-load.el, or default.el. |
616 | 119 (cd lisp |
120 ln [a-zA-Z]*.el ../${tempdir}/lisp | |
121 ln [a-zA-Z]*.elc ../${tempdir}/lisp | |
1628
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
122 ## simula.el doesn't keep abbreviations in simula.defns any more. |
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
123 ## ln [a-zA-Z]*.defns ../${tempdir}/lisp |
616 | 124 ln ChangeLog README ../${tempdir}/lisp |
125 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>
parents:
2254
diff
changeset
|
126 rm -f TAGS =* |
616 | 127 rm -f site-init site-init.el site-init.elc |
999 | 128 rm -f site-load site-load.el site-load.elc |
129 rm -f default default.el default.elc) | |
616 | 130 |
1792
1136bc94d196
* make-dist: Include `./lisp/calc-2.02' in the distribution.
Jim Blandy <jimb@redhat.com>
parents:
1790
diff
changeset
|
131 echo "Making links to \`lisp/calc-2.02'." |
2263
4b57c6f61299
Corrected typo, fixed it to discard = and TAGS files in some cases where it
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
2254
diff
changeset
|
132 ### Don't distribute =*.el files, TAGS or backups. |
1792
1136bc94d196
* make-dist: Include `./lisp/calc-2.02' in the distribution.
Jim Blandy <jimb@redhat.com>
parents:
1790
diff
changeset
|
133 (cd lisp/calc-2.02 |
1136bc94d196
* make-dist: Include `./lisp/calc-2.02' in the distribution.
Jim Blandy <jimb@redhat.com>
parents:
1790
diff
changeset
|
134 ln [a-zA-Z]*.el ../../${tempdir}/lisp/calc-2.02 |
1136bc94d196
* make-dist: Include `./lisp/calc-2.02' in the distribution.
Jim Blandy <jimb@redhat.com>
parents:
1790
diff
changeset
|
135 ln [a-zA-Z]*.elc ../../${tempdir}/lisp/calc-2.02 |
1136bc94d196
* make-dist: Include `./lisp/calc-2.02' in the distribution.
Jim Blandy <jimb@redhat.com>
parents:
1790
diff
changeset
|
136 ln calc.info* calc.texinfo calc-refcard.* ../../${tempdir}/lisp/calc-2.02 |
1136bc94d196
* make-dist: Include `./lisp/calc-2.02' in the distribution.
Jim Blandy <jimb@redhat.com>
parents:
1790
diff
changeset
|
137 ln INSTALL Makefile README README.prev ../../${tempdir}/lisp/calc-2.02 |
1136bc94d196
* make-dist: Include `./lisp/calc-2.02' in the distribution.
Jim Blandy <jimb@redhat.com>
parents:
1790
diff
changeset
|
138 cd ../../${tempdir}/lisp/calc-2.02 |
2263
4b57c6f61299
Corrected typo, fixed it to discard = and TAGS files in some cases where it
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
2254
diff
changeset
|
139 rm -f *~ TAGS) |
1792
1136bc94d196
* make-dist: Include `./lisp/calc-2.02' in the distribution.
Jim Blandy <jimb@redhat.com>
parents:
1790
diff
changeset
|
140 |
992
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
141 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>
parents:
2254
diff
changeset
|
142 ### Don't distribute =*.el files or TAGS. |
616 | 143 (cd lisp/term |
144 ln [a-zA-Z]*.el ../../${tempdir}/lisp/term | |
145 ln [a-zA-Z]*.elc ../../${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>
parents:
2254
diff
changeset
|
146 ln README ../../${tempdir}/lisp/term |
4b57c6f61299
Corrected typo, fixed it to discard = and TAGS files in some cases where it
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
2254
diff
changeset
|
147 rm -f =* TAGS) |
616 | 148 |
1901
3be68763709f
* make-dist: Don't distribute the external-lisp directory anymore.
Jim Blandy <jimb@redhat.com>
parents:
1823
diff
changeset
|
149 ### echo "Making links to \`external-lisp'." |
2263
4b57c6f61299
Corrected typo, fixed it to discard = and TAGS files in some cases where it
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
2254
diff
changeset
|
150 ### ### Don't distribute =*.el files or TAGS. |
1901
3be68763709f
* make-dist: Don't distribute the external-lisp directory anymore.
Jim Blandy <jimb@redhat.com>
parents:
1823
diff
changeset
|
151 ### (cd external-lisp |
3be68763709f
* make-dist: Don't distribute the external-lisp directory anymore.
Jim Blandy <jimb@redhat.com>
parents:
1823
diff
changeset
|
152 ### ln [a-zA-Z]*.el ../${tempdir}/external-lisp |
3be68763709f
* make-dist: Don't distribute the external-lisp directory anymore.
Jim Blandy <jimb@redhat.com>
parents:
1823
diff
changeset
|
153 ### ln [a-zA-Z]*.elc ../${tempdir}/external-lisp |
2263
4b57c6f61299
Corrected typo, fixed it to discard = and TAGS files in some cases where it
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
2254
diff
changeset
|
154 ### ln ChangeLog README ../${tempdir}/external-lisp |
4b57c6f61299
Corrected typo, fixed it to discard = and TAGS files in some cases where it
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
2254
diff
changeset
|
155 ### rm -f =* TAGS) |
992
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
156 |
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
157 echo "Making links to \`src'." |
1628
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
158 ### Don't distribute =*.[ch] files, or the configured versions of |
2263
4b57c6f61299
Corrected typo, fixed it to discard = and TAGS files in some cases where it
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
2254
diff
changeset
|
159 ### config.h.in, paths.h.in, or Makefile.in, or TAGS. |
616 | 160 (cd src |
1628
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
161 echo " (If we can't link gmalloc.c, that's okay.)" |
616 | 162 ln [a-zA-Z]*.c ../${tempdir}/src |
1628
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
163 ## Might be a symlink to a file on another filesystem. |
1946 | 164 test -f ../${tempdir}/src/gmalloc.c || cp gmalloc.c ../${tempdir}/src |
616 | 165 ln [a-zA-Z]*.h ../${tempdir}/src |
166 ln [a-zA-Z]*.s ../${tempdir}/src | |
167 ln README Makefile.in ymakefile ChangeLog config.h.in paths.h.in \ | |
168 ../${tempdir}/src | |
169 ln .gdbinit .dbxinit ../${tempdir}/src | |
1626
53422adb945d
* make-dist: Don't bother to distribute src/*.com, or
Jim Blandy <jimb@redhat.com>
parents:
1578
diff
changeset
|
170 ln *.opt vms-pp.trans ../${tempdir}/src |
616 | 171 cd ../${tempdir}/src |
999 | 172 rm -f config.h paths.h Makefile |
173 if [ -z "${newer}" ]; then | |
174 etags *.h *.c ../lisp/*.el | |
2263
4b57c6f61299
Corrected typo, fixed it to discard = and TAGS files in some cases where it
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
2254
diff
changeset
|
175 fi |
4b57c6f61299
Corrected typo, fixed it to discard = and TAGS files in some cases where it
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
2254
diff
changeset
|
176 rm -f =* TAGS) |
616 | 177 |
2180
0b629ab3f06a
* make-dist: Distribute `src/bitmaps' too.
Jim Blandy <jimb@redhat.com>
parents:
1997
diff
changeset
|
178 echo "Making links to \`src/bitmaps'." |
0b629ab3f06a
* make-dist: Distribute `src/bitmaps' too.
Jim Blandy <jimb@redhat.com>
parents:
1997
diff
changeset
|
179 (cd src/bitmaps |
0b629ab3f06a
* make-dist: Distribute `src/bitmaps' too.
Jim Blandy <jimb@redhat.com>
parents:
1997
diff
changeset
|
180 ln README *.xbm ../../${tempdir}/src/bitmaps) |
0b629ab3f06a
* make-dist: Distribute `src/bitmaps' too.
Jim Blandy <jimb@redhat.com>
parents:
1997
diff
changeset
|
181 |
992
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
182 echo "Making links to \`src/m'." |
616 | 183 (cd src/m |
1574
352988418dbd
* make-dist: Don't forget that the way to avoid filenames starting
Jim Blandy <jimb@redhat.com>
parents:
1560
diff
changeset
|
184 ln README [a-zA-Z0-9]*.h ../../${tempdir}/src/m) |
616 | 185 |
992
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
186 echo "Making links to \`src/s'." |
616 | 187 (cd src/s |
1574
352988418dbd
* make-dist: Don't forget that the way to avoid filenames starting
Jim Blandy <jimb@redhat.com>
parents:
1560
diff
changeset
|
188 ln README [a-zA-Z0-9]*.h ../../${tempdir}/src/s) |
616 | 189 |
992
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
190 echo "Making links to \`lib-src'." |
616 | 191 (cd lib-src |
1424
892242701cba
* make-dist: Include lib-src/makedoc.com and emacs.csh in the
Jim Blandy <jimb@redhat.com>
parents:
1364
diff
changeset
|
192 ln [a-zA-Z]*.[chy] [a-zA-Z]*.lex [a-zA-Z]*.com ../${tempdir}/lib-src |
992
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
193 ln ChangeLog Makefile.in README testfile vcdiff rcs2log ../${tempdir}/lib-src |
1424
892242701cba
* make-dist: Include lib-src/makedoc.com and emacs.csh in the
Jim Blandy <jimb@redhat.com>
parents:
1364
diff
changeset
|
194 ln emacs.csh ../${tempdir}/lib-src |
992
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
195 cd ../${tempdir}/lib-src |
2263
4b57c6f61299
Corrected typo, fixed it to discard = and TAGS files in some cases where it
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
2254
diff
changeset
|
196 rm -f getdate.c getdate.tab.c y.tab.c y.tab.h |
4b57c6f61299
Corrected typo, fixed it to discard = and TAGS files in some cases where it
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
2254
diff
changeset
|
197 rm -f =* TAGS) |
616 | 198 |
992
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
199 echo "Making links to \`oldXMenu'." |
616 | 200 (cd oldXMenu |
201 ln *.c *.h ../${tempdir}/oldXMenu | |
202 ln README Makefile Imakefile ChangeLog ../${tempdir}/oldXMenu) | |
203 | |
992
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
204 echo "Making links to \`etc'." |
2263
4b57c6f61299
Corrected typo, fixed it to discard = and TAGS files in some cases where it
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
2254
diff
changeset
|
205 ### Don't distribute = files, TAGS, DOC files, backups, autosaves, or tex litter. |
616 | 206 (cd etc |
207 ln [0-9a-zA-Z]* ../${tempdir}/etc | |
208 cd ../${tempdir}/etc | |
2263
4b57c6f61299
Corrected typo, fixed it to discard = and TAGS files in some cases where it
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
2254
diff
changeset
|
209 rm -f DOC* *~ \#*\# *.dvi *.log *,v core |
4b57c6f61299
Corrected typo, fixed it to discard = and TAGS files in some cases where it
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
2254
diff
changeset
|
210 rm -f =* TAGS) |
616 | 211 |
1792
1136bc94d196
* make-dist: Include `./lisp/calc-2.02' in the distribution.
Jim Blandy <jimb@redhat.com>
parents:
1790
diff
changeset
|
212 echo "Making links to \`cpp'." |
1136bc94d196
* make-dist: Include `./lisp/calc-2.02' in the distribution.
Jim Blandy <jimb@redhat.com>
parents:
1790
diff
changeset
|
213 (cd cpp |
1136bc94d196
* make-dist: Include `./lisp/calc-2.02' in the distribution.
Jim Blandy <jimb@redhat.com>
parents:
1790
diff
changeset
|
214 ln cccp.c cexp.y Makefile README ../${tempdir}/cpp) |
1136bc94d196
* make-dist: Include `./lisp/calc-2.02' in the distribution.
Jim Blandy <jimb@redhat.com>
parents:
1790
diff
changeset
|
215 |
1795
a1f3c3317dd4
The shell comment char is #, not ;.
Jim Blandy <jimb@redhat.com>
parents:
1794
diff
changeset
|
216 ###!! echo "Making links to \`info'." |
a1f3c3317dd4
The shell comment char is #, not ;.
Jim Blandy <jimb@redhat.com>
parents:
1794
diff
changeset
|
217 ###!! # Don't distribute backups or autosaves. |
a1f3c3317dd4
The shell comment char is #, not ;.
Jim Blandy <jimb@redhat.com>
parents:
1794
diff
changeset
|
218 ###!! (cd info |
a1f3c3317dd4
The shell comment char is #, not ;.
Jim Blandy <jimb@redhat.com>
parents:
1794
diff
changeset
|
219 ###!! ln [a-zA-Z]* ../${tempdir}/info |
a1f3c3317dd4
The shell comment char is #, not ;.
Jim Blandy <jimb@redhat.com>
parents:
1794
diff
changeset
|
220 ###!! cd ../${tempdir}/info |
a1f3c3317dd4
The shell comment char is #, not ;.
Jim Blandy <jimb@redhat.com>
parents:
1794
diff
changeset
|
221 ###!! # Avoid an error when expanding the wildcards later. |
a1f3c3317dd4
The shell comment char is #, not ;.
Jim Blandy <jimb@redhat.com>
parents:
1794
diff
changeset
|
222 ###!! ln emacs dummy~ ; ln emacs \#dummy\# |
a1f3c3317dd4
The shell comment char is #, not ;.
Jim Blandy <jimb@redhat.com>
parents:
1794
diff
changeset
|
223 ###!! rm -f *~ \#*\# core) |
1792
1136bc94d196
* make-dist: Include `./lisp/calc-2.02' in the distribution.
Jim Blandy <jimb@redhat.com>
parents:
1790
diff
changeset
|
224 |
1136bc94d196
* make-dist: Include `./lisp/calc-2.02' in the distribution.
Jim Blandy <jimb@redhat.com>
parents:
1790
diff
changeset
|
225 echo "Making links to \`man'." |
1136bc94d196
* make-dist: Include `./lisp/calc-2.02' in the distribution.
Jim Blandy <jimb@redhat.com>
parents:
1790
diff
changeset
|
226 (cd man |
1136bc94d196
* make-dist: Include `./lisp/calc-2.02' in the distribution.
Jim Blandy <jimb@redhat.com>
parents:
1790
diff
changeset
|
227 ln *.tex *.texinfo *.texi *.aux *.cps *.fns *.kys *.vrs ../${tempdir}/man |
1136bc94d196
* make-dist: Include `./lisp/calc-2.02' in the distribution.
Jim Blandy <jimb@redhat.com>
parents:
1790
diff
changeset
|
228 ln *.c ../${tempdir}/man |
1942
b403b27bc31c
* make-dist: Only copy gmalloc.c if we couldn't link it.
Jim Blandy <jimb@redhat.com>
parents:
1901
diff
changeset
|
229 test -f README && ln README ../${tempdir}/man |
b403b27bc31c
* make-dist: Only copy gmalloc.c if we couldn't link it.
Jim Blandy <jimb@redhat.com>
parents:
1901
diff
changeset
|
230 test -f Makefile && ln Makefile ../${tempdir}/man |
b403b27bc31c
* make-dist: Only copy gmalloc.c if we couldn't link it.
Jim Blandy <jimb@redhat.com>
parents:
1901
diff
changeset
|
231 ln ChangeLog split-man ../${tempdir}/man) |
616 | 232 |
992
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
233 echo "Making links to \`shortnames'." |
616 | 234 (cd shortnames |
235 ln *.c ../${tempdir}/shortnames | |
236 ln Makefile reserved special ../${tempdir}/shortnames) | |
237 | |
1364 | 238 echo "Making links to \`vms'." |
239 (cd vms | |
240 ln [0-9a-zA-Z]* ../${tempdir}/vms | |
241 cd ../${tempdir}/vms | |
242 rm -f *~) | |
243 | |
1700
4be274918c90
* make-dist: Make sure that the COPYING notices in each directory
Jim Blandy <jimb@redhat.com>
parents:
1688
diff
changeset
|
244 ### It would be nice if they could all be symlinks to etc's copy, but |
4be274918c90
* make-dist: Make sure that the COPYING notices in each directory
Jim Blandy <jimb@redhat.com>
parents:
1688
diff
changeset
|
245 ### you're not supposed to have any symlinks in distribution tar files. |
4be274918c90
* make-dist: Make sure that the COPYING notices in each directory
Jim Blandy <jimb@redhat.com>
parents:
1688
diff
changeset
|
246 echo "Making sure copying notices are all copies of \`etc/COPYING'." |
992
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
247 rm -f ${tempdir}/etc/COPYING |
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
248 cp etc/COPYING ${tempdir}/etc/COPYING |
1997
4b2a76f0d640
* make-dist: Don't try to copy the COPYING notice into
Jim Blandy <jimb@redhat.com>
parents:
1946
diff
changeset
|
249 # I think we're not going to distribute anything in external-lisp, so |
4b2a76f0d640
* make-dist: Don't try to copy the COPYING notice into
Jim Blandy <jimb@redhat.com>
parents:
1946
diff
changeset
|
250 # I've removed it from this list. |
4b2a76f0d640
* make-dist: Don't try to copy the COPYING notice into
Jim Blandy <jimb@redhat.com>
parents:
1946
diff
changeset
|
251 for subdir in lisp src lib-src info shortnames; do |
616 | 252 if [ -f ${tempdir}/${subdir}/COPYING ]; then |
253 rm ${tempdir}/${subdir}/COPYING | |
254 fi | |
1790
1be021d4d816
* make-dist: Remember that the authoritative COPYING notice is
Jim Blandy <jimb@redhat.com>
parents:
1700
diff
changeset
|
255 cp etc/COPYING ${tempdir}/${subdir} |
616 | 256 done |
257 | |
992
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
258 if [ "${newer}" ]; then |
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
259 echo "Removing files older than $newer." |
1628
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
260 ## We remove .elc files unconditionally, on the theory that anyone picking |
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
261 ## up an incremental distribution already has a running Emacs to byte-compile |
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
262 ## them with. |
992
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
263 find ${tempparent} \( -name '*.elc' -o ! -newer ${newer} \) -exec rm -f {} \; |
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
264 fi |
144a9a018e7c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
621
diff
changeset
|
265 |
621 | 266 if [ "${make_tar}" = yes ]; then |
2254
9f90d3406b46
Add a --compress option to force make-dist to use compress.
Jim Blandy <jimb@redhat.com>
parents:
2253
diff
changeset
|
267 if [ "${default_gzip}" = "" ]; then |
9f90d3406b46
Add a --compress option to force make-dist to use compress.
Jim Blandy <jimb@redhat.com>
parents:
2253
diff
changeset
|
268 echo "Looking for gzip." |
9f90d3406b46
Add a --compress option to force make-dist to use compress.
Jim Blandy <jimb@redhat.com>
parents:
2253
diff
changeset
|
269 temppath=`echo $PATH | sed 's/^:/.:/ |
9f90d3406b46
Add a --compress option to force make-dist to use compress.
Jim Blandy <jimb@redhat.com>
parents:
2253
diff
changeset
|
270 s/::/:.:/g |
9f90d3406b46
Add a --compress option to force make-dist to use compress.
Jim Blandy <jimb@redhat.com>
parents:
2253
diff
changeset
|
271 s/:$/:./ |
9f90d3406b46
Add a --compress option to force make-dist to use compress.
Jim Blandy <jimb@redhat.com>
parents:
2253
diff
changeset
|
272 s/:/ /g'` |
9f90d3406b46
Add a --compress option to force make-dist to use compress.
Jim Blandy <jimb@redhat.com>
parents:
2253
diff
changeset
|
273 default_gzip=`( |
9f90d3406b46
Add a --compress option to force make-dist to use compress.
Jim Blandy <jimb@redhat.com>
parents:
2253
diff
changeset
|
274 for dir in ${temppath}; do |
9f90d3406b46
Add a --compress option to force make-dist to use compress.
Jim Blandy <jimb@redhat.com>
parents:
2253
diff
changeset
|
275 if [ -f ${dir}/gzip ]; then echo 'gzip --best'; exit 0; fi |
9f90d3406b46
Add a --compress option to force make-dist to use compress.
Jim Blandy <jimb@redhat.com>
parents:
2253
diff
changeset
|
276 done |
9f90d3406b46
Add a --compress option to force make-dist to use compress.
Jim Blandy <jimb@redhat.com>
parents:
2253
diff
changeset
|
277 echo compress |
9f90d3406b46
Add a --compress option to force make-dist to use compress.
Jim Blandy <jimb@redhat.com>
parents:
2253
diff
changeset
|
278 )` |
9f90d3406b46
Add a --compress option to force make-dist to use compress.
Jim Blandy <jimb@redhat.com>
parents:
2253
diff
changeset
|
279 fi |
621 | 280 echo "Creating tar file." |
2253
fe5302520efd
* make-dist: Use gzip, if we can find it.
Jim Blandy <jimb@redhat.com>
parents:
2180
diff
changeset
|
281 (cd ${tempparent} |
fe5302520efd
* make-dist: Use gzip, if we can find it.
Jim Blandy <jimb@redhat.com>
parents:
2180
diff
changeset
|
282 tar cvf - ${emacsname}) \ |
2254
9f90d3406b46
Add a --compress option to force make-dist to use compress.
Jim Blandy <jimb@redhat.com>
parents:
2253
diff
changeset
|
283 | ${default_gzip} > ${emacsname}.tar.Z |
2253
fe5302520efd
* make-dist: Use gzip, if we can find it.
Jim Blandy <jimb@redhat.com>
parents:
2180
diff
changeset
|
284 ) |
621 | 285 fi |
616 | 286 |
621 | 287 if [ "${clean_up}" = yes ]; then |
616 | 288 echo "Cleaning up the staging directory." |
289 rm -rf ${tempparent} | |
290 fi | |
994
5b2a1922c4d5
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
992
diff
changeset
|
291 |
1628
5ca8f0065e4e
* make-dist: Explain what's going on if config.sub and gmalloc.c
Jim Blandy <jimb@redhat.com>
parents:
1626
diff
changeset
|
292 ### make-dist ends here |