forked from luaposix/luaposix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocal.mk
318 lines (269 loc) · 8.45 KB
/
local.mk
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
# Local Make rules.
# Written by Gary V. Vaughan, 2013
# Copyright (C) 2013-2015 Gary V. Vaughan
# This file is part of luaposix.
# See README for license.
## ------------ ##
## Environment. ##
## ------------ ##
posix_cpath = $(abs_builddir)/ext/posix/$(objdir)/?$(shrext)
std_cpath = $(posix_cpath);$(LUA_CPATH)
std_path = $(abs_srcdir)/lib/?.lua;$(LUA_PATH)
LUA_ENV = LUA_PATH="$(std_path)" LUA_CPATH="$(std_cpath)"
## ---------- ##
## Bootstrap. ##
## ---------- ##
AM_CPPFLAGS += -I $(srcdir)/ext/include -I $(srcdir)/ext/posix $(POSIX_EXTRA_CPPFLAGS)
AM_CFLAGS = $(WERROR_CFLAGS) $(WARN_CFLAGS)
AM_LDFLAGS = -module -avoid-version
old_NEWS_hash = d41d8cd98f00b204e9800998ecf8427e
update_copyright_env = \
UPDATE_COPYRIGHT_HOLDER='(Gary V. Vaughan|Reuben Thomas|luaposix authors)' \
UPDATE_COPYRIGHT_USE_INTERVALS=1 \
UPDATE_COPYRIGHT_FORCE=1
## ------------- ##
## Declarations. ##
## ------------- ##
examplesdir = $(docdir)/examples
modulesdir = $(docdir)/modules
classesdir = $(docdir)/classes
dist_data_DATA =
dist_doc_DATA =
dist_examples_DATA =
dist_modules_DATA =
dist_classes_DATA =
include specs/specs.mk
## ------ ##
## Build. ##
## ------ ##
dist_lua_DATA += \
lib/curses.lua \
$(NOTHING_ELSE)
luaposixdir = $(luadir)/posix
dist_luaposix_DATA = \
lib/posix/init.lua \
lib/posix/_argcheck.lua \
lib/posix/compat.lua \
lib/posix/deprecated.lua \
lib/posix/sys.lua \
lib/posix/util.lua \
$(NOTHING_ELSE)
luaexec_LTLIBRARIES += ext/posix/posix.la
ext_posix_posix_la_SOURCES = \
ext/posix/posix.c \
$(NOTHING_ELSE)
EXTRA_ext_posix_posix_la_SOURCES = \
ext/posix/ctype.c \
ext/posix/curses.c \
ext/posix/curses/chstr.c \
ext/posix/curses/window.c \
ext/posix/dirent.c \
ext/posix/errno.c \
ext/posix/fcntl.c \
ext/posix/fnmatch.c \
ext/posix/getopt.c \
ext/posix/glob.c \
ext/posix/grp.c \
ext/posix/libgen.c \
ext/posix/poll.c \
ext/posix/pwd.c \
ext/posix/sched.c \
ext/posix/signal.c \
ext/posix/stdio.c \
ext/posix/stdlib.c \
ext/posix/sys/msg.c \
ext/posix/sys/resource.c \
ext/posix/sys/socket.c \
ext/posix/sys/stat.c \
ext/posix/sys/statvfs.c \
ext/posix/sys/time.c \
ext/posix/sys/times.c \
ext/posix/sys/utsname.c \
ext/posix/sys/wait.c \
ext/posix/syslog.c \
ext/posix/termio.c \
ext/posix/time.c \
ext/posix/unistd.c \
ext/posix/utime.c \
$(NOTHING_ELSE)
ext_posix_posix_la_LDFLAGS = $(AM_LDFLAGS) $(LIBCRYPT) $(LIBSOCKET) $(LIBRT) $(CURSES_LIB)
luaexecposixdir = $(luaexecdir)/posix
luaexecposixsysdir = $(luaexecposixdir)/sys
# EXTRA_LTLIBRARIES don't have an RPATH by default.
luaexecposix_LDFLAGS = $(AM_LDFLAGS) -rpath '$(luaexecposixdir)'
luaexecposixsys_LDFLAGS = $(AM_LDFLAGS) -rpath '$(luaexecposixsysdir)'
## ---------------------- ##
## Standalone Submodules. ##
## ---------------------- ##
# We don't install these, but we do need to make sure they compile
# for people who want to copy some of the sources into their own
# projects for custom interpreters/libraries.
posix_submodules = \
ext/posix/ctype.la \
ext/posix/curses.la \
ext/posix/curses/chstr.la \
ext/posix/curses/window.la \
ext/posix/dirent.la \
ext/posix/errno.la \
ext/posix/fcntl.la \
ext/posix/fnmatch.la \
ext/posix/getopt.la \
ext/posix/glob.la \
ext/posix/grp.la \
ext/posix/libgen.la \
ext/posix/poll.la \
ext/posix/pwd.la \
ext/posix/sched.la \
ext/posix/signal.la \
ext/posix/stdio.la \
ext/posix/stdlib.la \
ext/posix/sys/msg.la \
ext/posix/sys/resource.la \
ext/posix/sys/socket.la \
ext/posix/sys/stat.la \
ext/posix/sys/statvfs.la \
ext/posix/sys/time.la \
ext/posix/sys/times.la \
ext/posix/sys/utsname.la \
ext/posix/sys/wait.la \
ext/posix/syslog.la \
ext/posix/termio.la \
ext/posix/time.la \
ext/posix/unistd.la \
ext/posix/utime.la \
$(NOTHING_ELSE)
EXTRA_LTLIBRARIES += $(posix_submodules)
check_local += $(posix_submodules)
ext_posix_ctype_la_LDFLAGS = $(luaexecposix_LDFLAGS)
ext_posix_curses_la_LDFLAGS = $(luaexecposix_LDFLAGS) $(CURSES_LIB)
ext_posix_dirent_la_LDFLAGS = $(luaexecposix_LDFLAGS)
ext_posix_errno_la_LDFLAGS = $(luaexecposix_LDFLAGS)
ext_posix_fcntl_la_LDFLAGS = $(luaexecposix_LDFLAGS)
ext_posix_fnmatch_la_LDFLAGS = $(luaexecposix_LDFLAGS)
ext_posix_getopt_la_LDFLAGS = $(luaexecposix_LDFLAGS)
ext_posix_glob_la_LDFLAGS = $(luaexecposix_LDFLAGS)
ext_posix_grp_la_LDFLAGS = $(luaexecposix_LDFLAGS)
ext_posix_libgen_la_LDFLAGS = $(luaexecposix_LDFLAGS)
ext_posix_poll_la_LDFLAGS = $(luaexecposix_LDFLAGS)
ext_posix_pwd_la_LDFLAGS = $(luaexecposix_LDFLAGS)
ext_posix_sched_la_LDFLAGS = $(luaexecposix_LDFLAGS)
ext_posix_signal_la_LDFLAGS = $(luaexecposix_LDFLAGS)
ext_posix_stdio_la_LDFLAGS = $(luaexecposix_LDFLAGS)
ext_posix_stdlib_la_LDFLAGS = $(luaexecposix_LDFLAGS) $(LIBCRYPT)
ext_posix_syslog_la_LDFLAGS = $(luaexecposix_LDFLAGS)
ext_posix_termio_la_LDFLAGS = $(luaexecposix_LDFLAGS)
ext_posix_time_la_LDFLAGS = $(luaexecposix_LDFLAGS) $(LIBRT)
ext_posix_unistd_la_LDFLAGS = $(luaexecposix_LDFLAGS)
ext_posix_utime_la_LDFLAGS = $(luaexecposix_LDFLAGS)
ext_posix_sys_msg_la_LDFLAGS = $(luaexecposixsys_LDFLAGS)
ext_posix_sys_resource_la_LDFLAGS = $(luaexecposixsys_LDFLAGS)
ext_posix_sys_socket_la_LDFLAGS = $(luaexecposixsys_LDFLAGS)
ext_posix_sys_stat_la_LDFLAGS = $(luaexecposixsys_LDFLAGS)
ext_posix_sys_statvfs_la_LDFLAGS = $(luaexecposixsys_LDFLAGS)
ext_posix_sys_time_la_LDFLAGS = $(luaexecposixsys_LDFLAGS)
ext_posix_sys_times_la_LDFLAGS = $(luaexecposixsys_LDFLAGS)
ext_posix_sys_utsname_la_LDFLAGS = $(luaexecposixsys_LDFLAGS)
ext_posix_sys_wait_la_LDFLAGS = $(luaexecposixsys_LDFLAGS)
clean-local:
rm -f $(posix_submodules)
## -------------- ##
## Documentation. ##
## -------------- ##
dist_doc_DATA += \
doc/index.html \
doc/ldoc.css \
$(NOTHING_ELSE)
dist_modules_DATA += \
doc/modules/posix.ctype.html \
doc/modules/posix.curses.html \
doc/modules/posix.dirent.html \
doc/modules/posix.errno.html \
doc/modules/posix.fcntl.html \
doc/modules/posix.fnmatch.html \
doc/modules/posix.getopt.html \
doc/modules/posix.glob.html \
doc/modules/posix.grp.html \
doc/modules/posix.html \
doc/modules/posix.libgen.html \
doc/modules/posix.poll.html \
doc/modules/posix.pwd.html \
doc/modules/posix.sched.html \
doc/modules/posix.signal.html \
doc/modules/posix.stdio.html \
doc/modules/posix.stdlib.html \
doc/modules/posix.sys.msg.html \
doc/modules/posix.sys.resource.html \
doc/modules/posix.sys.socket.html \
doc/modules/posix.sys.stat.html \
doc/modules/posix.sys.statvfs.html \
doc/modules/posix.sys.time.html \
doc/modules/posix.sys.times.html \
doc/modules/posix.sys.utsname.html \
doc/modules/posix.sys.wait.html \
doc/modules/posix.syslog.html \
doc/modules/posix.termio.html \
doc/modules/posix.time.html \
doc/modules/posix.unistd.html \
doc/modules/posix.utime.html \
$(NOTHING_ELSE)
dist_classes_DATA += \
doc/classes/posix.curses.chstr.html \
doc/classes/posix.curses.window.html \
$(NOTHING_ELSE)
dist_examples_DATA += \
doc/examples/curses.lua.html \
doc/examples/dir.lua.html \
doc/examples/fork.lua.html \
doc/examples/fork2.lua.html \
doc/examples/getopt.lua.html \
doc/examples/glob.lua.html \
doc/examples/limit.lua.html \
doc/examples/lock.lua.html \
doc/examples/netlink-uevent.lua.html \
doc/examples/ping.lua.html \
doc/examples/poll.lua.html \
doc/examples/signal.lua.html \
doc/examples/socket.lua.html \
doc/examples/termios.lua.html \
doc/examples/tree.lua.html \
$(NOTHING_ELSE)
allhtml = $(dist_doc_DATA) $(dist_examples_DATA) $(dist_modules_DATA) $(dist_classes_DATA)
$(allhtml): $(EXTRA_ext_posix_posix_la_SOURCES) $(ext_posix_posix_la_SOURCES)
test -d $(builddir)/doc || mkdir $(builddir)/doc
if HAVE_LDOC
$(LDOC) -c build-aux/config.ld -d $(abs_srcdir)/doc .
else
$(MKDIR_P) doc
touch doc/index.html doc/ldoc.css
endif
doc: $(allhtml)
## ------------- ##
## Distribution. ##
## ------------- ##
EXTRA_DIST += \
build-aux/config.ld.in \
examples/dir.lua \
examples/fork.lua \
examples/fork2.lua \
examples/getopt.lua \
examples/glob.lua \
examples/limit.lua \
examples/lock.lua \
examples/netlink-uevent.lua \
examples/ping.lua \
examples/poll.lua \
examples/signal.lua \
examples/socket.lua \
examples/termios.lua \
examples/tree.lua \
ext/include/_helpers.c \
ext/include/compat-5.2.c \
ext/include/compat-5.2.h \
ext/include/strlcpy.c \
$(NOTHING_ELSE)
MAINTAINERCLEANFILES += \
doc/index.html \
doc/ldoc.css \
$(dist_examples_DATA) \
$(dist_modules_DATA) \
$(NOTHING_ELSE)