tests/harness/backendmanager_remotetcp.cc: Don't leave an extra fd
[xapian.git] / xapian-bindings / perl / Makefile.am
blob50d4deab3903d149242a17e500cb58a8181f6d28
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         CPPFLAGS="$(CPPFLAGS)" ;\
34         CXX="$(CXX)" ;\
35         CXXFLAGS="$(CXXFLAGS)" ;\
36         XAPIAN_CONFIG="$(XAPIAN_CONFIG)" ;\
37         export CPPFLAGS ;\
38         export CXX ;\
39         export CXXFLAGS ;\
40         export XAPIAN_CONFIG ;
41 LOG_COMPILER = $(PROVE)
42 AM_LOG_FLAGS = -I. -I'$(srcdir)'
44 clean-local:
45         rm -rf testdb* auto
47 BUILT_SOURCES = Xapian.pm xapian_wrap.cc \
48         auto/Xapian/Xapian$(PERL_SO)
50 auto/Xapian/Xapian$(PERL_SO): Xapian.la
51         @$(MKDIR_P) auto/Xapian
52         $(LIBTOOL) --config > libtoolconfig.tmp
53 ## ksh requires a path on the sourced file.
54         . ./libtoolconfig.tmp; cp "$$objdir/Xapian$(PERL_SO)" auto/Xapian
55         rm -f libtoolconfig.tmp
57 EXTRA_DIST = perl.i except.i $(TESTS) \
58         generate-perl-exceptions \
59         Xapian.pm xapian_wrap.cc \
60         t/symbol-test/SymbolTest.pm \
61         t/symbol-test/typemap \
62         t/symbol-test/SymbolTest.xs \
63         t/symbol-test/Makefile.PL
65 exampledatadir = $(docdir)/perl/examples
66 dist_exampledata_DATA = \
67         docs/examples/full-indexer.pl \
68         docs/examples/full-searcher.pl \
69         docs/examples/simpleexpand.pl \
70         docs/examples/simpleindex.pl \
71         docs/examples/simplematchdecider.pl \
72         docs/examples/simplesearch.pl
74 perlarchdir = $(PERL_ARCH)/auto/Xapian
75 perlarch_LTLIBRARIES = Xapian.la
77 # Remove the .la file - Xapian.la is never linked against (it's a module)
78 # and Perl doesn't use libltdl.  Note that the library gets installed by
79 # install-data, so that's where we need to hook.
80 install-data-hook:
81         rm -f $(DESTDIR)$(perlarchdir)/Xapian.la
83 # Because we don't install the .la file, "make uninstall" doesn't work and
84 # we need to remove the file ourselves.
85 uninstall-local:
86         eval `grep '^dlname=' $(perlarch_LTLIBRARIES)` ; \
87           rm -f $(DESTDIR)$(perlarchdir)/"$$dlname"
89 perllibdir = $(PERL_LIB)
90 nobase_dist_perllib_DATA = \
91         Xapian.pm \
92         Xapian/AssertionError.pm \
93         Xapian/BM25Weight.pm \
94         Xapian/BoolWeight.pm \
95         Xapian/DatabaseCorruptError.pm \
96         Xapian/DatabaseCreateError.pm \
97         Xapian/DatabaseError.pm \
98         Xapian/DatabaseLockError.pm \
99         Xapian/DatabaseModifiedError.pm \
100         Xapian/DatabaseOpeningError.pm \
101         Xapian/Database.pm \
102         Xapian/DatabaseVersionError.pm \
103         Xapian/DocNotFoundError.pm \
104         Xapian/Document.pm \
105         Xapian/Enquire.pm \
106         Xapian/Error.pm \
107         Xapian/ESetIterator.pm \
108         Xapian/ESet.pm \
109         Xapian/FeatureUnavailableError.pm \
110         Xapian/InternalError.pm \
111         Xapian/InvalidArgumentError.pm \
112         Xapian/InvalidOperationError.pm \
113         Xapian/LogicError.pm \
114         Xapian/MSetIterator.pm \
115         Xapian/MSet.pm \
116         Xapian/MultiValueSorter.pm \
117         Xapian/NetworkError.pm \
118         Xapian/NetworkTimeoutError.pm \
119         Xapian/PerlStopper.pm \
120         Xapian/PositionIterator.pm \
121         Xapian/PostingIterator.pm \
122         Xapian/QueryParserError.pm \
123         Xapian/QueryParser.pm \
124         Xapian/Query.pm \
125         Xapian/RangeError.pm \
126         Xapian/RSet.pm \
127         Xapian/RuntimeError.pm \
128         Xapian/SimpleStopper.pm \
129         Xapian/Stem.pm \
130         Xapian/Stopper.pm \
131         Xapian/TermGenerator.pm \
132         Xapian/TermIterator.pm \
133         Xapian/TradWeight.pm \
134         Xapian/UnimplementedError.pm \
135         Xapian/ValueIterator.pm \
136         Xapian/Weight.pm \
137         Xapian/WritableDatabase.pm
139 AM_CPPFLAGS = -I$(PERL_INC)
140 AM_CXXFLAGS = @SWIG_CXXFLAGS@ $(XAPIAN_CXXFLAGS)
141 Xapian_la_LDFLAGS = -avoid-version -module -shrext $(PERL_SO) $(NO_UNDEFINED)
142 Xapian_la_SOURCES = xapian_wrap.cc
143 Xapian_la_LIBADD = $(XAPIAN_LIBS) $(PERL_LIBS)
145 if MAINTAINER_MODE
146 BUILT_SOURCES += except.i
147 except.i: $(srcdir)/generate-perl-exceptions ../../xapian-core/exception_data.pm
148         $(PERL) -w -I$(srcdir)/../../xapian-core $(srcdir)/generate-perl-exceptions
150 stamp = xapian_wrap.stamp
151 RUN_SWIG = stamp='$(stamp)' $(PERL) '$(top_srcdir)'/swig-depcomp $(SWIG)
153 xapian_wrap.cc Xapian.pm: $(stamp)
154         $(make_many_locked)
155 $(stamp): except.i
156         $(multitarget_begin)
157         $(RUN_SWIG) $(SWIG_WERROR) -I. -I'$(srcdir)' $(SWIG_FLAGS) -c++ \
158             -perl -module Xapian -proxy -const \
159             -o xapian_wrap.cc '$(srcdir)/'perl.i
160         $(multitarget_end)
162 -include xapian_wrap.d
164 CLEANFILES = pod2htm?.tmp xapian_wrap.d $(stamp)
165 endif
166 MAINTAINERCLEANFILES = $(BUILT_SOURCES)
168 docdatadir = $(docdir)/perl
169 EXTRA_DIST += docs/index.html
171 if DOCUMENTATION_RULES
172 docdata_DATA = docs/index.html
174 docs/index.html: Xapian.pm
175         $(MKDIR_P) docs
176         pod2html Xapian.pm > docs/index.html
177         rm -f pod2htm?.tmp
178 endif