diff options
| author | Richard M. Stallman | 1997-01-02 00:53:34 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-01-02 00:53:34 +0000 |
| commit | c75cfabd5acf3c5564669c8b0d0035e32edff5ba (patch) | |
| tree | cde7788190e3002fbc12daccd7d4094dcd44ace0 | |
| parent | 8226e01e77fb265751284d74f9a90e72229c951e (diff) | |
| download | emacs-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-x | make-dist | 98 |
1 files changed, 77 insertions, 21 deletions
| @@ -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 | ||
| 36 | update=yes | ||
| 36 | clean_up=no | 37 | clean_up=no |
| 37 | make_tar=no | 38 | make_tar=no |
| 38 | newer="" | 39 | newer="" |
| @@ -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 |
| 78 | fi | 83 | fi |
| 79 | 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 | ||
| 98 | fi | ||
| 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/'` |
| @@ -89,11 +109,14 @@ 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}. |
| @@ -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; } |
| 142 | fi | 165 | fi |
| 143 | 166 | ||
| 144 | echo "Updating Info files" | 167 | if [ $update = yes ]; |
| 168 | then | ||
| 169 | echo "Updating Info files" | ||
| 145 | 170 | ||
| 146 | (cd man; make info) | 171 | (cd man; make info) |
| 147 | 172 | ||
| 148 | echo "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 | ||
| 152 | echo "Recompiling Lisp files" | 177 | echo "Recompiling Lisp files" |
| 153 | 178 | ||
| 154 | src/emacs -batch -f batch-byte-recompile-directory lisp | 179 | $EMACS -batch -f batch-byte-recompile-directory lisp |
| 155 | 180 | ||
| 156 | echo "Updating autoloads" | 181 | echo "Updating autoloads" |
| 157 | 182 | ||
| 158 | src/emacs -batch -f batch-update-autoloads lisp | 183 | $EMACS -batch -f batch-update-autoloads lisp |
| 184 | fi | ||
| 159 | 185 | ||
| 160 | echo "Making lisp/MANIFEST" | 186 | echo "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 | ||
| 285 | echo "Making links to \`nt'" | 341 | echo "Making links to \`nt'" |