Move premake namespace creation into host

This commit is contained in:
Jason Perkins 2015-02-03 16:14:52 -05:00
parent ae6ee359d1
commit cca1ea6643
2 changed files with 6 additions and 3 deletions

View File

@ -1,9 +1,8 @@
--- ---
-- Base definitions required by all the other scripts. -- Base definitions required by all the other scripts.
-- @copyright 2002-2013 Jason Perkins and the Premake project -- @copyright 2002-2015 Jason Perkins and the Premake project
--- ---
premake = {}
premake.modules = {} premake.modules = {}
premake.tools = {} premake.tools = {}

View File

@ -1,7 +1,7 @@
/** /**
* \file premake.c * \file premake.c
* \brief Program entry point. * \brief Program entry point.
* \author Copyright (c) 2002-2014 Jason Perkins and the Premake project * \author Copyright (c) 2002-2015 Jason Perkins and the Premake project
*/ */
#include <stdlib.h> #include <stdlib.h>
@ -115,6 +115,10 @@ int premake_init(lua_State* L)
os_getcwd(L); os_getcwd(L);
lua_setglobal(L, "_WORKING_DIR"); lua_setglobal(L, "_WORKING_DIR");
/* start the premake namespace */
lua_newtable(L);
lua_setglobal(L, "premake");
return OKAY; return OKAY;
} }