smock: add --overwrite option
[fedora-mingw.git] / ocaml / README.Fedora
1 This is the Fedora MinGW project's OCaml cross-compiler.
2
3 For more about the Fedora MinGW project see:
4   https://fedoraproject.org/wiki/MinGW
5
6 For more about OCaml see:
7   http://caml.inria.fr/
8
9 This is a native Fedora compiler which generates Windows executables.
10 Along with the other mingw32-ocaml-* packages (libraries) you can
11 cross-compile complicated OCaml software, including GUI apps, to
12 Windows.
13
14 Integration with autotools, autoconf
15 ----------------------------------------------------------------------
16
17 The compiler is called 'i686-pc-mingw32-ocamlopt' (along with a few
18 other tools prefixed with i686-pc-mingw32-*).  Because the compiler is
19 a native Fedora binary, it is installed in /usr/bin.
20
21 The name was deliberately chosen to fit with the convention used by
22 autoconf so that you can write:
23
24   AC_CHECK_TOOL( ...[ocamlopt]... )
25
26 Autoconf knows when cross-compiling to search for $target-tool, so the
27 above will look for i686-pc-mingw32-ocamlopt when cross-compiling.
28
29 Integration with ocamlfind, findlib
30 ----------------------------------------------------------------------
31
32 To support parallel installations of the OCaml compiler and library,
33 we switch based on the ocamlfind configuration file.
34
35 Thus, to choose the cross-compiler, simply set this environment
36 variable (and export it):
37
38   export OCAMLFIND_CONF=/etc/i686-pc-mingw32-ocamlfind.conf
39
40 After doing this, commands such as:
41
42   ocamlfind ocamlc
43   ocamlfind ocamlopt
44   [etc.]
45
46 will automatically choose the cross-compiler and the correct cross-
47 compiled libraries.  For example:
48
49   ocamlfind ocamlopt -package extlib -linkpkg test.ml -o test.exe
50
51 will produce a cross-compiled Windows binary using the extlib library.