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