3.7 Unix Makefiles

Copy lib/lua-$(VERSION)/src/liblua.h to lib/lua/ rather than lib/.

Instead of copying any of the header files or telling the compiler
where to find the lua ones, generate include/nhlua.h on the fly and
restrict the knowledge of where they are to it (paths are relative
to include/).

|/* nhlua.h - generated by top Makefile */
|#include "../lib/lua-5.3.5/src/lua.h"
|LUA_API int   (lua_error) (lua_State *L) NORETURN;
|#include "../lib/lua-5.3.5/src/lualib.h"
|#include "../lib/lua-5.3.5/src/lauxlib.h"
|/*nhlua.h*/

This might need to be redone (or augmented by having CFLAGS add back
'-I path-to-lua') if some compiler can't find '#include "luaconf.h"'
issued by lua.h.
This commit is contained in:
PatR
2019-11-26 19:27:00 -08:00
parent 2a78011030
commit 865607a392
4 changed files with 23 additions and 29 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 system.h $NHDT-Date: 1550268586 2019/02/15 22:09:46 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.17 $ */
/* NetHack 3.6 system.h $NHDT-Date: 1574825213 2019/11/27 03:26:53 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.22 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2017. */
/* NetHack may be freely redistributed. See license for details. */
@@ -570,9 +570,7 @@ E int FDECL(atoi, (const char *));
#endif /* WIN32 */
#if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_TARGET)
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
#include "nhlua.h"
#if defined(WIN32)
#define LUA_INTCAST(i) ((int) i)
@@ -580,4 +578,5 @@ E int FDECL(atoi, (const char *));
#define LUA_INTCAST(i) (i)
#endif
#endif /* !CROSSCOMPILE || CROSSCOMPILE_TARGET */
#endif /* SYSTEM_H */