Function: ede-make-check-version
ede-make-check-version is an autoloaded, interactive and byte-compiled
function defined in make.el.gz.
Signature
(ede-make-check-version &optional NOERROR)
Documentation
Check the version of GNU Make installed.
The check passes if the MAKE version is no high enough, or if it is not GNU make. If NOERROR is non-nil, return t for success, nil for failure. If NOERROR is nil, then throw an error on failure. Return t otherwise.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/ede/make.el.gz
;;;###autoload
(defun ede-make-check-version (&optional noerror)
"Check the version of GNU Make installed.
The check passes if the MAKE version is no high enough, or if it
is not GNU make.
If NOERROR is non-nil, return t for success, nil for failure.
If NOERROR is nil, then throw an error on failure. Return t otherwise."
(interactive)
(let ((b (get-buffer-create "*EDE Make Version*"))
(cd default-directory)
(rev nil)
(ans nil))
(with-current-buffer b
;; Setup, and execute make.
(setq default-directory cd)
(erase-buffer)
(call-process ede-make-command nil b nil
"--version")
;; Check the buffer for the string
(goto-char (point-min))
(when (looking-at "GNU Make\\(?: version\\)? \\([0-9][^,[:space:]]+\\),?")
(setq rev (match-string 1))
(setq ans (not (version< rev ede-make-min-version))))
;; Answer reporting.
(when (and (called-interactively-p 'interactive) ans)
(message "GNU Make version %s. Good enough for CEDET." rev))
(when (and (not noerror) (not ans))
(error "EDE requires GNU Make version %s or later (found %s). Configure `ede-make-command' to fix"
ede-make-min-version
rev))
ans)))