diff --git a/Makefile b/Makefile index 032d7ae2..ab1fcb89 100644 --- a/Makefile +++ b/Makefile @@ -148,7 +148,7 @@ endif ifdef DEBUG_HARDHAT TEST_PARAMS := $(TEST_PARAMS) -d:DebugHardhat=$(DEBUG_HARDHAT) endif -ifdef DEBUG_CODEXNODES +ifdef DEBUG_CODEXNODES # true by default TEST_PARAMS := $(TEST_PARAMS) -d:DebugCodexNodes=$(DEBUG_CODEXNODES) endif ifdef DEBUG_UPDATES diff --git a/build.nims b/build.nims index aa090e71..9ff8c5ce 100644 --- a/build.nims +++ b/build.nims @@ -1,10 +1,14 @@ mode = ScriptMode.Verbose import std/os except commandLineParams +import std/strutils ### Helper functions -proc buildBinary(name: string, srcDir = "./", params = "", lang = "c") = +proc truthy(val: string): bool = + const truthySwitches = @["yes", "1", "on", "true"] + return val in truthySwitches +proc buildBinary(name: string, srcDir = "./", params = "", lang = "c") = if not dirExists "build": mkDir "build" @@ -14,13 +18,15 @@ proc buildBinary(name: string, srcDir = "./", params = "", lang = "c") = for param in commandLineParams(): extra_params &= " " & param else: - for i in 2..