Don't try to build and install :builtin packages

* el-get-build.el (el-get-build-commands): Do nothing if package is
:builtin.
* recipes/cedet.rcp (:post-init): Don't load if it's :builtin.
This commit is contained in:
Noam Postavsky 2017-06-03 19:35:38 -04:00
parent ddf128195b
commit 767847f83d
2 changed files with 20 additions and 16 deletions

View File

@ -44,17 +44,20 @@ Otherwise, use `:build/SYSTEM-TYPE' or `:build'."
(or (plist-get source (intern (format ":build/%s" system-type)))
(plist-get source :build))))
(build-commands
(if (listp raw-build-commands)
;; If the :build property's car is a symbol, assume that it is an
;; expression that evaluates to a command list, rather than a
;; literal command list.
(if (symbolp (car raw-build-commands))
(let ((default-directory (el-get-package-directory package))
(unsafe (and safe-eval (unsafep raw-build-commands))))
(if unsafe (throw 'unsafe-build unsafe)
(eval raw-build-commands)))
raw-build-commands)
(error "build commands for package %s are not a list" package)))
(cond
;; Nothing to do for `:builtin' packages.
((eq (el-get-package-method source) 'builtin) nil)
((listp raw-build-commands)
;; If the :build property's car is a symbol, assume that it is an
;; expression that evaluates to a command list, rather than a
;; literal command list.
(if (symbolp (car raw-build-commands))
(let ((default-directory (el-get-package-directory package))
(unsafe (and safe-eval (unsafep raw-build-commands))))
(if unsafe (throw 'unsafe-build unsafe)
(eval raw-build-commands)))
raw-build-commands))
(t (error "build commands for package %s are not a list" package))))
(flat-build-commands
;; Flatten lists, but not strings
(mapcar (lambda (x) (if (stringp x) x (el-get-flatten x)))

View File

@ -23,8 +23,9 @@
;; setup.
:lazy nil
:post-init
(if (or (featurep 'cedet-devel-load)
(featurep 'eieio))
(message (concat "Emacs' built-in CEDET has already been loaded! Restart"
" Emacs to load CEDET from el-get instead."))
(load (expand-file-name "cedet-devel-load.el" pdir))))
(unless (eq (el-get-package-method 'cedet) 'builtin)
(if (or (featurep 'cedet-devel-load)
(featurep 'eieio))
(message (concat "Emacs' built-in CEDET has already been loaded! Restart"
" Emacs to load CEDET from el-get instead."))
(load (expand-file-name "cedet-devel-load.el" pdir)))))