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