1 ## Process this file with automake to produce Makefile.in
3 include ../generic/generic.mk
5 ## Test programs to be run
7 AM_TESTS_ENVIRONMENT = \
8 LUA_CPATH='$(_libs)/?$(LUA_SO)' ;\
10 LOG_COMPILER = $(MACOS_SIP_HACK_ENV) $(LUA)
13 $(MAKE) check AM_TESTS_ENVIRONMENT=
15 EXTRA_DIST = lua.i util.i except.i \
16 generate-lua-exceptions \
18 $(TESTS) $(SWIG_GENERATED)
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.
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.
33 rm -f $(DESTDIR)$(lualibdir)/xapian$(LUA_SO)
35 AM_CXXFLAGS = @SWIG_CXXFLAGS@ $(XAPIAN_CXXFLAGS) $(LUA_CFLAGS)
36 xapian_la_LDFLAGS = -avoid-version -module -shrext "$(LUA_SO)" $(NO_UNDEFINED)
37 nodist_xapian_la_SOURCES = xapian_wrap.cc
38 xapian_la_LIBADD = $(XAPIAN_LIBS) $(LUA_LIBS)
40 SWIG_GENERATED = xapian_wrap.cc
42 BUILT_SOURCES = $(SWIG_GENERATED)
45 BUILT_SOURCES += except.i
46 except.i: $(srcdir)/generate-lua-exceptions ../../xapian-core/exception_data.pm
47 $(PERL) -w -I$(srcdir)/../../xapian-core $(srcdir)/generate-lua-exceptions
51 xapian_wrap.cc: except.i
52 $(SWIG) $(SWIG_WERROR) -I'$(srcdir)' $(SWIG_FLAGS) -c++ \
54 -o xapian_wrap.cc '$(srcdir)/'lua.i
56 -include xapian_wrap.d
58 MAINTAINERCLEANFILES = $(BUILT_SOURCES)
60 exampledatadir = $(docdir)/lua/examples
61 dist_exampledata_DATA = \
62 docs/examples/simpleindex.lua \
63 docs/examples/simpleexpand.lua \
64 docs/examples/simplematchdecider.lua \
65 docs/examples/simplesearch.lua
67 docdatadir = $(docdir)/lua
68 dist_docdata_DATA = docs/index.html
70 if DOCUMENTATION_RULES
71 BUILT_SOURCES += docs/index.html
74 -case "$@" in */*) d=`echo "$@"|sed 's,/[^/]*$$,,'`; $(MKDIR_P) "$$d" ;; esac
75 $(RST2HTML) --exit-status=warning $< $@