build with the current Lua version 5.4.0 by default if not overridden

This commit is contained in:
nhmall
2020-07-07 17:36:23 -04:00
parent 2c571dcfe7
commit b967f73b96
19 changed files with 143 additions and 79 deletions
+10 -4
View File
@@ -312,13 +312,19 @@ $(HOST_O)prereq.tag: $(INCL)/nhlua.h hobj.tag $(U)makedefs \
$(HOST_O)utility.tag $(DAT)/nhdat
echo prereq done >$@
ifeq "$(LUA_VERSION)" "5.3.5"
LUAVER=5.3.5
else
LUAVER=5.4.0
endif
$(INCL)/nhlua.h:
cd $(INCL); \
echo '/* nhlua.h - generated by Makefile1.cross */' > $@; \
echo '#include "../lib/lua-5.3.5/src/lua.h"' >> $@; \
sed -e '/(lua_error)/!d' -e '/(lua_error)/s/;/ NORETURN;/1' < $(LIB)/lua-5.3.5/src/lua.h >> $@; \
echo '#include "../lib/lua-5.3.5/src/lualib.h"' >> $@; \
echo '#include "../lib/lua-5.3.5/src/lauxlib.h"' >> $@; \
echo '#include "../lib/lua-$(LUAVER)/src/lua.h"' >> $@; \
sed -e '/(lua_error)/!d' -e '/(lua_error)/s/;/ NORETURN;/1' < $(LIB)/lua-$(LUAVER)/src/lua.h >> $@; \
echo '#include "../lib/lua-$(LUAVER)/src/lualib.h"' >> $@; \
echo '#include "../lib/lua-$(LUAVER)/src/lauxlib.h"' >> $@; \
echo '/*nhlua.h*/' >> $@; \
cd $(SRC)