annotate lisp/build-report.el @ 219:262b8bb4a523 r20-4b8

Import from CVS: tag r20-4b8
author cvs
date Mon, 13 Aug 2007 10:09:35 +0200
parents d44af0c54775
children 85a06df23a9a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
1 ;;; build-report.el --- Automatically formatted build reports for XEmacs
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
2
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
3 ;; Copyright (C) 1997 Adrian Aichner
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
4
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
5 ;; Author: Adrian Aichner, Teradyne GmbH Munich <aichner@ecf.teradyne.com>
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
6 ;; Date: Sun., Apr. 20, 1997.
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
7 ;; Version: 1.35
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
8 ;; Keywords: internal
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
9
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
10 ;; This file is part of XEmacs.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
11
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
12 ;; XEmacs is free software; you can redistribute it and/or modify
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
13 ;; it under the terms of the GNU General Public License as published by
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
14 ;; the Free Software Foundation; either version 2, or (at your option)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
15 ;; any later version.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
16
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
17 ;; XEmacs is distributed in the hope that it will be useful, but
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
18 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
20 ;; General Public License for more details.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
21
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
22 ;; You should have received a copy of the GNU General Public License
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
23 ;; along with XEmacs; see the file COPYING. If not, write to the Free
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
24 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
25 ;; 02111-1307, USA.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
26
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
27 ;;; Synched up with: Not synched.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
28
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
29 ;;; Commentary:
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
30
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
31 ;; The Idea:
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
32 ;; Let XEmacs report interesting aspects of how it was built.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
33
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
34 ;; The Concept:
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
35 ;; User creates an XEmacs Build Report by just calling
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
36 ;; M-x build-report
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
37 ;; which will initialize a mail buffer with relevant information
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
38 ;; derived from the XEmacs build process. Point is left at the
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
39 ;; beginning of the report for user to input some personal notes and
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
40 ;; send the report.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
41
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
42 ;; The Status:
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
43 ;; This is the first `Proof of Concept'.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
44
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
45 ;; The Author:
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
46 ;; Adrian Aichner, Teradyne GmbH Munich, Sun., Apr. 20, 1997.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
47
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
48 ;;; Code:
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
49
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
50 (require 'config)
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
51 (provide 'build-report)
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
52
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
53 ;; Due to recommandation by developers on xemacs-beta@xemacs.org,
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
54 ;; release versions are to be checked out using `co -u -kv ...'.
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
55 (defconst build-report-version
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
56 "1.35"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
57 "Version number of build-report.")
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
58
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
59 (defgroup build-report nil
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
60 "Package automating the process of sending XEmacs Build Reports."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
61 :group 'build)
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
62
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
63 (defcustom build-report-destination
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
64 "xemacs-beta@xemacs.org"
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
65 "The mail address XEmacs Build Reports should go to."
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
66 :type 'string
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
67 :group 'build-report)
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
68
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
69 (defcustom build-report-keep-regexp
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
70 (list
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
71 "make\\["
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
72 "error"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
73 "warn"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
74 "pure.*\\(space\\|size\\)"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
75 "hides\\b"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
76 "strange"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
77 "shadowings"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
78 "^Compilation"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
79 "not\\s-+found")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
80 "Regexp of make process output lines to keep in the report."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
81 :type '(repeat regexp)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
82 :group 'build-report)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
83
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
84 (defcustom build-report-delete-regexp
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
85 (list
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
86 "confl.*with.*auto-inlining")
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
87 "Regexp of make process output lines to delete from the report."
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
88 :type '(repeat regexp)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
89 :group 'build-report)
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
90
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
91 (defcustom build-report-make-output-file
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
92 (concat (gethash 'blddir (config-value-hash-table)) "/beta.err")
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
93 "Filename where stdout and stderr of XEmacs make process have been stored.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
94 mk.err will not be created automatically. You'll have to run make with
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
95 output redirection. I use an alias
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
96 alias mk 'make \!* >>&\! \!$.err &'
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
97 for that, so that I get beta.err went I run `mk beta'."
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
98 :type 'file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
99 :group 'build-report)
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
100
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
101 (defcustom build-report-installation-file
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
102 (concat (gethash 'blddir (config-value-hash-table)) "/Installation")
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
103 "Installation file produced by XEmacs configure process."
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
104 :type 'file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
105 :group 'build-report)
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
106
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
107 (defcustom build-report-installation-insert-all nil
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
108 "Tell build-report to insert the whole Installation file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
109 instead of just the last report."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
110 :type 'boolean
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
111 :group 'build-report)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
112
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
113 (defcustom build-report-subject
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
114 (concat "[%s] " emacs-version " on " system-configuration)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
115 "XEmacs Build Report Subject Line. %s-sequences will be substituted
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
116 with user input through `build-report' according to
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
117 `build-report-prompts' using `format'."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
118 :type 'string
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
119 :group 'build-report)
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
120
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
121 (defcustom build-report-prompts
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
122 '(("Status?: " "Success" "Failure"))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
123 "XEmacs Build Report Prompt(s). This is a list of prompt-string
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
124 lists used by `build-report' in conjunction with
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
125 `build-report-subject'. Each list consists of a prompt string
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
126 followed by any number of strings which can be chosen via the history
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
127 mechanism."
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
128 :group 'build-report)
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
129
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
130 (defcustom build-report-file-encoding
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
131 "7bit"
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
132 "XEmacs Build Report File Encoding to be used when MIME support is
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
133 available."
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
134 :group 'build-report)
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
135
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
136 ;; Symbol Name mappings from TM to SEMI serving as Compatibility
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
137 ;; Bandaid
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
138 (when (featurep 'mime-setup)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
139 ;; No (defvaralias ...) so far. Thanks to "Didier Verna"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
140 ;; <verna@inf.enst.fr> for reporting my incorrect defvaraliasing of
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
141 ;; `mime-editor/insert-tag'.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
142 ;; Thanks to Jens-Ulrik Holger Petersen
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
143 ;; <petersen@kurims.kyoto-u.ac.jp> for suggesting the conditional
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
144 ;; aliasing of SEMI functions.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
145 (unless (fboundp 'mime-edit-content-beginning)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
146 (defalias 'mime-edit-content-beginning 'mime-editor/content-beginning))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
147 (unless (fboundp 'mime-edit-insert-tag)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
148 (defalias 'mime-edit-insert-tag 'mime-editor/insert-tag))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
149 (unless (fboundp 'mime-edit-insert-binary-file)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
150 (defalias 'mime-edit-insert-binary-file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
151 'mime-editor/insert-binary-file)))
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
152
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
153 (defun build-report (&rest args)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
154 "Initializes a fresh mail composition buffer using `compose-mail'
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
155 with the contents of XEmacs Installation file and excerpts from XEmacs
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
156 make output and errors and leaves point at the beginning of the mail text.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
157 See also
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
158 `compose-mail', `mail-user-agent',
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
159 `build-report-destination',
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
160 `build-report-keep-regexp',
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
161 `build-report-delete-regexp',
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
162 `build-report-make-output-file' and
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
163 `build-report-installation-file'."
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
164 (interactive
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
165 (let (prompt
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
166 hist
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
167 arg
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
168 (prompts build-report-prompts))
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
169 (progn
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
170 (while prompts
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
171 (setq prompt (caar prompts))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
172 (setq hist (cdar prompts))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
173 (setq prompts (cdr prompts))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
174 (setq arg (cons (read-string prompt "" 'hist) arg)))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
175 arg)))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
176 (save-excursion
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
177 (compose-mail
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
178 build-report-destination
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
179 (apply 'format build-report-subject args)
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
180 nil
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
181 nil
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
182 nil
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
183 nil
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
184 nil)
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
185 (let ((report-begin (point)))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
186 (insert (build-report-insert-make-output report-begin))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
187 (insert (build-report-insert-installation-file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
188 report-begin
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
189 build-report-installation-insert-all))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
190 (insert (build-report-insert-header report-begin))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
191 (goto-char report-begin))))
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
192
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
193 (defun build-report-insert-header (where)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
194 "Inserts the build-report-header at the point specified by `where'."
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
195 (goto-char where)
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
196 (with-temp-buffer
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
197 (insert "\n> XEmacs Build Report as generated\n> by"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
198 " build-report-version "
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
199 build-report-version " follows:\n\n")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
200 (buffer-string)))
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
201
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
202 (defun build-report-insert-make-output (where)
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
203 "Inserts the output of the XEmacs Beta make run.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
204 The make process output must have been saved in
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
205 `build-report-make-output-file' during the XEmacs Beta building."
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
206 (goto-char where)
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
207 (with-temp-buffer
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
208 (if (file-exists-p build-report-make-output-file)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
209 (progn
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
210 (if (featurep 'mime-setup)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
211 (progn
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
212 (mime-edit-insert-tag
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
213 "text"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
214 "plain"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
215 (concat
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
216 "\nContent-Disposition: attachment;"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
217 " filename=\""
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
218 (file-name-nondirectory
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
219 build-report-make-output-file)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
220 "\""))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
221 (mime-edit-insert-binary-file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
222 build-report-make-output-file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
223 build-report-file-encoding))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
224 (insert-file-contents build-report-make-output-file))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
225 (goto-char (point-min))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
226 (delete-non-matching-lines (build-report-keep))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
227 (goto-char (point-min))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
228 (delete-matching-lines (build-report-delete))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
229 (goto-char (point-min))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
230 (insert "> Contents of "
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
231 build-report-make-output-file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
232 "\n> keeping lines matching\n> \""
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
233 (build-report-keep)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
234 "\"\n> and then deleting lines matching\n> \""
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
235 (build-report-delete)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
236 "\"\n\n"))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
237 (insert "> " build-report-make-output-file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
238 " does not exist!\n\n"))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
239 (buffer-string)))
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
240
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
241 (defun build-report-insert-installation-file (where all)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
242 "Inserts the contents of the `build-report-installation-file'
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
243 created by the XEmacs Beta configure process."
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
244 (goto-char where)
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
245 (with-temp-buffer
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
246 (if (file-exists-p build-report-installation-file)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
247 (let (file-begin last-configure)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
248 (insert "> Contents of "
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
249 build-report-installation-file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
250 ":\n")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
251 (insert
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
252 (format
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
253 "> (Output from %s of ./configure)\n\n"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
254 (if all "all runs" "most recent run")))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
255 (if (featurep 'mime-setup)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
256 (progn
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
257 (mime-edit-insert-tag
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
258 "text"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
259 "plain"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
260 (concat
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
261 "\nContent-Disposition: attachment;"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
262 " filename=\""
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
263 (file-name-nondirectory
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
264 build-report-installation-file)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
265 "\""))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
266 (mime-edit-insert-binary-file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
267 build-report-installation-file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
268 build-report-file-encoding)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
269 (setq file-begin (mime-edit-content-beginning)))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
270 (setq file-begin (point))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
271 (insert-file-contents
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
272 build-report-installation-file))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
273 (unless all
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
274 (setq last-configure
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
275 (search-backward-regexp
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
276 "^\\(uname.*\\|osversion\\):\\s-+" file-begin t))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
277 (if (and file-begin last-configure)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
278 (delete-region file-begin last-configure))))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
279 (insert "> " build-report-installation-file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
280 " does not exist!\n\n"))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
281 (buffer-string)))
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
282
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
283 (defun build-report-keep ()
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
284 "build-report-internal fuction of no general value."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
285 (mapconcat '(lambda (item) item)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
286 (cons "^--\\[\\[\\|\\]\\]$" build-report-keep-regexp) "\\|"))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
287
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
288 (defun build-report-delete ()
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
289 "build-report-internal fuction of no general value."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
290 (mapconcat '(lambda (item) item)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
291 build-report-delete-regexp "\\|"))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
292
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
293 ;;; build-report.el ends here