diff options
| author | Eli Zaretskii | 2013-04-16 17:59:56 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2013-04-16 17:59:56 +0300 |
| commit | a077194c9dbbc52cbab55b1846c144aca5a11f4e (patch) | |
| tree | 7c73ddc6dbd7599091c07ec2b9892c4df1c4dab9 | |
| parent | 83b9062422faef46592618bed64e5df47fe13670 (diff) | |
| download | emacs-a077194c9dbbc52cbab55b1846c144aca5a11f4e.tar.gz emacs-a077194c9dbbc52cbab55b1846c144aca5a11f4e.zip | |
Support emacs-XX.YY.ZZ.n and DOC-XX.YY.ZZ.n on Windows.
| -rw-r--r-- | lisp/loadup.el | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/lisp/loadup.el b/lisp/loadup.el index e5406b6551f..3970e514376 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el | |||
| @@ -290,9 +290,12 @@ | |||
| 290 | (equal (nth 4 command-line-args) "dump")) | 290 | (equal (nth 4 command-line-args) "dump")) |
| 291 | (not (eq system-type 'ms-dos))) | 291 | (not (eq system-type 'ms-dos))) |
| 292 | (let* ((base (concat "emacs-" emacs-version ".")) | 292 | (let* ((base (concat "emacs-" emacs-version ".")) |
| 293 | (exelen (if (eq system-type 'windows-nt) -4 0)) | ||
| 293 | (files (file-name-all-completions base default-directory)) | 294 | (files (file-name-all-completions base default-directory)) |
| 294 | (versions (mapcar (function (lambda (name) | 295 | (versions (mapcar (function |
| 295 | (string-to-number (substring name (length base))))) | 296 | (lambda (name) |
| 297 | (string-to-number | ||
| 298 | (substring name (length base) exelen)))) | ||
| 296 | files))) | 299 | files))) |
| 297 | (setq emacs-bzr-version (condition-case nil (emacs-bzr-get-version) | 300 | (setq emacs-bzr-version (condition-case nil (emacs-bzr-get-version) |
| 298 | (error nil))) | 301 | (error nil))) |
| @@ -317,7 +320,7 @@ | |||
| 317 | ;; There will be no DOC-X on MS-Windows when we build | 320 | ;; There will be no DOC-X on MS-Windows when we build |
| 318 | ;; using the Posix Makefile's. In that case, we want | 321 | ;; using the Posix Makefile's. In that case, we want |
| 319 | ;; to create DOC-XX.YY.ZZ, as on Unix. | 322 | ;; to create DOC-XX.YY.ZZ, as on Unix. |
| 320 | (if (file-exists-p name) | 323 | (if (file-exists-p name1) |
| 321 | (setq name name1) | 324 | (setq name name1) |
| 322 | (setq name (concat (expand-file-name "../etc/DOC-") name)) | 325 | (setq name (concat (expand-file-name "../etc/DOC-") name)) |
| 323 | (if (file-exists-p name) | 326 | (if (file-exists-p name) |
| @@ -398,18 +401,20 @@ | |||
| 398 | (dump-emacs "emacs" "temacs") | 401 | (dump-emacs "emacs" "temacs") |
| 399 | (message "%d pure bytes used" pure-bytes-used) | 402 | (message "%d pure bytes used" pure-bytes-used) |
| 400 | ;; Recompute NAME now, so that it isn't set when we dump. | 403 | ;; Recompute NAME now, so that it isn't set when we dump. |
| 401 | (if (not (or (memq system-type '(ms-dos windows-nt)) | 404 | (if (not (or (eq system-type 'ms-dos) |
| 402 | ;; Don't bother adding another name if we're just | 405 | ;; Don't bother adding another name if we're just |
| 403 | ;; building bootstrap-emacs. | 406 | ;; building bootstrap-emacs. |
| 404 | (equal (nth 3 command-line-args) "bootstrap") | 407 | (equal (nth 3 command-line-args) "bootstrap") |
| 405 | (equal (nth 4 command-line-args) "bootstrap"))) | 408 | (equal (nth 4 command-line-args) "bootstrap"))) |
| 406 | (let ((name (concat "emacs-" emacs-version))) | 409 | (let ((name (concat "emacs-" emacs-version)) |
| 410 | (exe (if (eq system-type 'windows-nt) ".exe" ""))) | ||
| 407 | (while (string-match "[^-+_.a-zA-Z0-9]+" name) | 411 | (while (string-match "[^-+_.a-zA-Z0-9]+" name) |
| 408 | (setq name (concat (downcase (substring name 0 (match-beginning 0))) | 412 | (setq name (concat (downcase (substring name 0 (match-beginning 0))) |
| 409 | "-" | 413 | "-" |
| 410 | (substring name (match-end 0))))) | 414 | (substring name (match-end 0))))) |
| 415 | (setq name (concat name exe)) | ||
| 411 | (message "Adding name %s" name) | 416 | (message "Adding name %s" name) |
| 412 | (add-name-to-file "emacs" name t))) | 417 | (add-name-to-file (concat "emacs" exe) name t))) |
| 413 | (kill-emacs))) | 418 | (kill-emacs))) |
| 414 | 419 | ||
| 415 | ;; For machines with CANNOT_DUMP defined in config.h, | 420 | ;; For machines with CANNOT_DUMP defined in config.h, |