Skip to content

Commit b12bb08

Browse files
committed
update premake5.lua
Signed-off-by: sndnvaps <sndnvaps@gmail.com>
1 parent 52a9893 commit b12bb08

4 files changed

Lines changed: 23 additions & 169 deletions

File tree

build/.gitignore

Lines changed: 0 additions & 168 deletions
This file was deleted.

premake5.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
@echo off
2-
"%~dp0tools\premake5.exe" --file="%~dp0premake5.lua" vs2015 %*
2+
"%~dp0tools\premake5.exe" --file="%~dp0premake5.lua" %*

premake5.lua

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ PRJ_NAME_LIB_ICU = "sqlite3_lib_icu"
1717
PRJ_NAME_DLL_ICU = "sqlite3_dll_icu"
1818
PRJ_NAME_SHELL_ICU = "sqlite3_shell_icu"
1919

20+
-- set default action
21+
if _ACTION == nil then _ACTION = "vs2015" end
22+
2023
newoption {
2124
trigger = "builddir",
2225
value = "build",
@@ -25,6 +28,25 @@ newoption {
2528

2629
BUILDDIR = _OPTIONS["builddir"] or "build"
2730

31+
-- hook for the clean action
32+
if _ACTION == "clean" then
33+
os.rmdir("bin")
34+
os.rmdir("build")
35+
-- os.execute('for /d %d in ('..SRC_DIR..'\\*.tlog) do rd /q /s "%d"')
36+
-- os.execute('del /Q /S /F /A *Log.htm thumbs.db *bak.def 2> NUL')
37+
extensions = {
38+
--[["dll",]] --[["lib",]] "exe",
39+
"pdb", --[["exp",]] "obj", "manifest",
40+
"sln", "suo", "sdf", "opensdf",
41+
"bak", "tmp", "log", "tlog",
42+
}
43+
os.execute('@echo off && for %e in ('.. table.concat(extensions," ") ..') do del /Q /S /F /A *.%e 2> NUL')
44+
-- remove empty directories
45+
-- http://blogs.msdn.com/b/oldnewthing/archive/2008/04/17/8399914.aspx
46+
-- os.execute('@echo off && for /f "usebackq" %d in (`"dir /ad/b/s | sort /R"`) do rd "%d" 2> NUL ')
47+
-- os.exit() -- don NOT exit and let the native premake clean action run
48+
end
49+
2850
workspace "SQLite3"
2951
configurations { "Debug_AES128", "Release_AES128", "Debug_AES256", "Release_AES256" }
3052
platforms { "Win32", "x64" }

tools/premake4.exe

-324 KB
Binary file not shown.

0 commit comments

Comments
 (0)