Lloyd Zusman <ljz <at> asfast.com> writes:
> I'm fairly new to ocaml and even newer to ocamlbuild, and I'm trying
> to do something for which I haven't been able to find instructions. In
> advance, I ask that you please forgive me if there are pertinent docs
> somewhere that I might have overlooked.
>
> [ ... ]
By the way, I should add that this being done under Linux, using godi.
Also, I neglected to enclose a listing of the myocamlbuild.ml file
that I'm using. Here it is:
(* build the "l" program from "l.ml" *)
(* to run: ocamlbuild l.native *)
open Ocamlbuild_plugin;;
open Command;;
let packages = "ljz,str,unix,extlib,pcre";;
let ocamlfind x = S[A"ocamlfind"; x; A"-package"; A packages];;
dispatch begin function
| Before_options ->
Options.ocamlc := ocamlfind & A"ocamlc";
Options.ocamlopt := ocamlfind & A"ocamlopt";
| After_rules ->
(* force static linking [is there a cleaner way to *)
(* specify a static link?] *)
flag ["ocaml"; "link"] (S[A"-warn-error"; A"A";
A"-ccopt"; A"-static";
A"-ccopt"; A"-static-libgcc";
A"-linkpkg"])
| _ -> ()
end;;
--
Lloyd Zusman
ljz%40asfast.com">ljz
asfast.com
God bless you.
.