Mercurial > emacs
comparison make-dist @ 16806:9694822642a7
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.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 02 Jan 1997 00:53:34 +0000 |
parents | ffc0af16b32a |
children | b29d903ca993 |
comparison
equal
deleted
inserted
replaced
16805:4b8907e5a574 | 16806:9694822642a7 |
---|---|
31 ### set -e | 31 ### set -e |
32 | 32 |
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 |
36 update=yes | |
36 clean_up=no | 37 clean_up=no |
37 make_tar=no | 38 make_tar=no |
38 newer="" | 39 newer="" |
39 | 40 |
40 while [ $# -gt 0 ]; do | 41 while [ $# -gt 0 ]; do |
45 clean_up=yes | 46 clean_up=yes |
46 ;; | 47 ;; |
47 ## This option tells make-dist to make a tar file. | 48 ## This option tells make-dist to make a tar file. |
48 "--tar" ) | 49 "--tar" ) |
49 make_tar=yes | 50 make_tar=yes |
51 ;; | |
52 ## This option tells make-dist not to recompile or do analogous things. | |
53 "--no-update" ) | |
54 update=no | |
50 ;; | 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. |
54 "--newer") | 59 "--newer") |
73 if [ ! -d src -o ! -f src/lisp.h -o ! -d lisp -o ! -f lisp/version.el ]; then | 78 if [ ! -d src -o ! -f src/lisp.h -o ! -d lisp -o ! -f lisp/version.el ]; then |
74 echo "${progname}: Can't find \`src/lisp.h' and \`lisp/version.el'." >&2 | 79 echo "${progname}: Can't find \`src/lisp.h' and \`lisp/version.el'." >&2 |
75 echo "${progname} must be run in the top directory of the Emacs" >&2 | 80 echo "${progname} must be run in the top directory of the Emacs" >&2 |
76 echo "distribution tree. cd to that directory and try again." >&2 | 81 echo "distribution tree. cd to that directory and try again." >&2 |
77 exit 1 | 82 exit 1 |
83 fi | |
84 | |
85 ### Find where to run Emacs. | |
86 if [ $update = yes ]; | |
87 then | |
88 if [ -f src/emacs ]; | |
89 then | |
90 EMACS=`pwd`/src/emacs | |
91 else | |
92 if [ x$EMACS = x ]; | |
93 then | |
94 echo You must specify the EMACS environment variable 2>&1 | |
95 exit 1 | |
96 fi | |
97 fi | |
78 fi | 98 fi |
79 | 99 |
80 ### Find out which version of Emacs this is. | 100 ### Find out which version of Emacs this is. |
81 shortversion=`grep 'defconst[ ]*emacs-version' lisp/version.el \ | 101 shortversion=`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/'` |
87 exit 1 | 107 exit 1 |
88 fi | 108 fi |
89 | 109 |
90 echo Version numbers are $version and $shortversion | 110 echo Version numbers are $version and $shortversion |
91 | 111 |
92 if grep -s "GNU Emacs version ${shortversion}" ./man/emacs.texi > /dev/null; then | 112 if [ $update = yes ]; |
93 true | 113 then |
94 else | 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 | |
97 fi | 120 fi |
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}. |
100 | 123 |
101 emacsname="emacs-${version}${new_extension}" | 124 emacsname="emacs-${version}${new_extension}" |
139 echo "\`./configure.in' is newer than \`./configure'" >&2 | 162 echo "\`./configure.in' is newer than \`./configure'" >&2 |
140 echo "Running autoconf" >&2 | 163 echo "Running autoconf" >&2 |
141 autoconf || { x=$?; echo Autoconf FAILED! >&2; exit $x; } | 164 autoconf || { x=$?; echo Autoconf FAILED! >&2; exit $x; } |
142 fi | 165 fi |
143 | 166 |
144 echo "Updating Info files" | 167 if [ $update = yes ]; |
145 | 168 then |
146 (cd man; make info) | 169 echo "Updating Info files" |
147 | 170 |
148 echo "Updating finder-inf.el" | 171 (cd man; make info) |
149 | 172 |
150 (cd lisp; ../src/emacs -batch -l finder -f finder-compile-keywords-make-dist) | 173 echo "Updating finder-inf.el" |
151 | 174 |
152 echo "Recompiling Lisp files" | 175 (cd lisp; $EMACS -batch -l finder -f finder-compile-keywords-make-dist) |
153 | 176 |
154 src/emacs -batch -f batch-byte-recompile-directory lisp | 177 echo "Recompiling Lisp files" |
155 | 178 |
156 echo "Updating autoloads" | 179 $EMACS -batch -f batch-byte-recompile-directory lisp |
157 | 180 |
158 src/emacs -batch -f batch-update-autoloads lisp | 181 echo "Updating autoloads" |
182 | |
183 $EMACS -batch -f batch-update-autoloads lisp | |
184 fi | |
159 | 185 |
160 echo "Making lisp/MANIFEST" | 186 echo "Making lisp/MANIFEST" |
161 | 187 |
162 (cd lisp; head -1 [!=]*.el | grep '^;' | sed -e 's/;;; //' > MANIFEST) | 188 (cd lisp; head -1 [!=]*.el | grep '^;' | sed -e 's/;;; //' > MANIFEST) |
163 | 189 |
243 | 269 |
244 echo "Making links to \`src'" | 270 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) |
262 | 302 |
263 echo "Making links to \`src/bitmaps'" | 303 echo "Making links to \`src/bitmaps'" |
276 echo "Making links to \`lib-src'" | 316 echo "Making links to \`lib-src'" |
277 (cd lib-src | 317 (cd 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 |
285 echo "Making links to \`nt'" | 341 echo "Making links to \`nt'" |
286 (cd nt | 342 (cd nt |
287 ln emacs.ico emacs.rc config.nt [a-z]*.in [a-z]*.c ../${tempdir}/nt | 343 ln emacs.ico emacs.rc config.nt [a-z]*.in [a-z]*.c ../${tempdir}/nt |