fritzkink
2023-10-03 3c9fcad8bd25aa12e6af2fb6276d10211fcf93ee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
--- lua-5.4.6/Makefile    2023-05-02 22:06:08.000000000 +0200
+++ lua-5.4.6/Makefile.new    2023-10-02 22:46:58.368043987 +0200
@@ -10,19 +10,20 @@
 # so take care if INSTALL_TOP is not an absolute path. See the local target.
 # You may want to make INSTALL_LMOD and INSTALL_CMOD consistent with
 # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h.
-INSTALL_TOP= /usr/local
+INSTALL_TOP= $(ROOT)/usr
 INSTALL_BIN= $(INSTALL_TOP)/bin
-INSTALL_INC= $(INSTALL_TOP)/include
+INSTALL_INC= $(INSTALL_TOP)/include/lua$V
 INSTALL_LIB= $(INSTALL_TOP)/lib
-INSTALL_MAN= $(INSTALL_TOP)/man/man1
+INSTALL_MAN= $(INSTALL_TOP)/share/man/man1
 INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V
 INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V
+INSTALL_DOC= $(INSTALL_TOP)/share/doc/lua$V
 
 # How to install. If your install program does not support "-p", then
 # you may have to run ranlib on the installed liblua.a.
-INSTALL= install -p
-INSTALL_EXEC= $(INSTALL) -m 0755
-INSTALL_DATA= $(INSTALL) -m 0644
+INSTALL= ginstall -p
+INSTALL_EXEC= $(INSTALL) -m 0555
+INSTALL_DATA= $(INSTALL) -m 0444
 #
 # If you don't have "install" you can use "cp" instead.
 # INSTALL= cp -p
@@ -39,10 +40,11 @@
 PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris
 
 # What to install.
-TO_BIN= lua luac
+TO_BIN= lua$V luac$V
 TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
-TO_LIB= liblua.a
-TO_MAN= lua.1 luac.1
+TO_LIB= liblua$V.so
+TO_MAN= lua$V.1 luac$V.1
+TO_DOC= contents.html osi-certified-72x60.png logo.gif lua.css manual.css manual.html readme.html
 
 # Lua version and release.
 V= 5.4
@@ -55,11 +57,13 @@
     @cd src && $(MAKE) $@
 
 install: dummy
-    cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
+    cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_DOC) $(INSTALL_MAN) $(INSTALL_TEST)
     cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
     cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
-    cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
+    cd src && $(INSTALL_EXEC) $(TO_LIB) $(INSTALL_LIB)
+    cd doc && cp lua.1 lua$V.1 && cp luac.1 luac$V.1
     cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
+    cd doc && $(INSTALL_DATA) $(TO_DOC) $(INSTALL_DOC)
 
 uninstall:
     cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN)