test/Makefile.am: Distribute `bad.sod' and `bad.ref'.
[sod] / test / Makefile.am
index 3ffec2b..62f7364 100644 (file)
@@ -48,6 +48,17 @@ TESTS                        += test
 check_PROGRAMS         += test
 -include test.c-dep test.h-dep
 
+EXTRA_DIST             += bad.sod bad.ref
+bad.out: bad.sod $(SOD)
+       $(SOD) -tc $(srcdir)/bad.sod >bad.raw-out 2>bad.raw-err; rc=$$?; \
+       { sed 's/^/| /' bad.raw-out; \
+         sed 's/^/* /; s,$(srcdir)/,test/,' bad.raw-err; \
+         echo "; rc = $$rc"; } >$@.new && \
+               mv $@.new $@
+check-local:: bad.out
+       diff -u $(srcdir)/bad.ref bad.out
+CLEANFILES             += bad.raw-out bad.raw-err bad.out
+
 EXTRA_DIST             += test.sod
 nodist_test_SOURCES     = test.c test.h
 BUILT_SOURCES          += $(nodist_test_SOURCES)
@@ -63,6 +74,9 @@ check-local:: kwtest kwtest.ref
 check_PROGRAMS         += rat
 -include rat.c-dep rat.h-dep
 
+check_PROGRAMS         += kwbench
+kwbench_SOURCES                 = kwbench.c kwbench-back.c kwbench.h
+
 EXTRA_DIST             += rat.sod rat.ref
 nodist_rat_SOURCES      = rat.c rat.h
 BUILT_SOURCES          += $(nodist_rat_SOURCES)