support for build with current Lua version 5.4.3

On some platforms this may require:
	make spotless
	make fetch-lua

I did attempt to force a reminder message about the latter to
Makefile.top this time, and hope that works correctly for everyone.
This commit is contained in:
nhmall
2021-06-02 19:12:47 -04:00
parent 9e59977c79
commit e69808987e
15 changed files with 47 additions and 41 deletions

View File

@@ -42,13 +42,13 @@ PDCURSES_TOP=../../pdcurses
ifeq "$(LUA_VERSION)" "5.3.5"
LUAVER=5.3.5
else
LUAVER=5.4.2
LUAVER=5.4.3
endif
#---------------------------------------------------------------
# Location of LUA
#
# Original source needs to be obtained from:
# http://www.lua.org/ftp/lua-5.4.2.tar.gz
# http://www.lua.org/ftp/lua-5.4.3.tar.gz
#
# This build assumes that the LUA sources are located
# at the specified location. If they are actually elsewhere
@@ -305,7 +305,7 @@ ALLOBJ = $(VOBJ) $(SOBJ) $(TILOBJ) $(TILOBJ2) $(VVOBJ)
#===============-=================================================
# LUA library
# Source from http://www.lua.org/ftp/lua-5.4.2.tar.gz
# Source from http://www.lua.org/ftp/lua-5.4.3.tar.gz
#=================================================================
LUASRC = $(LUATOP)/src

View File

@@ -12,7 +12,7 @@ if [ -z "$GCCVER" ]; then
fi
if [ -z "$LUA_VERSION" ]; then
export LUA_VERSION=5.4.2
export LUA_VERSION=5.4.3
fi
if [ ! -d "$(pwd)/lib" ]; then

View File

@@ -85,7 +85,7 @@ VARDAT = $(VARDATD) $(VARDATND)
#CHGRP = chgrp
# Lua version
LUA_VERSION = 5.4.2
LUA_VERSION = 5.4.3
#
# end of configuration
@@ -131,6 +131,9 @@ include/nhlua.h: $(TOPLUALIB)
@echo '#include "../lib/lua-$(LUA_VERSION)/src/lualib.h"' >> $@
@echo '#include "../lib/lua-$(LUA_VERSION)/src/lauxlib.h"' >> $@
@echo '/*nhlua.h*/' >> $@
lib/lua-$(LUA_VERSION)/src/lua.h:
echo "Please do 'make fetch-lua' to obtain lua-$(LUA_VERSION)"
false
# Note: many of the dependencies below are here to allow parallel make
# to generate valid output

View File

@@ -1338,7 +1338,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\ncd \"${NH_INC_DIR}\"\necho '/* nhlua.h - generated by Xcode script */' > nhlua.h\necho '#include \"../lib/lua-5.4.2/src/lua.h\"' >> nhlua.h\nsed -e '/(lua_error)/!d' -e '/(lua_error)/s/;/ NORETURN;/1' < \"${NH_LIB_DIR}\"/lua-5.4.2/src/lua.h >> nhlua.h\necho '#include \"../lib/lua-5.4.2/src/lualib.h\"' >> nhlua.h\necho '#include \"../lib/lua-5.4.2/src/lauxlib.h\"' >> nhlua.h\necho '/*nhlua.h*/' >> nhlua.h\n";
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\ncd \"${NH_INC_DIR}\"\necho '/* nhlua.h - generated by Xcode script */' > nhlua.h\necho '#include \"../lib/lua-5.4.3/src/lua.h\"' >> nhlua.h\nsed -e '/(lua_error)/!d' -e '/(lua_error)/s/;/ NORETURN;/1' < \"${NH_LIB_DIR}\"/lua-5.4.3/src/lua.h >> nhlua.h\necho '#include \"../lib/lua-5.4.3/src/lualib.h\"' >> nhlua.h\necho '#include \"../lib/lua-5.4.3/src/lauxlib.h\"' >> nhlua.h\necho '/*nhlua.h*/' >> nhlua.h\n";
};
544768B8239954B9004B9739 /* Build Lua library */ = {
isa = PBXShellScriptBuildPhase;
@@ -1357,7 +1357,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\ncd \"${NH_LIB_DIR}\"\nmkdir -p lua\ncd \"${NH_LIB_DIR}\"/lua-5.4.2/src\nmake a\ncp liblua.a ../../lua\ncd ../../..\n\n";
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\ncd \"${NH_LIB_DIR}\"\nmkdir -p lua\ncd \"${NH_LIB_DIR}\"/lua-5.4.3/src\nmake a\ncp liblua.a ../../lua\ncd ../../..\n\n";
};
/* End PBXShellScriptBuildPhase section */

View File

@@ -36,9 +36,9 @@ endif
ifdef BUILD_TARGET_LUA
#===============-=================================================
# LUA library
# Source from http://www.lua.org/ftp/lua-5.4.2.tar.gz
# Source from http://www.lua.org/ftp/lua-5.4.3.tar.gz
#=================================================================
LUA_VERSION ?=5.4.2
LUA_VERSION ?=5.4.3
LUATOP ?= ../lib/lua-$(LUA_VERSION)
LUASRCDIR ?= $(LUATOP)/src
LUAOBJFILES1 = $(TARGETPFX)lapi.o $(TARGETPFX)lauxlib.o \
@@ -129,7 +129,7 @@ ifdef CROSS_TO_MSDOS
# 2. Then
# make CROSS_TO_MSDOS=1 WANT_WIN_TTY=1 WANT_WIN_CURSES=1 all
#
# Source from http://www.lua.org/ftp/lua-5.4.2.tar.gz
# Source from http://www.lua.org/ftp/lua-5.4.3.tar.gz
#=================================================================
CFLAGS += -DCROSSCOMPILE

View File

@@ -47,7 +47,7 @@ version. You can use one of the following build environments:
| | |
+----+ +------+ +-----------+
| | | | | |
share winnt tty win32 Lua-5.4.2 pdcurses
share winnt tty win32 Lua-5.4.3 pdcurses
|
vs
@@ -55,11 +55,11 @@ version. You can use one of the following build environments:
| Building And Running Using Visual Studio 2017 or 2019 |
\--------------------------------------------------------/
Before proceeding, please obtain the lua-5.4.2 sources and copy them to
the new directory lib\lua-5.4.2\src. This source can be obtain either from
http://www.lua.org/ftp/lua-5.4.2.tar.gz or from the git hub mirror
https://github.com/lua/lua.git using the tag 'v5.4.2'. The build expects
to find lua files such as 'lua.h' at 'lib\lua-5.4.2\src\lua.h'.
Before proceeding, please obtain the lua-5.4.3 sources and copy them to
the new directory lib\lua-5.4.3\src. This source can be obtained either from
http://www.lua.org/ftp/lua-5.4.3.tar.gz or from the git hub mirror
https://github.com/lua/lua.git using the tag 'v5.4.3'. The build expects
to find lua files such as 'lua.h' at 'lib\lua-5.4.3\src\lua.h'.
If you are NOT using Visual Studio 2017 or 2019 IDE, or you prefer to build
using a Make utility and a Makefile proceed to "Building Using Make".

View File

@@ -127,7 +127,7 @@ TARGET_CPU=x86
#
#---------------------------------------------------------------
ifndef LUA_VERSION
LUAVER=5.4.2
LUAVER=5.4.3
else
LUAVER=$(LUA_VERSION)
endif
@@ -135,7 +135,7 @@ endif
# Location of LUA
#
# Original source needs to be obtained from:
# http://www.lua.org/ftp/lua-5.4.2.tar.gz
# http://www.lua.org/ftp/lua-5.4.3.tar.gz
#
# This build assumes that the LUA sources are located
# at the specified location. If they are actually elsewhere
@@ -418,11 +418,11 @@ OPTIONS_FILE = $(DAT)\options
#===============-=================================================
# LUA library
# Source from http://www.lua.org/ftp/lua-5.4.2.tar.gz
# Source from http://www.lua.org/ftp/lua-5.4.3.tar.gz
#=================================================================
ifndef LUAVER
LUAVER = 5.4.2
LUAVER = 5.4.3
endif
ifndef LUASRC
LUASRC = $(LUATOP)/src

View File

@@ -131,7 +131,7 @@ DEBUGINFO = Y
# This marks the end of the BUILD DECISIONS section.
#==============================================================================
!IFNDEF LUA_VERSION
LUAVER=5.4.2
LUAVER=5.4.3
!ELSE
LUAVER=$(LUA_VERSION)
!ENDIF
@@ -140,7 +140,7 @@ LUAVER=$(LUA_VERSION)
# Location of LUA
#
# Original source needs to be obtained from:
# http://www.lua.org/ftp/lua-5.4.2.tar.gz
# http://www.lua.org/ftp/lua-5.4.3.tar.gz
#
# This build assumes that the LUA sources are located
# at the specified location. If they are actually elsewhere
@@ -384,7 +384,7 @@ OPTIONS_FILE = $(DAT)\options
#===============-=================================================
# LUA library
# Source from http://www.lua.org/ftp/lua-5.4.2.tar.gz
# Source from http://www.lua.org/ftp/lua-5.4.3.tar.gz
#=================================================================
!IFNDEF LUAVER
@@ -400,6 +400,9 @@ LUAVER = 5.4.1
!IF "$(LUATMP)" == "5.4.2"
LUAVER = 5.4.2
!ENDIF
!IF "$(LUATMP)" == "5.4.3"
LUAVER = 5.4.3
!ENDIF
!ELSE
!ERROR NetHack 3.7 requires LUA so LUATOP must be defined
!ENDIF
@@ -410,7 +413,7 @@ LUATMP = $(LUATMP:-BETA=) #strip suffix if exists "-BETA"
!IF "$(LUATMP)" == "5.3.5"
LUAVER = 5.3.5
!ELSE
LUAVER = 5.4.2
LUAVER = 5.4.3
!ENDIF
!ENDIF
!ENDIF

View File

@@ -3,6 +3,6 @@ mkdir -p lib
cd lib
git clone --depth 1 https://github.com/wmcbrine/PDCurses.git pdcurses
#git clone --depth 1 https://github.com/universal-ctags/ctags.git ctags
curl -R -O http://www.lua.org/ftp/lua-5.4.2.tar.gz
tar zxf lua-5.4.2.tar.gz
curl -R -O http://www.lua.org/ftp/lua-5.4.3.tar.gz
tar zxf lua-5.4.3.tar.gz
cd ../