Skip to content

Commit

Permalink
Don't try to build and install :builtin packages
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
npostavs committed Jul 1, 2017
1 parent ddf1281 commit 767847f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
25 changes: 14 additions & 11 deletions el-get-build.el
Expand Up @@ -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)))
Expand Down
11 changes: 6 additions & 5 deletions recipes/cedet.rcp
Expand Up @@ -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)))))

0 comments on commit 767847f

Please sign in to comment.