aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/command/build.lux
diff options
context:
space:
mode:
authorEduardo Julian2022-02-23 05:30:53 -0400
committerEduardo Julian2022-02-23 05:30:53 -0400
commitf27a91a7b67790272578692ea20e2d875dbb3d35 (patch)
treecf0d9a53f3ef1b16be92ee5a120651b1abbb866d /stdlib/source/program/aedifex/command/build.lux
parentf07effd9faf3fdaa677f659d6bbccf98931c5e5a (diff)
ADDED Can pass config parameters to compiler and select code based on it. Can also select code based on compiler version.
Diffstat (limited to 'stdlib/source/program/aedifex/command/build.lux')
-rw-r--r--stdlib/source/program/aedifex/command/build.lux15
1 files changed, 10 insertions, 5 deletions
diff --git a/stdlib/source/program/aedifex/command/build.lux b/stdlib/source/program/aedifex/command/build.lux
index 8570207be..599887fe4 100644
--- a/stdlib/source/program/aedifex/command/build.lux
+++ b/stdlib/source/program/aedifex/command/build.lux
@@ -6,7 +6,7 @@
[order {"+" Order}]
[monad {"+" do}]]
[control
- ["[0]" try {"+" Try}]
+ ["[0]" try {"+" Try} ("[1]#[0]" functor)]
["[0]" exception {"+" exception:}]
["[0]" io {"+" IO}]
[concurrency
@@ -23,10 +23,13 @@
[number {"+" hex}
["n" nat]
["i" int]]]
+ [meta
+ ["[0]" configuration]]
[tool
[compiler
[meta
- ["[0]" cli]
+ [cli
+ ["[0]" compiler]]
["[0]" packager
["[0]_[1]" ruby]]]]]
[world
@@ -238,8 +241,9 @@
(def: windows?
Bit
- (|> (java/lang/System::getProperty "os.name")
+ (|> (java/lang/System::getProperty (ffi.as_string "os.name"))
io.run!
+ (try#each (|>> ffi.of_string))
(try.else "")
text.lower_cased
(text.starts_with? "windows")))
@@ -306,10 +310,11 @@
(list "build")
(..plural "--library" (..libraries fs home resolution))
(..plural "--host_dependency" host_dependencies)
- (..plural "--compiler" (list#each cli.compiler_format (value@ ///.#compilers profile)))
+ (..plural "--compiler" (list#each compiler.format (value@ ///.#compilers profile)))
(..plural "--source" (set.list (value@ ///.#sources profile)))
(..singular "--target" cache_directory)
- (..singular "--module" program_module)))]
+ (..singular "--module" program_module)
+ (..singular "--configuration" (configuration.format (value@ ///.#configuration profile)))))]
process (# shell execute [environment
working_directory
command