Navigation Menu

Skip to content

Commit

Permalink
Compute byte-compile list after build
Browse files Browse the repository at this point in the history
This ensures that files created during the build process can be
byte-compiled in the byte-compile step.
  • Loading branch information
DarwinAwardWinner committed Feb 26, 2012
1 parent b2e7cb3 commit 1d8e1c6
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions el-get-build.el
Expand Up @@ -120,26 +120,35 @@ recursion.
:error ,(format
"el-get could not build %s [%s]" package c))))
commands))
(bytecomp-files (when el-get-byte-compile
(el-get-assemble-files-for-byte-compilation package)))
(full-process-list ;; includes byte compiling
(append
(when bytecomp-files
(list (el-get-byte-compile-process package buf wdir sync bytecomp-files)))
process-list))
;; This ensures that post-build-fun is always a lambda, not a
;; symbol, which simplifies the following code.
(post-build-fun
(if (symbolp post-build-fun)
`(lambda (&rest args)
(apply ,(symbol-function post-build-fun) args))
;; Must already be a lambda
post-build-fun))
;; Do byte-compilation after building, if needed
(byte-compile-then-post-build-fun
`(lambda (package)
(let ((bytecomp-files
(when el-get-byte-compile
(el-get-assemble-files-for-byte-compilation package))))
(if bytecomp-files
(el-get-start-process-list
package
(list (el-get-byte-compile-process package ,buf ,wdir ,sync bytecomp-files))
,post-build-fun)
(funcall ,post-build-fun package)))))
;; unless installing-info, post-build-fun should take care of
;; building info too
(build-info-then-post-build-fun
(build-info-then-post-build-fun
(if installing-info post-build-fun
`(lambda (package)
(el-get-install-or-init-info package 'build)
(funcall ,(if (symbolp post-build-fun)
(symbol-function post-build-fun)
;; it must be a lambda, just inline its value
post-build-fun)
package)))))
(funcall byte-compile-then-post-build-fun package)))))
(el-get-start-process-list
package full-process-list build-info-then-post-build-fun)))
package process-list build-info-then-post-build-fun)))

(defun el-get-set-info-path (package infodir-rel)
(require 'info)
Expand Down

0 comments on commit 1d8e1c6

Please sign in to comment.