annotate lisp/build-report.el @ 235:85a06df23a9a r20-5b16

Import from CVS: tag r20-5b16
author cvs
date Mon, 13 Aug 2007 10:14:40 +0200
parents 262b8bb4a523
children f220cc83d72e
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
235
85a06df23a9a Import from CVS: tag r20-5b16
cvs
parents: 219
diff changeset
86 "confl.*with.*auto-inlining"
85a06df23a9a Import from CVS: tag r20-5b16
cvs
parents: 219
diff changeset
87 (concat (regexp-quote (gethash 'blddir (config-value-hash-table))) "/lisp/[^ \t\n]+ hides "))
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
88 "Regexp of make process output lines to delete from the report."
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
89 :type '(repeat regexp)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
90 :group 'build-report)
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
91
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
92 (defcustom build-report-make-output-file
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
93 (concat (gethash 'blddir (config-value-hash-table)) "/beta.err")
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
94 "Filename where stdout and stderr of XEmacs make process have been stored.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
95 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
96 output redirection. I use an alias
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
97 alias mk 'make \!* >>&\! \!$.err &'
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
98 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
99 :type 'file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
100 :group 'build-report)
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
101
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
102 (defcustom build-report-installation-file
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
103 (concat (gethash 'blddir (config-value-hash-table)) "/Installation")
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
104 "Installation file produced by XEmacs configure process."
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
105 :type 'file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
106 :group 'build-report)
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
107
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
108 (defcustom build-report-installation-insert-all nil
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
109 "Tell build-report to insert the whole Installation file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
110 instead of just the last report."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
111 :type 'boolean
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
112 :group 'build-report)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
113
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
114 (defcustom build-report-subject
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
115 (concat "[%s] " emacs-version " on " system-configuration)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
116 "XEmacs Build Report Subject Line. %s-sequences will be substituted
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
117 with user input through `build-report' according to
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
118 `build-report-prompts' using `format'."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
119 :type 'string
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
120 :group 'build-report)
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
121
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
122 (defcustom build-report-prompts
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
123 '(("Status?: " "Success" "Failure"))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
124 "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
125 lists used by `build-report' in conjunction with
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
126 `build-report-subject'. Each list consists of a prompt string
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
127 followed by any number of strings which can be chosen via the history
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
128 mechanism."
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
129 :group 'build-report)
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
130
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
131 (defcustom build-report-file-encoding
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
132 "7bit"
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
133 "XEmacs Build Report File Encoding to be used when MIME support is
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
134 available."
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
135 :group 'build-report)
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
136
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
137 ;; Symbol Name mappings from TM to SEMI serving as Compatibility
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
138 ;; Bandaid
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
139 (when (featurep 'mime-setup)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
140 ;; No (defvaralias ...) so far. Thanks to "Didier Verna"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
141 ;; <verna@inf.enst.fr> for reporting my incorrect defvaraliasing of
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
142 ;; `mime-editor/insert-tag'.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
143 ;; Thanks to Jens-Ulrik Holger Petersen
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
144 ;; <petersen@kurims.kyoto-u.ac.jp> for suggesting the conditional
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
145 ;; aliasing of SEMI functions.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
146 (unless (fboundp 'mime-edit-content-beginning)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
147 (defalias 'mime-edit-content-beginning 'mime-editor/content-beginning))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
148 (unless (fboundp 'mime-edit-insert-tag)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
149 (defalias 'mime-edit-insert-tag 'mime-editor/insert-tag))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
150 (unless (fboundp 'mime-edit-insert-binary-file)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
151 (defalias 'mime-edit-insert-binary-file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
152 'mime-editor/insert-binary-file)))
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
153
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
154 (defun build-report (&rest args)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
155 "Initializes a fresh mail composition buffer using `compose-mail'
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
156 with the contents of XEmacs Installation file and excerpts from XEmacs
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
157 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
158 See also
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
159 `compose-mail', `mail-user-agent',
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
160 `build-report-destination',
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
161 `build-report-keep-regexp',
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
162 `build-report-delete-regexp',
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
163 `build-report-make-output-file' and
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
164 `build-report-installation-file'."
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
165 (interactive
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
166 (let (prompt
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
167 hist
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
168 arg
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
169 (prompts build-report-prompts))
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
170 (progn
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
171 (while prompts
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
172 (setq prompt (caar prompts))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
173 (setq hist (cdar prompts))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
174 (setq prompts (cdr prompts))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
175 (setq arg (cons (read-string prompt "" 'hist) arg)))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
176 arg)))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
177 (save-excursion
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
178 (compose-mail
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
179 build-report-destination
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
180 (apply 'format build-report-subject args)
217
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
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
185 nil)
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
186 (let ((report-begin (point)))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
187 (insert (build-report-insert-make-output report-begin))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
188 (insert (build-report-insert-installation-file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
189 report-begin
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
190 build-report-installation-insert-all))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
191 (insert (build-report-insert-header report-begin))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
192 (goto-char report-begin))))
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
193
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
194 (defun build-report-insert-header (where)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
195 "Inserts the build-report-header at the point specified by `where'."
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
196 (goto-char where)
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
197 (with-temp-buffer
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
198 (insert "\n> XEmacs Build Report as generated\n> by"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
199 " build-report-version "
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
200 build-report-version " follows:\n\n")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
201 (buffer-string)))
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
202
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
203 (defun build-report-insert-make-output (where)
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
204 "Inserts the output of the XEmacs Beta make run.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
205 The make process output must have been saved in
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
206 `build-report-make-output-file' during the XEmacs Beta building."
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
207 (goto-char where)
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
208 (with-temp-buffer
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
209 (if (file-exists-p build-report-make-output-file)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
210 (progn
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
211 (if (featurep 'mime-setup)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
212 (progn
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
213 (mime-edit-insert-tag
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
214 "text"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
215 "plain"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
216 (concat
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
217 "\nContent-Disposition: attachment;"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
218 " filename=\""
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
219 (file-name-nondirectory
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
220 build-report-make-output-file)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
221 "\""))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
222 (mime-edit-insert-binary-file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
223 build-report-make-output-file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
224 build-report-file-encoding))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
225 (insert-file-contents build-report-make-output-file))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
226 (goto-char (point-min))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
227 (delete-non-matching-lines (build-report-keep))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
228 (goto-char (point-min))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
229 (delete-matching-lines (build-report-delete))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
230 (goto-char (point-min))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
231 (insert "> Contents of "
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
232 build-report-make-output-file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
233 "\n> keeping lines matching\n> \""
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
234 (build-report-keep)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
235 "\"\n> and then deleting lines matching\n> \""
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
236 (build-report-delete)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
237 "\"\n\n"))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
238 (insert "> " build-report-make-output-file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
239 " does not exist!\n\n"))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
240 (buffer-string)))
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
241
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
242 (defun build-report-insert-installation-file (where all)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
243 "Inserts the contents of the `build-report-installation-file'
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
244 created by the XEmacs Beta configure process."
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
245 (goto-char where)
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
246 (with-temp-buffer
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
247 (if (file-exists-p build-report-installation-file)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
248 (let (file-begin last-configure)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
249 (insert "> Contents of "
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
250 build-report-installation-file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
251 ":\n")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
252 (insert
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
253 (format
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
254 "> (Output from %s of ./configure)\n\n"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
255 (if all "all runs" "most recent run")))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
256 (if (featurep 'mime-setup)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
257 (progn
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
258 (mime-edit-insert-tag
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
259 "text"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
260 "plain"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
261 (concat
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
262 "\nContent-Disposition: attachment;"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
263 " filename=\""
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
264 (file-name-nondirectory
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
265 build-report-installation-file)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
266 "\""))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
267 (mime-edit-insert-binary-file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
268 build-report-installation-file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
269 build-report-file-encoding)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
270 (setq file-begin (mime-edit-content-beginning)))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
271 (setq file-begin (point))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
272 (insert-file-contents
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
273 build-report-installation-file))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
274 (unless all
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
275 (setq last-configure
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
276 (search-backward-regexp
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
277 "^\\(uname.*\\|osversion\\):\\s-+" file-begin t))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
278 (if (and file-begin last-configure)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
279 (delete-region file-begin last-configure))))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
280 (insert "> " build-report-installation-file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
281 " does not exist!\n\n"))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
282 (buffer-string)))
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
283
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
284 (defun build-report-keep ()
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
285 "build-report-internal fuction of no general value."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
286 (mapconcat '(lambda (item) item)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
287 (cons "^--\\[\\[\\|\\]\\]$" build-report-keep-regexp) "\\|"))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
288
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
289 (defun build-report-delete ()
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
290 "build-report-internal fuction of no general value."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
291 (mapconcat '(lambda (item) item)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
292 build-report-delete-regexp "\\|"))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
293
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents: 217
diff changeset
294 ;;; build-report.el ends here