aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-01-02 00:53:34 +0000
committerRichard M. Stallman1997-01-02 00:53:34 +0000
commitc75cfabd5acf3c5564669c8b0d0035e32edff5ba (patch)
treecde7788190e3002fbc12daccd7d4094dcd44ace0
parent8226e01e77fb265751284d74f9a90e72229c951e (diff)
downloademacs-c75cfabd5acf3c5564669c8b0d0035e32edff5ba.tar.gz
emacs-c75cfabd5acf3c5564669c8b0d0035e32edff5ba.zip
Use $EMACS to say where to run Emacs.
Add --no-update option. (copying src): Check thoroughly for symlinks and copy them in all cases. Regularize the linking of *.in and *.opt and ChangeLog files. (copying lib-src): Likewise. Don't rm getdate.c or y.tab.*--they don't exist any more.
-rwxr-xr-xmake-dist98
1 files changed, 77 insertions, 21 deletions
diff --git a/make-dist b/make-dist
index 3faa8cb6c23..6acc8d51390 100755
--- a/make-dist
+++ b/make-dist
@@ -33,6 +33,7 @@ progname="$0"
33### Print out each line we read, for debugging's sake. 33### Print out each line we read, for debugging's sake.
34### set -v 34### set -v
35 35
36update=yes
36clean_up=no 37clean_up=no
37make_tar=no 38make_tar=no
38newer="" 39newer=""
@@ -48,6 +49,10 @@ while [ $# -gt 0 ]; do
48 "--tar" ) 49 "--tar" )
49 make_tar=yes 50 make_tar=yes
50 ;; 51 ;;
52 ## This option tells make-dist not to recompile or do analogous things.
53 "--no-update" )
54 update=no
55 ;;
51 ## This option tells make-dist to make the distribution normally, then 56 ## This option tells make-dist to make the distribution normally, then
52 ## remove all files older than the given timestamp file. This is useful 57 ## remove all files older than the given timestamp file. This is useful
53 ## for creating incremental or patch distributions. 58 ## for creating incremental or patch distributions.
@@ -77,6 +82,21 @@ if [ ! -d src -o ! -f src/lisp.h -o ! -d lisp -o ! -f lisp/version.el ]; then
77 exit 1 82 exit 1
78fi 83fi
79 84
85### Find where to run Emacs.
86if [ $update = yes ];
87then
88 if [ -f src/emacs ];
89 then
90 EMACS=`pwd`/src/emacs
91 else
92 if [ x$EMACS = x ];
93 then
94 echo You must specify the EMACS environment variable 2>&1
95 exit 1
96 fi
97 fi
98fi
99
80### Find out which version of Emacs this is. 100### Find out which version of Emacs this is.
81shortversion=`grep 'defconst[ ]*emacs-version' lisp/version.el \ 101shortversion=`grep 'defconst[ ]*emacs-version' lisp/version.el \
82 | sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'` 102 | sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`
@@ -89,11 +109,14 @@ fi
89 109
90echo Version numbers are $version and $shortversion 110echo Version numbers are $version and $shortversion
91 111
92if grep -s "GNU Emacs version ${shortversion}" ./man/emacs.texi > /dev/null; then 112if [ $update = yes ];
93 true 113then
94else 114 if grep -s "GNU Emacs version ${shortversion}" ./man/emacs.texi > /dev/null; then
95 echo "You must update the version number in \`./man/emacs.texi'" 115 true
96 sleep 5 116 else
117 echo "You must update the version number in \`./man/emacs.texi'"
118 sleep 5
119 fi
97fi 120fi
98 121
99### Make sure we don't already have a directory emacs-${version}. 122### Make sure we don't already have a directory emacs-${version}.
@@ -141,21 +164,24 @@ if [ "x`ls -t configure configure.in | head -1`" != "xconfigure" ]; then
141 autoconf || { x=$?; echo Autoconf FAILED! >&2; exit $x; } 164 autoconf || { x=$?; echo Autoconf FAILED! >&2; exit $x; }
142fi 165fi
143 166
144echo "Updating Info files" 167if [ $update = yes ];
168then
169 echo "Updating Info files"
145 170
146(cd man; make info) 171 (cd man; make info)
147 172
148echo "Updating finder-inf.el" 173 echo "Updating finder-inf.el"
149 174
150(cd lisp; ../src/emacs -batch -l finder -f finder-compile-keywords-make-dist) 175 (cd lisp; $EMACS -batch -l finder -f finder-compile-keywords-make-dist)
151 176
152echo "Recompiling Lisp files" 177 echo "Recompiling Lisp files"
153 178
154src/emacs -batch -f batch-byte-recompile-directory lisp 179 $EMACS -batch -f batch-byte-recompile-directory lisp
155 180
156echo "Updating autoloads" 181 echo "Updating autoloads"
157 182
158src/emacs -batch -f batch-update-autoloads lisp 183 $EMACS -batch -f batch-update-autoloads lisp
184fi
159 185
160echo "Making lisp/MANIFEST" 186echo "Making lisp/MANIFEST"
161 187
@@ -245,17 +271,31 @@ echo "Making links to \`src'"
245### Don't distribute =*.[ch] files, or the configured versions of 271### Don't distribute =*.[ch] files, or the configured versions of
246### config.in, paths.in, or Makefile.in, or TAGS. 272### config.in, paths.in, or Makefile.in, or TAGS.
247(cd src 273(cd src
248 echo " (If we can't link gmalloc.c, that's okay.)" 274 echo " (It is ok if ln fails in some cases.)"
249 ln [a-zA-Z]*.c ../${tempdir}/src 275 ln [a-zA-Z]*.c ../${tempdir}/src
250 ## Might be a symlink to a file on another filesystem.
251 test -f ../${tempdir}/src/gmalloc.c || cp gmalloc.c ../${tempdir}/src
252 ln [a-zA-Z]*.h ../${tempdir}/src 276 ln [a-zA-Z]*.h ../${tempdir}/src
253 ln [a-zA-Z]*.s ../${tempdir}/src 277 ln [a-zA-Z]*.s ../${tempdir}/src
254 ln README Makefile.in ChangeLog ChangeLog.? config.in paths.in \ 278 ln [a-zA-Z]*.in ../${tempdir}/src
255 ../${tempdir}/src 279 ln [a-zA-Z]*.opt ../${tempdir}/src
256 ln makefile.nt ../${tempdir}/src 280 ## If we ended up with a symlink, or if we did not get anything
281 ## due to a cross-device symlink, copy the file.
282 for file in [a-zA-Z]*.[hcs] [a-zA-Z]*.in [a-zA-Z]*.opt; do
283 if test -f ../${tempdir}/src/$file; then
284 # test -f appears to succeed for a symlink
285 if test -L ../${tempdir}/src/$file; then
286 rm ../${tempdir}/src/$file
287 cp $file ../${tempdir}/src
288 chmod a-w ../${tempdir}/src/$file
289 fi
290 else
291 rm ../${tempdir}/src/$file
292 cp $file ../${tempdir}/src
293 chmod a-w ../${tempdir}/src/$file
294 fi
295 done
296 ln README ChangeLog ChangeLog.*[0-9] ../${tempdir}/src
297 ln makefile.nt vms-pp.trans ../${tempdir}/src
257 ln .gdbinit .dbxinit ../${tempdir}/src 298 ln .gdbinit .dbxinit ../${tempdir}/src
258 ln *.opt vms-pp.trans ../${tempdir}/src
259 cd ../${tempdir}/src 299 cd ../${tempdir}/src
260 rm -f config.h paths.h Makefile Makefile.c 300 rm -f config.h paths.h Makefile Makefile.c
261 rm -f =* TAGS) 301 rm -f =* TAGS)
@@ -278,8 +318,24 @@ echo "Making links to \`lib-src'"
278 ln [a-zA-Z]*.[chy] ../${tempdir}/lib-src 318 ln [a-zA-Z]*.[chy] ../${tempdir}/lib-src
279 ln ChangeLog Makefile.in README testfile vcdiff ../${tempdir}/lib-src 319 ln ChangeLog Makefile.in README testfile vcdiff ../${tempdir}/lib-src
280 ln emacs.csh rcs2log rcs-checkin makefile.nt ../${tempdir}/lib-src 320 ln emacs.csh rcs2log rcs-checkin makefile.nt ../${tempdir}/lib-src
321 ## If we ended up with a symlink, or if we did not get anything
322 ## due to a cross-device symlink, copy the file.
323 for file in [a-zA-Z]*.[chy]; do
324 if test -f ../${tempdir}/lib-src/$file; then
325 # test -f appears to succeed for a symlink
326 if test -L ../${tempdir}/lib-src/$file; then
327 rm ../${tempdir}/lib-src/$file
328 cp $file ../${tempdir}/lib-src
329 chmod a-w ../${tempdir}/lib-src/$file
330 fi
331 else
332 rm ../${tempdir}/lib-src/$file
333 cp $file ../${tempdir}/lib-src
334 chmod a-w ../${tempdir}/lib-src/$file
335 fi
336 done
281 cd ../${tempdir}/lib-src 337 cd ../${tempdir}/lib-src
282 rm -f getdate.tab.c y.tab.c y.tab.h Makefile.c 338 rm -f Makefile.c
283 rm -f =* TAGS) 339 rm -f =* TAGS)
284 340
285echo "Making links to \`nt'" 341echo "Making links to \`nt'"