Debian Codegraph @

Makefile

raw ◀ ▶
1 Debian patch touch this file
1 # Makefile for installing Lua
2 # See doc/readme.html for installation and customization instructions.
3
4 # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================
5
6 # Your platform. See PLATS for possible values.
7 PLAT= guess
8
9 # Where to install. The installation starts in the src and doc directories,
10 # so take care if INSTALL_TOP is not an absolute path. See the local target.
11 # You may want to make INSTALL_LMOD and INSTALL_CMOD consistent with
12 # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h.
•13 INSTALL_TOP= $(shell pwd)/debian/tmp/usr
14 INSTALL_BIN= $(INSTALL_TOP)/bin
•15 INSTALL_INC= $(INSTALL_TOP)/include/lua5.4/
16 INSTALL_LIB= $(INSTALL_TOP)/lib/$(DEB_HOST_MULTIARCH)/
17 INSTALL_MAN= $(INSTALL_TOP)/share/man/man1
18 INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V
•19 INSTALL_CMOD= $(INSTALL_TOP)/lib/$(DEB_HOST_MULTIARCH)/lua/$V
20
21 # How to install. If your install program does not support "-p", then
22 # you may have to run ranlib on the installed liblua.a.
23 INSTALL= install -p
24 INSTALL_EXEC= $(INSTALL) -m 0755
25 INSTALL_DATA= $(INSTALL) -m 0644
•26 INSTALL_LIBTOOL= $(LIBTOOL) --mode=install install -m 0644
27 #
28 # If you don't have "install" you can use "cp" instead.
29 # INSTALL= cp -p
30 # INSTALL_EXEC= $(INSTALL)
31 # INSTALL_DATA= $(INSTALL)
32
33 # Other utilities.
34 MKDIR= mkdir -p
35 RM= rm -f
36
37 # == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
38
39 # Convenience platforms targets.
40 PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris
41
42 # What to install.
•43 TO_BIN= lua$(V) luac$(V)
44 TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
•45 TO_LIB= liblua$(V).la liblua$(V)-c++.la
46 TO_MAN= lua$(V).1 luac$(V).1
47
48 # Lua version and release.
49 V= 5.4
50 R= $V.8
51
52 # Targets start here.
53 all: $(PLAT)
54
55 $(PLATS) help test clean:
•56 @cd src && $(MAKE) $@ V=$(V)
57
58 install: dummy
59 cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
60 cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
61 cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
•62 cd src && $(INSTALL_LIBTOOL) $(TO_LIB) $(INSTALL_LIB)
63 cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
64
65 uninstall:
66 cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN)
67 cd src && cd $(INSTALL_INC) && $(RM) $(TO_INC)
68 cd src && cd $(INSTALL_LIB) && $(RM) $(TO_LIB)
69 cd doc && cd $(INSTALL_MAN) && $(RM) $(TO_MAN)
70
71 local:
72 $(MAKE) install INSTALL_TOP=../install
73
74 # make may get confused with install/ if it does not support .PHONY.
75 dummy:
76
77 # Echo config parameters.
78 echo:
79 @cd src && $(MAKE) -s echo
80 @echo "PLAT= $(PLAT)"
81 @echo "V= $V"
82 @echo "R= $R"
83 @echo "TO_BIN= $(TO_BIN)"
84 @echo "TO_INC= $(TO_INC)"
85 @echo "TO_LIB= $(TO_LIB)"
86 @echo "TO_MAN= $(TO_MAN)"
87 @echo "INSTALL_TOP= $(INSTALL_TOP)"
88 @echo "INSTALL_BIN= $(INSTALL_BIN)"
89 @echo "INSTALL_INC= $(INSTALL_INC)"
90 @echo "INSTALL_LIB= $(INSTALL_LIB)"
91 @echo "INSTALL_MAN= $(INSTALL_MAN)"
92 @echo "INSTALL_LMOD= $(INSTALL_LMOD)"
93 @echo "INSTALL_CMOD= $(INSTALL_CMOD)"
94 @echo "INSTALL_EXEC= $(INSTALL_EXEC)"
95 @echo "INSTALL_DATA= $(INSTALL_DATA)"
96
97 # Echo pkg-config data.
98 pc:
99 @echo "version=$R"
100 @echo "prefix=$(INSTALL_TOP)"
101 @echo "libdir=$(INSTALL_LIB)"
102 @echo "includedir=$(INSTALL_INC)"
103
104 # Targets that do not create files (not all makes understand .PHONY).
105 .PHONY: all $(PLATS) help test clean install uninstall local dummy echo pc
106
107 # (end of Makefile)