"*The list of mail addresses SXEmacs Build Reports should most likely
go to."
:type '(repeat
- :custom-show t
- :documentation-shown t
- string)
+ :custom-show t
+ :documentation-shown t
+ string)
:group 'build-rpt)
(defcustom build-rpt-keep-regexp
"^\\(real\\|user\\|sys\\)\\s-+[0-9]+m")
"*Regexp of make process output lines to keep in the report."
:type '(repeat
- :custom-show t
- :documentation-shown t
- regexp)
+ :custom-show t
+ :documentation-shown t
+ regexp)
:group 'build-rpt)
(defcustom build-rpt-delete-regexp
"wrong-error")
"*Regexp of make process output lines to delete from the report."
:type '(repeat
- :custom-show t
- :documentation-shown t
- regexp)
+ :custom-show t
+ :documentation-shown t
+ regexp)
:group 'build-rpt)
(defcustom build-rpt-make-output-dir (config-value 'sxe_blddir)
"*Directory where the build report file is found."
:type '(directory
- :custom-show t
- :documentation-shown t)
+ :custom-show t
+ :documentation-shown t)
:group 'build-rpt)
(defcustom build-rpt-make-output-files
(list
",,vars.out"
",,beta.out"
- ",,make-all.out"
+ ",,make-all.out"
",,make-check-temacs.out"
",,make-check.out"
",,make-install.out")
$ make check 2>&1 | tee ,,make-check.out
"
:type '(repeat
- :custom-show t
- :documentation-shown t
- file)
+ :custom-show t
+ :documentation-shown t
+ file)
:group 'build-rpt)
(defcustom build-rpt-installation-file
(expand-file-name "Installation"
- (gethash 'sxe_blddir (config-value-hash-table)))
+ (gethash 'sxe_blddir (config-value-hash-table)))
"*Installation file produced by SXEmacs configure process."
:type '(file
- :custom-show t
- :documentation-shown t)
+ :custom-show t
+ :documentation-shown t)
:group 'build-rpt)
(defcustom build-rpt-version-file
"src"))))
"*File containing version info."
:type '(file
- :custom-show t
- :documentation-shown t)
+ :custom-show t
+ :documentation-shown t)
:group 'build-rpt)
(defcustom build-rpt-subject
(concat "[%s] "
- (gethash 'SXEMACS_ARCH_VERSION (config-value-hash-table))
+ (gethash 'SXEMACS_GIT_VERSION (config-value-hash-table))
" on " system-configuration)
"*SXEmacs Build Report Subject Line. %s-sequences will be substituted
with user input through `build-rpt' according to
`build-rpt-prompts' using `format'."
:type '(string
- :custom-show t
- :documentation-shown t)
+ :custom-show t
+ :documentation-shown t)
:group 'build-rpt)
(defcustom build-rpt-prompts
followed by any number of strings which can be chosen via the history
mechanism."
:type '(repeat
- :custom-show t
- :documentation-shown t
- (list
- :tag "Prompt"
- string
- (repeat
- :tag "Values"
- string)))
+ :custom-show t
+ :documentation-shown t
+ (list
+ :tag "Prompt"
+ string
+ (repeat
+ :tag "Values"
+ string)))
:group 'build-rpt)
(defcustom build-rpt-file-encoding
"Returns the filename the SXEmacs make output is saved in."
(interactive)
(if (or (string-equal build-rpt-make-output-dir "")
- (null build-rpt-make-output-dir))
+ (null build-rpt-make-output-dir))
(mapcar
(function
- (lambda (f)
- (expand-file-name
- f
- (file-name-as-directory
- (gethash 'sxe_blddir (config-value-hash-table))))))
+ (lambda (f)
+ (expand-file-name
+ f
+ (file-name-as-directory
+ (gethash 'sxe_blddir (config-value-hash-table))))))
build-rpt-make-output-files)
(mapcar
(function
(lambda (f)
- (expand-file-name
- f
- (file-name-as-directory build-rpt-make-output-dir))))
+ (expand-file-name
+ f
+ (file-name-as-directory build-rpt-make-output-dir))))
build-rpt-make-output-files)))
(defun build-rpt-read-destination ()
(if (and (interactive-p)
(featurep 'sendmail))
(user-mail-address)
- (concat (user-real-login-name)
- "-notconfigured@"
+ (concat (user-real-login-name)
+ "-notconfigured@"
(if mail-host-address
mail-host-address
"localhost"))))))
nil
nil)
(goto-char (point-max))
- (re-search-backward mail-header-separator)
- (next-line 1))
+ (re-search-backward mail-header-separator)
+ (next-line 1))
(pop-to-buffer "*build-rpt*")
(insert (format (concat "Please save this buffer to a file and email it\n"
- "Or, alternatively, rerun `M-x build-rpt' after installing the\n"
- "\"mail-lib\" XEmacs package.\n\n"
- "To: SXEmacs Builds <sxemacs-builds@sxemacs.org>\n"
- "Subject: %s\n\n")
- (apply #'format build-rpt-subject args)))))
+ "Or, alternatively, rerun `M-x build-rpt' after installing the\n"
+ "\"mail-lib\" XEmacs package.\n\n"
+ "To: SXEmacs Builds <sxemacs-builds@sxemacs.org>\n"
+ "Subject: %s\n\n")
+ (apply #'format build-rpt-subject args)))))
(let* ((rpt-begin (point))
- (files (reverse (build-rpt-make-output-get)))
- (file (car files)))
+ (files (reverse (build-rpt-make-output-get)))
+ (file (car files)))
(while file
- (if (file-exists-p file)
- (insert (build-rpt-insert-make-output rpt-begin file))
- (insert (format "%s not found!\n" file)))
- (insert "\n")
- (setq files (cdr files))
- (setq file (car files)))
+ (if (file-exists-p file)
+ (insert (build-rpt-insert-make-output rpt-begin file))
+ (insert (format "%s not found!\n" file)))
+ (insert "\n")
+ (setq files (cdr files))
+ (setq file (car files)))
(insert (build-rpt-insert-config-values rpt-begin))
(insert "\n")
(insert (build-rpt-insert-ldd rpt-begin))
(insert "\n")
(if (file-exists-p build-rpt-installation-file)
- (insert (build-rpt-insert-installation-file rpt-begin))
- (insert (format "%s not found!\n" build-rpt-installation-file)))
+ (insert (build-rpt-insert-installation-file rpt-begin))
+ (insert (format "%s not found!\n" build-rpt-installation-file)))
(insert "\n")
(insert (build-rpt-insert-header rpt-begin))
(if build-rpt-interactive
;; `interactive' form returns value for formal parameter `args'.
(interactive
(let (prompt
- hist
- arg
- (prompts build-rpt-prompts))
+ hist
+ arg
+ (prompts build-rpt-prompts))
(progn
(while prompts
- (defvar hist)
- (setq prompt (caar prompts))
- (setq hist (cdar prompts))
- ;; `build-rpt-prompts' used to be a list of lists, the
- ;; first element of each list being the prompt, the rest being
- ;; the history. The history is now in a separate list. We
- ;; better check for that.
- (if (listp (car hist))
- (setq hist (car hist)))
- (setq prompts (cdr prompts))
- (setq arg (cons (read-string prompt "" 'hist) arg)))
+ (defvar hist)
+ (setq prompt (caar prompts))
+ (setq hist (cdar prompts))
+ ;; `build-rpt-prompts' used to be a list of lists, the
+ ;; first element of each list being the prompt, the rest being
+ ;; the history. The history is now in a separate list. We
+ ;; better check for that.
+ (if (listp (car hist))
+ (setq hist (car hist)))
+ (setq prompts (cdr prompts))
+ (setq arg (cons (read-string prompt "" 'hist) arg)))
arg)))
(let ((build-rpt-email (build-rpt-read-destination))
(build-rpt-interactive (interactive-p)))
(goto-char where)
(with-temp-buffer
(if (file-exists-p file)
- (progn
- (if (featurep 'mime-setup)
- (progn
- (mime-edit-insert-tag
- "text"
- "plain"
- (concat
- "\nContent-Disposition: attachment;"
- " filename=\""
- (file-name-nondirectory
- file)
- "\""))
- (mime-edit-insert-binary-file
- file
- build-rpt-file-encoding))
- (insert-file-contents file))
- (when build-rpt-keep-regexp
- (goto-char (point-min))
- (delete-non-matching-lines (build-rpt-keep)))
- (when build-rpt-delete-regexp
- (goto-char (point-min))
- (delete-matching-lines (build-rpt-delete)))
- (goto-char (point-min))
- (insert "\n")
- (insert
- (format "> Contents of %s\n" file)))
+ (progn
+ (if (featurep 'mime-setup)
+ (progn
+ (mime-edit-insert-tag
+ "text"
+ "plain"
+ (concat
+ "\nContent-Disposition: attachment;"
+ " filename=\""
+ (file-name-nondirectory
+ file)
+ "\""))
+ (mime-edit-insert-binary-file
+ file
+ build-rpt-file-encoding))
+ (insert-file-contents file))
+ (when build-rpt-keep-regexp
+ (goto-char (point-min))
+ (delete-non-matching-lines (build-rpt-keep)))
+ (when build-rpt-delete-regexp
+ (goto-char (point-min))
+ (delete-matching-lines (build-rpt-delete)))
+ (goto-char (point-min))
+ (insert "\n")
+ (insert
+ (format "> Contents of %s\n" file)))
(insert "> " file
- " does not exist!\n\n"))
+ " does not exist!\n\n"))
(buffer-string)))
(defun build-rpt-insert-installation-file (where)
(with-temp-buffer
(if (file-exists-p build-rpt-installation-file)
(progn
- (insert "> Contents of "
- build-rpt-installation-file
- ":\n")
- (insert "> (Output from ./configure)\n\n")
- (if (featurep 'mime-setup)
- (progn
- (mime-edit-insert-tag
- "text"
- "plain"
- (concat
- "\nContent-Disposition: attachment;"
- " filename=\""
- (file-name-nondirectory
- build-rpt-installation-file)
- "\""))
- (mime-edit-insert-binary-file
- build-rpt-installation-file
- build-rpt-file-encoding))
- (insert-file-contents
- build-rpt-installation-file)))
+ (insert "> Contents of "
+ build-rpt-installation-file
+ ":\n")
+ (insert "> (Output from ./configure)\n\n")
+ (if (featurep 'mime-setup)
+ (progn
+ (mime-edit-insert-tag
+ "text"
+ "plain"
+ (concat
+ "\nContent-Disposition: attachment;"
+ " filename=\""
+ (file-name-nondirectory
+ build-rpt-installation-file)
+ "\""))
+ (mime-edit-insert-binary-file
+ build-rpt-installation-file
+ build-rpt-file-encoding))
+ (insert-file-contents
+ build-rpt-installation-file)))
(insert "> " build-rpt-installation-file
- " does not exist!\n\n"))
+ " does not exist!\n\n"))
(buffer-string)))
(defun build-rpt-insert-config-values (where)
(goto-char where)
(with-temp-buffer
(if (null (config-value-hash-table))
- (insert "> `config-value-hash-table' is empty, which is weird :(!\n\n")
+ (insert "> `config-value-hash-table' is empty, which is weird :(!\n\n")
(progn
- (insert "> Contents of `config-value-hash-table':\n")
- (let ((curp (point))
- value-empty)
- (maphash
- #'(lambda (key value)
- (if (and (stringp value)
- (string= "" value))
- (setq value-empty (cons key value-empty))
- (insert (format "%s %S\n" key value))))
- (config-value-hash-table))
- (goto-char curp)
- ;; we are at `curp' again
- (insert (format "Empty keys: %s\n\n"
- (mapconcat #'prin1-to-string
- value-empty " "))))))
+ (insert "> Contents of `config-value-hash-table':\n")
+ (let ((curp (point))
+ value-empty)
+ (maphash
+ #'(lambda (key value)
+ (if (and (stringp value)
+ (string= "" value))
+ (setq value-empty (cons key value-empty))
+ (insert (format "%s %S\n" key value))))
+ (config-value-hash-table))
+ (goto-char curp)
+ ;; we are at `curp' again
+ (insert (format "Empty keys: %s\n\n"
+ (mapconcat #'prin1-to-string
+ value-empty " "))))))
(buffer-string)))
(defun build-rpt-insert-ldd (where)
(goto-char where)
(with-temp-buffer
(let ((running-binary-tests
- '((lambda ()
- (expand-file-name (car command-line-args)
- command-line-default-directory))
- (lambda ()
- (locate-file (car command-line-args)
- (split-string (getenv "PATH") ":")))))
- (running-binary)
- (ldd
- (let ((sysconfl (split-string system-configuration "-")))
- (cond
- ((member "apple" sysconfl)
- "otool -XL")
- (t
- "ldd")))))
+ '((lambda ()
+ (expand-file-name (car command-line-args)
+ command-line-default-directory))
+ (lambda ()
+ (locate-file (car command-line-args)
+ (split-string (getenv "PATH") ":")))))
+ (running-binary)
+ (ldd
+ (let ((sysconfl (split-string system-configuration "-")))
+ (cond
+ ((member "apple" sysconfl)
+ "otool -XL")
+ (t
+ "ldd")))))
;; perform binary finder tests
(while (and (null running-binary) (car-safe running-binary-tests))
- (let ((candidate (funcall (car running-binary-tests))))
- (setq running-binary
- (and candidate
- (file-exists-p candidate)
- candidate)
- running-binary-tests (cdr running-binary-tests))))
+ (let ((candidate (funcall (car running-binary-tests))))
+ (setq running-binary
+ (and candidate
+ (file-exists-p candidate)
+ candidate)
+ running-binary-tests (cdr running-binary-tests))))
(if (null running-binary)
- (insert "cannot obtain ld-dependencies.\n")
- (insert (shell-command-to-string (concat ldd " " running-binary)))
- (goto-char (point-min))
- (while (re-search-forward "^\\s-+" nil t)
- (replace-match "")))
+ (insert "cannot obtain ld-dependencies.\n")
+ (insert (shell-command-to-string (concat ldd " " running-binary)))
+ (goto-char (point-min))
+ (while (re-search-forward "^\\s-+" nil t)
+ (replace-match "")))
(goto-char (point-min))
(insert "> shared library dependencies:\n"))
(buffer-string)))
MIME tag REGEXP. The result is a REGEXP string matching either of the
REGEXPs in `build-rpt-keep-regexp' or a general MIME tag REGEXP."
(mapconcat #'identity
- (cons #r"^--\[\[\|\]\]$" build-rpt-keep-regexp) "\\|"))
+ (cons #r"^--\[\[\|\]\]$" build-rpt-keep-regexp) "\\|"))
(defun build-rpt-delete ()
"Concatenate elements of `build-rpt-delete-regexp' and a general
MIME tag REGEXP. The result is a REGEXP string matching either of the
REGEXPs in `build-rpt-delete-regexp' or a general MIME tag REGEXP."
(mapconcat '(lambda (item) item)
- build-rpt-delete-regexp "\\|"))
+ build-rpt-delete-regexp "\\|"))
;; To ensure we always get the right build reporter, alias the
;; incompatible one to ours if it is ever loaded.