comparison lisp/build-report.el @ 975:151d438d2d55

[xemacs-hg @ 2002-08-28 05:36:20 by youngs] 2002-08-16 Steve Youngs <youngs@xemacs.org> * version.sh (xemacs_extra_name): New var to identify XEmacs version > release < next release. ie, release+cvs. * configure.in: Test for xemacs_extra_name. * configure: Re-generate. 2002-08-16 Steve Youngs <youngs@xemacs.org> * build-report.el (build-report-installation-version-regexp): Update to cater for 'xemacs-extra-name'. (build-report-version-file-regexp): Ditto. (build-report): Ditto. (build-report-installation-data): Ditto. (build-report-version-file-data): Ditto. * version.el (emacs-version): Test for 'xemacs-extra-name'. 2002-08-16 Steve Youngs <youngs@xemacs.org> * config.h.in (XEMACS_EXTRA_NAME): New. * emacs.c (vars_of_emacs): Use it.
author youngs
date Wed, 28 Aug 2002 05:36:34 +0000
parents 0a255b32b157
children 0fb57d74601d
comparison
equal deleted inserted replaced
974:fce478afd5b4 975:151d438d2d55
55 ;;; If users do need to change the value of any of these, they need to do 55 ;;; If users do need to change the value of any of these, they need to do
56 ;;; it after `build-report' has been loaded (not just required). Please 56 ;;; it after `build-report' has been loaded (not just required). Please
57 ;;; report it to the maintainers of `build-report' when you think you 57 ;;; report it to the maintainers of `build-report' when you think you
58 ;;; need to do this. 58 ;;; need to do this.
59 (defconst build-report-installation-version-regexp 59 (defconst build-report-installation-version-regexp
60 "XEmacs\\s-+\\([0-9]+\\)\\.\\([0-9]+\\)\\(\\(-b\\|\\.\\)\\([0-9]+\\)\\)?\\s-+\\\\?\"\\([^\\\"]+\\)\\\\?\"\\s-+configured\\s-+for\\s-+`\\(.+\\)'\\." 60 "XEmacs\\s-+\\([0-9]+\\)\\.\\([0-9]+\\)\\(\\(-b\\|\\.\\)\\([0-9]+\\)\\)?\\s-+\\\\?\"\\([^\\\"]+\\)\\\\?\"\\s-+\\(.*\\)?configured\\s-+for\\s-+`\\(.+\\)'\\."
61 "*REGEXP matching XEmacs Beta Version string in 61 "*REGEXP matching XEmacs Beta Version string in
62 `build-report-installation-file' file. This variable is used by 62 `build-report-installation-file' file. This variable is used by
63 `build-report-installation-data'.") 63 `build-report-installation-data'.")
64 64
65 (defconst build-report-version-file-regexp 65 (defconst build-report-version-file-regexp
66 "emacs_major_version\\s-*=\\s-*\\([0-9]+\\) 66 "emacs_major_version\\s-*=\\s-*\\([0-9]+\\)
67 emacs_minor_version\\s-*=\\s-*\\([0-9]+\\) 67 emacs_minor_version\\s-*=\\s-*\\([0-9]+\\)
68 emacs_beta_version\\s-*=\\s-*\\([0-9]+\\)? 68 emacs_beta_version\\s-*=\\s-*\\([0-9]+\\)?
69 xemacs_codename\\s-*=\\s-*\"\\([^\"]+\\)\"" 69 xemacs_codename\\s-*=\\s-*\"\\([^\"]+\\)\"
70 xemacs_extra_name\\s-*=\\s-*\"\\([^\"]+\\)\""
70 "*REGEXP matching XEmacs Beta Version variable assignments in 71 "*REGEXP matching XEmacs Beta Version variable assignments in
71 `build-report-version-file' file. This variable is used by 72 `build-report-version-file' file. This variable is used by
72 `build-report-version-file-data'.") 73 `build-report-version-file-data'.")
73 74
74 (defconst build-report-installation-srcdir-regexp 75 (defconst build-report-installation-srcdir-regexp
306 (setq arg (cons (read-string prompt "" 'hist) arg))) 307 (setq arg (cons (read-string prompt "" 'hist) arg)))
307 arg))) 308 arg)))
308 (save-excursion 309 (save-excursion
309 (if (file-exists-p build-report-installation-file) 310 (if (file-exists-p build-report-installation-file)
310 (multiple-value-bind 311 (multiple-value-bind
311 (major minor beta codename configuration) 312 (major minor beta codename extraname configuration)
312 (build-report-installation-data build-report-installation-file) 313 (build-report-installation-data build-report-installation-file)
313 (setq build-report-subject 314 (setq build-report-subject
314 (format "[%%s] XEmacs %s.%s%s \"%s\", %s" 315 (format "[%%s] XEmacs %s.%s%s \"%s\" %s %s"
315 major minor beta codename configuration))) 316 major minor beta codename extraname configuration)))
316 (multiple-value-bind 317 (multiple-value-bind
317 (major minor beta codename) 318 (major minor beta codename extraname)
318 (build-report-version-file-data build-report-version-file) 319 (build-report-version-file-data build-report-version-file)
319 (setq build-report-subject 320 (setq build-report-subject
320 (format "[%%s] XEmacs %s.%s%s \"%s\", %s" 321 (format "[%%s] XEmacs %s.%s%s \"%s\" %s %s"
321 major minor beta codename system-configuration)))) 322 major minor beta codename extraname system-configuration))))
322 (compose-mail 323 (compose-mail
323 ;; `build-report-destination' used to be a single string, so 324 ;; `build-report-destination' used to be a single string, so
324 ;; let's test if we really get a list of destinations. 325 ;; let's test if we really get a list of destinations.
325 (if (listp build-report-destination) 326 (if (listp build-report-destination)
326 (read-string 327 (read-string
490 which defaults to `build-report-installation-file'." 491 which defaults to `build-report-installation-file'."
491 (interactive "fInstallation file: ") 492 (interactive "fInstallation file: ")
492 (unless file 493 (unless file
493 (setq file build-report-installation-file)) 494 (setq file build-report-installation-file))
494 (let 495 (let
495 (major minor beta codename configuration srcdir) 496 (major minor beta codename extraname configuration srcdir)
496 (save-window-excursion 497 (save-window-excursion
497 (find-file-read-only file) 498 (find-file-read-only file)
498 (goto-char (point-min)) 499 (goto-char (point-min))
499 (while (< (point) (point-max)) 500 (while (< (point) (point-max))
500 (cond 501 (cond
502 (goto-char (match-end 0)) 503 (goto-char (match-end 0))
503 (setq major (match-string 1)) 504 (setq major (match-string 1))
504 (setq minor (match-string 2)) 505 (setq minor (match-string 2))
505 (setq beta (match-string 3)) 506 (setq beta (match-string 3))
506 (setq codename (match-string 6)) 507 (setq codename (match-string 6))
507 (setq configuration (match-string 7))) 508 (setq extraname (match-string 7))
509 (setq configuration (match-string 8)))
508 ((looking-at build-report-installation-srcdir-regexp) 510 ((looking-at build-report-installation-srcdir-regexp)
509 (goto-char (match-end 0)) 511 (goto-char (match-end 0))
510 (setq srcdir (match-string 1))) 512 (setq srcdir (match-string 1)))
511 ;; We avoid matching a potentially zero-length string to avoid 513 ;; We avoid matching a potentially zero-length string to avoid
512 ;; infinite looping. 514 ;; infinite looping.
513 ((looking-at 515 ((looking-at
514 "^.+$") 516 "^.+$")
515 (goto-char (match-end 0))) 517 (goto-char (match-end 0)))
516 ((looking-at "\n") 518 ((looking-at "\n")
517 (goto-char (match-end 0))))) 519 (goto-char (match-end 0)))))
518 (values major minor (or beta "") codename configuration srcdir)))) 520 (values major minor (or beta "") codename extraname configuration srcdir))))
519 521
520 (defun build-report-version-file-data (&optional file) 522 (defun build-report-version-file-data (&optional file)
521 "Return a list of XEmacs version information containing 523 "Return a list of XEmacs version information containing
522 MAJOR_NUMBER MINOR_NUMBER BETA_STRING CODENAME from FILE, which 524 MAJOR_NUMBER MINOR_NUMBER BETA_STRING CODENAME from FILE, which
523 defaults to `build-report-version-file'." 525 defaults to `build-report-version-file'."
524 (interactive "fversion.sh file: ") 526 (interactive "fversion.sh file: ")
525 (unless file 527 (unless file
526 (setq file build-report-version-file)) 528 (setq file build-report-version-file))
527 (let 529 (let
528 (major minor beta codename) 530 (major minor beta codename extraname)
529 (save-window-excursion 531 (save-window-excursion
530 (find-file-read-only file) 532 (find-file-read-only file)
531 (goto-char (point-min)) 533 (goto-char (point-min))
532 (while (< (point) (point-max)) 534 (while (< (point) (point-max))
533 (cond 535 (cond
534 ((looking-at build-report-version-file-regexp) 536 ((looking-at build-report-version-file-regexp)
535 (goto-char (match-end 0)) 537 (goto-char (match-end 0))
536 (setq major (match-string 1)) 538 (setq major (match-string 1))
537 (setq minor (match-string 2)) 539 (setq minor (match-string 2))
538 (setq beta (match-string 3)) 540 (setq beta (match-string 3))
539 (setq codename (match-string 4))) 541 (setq codename (match-string 4))
542 (setq extraname (match-string 5)))
540 ;; We avoid matching a potentially zero-length string to avoid 543 ;; We avoid matching a potentially zero-length string to avoid
541 ;; infinite looping. 544 ;; infinite looping.
542 ((looking-at 545 ((looking-at
543 "^.+$") 546 "^.+$")
544 (goto-char (match-end 0))) 547 (goto-char (match-end 0)))
545 ((looking-at "\n") 548 ((looking-at "\n")
546 (goto-char (match-end 0))))) 549 (goto-char (match-end 0)))))
547 (values major minor (or beta "") codename)))) 550 (values major minor (or beta "") codename extraname))))
548 551
549 ;;; build-report.el ends here 552 ;;; build-report.el ends here