Fix testcase unsupportedcheck1 for --disable-backend-remote
[xapian.git] / xapian-bindings / tcl8 / Makefile.am
blobd4f3d0d0d8d7328e0d7842005ce7a1692dfc10e5
1 ## Process this file with automake to produce Makefile.in
3 include ../generic/generic.mk
5 ## Test programs to be run
6 TESTS = smoketest.tcl
7 AM_TESTS_ENVIRONMENT = \
8         srcdir='$(srcdir)' ;\
9         TCLSH='$(TCLSH)' ;\
10         TCL_SHLIB_EXT='$(TCL_SHLIB_EXT)' ;\
11         _libs="$(_libs)" ;\
12         export srcdir ;\
13         export TCLSH ;\
14         export TCL_SHLIB_EXT ;\
15         export _libs ;
17 LOG_COMPILER = $(srcdir)/run-tcl-test
19 installcheck-local:
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.
39 install-data-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.
44 uninstall-local:
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)
53 if MAINTAINER_MODE
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
58 SWIG_FLAGS += -MD -MP
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
66 endif
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
81 .rst.html:
82         -case "$@" in */*) d=`echo "$@"|sed 's,/[^/]*$$,,'`; $(MKDIR_P) "$$d" ;; esac
83         $(RST2HTML) --exit-status=warning $< $@
84 endif