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.
9 ## Test programs to be run
18 t/databasemodified.t \
32 AM_TESTS_ENVIRONMENT = \
34 CPPFLAGS="$(CPPFLAGS)" ;\
36 CXXFLAGS="$(CXXFLAGS)" ;\
37 XAPIAN_CONFIG="$(XAPIAN_CONFIG)" ;\
42 export XAPIAN_CONFIG ;
44 $(LIBTOOL) -dlopen Xapian.la --mode=execute $(MACOS_SIP_HACK_ENV) $(PERL) \
45 $(srcdir)/run-perl-test
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 \
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.
85 rm -f $(DESTDIR)$(perlarchdir)/Xapian.la
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"; \
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"; \
104 perllibdir = $(PERL_LIB)
105 nobase_dist_perllib_DATA = \
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 \
117 Xapian/DatabaseVersionError.pm \
118 Xapian/DocNotFoundError.pm \
122 Xapian/ESetIterator.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 \
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 \
139 Xapian/RangeError.pm \
141 Xapian/RuntimeError.pm \
142 Xapian/SimpleStopper.pm \
145 Xapian/TermGenerator.pm \
146 Xapian/TermIterator.pm \
147 Xapian/TradWeight.pm \
148 Xapian/UnimplementedError.pm \
149 Xapian/ValueIterator.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)
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)
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
179 -include xapian_wrap.d
181 CLEANFILES += xapian_wrap.d $(stamp)
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)
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)