diff options
Diffstat (limited to 'src/lux/compiler.clj')
-rw-r--r-- | src/lux/compiler.clj | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lux/compiler.clj b/src/lux/compiler.clj index 44584e801..030df1dd6 100644 --- a/src/lux/compiler.clj +++ b/src/lux/compiler.clj @@ -122,10 +122,11 @@ (defn init! "(-> (List Text) Null)" - [resources-dirs] - (do (&¶llel/setup!) + [resources-dirs target-dir] + (do (reset! &&/!output-dir target-dir) + (&¶llel/setup!) (reset! !source->last-line {}) - (.mkdirs (java.io.File. &&/output-dir)) + (.mkdirs (java.io.File. target-dir)) (let [class-loader (ClassLoader/getSystemClassLoader) addURL (doto (.getDeclaredMethod java.net.URLClassLoader "addURL" (into-array [java.net.URL])) (.setAccessible true))] @@ -261,8 +262,8 @@ )) ))) -(defn compile-program [mode program-module resources-dir source-dirs] - (do (init! resources-dir) +(defn compile-program [mode program-module resources-dir source-dirs target-dir] + (do (init! resources-dir target-dir) (let [m-action (|do [_ (compile-module source-dirs "lux")] (compile-module source-dirs program-module))] (|case (m-action (&/init-state mode)) |