aboutsummaryrefslogtreecommitdiff
path: root/lux-lein/src/leiningen/lux/builder.clj
diff options
context:
space:
mode:
Diffstat (limited to 'lux-lein/src/leiningen/lux/builder.clj')
-rw-r--r--lux-lein/src/leiningen/lux/builder.clj28
1 files changed, 17 insertions, 11 deletions
diff --git a/lux-lein/src/leiningen/lux/builder.clj b/lux-lein/src/leiningen/lux/builder.clj
index ebfbc7895..76e19b1e8 100644
--- a/lux-lein/src/leiningen/lux/builder.clj
+++ b/lux-lein/src/leiningen/lux/builder.clj
@@ -1,15 +1,21 @@
(ns leiningen.lux.builder
- (:require (leiningen.lux [utils :as &utils]
- [packager :as &packager])))
-
-(def missing-module-error "Please provide a program main module in [:lux :program]")
+ (:require (leiningen.lux
+ [utils :as &utils]
+ [packager :as &packager])))
(defn build [project]
(if-let [program-module (get-in project [:lux :program])]
- (when (time (&utils/run-process (&utils/compile-path project program-module (get project :source-paths (list)))
- nil
- "[COMPILATION BEGAN]"
- "[COMPILATION ENDED]"))
- (time (&packager/package project program-module (get project :resource-paths (list))))
- true)
- (println missing-module-error)))
+ (if-let [command (&utils/build-jvm project program-module)]
+ (when (time (&utils/run-process command
+ nil
+ "[COMPILATION BEGAN]"
+ "[COMPILATION ENDED]"))
+ true)
+ (let [command (&utils/compile-path project program-module (get project :source-paths (list)))]
+ (when (time (&utils/run-process command
+ nil
+ "[COMPILATION BEGAN]"
+ "[COMPILATION ENDED]"))
+ (time (&packager/package project program-module (get project :resource-paths (list))))
+ true)))
+ (println "Please provide a program main module in [:lux :program]")))