annotate lisp/build-report.el @ 826:6728e641994e

[xemacs-hg @ 2002-05-05 11:30:15 by ben] syntax cache, 8-bit-format, lots of code cleanup README.packages: Update info about --package-path. i.c: Create an inheritable event and pass it on to XEmacs, so that ^C can be handled properly. Intercept ^C and signal the event. "Stop Build" in VC++ now works. bytecomp-runtime.el: Doc string changes. compat.el: Some attempts to redo this to make it truly useful and fix the "multiple versions interacting with each other" problem. Not yet done. Currently doesn't work. files.el: Use with-obsolete-variable to avoid warnings in new revert-buffer code. xemacs.mak: Split up CFLAGS into a version without flags specifying the C library. The problem seems to be that minitar depends on zlib, which depends specifically on libc.lib, not on any of the other C libraries. Unless you compile with libc.lib, you get errors -- specifically, no _errno in the other libraries, which must make it something other than an int. (#### But this doesn't seem to obtain in XEmacs, which also uses zlib, and can be linked with any of the C libraries. Maybe zlib is used differently and doesn't need errno, or maybe XEmacs provides an int errno; ... I don't understand. Makefile.in.in: Fix so that packages are around when testing. abbrev.c, alloc.c, buffer.c, buffer.h, bytecode.c, callint.c, casefiddle.c, casetab.c, casetab.h, charset.h, chartab.c, chartab.h, cmds.c, console-msw.h, console-stream.c, console-x.c, console.c, console.h, data.c, device-msw.c, device.c, device.h, dialog-msw.c, dialog-x.c, dired-msw.c, dired.c, doc.c, doprnt.c, dumper.c, editfns.c, elhash.c, emacs.c, eval.c, event-Xt.c, event-gtk.c, event-msw.c, event-stream.c, events.c, events.h, extents.c, extents.h, faces.c, file-coding.c, file-coding.h, fileio.c, fns.c, font-lock.c, frame-gtk.c, frame-msw.c, frame-x.c, frame.c, frame.h, glade.c, glyphs-gtk.c, glyphs-msw.c, glyphs-msw.h, glyphs-x.c, glyphs.c, glyphs.h, gui-msw.c, gui-x.c, gui.h, gutter.h, hash.h, indent.c, insdel.c, intl-win32.c, intl.c, keymap.c, lisp-disunion.h, lisp-union.h, lisp.h, lread.c, lrecord.h, lstream.c, lstream.h, marker.c, menubar-gtk.c, menubar-msw.c, menubar-x.c, menubar.c, minibuf.c, mule-ccl.c, mule-charset.c, mule-coding.c, mule-wnnfns.c, nas.c, objects-msw.c, objects-x.c, opaque.c, postgresql.c, print.c, process-nt.c, process-unix.c, process.c, process.h, profile.c, rangetab.c, redisplay-gtk.c, redisplay-msw.c, redisplay-output.c, redisplay-x.c, redisplay.c, redisplay.h, regex.c, regex.h, scrollbar-msw.c, search.c, select-x.c, specifier.c, specifier.h, symbols.c, symsinit.h, syntax.c, syntax.h, syswindows.h, tests.c, text.c, text.h, tooltalk.c, ui-byhand.c, ui-gtk.c, unicode.c, win32.c, window.c: Another big Ben patch. -- FUNCTIONALITY CHANGES: add partial support for 8-bit-fixed, 16-bit-fixed, and 32-bit-fixed formats. not quite done yet. (in particular, needs functions to actually convert the buffer.) NOTE: lots of changes to regex.c here. also, many new *_fmt() inline funs that take an Internal_Format argument. redo syntax cache code. make the cache per-buffer; keep the cache valid across calls to functions that use it. also keep it valid across insertions/deletions and extent changes, as much as is possible. eliminate the junky regex-reentrancy code by passing in the relevant lisp info to the regex routines as local vars. add general mechanism in extents code for signalling extent changes. fix numerous problems with the case-table implementation; yoshiki never properly transferred many algorithms from old-style to new-style case tables. redo char tables to support a default argument, so that mapping only occurs over changed args. change many chartab functions to accept Lisp_Object instead of Lisp_Char_Table *. comment out the code in font-lock.c by default, because font-lock.el no longer uses it. we should consider eliminating it entirely. Don't output bell as ^G in console-stream when not a TTY. add -mswindows-termination-handle to interface with i.c, so we can properly kill a build. add more error-checking to buffer/string macros. add some additional buffer_or_string_() funs. -- INTERFACE CHANGES AFFECTING MORE CODE: switch the arguments of write_c_string and friends to be consistent with write_fmt_string, which must have printcharfun first. change BI_* macros to BYTE_* for increased clarity; similarly for bi_* local vars. change VOID_TO_LISP to be a one-argument function. eliminate no-longer-needed CVOID_TO_LISP. -- char/string macro changes: rename MAKE_CHAR() to make_emchar() for slightly less confusion with make_char(). (The former generates an Emchar, the latter a Lisp object. Conceivably we should rename make_char() -> wrap_char() and similarly for make_int(), make_float().) Similar changes for other *CHAR* macros -- we now consistently use names with `emchar' whenever we are working with Emchars. Any remaining name with just `char' always refers to a Lisp object. rename macros with XSTRING_* to string_* except for those that reference actual fields in the Lisp_String object, following conventions used elsewhere. rename set_string_{data,length} macros (the only ones to work with a Lisp_String_* instead of a Lisp_Object) to set_lispstringp_* to make the difference clear. try to be consistent about caps vs. lowercase in macro/inline-fun names for chars and such, which wasn't the case before. we now reserve caps either for XFOO_ macros that reference object fields (e.g. XSTRING_DATA) or for things that have non-function semantics, e.g. directly modifying an arg (BREAKUP_EMCHAR) or evaluating an arg (any arg) more than once. otherwise, use lowercase. here is a summary of most of the macros/inline funs changed by all of the above changes: BYTE_*_P -> byte_*_p XSTRING_BYTE -> string_byte set_string_data/length -> set_lispstringp_data/length XSTRING_CHAR_LENGTH -> string_char_length XSTRING_CHAR -> string_emchar INTBYTE_FIRST_BYTE_P -> intbyte_first_byte_p INTBYTE_LEADING_BYTE_P -> intbyte_leading_byte_p charptr_copy_char -> charptr_copy_emchar LEADING_BYTE_* -> leading_byte_* CHAR_* -> EMCHAR_* *_CHAR_* -> *_EMCHAR_* *_CHAR -> *_EMCHAR CHARSET_BY_ -> charset_by_* BYTE_SHIFT_JIS* -> byte_shift_jis* BYTE_BIG5* -> byte_big5* REP_BYTES_BY_FIRST_BYTE -> rep_bytes_by_first_byte char_to_unicode -> emchar_to_unicode valid_char_p -> valid_emchar_p Change intbyte_strcmp -> qxestrcmp_c (duplicated functionality). -- INTERFACE CHANGES AFFECTING LESS CODE: use DECLARE_INLINE_HEADER in various places. remove '#ifdef emacs' from XEmacs-only files. eliminate CHAR_TABLE_VALUE(), which duplicated the functionality of get_char_table(). add BUFFER_TEXT_LOOP to simplify iterations over buffer text. define typedefs for signed and unsigned types of fixed sizes (INT_32_BIT, UINT_32_BIT, etc.). create ALIGN_FOR_TYPE as a higher-level interface onto ALIGN_SIZE; fix code to use it. add charptr_emchar_len to return the text length of the character pointed to by a ptr; use it in place of charcount_to_bytecount(..., 1). add emchar_len to return the text length of a given character. add types Bytexpos and Charxpos to generalize Bytebpos/Bytecount and Charbpos/Charcount, in code (particularly, the extents code and redisplay code) that works with either kind of index. rename redisplay struct params with names such as `charbpos' to e.g. `charpos' when they are e.g. a Charxpos, not a Charbpos. eliminate xxDEFUN in place of DEFUN; no longer necessary with changes awhile back to doc.c. split up big ugly combined list of EXFUNs in lisp.h on a file-by-file basis, since other prototypes are similarly split. rewrite some "*_UNSAFE" macros as inline funs and eliminate the _UNSAFE suffix. move most string code from lisp.h to text.h; the string code and text.h code is now intertwined in such a fashion that they need to be in the same place and partially interleaved. (you can't create forward references for inline funs) automated/lisp-tests.el, automated/symbol-tests.el, automated/test-harness.el: Fix test harness to output FAIL messages to stderr when in batch mode. Fix up some problems in lisp-tests/symbol-tests that were causing spurious failures.
author ben
date Sun, 05 May 2002 11:33:57 +0000
parents 0a255b32b157
children 151d438d2d55
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
501
0a255b32b157 [xemacs-hg @ 2001-05-03 21:08:39 by adrian]
adrian
parents: 468
diff changeset
3 ;; Copyright (C) 1997-2001 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>
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 ;; Keywords: internal
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 ;; This file is part of XEmacs.
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 ;; XEmacs is free software; you can redistribute it and/or modify
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 ;; 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
12 ;; the Free Software Foundation; either version 2, or (at your option)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 ;; any later version.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 ;; XEmacs is distributed in the hope that it will be useful, but
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 ;; General Public License for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 ;; You should have received a copy of the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 ;; 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
22 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 ;; 02111-1307, USA.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 ;;; Synched up with: Not synched.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 ;;; Commentary:
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 ;; The Idea:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 ;; Let XEmacs report interesting aspects of how it was built.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 ;; The Concept:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 ;; User creates an XEmacs Build Report by just calling
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 ;; M-x build-report
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 ;; which will initialize a mail buffer with relevant information
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 ;; derived from the XEmacs build process. Point is left at the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 ;; beginning of the report for user to input some personal notes and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 ;; send the report.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 ;; The Status:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 ;; This is the first `Proof of Concept'.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 ;; The Author:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 ;; Adrian Aichner, Teradyne GmbH Munich, Sun., Apr. 20, 1997.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 ;;; Code:
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 (require 'config)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
49 (require 'custom)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
50 (require 'cl)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 (provide 'build-report)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
53 ;;; Constant definitions used internally by `build-report'. These are not
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
54 ;;; anticipated to be changed by users of `build-report'.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
55 ;;; 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
56 ;;; it after `build-report' has been loaded (not just required). Please
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
57 ;;; 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
58 ;;; need to do this.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
59 (defconst build-report-installation-version-regexp
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
60 "XEmacs\\s-+\\([0-9]+\\)\\.\\([0-9]+\\)\\(\\(-b\\|\\.\\)\\([0-9]+\\)\\)?\\s-+\\\\?\"\\([^\\\"]+\\)\\\\?\"\\s-+configured\\s-+for\\s-+`\\(.+\\)'\\."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
61 "*REGEXP matching XEmacs Beta Version string in
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
62 `build-report-installation-file' file. This variable is used by
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
63 `build-report-installation-data'.")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
64
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
65 (defconst build-report-version-file-regexp
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
66 "emacs_major_version\\s-*=\\s-*\\([0-9]+\\)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
67 emacs_minor_version\\s-*=\\s-*\\([0-9]+\\)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
68 emacs_beta_version\\s-*=\\s-*\\([0-9]+\\)?
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
69 xemacs_codename\\s-*=\\s-*\"\\([^\"]+\\)\""
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
70 "*REGEXP matching XEmacs Beta Version variable assignments in
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
71 `build-report-version-file' file. This variable is used by
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
72 `build-report-version-file-data'.")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
73
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
74 (defconst build-report-installation-srcdir-regexp
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
75 "\\s-*Where should the build process find the source code\\?\\s-*\\(.*\\)$"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
76 "REGEXP matching XEmacs Beta srcdir as the first substring match in
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
77 `build-report-installation-file' file. This variable is used by
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
78 `build-report-installation-data'.")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
79
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
80 ;;; Customization support for build-report starts here.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 (defgroup build-report nil
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
83 "Standardizes the Creation of XEmacs Build Reports."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
84 :load 'build-report
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 :group 'build)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 (defcustom build-report-destination
460
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
88 (list
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
89 "XEmacs Build Reports List <xemacs-buildreports@xemacs.org>"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
90 "XEmacs Beta List <xemacs-beta@xemacs.org>")
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
91 "*The list of mail addresses XEmacs Build Reports should most likely
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
92 go to."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
93 :type '(repeat
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
94 :custom-show t
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
95 :documentation-shown t
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
96 string)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 :group 'build-report)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 (defcustom build-report-keep-regexp
460
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
100 (list
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
101 "^\\(cd\\|n?make\\)\\s-"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
102 "errors?"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
103 "warnings?"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
104 "pure.*\\(space\\|size\\)"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
105 "hides\\b"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
106 "strange"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
107 "shadowings"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
108 "^Compil\\(ing\\s-+in\\|ation\\)"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
109 "^Using"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
110 "not\\s-+found"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
111 "^While\\s-+compiling.*\\(\n\\s-+.+\\)*"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
112 "^Note:"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
113 "Installing"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
114 "[Ff]ile(s) copied"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
115 "\\s-+tests\\s-+")
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
116 "*Regexp of make process output lines to keep in the report."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
117 :type '(repeat
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
118 :custom-show t
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
119 :documentation-shown t
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
120 regexp)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 :group 'build-report)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 (defcustom build-report-delete-regexp
460
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
124 (list
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
125 "confl.*with.*auto-inlining"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
126 "^Formatting:"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
127 "(100%) tests successful")
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
128 "*Regexp of make process output lines to delete from the report."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
129 :type '(repeat
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
130 :custom-show t
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
131 :documentation-shown t
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
132 regexp)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133 :group 'build-report)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
135 (defcustom build-report-make-output-dir
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
136 (cond
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
137 ((equal system-type 'windows-nt)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
138 (expand-file-name "nt"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
139 (gethash 'blddir (config-value-hash-table))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
140 (t
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
141 (gethash 'blddir (config-value-hash-table))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
142 "*Directory where the build report file is found.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
143 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
144 the XEmacs build directory."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
145 :type '(directory
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
146 :custom-show t
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
147 :documentation-shown t)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
148 :group 'build-report)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
149
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
150 (defcustom build-report-make-output-files
460
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
151 (list
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
152 "beta.err"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
153 "xemacs-make-all.err"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
154 "xemacs-make-check-temacs.err"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
155 "xemacs-make-check.err"
223736d75acb Import from CVS: tag r21-2-45
cvs
parents: 442
diff changeset
156 "xemacs-make-install.err")
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
157 "*List of Filenames where stdout and stderr of XEmacs make process
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
158 have been stored. These are relative to
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
159 `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
160 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
161 may use following alias
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
162
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163 alias mk 'make \!* >>&\! \!$.err &'
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
164
501
0a255b32b157 [xemacs-hg @ 2001-05-03 21:08:39 by adrian]
adrian
parents: 468
diff changeset
165 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
166 :type '(repeat
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
167 :custom-show t
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
168 :documentation-shown t
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
169 file)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170 :group 'build-report)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172 (defcustom build-report-installation-file
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
173 (expand-file-name "Installation"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
174 (gethash 'blddir (config-value-hash-table)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
175 "*Installation file produced by XEmacs configure process."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
176 :type '(file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
177 :custom-show t
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
178 :documentation-shown t)
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
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
181 (defcustom build-report-version-file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
182 (expand-file-name
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
183 "version.sh"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
184 (gethash 'blddir (config-value-hash-table)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
185 "*version.sh file identifying XEmacs (Beta) Distribution."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
186 :type '(file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
187 :custom-show t
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
188 :documentation-shown t)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
189 :group 'build-report)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
190
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
191 (defcustom build-report-installation-insert-all
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
192 nil
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
193 "*Tell build-report to insert the whole Installation file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
194 instead of just the last report."
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195 :type 'boolean
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196 :group 'build-report)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
198 (defcustom build-report-subject
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199 (concat "[%s] " emacs-version " on " system-configuration)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
200 "*XEmacs Build Report Subject Line. %s-sequences will be substituted
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
201 with user input through `build-report' according to
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
202 `build-report-prompts' using `format'."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
203 :type '(string
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
204 :custom-show t
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
205 :documentation-shown t)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206 :group 'build-report)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
208 (defcustom build-report-prompts
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
209 (quote (("Status?: " ("Success" "Failure"))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
210 "*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
211 lists used by `build-report' in conjunction with
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
212 `build-report-subject'. Each list consists of a prompt string
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
213 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
214 mechanism."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
215 :type '(repeat
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
216 :custom-show t
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
217 :documentation-shown t
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
218 (list
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
219 :tag "Prompt"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
220 string
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
221 (repeat
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
222 :tag "Values"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
223 string)))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224 :group 'build-report)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
226 (defcustom build-report-file-encoding
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227 "7bit"
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
228 "*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
229 available."
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
230 :group 'build-report)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
231
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
232 ;; Symbol Name mappings from TM to SEMI serving as Compatibility
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
233 ;; Bandaid
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
234 (when (featurep 'mime-setup)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
235 ;; No (defvaralias ...) so far. Thanks to "Didier Verna"
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
236 ;; <didier@xemacs.org> for reporting my incorrect defvaraliasing of
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
237 ;; `mime-editor/insert-tag'.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238 ;; Thanks to Jens-Ulrik Holger Petersen
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
239 ;; <petersen@kurims.kyoto-u.ac.jp> for suggesting the conditional
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240 ;; aliasing of SEMI functions.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
241 (unless (fboundp 'mime-edit-content-beginning)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242 (defalias 'mime-edit-content-beginning 'mime-editor/content-beginning))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
243 (unless (fboundp 'mime-edit-insert-tag)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244 (defalias 'mime-edit-insert-tag 'mime-editor/insert-tag))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
245 (unless (fboundp 'mime-edit-insert-binary-file)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
246 (defalias 'mime-edit-insert-binary-file
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
247 'mime-editor/insert-binary-file)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
248
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
249 (defun build-report-make-output-get ()
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
250 "Returns the filename the XEmacs make output is saved in."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
251 (interactive)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
252 (if (or (string-equal build-report-make-output-dir "")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
253 (null build-report-make-output-dir))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
254 (mapcar
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
255 (function
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
256 (lambda (f)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
257 (expand-file-name
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
258 f
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
259 (file-name-as-directory
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
260 (gethash 'blddir (config-value-hash-table))))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
261 build-report-make-output-files)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
262 (mapcar
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
263 (function
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
264 (lambda (f)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
265 (expand-file-name
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
266 f
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
267 (file-name-as-directory build-report-make-output-dir))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
268 build-report-make-output-files)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
269
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
270 ;;;###autoload
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
271 (defun build-report (&rest args)
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
272 "Report build information including Installation and make output.
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
273
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
274 Prompts for status (usually \"Success\" or \"Failure\"). Then uses
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
275 `compose-mail' to create a mail message. The Subject header contains
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
276 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
277 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
278
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
279 Looks for Installation and the make output file (`beta.err' by
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
280 default, customizable via `build-report-make-output-files') in the
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
281 build directory of the running XEmacs by default (customizable via
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
282 `build-report-make-output-dir'). The output from make is filtered
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
283 through `build-report-keep-regexp' and `build-report-delete-regexp'
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
284 before including in the message.
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
285
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
286 See also `mail-user-agent', `build-report-destination', and
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
287 `build-report-installation-file'."
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
288 ;; `interactive' form returns value for formal parameter `args'.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
289 (interactive
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
290 (let (prompt
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
291 hist
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
292 arg
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
293 (prompts build-report-prompts))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
294 (progn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
295 (while prompts
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
296 (defvar hist)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
297 (setq prompt (caar prompts))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
298 (setq hist (cdar prompts))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
299 ;; `build-report-prompts' used to be a list of lists, the
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
300 ;; first element of each list being the prompt, the rest being
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
301 ;; the history. The history is now in a separate list. We
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
302 ;; better check for that.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
303 (if (listp (car hist))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
304 (setq hist (car hist)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
305 (setq prompts (cdr prompts))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
306 (setq arg (cons (read-string prompt "" 'hist) arg)))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
307 arg)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
308 (save-excursion
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
309 (if (file-exists-p build-report-installation-file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
310 (multiple-value-bind
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
311 (major minor beta codename configuration)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
312 (build-report-installation-data build-report-installation-file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
313 (setq build-report-subject
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
314 (format "[%%s] XEmacs %s.%s%s \"%s\", %s"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
315 major minor beta codename configuration)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
316 (multiple-value-bind
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
317 (major minor beta codename)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
318 (build-report-version-file-data build-report-version-file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
319 (setq build-report-subject
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
320 (format "[%%s] XEmacs %s.%s%s \"%s\", %s"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
321 major minor beta codename system-configuration))))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
322 (compose-mail
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
323 ;; `build-report-destination' used to be a single string, so
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
324 ;; let's test if we really get a list of destinations.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
325 (if (listp build-report-destination)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
326 (read-string
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
327 "Build Report Destination: "
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
328 (car build-report-destination)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
329 'build-report-destination)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
330 (read-string
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
331 "Build Report Destination: "
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
332 build-report-destination)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
333 )
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
334 (apply 'format build-report-subject args)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
335 nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
336 nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
337 nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
338 nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
339 nil)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
340 (let* ((report-begin (point))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
341 (files (reverse (build-report-make-output-get)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
342 (file (car files)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
343 (while file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
344 (if (file-exists-p file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
345 (insert (build-report-insert-make-output report-begin file))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
346 (insert (format "%s not found!\n" file)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
347 (insert "\n")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
348 (setq files (cdr files))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
349 (setq file (car files)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
350 (if (file-exists-p build-report-installation-file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
351 (insert (build-report-insert-installation-file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
352 report-begin
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
353 build-report-installation-insert-all))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
354 (insert (format "%s not found!\n" build-report-installation-file)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
355 ;;; (when (and (>= major 21) (>= minor 2) (or (null beta) (>= beta 32)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
356 ;;; (insert "\n")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
357 ;;; (insert (build-report-insert-config-inc report-begin)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
358 (insert "\n")
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
359 (insert (build-report-insert-header report-begin))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
360 (goto-char report-begin))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
361
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
362 (defun build-report-insert-header (where)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
363 "Inserts the build-report-header at the point specified by `where'."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
364 (goto-char where)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
365 (with-temp-buffer
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
366 (insert
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
367 (format "
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
368 > XEmacs Build Report generated by emacs-version
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
369 > %s
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
370 > with system-configuration
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
371 > %s
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
372 > follows:\n\n" emacs-version system-configuration))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
373 (buffer-string)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
374
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
375 (defun build-report-insert-make-output (where file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
376 "Inserts the output of the XEmacs Beta make run in the
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
377 current buffer at position WHERE.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
378 The make process output must have been saved in
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
379 `build-report-make-output-files' during the XEmacs Beta building."
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
380 (goto-char where)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
381 (with-temp-buffer
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
382 (if (file-exists-p file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
383 (progn
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
384 (if (featurep 'mime-setup)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
385 (progn
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
386 (mime-edit-insert-tag
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
387 "text"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
388 "plain"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
389 (concat
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
390 "\nContent-Disposition: attachment;"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
391 " filename=\""
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
392 (file-name-nondirectory
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
393 file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
394 "\""))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
395 (mime-edit-insert-binary-file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
396 file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
397 build-report-file-encoding))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
398 (insert-file-contents file))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
399 (when build-report-keep-regexp
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
400 (goto-char (point-min))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
401 (delete-non-matching-lines (build-report-keep)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
402 (when build-report-delete-regexp
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
403 (goto-char (point-min))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
404 (delete-matching-lines (build-report-delete)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
405 (goto-char (point-min))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
406 (if build-report-keep-regexp
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
407 (insert
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
408 (format
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
409 "> keeping lines matching
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 "
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
412 (build-report-keep))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
413 (if build-report-delete-regexp
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
414 (insert
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
415 (format
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
416 "> %sdeleting lines matching
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
417 > \"%s\"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
418 "
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
419 (if build-report-keep-regexp
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
420 "and then "
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
421 "")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
422 (build-report-delete))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
423 (insert "\n")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
424 (goto-char (point-min))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
425 (insert
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
426 (format "> Contents of %s\n" file)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
427 (insert "> " file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
428 " does not exist!\n\n"))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
429 (buffer-string)))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
430
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
431 (defun build-report-insert-installation-file (where all)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
432 "Inserts the contents of the `build-report-installation-file'
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
433 created by the XEmacs Beta configure process."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
434 (goto-char where)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
435 (with-temp-buffer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
436 (if (file-exists-p build-report-installation-file)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
437 (let (file-begin last-configure)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
438 (insert "> Contents of "
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
439 build-report-installation-file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
440 ":\n")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
441 (insert
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
442 (format
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
443 "> (Output from %s of ./configure)\n\n"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
444 (if all "all runs" "most recent run")))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
445 (if (featurep 'mime-setup)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
446 (progn
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
447 (mime-edit-insert-tag
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
448 "text"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
449 "plain"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
450 (concat
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
451 "\nContent-Disposition: attachment;"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
452 " filename=\""
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
453 (file-name-nondirectory
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
454 build-report-installation-file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
455 "\""))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
456 (mime-edit-insert-binary-file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
457 build-report-installation-file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
458 build-report-file-encoding)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
459 (setq file-begin (mime-edit-content-beginning)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
460 (setq file-begin (point))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
461 (insert-file-contents
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
462 build-report-installation-file))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
463 (unless all
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
464 (setq last-configure
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
465 (search-backward-regexp
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
466 "^\\(uname.*\\|osversion\\|OS\\):\\s-+" file-begin t))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
467 (if (and file-begin last-configure)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
468 (delete-region file-begin last-configure))))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
469 (insert "> " build-report-installation-file
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
470 " does not exist!\n\n"))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
471 (buffer-string)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
472
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
473 (defun build-report-keep ()
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
474 "Concatenate elements of `build-report-keep-regexp' and a general
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
475 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
476 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
477 (mapconcat #'identity
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
478 (cons "^--\\[\\[\\|\\]\\]$" build-report-keep-regexp) "\\|"))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
479
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
480 (defun build-report-delete ()
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
481 "Concatenate elements of `build-report-delete-regexp' and a general
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
482 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
483 REGEXPs in `build-report-delete-regexp' or a general MIME tag REGEXP."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
484 (mapconcat '(lambda (item) item)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
485 build-report-delete-regexp "\\|"))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
486
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
487 (defun build-report-installation-data (&optional file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
488 "Return a list of XEmacs installation data containing MAJOR_NUMBER
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
489 MINOR_NUMBER BETA_STRING CODENAME CONFIGURATION SRCDIR from FILE,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
490 which defaults to `build-report-installation-file'."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
491 (interactive "fInstallation file: ")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
492 (unless file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
493 (setq file build-report-installation-file))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
494 (let
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
495 (major minor beta codename configuration srcdir)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
496 (save-window-excursion
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
497 (find-file-read-only file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
498 (goto-char (point-min))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
499 (while (< (point) (point-max))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
500 (cond
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
501 ((looking-at build-report-installation-version-regexp)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
502 (goto-char (match-end 0))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
503 (setq major (match-string 1))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
504 (setq minor (match-string 2))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
505 (setq beta (match-string 3))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
506 (setq codename (match-string 6))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
507 (setq configuration (match-string 7)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
508 ((looking-at build-report-installation-srcdir-regexp)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
509 (goto-char (match-end 0))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
510 (setq srcdir (match-string 1)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
511 ;; We avoid matching a potentially zero-length string to avoid
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
512 ;; infinite looping.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
513 ((looking-at
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
514 "^.+$")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
515 (goto-char (match-end 0)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
516 ((looking-at "\n")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
517 (goto-char (match-end 0)))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
518 (values major minor (or beta "") codename configuration srcdir))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
519
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
520 (defun build-report-version-file-data (&optional file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
521 "Return a list of XEmacs version information containing
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
522 MAJOR_NUMBER MINOR_NUMBER BETA_STRING CODENAME from FILE, which
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
523 defaults to `build-report-version-file'."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
524 (interactive "fversion.sh file: ")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
525 (unless file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
526 (setq file build-report-version-file))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
527 (let
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
528 (major minor beta codename)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
529 (save-window-excursion
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
530 (find-file-read-only file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
531 (goto-char (point-min))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
532 (while (< (point) (point-max))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
533 (cond
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
534 ((looking-at build-report-version-file-regexp)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
535 (goto-char (match-end 0))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
536 (setq major (match-string 1))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
537 (setq minor (match-string 2))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
538 (setq beta (match-string 3))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
539 (setq codename (match-string 4)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
540 ;; We avoid matching a potentially zero-length string to avoid
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
541 ;; infinite looping.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
542 ((looking-at
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
543 "^.+$")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
544 (goto-char (match-end 0)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
545 ((looking-at "\n")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
546 (goto-char (match-end 0)))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 434
diff changeset
547 (values major minor (or beta "") codename))))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
548
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
549 ;;; build-report.el ends here