avoid continuous rebuilds from LUA_API* changes

Signed-off-by: M. Liebmann <tuxcode.bbg@gmail.com>
This commit is contained in:
Stefan Seyfried
2015-12-14 12:59:12 +01:00
committed by M. Liebmann
parent 85b03349e9
commit 59f91b190c
4 changed files with 24 additions and 0 deletions

View File

@@ -45,3 +45,19 @@ libneutrino_gui_lua_a_SOURCES = \
lua_threads_copy.cpp \
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)

View File

@@ -36,6 +36,9 @@
#include "luainstance.h"
#include "lua_misc.h"
/* autogenerated from luainstance.h */
#include "lua_api_version.h"
extern CVolume* g_volume;
CLuaInstMisc* CLuaInstMisc::getInstance()

View File

@@ -49,6 +49,9 @@
#include "lua_threads.h"
#include "lua_video.h"
/* autogenerated from luainstance.h */
#include "lua_api_version.h"
extern CPictureViewer * g_PicViewer;
extern cVideo * videoDecoder;

View File

@@ -31,8 +31,10 @@ extern "C" {
#include "luainstance_helpers.h"
#if 0
#define LUA_API_VERSION_MAJOR 1
#define LUA_API_VERSION_MINOR 35
#endif
void LuaInstRegisterFunctions(lua_State *L, bool fromThreads=false);