Adding some OCaml test programs.
authorRichard W.M. Jones <rjones@redhat.com>
Sat, 15 Nov 2008 20:22:32 +0000 (20:22 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Sat, 15 Nov 2008 20:22:32 +0000 (20:22 +0000)
.hgignore
ocaml/Makefile [new file with mode: 0644]
ocaml/test1.ml [new file with mode: 0644]

index 9eeb858..eb851d3 100644 (file)
--- a/.hgignore
+++ b/.hgignore
@@ -71,6 +71,12 @@ nspr/nspr-4.7.2.tar.gz
 nss/nss-3.12.2.0-stripped.tar.bz2
 nss/nss-pem-20080124.tar.bz2
 ocaml/ocaml-3.11.0+beta1.tar.bz2
+ocaml/NUL
+ocaml/test1
+ocaml/*.exe
+ocaml/*.cmi
+ocaml/*.cmx
+ocaml/*.o
 openssl/openssl-0.9.8g-usa.tar.bz2
 pango/pango-1.21.6.tar.bz2
 pango/pango-1.22.1.tar.bz2
diff --git a/ocaml/Makefile b/ocaml/Makefile
new file mode 100644 (file)
index 0000000..5f3da01
--- /dev/null
@@ -0,0 +1,10 @@
+# -*- Makefile -*-
+# Test programs for testing out the cross-compiler.
+
+all: test1 test1.exe
+
+test1: test1.ml
+       ocamlopt $< -o $@
+
+test1.exe: test1.ml
+       i686-pc-mingw32-ocamlopt $< -o $@
diff --git a/ocaml/test1.ml b/ocaml/test1.ml
new file mode 100644 (file)
index 0000000..1771d02
--- /dev/null
@@ -0,0 +1,6 @@
+open Printf
+
+let () =
+  printf "reported os_type = %S\n" Sys.os_type;
+  printf "filename concat a b = %S\n" (Filename.concat "a" "b");
+  printf "-1 = %d\n" (-1)