edit lua_api_version.h instead of autogenerating it

This will help those who do not use ccache :-)


Origin commit data
------------------
Commit: 96d7401e08
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2016-01-01 (Fri, 01 Jan 2016)
This commit is contained in:
Stefan Seyfried
2016-01-01 14:14:55 +01:00
committed by vanhofen
parent 4a1ebe9900
commit 06d46d67e2
3 changed files with 7 additions and 20 deletions

View File

@@ -40,18 +40,3 @@ libneutrino_gui_lua_a_SOURCES = \
lua_threads_functions.cpp \ lua_threads_functions.cpp \
lua_video.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

@@ -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

View File

@@ -30,11 +30,6 @@ extern "C" {
#include "luainstance_helpers.h" #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); void LuaInstRegisterFunctions(lua_State *L, bool fromThreads=false);
/* inspired by Steve Kemp http://www.steve.org.uk/ */ /* inspired by Steve Kemp http://www.steve.org.uk/ */