avoid continuous rebuilds from LUA_API* changes

Origin commit data
------------------
Branch: ni/coolstream
Commit: 5a7d91c77d
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2015-12-14 (Mon, 14 Dec 2015)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2015-12-14 12:59:12 +01:00
parent 91e77562b0
commit 0a6026dc32
4 changed files with 24 additions and 0 deletions

View File

@@ -38,3 +38,19 @@ libneutrino_gui_lua_a_SOURCES = \
lua_messagebox.cpp \
lua_misc.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

@@ -33,6 +33,9 @@
#include "luainstance.h"
#include "lua_misc.h"
/* autogenerated from luainstance.h */
#include "lua_api_version.h"
CLuaInstMisc* CLuaInstMisc::getInstance()
{
static CLuaInstMisc* LuaInstMisc = NULL;

View File

@@ -48,6 +48,9 @@
#include "lua_misc.h"
#include "lua_video.h"
/* autogenerated from luainstance.h */
#include "lua_api_version.h"
extern CPictureViewer * g_PicViewer;
static void set_lua_variables(lua_State *L)

View File

@@ -30,8 +30,10 @@ extern "C" {
#include "luainstance_helpers.h"
#if 0
#define LUA_API_VERSION_MAJOR 1
#define LUA_API_VERSION_MINOR 27
#endif
/* inspired by Steve Kemp http://www.steve.org.uk/ */
class CLuaInstance