Index: code/branches/buildsystem/src/tolua/CMakeLists.txt
===================================================================
--- code/branches/buildsystem/src/tolua/CMakeLists.txt	(revision 2260)
+++ code/branches/buildsystem/src/tolua/CMakeLists.txt	(revision 2275)
@@ -18,7 +18,9 @@
 TARGET_LINK_LIBRARIES(toluaexe_orxonox tolualib_orxonox ${LUA_LIBRARIES})
 
-SET(TOLUA_PARSER_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/all.lua" PARENT_SCOPE)
+# TODO: determine lua version and set appropriate pack file
+SET(TOLUA_ALL_PACK all-5.1.lua)
+SET(TOLUA_PARSER_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/${TOLUA_ALL_PACK}" PARENT_SCOPE)
 SET(TOLUA_PARSER_DEPENDENCIES
-  ${CMAKE_CURRENT_SOURCE_DIR}/all.lua
+  ${CMAKE_CURRENT_SOURCE_DIR}/${TOLUA_ALL_PACK}
   ${CMAKE_CURRENT_SOURCE_DIR}/lua/compat-5.1.lua
   ${CMAKE_CURRENT_SOURCE_DIR}/lua/compat.lua
Index: code/branches/buildsystem/src/tolua/all-5.0.lua
===================================================================
--- code/branches/buildsystem/src/tolua/all-5.0.lua	(revision 2275)
+++ code/branches/buildsystem/src/tolua/all-5.0.lua	(revision 2275)
@@ -0,0 +1,28 @@
+dofile(path.."lua/compat.lua")
+dofile(path.."lua/basic.lua")
+dofile(path.."lua/feature.lua")
+dofile(path.."lua/verbatim.lua")
+dofile(path.."lua/code.lua")
+dofile(path.."lua/typedef.lua")
+dofile(path.."lua/container.lua")
+dofile(path.."lua/package.lua")
+dofile(path.."lua/module.lua")
+dofile(path.."lua/namespace.lua")
+dofile(path.."lua/define.lua")
+dofile(path.."lua/enumerate.lua")
+dofile(path.."lua/declaration.lua")
+dofile(path.."lua/variable.lua")
+dofile(path.."lua/array.lua")
+dofile(path.."lua/function.lua")
+dofile(path.."lua/operator.lua")
+dofile(path.."lua/class.lua")
+dofile(path.."lua/clean.lua")
+--dofile(path.."lua/custom.lua")
+dofile(path.."lua/doit.lua")
+
+local err,msg = xpcall(doit, debug.traceback)
+if not err then
+--print("**** msg is "..tostring(msg))
+ local _,_,label,msg = strfind(msg,"(.-:.-:%s*)(.*)")
+ tolua_error(msg,label)
+end
Index: code/branches/buildsystem/src/tolua/all-5.1.lua
===================================================================
--- code/branches/buildsystem/src/tolua/all-5.1.lua	(revision 2275)
+++ code/branches/buildsystem/src/tolua/all-5.1.lua	(revision 2275)
@@ -0,0 +1,29 @@
+dofile(path.."lua/compat-5.1.lua")
+dofile(path.."lua/compat.lua")
+dofile(path.."lua/basic.lua")
+dofile(path.."lua/feature.lua")
+dofile(path.."lua/verbatim.lua")
+dofile(path.."lua/code.lua")
+dofile(path.."lua/typedef.lua")
+dofile(path.."lua/container.lua")
+dofile(path.."lua/package.lua")
+dofile(path.."lua/module.lua")
+dofile(path.."lua/namespace.lua")
+dofile(path.."lua/define.lua")
+dofile(path.."lua/enumerate.lua")
+dofile(path.."lua/declaration.lua")
+dofile(path.."lua/variable.lua")
+dofile(path.."lua/array.lua")
+dofile(path.."lua/function.lua")
+dofile(path.."lua/operator.lua")
+dofile(path.."lua/class.lua")
+dofile(path.."lua/clean.lua")
+--dofile(path.."lua/custom.lua")
+dofile(path.."lua/doit.lua")
+
+local err,msg = xpcall(doit, debug.traceback)
+if not err then
+--print("**** msg is "..tostring(msg))
+ local _,_,label,msg = strfind(msg,"(.-:.-:%s*)(.*)")
+ tolua_error(msg,label)
+end
Index: code/branches/buildsystem/src/tolua/all.lua
===================================================================
--- code/branches/buildsystem/src/tolua/all.lua	(revision 2260)
+++ 	(revision )
@@ -1,29 +1,0 @@
-dofile(path.."lua/compat-5.1.lua")
-dofile(path.."lua/compat.lua")
-dofile(path.."lua/basic.lua")
-dofile(path.."lua/feature.lua")
-dofile(path.."lua/verbatim.lua")
-dofile(path.."lua/code.lua")
-dofile(path.."lua/typedef.lua")
-dofile(path.."lua/container.lua")
-dofile(path.."lua/package.lua")
-dofile(path.."lua/module.lua")
-dofile(path.."lua/namespace.lua")
-dofile(path.."lua/define.lua")
-dofile(path.."lua/enumerate.lua")
-dofile(path.."lua/declaration.lua")
-dofile(path.."lua/variable.lua")
-dofile(path.."lua/array.lua")
-dofile(path.."lua/function.lua")
-dofile(path.."lua/operator.lua")
-dofile(path.."lua/class.lua")
-dofile(path.."lua/clean.lua")
---dofile(path.."lua/custom.lua")
-dofile(path.."lua/doit.lua")
-
-local err,msg = xpcall(doit, debug.traceback)
-if not err then
---print("**** msg is "..tostring(msg))
- local _,_,label,msg = strfind(msg,"(.-:.-:%s*)(.*)")
- tolua_error(msg,label)
-end
