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