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 = \
10 TCL_SHLIB_EXT='$(TCL_SHLIB_EXT)' ;\
14 export TCL_SHLIB_EXT ;\
17 LOG_COMPILER = $(srcdir)/run-tcl-test
20 $(MAKE) check LOG_COMPILER='$(TCLSH)' AM_TESTS_ENVIRONMENT=
22 SWIG_GENERATED = xapian_wrap.cc
24 EXTRA_DIST = tcl.i except.i \
25 generate-tcl-exceptions \
26 run-tcl-test runtest.tcl \
27 $(TESTS) $(SWIG_GENERATED)
29 BUILT_SOURCES = $(SWIG_GENERATED)
31 tcllibdir = @TCL_LIB@/xapian@VERSION@
33 tcllib_LTLIBRARIES = xapian.la
34 tcllib_DATA = pkgIndex.tcl
36 # Remove the .la file - xapian.la is never linked against (it's a module)
37 # and TCL doesn't use libltdl. Note that the library gets installed by
38 # install-data, so that's where we need to hook.
40 rm -f $(DESTDIR)$(tcllibdir)/xapian.la
42 # Because we don't install the .la file, "make uninstall" doesn't work and
43 # we need to remove the file ourselves.
45 rm -f $(DESTDIR)$(tcllibdir)/xapian$(TCL_SHLIB_EXT)
47 AM_CPPFLAGS = @TCL_CPPFLAGS@
48 AM_CXXFLAGS = @SWIG_CXXFLAGS@ $(XAPIAN_CXXFLAGS)
49 xapian_la_LDFLAGS = -avoid-version -module -shrext '$(TCL_SHLIB_EXT)' $(NO_UNDEFINED)
50 nodist_xapian_la_SOURCES = xapian_wrap.cc
51 xapian_la_LIBADD = $(XAPIAN_LIBS) $(TCL_LIBS)
54 BUILT_SOURCES += except.i
55 except.i: $(srcdir)/generate-tcl-exceptions ../../xapian-core/exception_data.pm
56 $(PERL) -w -I$(srcdir)/../../xapian-core $(srcdir)/generate-tcl-exceptions
60 xapian_wrap.cc: except.i
61 $(SWIG) $(SWIG_WERROR) -I'$(srcdir)' $(SWIG_FLAGS) -c++ \
62 -tcl8 -namespace -pkgversion '@VERSION_NO_SNAPSHOT@' \
63 -o xapian_wrap.cc '$(srcdir)/'tcl.i
65 -include xapian_wrap.d
67 MAINTAINERCLEANFILES = $(BUILT_SOURCES)
69 exampledatadir = $(docdir)/tcl8/examples
70 dist_exampledata_DATA = \
71 docs/examples/simpleexpand.tcl \
72 docs/examples/simpleindex.tcl \
73 docs/examples/simplesearch.tcl
75 docdatadir = $(docdir)/tcl8
76 dist_docdata_DATA = docs/index.html
78 if DOCUMENTATION_RULES
79 BUILT_SOURCES += docs/index.html
82 -case "$@" in */*) d=`echo "$@"|sed 's,/[^/]*$$,,'`; $(MKDIR_P) "$$d" ;; esac
83 $(RST2HTML) --exit-status=warning $< $@