summaryrefslogtreecommitdiff
path: root/ocaml-binary-annot/testsuite/tests/lib-scanf-2/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'ocaml-binary-annot/testsuite/tests/lib-scanf-2/Makefile')
-rw-r--r--ocaml-binary-annot/testsuite/tests/lib-scanf-2/Makefile21
1 files changed, 21 insertions, 0 deletions
diff --git a/ocaml-binary-annot/testsuite/tests/lib-scanf-2/Makefile b/ocaml-binary-annot/testsuite/tests/lib-scanf-2/Makefile
new file mode 100644
index 0000000000..90a0ea6d1e
--- /dev/null
+++ b/ocaml-binary-annot/testsuite/tests/lib-scanf-2/Makefile
@@ -0,0 +1,21 @@
+default: compile run
+
+compile: tscanf2_io.cmo tscanf2_io.cmx
+ @$(OCAMLC) unix.cma tscanf2_io.cmo -o master.byte tscanf2_master.ml
+ @$(OCAMLC) tscanf2_io.cmo -o slave.byte tscanf2_slave.ml
+ @$(OCAMLOPT) unix.cmxa tscanf2_io.cmx -o master.native tscanf2_master.ml
+ @$(OCAMLOPT) tscanf2_io.cmx -o slave.native tscanf2_slave.ml
+
+run:
+ @printf " ... testing with ocamlc"
+ @./master.byte ./slave.byte > result.byte 2>&1
+ @diff -q reference result.byte > /dev/null || (echo " => failed" && exit 1)
+ @printf " ocamlopt"
+ @./master.native ./slave.native > result.native 2>&1
+ @diff -q reference result.native > /dev/null || (echo " => failed" && exit 1)
+ @echo " => passed"
+
+clean: defaultclean
+ @rm -f master.* slave.* result.*
+
+include ../../makefiles/Makefile.common