001-include-version-number.patch 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. diff --git a/Makefile b/Makefile
  9. --- a/Makefile
  10. +++ b/Makefile
  11. @@ -41,10 +41,10 @@ RANLIB= ranlib
  12. PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
  13. # What to install.
  14. -TO_BIN= lua luac
  15. +TO_BIN= lua$V luac$V
  16. TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
  17. TO_LIB= liblua.a
  18. -TO_MAN= lua.1 luac.1
  19. +TO_MAN= lua$V.1 luac$V.1
  20. # Lua version and release.
  21. V= 5.1
  22. @@ -53,7 +53,7 @@ R= 5.1.5
  23. all: $(PLAT)
  24. $(PLATS) clean:
  25. - cd src && $(MAKE) $@
  26. + cd src && $(MAKE) $@ V=$V
  27. test: dummy
  28. src/lua test/hello.lua
  29. diff --git a/doc/lua.1 b/doc/lua5.1.1
  30. rename from doc/lua.1
  31. rename to doc/lua5.1.1
  32. diff --git a/doc/luac.1 b/doc/luac5.1.1
  33. rename from doc/luac.1
  34. rename to doc/luac5.1.1
  35. diff --git a/src/Makefile b/src/Makefile
  36. --- a/src/Makefile
  37. +++ b/src/Makefile
  38. @@ -29,10 +29,10 @@ CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
  39. LIB_O= lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o \
  40. lstrlib.o loadlib.o linit.o
  41. -LUA_T= lua
  42. +LUA_T= lua$V
  43. LUA_O= lua.o
  44. -LUAC_T= luac
  45. +LUAC_T= luac$V
  46. LUAC_O= luac.o print.o
  47. ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)