-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.am
163 lines (129 loc) · 5.21 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = 1.5 subdir-objects
ACLOCAL_AMFLAGS = -I m4
if MAINTAINER_MODE
# Export these so that we run the locally installed autotools when building
# from a bootstrapped git tree.
export ACLOCAL AUTOCONF AUTOHEADER AUTOM4TE AUTOMAKE
endif
AM_CPPFLAGS = -I$(top_srcdir)/common -I$(top_srcdir)/include
if VPATH_BUILD
# Needed for the generated files include/xapian/version.h
# include/xapian/error.h and include/xapian/errordispatch.h
AM_CPPFLAGS += -I'$(top_builddir)/include'
endif
# Order is relevant: when building, tests must be after ".".
SUBDIRS = . docs tests
noinst_HEADERS =
BUILT_SOURCES =
noinst_LTLIBRARIES =
CLEANFILES =
DISTCLEANFILES =
MAINTAINERCLEANFILES =
bin_PROGRAMS =
EXTRA_PROGRAMS =
.PHONY: coverage-reconfigure coverage-reconfigure-maintainer-mode coverage-check
# This relies on GNU make (for the pattern rule) but it's just a convenience
# as you can run these check-* targets with any make using:
#
# cd tests ; make check-FOO
#
# So the pain of maintaining a huge list of target forwarding rules here isn't
# worth it.
#
# Note: We use @PERCENT@ here instead of a literal % to suppress an automake
# portability warning.
check-@PERCENT@:
cd tests && $(MAKE) $(AM_MAKEFLAGS) $@
## --disable-shared as shared builds fail for me on x86-64 Debian etch.
## If you're using ccache, you need ccache >= 3.0, released 2010-06-20 (older
## versions don't handle --coverage properly). You need ccache >= 3.2.2 to
## actually cache compilations with --coverage - older 3.x just disables
## caching for them.
COVERAGE_CONFIGURE = \
$(srcdir)/configure CXXFLAGS='-O0 --coverage' --disable-shared VALGRIND=
coverage-reconfigure: distclean
$(COVERAGE_CONFIGURE)
coverage-reconfigure-maintainer-mode: distclean
$(COVERAGE_CONFIGURE) --enable-maintainer-mode
coverage-check:
## GNU find specific.
find . -name '*.gcda' -delete
## Don't run under valgrind even if configure was run by hand.
$(MAKE) $(AM_MAKEFLAGS) check VALGRIND=
rm -f xapian-core.lcov
lcov --capture -d . --quiet --rc 'lcov_branch_coverage=1' --no-external -o xapian-core.lcov
rm -rf lcov
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
# We want to clean out build tree paths from the copy of xapian-config we
# install, mostly in the interests of facilitating reproducible builds.
bin_SCRIPTS = installable/xapian-config
# Create the installable version in a subdirectory. It's not made executable
# until install time, which hopefully should avoid people trying to use it when
# building against an uninstalled xapian-core.
installable/xapian-config: xapian-config
$(MKDIR_P) installable
$(SED) '/##UNINSTONLYBEGIN/,/##UNINSTONLYEND/d' xapian-config > installable/xapian-config.tmp
mv installable/xapian-config.tmp installable/xapian-config
CLEANFILES += installable/xapian-config
noinst_SCRIPTS = xapian-config
DISTCLEANFILES += xapian-config
EXTRA_DIST = ChangeLog ChangeLog.0 ChangeLog.examples HACKING PLATFORMS \
xapian-core.spec include/xapian/error.h include/xapian/errordispatch.h \
generate-exceptions exception_data.pm preautoreconf
cmakedir = $(libdir)/cmake/xapian
cmake_DATA = cmake/xapian-config.cmake cmake/xapian-config-version.cmake
# docsource.mk is generated by preautoreconf, run by bootstrap prior to
# it running autoreconf.
include docsource.mk
# Install the m4 file containing the XO_LIB_XAPIAN autoconf macro.
m4datadir = $(datadir)/aclocal
dist_m4data_DATA = m4-macros/xapian.m4
# Install the pkg-config file containing the correct compiler options.
pkgconfigdir = $(libdir)/pkgconfig
nodist_pkgconfig_DATA = pkgconfig/xapian-core.pc
DISTCLEANFILES += pkgconfig/xapian-core.pc
libxapian_la = libxapian.la
lib_LTLIBRARIES = libxapian.la
libxapian_la_SOURCES = $(lib_src)
libxapian_la_LIBADD = $(XAPIAN_LIBS)
libxapian_la_LDFLAGS = \
$(XAPIAN_LDFLAGS) $(NO_UNDEFINED) -version-info $(LIBRARY_VERSION_INFO)
lib_src =
if !MAINTAINER_NO_DOCS
dist_man_MANS = xapian-config.1
endif
include api/Makefile.mk
include bin/Makefile.mk
include backends/Makefile.mk
include common/Makefile.mk
include examples/Makefile.mk
include expand/Makefile.mk
include geospatial/Makefile.mk
include include/Makefile.mk
include languages/Makefile.mk
include matcher/Makefile.mk
include net/Makefile.mk
include queryparser/Makefile.mk
include unicode/Makefile.mk
include weight/Makefile.mk
xapianinclude_HEADERS += include/xapian/error.h
# If these files change, we need to rerun configure to reprocess them -
# making them dependencies of config.status achieves that.
CONFIG_STATUS_DEPENDENCIES = include/xapian/version_h.cc
if MAINTAINER_MODE
BUILT_SOURCES += include/xapian/error.h include/xapian/errordispatch.h
include/xapian/error.h include/xapian/errordispatch.h: generate-exceptions exception_data.pm
$(PERL) -w -I"$(srcdir)" "$(srcdir)/generate-exceptions"
endif
if !MAINTAINER_NO_DOCS
MAINTAINERCLEANFILES += $(dist_man_MANS)
endif
if DOCUMENTATION_RULES
xapian-config.1: xapian-config makemanpage
./makemanpage ./xapian-config xapian-config xapian-config.1
endif
MAINTAINERCLEANFILES += $(BUILT_SOURCES)
.PHONY: check-syntax
check-syntax:
$(CXXCOMPILE) -fsyntax-only -gstabs+ $(check_sources)