1## Process this file with automake to produce Makefile.in 2 3include ../generic/generic.mk 4 5## Test programs to be run 6TESTS = smoketest.lua 7AM_TESTS_ENVIRONMENT = \ 8 LUA_CPATH='.libs/?$(LUA_SO)' ;\ 9 export LUA_CPATH ; 10LOG_COMPILER = $(OSX_SIP_HACK_ENV) $(LUA) 11 12installcheck-local: 13 $(MAKE) check AM_TESTS_ENVIRONMENT= 14 15EXTRA_DIST = lua.i util.i except.i \ 16 generate-lua-exceptions \ 17 docs/index.rst \ 18 $(TESTS) $(SWIG_GENERATED) 19 20lualibdir = @LUA_LIB@ 21 22lualib_LTLIBRARIES = xapian.la 23 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. 27install-data-hook: 28 rm -f $(DESTDIR)$(lualibdir)/xapian.la 29 30# Because we don't install the .la file, "make uninstall" doesn't work and 31# we need to remove the file ourselves. 32uninstall-local: 33 rm -f $(DESTDIR)$(lualibdir)/xapian$(LUA_SO) 34 35AM_CPPFLAGS = @LUA_CPPFLAGS@ 36AM_CXXFLAGS = @SWIG_CXXFLAGS@ $(XAPIAN_CXXFLAGS) 37xapian_la_LDFLAGS = -avoid-version -module -shrext "$(LUA_SO)" $(NO_UNDEFINED) 38nodist_xapian_la_SOURCES = xapian_wrap.cc 39xapian_la_LIBADD = $(XAPIAN_LIBS) 40 41SWIG_GENERATED = xapian_wrap.cc 42 43BUILT_SOURCES = $(SWIG_GENERATED) 44 45if MAINTAINER_MODE 46BUILT_SOURCES += except.i 47except.i: $(srcdir)/generate-lua-exceptions ../../xapian-core/exception_data.pm 48 $(PERL) -w -I$(srcdir)/../../xapian-core $(srcdir)/generate-lua-exceptions 49 50RUN_SWIG = $(PERL) '$(top_srcdir)'/swig-depcomp $(SWIG) 51 52xapian_wrap.cc: except.i 53 $(RUN_SWIG) $(SWIG_WERROR) -I'$(srcdir)' $(SWIG_FLAGS) -c++ \ 54 -lua \ 55 -o xapian_wrap.cc '$(srcdir)/'lua.i 56 57-include xapian_wrap.d 58endif 59MAINTAINERCLEANFILES = $(BUILT_SOURCES) 60 61exampledatadir = $(docdir)/lua/examples 62dist_exampledata_DATA = \ 63 docs/examples/simpleindex.lua \ 64 docs/examples/simpleexpand.lua \ 65 docs/examples/simplematchdecider.lua \ 66 docs/examples/simplesearch.lua 67 68docdatadir = $(docdir)/lua 69dist_docdata_DATA = docs/index.html 70 71if DOCUMENTATION_RULES 72BUILT_SOURCES += docs/index.html 73 74.rst.html: 75 -case "$@" in */*) d=`echo "$@"|sed 's,/[^/]*$$,,'`; $(MKDIR_P) "$$d" ;; esac 76 $(RST2HTML) --exit-status=warning $< $@ 77endif 78