1 ## Process this file with automake to produce Makefile.in
3 AUTOMAKE_OPTIONS = 1.5 subdir-objects
4 ACLOCAL_AMFLAGS = -I m4
7 # Export these so that we run the locally installed autotools when building
8 # from a bootstrapped git tree.
9 export ACLOCAL AUTOCONF AUTOHEADER AUTOM4TE AUTOMAKE
12 AM_CPPFLAGS = -I$(top_srcdir)/common -I$(top_srcdir)/include
14 # Needed for the generated files include/xapian/version.h
15 # include/xapian/error.h and include/xapian/errordispatch.h
16 AM_CPPFLAGS += -I'$(top_builddir)/include'
19 # Order is relevant: when building, tests must be after ".".
20 SUBDIRS = . docs tests
27 MAINTAINERCLEANFILES =
31 .PHONY: coverage-reconfigure coverage-reconfigure-maintainer-mode coverage-check
33 # This relies on GNU make (for the pattern rule) but it's just a convenience
34 # as you can run these check-* targets with any make using:
36 # cd tests ; make check-FOO
38 # So the pain of maintaining a huge list of target forwarding rules here isn't
41 # Note: We use @PERCENT@ here instead of a literal % to suppress an automake
42 # portability warning.
44 cd tests && $(MAKE) $(AM_MAKEFLAGS) $@
46 ## --disable-shared as shared builds fail for me on x86-64 Debian etch.
47 ## If you're using ccache, you need ccache >= 3.0, released 2010-06-20 (older
48 ## versions don't handle --coverage properly). You need ccache >= 3.2.2 to
49 ## actually cache compilations with --coverage - older 3.x just disables
51 COVERAGE_CONFIGURE = \
52 $(srcdir)/configure CXXFLAGS='-O0 --coverage' --disable-shared VALGRIND=
54 coverage-reconfigure: distclean
57 coverage-reconfigure-maintainer-mode: distclean
58 $(COVERAGE_CONFIGURE) --enable-maintainer-mode
62 find . -name '*.gcda' -delete
63 ## Don't run under valgrind even if configure was run by hand.
64 $(MAKE) $(AM_MAKEFLAGS) check VALGRIND=
65 rm -f xapian-core.lcov
66 lcov --capture -d . --quiet --rc 'lcov_branch_coverage=1' --no-external -o xapian-core.lcov
68 genhtml --demangle-cpp --branch-coverage $(GENHTML_ARGS) -q -p "`pwd`" -t "Test Coverage for xapian-core `git log -n1 --abbrev-commit --format=%h`" -o lcov xapian-core.lcov
70 # We want to clean out build tree paths from the copy of xapian-config we
71 # install, mostly in the interests of facilitating reproducible builds.
72 bin_SCRIPTS = installable/xapian-config
74 # Create the installable version in a subdirectory. It's not made executable
75 # until install time, which hopefully should avoid people trying to use it when
76 # building against an uninstalled xapian-core.
77 installable/xapian-config: xapian-config
78 $(MKDIR_P) installable
79 $(SED) '/##UNINSTONLYBEGIN/,/##UNINSTONLYEND/d' xapian-config > installable/xapian-config.tmp
80 mv installable/xapian-config.tmp installable/xapian-config
82 CLEANFILES += installable/xapian-config
84 noinst_SCRIPTS = xapian-config
86 DISTCLEANFILES += xapian-config
88 EXTRA_DIST = ChangeLog ChangeLog.0 ChangeLog.examples HACKING PLATFORMS \
89 xapian-core.spec include/xapian/error.h include/xapian/errordispatch.h \
90 generate-exceptions exception_data.pm preautoreconf
92 cmakedir = $(libdir)/cmake/xapian
93 cmake_DATA = cmake/xapian-config.cmake cmake/xapian-config-version.cmake
95 # docsource.mk is generated by preautoreconf, run by bootstrap prior to
96 # it running autoreconf.
99 # Install the m4 file containing the XO_LIB_XAPIAN autoconf macro.
100 m4datadir = $(datadir)/aclocal
101 dist_m4data_DATA = m4-macros/xapian.m4
103 # Install the pkg-config file containing the correct compiler options.
104 pkgconfigdir = $(libdir)/pkgconfig
105 nodist_pkgconfig_DATA = pkgconfig/xapian-core.pc
106 DISTCLEANFILES += pkgconfig/xapian-core.pc
108 libxapian_la = libxapian.la
109 lib_LTLIBRARIES = libxapian.la
110 libxapian_la_SOURCES = $(lib_src)
111 libxapian_la_LIBADD = $(XAPIAN_LIBS)
112 libxapian_la_LDFLAGS = \
113 $(XAPIAN_LDFLAGS) $(NO_UNDEFINED) -version-info $(LIBRARY_VERSION_INFO)
117 if !MAINTAINER_NO_DOCS
118 dist_man_MANS = xapian-config.1
121 include api/Makefile.mk
122 include bin/Makefile.mk
123 include backends/Makefile.mk
124 include common/Makefile.mk
125 include examples/Makefile.mk
126 include expand/Makefile.mk
127 include geospatial/Makefile.mk
128 include include/Makefile.mk
129 include languages/Makefile.mk
130 include matcher/Makefile.mk
131 include net/Makefile.mk
132 include queryparser/Makefile.mk
133 include unicode/Makefile.mk
134 include weight/Makefile.mk
136 xapianinclude_HEADERS += include/xapian/error.h
138 # If these files change, we need to rerun configure to reprocess them -
139 # making them dependencies of config.status achieves that.
140 CONFIG_STATUS_DEPENDENCIES = include/xapian/version_h.cc
143 BUILT_SOURCES += include/xapian/error.h include/xapian/errordispatch.h
145 include/xapian/error.h include/xapian/errordispatch.h: generate-exceptions exception_data.pm
146 $(PERL) -w -I"$(srcdir)" "$(srcdir)/generate-exceptions"
149 if !MAINTAINER_NO_DOCS
150 MAINTAINERCLEANFILES += $(dist_man_MANS)
153 if DOCUMENTATION_RULES
154 xapian-config.1: xapian-config makemanpage
155 ./makemanpage ./xapian-config xapian-config xapian-config.1
158 MAINTAINERCLEANFILES += $(BUILT_SOURCES)
163 $(CXXCOMPILE) -fsyntax-only -gstabs+ $(check_sources)