001-include-version-number.patch 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. From 96576b44a1b368bd6590eb0778ae45cc9ccede3f Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
  3. Date: Fri, 21 Jun 2019 14:08:38 +0200
  4. Subject: [PATCH] include version number
  5. Including it allows multiple lua versions to coexist.
  6. Signed-off-by: Rafał Miłecki <[email protected]>
  7. ---
  8. --- a/Makefile
  9. +++ b/Makefile
  10. @@ -12,7 +12,7 @@ PLAT= none
  11. # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h.
  12. INSTALL_TOP= /usr/local
  13. INSTALL_BIN= $(INSTALL_TOP)/bin
  14. -INSTALL_INC= $(INSTALL_TOP)/include
  15. +INSTALL_INC= $(INSTALL_TOP)/include/lua$V
  16. INSTALL_LIB= $(INSTALL_TOP)/lib
  17. INSTALL_MAN= $(INSTALL_TOP)/man/man1
  18. INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V
  19. @@ -39,10 +39,10 @@ RM= rm -f
  20. PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris
  21. # What to install.
  22. -TO_BIN= lua luac
  23. +TO_BIN= lua$V luac$V
  24. TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
  25. -TO_LIB= liblua.a
  26. -TO_MAN= lua.1 luac.1
  27. +TO_LIB= liblua$V.a
  28. +TO_MAN= lua$V.1 luac$V.1
  29. # Lua version and release.
  30. V= 5.3
  31. @@ -52,7 +52,7 @@ R= $V.4
  32. all: $(PLAT)
  33. $(PLATS) clean:
  34. - cd src && $(MAKE) $@
  35. + cd src && $(MAKE) $@ V=$V
  36. test: dummy
  37. src/lua -v
  38. diff --git a/doc/lua.1 b/doc/lua5.3.1
  39. rename from doc/lua.1
  40. rename to doc/lua5.3.1
  41. diff --git a/doc/luac.1 b/doc/luac5.3.1
  42. rename from doc/luac.1
  43. rename to doc/luac5.3.1
  44. diff --git a/src/Makefile b/src/Makefile
  45. --- a/src/Makefile
  46. +++ b/src/Makefile
  47. @@ -28,7 +28,7 @@ MYOBJS=
  48. PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris
  49. -LUA_A= liblua.a
  50. +LUA_A= liblua$V.a
  51. CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \
  52. lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o \
  53. ltm.o lundump.o lvm.o lzio.o
  54. @@ -36,10 +36,10 @@ LIB_O= lauxlib.o lbaselib.o lbitlib.o lc
  55. lmathlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o loadlib.o linit.o
  56. BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS)
  57. -LUA_T= lua
  58. +LUA_T= lua$V
  59. LUA_O= lua.o
  60. -LUAC_T= luac
  61. +LUAC_T= luac$V
  62. LUAC_O= luac.o
  63. ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)