scriptindex: date=unix is now a no-op for empty input
[xapian.git] / xapian-bindings / tcl8 / Makefile.am
blob594a79f2fa14ad1cbf40972867bca65cef5c553c
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         LIBTOOL='$(LIBTOOL)' ;\
10         TCLSH='$(TCLSH)' ; \
11         export srcdir ;\
12         export LIBTOOL ;\
13         export TCLSH ;
14 LOG_COMPILER = $(srcdir)/run-tcl-test
16 installcheck-local:
17         $(MAKE) check LOG_COMPILER='$(TCLSH)' AM_TESTS_ENVIRONMENT=
19 SWIG_GENERATED = xapian_wrap.cc
21 EXTRA_DIST = tcl.i except.i \
22         generate-tcl-exceptions \
23         run-tcl-test runtest.tcl \
24         $(TESTS) $(SWIG_GENERATED)
26 BUILT_SOURCES = $(SWIG_GENERATED)
28 tcllibdir = @TCL_LIB@/xapian@VERSION@
30 tcllib_LTLIBRARIES = xapian.la
31 tcllib_DATA = pkgIndex.tcl
33 # Remove the .la file - xapian.la is never linked against (it's a module)
34 # and TCL doesn't use libltdl.  Note that the library gets installed by
35 # install-data, so that's where we need to hook.
36 install-data-hook:
37         rm -f $(DESTDIR)$(tcllibdir)/xapian.la
39 # Because we don't install the .la file, "make uninstall" doesn't work and
40 # we need to remove the file ourselves.
41 uninstall-local:
42         eval `grep '^dlname=' $(tcllib_LTLIBRARIES)` ; \
43           rm -f $(DESTDIR)$(tcllibdir)/"$$dlname"
45 AM_CPPFLAGS = @TCL_CPPFLAGS@
46 AM_CXXFLAGS = @SWIG_CXXFLAGS@ $(XAPIAN_CXXFLAGS)
47 xapian_la_LDFLAGS = -avoid-version -module $(NO_UNDEFINED)
48 nodist_xapian_la_SOURCES = xapian_wrap.cc
49 xapian_la_LIBADD = $(XAPIAN_LIBS) $(TCL_LIBS)
51 if MAINTAINER_MODE
52 BUILT_SOURCES += except.i
53 except.i: $(srcdir)/generate-tcl-exceptions ../../xapian-core/exception_data.pm
54         $(PERL) -w -I$(srcdir)/../../xapian-core $(srcdir)/generate-tcl-exceptions
56 RUN_SWIG = $(PERL) '$(top_srcdir)'/swig-depcomp $(SWIG)
58 xapian_wrap.cc: except.i
59         $(RUN_SWIG) $(SWIG_WERROR) -I'$(srcdir)' $(SWIG_FLAGS) -c++ \
60             -tcl8 -namespace -pkgversion '@VERSION_NO_SNAPSHOT@' \
61             -o xapian_wrap.cc '$(srcdir)/'tcl.i
63 -include xapian_wrap.d
64 endif
65 MAINTAINERCLEANFILES = $(BUILT_SOURCES)
67 exampledatadir = $(docdir)/tcl8/examples
68 dist_exampledata_DATA = \
69         docs/examples/simpleexpand.tcl \
70         docs/examples/simpleindex.tcl \
71         docs/examples/simplesearch.tcl
73 docdatadir = $(docdir)/tcl8
74 dist_docdata_DATA = docs/index.html
76 if DOCUMENTATION_RULES
77 BUILT_SOURCES += docs/index.html
79 .rst.html:
80         -case "$@" in */*) d=`echo "$@"|sed 's,/[^/]*$$,,'`; $(MKDIR_P) "$$d" ;; esac
81         $(RST2HTML) --exit-status=warning $< $@
82 endif