@@ -17,6 +17,9 @@ PRJ_NAME_LIB_ICU = "sqlite3_lib_icu"
1717PRJ_NAME_DLL_ICU = " sqlite3_dll_icu"
1818PRJ_NAME_SHELL_ICU = " sqlite3_shell_icu"
1919
20+ -- set default action
21+ if _ACTION == nil then _ACTION = " vs2015" end
22+
2023newoption {
2124 trigger = " builddir" ,
2225 value = " build" ,
@@ -25,6 +28,25 @@ newoption {
2528
2629BUILDDIR = _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+
2850workspace " SQLite3"
2951 configurations { " Debug_AES128" , " Release_AES128" , " Debug_AES256" , " Release_AES256" }
3052 platforms { " Win32" , " x64" }
0 commit comments