File: Makefile.am

package info (click to toggle)
xapian-core 1.4.3-2~bpo8+1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 21,224 kB
  • sloc: cpp: 113,806; ansic: 8,723; sh: 4,433; perl: 836; makefile: 567; tcl: 317; python: 40
file content (251 lines) | stat: -rw-r--r-- 7,162 bytes parent folder | download | duplicates (2)
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
## Process this file with automake to produce Makefile.in

AUTOMAKE_OPTIONS = 1.12.2 serial-tests subdir-objects

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) -I$(top_srcdir)/common -I$(top_srcdir)/include \
 -I$(top_builddir)/include -I$(srcdir)/harness

CLEANFILES =

libxapian_la = libxapian@LIBRARY_VERSION_SUFFIX@.la

TESTS_ENVIRONMENT = ./runtest

.PHONY: check-none check-inmemory \
	check-chert check-glass \
	check-multi check-multi-chert check-multi-glass \
	check-remote check-remoteprog check-remotetcp \
	check-remoteprog-chert check-remoteprog-glass \
	check-remotetcp-chert check-remotetcp-glass \
	up remove-cached-databases

up:
	cd .. && $(MAKE)

check-none: apitest$(EXEEXT) \
            internaltest$(EXEEXT) \
	    stemtest$(EXEEXT) \
	    unittest$(EXEEXT)
	$(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b none
	$(TESTS_ENVIRONMENT) ./internaltest$(EXEEXT)
	$(TESTS_ENVIRONMENT) ./stemtest$(EXEEXT)
	$(TESTS_ENVIRONMENT) ./unittest$(EXEEXT)

check-inmemory: apitest$(EXEEXT)
	$(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b inmemory

check-multi: apitest$(EXEEXT)
	$(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b multi

check-singlefile: apitest$(EXEEXT)
	$(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b singlefile

if BUILD_BACKEND_REMOTE
check-remote: check-remoteprog check-remotetcp

check-remoteprog: apitest$(EXEEXT)
## If both chert and glass are enabled, just run remoteprog_chert.
if BUILD_BACKEND_CHERT
	$(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b remoteprog_chert
else
	$(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b remoteprog
endif

check-remotetcp: apitest$(EXEEXT)
## If both chert and glass are enabled, just run remotetcp_glass.
if BUILD_BACKEND_GLASS
	$(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b remotetcp_glass
else
	$(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b remotetcp
endif

if BUILD_BACKEND_GLASS
check-remoteprog-glass: apitest$(EXEEXT)
	$(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b remoteprog_glass
check-remotetcp-glass: apitest$(EXEEXT)
	$(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b remotetcp_glass
endif

if BUILD_BACKEND_CHERT
check-remoteprog-chert: apitest$(EXEEXT)
	$(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b remoteprog_chert
check-remotetcp-chert: apitest$(EXEEXT)
	$(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b remotetcp_chert
endif
endif

if BUILD_BACKEND_GLASS
check-multi-glass: apitest$(EXEEXT)
	$(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b multi_glass
check-glass: apitest$(EXEEXT)
	$(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b glass
check-singlefile-glass: apitest$(EXEEXT)
	$(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b singlefile_glass
endif

if BUILD_BACKEND_CHERT
check-multi-chert: apitest$(EXEEXT)
	$(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b multi_chert
check-chert: apitest$(EXEEXT)
	$(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b chert
endif

## Test programs to be run
TESTS = apitest$(EXEEXT) internaltest$(EXEEXT) stemtest$(EXEEXT) \
 unittest$(EXEEXT)

## Programs to build
check_PROGRAMS = \
	apitest internaltest stemtest unittest

# Make sure runtest is up to date before running tests
check_SCRIPTS = runtest

## Sources:

noinst_HEADERS = apitest.h dbcheck.h

collated_apitest_sources = \
 api_anydb.cc \
 api_backend.cc \
 api_closedb.cc \
 api_collapse.cc \
 api_compact.cc \
 api_compactold.cc \
 api_db.cc \
 api_generated.cc \
 api_geospatial.cc \
 api_matchspy.cc \
 api_metadata.cc \
 api_nodb.cc \
 api_none.cc \
 api_opsynonym.cc \
 api_opvalue.cc \
 api_percentages.cc \
 api_posdb.cc \
 api_postingsource.cc \
 api_qpbackend.cc \
 api_query.cc \
 api_queryparser.cc \
 api_replacedoc.cc \
 api_replicate.cc \
 api_scalability.cc \
 api_serialise.cc \
 api_snippets.cc \
 api_sorting.cc \
 api_spelling.cc \
 api_stem.cc \
 api_termgen.cc \
 api_transdb.cc \
 api_unicode.cc \
 api_valuestats.cc \
 api_valuestream.cc \
 api_weight.cc \
 api_wrdb.cc

apitest_SOURCES = apitest.cc dbcheck.cc $(collated_apitest_sources) \
 api_all.h api_collated.h $(testharness_sources)

apitest_LDFLAGS = $(NO_INSTALL) $(ldflags)
apitest_LDADD = ../libgetopt.la ../$(libxapian_la)

stemtest_SOURCES = stemtest.cc $(testharness_sources)
stemtest_LDFLAGS = $(NO_INSTALL) $(ldflags)
stemtest_LDADD = ../libgetopt.la ../$(libxapian_la)

internaltest_SOURCES = internaltest.cc $(testharness_sources)
internaltest_LDFLAGS = $(NO_INSTALL) $(ldflags)
internaltest_LDADD = ../libgetopt.la ../$(libxapian_la)

unittest_SOURCES = unittest.cc $(utestharness_sources)
unittest_LDFLAGS = $(NO_INSTALL) $(ldflags)
unittest_LDADD = ../libgetopt.la

BUILT_SOURCES =

if MAINTAINER_MODE
BUILT_SOURCES += api_all.h api_collated.h $(collated_apitest_sources:.cc=.h) \
 api_generated.cc

api_all.h api_collated.h $(collated_apitest_sources:.cc=.h): api_collated.stamp
## Recover from the removal of $@.  A full explanation of these rules is in the
## automake manual under the heading "Multiple Outputs".
	@if test -f $@; then :; else \
	  trap 'rm -rf api_collated.lock api_collated.stamp' 1 2 13 15; \
	  if mkdir api_collated.lock 2>/dev/null; then \
	    rm -f api_collated.stamp; \
	    $(MAKE) $(AM_MAKEFLAGS) api_collated.stamp; \
	    rmdir api_collated.lock; \
	  else \
	    while test -d api_collated.lock; do sleep 1; done; \
	    test -f api_collated.stamp; exit $$?; \
	  fi; \
	fi
api_collated.stamp: $(collated_apitest_sources) collate-test Makefile.am
	$(PERL) "$(srcdir)/collate-test" "$(srcdir)" api_collated.h api_all.h $(collated_apitest_sources)
	touch $@

api_generated.cc: generate-api_generated
	$(PERL) "$(srcdir)/generate-api_generated" > api_generated.ccT
	mv api_generated.ccT api_generated.cc
endif

EXTRA_DIST = collate-test generate-api_generated api_all.h api_collated.h \
	$(collated_apitest_sources:.cc=.h)

## Distribute test data:
EXTRA_DIST +=\
	runtest.in \
	valgrind.supp \
	testdata/apitest_onedoc.txt \
	testdata/apitest_simpledata.txt \
	testdata/apitest_simpledata2.txt \
	testdata/apitest_termorder.txt \
	testdata/apitest_rset.txt \
	testdata/apitest_phrase.txt \
	testdata/apitest_punc.txt \
	testdata/apitest_space.txt \
	testdata/apitest_allterms.txt \
	testdata/apitest_allterms2.txt \
	testdata/apitest_allterms4.txt \
	testdata/apitest_poslist.txt \
	testdata/apitest_manydocs.txt \
	testdata/apitest_sortconsist.txt \
	testdata/apitest_sortrel.txt \
	testdata/apitest_declen.txt \
	testdata/etext.txt \
	testdata/snippet.txt

remove-cached-databases:
	rm -rf .chert .glass .multichert .multiglass .replicatmp .singlefileglass .stub

clean-local: remove-cached-databases

# Remove the cached databases before "make check" to avoid issues with missing
# bugs in database creation when we reuse databases from a previous test run.
check: remove-cached-databases

include harness/Makefile.mk
include perftest/Makefile.mk
include soaktest/Makefile.mk

EXTRA_DIST += zlib-vg.c
if USE_ZLIB_VG
check_SCRIPTS += zlib-vg.so
CLEANFILES += zlib-vg.so

zlib-vg.so: zlib-vg.c
	$(CC_FOR_BUILD) -fPIC -shared -o zlib-vg.so $(srcdir)/zlib-vg.c -ldl
endif


.PHONY: check-syntax

check-syntax:
	$(CXXCOMPILE) -fsyntax-only -gstabs+ $(CHK_SOURCES)