[omega] Compute date spans in days
[xapian.git] / xapian-bindings / perl / Makefile.am
bloba3cbfa213699eb8b5b76ec30b1a6adc8cac80b26
1 ## Process this file with automake to produce Makefile.in
3 include ../generic/generic.mk
5 # Disable parallel build for this make invocation; some tests depend
6 # on previous ones having set up their database for them.
7 .NOTPARALLEL:
9 ## Test programs to be run
10 TESTS = \
11         t/01use.t \
12         t/02pod.t \
13         t/03podcoverage.t \
14         t/04functions.t \
15         t/10query.t \
16         t/collapse.t \
17         t/create.t \
18         t/databasemodified.t \
19         t/document.t \
20         t/exception.t \
21         t/index.t \
22         t/parser.t \
23         t/search.t \
24         t/sorter.t \
25         t/stem.t \
26         t/symbol-test.t \
27         t/termgenerator.t \
28         t/thread.t \
29         t/tied.t \
30         t/valuerange.t \
31         t/writabledatabase.t
32 AM_TESTS_ENVIRONMENT = \
33         srcdir='$(srcdir)' ;\
34         CPPFLAGS="$(CPPFLAGS)" ;\
35         CXX="$(CXX)" ;\
36         CXXFLAGS="$(CXXFLAGS)" ;\
37         XAPIAN_CONFIG="$(XAPIAN_CONFIG)" ;\
38         export srcdir ;\
39         export CPPFLAGS ;\
40         export CXX ;\
41         export CXXFLAGS ;\
42         export XAPIAN_CONFIG ;
43 LOG_COMPILER = \
44     $(LIBTOOL) -dlopen Xapian.la --mode=execute $(MACOS_SIP_HACK_ENV) $(PERL) \
45         $(srcdir)/run-perl-test
47 installcheck-local:
48         $(MAKE) AM_LOG_FLAGS=
50 clean-local:
51         rm -rf testdb* auto
53 BUILT_SOURCES = Xapian.pm xapian_wrap.cc \
54         auto/Xapian/Xapian$(PERL_SO)
56 auto/Xapian/Xapian$(PERL_SO): Xapian.la
57         @$(MKDIR_P) auto/Xapian
58         cp "$(_libs)/Xapian$(PERL_SO)" auto/Xapian
60 EXTRA_DIST = perl.i except.i extra.i $(TESTS) \
61         generate-perl-exceptions \
62         run-perl-test \
63         Xapian.pm xapian_wrap.cc \
64         t/symbol-test/SymbolTest.pm \
65         t/symbol-test/typemap \
66         t/symbol-test/SymbolTest.xs \
67         t/symbol-test/Makefile.PL
69 exampledatadir = $(docdir)/perl/examples
70 dist_exampledata_DATA = \
71         docs/examples/full-indexer.pl \
72         docs/examples/full-searcher.pl \
73         docs/examples/simpleexpand.pl \
74         docs/examples/simpleindex.pl \
75         docs/examples/simplematchdecider.pl \
76         docs/examples/simplesearch.pl
78 perlarchdir = $(PERL_ARCH)/auto/Xapian
79 perlarch_LTLIBRARIES = Xapian.la
81 # Remove the .la file - Xapian.la is never linked against (it's a module)
82 # and Perl doesn't use libltdl.  Note that the library gets installed by
83 # install-data, so that's where we need to hook.
84 install-data-hook:
85         rm -f $(DESTDIR)$(perlarchdir)/Xapian.la
87 install-data-local:
88         $(mkinstalldirs) "$(DESTDIR)$(docdatadir)/Xapian"
89         @cd docs ; for f in Xapian/*.html ; do \
90           echo " $(INSTALL_DATA) '$$f' '$(DESTDIR)$(docdatadir)/$$f'"; \
91           $(INSTALL_DATA) "$$f" "$(DESTDIR)$(docdatadir)/$$f"; \
92         done
94 uninstall-local:
95         ## Because we don't install the .la file, "make uninstall" doesn't work and
96         ## we need to remove the file ourselves.
97         rm -f $(DESTDIR)$(perlarchdir)/Xapian$(PERL_SO)
98         @cd docs ; for f in Xapian/*.html ; do \
99           echo " rm -f '$(DESTDIR)$(docdatadir)/$$f'"; \
100           rm -f "$(DESTDIR)$(docdatadir)/$$f"; \
101         done
104 perllibdir = $(PERL_LIB)
105 nobase_dist_perllib_DATA = \
106         Xapian.pm \
107         Xapian/AssertionError.pm \
108         Xapian/BM25Weight.pm \
109         Xapian/BoolWeight.pm \
110         Xapian/DatabaseCorruptError.pm \
111         Xapian/DatabaseCreateError.pm \
112         Xapian/DatabaseError.pm \
113         Xapian/DatabaseLockError.pm \
114         Xapian/DatabaseModifiedError.pm \
115         Xapian/DatabaseOpeningError.pm \
116         Xapian/Database.pm \
117         Xapian/DatabaseVersionError.pm \
118         Xapian/DocNotFoundError.pm \
119         Xapian/Document.pm \
120         Xapian/Enquire.pm \
121         Xapian/Error.pm \
122         Xapian/ESetIterator.pm \
123         Xapian/ESet.pm \
124         Xapian/FeatureUnavailableError.pm \
125         Xapian/InternalError.pm \
126         Xapian/InvalidArgumentError.pm \
127         Xapian/InvalidOperationError.pm \
128         Xapian/LogicError.pm \
129         Xapian/MSetIterator.pm \
130         Xapian/MSet.pm \
131         Xapian/MultiValueSorter.pm \
132         Xapian/NetworkError.pm \
133         Xapian/NetworkTimeoutError.pm \
134         Xapian/PositionIterator.pm \
135         Xapian/PostingIterator.pm \
136         Xapian/QueryParserError.pm \
137         Xapian/QueryParser.pm \
138         Xapian/Query.pm \
139         Xapian/RangeError.pm \
140         Xapian/RSet.pm \
141         Xapian/RuntimeError.pm \
142         Xapian/SimpleStopper.pm \
143         Xapian/Stem.pm \
144         Xapian/Stopper.pm \
145         Xapian/TermGenerator.pm \
146         Xapian/TermIterator.pm \
147         Xapian/TradWeight.pm \
148         Xapian/UnimplementedError.pm \
149         Xapian/ValueIterator.pm \
150         Xapian/Weight.pm \
151         Xapian/WritableDatabase.pm
153 AM_CPPFLAGS = -I$(PERL_INC)
154 AM_CXXFLAGS = @SWIG_CXXFLAGS@ $(XAPIAN_CXXFLAGS)
155 Xapian_la_LDFLAGS = -avoid-version -module -shrext $(PERL_SO) $(NO_UNDEFINED)
156 Xapian_la_SOURCES = xapian_wrap.cc
157 Xapian_la_LIBADD = $(XAPIAN_LIBS) $(PERL_LIBS)
159 CLEANFILES =
161 if MAINTAINER_MODE
162 BUILT_SOURCES += except.i
163 except.i: $(srcdir)/generate-perl-exceptions ../../xapian-core/exception_data.pm
164         $(PERL) -w -I$(srcdir)/../../xapian-core $(srcdir)/generate-perl-exceptions
166 stamp = xapian_wrap.stamp
167 SWIG_FLAGS += -MD -MP -MT $(stamp)
169 xapian_wrap.cc Xapian.pm: $(stamp)
170         $(make_many_locked)
171 $(stamp): except.i
172         $(multitarget_begin)
173         $(SWIG) $(SWIG_WERROR) -I. -I'$(srcdir)' $(SWIG_FLAGS) -c++ \
174             -perl -module Xapian -const \
175             -DPERL_XAPIAN_VERSION='"$(PERL_XAPIAN_VERSION)"' \
176             -o xapian_wrap.cc '$(srcdir)/'perl.i
177         $(multitarget_end)
179 -include xapian_wrap.d
181 CLEANFILES += xapian_wrap.d $(stamp)
182 endif
183 MAINTAINERCLEANFILES = $(BUILT_SOURCES)
185 docdatadir = $(docdir)/perl
186 docdata_DATA = docs/Xapian.html
188 CLEANFILES += docs/Xapian.html pod2html?.tmp
190 docs/Xapian.html: $(nobase_dist_perllib_DATA)
191         $(MKDIR_P) docs
192         $(MKDIR_P) docs/Xapian
193         $(PERL) -MPod::Html -e 'for (@ARGV) { my $$pm = $$_; s/pm$$/html/; $$pm = "$(srcdir)/$$pm" unless -f $$pm; pod2html("--podpath=.", "--htmldir=docs", "--infile=$$pm", "--outfile=docs/$$_") }' $(nobase_dist_perllib_DATA)
194         rm -f pod2htm?.tmp