1 ## Process this file with automake to produce Makefile.in
4 # Export these so that we run the locally installed autotools when building
5 # from a bootstrapped git tree.
6 export ACLOCAL AUTOCONF AUTOHEADER AUTOM4TE AUTOMAKE
11 html-tok.h: gen-htmltags Makefile.am common/Tokeniseise.pm htmlparser.tokens
12 $(PERL) -I'$(srcdir)/common' '$(srcdir)/gen-htmltags' '$(srcdir)' < '$(srcdir)/htmlparser.tokens'
14 # Recover from the removal of $@. A full explanation of this is in the
15 # automake manual under the heading "Multiple Outputs".
17 @if test -f $@; then :; else \
18 trap 'rm -rf "$(stamp)-lck" "$(stamp)"' 1 2 13 15; \
19 if mkdir '$(stamp)-lck' 2>/dev/null; then \
21 $(MAKE) $(AM_MAKEFLAGS) '$(stamp)'; \
22 result=$$?; rm -rf '$(stamp)-lck'; exit $$result; \
24 while test -d '$(stamp)-lck'; do sleep 1; done; \
29 multitarget_begin = @rm -f $@-t; touch $@-t
30 multitarget_end = @mv -f $@-t $@
33 mimemap.h docs/inc/ignored.rst docs/inc/mimetypes.rst: $(stamp)
35 $(stamp): gen-mimemap Makefile.am common/Tokeniseise.pm mimemap.tokens
37 $(PERL) -I'$(srcdir)/common' '$(srcdir)/gen-mimemap' '$(srcdir)' < '$(srcdir)/mimemap.tokens'
40 namedents.h: gen-namedents Makefile.am common/Tokeniseise.pm
41 $(PERL) -I'$(srcdir)/common' '$(srcdir)/gen-namedents' '$(srcdir)'
43 BUILT_SOURCES = extra/omegascript.vim html-tok.h mimemap.h namedents.h
45 MAINTAINERCLEANFILES = html-tok.h mimemap.h mimemap.stamp namedents.h
59 omindex_libreofficekit
62 clickmodel/testdata/clicklog1\
63 clickmodel/testdata/clicklog2\
64 clickmodel/testdata/clicklog3\
65 common/Tokeniseise.pm \
66 extra/omegascript.vim \
67 extra/omegascript.vim.in \
81 templates/opensearch \
84 templates/inc/anyalldropbox \
85 templates/inc/anyallradio \
86 templates/inc/toptermsjs \
87 testfiles/abw/Friendly-Letter.awt \
88 testfiles/abw/macbeth.zabw \
89 testfiles/abw/test.abw \
90 testfiles/abw/test1.abw \
91 testfiles/apple_works/test_draw.cwk \
92 testfiles/apple_works/test_spreadsheet.cwk \
93 testfiles/apple_works/test_word.cwk \
94 testfiles/audio/file_example_OOG_1MG.ogg \
95 testfiles/audio/file_example_WAV_1MG.wav \
96 testfiles/cdr/test1.cdr \
97 testfiles/cdr/test2.cdr \
98 testfiles/email/html.eml \
99 testfiles/email/text.eml \
100 testfiles/epub/epub2test.epub \
101 testfiles/epub/epub3test.epub \
102 testfiles/fb2/hello.fb2 \
103 testfiles/fb2/lang-name.fb2 \
104 testfiles/fb2/lang2.fb2 \
105 testfiles/image/Test1.gif \
106 testfiles/image/Test2.pgm \
107 testfiles/image/Test3.ppm \
108 testfiles/image/Test4.tiff \
109 testfiles/image/Test5.webp \
110 testfiles/image/poster-2.jpg \
111 testfiles/image/poster.jpg \
112 testfiles/image/scan-page.png \
113 testfiles/iwork/test-keynote.key \
114 testfiles/iwork/test-pages.pages \
115 testfiles/lrf/hello.lrf \
116 testfiles/msxml/2sheets.xlsx \
117 testfiles/msxml/Book.xlsx \
118 testfiles/msxml/Doc.docx \
119 testfiles/msxml/Nature.pptx \
120 testfiles/msxml/vnd.ms-xpsdocument_xpstest.xps \
121 testfiles/opendoc/blank.odt \
122 testfiles/opendoc/corrupt_file.odp \
123 testfiles/opendoc/draw.odg \
124 testfiles/opendoc/presentation.odp \
125 testfiles/opendoc/presentation_template.otp \
126 testfiles/opendoc/spreadsheet.ods \
127 testfiles/opendoc/spreadsheet_template.ots \
128 testfiles/opendoc/test.odt \
129 testfiles/opendoc/text.odt \
130 testfiles/opendoc/text_template.ott \
131 testfiles/pdb/PalmDOC-hello.pdb \
132 testfiles/pdb/PeanutPress-hello.pdb \
133 testfiles/pdb/test.pdb \
134 testfiles/pdf/poppler.pdf \
135 testfiles/staroffice/calc.sxc \
136 testfiles/staroffice/calc_template.stc \
137 testfiles/staroffice/presentation.sxi \
138 testfiles/staroffice/presentation_template.sti \
139 testfiles/staroffice/text.sxw \
140 testfiles/staroffice/text_template.stw \
141 testfiles/svg/diagram.svg \
142 testfiles/svg/diagram.svgz \
143 testfiles/test-csv.csv \
144 testfiles/test-html.html \
145 testfiles/plaintext/iso88591.txt \
146 testfiles/plaintext/utf16be-bom.txt \
147 testfiles/plaintext/utf16le-bom.txt \
148 testfiles/plaintext/utf8-bom.txt \
149 testfiles/plaintext/utf8.txt \
150 testfiles/video/file_example_AVI_480_750kB.avi \
151 testfiles/video/file_example_OGG_480_1_7mg.ogg \
155 -I$(top_srcdir)/common \
156 -DCONFIGFILE_SYSTEM=\"$(sysconfdir)/omega.conf\" \
157 -DPKGLIBBINDIR=\"$(pkglibbindir)\"
158 AM_CXXFLAGS += $(WERROR)
159 AM_CXXFLAGS += $(XAPIAN_CXXFLAGS) $(MAGIC_CFLAGS)
161 pkglibbindir = $(pkglibdir)/bin
162 pkglibbin_PROGRAMS = omega $(OMINDEX_MODULES)
163 dist_pkglibbin_SCRIPTS = mhtml2html outlookmsg2html rfc822tohtml vcard2text
164 bin_PROGRAMS = omindex scriptindex omindex-list generate-qrel-file
165 dist_bin_SCRIPTS = dbi2omega mbox2omega postprocess
167 check_PROGRAMS = atomparsertest csvesctest htmlparsertest jsonesctest md5test sdbntest urlenctest utf8converttest omindexcheck
168 dist_check_SCRIPTS = omegatest.pl sourcetest omindextest
169 TESTS_ENVIRONMENT = UBSAN_OPTIONS=suppressions=$(srcdir)/ubsan.supp $(EATMYDATA)
170 TESTS = atomparsertest$(EXEEXT)\
172 htmlparsertest$(EXEEXT)\
173 jsonesctest$(EXEEXT)\
180 utf8converttest$(EXEEXT)
181 TEST_EXTENSIONS = .pl
182 PL_LOG_COMPILER = $(PERL)
184 omegadatadir = $(datadir)/omega
185 dist_omegadata_DATA = mbox2omega.script
187 dist_sysconf_DATA = omega.conf
189 noinst_HEADERS = omega.h query.h cgiparam.h index_file.h mime.h\
190 htmlparser.h xmlparser.h utils.h configfile.h date.h datetime.h\
191 commonhelp.h cdb.h cdb_int.h failed.h fields.h hashterm.h jsonescape.h\
192 loadfile.h md5.h md5wrap.h abiwordparser.h opendocmetaparser.h values.h utf8convert.h\
193 namedents.h pkglibbindir.h datevalue.h genericxmlparser.h sample.h strcasecmp.h\
194 utf8truncate.h diritor.h runfilter.h freemem.h xpsparser.h transform.h\
195 weight.h expand.h svgparser.h tmpdir.h urldecode.h urlencode.h unixperm.h atomparser.h\
196 xlsxparser.h opendocparser.h msxmlparser.h sort.h timegm.h csvescape.h\
197 portability/mkdtemp.h portability/strptime.h\
198 clickmodel/simplifieddbn.h clickmodel/session.h worker.h worker_comms.h handler.h
200 # headers maintained in xapian-core
202 common/alignment_cast.h\
203 common/append_filename_arg.h\
207 common/msvc_dirent.h\
208 common/negate_unsigned.h\
215 common/safesysexits.h\
216 common/safesyssocket.h\
217 common/safesysselect.h\
218 common/safesysstat.h\
219 common/safesyswait.h\
221 common/safewindows.h\
222 common/safewinsock2.h\
227 AM_LDFLAGS = $(NO_UNDEFINED)
229 # We want to compile transform.cc with PCRE2_CFLAGS, but if this adds a -I for
230 # a directory with a different version of iconv, then we get problems (this
231 # has been reported on macOS). We solve this using a technique suggested by
232 # the automake manual: compile each of transform.cc and utf8convert.cc into
233 # its own convenience library so each only gets its own CPPFLAGS.
234 noinst_LTLIBRARIES = libtransform.la libutf8convert.la
236 libtransform_la_SOURCES = transform.cc
237 libtransform_la_CPPFLAGS = $(PCRE2_CFLAGS)
238 libtransform_la_LIBADD = $(PCRE2_LIBS)
240 libutf8convert_la_SOURCES = utf8convert.cc
241 libutf8convert_la_CPPFLAGS = $(AM_CPPFLAGS) $(INCICONV)
242 libutf8convert_la_LIBADD = $(XAPIAN_LIBS) $(LTLIBICONV)
244 omega_SOURCES = omega.cc query.cc cgiparam.cc utils.cc configfile.cc date.cc\
245 cdb_init.cc cdb_find.cc cdb_hash.cc cdb_unpack.cc jsonescape.cc loadfile.cc\
246 datevalue.cc common/str.cc sample.cc sort.cc urlencode.cc weight.cc expand.cc\
247 csvescape.cc timegm.cc md5.cc md5wrap.cc
248 # Not currently used, and we ought to handle non-Unix perms too: unixperm.cc
249 omega_LDADD = $(XAPIAN_LIBS) libtransform.la
251 omindex_SOURCES = omindex.cc htmlparser.cc xmlparser.cc index_file.cc mime.cc\
252 common/getopt.cc commonhelp.cc utils.cc hashterm.cc loadfile.cc md5.cc\
253 md5wrap.cc abiwordparser.cc opendocmetaparser.cc sample.cc diritor.cc\
254 runfilter.cc freemem.cc common/msvc_dirent.cc xpsparser.cc common/str.cc\
255 pkglibbindir.cc svgparser.cc tmpdir.cc urlencode.cc atomparser.cc xlsxparser.cc\
256 opendocparser.cc common/keyword.cc msxmlparser.cc common/safe.cc timegm.cc\
257 datetime.cc common/closefrom.cc worker.cc worker_comms.cc
259 omindex_SOURCES += portability/mkdtemp.cc
261 omindex_LDADD = $(MAGIC_LIBS) $(XAPIAN_LIBS) $(ZLIB_LIBS) libutf8convert.la
263 omindex_poppler_SOURCES = assistant.cc worker_comms.cc common/str.cc handler_poppler.cc
264 omindex_poppler_LDADD = $(POPPLER_LIBS)
265 omindex_poppler_CXXFLAGS = $(AM_CXXFLAGS) $(POPPLER_CFLAGS)
267 omindex_libebook_SOURCES = assistant.cc worker_comms.cc handler_libebook.cc
268 omindex_libebook_LDADD = $(LIBEBOOK_LIBS)
269 omindex_libebook_CXXFLAGS = $(AM_CXXFLAGS) $(LIBEBOOK_CFLAGS)
271 omindex_libetonyek_SOURCES = assistant.cc worker_comms.cc handler_libetonyek.cc
272 omindex_libetonyek_LDADD = $(LIBETONYEK_LIBS)
273 omindex_libetonyek_CXXFLAGS = $(AM_CXXFLAGS) $(LIBETONYEK_CFLAGS)
275 omindex_libgepub_SOURCES = assistant.cc worker_comms.cc htmlparser.cc datetime.cc xmlparser.cc common/keyword.cc handler_libgepub.cc
276 omindex_libgepub_LDADD = $(LIBGEPUB_LIBS) libutf8convert.la
277 omindex_libgepub_CXXFLAGS = $(AM_CXXFLAGS) $(LIBGEPUB_CFLAGS)
279 omindex_tesseract_SOURCES = assistant.cc worker_comms.cc handler_tesseract.cc
280 omindex_tesseract_LDADD = $(TESSERACT_LIBS)
281 omindex_tesseract_CXXFLAGS = $(AM_CXXFLAGS) $(TESSERACT_CFLAGS)
283 omindex_gmime_SOURCES = assistant.cc worker_comms.cc htmlparser.cc datetime.cc xmlparser.cc common/keyword.cc handler_gmime.cc common/str.cc
284 omindex_gmime_LDADD = $(GMIME_LIBS) libutf8convert.la
285 omindex_gmime_CXXFLAGS = $(AM_CXXFLAGS) $(GMIME_CFLAGS)
287 omindex_libarchive_SOURCES = assistant.cc worker_comms.cc opendocmetaparser.cc opendocparser.cc datetime.cc xmlparser.cc htmlparser.cc msxmlparser.cc xlsxparser.cc xpsparser.cc common/keyword.cc common/str.cc handler_libarchive.cc
288 omindex_libarchive_LDADD = $(LIBARCHIVE_LIBS) libutf8convert.la
289 omindex_libarchive_CXXFLAGS = $(AM_CXXFLAGS) $(LIBARCHIVE_CFLAGS)
291 omindex_libabw_SOURCES = assistant.cc worker_comms.cc handler_libabw.cc
292 omindex_libabw_LDADD = $(LIBABW_LIBS)
293 omindex_libabw_CXXFLAGS = $(AM_CXXFLAGS) $(LIBABW_CFLAGS)
295 omindex_libcdr_SOURCES = assistant.cc worker_comms.cc handler_libcdr.cc
296 omindex_libcdr_LDADD = $(LIBCDR_LIBS)
297 omindex_libcdr_CXXFLAGS = $(AM_CXXFLAGS) $(LIBCDR_CFLAGS)
299 omindex_libextractor_SOURCES = assistant.cc worker_comms.cc handler_libextractor.cc
300 omindex_libextractor_LDADD = $(LIBEXTRACTOR_LIBS)
301 omindex_libextractor_CXXFLAGS = $(AM_CXXFLAGS) $(LIBEXTRACTOR_CFLAGS)
303 omindex_libmwaw_SOURCES = assistant.cc worker_comms.cc handler_libmwaw.cc common/str.cc
304 omindex_libmwaw_LDADD = $(LIBMWAW_LIBS)
305 omindex_libmwaw_CXXFLAGS = $(AM_CXXFLAGS) $(LIBMWAW_CFLAGS)
307 omindex_libreofficekit_SOURCES = assistant.cc worker_comms.cc datetime.cc loadfile.cc tmpdir.cc urlencode.cc xmlparser.cc htmlparser.cc common/keyword.cc common/str.cc handler_libreofficekit.cc
308 omindex_libreofficekit_LDADD = $(LIBREOFFICEKIT_LIBS) libutf8convert.la
309 omindex_libreofficekit_CPPFLAGS = $(AM_CPPFLAGS) $(LIBREOFFICEKIT_CPPFLAGS)
310 omindex_libreofficekit_CXXFLAGS = $(AM_CXXFLAGS) $(LIBREOFFICEKIT_CFLAGS)
312 scriptindex_SOURCES = scriptindex.cc\
313 genericxmlparser.cc htmlparser.cc xmlparser.cc\
314 common/getopt.cc common/str.cc commonhelp.cc utils.cc hashterm.cc loadfile.cc\
316 common/keyword.cc timegm.cc datetime.cc
318 scriptindex_SOURCES += portability/strptime.cc
320 scriptindex_LDADD = $(XAPIAN_LIBS) libutf8convert.la
322 omindex_list_SOURCES = common/getopt.cc omindex-list.cc
323 omindex_list_LDADD = $(XAPIAN_LIBS)
325 generate_qrel_file_SOURCES = generate-qrel-file.cc clickmodel/simplifieddbn.cc\
327 generate_qrel_file_LDADD = $(XAPIAN_LIBS)
329 atomparsertest_SOURCES = atomparsertest.cc atomparser.cc xmlparser.cc\
330 htmlparser.cc common/keyword.cc datetime.cc timegm.cc
331 atomparsertest_LDADD = $(NO_INSTALL) $(XAPIAN_LIBS) libutf8convert.la
333 htmlparsertest_SOURCES = htmlparsertest.cc htmlparser.cc xmlparser.cc\
334 common/keyword.cc datetime.cc timegm.cc
335 htmlparsertest_LDADD = $(NO_INSTALL) $(XAPIAN_LIBS) libutf8convert.la
337 md5test_SOURCES = md5test.cc md5wrap.cc md5.cc
338 md5test_LDADD = $(NO_INSTALL)
340 utf8converttest_SOURCES = utf8converttest.cc
341 utf8converttest_LDADD = $(NO_INSTALL) $(XAPIAN_LIBS) libutf8convert.la
343 urlenctest_SOURCES = urlenctest.cc urlencode.cc
344 urlenctest_LDADD = $(NO_INSTALL) $(XAPIAN_LIBS)
346 csvesctest_SOURCES = csvesctest.cc csvescape.cc
347 csvesctest_LDADD = $(NO_INSTALL)
349 sdbntest_SOURCES = clickmodel/tests/sdbntest.cc clickmodel/simplifieddbn.cc
350 sdbntest_LDADD = $(NO_INSTALL)
352 jsonesctest_SOURCES = jsonesctest.cc jsonescape.cc
353 jsonesctest_LDADD = $(NO_INSTALL) $(XAPIAN_LIBS)
355 omindexcheck_SOURCES = omindexcheck.cc
356 omindexcheck_LDADD = $(NO_INSTALL) $(XAPIAN_LIBS)
358 if !MAINTAINER_NO_DOCS
359 dist_man_MANS = omindex.1 scriptindex.1 omindex-list.1
360 MAINTAINERCLEANFILES += $(dist_man_MANS)
363 if DOCUMENTATION_RULES
364 omindex.1: omindex$(EXEEXT) makemanpage
365 ./makemanpage ./omindex $(srcdir)/omindex.cc omindex.1
367 scriptindex.1: scriptindex$(EXEEXT) makemanpage
368 ./makemanpage ./scriptindex $(srcdir)/scriptindex.cc scriptindex.1
370 omindex-list.1: omindex-list$(EXEEXT) makemanpage
371 ./makemanpage ./omindex-list $(srcdir)/omindex-list.cc omindex-list.1
375 extra/omegascript.vim: extra/omegascript.vim.in query.cc configure.ac
376 $(PERL) $(srcdir)/gen-omegascript-vim "$(srcdir)" "$(PACKAGE_VERSION)"
379 DISTCHECK_CONFIGURE_FLAGS = "XAPIAN_CONFIG=$(XAPIAN_CONFIG)"
383 OMEGA='${pkglibbindir}/omega' \
384 OMINDEX='${bindir}/omindex' \
385 SCRIPTINDEX='${bindir}/scriptindex' \
386 XAPIAN_OMEGA_PKGLIBBINDIR='${pkglibbindir}'