Rename src/lua/*.h to src/lua/wrapper_*.h
These will be changed to conditionally include system Lua headers, e.g. "lua.h", instead of submodule Lua headers, e.g. "module/lua/lua.h". If a header named "lua.h" includes "lua.h", the build will fail due to recursion. This can't be solved using angle brackets to include system headers, because macos builds won't find them: In file included from /Users/runner/work/wesnoth/wesnoth/src/ai/registry.cpp:30: In file included from /Users/runner/work/wesnoth/wesnoth/src/ai/composite/aspect.hpp:24: In file included from /Users/runner/work/wesnoth/wesnoth/src/ai/lua/lua_object.hpp:25: /Users/runner/work/wesnoth/wesnoth/src/lua/lua.h:4:14: error: 'lua.h' file not found with <angled> include; use "quotes" instead #include <lua.h> ^~~~~~~ "lua.h" Renamed with (requires GNU sed): $ for f in src/lua/*.h; do > git mv "${f}" "src/lua/wrapper_${f#src/lua/}"; > done $ git grep -El -- '#[ \t]*include[ \t]+"lua/[^"]+[.]h"' src | \ > xargs sed -Ei -- ' > s|(#[ \t]*include[ \t]+"lua/)(lua[.]h")( )?|\1wrapper_\2|; > s|(#[ \t]*include[ \t]+"lua/)(lualib[.]h")( )?|\1wrapper_\2|; > s|(#[ \t]*include[ \t]+"lua/)(lauxlib[.]h")( )?|\1wrapper_\2|; > '
This commit is contained in:
parent
78d3b0c05c
commit
b5d073a2ad
38 changed files with 36 additions and 36 deletions
|
@ -24,7 +24,7 @@
|
|||
#include "ai/manager.hpp"
|
||||
#include "game_board.hpp"
|
||||
#include "log.hpp"
|
||||
#include "lua/lauxlib.h"
|
||||
#include "lua/wrapper_lauxlib.h"
|
||||
#include "map/map.hpp"
|
||||
#include "pathfind/pathfind.hpp"
|
||||
#include "resources.hpp"
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "ai/lua/aspect_advancements.hpp"
|
||||
|
||||
#include "log.hpp" // for LOG_STREAM, logger, etc
|
||||
#include "lua/lauxlib.h" // for luaL_ref, LUA_REFNIL, lua_isstring, etc
|
||||
#include "lua/wrapper_lauxlib.h" // for luaL_ref, LUA_REFNIL, lua_isstring, etc
|
||||
#include "map/location.hpp" // for map_location
|
||||
#include "serialization/string_utils.hpp" // for split
|
||||
#include "units/unit.hpp"
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
#include "ai/composite/contexts.hpp"
|
||||
#include "ai/default/aspect_attacks.hpp"
|
||||
|
||||
#include "lua/lauxlib.h"
|
||||
#include "lua/wrapper_lauxlib.h"
|
||||
|
||||
static lg::log_domain log_ai_engine_lua("ai/engine/lua");
|
||||
#define LOG_LUA LOG_STREAM(info, log_ai_engine_lua)
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "scripting/lua_common.hpp"
|
||||
#include "resources.hpp"
|
||||
|
||||
#include "lua/lauxlib.h"
|
||||
#include "lua/wrapper_lauxlib.h"
|
||||
|
||||
namespace ai {
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include "config.hpp"
|
||||
#include "log.hpp"
|
||||
#include "lua/lua.h"
|
||||
#include "lua/wrapper_lua.h"
|
||||
#include "map/location.hpp"
|
||||
#include "resources.hpp"
|
||||
#include "scripting/lua_common.hpp"
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include <fstream>
|
||||
#include <iomanip>
|
||||
|
||||
#include "lua/lua.h"
|
||||
#include "lua/wrapper_lua.h"
|
||||
|
||||
#include <SDL2/SDL.h>
|
||||
#include <SDL2/SDL_image.h>
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
#include <boost/range/adaptors.hpp>
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
#include "lua/lauxlib.h"
|
||||
#include "lua/wrapper_lauxlib.h"
|
||||
|
||||
struct lua_State;
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "lua/lualib.h"
|
||||
#include "lua/wrapper_lualib.h"
|
||||
|
||||
void ds(lua_State *L, const bool verbose_table = true);
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
#include <algorithm>
|
||||
#include <vector> // for vector, etc
|
||||
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
|
||||
#include "lua/lauxlib.h" // for luaL_checkinteger, lua_setfield, etc
|
||||
#include "lua/wrapper_lauxlib.h" // for luaL_checkinteger, lua_setfield, etc
|
||||
|
||||
#ifdef DEBUG_LUA
|
||||
#include "scripting/debug_lua.hpp"
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "lua_audio.hpp"
|
||||
|
||||
#include "log.hpp"
|
||||
#include "lua/lauxlib.h"
|
||||
#include "lua/wrapper_lauxlib.h"
|
||||
#include "scripting/lua_common.hpp"
|
||||
#include "scripting/push_check.hpp"
|
||||
#include "sound.hpp"
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "scripting/lua_color.hpp"
|
||||
#include "scripting/lua_common.hpp"
|
||||
#include "scripting/push_check.hpp"
|
||||
#include "lua/lauxlib.h"
|
||||
#include "lua/wrapper_lauxlib.h"
|
||||
#include "log.hpp"
|
||||
#include "game_config.hpp"
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#include <new> // for operator new
|
||||
#include <string> // for string, basic_string
|
||||
|
||||
#include "lua/lauxlib.h"
|
||||
#include "lua/wrapper_lauxlib.h"
|
||||
|
||||
static const char gettextKey[] = "gettext";
|
||||
static const char vconfigKey[] = "vconfig";
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
#include "lua/lauxlib.h"
|
||||
#include "lua/wrapper_lauxlib.h"
|
||||
#include "scripting/lua_common.hpp" // for new(L)
|
||||
|
||||
static lg::log_domain log_scripting_lua("scripting/lua");
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "scripting/lua_team.hpp"
|
||||
#include "scripting/lua_unit_attacks.hpp"
|
||||
#include "scripting/lua_unit_type.hpp"
|
||||
#include "lua/lauxlib.h"
|
||||
#include "lua/wrapper_lauxlib.h"
|
||||
#include "formula/callable_objects.hpp"
|
||||
#include "formula/formula.hpp"
|
||||
#include "variable.hpp"
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "lua/lauxlib.h" // for luaL_checkinteger, lua_setfield, etc
|
||||
#include "lua/wrapper_lauxlib.h" // for luaL_checkinteger, lua_setfield, etc
|
||||
|
||||
static lg::log_domain log_scripting_lua("scripting/lua");
|
||||
#define ERR_LUA LOG_STREAM(err, log_scripting_lua)
|
||||
|
|
|
@ -59,8 +59,8 @@
|
|||
#include <vector>
|
||||
#include <numeric>
|
||||
|
||||
#include "lua/lauxlib.h"
|
||||
#include "lua/lualib.h"
|
||||
#include "lua/wrapper_lauxlib.h"
|
||||
#include "lua/wrapper_lualib.h"
|
||||
|
||||
static lg::log_domain log_scripting_lua("scripting/lua");
|
||||
static lg::log_domain log_user("scripting/lua/user");
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "lua/lauxlib.h"
|
||||
#include "lua/wrapper_lauxlib.h"
|
||||
|
||||
namespace lua_map_location {
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "random.hpp"
|
||||
#include "SDL2/SDL_timer.h" // for SDL_GetTicks
|
||||
|
||||
#include "lua/lauxlib.h"
|
||||
#include "lua/wrapper_lauxlib.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <cmath>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "lua/lua.h"
|
||||
#include "lua/wrapper_lua.h"
|
||||
#include "map/location.hpp"
|
||||
#include "pathfind/pathfind.hpp"
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "scripting/lua_preferences.hpp"
|
||||
|
||||
#include "config.hpp"
|
||||
#include "lua/lauxlib.h"
|
||||
#include "lua/wrapper_lauxlib.h"
|
||||
#include "preferences/advanced.hpp"
|
||||
#include "preferences/general.hpp"
|
||||
#include "scripting/lua_common.hpp"
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <string>
|
||||
#include <cstring>
|
||||
|
||||
#include "lua/lauxlib.h"
|
||||
#include "lua/wrapper_lauxlib.h"
|
||||
|
||||
/**
|
||||
* Implementation for a lua reference to a race,
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <new>
|
||||
#include <string>
|
||||
|
||||
#include "lua/lauxlib.h"
|
||||
#include "lua/wrapper_lauxlib.h"
|
||||
|
||||
static lg::log_domain log_lua("scripting/lua");
|
||||
#define ERR_LUA LOG_STREAM(err, log_lua)
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include <boost/algorithm/string/trim.hpp>
|
||||
|
||||
#include "lua/lauxlib.h"
|
||||
#include "lua/wrapper_lauxlib.h"
|
||||
|
||||
namespace lua_stringx {
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "lua/lauxlib.h"
|
||||
#include "lua/wrapper_lauxlib.h"
|
||||
|
||||
/**
|
||||
* Implementation for a lua reference to a team,
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include <boost/dynamic_bitset.hpp>
|
||||
#include <boost/range/iterator_range.hpp>
|
||||
#include <unordered_map>
|
||||
#include "lua/lauxlib.h"
|
||||
#include "lua/wrapper_lauxlib.h"
|
||||
|
||||
static lg::log_domain log_scripting_lua_mapgen("scripting/lua/mapgen");
|
||||
#define LOG_LMG LOG_STREAM(info, log_scripting_lua_mapgen)
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "game_board.hpp"
|
||||
#include "play_controller.hpp"
|
||||
|
||||
#include "lua/lauxlib.h"
|
||||
#include "lua/wrapper_lauxlib.h"
|
||||
|
||||
static lg::log_domain log_scripting_lua("scripting/lua");
|
||||
#define LOG_LUA LOG_STREAM(info, log_scripting_lua)
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "game_version.hpp"
|
||||
#include "deprecation.hpp"
|
||||
|
||||
#include "lua/lauxlib.h"
|
||||
#include "lua/wrapper_lauxlib.h"
|
||||
|
||||
static lg::log_domain log_scripting_lua("scripting/lua");
|
||||
#define LOG_LUA LOG_STREAM(info, log_scripting_lua)
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "units/attack_type.hpp"
|
||||
#include "utils/const_clone.hpp"
|
||||
|
||||
#include "lua/lauxlib.h"
|
||||
#include "lua/wrapper_lauxlib.h"
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <string>
|
||||
#include <cstring>
|
||||
|
||||
#include "lua/lauxlib.h"
|
||||
#include "lua/wrapper_lauxlib.h"
|
||||
|
||||
/**
|
||||
* Implementation for a lua reference to a unit_type.
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "scripting/push_check.hpp"
|
||||
|
||||
|
||||
#include "lua/lauxlib.h"
|
||||
#include "lua/wrapper_lauxlib.h"
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "lua/lauxlib.h" // for luaL_checkinteger, lua_setfield, etc
|
||||
#include "lua/wrapper_lauxlib.h" // for luaL_checkinteger, lua_setfield, etc
|
||||
|
||||
static lg::log_domain log_scripting_lua("scripting/lua");
|
||||
#define ERR_LUA LOG_STREAM(err, log_scripting_lua)
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "lua/lauxlib.h"
|
||||
#include "lua/wrapper_lauxlib.h"
|
||||
|
||||
static lg::log_domain log_scripting_lua("scripting/lua");
|
||||
#define ERR_LUA LOG_STREAM(err, log_scripting_lua)
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#include <fstream>
|
||||
|
||||
#include "lua/lauxlib.h"
|
||||
#include "lua/wrapper_lauxlib.h"
|
||||
|
||||
namespace lua_wml {
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include <string>
|
||||
#include <functional>
|
||||
|
||||
#include "lua/lauxlib.h"
|
||||
#include "lua/wrapper_lauxlib.h"
|
||||
#include "scripting/push_check.hpp"
|
||||
#include "generators/default_map_generator_job.hpp"
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "scripting/lua_common.hpp"
|
||||
#include "scripting/lua_widget.hpp"
|
||||
|
||||
#include "lua/lauxlib.h"
|
||||
#include "lua/wrapper_lauxlib.h"
|
||||
#include "global.hpp"
|
||||
#include "tstring.hpp"
|
||||
#include "map/location.hpp"
|
||||
|
|
Loading…
Add table
Reference in a new issue