From 82b2f0cab999c58df686f351e416311b6af298ae Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 1 Jan 1970 00:00:00 +0000 Subject: [PATCH] Adding some OCaml test programs. --- .hgignore | 6 ++++++ ocaml/Makefile | 10 ++++++++++ ocaml/test1.ml | 6 ++++++ 3 files changed, 22 insertions(+) create mode 100644 ocaml/Makefile create mode 100644 ocaml/test1.ml diff --git a/.hgignore b/.hgignore index 9eeb858..eb851d3 100644 --- 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 index 0000000..5f3da01 --- /dev/null +++ b/ocaml/Makefile @@ -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 index 0000000..1771d02 --- /dev/null +++ b/ocaml/test1.ml @@ -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) -- 1.8.3.1