43
88
CONFIG_HEADER = $(top_builddir)/config.h
44
89
CONFIG_CLEAN_FILES =
45
90
CONFIG_CLEAN_VPATH_FILES =
91
AM_V_P = $(am__v_P_@AM_V@)
92
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
46
95
AM_V_GEN = $(am__v_GEN_@AM_V@)
47
96
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
48
am__v_GEN_0 = @echo " GEN " $@;
97
am__v_GEN_0 = @echo " GEN " $@;
49
99
AM_V_at = $(am__v_at_@AM_V@)
50
100
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
55
red=; grn=; lgn=; blu=; std=
105
am__can_run_installinfo = \
106
case $$AM_UPDATE_INFO_DIR in \
108
*) (install-info --version) >/dev/null 2>&1;; \
110
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
111
am__tty_colors_dummy = \
112
mgn= red= grn= lgn= blu= brg= std=; \
115
$(am__tty_colors_dummy); \
116
if test "X$(AM_COLOR_TESTS)" = Xno; then \
117
am__color_tests=no; \
118
elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
119
am__color_tests=yes; \
120
elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
121
am__color_tests=yes; \
123
if test $$am__color_tests = yes; then \
133
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
134
am__vpath_adj = case $$p in \
135
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
138
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
140
am__nobase_strip_setup = \
141
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
143
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
144
am__nobase_list = $(am__nobase_strip_setup); \
145
for p in $$list; do echo "$$p $$p"; done | \
146
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
147
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
148
if (++n[$$2] == $(am__install_max)) \
149
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
150
END { for (dir in files) print dir, files[dir] }'
152
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
153
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
154
am__uninstall_files_from_dir = { \
156
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
157
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
158
$(am__cd) "$$dir" && rm -f $$files; }; \
160
am__recheck_rx = ^[ ]*:recheck:[ ]*
161
am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
162
am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
163
# A command that, given a newline-separated list of test names on the
164
# standard input, print the name of the tests that are to be re-run
165
# upon "make recheck".
166
am__list_recheck_tests = $(AWK) '{ \
168
while ((rc = (getline line < ($$0 ".trs"))) != 0) \
172
if ((getline line2 < ($$0 ".log")) < 0) \
176
else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
181
else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
188
close ($$0 ".trs"); \
189
close ($$0 ".log"); \
191
# A command that, given a newline-separated list of test names on the
192
# standard input, create the global log from their .trs and .log files.
193
am__create_global_log = $(AWK) ' \
194
function fatal(msg) \
196
print "fatal: making $@: " msg | "cat >&2"; \
199
function rst_section(header) \
202
len = length(header); \
203
for (i = 1; i <= len; i = i + 1) \
208
copy_in_global_log = 1; \
209
global_test_result = "RUN"; \
210
while ((rc = (getline line < ($$0 ".trs"))) != 0) \
213
fatal("failed to read from " $$0 ".trs"); \
214
if (line ~ /$(am__global_test_result_rx)/) \
216
sub("$(am__global_test_result_rx)", "", line); \
217
sub("[ ]*$$", "", line); \
218
global_test_result = line; \
220
else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
221
copy_in_global_log = 0; \
223
if (copy_in_global_log) \
225
rst_section(global_test_result ": " $$0); \
226
while ((rc = (getline line < ($$0 ".log"))) != 0) \
229
fatal("failed to read from " $$0 ".log"); \
234
close ($$0 ".trs"); \
235
close ($$0 ".log"); \
237
# Restructured Text title.
238
am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
239
# Solaris 10 'make', and several other traditional 'make' implementations,
240
# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
241
# by disabling -e (using the XSI extension "set +e") if it's set.
242
am__sh_e_setup = case $$- in *e*) set +e;; esac
243
# Default flags passed to test drivers.
244
am__common_driver_flags = \
245
--color-tests "$$am__color_tests" \
246
--enable-hard-errors "$$am__enable_hard_errors" \
247
--expect-failure "$$am__expect_failure"
248
# To be inserted before the command running the test. Creates the
249
# directory for the log if needed. Stores in $dir the directory
250
# containing $f, in $tst the test, in $log the log. Executes the
251
# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
252
# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
253
# will run the test scripts (or their associated LOG_COMPILER, if
257
$(am__vpath_adj_setup) $(am__vpath_adj) \
259
srcdir=$(srcdir); export srcdir; \
261
*/*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
264
test "x$$am__odir" = x"." || test -d "$$am__odir" \
265
|| $(MKDIR_P) "$$am__odir" || exit $$?; \
266
if test -f "./$$f"; then dir=./; \
267
elif test -f "$$f"; then dir=; \
268
else dir="$(srcdir)/"; fi; \
269
tst=$$dir$$f; log='$@'; \
270
if test -n '$(DISABLE_HARD_ERRORS)'; then \
271
am__enable_hard_errors=no; \
273
am__enable_hard_errors=yes; \
275
case " $(XFAIL_TESTS) " in \
276
*[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
277
am__expect_failure=yes;; \
279
am__expect_failure=no;; \
281
$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
282
# A shell command to get the names of the tests scripts with any registered
283
# extension removed (i.e., equivalently, the names of the test logs, with
284
# the '.log' extension removed). The result is saved in the shell variable
285
# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
286
# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
287
# since that might cause problem with VPATH rewrites for suffix-less tests.
288
# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
289
am__set_TESTS_bases = \
290
bases='$(TEST_LOGS)'; \
291
bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
293
RECHECK_LOGS = $(TEST_LOGS)
294
AM_RECURSIVE_TARGETS = check recheck
295
TEST_SUITE_LOG = test-suite.log
296
TEST_EXTENSIONS = @EXEEXT@ .test
297
LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
298
LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
304
*) b=`echo '$@' | sed 's/\.log$$//'`; \
309
am__test_logs1 = $(TESTS:=.log)
310
am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
311
TEST_LOGS = $(am__test_logs2:.test.log=.log)
312
TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
313
TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
56
315
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
57
316
ACLOCAL = @ACLOCAL@
249
514
-rm -rf .libs _libs
257
check-TESTS: $(TESTS)
258
@failed=0; all=0; xfail=0; xpass=0; skip=0; \
259
srcdir=$(srcdir); export srcdir; \
262
if test -n "$$list"; then \
263
for tst in $$list; do \
264
if test -f ./$$tst; then dir=./; \
265
elif test -f $$tst; then dir=; \
266
else dir="$(srcdir)/"; fi; \
267
if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
268
all=`expr $$all + 1`; \
269
case " $(XFAIL_TESTS) " in \
270
*[\ \ ]$$tst[\ \ ]*) \
271
xpass=`expr $$xpass + 1`; \
272
failed=`expr $$failed + 1`; \
273
col=$$red; res=XPASS; \
276
col=$$grn; res=PASS; \
279
elif test $$? -ne 77; then \
280
all=`expr $$all + 1`; \
281
case " $(XFAIL_TESTS) " in \
282
*[\ \ ]$$tst[\ \ ]*) \
283
xfail=`expr $$xfail + 1`; \
284
col=$$lgn; res=XFAIL; \
287
failed=`expr $$failed + 1`; \
288
col=$$red; res=FAIL; \
292
skip=`expr $$skip + 1`; \
293
col=$$blu; res=SKIP; \
295
echo "$${col}$$res$${std}: $$tst"; \
522
# Recover from deleted '.trs' file; this should ensure that
523
# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
524
# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
525
# to avoid problems with "make -n".
528
$(MAKE) $(AM_MAKEFLAGS) $<
530
# Leading 'am--fnord' is there to ensure the list of targets does not
531
# expand to empty, as could happen e.g. with make check TESTS=''.
532
am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
536
$(TEST_SUITE_LOG): $(TEST_LOGS)
537
@$(am__set_TESTS_bases); \
538
am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
539
redo_bases=`for i in $$bases; do \
540
am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
542
if test -n "$$redo_bases"; then \
543
redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
544
redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
545
if $(am__make_dryrun); then :; else \
546
rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
549
if test -n "$$am__remaking_logs"; then \
550
echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
551
"recursion detected" >&2; \
553
am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
555
if $(am__make_dryrun); then :; else \
557
errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
558
for i in $$redo_bases; do \
559
test -f $$i.trs && test -r $$i.trs \
560
|| { echo "$$errmsg $$i.trs" >&2; st=1; }; \
561
test -f $$i.log && test -r $$i.log \
562
|| { echo "$$errmsg $$i.log" >&2; st=1; }; \
297
if test "$$all" -eq 1; then \
304
if test "$$failed" -eq 0; then \
305
if test "$$xfail" -eq 0; then \
306
banner="$$All$$all $$tests passed"; \
308
if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
309
banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
312
if test "$$xpass" -eq 0; then \
313
banner="$$failed of $$all $$tests failed"; \
315
if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
316
banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
321
if test "$$skip" -ne 0; then \
322
if test "$$skip" -eq 1; then \
323
skipped="($$skip test was not run)"; \
325
skipped="($$skip tests were not run)"; \
327
test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
328
dashes="$$skipped"; \
331
if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
332
report="Please report to $(PACKAGE_BUGREPORT)"; \
333
test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
336
dashes=`echo "$$dashes" | sed s/./=/g`; \
337
if test "$$failed" -eq 0; then \
342
echo "$${col}$$dashes$${std}"; \
343
echo "$${col}$$banner$${std}"; \
344
test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
345
test -z "$$report" || echo "$${col}$$report$${std}"; \
346
echo "$${col}$$dashes$${std}"; \
347
test "$$failed" -eq 0; \
564
test $$st -eq 0 || exit 1; \
566
@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
568
results=`for b in $$bases; do echo $$b.trs; done`; \
569
test -n "$$results" || results=/dev/null; \
570
all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
571
pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
572
fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
573
skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
574
xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
575
xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
576
error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
577
if test `expr $$fail + $$xpass + $$error` -eq 0; then \
582
br='==================='; br=$$br$$br$$br$$br; \
585
if test x"$$1" = x"--maybe-color"; then \
586
maybe_colorize=yes; \
587
elif test x"$$1" = x"--no-color"; then \
590
echo "$@: invalid 'result_count' usage" >&2; exit 4; \
593
desc=$$1 count=$$2; \
594
if test $$maybe_colorize = yes && test $$count -gt 0; then \
595
color_start=$$3 color_end=$$std; \
597
color_start= color_end=; \
599
echo "$${color_start}# $$desc $$count$${color_end}"; \
601
create_testsuite_report () \
603
result_count $$1 "TOTAL:" $$all "$$brg"; \
604
result_count $$1 "PASS: " $$pass "$$grn"; \
605
result_count $$1 "SKIP: " $$skip "$$blu"; \
606
result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
607
result_count $$1 "FAIL: " $$fail "$$red"; \
608
result_count $$1 "XPASS:" $$xpass "$$red"; \
609
result_count $$1 "ERROR:" $$error "$$mgn"; \
612
echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
614
create_testsuite_report --no-color; \
616
echo ".. contents:: :depth: 2"; \
618
for b in $$bases; do echo $$b; done \
619
| $(am__create_global_log); \
620
} >$(TEST_SUITE_LOG).tmp || exit 1; \
621
mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
626
test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
628
echo "$${col}$$br$${std}"; \
629
echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
630
echo "$${col}$$br$${std}"; \
631
create_testsuite_report --maybe-color; \
632
echo "$$col$$br$$std"; \
633
if $$success; then :; else \
634
echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
635
if test -n "$(PACKAGE_BUGREPORT)"; then \
636
echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
638
echo "$$col$$br$$std"; \
643
@list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
644
@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
645
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
646
@set +e; $(am__set_TESTS_bases); \
647
log_list=`for i in $$bases; do echo $$i.log; done`; \
648
trs_list=`for i in $$bases; do echo $$i.trs; done`; \
649
log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
650
$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
652
recheck: all $(check_SCRIPTS)
653
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
654
@set +e; $(am__set_TESTS_bases); \
655
bases=`for i in $$bases; do echo $$i; done \
656
| $(am__list_recheck_tests)` || exit 1; \
657
log_list=`for i in $$bases; do echo $$i.log; done`; \
658
log_list=`echo $$log_list`; \
659
$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
660
am__force_recheck=am--force-recheck \
661
TEST_LOGS="$$log_list"; \
663
run.tests.log: run.tests
666
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
667
--log-file $$b.log --trs-file $$b.trs \
668
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
669
"$$tst" $(AM_TESTS_FD_REDIRECT)
673
$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
674
--log-file $$b.log --trs-file $$b.trs \
675
$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
676
"$$tst" $(AM_TESTS_FD_REDIRECT)
677
@am__EXEEXT_TRUE@.test$(EXEEXT).log:
678
@am__EXEEXT_TRUE@ @p='$<'; \
679
@am__EXEEXT_TRUE@ $(am__set_b); \
680
@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
681
@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
682
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
683
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
350
685
distdir: $(DISTFILES)
351
686
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \