Website now in git not CVS
[xapian.git] / xapian-core / Makefile.am
blob82909d5dd774979386c047696608f1cdd08f8b80
1 ## Process this file with automake to produce Makefile.in
3 AUTOMAKE_OPTIONS = 1.5 subdir-objects
4 ACLOCAL_AMFLAGS = -I m4
6 if MAINTAINER_MODE
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
10 endif
12 AM_CPPFLAGS = -I$(top_srcdir)/common -I$(top_srcdir)/include
13 if VPATH_BUILD
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'
17 endif
19 # Order is relevant: when building, tests must be after ".".
20 SUBDIRS = . docs tests
22 noinst_HEADERS =
23 BUILT_SOURCES =
24 noinst_LTLIBRARIES =
25 CLEANFILES =
26 DISTCLEANFILES =
27 MAINTAINERCLEANFILES =
28 bin_PROGRAMS =
29 EXTRA_PROGRAMS =
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
39 # worth it.
41 # Note: We use @PERCENT@ here instead of a literal % to suppress an automake
42 # portability warning.
43 check-@PERCENT@:
44         cd tests && $(MAKE) $(AM_MAKEFLAGS) $@
46 ## --disable-shared as shared builds fail for me on x86-64 Debian etch.
47 ## CCACHE_DISABLE as ccache 2.4 doesn't handle the .gcno files.
48 COVERAGE_CONFIGURE = \
49     $(srcdir)/configure CXXFLAGS='-O0 --coverage' \
50     --enable-quiet --disable-shared CCACHE_DISABLE=1 VALGRIND=
52 coverage-reconfigure: distclean
53         $(COVERAGE_CONFIGURE)
55 coverage-reconfigure-maintainer-mode: distclean
56         $(COVERAGE_CONFIGURE) --enable-maintainer-mode
58 coverage-check:
59         ## GNU find specific.
60         find . -name '*.gcda' -delete
61         ## Don't run under valgrind even if configure was run by hand.
62         $(MAKE) $(AM_MAKEFLAGS) check VALGRIND=
63         rm -f xapian-core.lcov
64         lcov --capture -d . --quiet --rc 'lcov_branch_coverage=1' --no-external -o xapian-core.lcov
65         rm -rf lcov
66         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
68 bin_SCRIPTS = xapian-config
70 DISTCLEANFILES += xapian-config
72 EXTRA_DIST = ChangeLog ChangeLog.0 ChangeLog.examples HACKING PLATFORMS \
73  xapian-core.spec include/xapian/error.h include/xapian/errordispatch.h \
74  generate-exceptions exception_data.pm preautoreconf
76 cmakedir = $(libdir)/cmake/xapian
77 cmake_DATA = cmake/xapian-config.cmake cmake/xapian-config-version.cmake
79 # docsource.mk is generated by preautoreconf, run by bootstrap prior to
80 # it running autoreconf.
81 include docsource.mk
83 # Install the m4 file containing the XO_LIB_XAPIAN autoconf macro.
84 m4datadir = $(datadir)/aclocal
85 dist_m4data_DATA = m4-macros/xapian-1.3.m4
87 # Install the pkg-config file containing the correct compiler options.
88 pkgconfigdir = $(libdir)/pkgconfig
89 nodist_pkgconfig_DATA = pkgconfig/xapian-core-1.3.pc
90 DISTCLEANFILES += pkgconfig/xapian-core-1.3.pc
92 libxapian_la = libxapian-1.3.la
93 lib_LTLIBRARIES = libxapian-1.3.la
94 libxapian_1_3_la_SOURCES = $(lib_src)
95 libxapian_1_3_la_LIBADD = $(XAPIAN_LIBS)
96 libxapian_1_3_la_LDFLAGS = \
97     $(XAPIAN_LDFLAGS) $(NO_UNDEFINED) -version-info $(LIBRARY_VERSION_INFO)
99 lib_src =
101 if !MAINTAINER_NO_DOCS
102 dist_man_MANS = xapian-config.1
103 endif
105 include api/Makefile.mk
106 include bin/Makefile.mk
107 include backends/Makefile.mk
108 include common/Makefile.mk
109 include examples/Makefile.mk
110 include expand/Makefile.mk
111 include geospatial/Makefile.mk
112 include include/Makefile.mk
113 include languages/Makefile.mk
114 include matcher/Makefile.mk
115 include net/Makefile.mk
116 include queryparser/Makefile.mk
117 include unicode/Makefile.mk
118 include weight/Makefile.mk
120 xapianinclude_HEADERS += include/xapian/error.h
122 if MAINTAINER_MODE
123 BUILT_SOURCES += include/xapian/error.h include/xapian/errordispatch.h
125 include/xapian/error.h include/xapian/errordispatch.h: generate-exceptions exception_data.pm
126         $(PERL) -w -I"$(srcdir)" "$(srcdir)/generate-exceptions"
127 endif
129 if !MAINTAINER_NO_DOCS
130 MAINTAINERCLEANFILES += $(dist_man_MANS)
131 endif
133 if DOCUMENTATION_RULES
134 xapian-config.1: xapian-config makemanpage
135         ./makemanpage ./xapian-config xapian-config xapian-config.1
136 endif
138 MAINTAINERCLEANFILES += $(BUILT_SOURCES)
140 .PHONY: check-syntax
142 check-syntax:
143         $(CXXCOMPILE) -fsyntax-only -gstabs+ $(check_sources)