annotate lisp/build-report.el @ 3000:5df5ea55d3fc

[xemacs-hg @ 2005-10-18 20:49:41 by malcolmp] Sync of occur mode with GNU Emacs 22.0.50.1 (CVS)
author malcolmp
date Tue, 18 Oct 2005 20:49:43 +0000
parents 0fb57d74601d
children dcfb8ec6859a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 ;;; build-report.el --- Automatically formatted build reports for XEmacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2
2976
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
3 ;; Copyright (C) 1997-2003 Adrian Aichner
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4
434
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
5 ;; Author: Adrian Aichner <adrian@xemacs.org>
2976
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
6 ;; Date: $Date: 2005/10/05 04:11:25 $
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
7 ;; Version: $Revision: 1.12 $
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 ;; Keywords: internal
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10 ;; This file is part of XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 ;; XEmacs is free software; you can redistribute it and/or modify
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 ;; it under the terms of the GNU General Public License as published by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 ;; the Free Software Foundation; either version 2, or (at your option)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 ;; any later version.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 ;; XEmacs is distributed in the hope that it will be useful, but
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 ;; General Public License for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 ;; You should have received a copy of the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 ;; along with XEmacs; see the file COPYING. If not, write to the Free
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 ;; 02111-1307, USA.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 ;;; Synched up with: Not synched.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29 ;;; Commentary:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 ;; The Idea:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 ;; Let XEmacs report interesting aspects of how it was built.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 ;; The Concept:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 ;; User creates an XEmacs Build Report by just calling
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 ;; M-x build-report
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 ;; which will initialize a mail buffer with relevant information
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 ;; derived from the XEmacs build process. Point is left at the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 ;; beginning of the report for user to input some personal notes and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 ;; send the report.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 ;; The Status:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 ;; This is the first `Proof of Concept'.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 ;; The Author:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 ;; Adrian Aichner, Teradyne GmbH Munich, Sun., Apr. 20, 1997.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 ;;; Code:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 (require 'config)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
51 (require 'custom)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
52 (require 'cl)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 (provide 'build-report)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
55 ;;; Constant definitions used internally by `build-report'. These are not
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
56 ;;; anticipated to be changed by users of `build-report'.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
57 ;;; If users do need to change the value of any of these, they need to do
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
58 ;;; it after `build-report' has been loaded (not just required). Please
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
59 ;;; report it to the maintainers of `build-report' when you think you
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
60 ;;; need to do this.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
61 (defconst build-report-installation-version-regexp
975
151d438d2d55 [xemacs-hg @ 2002-08-28 05:36:20 by youngs]
youngs
parents: 501
diff changeset
62 "XEmacs\\s-+\\([0-9]+\\)\\.\\([0-9]+\\)\\(\\(-b\\|\\.\\)\\([0-9]+\\)\\)?\\s-+\\\\?\"\\([^\\\"]+\\)\\\\?\"\\s-+\\(.*\\)?configured\\s-+for\\s-+`\\(.+\\)'\\."
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
63 "*REGEXP matching XEmacs Beta Version string in
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
64 `build-report-installation-file' file. This variable is used by
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
65 `build-report-installation-data'.")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
66
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
67 (defconst build-report-version-file-regexp
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
68 "emacs_major_version\\s-*=\\s-*\\([0-9]+\\)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
69 emacs_minor_version\\s-*=\\s-*\\([0-9]+\\)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
70 emacs_beta_version\\s-*=\\s-*\\([0-9]+\\)?
2976
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
71 xemacs_codename\\s-*=\\s-*\"\\([^\"]+\\)\"\\(
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
72 xemacs_extra_name\\s-*=\\s-*\"\\([^\"]+\\)\"\\)?"
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
73 "*REGEXP matching XEmacs Beta Version variable assignments in
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
74 `build-report-version-file' file. This variable is used by
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
75 `build-report-version-file-data'.")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
76
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
77 (defconst build-report-installation-srcdir-regexp
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
78 "\\s-*Where should the build process find the source code\\?\\s-*\\(.*\\)$"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
79 "REGEXP matching XEmacs Beta srcdir as the first substring match in
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
80 `build-report-installation-file' file. This variable is used by
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
81 `build-report-installation-data'.")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
82
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
83 ;;; Customization support for build-report starts here.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 (defgroup build-report nil
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
86 "Standardizes the Creation of XEmacs Build Reports."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
87 :load 'build-report
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 :group 'build)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 (defcustom build-report-destination
460
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
91 (list
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
92 "XEmacs Build Reports List <xemacs-buildreports@xemacs.org>"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
93 "XEmacs Beta List <xemacs-beta@xemacs.org>")
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
94 "*The list of mail addresses XEmacs Build Reports should most likely
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
95 go to."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
96 :type '(repeat
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
97 :custom-show t
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
98 :documentation-shown t
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
99 string)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 :group 'build-report)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 (defcustom build-report-keep-regexp
460
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
103 (list
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
104 "^\\(cd\\|n?make\\)\\s-"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
105 "errors?"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
106 "warnings?"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
107 "pure.*\\(space\\|size\\)"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
108 "hides\\b"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
109 "strange"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
110 "shadowings"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
111 "^Compil\\(ing\\s-+in\\|ation\\)"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
112 "^Using"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
113 "not\\s-+found"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
114 "^While\\s-+compiling.*\\(\n\\s-+.+\\)*"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
115 "^Note:"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
116 "Installing"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
117 "[Ff]ile(s) copied"
2976
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
118 "\\s-+tests\\s-+"
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
119 "^[A-Z] [^ ]+$"
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
120 "^Wrong number of arguments:"
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
121 "^ \\*\\* "
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
122 "^\\(FAIL\\|SKIP\\):")
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
123 "*Regexp of make process output lines to keep in the report."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
124 :type '(repeat
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
125 :custom-show t
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
126 :documentation-shown t
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
127 regexp)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128 :group 'build-report)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 (defcustom build-report-delete-regexp
460
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
131 (list
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
132 "confl.*with.*auto-inlining"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
133 "^Formatting:"
2976
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
134 "^\\s-*0 .*\\(failure\\|error\\)s?"
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
135 "^PASS:"
460
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
136 "(100%) tests successful")
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
137 "*Regexp of make process output lines to delete from the report."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
138 :type '(repeat
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
139 :custom-show t
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
140 :documentation-shown t
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
141 regexp)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142 :group 'build-report)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
144 (defcustom build-report-make-output-dir
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
145 (cond
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
146 ((equal system-type 'windows-nt)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
147 (expand-file-name "nt"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
148 (gethash 'blddir (config-value-hash-table))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
149 (t
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
150 (gethash 'blddir (config-value-hash-table))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
151 "*Directory where the build report file is found.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
152 If this is empty or nil, the default, it is replaced by the value of
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
153 the XEmacs build directory."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
154 :type '(directory
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
155 :custom-show t
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
156 :documentation-shown t)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
157 :group 'build-report)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
158
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
159 (defcustom build-report-make-output-files
460
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
160 (list
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
161 "beta.err"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
162 "xemacs-make-all.err"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
163 "xemacs-make-check-temacs.err"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
164 "xemacs-make-check.err"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
165 "xemacs-make-install.err")
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
166 "*List of Filenames where stdout and stderr of XEmacs make process
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
167 have been stored. These are relative to
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
168 `build-report-make-output-dir`. You'll have to run make with output
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
169 redirection or use the `build' XEmacs package to save this output. You
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
170 may use following alias
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
171
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172 alias mk 'make \!* >>&\! \!$.err &'
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
173
501
0a255b32b157 [xemacs-hg @ 2001-05-03 21:08:39 by adrian]
adrian
parents: 468
diff changeset
174 under csh, so that you get beta.err when you run `mk beta'."
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
175 :type '(repeat
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
176 :custom-show t
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
177 :documentation-shown t
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
178 file)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179 :group 'build-report)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 (defcustom build-report-installation-file
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
182 (expand-file-name "Installation"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
183 (gethash 'blddir (config-value-hash-table)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
184 "*Installation file produced by XEmacs configure process."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
185 :type '(file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
186 :custom-show t
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
187 :documentation-shown t)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188 :group 'build-report)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
189
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
190 (defcustom build-report-version-file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
191 (expand-file-name
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
192 "version.sh"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
193 (gethash 'blddir (config-value-hash-table)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
194 "*version.sh file identifying XEmacs (Beta) Distribution."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
195 :type '(file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
196 :custom-show t
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
197 :documentation-shown t)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
198 :group 'build-report)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
199
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
200 (defcustom build-report-installation-insert-all
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
201 nil
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
202 "*Tell build-report to insert the whole Installation file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
203 instead of just the last report."
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 :type 'boolean
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205 :group 'build-report)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207 (defcustom build-report-subject
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
208 (concat "[%s] " emacs-version " on " system-configuration)
2976
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
209 ;; #### this should allow variable names which will be evalled and
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
210 ;; formatted using %s, see `build-report-prompts'
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
211 "*XEmacs Build Report Subject Line. %s-sequences will be substituted
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
212 with user input through `build-report' according to
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
213 `build-report-prompts' using `format'."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
214 :type '(string
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
215 :custom-show t
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
216 :documentation-shown t)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217 :group 'build-report)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
219 (defcustom build-report-prompts
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
220 (quote (("Status?: " ("Success" "Failure"))))
2976
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
221 ;; #### this should allow variable names which will be evalled and
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
222 ;; formatted using %s, see `build-report-prompts'
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
223 "*XEmacs Build Report Prompt(s). This is a list of prompt-string
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
224 lists used by `build-report' in conjunction with
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
225 `build-report-subject'. Each list consists of a prompt string
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
226 followed by any number of strings which can be chosen via the history
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
227 mechanism."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
228 :type '(repeat
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
229 :custom-show t
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
230 :documentation-shown t
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
231 (list
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
232 :tag "Prompt"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
233 string
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
234 (repeat
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
235 :tag "Values"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
236 string)))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
237 :group 'build-report)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
239 (defcustom build-report-file-encoding
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240 "7bit"
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
241 "*XEmacs Build Report File Encoding to be used when MIME support is
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
242 available."
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
243 :group 'build-report)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
245 ;; Symbol Name mappings from TM to SEMI serving as Compatibility
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
246 ;; Bandaid
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
247 (when (featurep 'mime-setup)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
248 ;; No (defvaralias ...) so far. Thanks to "Didier Verna"
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
249 ;; <didier@xemacs.org> for reporting my incorrect defvaraliasing of
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
250 ;; `mime-editor/insert-tag'.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
251 ;; Thanks to Jens-Ulrik Holger Petersen
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252 ;; <petersen@kurims.kyoto-u.ac.jp> for suggesting the conditional
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
253 ;; aliasing of SEMI functions.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
254 (unless (fboundp 'mime-edit-content-beginning)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
255 (defalias 'mime-edit-content-beginning 'mime-editor/content-beginning))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
256 (unless (fboundp 'mime-edit-insert-tag)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
257 (defalias 'mime-edit-insert-tag 'mime-editor/insert-tag))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
258 (unless (fboundp 'mime-edit-insert-binary-file)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
259 (defalias 'mime-edit-insert-binary-file
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
260 'mime-editor/insert-binary-file)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
261
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
262 (defun build-report-make-output-get ()
2976
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
263 "Return the filename the XEmacs make output is saved in."
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
264 (interactive)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
265 (if (or (string-equal build-report-make-output-dir "")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
266 (null build-report-make-output-dir))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
267 (mapcar
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
268 (function
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
269 (lambda (f)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
270 (expand-file-name
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
271 f
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
272 (file-name-as-directory
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
273 (gethash 'blddir (config-value-hash-table))))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
274 build-report-make-output-files)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
275 (mapcar
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
276 (function
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
277 (lambda (f)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
278 (expand-file-name
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
279 f
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
280 (file-name-as-directory build-report-make-output-dir))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
281 build-report-make-output-files)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
282
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
283 ;;;###autoload
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
284 (defun build-report (&rest args)
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
285 "Report build information including Installation and make output.
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
286
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
287 Prompts for status (usually \"Success\" or \"Failure\"). Then uses
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
288 `compose-mail' to create a mail message. The Subject header contains
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
289 status and version information. Point is left at the beginning of the
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
290 mail text. Add some notes if you like, and send the report.
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
291
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
292 Looks for Installation and the make output file (`beta.err' by
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
293 default, customizable via `build-report-make-output-files') in the
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
294 build directory of the running XEmacs by default (customizable via
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
295 `build-report-make-output-dir'). The output from make is filtered
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
296 through `build-report-keep-regexp' and `build-report-delete-regexp'
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
297 before including in the message.
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
298
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
299 See also `mail-user-agent', `build-report-destination', and
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
300 `build-report-installation-file'."
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
301 ;; `interactive' form returns value for formal parameter `args'.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
302 (interactive
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
303 (let (prompt
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
304 hist
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
305 arg
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
306 (prompts build-report-prompts))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
307 (progn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
308 (while prompts
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
309 (defvar hist)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
310 (setq prompt (caar prompts))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
311 (setq hist (cdar prompts))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
312 ;; `build-report-prompts' used to be a list of lists, the
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
313 ;; first element of each list being the prompt, the rest being
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
314 ;; the history. The history is now in a separate list. We
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
315 ;; better check for that.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
316 (if (listp (car hist))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
317 (setq hist (car hist)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
318 (setq prompts (cdr prompts))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
319 (setq arg (cons (read-string prompt "" 'hist) arg)))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
320 arg)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
321 (save-excursion
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
322 (if (file-exists-p build-report-installation-file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
323 (multiple-value-bind
975
151d438d2d55 [xemacs-hg @ 2002-08-28 05:36:20 by youngs]
youngs
parents: 501
diff changeset
324 (major minor beta codename extraname configuration)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
325 (build-report-installation-data build-report-installation-file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
326 (setq build-report-subject
2976
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
327 (format "[%%s] XEmacs %s.%s%s \"%s\" %s%s"
975
151d438d2d55 [xemacs-hg @ 2002-08-28 05:36:20 by youngs]
youngs
parents: 501
diff changeset
328 major minor beta codename extraname configuration)))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
329 (multiple-value-bind
975
151d438d2d55 [xemacs-hg @ 2002-08-28 05:36:20 by youngs]
youngs
parents: 501
diff changeset
330 (major minor beta codename extraname)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
331 (build-report-version-file-data build-report-version-file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
332 (setq build-report-subject
2976
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
333 (format "[%%s] XEmacs %s.%s%s \"%s\" %s%s"
975
151d438d2d55 [xemacs-hg @ 2002-08-28 05:36:20 by youngs]
youngs
parents: 501
diff changeset
334 major minor beta codename extraname system-configuration))))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
335 (compose-mail
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
336 ;; `build-report-destination' used to be a single string, so
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
337 ;; let's test if we really get a list of destinations.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
338 (if (listp build-report-destination)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
339 (read-string
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
340 "Build Report Destination: "
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
341 (car build-report-destination)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
342 'build-report-destination)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
343 (read-string
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
344 "Build Report Destination: "
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
345 build-report-destination)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
346 )
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
347 (apply 'format build-report-subject args)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
348 nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
349 nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
350 nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
351 nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
352 nil)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
353 (let* ((report-begin (point))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
354 (files (reverse (build-report-make-output-get)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
355 (file (car files)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
356 (while file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
357 (if (file-exists-p file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
358 (insert (build-report-insert-make-output report-begin file))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
359 (insert (format "%s not found!\n" file)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
360 (insert "\n")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
361 (setq files (cdr files))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
362 (setq file (car files)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
363 (if (file-exists-p build-report-installation-file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
364 (insert (build-report-insert-installation-file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
365 report-begin
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
366 build-report-installation-insert-all))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
367 (insert (format "%s not found!\n" build-report-installation-file)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
368 ;;; (when (and (>= major 21) (>= minor 2) (or (null beta) (>= beta 32)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
369 ;;; (insert "\n")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
370 ;;; (insert (build-report-insert-config-inc report-begin)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
371 (insert "\n")
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
372 (insert (build-report-insert-header report-begin))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
373 (goto-char report-begin))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
374
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
375 (defun build-report-insert-header (where)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
376 "Inserts the build-report-header at the point specified by `where'."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
377 (goto-char where)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
378 (with-temp-buffer
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
379 (insert
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
380 (format "
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
381 > XEmacs Build Report generated by emacs-version
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
382 > %s
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
383 > with system-configuration
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
384 > %s
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
385 > follows:\n\n" emacs-version system-configuration))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
386 (buffer-string)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
387
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
388 (defun build-report-insert-make-output (where file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
389 "Inserts the output of the XEmacs Beta make run in the
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
390 current buffer at position WHERE.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
391 The make process output must have been saved in
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
392 `build-report-make-output-files' during the XEmacs Beta building."
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
393 (goto-char where)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
394 (with-temp-buffer
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
395 (if (file-exists-p file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
396 (progn
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
397 (if (featurep 'mime-setup)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
398 (progn
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
399 (mime-edit-insert-tag
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
400 "text"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
401 "plain"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
402 (concat
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
403 "\nContent-Disposition: attachment;"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
404 " filename=\""
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
405 (file-name-nondirectory
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
406 file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
407 "\""))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
408 (mime-edit-insert-binary-file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
409 file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
410 build-report-file-encoding))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
411 (insert-file-contents file))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
412 (when build-report-keep-regexp
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
413 (goto-char (point-min))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
414 (delete-non-matching-lines (build-report-keep)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
415 (when build-report-delete-regexp
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
416 (goto-char (point-min))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
417 (delete-matching-lines (build-report-delete)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
418 (goto-char (point-min))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
419 (if build-report-keep-regexp
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
420 (insert
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
421 (format
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
422 "> keeping lines matching
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
423 > \"%s\"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
424 "
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
425 (build-report-keep))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
426 (if build-report-delete-regexp
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
427 (insert
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
428 (format
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
429 "> %sdeleting lines matching
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
430 > \"%s\"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
431 "
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
432 (if build-report-keep-regexp
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
433 "and then "
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
434 "")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
435 (build-report-delete))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
436 (insert "\n")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
437 (goto-char (point-min))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
438 (insert
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
439 (format "> Contents of %s\n" file)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
440 (insert "> " file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
441 " does not exist!\n\n"))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
442 (buffer-string)))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
443
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
444 (defun build-report-insert-installation-file (where all)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
445 "Inserts the contents of the `build-report-installation-file'
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
446 created by the XEmacs Beta configure process."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
447 (goto-char where)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
448 (with-temp-buffer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
449 (if (file-exists-p build-report-installation-file)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
450 (let (file-begin last-configure)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
451 (insert "> Contents of "
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
452 build-report-installation-file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
453 ":\n")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
454 (insert
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
455 (format
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
456 "> (Output from %s of ./configure)\n\n"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
457 (if all "all runs" "most recent run")))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
458 (if (featurep 'mime-setup)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
459 (progn
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
460 (mime-edit-insert-tag
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
461 "text"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
462 "plain"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
463 (concat
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
464 "\nContent-Disposition: attachment;"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
465 " filename=\""
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
466 (file-name-nondirectory
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
467 build-report-installation-file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
468 "\""))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
469 (mime-edit-insert-binary-file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
470 build-report-installation-file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
471 build-report-file-encoding)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
472 (setq file-begin (mime-edit-content-beginning)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
473 (setq file-begin (point))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
474 (insert-file-contents
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
475 build-report-installation-file))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
476 (unless all
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
477 (setq last-configure
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
478 (search-backward-regexp
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
479 "^\\(uname.*\\|osversion\\|OS\\):\\s-+" file-begin t))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
480 (if (and file-begin last-configure)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
481 (delete-region file-begin last-configure))))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
482 (insert "> " build-report-installation-file
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
483 " does not exist!\n\n"))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
484 (buffer-string)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
485
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
486 (defun build-report-keep ()
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
487 "Concatenate elements of `build-report-keep-regexp' and a general
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
488 MIME tag REGEXP. The result is a REGEXP string matching either of the
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
489 REGEXPs in `build-report-keep-regexp' or a general MIME tag REGEXP."
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
490 (mapconcat #'identity
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
491 (cons "^--\\[\\[\\|\\]\\]$" build-report-keep-regexp) "\\|"))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
492
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
493 (defun build-report-delete ()
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
494 "Concatenate elements of `build-report-delete-regexp' and a general
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
495 MIME tag REGEXP. The result is a REGEXP string matching either of the
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
496 REGEXPs in `build-report-delete-regexp' or a general MIME tag REGEXP."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
497 (mapconcat '(lambda (item) item)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
498 build-report-delete-regexp "\\|"))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
499
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
500 (defun build-report-installation-data (&optional file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
501 "Return a list of XEmacs installation data containing MAJOR_NUMBER
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
502 MINOR_NUMBER BETA_STRING CODENAME CONFIGURATION SRCDIR from FILE,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
503 which defaults to `build-report-installation-file'."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
504 (interactive "fInstallation file: ")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
505 (unless file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
506 (setq file build-report-installation-file))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
507 (let
975
151d438d2d55 [xemacs-hg @ 2002-08-28 05:36:20 by youngs]
youngs
parents: 501
diff changeset
508 (major minor beta codename extraname configuration srcdir)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
509 (save-window-excursion
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
510 (find-file-read-only file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
511 (goto-char (point-min))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
512 (while (< (point) (point-max))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
513 (cond
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
514 ((looking-at build-report-installation-version-regexp)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
515 (goto-char (match-end 0))
2976
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
516 (setq major (or (match-string 1) ""))
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
517 (setq minor (or (match-string 2) ""))
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
518 (setq beta (or (match-string 3) ""))
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
519 (setq codename (or (match-string 6) ""))
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
520 (setq extraname (or (match-string 7) ""))
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
521 (setq configuration (or (match-string 8) "")))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
522 ((looking-at build-report-installation-srcdir-regexp)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
523 (goto-char (match-end 0))
2976
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
524 (setq srcdir (or (match-string 1) "")))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
525 ;; We avoid matching a potentially zero-length string to avoid
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
526 ;; infinite looping.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
527 ((looking-at
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
528 "^.+$")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
529 (goto-char (match-end 0)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
530 ((looking-at "\n")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
531 (goto-char (match-end 0)))))
975
151d438d2d55 [xemacs-hg @ 2002-08-28 05:36:20 by youngs]
youngs
parents: 501
diff changeset
532 (values major minor (or beta "") codename extraname configuration srcdir))))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
533
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
534 (defun build-report-version-file-data (&optional file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
535 "Return a list of XEmacs version information containing
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
536 MAJOR_NUMBER MINOR_NUMBER BETA_STRING CODENAME from FILE, which
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
537 defaults to `build-report-version-file'."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
538 (interactive "fversion.sh file: ")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
539 (unless file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
540 (setq file build-report-version-file))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
541 (let
975
151d438d2d55 [xemacs-hg @ 2002-08-28 05:36:20 by youngs]
youngs
parents: 501
diff changeset
542 (major minor beta codename extraname)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
543 (save-window-excursion
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
544 (find-file-read-only file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
545 (goto-char (point-min))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
546 (while (< (point) (point-max))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
547 (cond
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
548 ((looking-at build-report-version-file-regexp)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
549 (goto-char (match-end 0))
2976
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
550 (setq major (or (match-string 1) ""))
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
551 (setq minor (or (match-string 2) ""))
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
552 (setq beta (or (match-string 3) ""))
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
553 (setq codename (or (match-string 4) ""))
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
554 (setq extraname (or (match-string 6) "")))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
555 ;; We avoid matching a potentially zero-length string to avoid
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
556 ;; infinite looping.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
557 ((looking-at
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
558 "^.+$")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
559 (goto-char (match-end 0)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
560 ((looking-at "\n")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
561 (goto-char (match-end 0)))))
975
151d438d2d55 [xemacs-hg @ 2002-08-28 05:36:20 by youngs]
youngs
parents: 501
diff changeset
562 (values major minor (or beta "") codename extraname))))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
563
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
564 ;;; build-report.el ends here