annotate lisp/build-report.el @ 4792:95b04754ea8c

Make #'equalp more compatible with CL; add a compiler macro, test & doc it. lisp/ChangeLog addition: 2009-11-08 Aidan Kehoe <kehoea@parhasard.net> * cl-extra.el (cl-string-vector-equalp) (cl-bit-vector-vector-equalp, cl-vector-array-equalp) (cl-hash-table-contents-equalp): New functions, to implement equalp treating arrays with identical contents as equivalent, as specified by Common Lisp. (equalp): Revise this function to implement array equivalence, and the hash-table equalp behaviour specified by CL. * cl-macs.el (equalp): Add a compiler macro for this function, used when one of the arguments is constant, and as such, its type is known at compile time. man/ChangeLog addition: 2009-11-08 Aidan Kehoe <kehoea@parhasard.net> * lispref/objects.texi (Equality Predicates): Document #'equalp here, as well as #'equal and #'eq. tests/ChangeLog addition: 2009-12-31 Aidan Kehoe <kehoea@parhasard.net> * automated/lisp-tests.el: Test much of the functionality of equalp; add a pointer to Paul Dietz' ANSI test suite for this function, converted to Emacs Lisp. Not including the tests themselves in XEmacs because who owns the copyright on the files is unclear and the GCL people didn't respond to my queries.
author Aidan Kehoe <kehoea@parhasard.net>
date Thu, 31 Dec 2009 15:09:41 +0000
parents eb82fbb675ea
children 308d34e9f07d
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>
4021
cef5f57bb9e2 [xemacs-hg @ 2007-06-21 13:39:08 by aidan]
aidan
parents: 3008
diff changeset
6 ;; Date: $Date: 2007/06/21 13:39:10 $
cef5f57bb9e2 [xemacs-hg @ 2007-06-21 13:39:08 by aidan]
aidan
parents: 3008
diff changeset
7 ;; Version: $Revision: 1.15 $
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
3008
b34066456742 [xemacs-hg @ 2005-10-21 10:34:34 by stephent]
stephent
parents: 3006
diff changeset
27 ;;; Synched up with: XEmacs build package build-report.el Revision 1.49.
428
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-*\"\\([^\"]+\\)\"\\(
4419
eb82fbb675ea Use Mercurial changeset hash to identify build version.
Mike Sperber <sperber@deinprogramm.de>
parents: 4021
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)))
3006
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
321 (let ((destination-address
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
322 ;; `build-report-destination' used to be a single string, so
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
323 ;; let's test if we really get a list of destinations.
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
324 (if (listp build-report-destination)
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
325 (read-string
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
326 "Build Report Destination: "
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
327 (car build-report-destination)
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
328 'build-report-destination)
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
329 (read-string
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
330 "Build Report Destination: "
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
331 build-report-destination)
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
332 )))
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
333 (save-excursion
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
334 (build-report-create-report destination-address args))))
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
335
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
336 ;;;###autoload
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
337 (defun batch-build-report (&optional status destination)
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
338 "Format a build report. Save it as \"./BUILD-REPORT\".
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
339 If the file \"./BUILD-REPORT-COMMENT\" is readable, insert its contents.
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
340 Optional STATUS is a string to insert in the subject. It defaults to
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
341 \"Success\". \(This will be made customizable.)
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
342 Optional DESTINATION is a string containing the destination mailbox. It
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
343 defaults to \"XEmacs Build Reports <xemacs-buildreports@xemacs.org>\".
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
344 \(This will be made customizable.)
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
345 This function may be invoked as a command."
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
346 (interactive)
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
347 (unless (stringp status) (setq status "Success"))
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
348 (unless (stringp destination)
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
349 (setq destination "XEmacs Build Reports <xemacs-buildreports@xemacs.org>"))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
350 (save-excursion
3006
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
351 (build-report-create-report destination
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
352 ;; #### listify in the internal function?
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
353 (list status)))
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
354 (when (file-readable-p "BUILD-REPORT-COMMENT")
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
355 (insert-file "BUILD-REPORT-COMMENT"))
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
356 (write-file "BUILD-REPORT"))
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
357
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
358 (defun build-report-create-report (destination status)
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
359 "Format current buffer as an XEmacs build report to DESTINATION.
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
360
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
361 DESTINATION is the mailbox to which the report will be submitted.
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
362 STATUS is the status of the build.
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
363 You probably don't want to use this function; see `build-report' for the
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
364 interactive command, and `batch-build-report' for a command suitable for
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
365 use in shell scripts and Makefiles."
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
366 (if (file-exists-p build-report-installation-file)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
367 (multiple-value-bind
3006
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
368 (major minor beta codename extraname configuration)
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
369 (build-report-installation-data build-report-installation-file)
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
370 (setq build-report-subject
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
371 (format "[%%s] XEmacs %s.%s%s \"%s\" %s%s"
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
372 major minor beta codename extraname configuration)))
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
373 (multiple-value-bind
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
374 (major minor beta codename extraname)
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
375 (build-report-version-file-data build-report-version-file)
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
376 (setq build-report-subject
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
377 (format "[%%s] XEmacs %s.%s%s \"%s\" %s%s"
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
378 major minor beta codename extraname system-configuration))))
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
379 (compose-mail destination
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
380 (apply 'format build-report-subject status)
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
381 nil nil nil nil nil)
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
382 (let* ((report-begin (point))
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
383 (files (reverse (build-report-make-output-get)))
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
384 (file (car files)))
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
385 (while file
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
386 (if (file-exists-p file)
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
387 (insert (build-report-insert-make-output report-begin file))
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
388 (insert (format "%s not found!\n" file)))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
389 (insert "\n")
3006
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
390 (setq files (cdr files))
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
391 (setq file (car files)))
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
392 (if (file-exists-p build-report-installation-file)
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
393 (insert (build-report-insert-installation-file
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
394 report-begin
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
395 build-report-installation-insert-all))
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
396 (insert (format "%s not found!\n" build-report-installation-file)))
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
397 (insert "\n")
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
398 (insert (build-report-insert-header report-begin))
dcfb8ec6859a [xemacs-hg @ 2005-10-21 10:23:15 by stephent]
stephent
parents: 2976
diff changeset
399 (goto-char report-begin)))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
400
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
401 (defun build-report-insert-header (where)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
402 "Inserts the build-report-header at the point specified by `where'."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
403 (goto-char where)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
404 (with-temp-buffer
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
405 (insert
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
406 (format "
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
407 > XEmacs Build Report generated by emacs-version
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
408 > %s
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
409 > with system-configuration
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
410 > %s
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
411 > follows:\n\n" emacs-version system-configuration))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
412 (buffer-string)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
413
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
414 (defun build-report-insert-make-output (where file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
415 "Inserts the output of the XEmacs Beta make run in the
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
416 current buffer at position WHERE.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
417 The make process output must have been saved in
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
418 `build-report-make-output-files' during the XEmacs Beta building."
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
419 (goto-char where)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
420 (with-temp-buffer
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
421 (if (file-exists-p file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
422 (progn
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
423 (if (featurep 'mime-setup)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
424 (progn
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
425 (mime-edit-insert-tag
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
426 "text"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
427 "plain"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
428 (concat
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
429 "\nContent-Disposition: attachment;"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
430 " filename=\""
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
431 (file-name-nondirectory
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
432 file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
433 "\""))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
434 (mime-edit-insert-binary-file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
435 file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
436 build-report-file-encoding))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
437 (insert-file-contents file))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
438 (when build-report-keep-regexp
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
439 (goto-char (point-min))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
440 (delete-non-matching-lines (build-report-keep)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
441 (when build-report-delete-regexp
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
442 (goto-char (point-min))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
443 (delete-matching-lines (build-report-delete)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
444 (goto-char (point-min))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
445 (if build-report-keep-regexp
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
446 (insert
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
447 (format
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
448 "> keeping lines matching
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
449 > \"%s\"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
450 "
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
451 (build-report-keep))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
452 (if build-report-delete-regexp
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
453 (insert
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
454 (format
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
455 "> %sdeleting lines matching
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
456 > \"%s\"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
457 "
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
458 (if build-report-keep-regexp
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
459 "and then "
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
460 "")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
461 (build-report-delete))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
462 (insert "\n")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
463 (goto-char (point-min))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
464 (insert
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
465 (format "> Contents of %s\n" file)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
466 (insert "> " file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
467 " does not exist!\n\n"))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
468 (buffer-string)))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
469
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
470 (defun build-report-insert-installation-file (where all)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
471 "Inserts the contents of the `build-report-installation-file'
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
472 created by the XEmacs Beta configure process."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
473 (goto-char where)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
474 (with-temp-buffer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
475 (if (file-exists-p build-report-installation-file)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
476 (let (file-begin last-configure)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
477 (insert "> Contents of "
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
478 build-report-installation-file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
479 ":\n")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
480 (insert
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
481 (format
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
482 "> (Output from %s of ./configure)\n\n"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
483 (if all "all runs" "most recent run")))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
484 (if (featurep 'mime-setup)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
485 (progn
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
486 (mime-edit-insert-tag
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
487 "text"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
488 "plain"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
489 (concat
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
490 "\nContent-Disposition: attachment;"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
491 " filename=\""
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
492 (file-name-nondirectory
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
493 build-report-installation-file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
494 "\""))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
495 (mime-edit-insert-binary-file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
496 build-report-installation-file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
497 build-report-file-encoding)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
498 (setq file-begin (mime-edit-content-beginning)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
499 (setq file-begin (point))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
500 (insert-file-contents
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
501 build-report-installation-file))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
502 (unless all
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
503 (setq last-configure
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
504 (search-backward-regexp
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
505 "^\\(uname.*\\|osversion\\|OS\\):\\s-+" file-begin t))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
506 (if (and file-begin last-configure)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
507 (delete-region file-begin last-configure))))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
508 (insert "> " build-report-installation-file
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
509 " does not exist!\n\n"))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
510 (buffer-string)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
511
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
512 (defun build-report-keep ()
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
513 "Concatenate elements of `build-report-keep-regexp' and a general
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
514 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
515 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
516 (mapconcat #'identity
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
517 (cons "^--\\[\\[\\|\\]\\]$" build-report-keep-regexp) "\\|"))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
518
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
519 (defun build-report-delete ()
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
520 "Concatenate elements of `build-report-delete-regexp' and a general
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
521 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
522 REGEXPs in `build-report-delete-regexp' or a general MIME tag REGEXP."
4021
cef5f57bb9e2 [xemacs-hg @ 2007-06-21 13:39:08 by aidan]
aidan
parents: 3008
diff changeset
523 (mapconcat #'identity
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
524 build-report-delete-regexp "\\|"))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
525
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
526 (defun build-report-installation-data (&optional file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
527 "Return a list of XEmacs installation data containing MAJOR_NUMBER
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
528 MINOR_NUMBER BETA_STRING CODENAME CONFIGURATION SRCDIR from FILE,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
529 which defaults to `build-report-installation-file'."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
530 (interactive "fInstallation file: ")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
531 (unless file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
532 (setq file build-report-installation-file))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
533 (let
975
151d438d2d55 [xemacs-hg @ 2002-08-28 05:36:20 by youngs]
youngs
parents: 501
diff changeset
534 (major minor beta codename extraname configuration srcdir)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
535 (save-window-excursion
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
536 (find-file-read-only file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
537 (goto-char (point-min))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
538 (while (< (point) (point-max))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
539 (cond
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
540 ((looking-at build-report-installation-version-regexp)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
541 (goto-char (match-end 0))
2976
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
542 (setq major (or (match-string 1) ""))
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
543 (setq minor (or (match-string 2) ""))
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
544 (setq beta (or (match-string 3) ""))
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
545 (setq codename (or (match-string 6) ""))
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
546 (setq extraname (or (match-string 7) ""))
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
547 (setq configuration (or (match-string 8) "")))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
548 ((looking-at build-report-installation-srcdir-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 srcdir (or (match-string 1) "")))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
551 ;; We avoid matching a potentially zero-length string to avoid
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
552 ;; infinite looping.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
553 ((looking-at
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
554 "^.+$")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
555 (goto-char (match-end 0)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
556 ((looking-at "\n")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
557 (goto-char (match-end 0)))))
975
151d438d2d55 [xemacs-hg @ 2002-08-28 05:36:20 by youngs]
youngs
parents: 501
diff changeset
558 (values major minor (or beta "") codename extraname configuration srcdir))))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
559
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
560 (defun build-report-version-file-data (&optional file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
561 "Return a list of XEmacs version information containing
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
562 MAJOR_NUMBER MINOR_NUMBER BETA_STRING CODENAME from FILE, which
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
563 defaults to `build-report-version-file'."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
564 (interactive "fversion.sh file: ")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
565 (unless file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
566 (setq file build-report-version-file))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
567 (let
975
151d438d2d55 [xemacs-hg @ 2002-08-28 05:36:20 by youngs]
youngs
parents: 501
diff changeset
568 (major minor beta codename extraname)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
569 (save-window-excursion
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
570 (find-file-read-only file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
571 (goto-char (point-min))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
572 (while (< (point) (point-max))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
573 (cond
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
574 ((looking-at build-report-version-file-regexp)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
575 (goto-char (match-end 0))
2976
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
576 (setq major (or (match-string 1) ""))
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
577 (setq minor (or (match-string 2) ""))
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
578 (setq beta (or (match-string 3) ""))
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
579 (setq codename (or (match-string 4) ""))
0fb57d74601d [xemacs-hg @ 2005-10-05 04:11:24 by stephent]
stephent
parents: 975
diff changeset
580 (setq extraname (or (match-string 6) "")))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
581 ;; We avoid matching a potentially zero-length string to avoid
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
582 ;; infinite looping.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
583 ((looking-at
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
584 "^.+$")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
585 (goto-char (match-end 0)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
586 ((looking-at "\n")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
587 (goto-char (match-end 0)))))
975
151d438d2d55 [xemacs-hg @ 2002-08-28 05:36:20 by youngs]
youngs
parents: 501
diff changeset
588 (values major minor (or beta "") codename extraname))))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
589
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
590 ;;; build-report.el ends here