From: Richard W.M. Jones <"Richard W.M. Jones "> Date: Mon, 17 Nov 2008 17:59:06 +0000 (+0000) Subject: Added README.Fedora. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=23cd7c653b22b237775cc3f92f9ee3f1b8cd8927;p=fedora-mingw.git Added README.Fedora. --- diff --git a/ocaml/README.Fedora b/ocaml/README.Fedora new file mode 100644 index 0000000..f15ced5 --- /dev/null +++ b/ocaml/README.Fedora @@ -0,0 +1,51 @@ +This is the Fedora MinGW project's OCaml cross-compiler. + +For more about the Fedora MinGW project see: + https://fedoraproject.org/wiki/MinGW + +For more about OCaml see: + http://caml.inria.fr/ + +This is a native Fedora compiler which generates Windows executables. +Along with the other mingw32-ocaml-* packages (libraries) you can +cross-compile complicated OCaml software, including GUI apps, to +Windows. + +Integration with autotools, autoconf +---------------------------------------------------------------------- + +The compiler is called 'i686-pc-mingw32-ocamlopt' (along with a few +other tools prefixed with i686-pc-mingw32-*). Because the compiler is +a native Fedora binary, it is installed in /usr/bin. + +The name was deliberately chosen to fit with the convention used by +autoconf so that you can write: + + AC_CHECK_TOOL( ...[ocamlopt]... ) + +Autoconf knows when cross-compiling to search for $target-tool, so the +above will look for i686-pc-mingw32-ocamlopt when cross-compiling. + +Integration with ocamlfind, findlib +---------------------------------------------------------------------- + +To support parallel installations of the OCaml compiler and library, +we switch based on the ocamlfind configuration file. + +Thus, to choose the cross-compiler, simply set this environment +variable (and export it): + + export OCAMLFIND_CONF=/etc/i686-pc-mingw32-ocamlfind.conf + +After doing this, commands such as: + + ocamlfind ocamlc + ocamlfind ocamlopt + [etc.] + +will automatically choose the cross-compiler and the correct cross- +compiled libraries. For example: + + ocamlfind ocamlopt -package extlib -linkpkg test.ml -o test.exe + +will produce a cross-compiled Windows binary using the extlib library. diff --git a/ocaml/mingw32-ocaml.spec b/ocaml/mingw32-ocaml.spec index 2d789df..1cf7874 100644 --- a/ocaml/mingw32-ocaml.spec +++ b/ocaml/mingw32-ocaml.spec @@ -8,7 +8,7 @@ Name: mingw32-ocaml Version: 3.11.0+beta1 -Release: 13%{?dist} +Release: 14%{?dist} Summary: Objective Caml MinGW cross-compiler and programming environment License: QPL and (LGPLv2+ with exceptions) @@ -19,6 +19,7 @@ Source0: http://caml.inria.fr/pub/distrib/ocaml-3.11/ocaml-%{version}.tar # This is installed as config/Makefile when we cross-compile. Source1000: Makefile-fedora-mingw.in +Source1001: README.Fedora # XXX We should apply any Fedora native patches here. @@ -158,6 +159,8 @@ make -C tools ocamlmklib # Build ocamlopt make opt +cp %{SOURCE1001} . + %install rm -rf $RPM_BUILD_ROOT @@ -211,6 +214,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) +%doc README.Fedora %{_bindir}/%{_mingw32_target}-ocamlc %{_bindir}/%{_mingw32_target}-ocamlcp %{_bindir}/%{_mingw32_target}-ocamldep @@ -223,6 +227,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Nov 17 2008 Richard W.M. Jones - 3.11.0+beta1-14 +- Added README.Fedora. + * Sun Nov 16 2008 Richard W.M. Jones - 3.11.0+beta1-13 - Build the native compiler as 32 bits even on a 64 bit build architecture (because the target, Windows, is 32 bit). The