From f27a91a7b67790272578692ea20e2d875dbb3d35 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 23 Feb 2022 05:30:53 -0400 Subject: ADDED Can pass config parameters to compiler and select code based on it. Can also select code based on compiler version. --- stdlib/source/program/aedifex/command/build.lux | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'stdlib/source/program/aedifex/command/build.lux') 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 -- cgit v1.2.3