scriptindex: date=unix is now a no-op for empty input
[xapian.git] / xapian-bindings / lua / Makefile.am
blob0117235cabfbb128d6ff965998d9aebd7026885d
1 ## Process this file with automake to produce Makefile.in
3 include ../generic/generic.mk
5 ## Test programs to be run
6 TESTS = smoketest.lua
7 AM_TESTS_ENVIRONMENT = \
8         LUA_CPATH='.libs/?$(LUA_SO)' ;\
9         export LUA_CPATH ;
10 LOG_COMPILER = $(OSX_SIP_HACK_ENV) $(LUA)
12 installcheck-local:
13         $(MAKE) check AM_TESTS_ENVIRONMENT=
15 EXTRA_DIST = lua.i util.i except.i \
16         generate-lua-exceptions \
17         docs/index.rst \
18         $(TESTS) $(SWIG_GENERATED)
20 lualibdir = @LUA_LIB@
22 lualib_LTLIBRARIES = xapian.la
24 # Remove the .la file - xapian.la is never linked against (it's a module)
25 # and LUA doesn't use libltdl.  Note that the library gets installed by
26 # install-data, so that's where we need to hook.
27 install-data-hook:
28         rm -f $(DESTDIR)$(lualibdir)/xapian.la
30 # Because we don't install the .la file, "make uninstall" doesn't work and
31 # we need to remove the file ourselves.
32 uninstall-local:
33         rm -f $(DESTDIR)$(lualibdir)/xapian$(LUA_SO)
35 AM_CPPFLAGS = @LUA_CPPFLAGS@
36 AM_CXXFLAGS = @SWIG_CXXFLAGS@ $(XAPIAN_CXXFLAGS)
37 xapian_la_LDFLAGS = -avoid-version -module -shrext "$(LUA_SO)" $(NO_UNDEFINED)
38 nodist_xapian_la_SOURCES = xapian_wrap.cc
39 xapian_la_LIBADD = $(XAPIAN_LIBS)
41 SWIG_GENERATED = xapian_wrap.cc
43 BUILT_SOURCES = $(SWIG_GENERATED)
45 if MAINTAINER_MODE
46 BUILT_SOURCES += except.i
47 except.i: $(srcdir)/generate-lua-exceptions ../../xapian-core/exception_data.pm
48         $(PERL) -w -I$(srcdir)/../../xapian-core $(srcdir)/generate-lua-exceptions
50 RUN_SWIG = $(PERL) '$(top_srcdir)'/swig-depcomp $(SWIG)
52 xapian_wrap.cc: except.i
53         $(RUN_SWIG) $(SWIG_WERROR) -I'$(srcdir)' $(SWIG_FLAGS) -c++ \
54             -lua \
55             -o xapian_wrap.cc '$(srcdir)/'lua.i
57 -include xapian_wrap.d
58 endif
59 MAINTAINERCLEANFILES = $(BUILT_SOURCES)
61 exampledatadir = $(docdir)/lua/examples
62 dist_exampledata_DATA = \
63         docs/examples/simpleindex.lua \
64         docs/examples/simpleexpand.lua \
65         docs/examples/simplematchdecider.lua \
66         docs/examples/simplesearch.lua
68 docdatadir = $(docdir)/lua
69 dist_docdata_DATA = docs/index.html
71 if DOCUMENTATION_RULES
72 BUILT_SOURCES += docs/index.html
74 .rst.html:
75         -case "$@" in */*) d=`echo "$@"|sed 's,/[^/]*$$,,'`; $(MKDIR_P) "$$d" ;; esac
76         $(RST2HTML) --exit-status=warning $< $@
77 endif