Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/lua-winreg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoteus <mimir@newmail.ru>2013-04-28 07:19:31 +0400
committermoteus <mimir@newmail.ru>2013-04-28 07:19:31 +0400
commit3a1c8ab327cad1771664cc6e5ddb83706f22d93a (patch)
tree34566b7bb9014b11cab793f8f543a68d1033b831 /lakefile
parent503236b46faf48195a20955fe227f9886506c143 (diff)
Update lakefile. Now work with MinGW.
Diffstat (limited to 'lakefile')
-rw-r--r--lakefile46
1 files changed, 18 insertions, 28 deletions
diff --git a/lakefile b/lakefile
index b5b38dc..0db0468 100644
--- a/lakefile
+++ b/lakefile
@@ -1,14 +1,22 @@
if not WINDOWS then quit('This is only windows module!') end
+PROJECT = 'winreg'
+
if LUA_VER == '5.2' then
LUA_NEED = 'lua52'
LUA_DIR = ENV.LUA_DIR_5_2 or ENV.LUA_DIR
+ LUA_RUNNER = 'lua52'
else
- LUA_NEED = 'lua'
+ LUA_NEED = 'lua51'
LUA_DIR = ENV.LUA_DIR
+ LUA_RUNNER = 'lua'
end
-DYNAMIC = DYNAMIC or false
+ROOT = ROOT or J(LUA_DIR, 'libs', PROJECT)
+LUADIR = LUADIR or J(ROOT, 'share')
+LIBDIR = LIBDIR or J(ROOT, 'share')
+DYNAMIC = as_bool(DYNAMIC, false)
+WINVER = IF(WINDOWS, WINVER or '501', '')
lake.define_need('unicode',function()return{
defines = {"UNICODE"; "_UNICODE"};
@@ -45,36 +53,18 @@ winreg = c.shared{'winreg',
target('build',{winreg})
install = target('install', {
- file.group{odir=J(INSTALL_DIR, 'test');
- src = J('test','*.*');recurse=true;
- };
- file.group{odir=J(INSTALL_DIR, 'doc');
- src = J('doc','*.*');recurse=true;
- };
- file.group{odir=J(INSTALL_DIR, 'examples');
- src = J('examples','*.*');recurse=true;
- };
- target(J(INSTALL_DIR, 'bin', winreg.name .. DLL_EXT), winreg, CP );
+ file.group{odir=J(ROOT, 'test'); src = J('test','*.*'); recurse=true };
+ file.group{odir=J(ROOT, 'doc'); src = J('doc','*.*'); recurse=true };
+ file.group{odir=J(ROOT, 'examples'); src = J('examples','*.*');recurse=true };
+ file.group{odir = LIBDIR; src = winreg};
})
target('test', install, function()
- if TESTING then
- lake.chdir('test')
- for file in path.mask('*.lua') do
- print("run " .. file)
- end
- lake.chdir('<')
- end
- if not TESTING then
- lake.chdir(J(INSTALL_DIR,'test'))
- for file in path.mask('*.lua') do
- print("run " .. file)
- if not utils.execute( LUA_EXE .. ' ' .. file ) then
- quit("FAIL!")
- end
- end
- lake.chdir('<')
+ lake.chdir('test')
+ for file in path.mask('*.lua') do
+ run_test(file)
end
+ lake.chdir('<')
end)
default('build')