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

View File

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