segment: New library for low-level phase of lexical syntax analysis.
[pspp-builds.git] / tests / automake.mk
1 ## Process this file with automake to produce Makefile.in  -*- makefile -*-
2
3 check_PROGRAMS += \
4         tests/data/datasheet-test \
5         tests/data/sack \
6         tests/data/inexactify \
7         tests/language/lexer/command-name-test \
8         tests/language/lexer/segment-test \
9         tests/libpspp/abt-test \
10         tests/libpspp/bt-test \
11         tests/libpspp/encoding-guesser-test \
12         tests/libpspp/heap-test \
13         tests/libpspp/hmap-test \
14         tests/libpspp/hmapx-test \
15         tests/libpspp/i18n-test \
16         tests/libpspp/ll-test \
17         tests/libpspp/llx-test \
18         tests/libpspp/range-map-test \
19         tests/libpspp/range-set-test \
20         tests/libpspp/sparse-array-test \
21         tests/libpspp/sparse-xarray-test \
22         tests/libpspp/str-test \
23         tests/libpspp/string-map-test \
24         tests/libpspp/stringi-map-test \
25         tests/libpspp/string-set-test \
26         tests/libpspp/stringi-set-test \
27         tests/libpspp/tower-test \
28         tests/libpspp/u8-istream-test \
29         tests/output/render-test
30
31 check-programs: $(check_PROGRAMS)
32
33 tests_data_datasheet_test_SOURCES = \
34         tests/data/datasheet-test.c
35 tests_data_datasheet_test_LDADD = src/libpspp-core.la $(LIBINTL) 
36 tests_data_datasheet_test_CFLAGS = $(AM_CFLAGS)
37
38 tests_data_sack_SOURCES = \
39         tests/data/sack.c
40 tests_data_sack_LDADD = src/libpspp-core.la $(LIBINTL) 
41 tests_data_sack_CFLAGS = $(AM_CFLAGS)
42
43 tests_libpspp_ll_test_SOURCES = \
44         src/libpspp/ll.c \
45         tests/libpspp/ll-test.c
46 tests_libpspp_ll_test_LDADD = gl/libgl.la $(LIBINTL)
47 tests_libpspp_ll_test_CFLAGS = $(AM_CFLAGS)
48
49 tests_libpspp_llx_test_SOURCES = \
50         src/libpspp/ll.c \
51         src/libpspp/llx.c \
52         tests/libpspp/llx-test.c
53 tests_libpspp_llx_test_LDADD = gl/libgl.la $(LIBINTL)
54 tests_libpspp_llx_test_CFLAGS = $(AM_CFLAGS)
55
56 tests_libpspp_encoding_guesser_test_SOURCES = \
57         tests/libpspp/encoding-guesser-test.c
58 tests_libpspp_encoding_guesser_test_LDADD = src/libpspp/libpspp.la gl/libgl.la
59
60 tests_libpspp_heap_test_SOURCES = \
61         src/libpspp/heap.c \
62         src/libpspp/pool.c \
63         src/libpspp/temp-file.c \
64         tests/libpspp/heap-test.c
65 tests_libpspp_heap_test_LDADD = gl/libgl.la $(LIBINTL) 
66 tests_libpspp_heap_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
67
68 tests_libpspp_hmap_test_SOURCES = \
69         src/libpspp/hmap.c \
70         tests/libpspp/hmap-test.c
71 tests_libpspp_hmap_test_LDADD = gl/libgl.la $(LIBINTL)
72 tests_libpspp_hmap_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
73
74 tests_libpspp_hmapx_test_SOURCES = \
75         src/libpspp/hmap.c \
76         src/libpspp/hmapx.c \
77         tests/libpspp/hmapx-test.c
78 tests_libpspp_hmapx_test_LDADD = gl/libgl.la $(LIBINTL)
79 tests_libpspp_hmapx_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
80
81 tests_libpspp_i18n_test_SOURCES = tests/libpspp/i18n-test.c
82 tests_libpspp_i18n_test_LDADD = src/libpspp/libpspp.la gl/libgl.la $(LIBINTL) 
83
84 tests_libpspp_abt_test_SOURCES = \
85         src/libpspp/abt.c \
86         tests/libpspp/abt-test.c
87 tests_libpspp_abt_test_LDADD = gl/libgl.la $(LIBINTL)
88 tests_libpspp_abt_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
89
90 tests_libpspp_bt_test_SOURCES = \
91         src/libpspp/bt.c \
92         tests/libpspp/bt-test.c
93 tests_libpspp_bt_test_LDADD = gl/libgl.la
94 tests_libpspp_bt_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
95
96 tests_libpspp_range_map_test_SOURCES = \
97         src/libpspp/bt.c \
98         src/libpspp/range-map.c \
99         tests/libpspp/range-map-test.c
100 tests_libpspp_range_map_test_LDADD = gl/libgl.la $(LIBINTL)
101 tests_libpspp_range_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
102
103 tests_libpspp_range_set_test_SOURCES = \
104         src/libpspp/bt.c \
105         src/libpspp/pool.c \
106         src/libpspp/range-set.c \
107         src/libpspp/temp-file.c \
108         tests/libpspp/range-set-test.c
109 tests_libpspp_range_set_test_LDADD = gl/libgl.la $(LIBINTL) 
110 tests_libpspp_range_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
111
112 tests_libpspp_str_test_SOURCES = \
113         tests/libpspp/str-test.c
114 tests_libpspp_str_test_LDADD = src/libpspp/libpspp.la gl/libgl.la $(LIBINTL) 
115
116 tests_libpspp_string_map_test_SOURCES = \
117         src/libpspp/hash-functions.c \
118         src/libpspp/hmap.c \
119         src/libpspp/string-map.c \
120         src/libpspp/string-set.c \
121         tests/libpspp/string-map-test.c
122 tests_libpspp_string_map_test_LDADD = gl/libgl.la $(LIBINTL)
123 tests_libpspp_string_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
124
125 tests_libpspp_stringi_map_test_SOURCES = \
126         src/libpspp/hash-functions.c \
127         src/libpspp/hmap.c \
128         src/libpspp/pool.c \
129         src/libpspp/str.c \
130         src/libpspp/stringi-map.c \
131         src/libpspp/string-set.c \
132         src/libpspp/stringi-set.c \
133         src/libpspp/temp-file.c \
134         tests/libpspp/stringi-map-test.c
135 tests_libpspp_stringi_map_test_LDADD = gl/libgl.la $(LIBINTL)
136 tests_libpspp_stringi_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
137
138 tests_libpspp_string_set_test_SOURCES = \
139         src/libpspp/hash-functions.c \
140         src/libpspp/hmap.c \
141         src/libpspp/string-set.c \
142         tests/libpspp/string-set-test.c
143 tests_libpspp_string_set_test_LDADD = gl/libgl.la $(LIBINTL)
144 tests_libpspp_string_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
145
146 tests_libpspp_stringi_set_test_SOURCES = \
147         src/libpspp/hash-functions.c \
148         src/libpspp/hmap.c \
149         src/libpspp/pool.c \
150         src/libpspp/str.c \
151         src/libpspp/stringi-set.c \
152         src/libpspp/temp-file.c \
153         tests/libpspp/stringi-set-test.c
154 tests_libpspp_stringi_set_test_LDADD = gl/libgl.la $(LIBINTL)
155 tests_libpspp_stringi_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
156
157 tests_libpspp_tower_test_SOURCES = \
158         src/libpspp/abt.c \
159         src/libpspp/pool.c \
160         src/libpspp/temp-file.c \
161         src/libpspp/tower.c \
162         tests/libpspp/tower-test.c
163 tests_libpspp_tower_test_LDADD = gl/libgl.la $(LIBINTL) 
164 tests_libpspp_tower_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
165
166 tests_libpspp_u8_istream_test_SOURCES = tests/libpspp/u8-istream-test.c
167 tests_libpspp_u8_istream_test_LDADD = src/libpspp/libpspp.la gl/libgl.la
168
169 tests_libpspp_sparse_array_test_SOURCES = \
170         src/libpspp/sparse-array.c \
171         src/libpspp/pool.c \
172         tests/libpspp/sparse-array-test.c \
173         src/libpspp/temp-file.c
174 tests_libpspp_sparse_array_test_LDADD = gl/libgl.la $(LIBINTL) 
175 tests_libpspp_sparse_array_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
176
177 tests_libpspp_sparse_xarray_test_SOURCES = \
178         src/libpspp/argv-parser.c \
179         src/libpspp/bt.c \
180         src/libpspp/deque.c \
181         src/libpspp/ext-array.c \
182         src/libpspp/model-checker.c \
183         src/libpspp/range-set.c \
184         src/libpspp/sparse-array.c \
185         src/libpspp/sparse-xarray.c \
186         src/libpspp/str.c \
187         src/libpspp/pool.c \
188         src/libpspp/temp-file.c \
189         tests/libpspp/sparse-xarray-test.c
190 tests_libpspp_sparse_xarray_test_LDADD = gl/libgl.la $(LIBINTL) 
191 tests_libpspp_sparse_xarray_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
192
193 tests_data_inexactify_SOURCES = tests/data/inexactify.c
194
195 noinst_PROGRAMS += tests/dissect-sysfile
196 tests_dissect_sysfile_SOURCES = \
197         src/libpspp/integer-format.c \
198         src/libpspp/float-format.c \
199         tests/dissect-sysfile.c
200 tests_dissect_sysfile_LDADD = gl/libgl.la $(LIBINTL) 
201 tests_dissect_sysfile_CPPFLAGS = $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
202
203 check_PROGRAMS += tests/language/lexer/command-name-test
204 tests_language_lexer_command_name_test_SOURCES = \
205         src/data/identifier.c \
206         src/language/lexer/command-name.c \
207         tests/language/lexer/command-name-test.c
208 tests_language_lexer_command_name_test_LDADD = \
209         src/libpspp/libpspp.la \
210         gl/libgl.la \
211         $(LIBINTL) 
212 tests_language_lexer_command_name_test_CFLAGS = $(AM_CFLAGS)
213
214
215 check_PROGRAMS += tests/language/lexer/segment-test
216 tests_language_lexer_segment_test_SOURCES = \
217         src/data/identifier.c \
218         src/language/lexer/command-name.c \
219         src/language/lexer/segment.c \
220         src/libpspp/pool.c \
221         src/libpspp/prompt.c \
222         src/libpspp/str.c \
223         src/libpspp/temp-file.c \
224         tests/language/lexer/segment-test.c
225 tests_language_lexer_segment_test_LDADD = gl/libgl.la $(LIBINTL)
226 tests_language_lexer_segment_test_CFLAGS = $(AM_CFLAGS)
227
228 check_PROGRAMS += tests/output/render-test
229 tests_output_render_test_SOURCES = tests/output/render-test.c
230 tests_output_render_test_LDADD = \
231         src/libpspp.la \
232         src/libpspp-core.la \
233         $(CAIRO_LIBS) \
234         $(LIBICONV) \
235         $(LIBINTL)
236
237 EXTRA_DIST += \
238         tests/coverage.sh \
239         tests/data/bcd-in.expected.cmp.gz \
240         tests/data/binhex-in.expected.cmp.gz \
241         tests/data/binhex-out.expected.gz \
242         tests/data/legacy-in.expected.cmp.gz \
243         tests/data/num-in.expected.gz \
244         tests/data/num-out-cmp.pl \
245         tests/data/num-out.expected.cmp.gz \
246         tests/data/v13.sav \
247         tests/data/v14.sav \
248         tests/language/data-io/Book1.gnm.unzipped
249
250 CLEANFILES += *.save pspp.* foo*
251
252 EXTRA_DIST += tests/OChangeLog
253 \f
254 # Autotest testsuite
255
256 EXTRA_DIST += \
257         tests/testsuite.in \
258         $(TESTSUITE_AT) \
259         $(TESTSUITE) \
260         tests/atlocal.in \
261         $(srcdir)/package.m4 \
262         $(TESTSUITE)
263
264 TESTSUITE_AT = \
265         tests/data/calendar.at \
266         tests/data/data-in.at \
267         tests/data/data-out.at \
268         tests/data/datasheet-test.at \
269         tests/data/format-guesser.at \
270         tests/data/por-file.at \
271         tests/data/sys-file-reader.at \
272         tests/data/sys-file.at \
273         tests/language/command.at \
274         tests/language/control/do-if.at \
275         tests/language/control/do-repeat.at \
276         tests/language/control/loop.at \
277         tests/language/control/temporary.at \
278         tests/language/data-io/add-files.at \
279         tests/language/data-io/data-list.at \
280         tests/language/data-io/data-reader.at \
281         tests/language/data-io/file-handle.at \
282         tests/language/data-io/get-data-gnm.at \
283         tests/language/data-io/get-data-psql.at \
284         tests/language/data-io/get-data-txt.at \
285         tests/language/data-io/get.at \
286         tests/language/data-io/inpt-pgm.at \
287         tests/language/data-io/list.at \
288         tests/language/data-io/match-files.at \
289         tests/language/data-io/print-space.at \
290         tests/language/data-io/print.at \
291         tests/language/data-io/save.at \
292         tests/language/data-io/save-translate.at \
293         tests/language/data-io/update.at \
294         tests/language/dictionary/attributes.at \
295         tests/language/dictionary/missing-values.at \
296         tests/language/dictionary/mrsets.at \
297         tests/language/dictionary/rename-variables.at \
298         tests/language/dictionary/split-file.at \
299         tests/language/dictionary/sys-file-info.at \
300         tests/language/dictionary/value-labels.at \
301         tests/language/dictionary/variable-display.at \
302         tests/language/dictionary/vector.at \
303         tests/language/dictionary/weight.at \
304         tests/language/expressions/evaluate.at \
305         tests/language/expressions/parse.at \
306         tests/language/lexer/command-name.at \
307         tests/language/lexer/lexer.at \
308         tests/language/lexer/q2c.at \
309         tests/language/lexer/segment.at \
310         tests/language/lexer/variable-parser.at \
311         tests/language/stats/aggregate.at \
312         tests/language/stats/autorecode.at \
313         tests/language/stats/correlations.at \
314         tests/language/stats/crosstabs.at \
315         tests/language/stats/descriptives.at \
316         tests/language/stats/examine.at \
317         tests/language/stats/factor.at \
318         tests/language/stats/flip.at \
319         tests/language/stats/frequencies.at \
320         tests/language/stats/npar.at \
321         tests/language/stats/oneway.at \
322         tests/language/stats/rank.at \
323         tests/language/stats/regression.at \
324         tests/language/stats/reliability.at \
325         tests/language/stats/roc.at \
326         tests/language/stats/sort-cases.at \
327         tests/language/stats/t-test.at \
328         tests/language/utilities/cache.at \
329         tests/language/utilities/date.at \
330         tests/language/utilities/insert.at \
331         tests/language/utilities/permissions.at \
332         tests/language/utilities/set.at \
333         tests/language/utilities/title.at \
334         tests/language/xforms/compute.at \
335         tests/language/xforms/count.at \
336         tests/language/xforms/recode.at \
337         tests/language/xforms/sample.at \
338         tests/language/xforms/select-if.at \
339         tests/libpspp/abt.at \
340         tests/libpspp/bt.at \
341         tests/libpspp/encoding-guesser.at \
342         tests/libpspp/float-format.at \
343         tests/libpspp/heap.at \
344         tests/libpspp/hmap.at \
345         tests/libpspp/hmapx.at \
346         tests/libpspp/i18n.at \
347         tests/libpspp/ll.at \
348         tests/libpspp/llx.at \
349         tests/libpspp/range-map.at \
350         tests/libpspp/range-set.at \
351         tests/libpspp/sparse-array.at \
352         tests/libpspp/sparse-xarray-test.at \
353         tests/libpspp/str.at \
354         tests/libpspp/string-map.at \
355         tests/libpspp/stringi-map.at \
356         tests/libpspp/string-set.at \
357         tests/libpspp/stringi-set.at \
358         tests/libpspp/tower.at \
359         tests/libpspp/u8-istream.at \
360         tests/math/moments.at \
361         tests/math/randist.at \
362         tests/output/charts.at \
363         tests/output/output.at \
364         tests/output/paper-size.at \
365         tests/output/render.at \
366         tests/ui/terminal/main.at \
367         tests/perl-module.at
368
369 TESTSUITE = $(srcdir)/tests/testsuite
370 DISTCLEANFILES += tests/atconfig tests/atlocal $(TESTSUITE)
371
372 $(srcdir)/tests/testsuite.at: tests/testsuite.in tests/automake.mk
373         cp $< $@
374         for t in $(TESTSUITE_AT); do \
375           echo "m4_include([$$t])" >> $@ ;\
376         done
377 EXTRA_DIST += tests/testsuite.at
378
379 CHECK_LOCAL += tests_check
380 tests_check: tests/atconfig tests/atlocal $(TESTSUITE) $(check_PROGRAMS)
381         $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=tests/data:tests/language/lexer:tests/libpspp:tests/output:src/ui/terminal $(TESTSUITEFLAGS)
382
383 CLEAN_LOCAL += tests_clean
384 tests_clean:
385         test ! -f '$(TESTSUITE)' || $(SHELL) '$(TESTSUITE)' -C tests --clean
386
387 AUTOM4TE = $(SHELL) $(srcdir)/build-aux/missing --run autom4te
388 AUTOTEST = $(AUTOM4TE) --language=autotest
389 $(TESTSUITE): package.m4 $(srcdir)/tests/testsuite.at $(TESTSUITE_AT) 
390         $(AUTOTEST) -I '$(srcdir)' $@.at | sed 's/@<00A0>@/ /g' > $@.tmp
391         mv $@.tmp $@
392
393 # The `:;' works around a Bash 3.2 bug when the output is not writeable.
394 $(srcdir)/package.m4: $(top_srcdir)/configure.ac
395         :;{ \
396           echo '# Signature of the current package.' && \
397           echo 'm4_define([AT_PACKAGE_NAME],      [$(PACKAGE_NAME)])' && \
398           echo 'm4_define([AT_PACKAGE_TARNAME],   [$(PACKAGE_TARNAME)])' && \
399           echo 'm4_define([AT_PACKAGE_VERSION],   [$(PACKAGE_VERSION)])' && \
400           echo 'm4_define([AT_PACKAGE_STRING],    [$(PACKAGE_STRING)])' && \
401           echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])' && \
402           echo 'm4_define([AT_PACKAGE_URL],       [$(PACKAGE_URL)])'; \
403         } >'$(srcdir)/package.m4'