Skip building leveldb if already built
This commit is contained in:
parent
9e89afa856
commit
3805148c2f
|
@ -16,7 +16,11 @@ const
|
||||||
LevelDbDir {.strdefine.} = $(root/"vendor")
|
LevelDbDir {.strdefine.} = $(root/"vendor")
|
||||||
buildDir = $(root/"build")
|
buildDir = $(root/"build")
|
||||||
|
|
||||||
static:
|
proc buildLevelDb() =
|
||||||
|
if fileExists(buildDir/"Makefile"):
|
||||||
|
echo "LevelDB already build. Delete '" & buildDir & "' to force rebuild."
|
||||||
|
return
|
||||||
|
|
||||||
echo "Initializing submodule..."
|
echo "Initializing submodule..."
|
||||||
discard gorge "git submodule deinit -f \"" & root & "\""
|
discard gorge "git submodule deinit -f \"" & root & "\""
|
||||||
discard gorge "git submodule update --init --recursive --checkout \"" & root & "\""
|
discard gorge "git submodule update --init --recursive --checkout \"" & root & "\""
|
||||||
|
@ -33,6 +37,9 @@ static:
|
||||||
echo output
|
echo output
|
||||||
raise (ref Defect)(msg: "Failed to build LevelDB")
|
raise (ref Defect)(msg: "Failed to build LevelDB")
|
||||||
|
|
||||||
|
static:
|
||||||
|
buildLevelDb()
|
||||||
|
|
||||||
when defined(windows):
|
when defined(windows):
|
||||||
{.compile: envWindows.}
|
{.compile: envWindows.}
|
||||||
{.passc: "-DLEVELDB_PLATFORM_WINDOWS".}
|
{.passc: "-DLEVELDB_PLATFORM_WINDOWS".}
|
||||||
|
|
|
@ -16,7 +16,11 @@ const
|
||||||
LevelDbDir {.strdefine.} = $(root/"vendor")
|
LevelDbDir {.strdefine.} = $(root/"vendor")
|
||||||
buildDir = $(root/"build")
|
buildDir = $(root/"build")
|
||||||
|
|
||||||
static:
|
proc buildLevelDb() =
|
||||||
|
if fileExists(buildDir/"Makefile"):
|
||||||
|
echo "LevelDB already build. Delete '" & buildDir & "' to force rebuild."
|
||||||
|
return
|
||||||
|
|
||||||
echo "Initializing submodule..."
|
echo "Initializing submodule..."
|
||||||
discard gorge "git submodule deinit -f \"" & root & "\""
|
discard gorge "git submodule deinit -f \"" & root & "\""
|
||||||
discard gorge "git submodule update --init --recursive --checkout \"" & root & "\""
|
discard gorge "git submodule update --init --recursive --checkout \"" & root & "\""
|
||||||
|
@ -33,6 +37,9 @@ static:
|
||||||
echo output
|
echo output
|
||||||
raise (ref Defect)(msg: "Failed to build LevelDB")
|
raise (ref Defect)(msg: "Failed to build LevelDB")
|
||||||
|
|
||||||
|
static:
|
||||||
|
buildLevelDb()
|
||||||
|
|
||||||
when defined(windows):
|
when defined(windows):
|
||||||
{.compile: envWindows.}
|
{.compile: envWindows.}
|
||||||
{.passc: "-DLEVELDB_PLATFORM_WINDOWS".}
|
{.passc: "-DLEVELDB_PLATFORM_WINDOWS".}
|
||||||
|
|
Loading…
Reference in New Issue