summaryrefslogtreecommitdiff
path: root/ocaml-binary-annot/testsuite/makefiles/Makefile.okbad
diff options
context:
space:
mode:
Diffstat (limited to 'ocaml-binary-annot/testsuite/makefiles/Makefile.okbad')
-rw-r--r--ocaml-binary-annot/testsuite/makefiles/Makefile.okbad19
1 files changed, 19 insertions, 0 deletions
diff --git a/ocaml-binary-annot/testsuite/makefiles/Makefile.okbad b/ocaml-binary-annot/testsuite/makefiles/Makefile.okbad
new file mode 100644
index 0000000000..833cfab374
--- /dev/null
+++ b/ocaml-binary-annot/testsuite/makefiles/Makefile.okbad
@@ -0,0 +1,19 @@
+# $Id$
+
+default: compile
+
+compile:
+ @for file in *.ml; do \
+ printf " ... testing '$$file'"; \
+ if [ `echo $$file | grep bad` ]; then \
+ $(OCAMLC) -c -w a $$file 2> /dev/null && (echo " => failed" && exit 1) || echo " => passed"; \
+ else \
+ test -f `basename $$file ml`mli && $(OCAMLC) -c -w a `basename $$file ml`mli; \
+ $(OCAMLC) -c -w a $$file 2> /dev/null || (echo " => failed" && exit 1); \
+ test -f `basename $$file ml`reference && $(OCAMLC) `basename $$file ml`cmo && ./a.out > `basename $$file ml`result && (diff -q `basename $$file ml`reference `basename $$file ml`result || (echo " => failed" && exit 1)); \
+ echo " => passed"; \
+ fi; \
+ done
+
+clean: defaultclean
+ @rm -f ./a.out *.cm* *.result