diff --git a/src/gui/lua/Makefile.am b/src/gui/lua/Makefile.am index eab73c11d..4cf5c50aa 100644 --- a/src/gui/lua/Makefile.am +++ b/src/gui/lua/Makefile.am @@ -40,18 +40,3 @@ libneutrino_gui_lua_a_SOURCES = \ lua_threads_functions.cpp \ lua_video.cpp -# the continuous changes of LUA_API_VERSION_* in luainstance.h -# are not only of questionable usefulness, but they also cause -# rebuilds all over the place, even though it is only used in -# 2(!) source files. So split out those two definitions into an -# autogenerated separate file, they are #if 0'ed in luainstance.h -# already and the rest is dealt with via ccache... -BUILT_SOURCES = lua_api_version.h -lua_api_version.h: luainstance.h - @rm -f $@ - grep '^#define.*LUA_API' $(srcdir)/luainstance.h > $@ - -noinst_HEADERS = lua_api_version.h - -# so that lua_api_version.h can be found... -AM_CPPFLAGS += -I$(builddir) diff --git a/src/gui/lua/lua_api_version.h b/src/gui/lua/lua_api_version.h new file mode 100644 index 000000000..c5a53aad9 --- /dev/null +++ b/src/gui/lua/lua_api_version.h @@ -0,0 +1,7 @@ +/* + * this is only used in two code files, so put it into its own + * header to reduce complete neutrino rebuilding all the time due + * to luainstance.h changes + */ +#define LUA_API_VERSION_MAJOR 1 +#define LUA_API_VERSION_MINOR 37 diff --git a/src/gui/lua/luainstance.h b/src/gui/lua/luainstance.h index 6e803e69a..69311a9b9 100644 --- a/src/gui/lua/luainstance.h +++ b/src/gui/lua/luainstance.h @@ -30,11 +30,6 @@ extern "C" { #include "luainstance_helpers.h" -#if 0 -#define LUA_API_VERSION_MAJOR 1 -#define LUA_API_VERSION_MINOR 37 -#endif - void LuaInstRegisterFunctions(lua_State *L, bool fromThreads=false); /* inspired by Steve Kemp http://www.steve.org.uk/ */