annotate make-dist @ 995:9cb2c2723b73

*** empty log message ***
author Eric S. Raymond <esr@snark.thyrsus.com>
date Fri, 14 Aug 1992 22:56:58 +0000
parents 5b2a1922c4d5
children d8d503897aa5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1 #!/bin/sh
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
2 #
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
3 # make-dist: create an Emacs distribution tar file from the current
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
4 # source tree. This basically creates a duplicate directory
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
5 # structure, and then hard links into it only those files that should
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
6 # be distributed. This means that if you add a file with an odd name,
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
7 # you should make sure that this script will include it.
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
8
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
9 progname="$0"
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
10
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
11 # Exit if a command fails.
994
5b2a1922c4d5 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 992
diff changeset
12 # set -e
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
13
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
14 # Print out each line we read, for debugging's sake.
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
15 # set -v
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
16
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 616
diff changeset
17 clean_up=yes
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 616
diff changeset
18 make_tar=yes
992
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
19 newer=""
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
20
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
21 while [ $# -gt 0 ]; do
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
22 case "$1" in
992
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
23 # This option tells make-dist not to delete the staging directory
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
24 # after it's done making the tar file.
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
25 "--no-clean-up" )
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 616
diff changeset
26 clean_up=no
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 616
diff changeset
27 ;;
992
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
28 # This option tells make-dist not to make a tar file. Since it's
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
29 # rather pointless to build the whole staging directory and then
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
30 # nuke it, using this option also selects '--no-clean-up'.
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 616
diff changeset
31 "--no-tar" )
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 616
diff changeset
32 make_tar=no
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 616
diff changeset
33 clean_up=no
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
34 ;;
992
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
35 # This option tells make-dist to make the distribution normally, then
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
36 # remove all files newer than the given timestamp file. This is useful
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
37 # for creating incremental or patch distributions
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
38 "--newer")
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
39 newer=$2
995
9cb2c2723b73 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 994
diff changeset
40 new=.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 ;;
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
43 * )
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
44 echo "${progname}: Unrecognized argument: $1" >&2
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
45 exit 1
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
46 ;;
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
47 esac
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
48 shift
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
49 done
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
50
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
51 # Make sure we're running in the right place.
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
52 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
53 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
54 echo "${progname} must be run in the top directory of the Emacs" >&2
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
55 echo "distribution tree. Cd to that directory and try again." >&2
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
56 exit 1
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
57 fi
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
58
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
59 # Find out which version of Emacs this is.
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
60 version=`grep 'defconst[ ]*emacs-version' lisp/version.el \
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
61 | sed -e 's/^.*"\([0-9]+\.[0-9]+\)\..*$/\1/'`
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
62 if [ ! "${version}" ]; then
992
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
63 echo "${progname}: can't find current emacs version in \`./lisp/version.el'." >&2
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
64 exit 1
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
65 fi
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
66
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
67 # Make sure the subdirectory is available.
992
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
68 tempparent="make-dist.tmp.$$"
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
69 if [ -d ${tempparent} ]; then
992
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
70 echo "${progname}: staging directory \`${tempparent}' already exists.
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
71 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
72 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
73 \`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
74 them, and try again." >&2
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
75 exit 1
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
76 fi
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
77
992
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
78 echo "Creating staging directory: \`${tempparent}'"
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
79 mkdir ${tempparent}
995
9cb2c2723b73 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 994
diff changeset
80 emacsname="emacs-${version}${new}"
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
81 tempdir="${tempparent}/${emacsname}"
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
82
994
5b2a1922c4d5 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 992
diff changeset
83 # This trap ensures that the staging directory will be cleaned up even
5b2a1922c4d5 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 992
diff changeset
84 # when the script is interrupted in mid-career.
5b2a1922c4d5 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 992
diff changeset
85 if [ "${clean_up}" = yes ]; then
5b2a1922c4d5 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 992
diff changeset
86 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
87 fi
5b2a1922c4d5 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 992
diff changeset
88
992
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
89 echo "Creating top directory: \`${tempdir}'"
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
90 mkdir ${tempdir}
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
91
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
92 # We copy in the top-level files before creating the subdirectories in
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
93 # hopes that this will make the top-level files appear first in the
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 616
diff changeset
94 # tar file; this means that people can start reading the INSTALL and
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 616
diff changeset
95 # 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
96 echo "Making links to top-level files."
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
97 ln GETTING.GNU.SOFTWARE INSTALL PROBLEMS README move-if-change ${tempdir}
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
98 ln ChangeLog Makefile.in build-install.in configure make-dist ${tempdir}
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
99
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
100 echo "Creating subdirectories."
992
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
101 for subdir in lisp lisp/term local-lisp external-lisp \
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
102 src src/m src/s lib-src oldXMenu \
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
103 etc lock arch-lib cpp info man shortnames; do
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
104 mkdir ${tempdir}/${subdir}
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
105 done
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
106
992
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
107 echo "Making links to \`lisp'."
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
108 # Don't distribute =*.el files, site-init.el, or site-load.el.
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
109 (cd lisp
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
110 ln [a-zA-Z]*.el ../${tempdir}/lisp
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
111 ln [a-zA-Z]*.elc ../${tempdir}/lisp
992
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
112 # simula.el doesn't keep abbreviations in simula.defns any more.
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
113 # ln [a-zA-Z]*.defns ../${tempdir}/lisp
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
114 ln ChangeLog README ../${tempdir}/lisp
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
115 cd ../${tempdir}/lisp
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
116 rm -f site-init site-init.el site-init.elc
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
117 rm -f site-load site-load.el site-load.elc)
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
118
992
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
119 echo "Making links to \`lisp/term'."
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
120 # Don't distribute =*.el files.
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
121 (cd lisp/term
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
122 ln [a-zA-Z]*.el ../../${tempdir}/lisp/term
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
123 ln [a-zA-Z]*.elc ../../${tempdir}/lisp/term
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
124 ln README ../../${tempdir}/lisp/term)
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
125
992
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
126 echo "Making links to \`external-lisp'."
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
127 # Don't distribute =*.el files.
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
128 (cd external-lisp
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
129 ln [a-zA-Z]*.el ../${tempdir}/external-lisp
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
130 ln [a-zA-Z]*.elc ../${tempdir}/external-lisp
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
131 ln ChangeLog README ../${tempdir}/external-lisp)
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
132
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
133 echo "Making links to \`src'."
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
134 # Don't distribute =*.[ch] files, or the configured versions of
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
135 # config.h.in, paths.h.in, or Makefile.in.
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
136 (cd src
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
137 ln [a-zA-Z]*.c ../${tempdir}/src
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
138 ln [a-zA-Z]*.h ../${tempdir}/src
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
139 ln [a-zA-Z]*.s ../${tempdir}/src
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
140 ln README Makefile.in ymakefile ChangeLog config.h.in paths.h.in \
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
141 ../${tempdir}/src
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
142 ln .gdbinit .dbxinit ../${tempdir}/src
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
143 ln *.com *.opt vms-pp.trans vmsbuild ../${tempdir}/src
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
144 cd ../${tempdir}/src
994
5b2a1922c4d5 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 992
diff changeset
145 rm -f config.h paths.h Makefile)
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
146
992
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
147 echo "Making links to \`src/m'."
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
148 (cd src/m
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
149 ln README *.h ../../${tempdir}/src/m)
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
150
992
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
151 echo "Making links to \`src/s'."
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
152 (cd src/s
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
153 ln README *.h ../../${tempdir}/src/s)
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
154
992
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
155 echo "Making links to \`lib-src'."
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
156 (cd lib-src
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
157 ln [a-zA-Z]*.c [a-zA-Z]*.h [a-zA-Z]*.y [a-zA-Z]*.lex ../${tempdir}/lib-src
992
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
158 ln ChangeLog Makefile.in README testfile vcdiff rcs2log ../${tempdir}/lib-src
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
159 cd ../${tempdir}/lib-src
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
160 rm -f getdate.c getdate.tab.c y.tab.c y.tab.h)
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
161
992
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
162 echo "Making links to \`oldXMenu'."
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
163 (cd oldXMenu
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
164 ln *.c *.h ../${tempdir}/oldXMenu
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
165 ln README Makefile Imakefile ChangeLog ../${tempdir}/oldXMenu)
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
166
992
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
167 echo "Making links to \`etc'."
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
168 # Don't distribute TAGS, DOC files, backups, autosaves, or tex litter.
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
169 (cd etc
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
170 ln [0-9a-zA-Z]* ../${tempdir}/etc
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
171 cd ../${tempdir}/etc
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
172 # Avoid an error when expanding the wildcards later.
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
173 for dummy in DOC-dummy dummy~ \#dummy\# dummy.dvi dummy.log; do
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
174 ln MACHINES ${dummy}
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
175 done
992
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
176 rm -f TAGS DOC* *~ \#*\# *.dvi *.log core)
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
177
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
178 # For now, we comment these out, since I'm not changing them any.
992
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
179 #!! echo "Making links to \`cpp'."
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
180 #!! (cd cpp
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
181 #!! ln cccp.c cexp.y Makefile README ../${tempdir}/cpp)
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
182 #!!
992
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
183 #!! echo "Making links to \`info'."
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
184 #!! # Don't distribute backups or autosaves.
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
185 #!! (cd info
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
186 #!! ln [a-zA-Z]* ../${tempdir}/info
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
187 #!! cd ../${tempdir}/info
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
188 #!! # Avoid an error when expanding the wildcards later.
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
189 #!! ln emacs dummy~ ; ln emacs \#dummy\#
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
190 #!! rm -f *~ \#*\# core)
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
191 #!!
992
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
192 #!! echo "Making links to \`man'."
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
193 #!! (cd man
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
194 #!! ln *.tex *.texinfo *.texi *.aux *.cps *.fns *.kys *.vrs ../${tempdir}/man
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
195 #!! ln *.c ../${tempdir}/man
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
196 #!! ln ChangeLog Makefile README split-man ../${tempdir}/man)
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
197
992
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
198 echo "Making links to \`shortnames'."
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
199 (cd shortnames
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
200 ln *.c ../${tempdir}/shortnames
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
201 ln Makefile reserved special ../${tempdir}/shortnames)
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
202
992
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
203 echo "Making sure copying notices are all symlinks to \`etc/COPYING'."
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
204 rm -f ${tempdir}/etc/COPYING
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
205 cp etc/COPYING ${tempdir}/etc/COPYING
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
206 for subdir in lisp external-lisp src lib-src info shortnames; do
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
207 if [ -f ${tempdir}/${subdir}/COPYING ]; then
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
208 rm ${tempdir}/${subdir}/COPYING
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
209 fi
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
210 ln -s ../etc/COPYING ${tempdir}/${subdir}
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
211 done
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
212
992
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
213 if [ "${newer}" ]; then
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
214 echo "Removing files older than $newer."
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
215 # We remove .elc files unconditionally, on the theory that anyone picking
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
216 # up an incremental distribution already has a running Emacs to byte-compile
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
217 # them with.
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
218 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
219 fi
144a9a018e7c *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 621
diff changeset
220
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 616
diff changeset
221 if [ "${make_tar}" = yes ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 616
diff changeset
222 echo "Creating tar file."
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 616
diff changeset
223 (cd ${tempparent}; tar cvf - ${emacsname}) | compress > ${emacsname}.tar.Z
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 616
diff changeset
224 fi
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
225
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 616
diff changeset
226 if [ "${clean_up}" = yes ]; then
616
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
227 echo "Cleaning up the staging directory."
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
228 rm -rf ${tempparent}
3c1ffcac443f Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
229 fi
994
5b2a1922c4d5 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 992
diff changeset
230
5b2a1922c4d5 *** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 992
diff changeset
231 # make-dist ends here