[DEV] try set it work again

This commit is contained in:
Edouard DUPIN 2018-06-25 23:15:30 +02:00
parent a0505920fe
commit 7fcfef70e6
4 changed files with 106 additions and 60 deletions

1
authors.txt Normal file
View File

@ -0,0 +1 @@
Edouard DUPIN <yui.heero@gmail.com>

View File

@ -18,8 +18,14 @@
#include "lauxlib.h"
#include "lualib.h"
#include <etk/debug.h>
#include <elog/log.hpp>
namespace lua {
int32_t getLogId() {
static int32_t g_val = elog::registerInstance("lua");
return g_val;
}
}
static int luaB_print (lua_State *L) {
int n = lua_gettop(L); /* number of arguments */
@ -43,8 +49,7 @@ static int luaB_print (lua_State *L) {
}
luai_writeline();
#else
std::stringbuf sb;
std::ostream tmpStream(&sb);
etk::Stream tmpStream;
lua_getglobal(L, "tostring");
for (i=1; i<=n; i++) {
const char *s;
@ -62,7 +67,7 @@ static int luaB_print (lua_State *L) {
tmpStream << s;
lua_pop(L, 1); /* pop result */
}
etk::log::logStream(etk::getLogId(), 4, __LINE__, __class__, __func__, tmpStream);
elog::logStream(lua::getLogId(), 4, __LINE__, __PRETTY_FUNCTION__, tmpStream);
#endif
return 0;
}

View File

@ -1,37 +1,49 @@
#!/usr/bin/python
# --------------------------------------------------------
# -- Linear Math librairy
# --------------------------------------------------------
import lutinModule as module
import lutinTools as tools
import lutin.debug as debug
import lutin.tools as tools
def get_type():
return "LIBRARY"
def get_desc():
return "Lua Lua interpretic script module"
return "Lua interpretic script module"
def get_licence():
return "MIT"
def create(target):
myModule = module.Module(__file__, 'lua', 'LIBRARY')
def get_compagny_type():
return "org"
myModule.add_module_depend('etk')
def get_compagny_name():
return "lua"
myModule.compile_flags_CC([
def get_maintainer():
return "authors.txt"
def get_version():
return "version.txt"
def configure(target, my_module):
my_module.add_depend([
'elog',
'etk',
])
my_module.add_flag('c', [
'-DLUA_VERSION_TAG_NAME="\"5.2\""',
'-Wall'])
'-Wall',
])
myModule.add_export_path(tools.get_current_path(__file__))
myModule.add_path(tools.get_current_path(__file__)+"/lua/")
myModule.add_export_flag_CC('-DLUA_COMPAT_ALL');
my_module.add_flag('c', '-DLUA_COMPAT_ALL', export=True);
#ifeq ("$(TARGET_OS)","Windows")
# myModule.compile_flags_CC('-D_WIN32')
# my_module.compile_flags_CC('-D_WIN32')
#else
myModule.compile_flags_CC('-DLUA_USE_LINUX')
my_module.add_flag('c', '-DLUA_USE_LINUX')
#endif
myModule.add_src_file([
my_module.add_src_file([
'lua/lapi.cpp',
'lua/lauxlib.cpp',
'lua/lbaselib.cpp',
@ -63,12 +75,39 @@ def create(target):
'lua/ltm.cpp',
'lua/lundump.cpp',
'lua/lvm.cpp',
'lua/lzio.cpp'])
# add the currrent module at the
return myModule
'lua/lzio.cpp',
])
my_module.add_header_file([
'lua/ltm.h',
'lua/llimits.h',
'lua/lctype.h',
'lua/lgc.h',
'lua/lstring.h',
'lua/lzio.h',
'lua/lmem.h',
'lua/lobject.h',
'lua/lvm.h',
'lua/ldebug.h',
'lua/lundump.h',
'lua/lcode.h',
'lua/ltable.h',
'lua/lfunc.h',
'lua/lparser.h',
'lua/lopcodes.h',
'lua/lua.h',
'lua/ldo.h',
'lua/llex.h',
'lua/lapi.h',
'lua/lstate.h',
'lua/lualib.h',
'lua/lauxlib.h',
'lua/luaconf.h',
])
my_module.compile_version('c', 1999, gnu=False)
return True

1
version.txt Normal file
View File

@ -0,0 +1 @@
5.2