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 nhlua.c $NHDT-Date: 1574646949 2019/11/25 01:55:49 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.8 $ */
/* NetHack 3.6 nhlua.c $NHDT-Date: 1574825214 2019/11/27 03:26:54 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.9 $ */
/* Copyright (c) 2018 by Pasi Kallinen */
/* NetHack may be freely redistributed. See license for details. */
@@ -37,7 +37,6 @@ nhl_error(L, msg)
lua_State *L;
const char *msg;
{
extern int FDECL(lua_error, (lua_State *)) NORETURN;
lua_Debug ar;
char buf[BUFSZ];