|
Packit |
437b5e |
# Local Make rules.
|
|
Packit |
437b5e |
# Written by Gary V. Vaughan, 2013
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
# Copyright (C) 2013-2015 Gary V. Vaughan
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
# This file is part of luaposix.
|
|
Packit |
437b5e |
# See README for license.
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
## ------------ ##
|
|
Packit |
437b5e |
## Environment. ##
|
|
Packit |
437b5e |
## ------------ ##
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
posix_cpath = $(abs_builddir)/ext/posix/$(objdir)/?$(shrext)
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
std_cpath = $(posix_cpath);$(LUA_CPATH)
|
|
Packit |
437b5e |
std_path = $(abs_srcdir)/lib/?.lua;$(LUA_PATH)
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
LUA_ENV = LUA_PATH="$(std_path)" LUA_CPATH="$(std_cpath)"
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
## ---------- ##
|
|
Packit |
437b5e |
## Bootstrap. ##
|
|
Packit |
437b5e |
## ---------- ##
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
AM_CPPFLAGS += -I $(srcdir)/ext/include -I $(srcdir)/ext/posix $(POSIX_EXTRA_CPPFLAGS)
|
|
Packit |
437b5e |
AM_CFLAGS = $(WERROR_CFLAGS) $(WARN_CFLAGS)
|
|
Packit |
437b5e |
AM_LDFLAGS = -module -avoid-version
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
old_NEWS_hash = d41d8cd98f00b204e9800998ecf8427e
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
update_copyright_env = \
|
|
Packit |
437b5e |
UPDATE_COPYRIGHT_HOLDER='(Gary V. Vaughan|Reuben Thomas|luaposix authors)' \
|
|
Packit |
437b5e |
UPDATE_COPYRIGHT_USE_INTERVALS=1 \
|
|
Packit |
437b5e |
UPDATE_COPYRIGHT_FORCE=1
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
## ------------- ##
|
|
Packit |
437b5e |
## Declarations. ##
|
|
Packit |
437b5e |
## ------------- ##
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
examplesdir = $(docdir)/examples
|
|
Packit |
437b5e |
modulesdir = $(docdir)/modules
|
|
Packit |
437b5e |
classesdir = $(docdir)/classes
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
dist_data_DATA =
|
|
Packit |
437b5e |
dist_doc_DATA =
|
|
Packit |
437b5e |
dist_examples_DATA =
|
|
Packit |
437b5e |
dist_modules_DATA =
|
|
Packit |
437b5e |
dist_classes_DATA =
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
include specs/specs.mk
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
## ------ ##
|
|
Packit |
437b5e |
## Build. ##
|
|
Packit |
437b5e |
## ------ ##
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
dist_lua_DATA += \
|
|
Packit |
437b5e |
lib/curses.lua \
|
|
Packit |
437b5e |
$(NOTHING_ELSE)
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
luaposixdir = $(luadir)/posix
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
dist_luaposix_DATA = \
|
|
Packit |
437b5e |
lib/posix/init.lua \
|
|
Packit |
437b5e |
lib/posix/_argcheck.lua \
|
|
Packit |
437b5e |
lib/posix/compat.lua \
|
|
Packit |
437b5e |
lib/posix/deprecated.lua \
|
|
Packit |
437b5e |
lib/posix/sys.lua \
|
|
Packit |
437b5e |
lib/posix/util.lua \
|
|
Packit |
437b5e |
$(NOTHING_ELSE)
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
luaexec_LTLIBRARIES += ext/posix/posix.la
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
ext_posix_posix_la_SOURCES = \
|
|
Packit |
437b5e |
ext/posix/posix.c \
|
|
Packit |
437b5e |
$(NOTHING_ELSE)
|
|
Packit |
437b5e |
EXTRA_ext_posix_posix_la_SOURCES = \
|
|
Packit |
437b5e |
ext/posix/ctype.c \
|
|
Packit |
437b5e |
ext/posix/curses.c \
|
|
Packit |
437b5e |
ext/posix/curses/chstr.c \
|
|
Packit |
437b5e |
ext/posix/curses/window.c \
|
|
Packit |
437b5e |
ext/posix/dirent.c \
|
|
Packit |
437b5e |
ext/posix/errno.c \
|
|
Packit |
437b5e |
ext/posix/fcntl.c \
|
|
Packit |
437b5e |
ext/posix/fnmatch.c \
|
|
Packit |
437b5e |
ext/posix/getopt.c \
|
|
Packit |
437b5e |
ext/posix/glob.c \
|
|
Packit |
437b5e |
ext/posix/grp.c \
|
|
Packit |
437b5e |
ext/posix/libgen.c \
|
|
Packit |
437b5e |
ext/posix/poll.c \
|
|
Packit |
437b5e |
ext/posix/pwd.c \
|
|
Packit |
437b5e |
ext/posix/sched.c \
|
|
Packit |
437b5e |
ext/posix/signal.c \
|
|
Packit |
437b5e |
ext/posix/stdio.c \
|
|
Packit |
437b5e |
ext/posix/stdlib.c \
|
|
Packit |
437b5e |
ext/posix/sys/msg.c \
|
|
Packit |
437b5e |
ext/posix/sys/resource.c \
|
|
Packit |
437b5e |
ext/posix/sys/socket.c \
|
|
Packit |
437b5e |
ext/posix/sys/stat.c \
|
|
Packit |
437b5e |
ext/posix/sys/statvfs.c \
|
|
Packit |
437b5e |
ext/posix/sys/time.c \
|
|
Packit |
437b5e |
ext/posix/sys/times.c \
|
|
Packit |
437b5e |
ext/posix/sys/utsname.c \
|
|
Packit |
437b5e |
ext/posix/sys/wait.c \
|
|
Packit |
437b5e |
ext/posix/syslog.c \
|
|
Packit |
437b5e |
ext/posix/termio.c \
|
|
Packit |
437b5e |
ext/posix/time.c \
|
|
Packit |
437b5e |
ext/posix/unistd.c \
|
|
Packit |
437b5e |
ext/posix/utime.c \
|
|
Packit |
437b5e |
$(NOTHING_ELSE)
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
ext_posix_posix_la_LDFLAGS = $(AM_LDFLAGS) $(LIBCRYPT) $(LIBSOCKET) $(LIBRT) $(CURSES_LIB)
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
luaexecposixdir = $(luaexecdir)/posix
|
|
Packit |
437b5e |
luaexecposixsysdir = $(luaexecposixdir)/sys
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
# EXTRA_LTLIBRARIES don't have an RPATH by default.
|
|
Packit |
437b5e |
luaexecposix_LDFLAGS = $(AM_LDFLAGS) -rpath '$(luaexecposixdir)'
|
|
Packit |
437b5e |
luaexecposixsys_LDFLAGS = $(AM_LDFLAGS) -rpath '$(luaexecposixsysdir)'
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
## ---------------------- ##
|
|
Packit |
437b5e |
## Standalone Submodules. ##
|
|
Packit |
437b5e |
## ---------------------- ##
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
# We don't install these, but we do need to make sure they compile
|
|
Packit |
437b5e |
# for people who want to copy some of the sources into their own
|
|
Packit |
437b5e |
# projects for custom interpreters/libraries.
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
posix_submodules = \
|
|
Packit |
437b5e |
ext/posix/ctype.la \
|
|
Packit |
437b5e |
ext/posix/curses.la \
|
|
Packit |
437b5e |
ext/posix/curses/chstr.la \
|
|
Packit |
437b5e |
ext/posix/curses/window.la \
|
|
Packit |
437b5e |
ext/posix/dirent.la \
|
|
Packit |
437b5e |
ext/posix/errno.la \
|
|
Packit |
437b5e |
ext/posix/fcntl.la \
|
|
Packit |
437b5e |
ext/posix/fnmatch.la \
|
|
Packit |
437b5e |
ext/posix/getopt.la \
|
|
Packit |
437b5e |
ext/posix/glob.la \
|
|
Packit |
437b5e |
ext/posix/grp.la \
|
|
Packit |
437b5e |
ext/posix/libgen.la \
|
|
Packit |
437b5e |
ext/posix/poll.la \
|
|
Packit |
437b5e |
ext/posix/pwd.la \
|
|
Packit |
437b5e |
ext/posix/sched.la \
|
|
Packit |
437b5e |
ext/posix/signal.la \
|
|
Packit |
437b5e |
ext/posix/stdio.la \
|
|
Packit |
437b5e |
ext/posix/stdlib.la \
|
|
Packit |
437b5e |
ext/posix/sys/msg.la \
|
|
Packit |
437b5e |
ext/posix/sys/resource.la \
|
|
Packit |
437b5e |
ext/posix/sys/socket.la \
|
|
Packit |
437b5e |
ext/posix/sys/stat.la \
|
|
Packit |
437b5e |
ext/posix/sys/statvfs.la \
|
|
Packit |
437b5e |
ext/posix/sys/time.la \
|
|
Packit |
437b5e |
ext/posix/sys/times.la \
|
|
Packit |
437b5e |
ext/posix/sys/utsname.la \
|
|
Packit |
437b5e |
ext/posix/sys/wait.la \
|
|
Packit |
437b5e |
ext/posix/syslog.la \
|
|
Packit |
437b5e |
ext/posix/termio.la \
|
|
Packit |
437b5e |
ext/posix/time.la \
|
|
Packit |
437b5e |
ext/posix/unistd.la \
|
|
Packit |
437b5e |
ext/posix/utime.la \
|
|
Packit |
437b5e |
$(NOTHING_ELSE)
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
EXTRA_LTLIBRARIES += $(posix_submodules)
|
|
Packit |
437b5e |
check_local += $(posix_submodules)
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
ext_posix_ctype_la_LDFLAGS = $(luaexecposix_LDFLAGS)
|
|
Packit |
437b5e |
ext_posix_curses_la_LDFLAGS = $(luaexecposix_LDFLAGS) $(CURSES_LIB)
|
|
Packit |
437b5e |
ext_posix_dirent_la_LDFLAGS = $(luaexecposix_LDFLAGS)
|
|
Packit |
437b5e |
ext_posix_errno_la_LDFLAGS = $(luaexecposix_LDFLAGS)
|
|
Packit |
437b5e |
ext_posix_fcntl_la_LDFLAGS = $(luaexecposix_LDFLAGS)
|
|
Packit |
437b5e |
ext_posix_fnmatch_la_LDFLAGS = $(luaexecposix_LDFLAGS)
|
|
Packit |
437b5e |
ext_posix_getopt_la_LDFLAGS = $(luaexecposix_LDFLAGS)
|
|
Packit |
437b5e |
ext_posix_glob_la_LDFLAGS = $(luaexecposix_LDFLAGS)
|
|
Packit |
437b5e |
ext_posix_grp_la_LDFLAGS = $(luaexecposix_LDFLAGS)
|
|
Packit |
437b5e |
ext_posix_libgen_la_LDFLAGS = $(luaexecposix_LDFLAGS)
|
|
Packit |
437b5e |
ext_posix_poll_la_LDFLAGS = $(luaexecposix_LDFLAGS)
|
|
Packit |
437b5e |
ext_posix_pwd_la_LDFLAGS = $(luaexecposix_LDFLAGS)
|
|
Packit |
437b5e |
ext_posix_sched_la_LDFLAGS = $(luaexecposix_LDFLAGS)
|
|
Packit |
437b5e |
ext_posix_signal_la_LDFLAGS = $(luaexecposix_LDFLAGS)
|
|
Packit |
437b5e |
ext_posix_stdio_la_LDFLAGS = $(luaexecposix_LDFLAGS)
|
|
Packit |
437b5e |
ext_posix_stdlib_la_LDFLAGS = $(luaexecposix_LDFLAGS) $(LIBCRYPT)
|
|
Packit |
437b5e |
ext_posix_syslog_la_LDFLAGS = $(luaexecposix_LDFLAGS)
|
|
Packit |
437b5e |
ext_posix_termio_la_LDFLAGS = $(luaexecposix_LDFLAGS)
|
|
Packit |
437b5e |
ext_posix_time_la_LDFLAGS = $(luaexecposix_LDFLAGS) $(LIBRT)
|
|
Packit |
437b5e |
ext_posix_unistd_la_LDFLAGS = $(luaexecposix_LDFLAGS)
|
|
Packit |
437b5e |
ext_posix_utime_la_LDFLAGS = $(luaexecposix_LDFLAGS)
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
ext_posix_sys_msg_la_LDFLAGS = $(luaexecposixsys_LDFLAGS)
|
|
Packit |
437b5e |
ext_posix_sys_resource_la_LDFLAGS = $(luaexecposixsys_LDFLAGS)
|
|
Packit |
437b5e |
ext_posix_sys_socket_la_LDFLAGS = $(luaexecposixsys_LDFLAGS)
|
|
Packit |
437b5e |
ext_posix_sys_stat_la_LDFLAGS = $(luaexecposixsys_LDFLAGS)
|
|
Packit |
437b5e |
ext_posix_sys_statvfs_la_LDFLAGS = $(luaexecposixsys_LDFLAGS)
|
|
Packit |
437b5e |
ext_posix_sys_time_la_LDFLAGS = $(luaexecposixsys_LDFLAGS)
|
|
Packit |
437b5e |
ext_posix_sys_times_la_LDFLAGS = $(luaexecposixsys_LDFLAGS)
|
|
Packit |
437b5e |
ext_posix_sys_utsname_la_LDFLAGS = $(luaexecposixsys_LDFLAGS)
|
|
Packit |
437b5e |
ext_posix_sys_wait_la_LDFLAGS = $(luaexecposixsys_LDFLAGS)
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
clean-local:
|
|
Packit |
437b5e |
rm -f $(posix_submodules)
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
## -------------- ##
|
|
Packit |
437b5e |
## Documentation. ##
|
|
Packit |
437b5e |
## -------------- ##
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
dist_doc_DATA += \
|
|
Packit |
437b5e |
doc/index.html \
|
|
Packit |
437b5e |
doc/ldoc.css \
|
|
Packit |
437b5e |
$(NOTHING_ELSE)
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
dist_modules_DATA += \
|
|
Packit |
437b5e |
doc/modules/posix.ctype.html \
|
|
Packit |
437b5e |
doc/modules/posix.curses.html \
|
|
Packit |
437b5e |
doc/modules/posix.dirent.html \
|
|
Packit |
437b5e |
doc/modules/posix.errno.html \
|
|
Packit |
437b5e |
doc/modules/posix.fcntl.html \
|
|
Packit |
437b5e |
doc/modules/posix.fnmatch.html \
|
|
Packit |
437b5e |
doc/modules/posix.getopt.html \
|
|
Packit |
437b5e |
doc/modules/posix.glob.html \
|
|
Packit |
437b5e |
doc/modules/posix.grp.html \
|
|
Packit |
437b5e |
doc/modules/posix.html \
|
|
Packit |
437b5e |
doc/modules/posix.libgen.html \
|
|
Packit |
437b5e |
doc/modules/posix.poll.html \
|
|
Packit |
437b5e |
doc/modules/posix.pwd.html \
|
|
Packit |
437b5e |
doc/modules/posix.sched.html \
|
|
Packit |
437b5e |
doc/modules/posix.signal.html \
|
|
Packit |
437b5e |
doc/modules/posix.stdio.html \
|
|
Packit |
437b5e |
doc/modules/posix.stdlib.html \
|
|
Packit |
437b5e |
doc/modules/posix.sys.msg.html \
|
|
Packit |
437b5e |
doc/modules/posix.sys.resource.html \
|
|
Packit |
437b5e |
doc/modules/posix.sys.socket.html \
|
|
Packit |
437b5e |
doc/modules/posix.sys.stat.html \
|
|
Packit |
437b5e |
doc/modules/posix.sys.statvfs.html \
|
|
Packit |
437b5e |
doc/modules/posix.sys.time.html \
|
|
Packit |
437b5e |
doc/modules/posix.sys.times.html \
|
|
Packit |
437b5e |
doc/modules/posix.sys.utsname.html \
|
|
Packit |
437b5e |
doc/modules/posix.sys.wait.html \
|
|
Packit |
437b5e |
doc/modules/posix.syslog.html \
|
|
Packit |
437b5e |
doc/modules/posix.termio.html \
|
|
Packit |
437b5e |
doc/modules/posix.time.html \
|
|
Packit |
437b5e |
doc/modules/posix.unistd.html \
|
|
Packit |
437b5e |
doc/modules/posix.utime.html \
|
|
Packit |
437b5e |
$(NOTHING_ELSE)
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
dist_classes_DATA += \
|
|
Packit |
437b5e |
doc/classes/posix.curses.chstr.html \
|
|
Packit |
437b5e |
doc/classes/posix.curses.window.html \
|
|
Packit |
437b5e |
$(NOTHING_ELSE)
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
dist_examples_DATA += \
|
|
Packit |
437b5e |
doc/examples/curses.lua.html \
|
|
Packit |
437b5e |
doc/examples/dir.lua.html \
|
|
Packit |
437b5e |
doc/examples/fork.lua.html \
|
|
Packit |
437b5e |
doc/examples/fork2.lua.html \
|
|
Packit |
437b5e |
doc/examples/getopt.lua.html \
|
|
Packit |
437b5e |
doc/examples/glob.lua.html \
|
|
Packit |
437b5e |
doc/examples/limit.lua.html \
|
|
Packit |
437b5e |
doc/examples/lock.lua.html \
|
|
Packit |
437b5e |
doc/examples/netlink-uevent.lua.html \
|
|
Packit |
437b5e |
doc/examples/ping.lua.html \
|
|
Packit |
437b5e |
doc/examples/poll.lua.html \
|
|
Packit |
437b5e |
doc/examples/signal.lua.html \
|
|
Packit |
437b5e |
doc/examples/socket.lua.html \
|
|
Packit |
437b5e |
doc/examples/termios.lua.html \
|
|
Packit |
437b5e |
doc/examples/tree.lua.html \
|
|
Packit |
437b5e |
$(NOTHING_ELSE)
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
allhtml = $(dist_doc_DATA) $(dist_examples_DATA) $(dist_modules_DATA) $(dist_classes_DATA)
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
$(allhtml): $(EXTRA_ext_posix_posix_la_SOURCES) $(ext_posix_posix_la_SOURCES)
|
|
Packit |
437b5e |
test -d $(builddir)/doc || mkdir $(builddir)/doc
|
|
Packit |
437b5e |
if HAVE_LDOC
|
|
Packit |
437b5e |
$(LDOC) -c build-aux/config.ld -d $(abs_srcdir)/doc .
|
|
Packit |
437b5e |
else
|
|
Packit |
437b5e |
$(MKDIR_P) doc
|
|
Packit |
437b5e |
touch doc/index.html doc/ldoc.css
|
|
Packit |
437b5e |
endif
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
doc: $(allhtml)
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
## ------------- ##
|
|
Packit |
437b5e |
## Distribution. ##
|
|
Packit |
437b5e |
## ------------- ##
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
EXTRA_DIST += \
|
|
Packit |
437b5e |
build-aux/config.ld.in \
|
|
Packit |
437b5e |
examples/dir.lua \
|
|
Packit |
437b5e |
examples/fork.lua \
|
|
Packit |
437b5e |
examples/fork2.lua \
|
|
Packit |
437b5e |
examples/getopt.lua \
|
|
Packit |
437b5e |
examples/glob.lua \
|
|
Packit |
437b5e |
examples/limit.lua \
|
|
Packit |
437b5e |
examples/lock.lua \
|
|
Packit |
437b5e |
examples/netlink-uevent.lua \
|
|
Packit |
437b5e |
examples/ping.lua \
|
|
Packit |
437b5e |
examples/poll.lua \
|
|
Packit |
437b5e |
examples/signal.lua \
|
|
Packit |
437b5e |
examples/socket.lua \
|
|
Packit |
437b5e |
examples/termios.lua \
|
|
Packit |
437b5e |
examples/tree.lua \
|
|
Packit |
437b5e |
ext/include/_helpers.c \
|
|
Packit |
437b5e |
ext/include/compat-5.2.c \
|
|
Packit |
437b5e |
ext/include/compat-5.2.h \
|
|
Packit |
437b5e |
ext/include/strlcpy.c \
|
|
Packit |
437b5e |
$(NOTHING_ELSE)
|
|
Packit |
437b5e |
|
|
Packit |
437b5e |
MAINTAINERCLEANFILES += \
|
|
Packit |
437b5e |
doc/index.html \
|
|
Packit |
437b5e |
doc/ldoc.css \
|
|
Packit |
437b5e |
$(dist_examples_DATA) \
|
|
Packit |
437b5e |
$(dist_modules_DATA) \
|
|
Packit |
437b5e |
$(NOTHING_ELSE)
|