List Info

Thread: "ocaml_beginners"::[] Re: ocamlbuild: forcing a re-build if a dependent library changes




"ocaml_beginners"::[] Re: ocamlbuild: forcing a re-build if a dependent library changes
country flaguser name
Norway
2008-03-06 15:49:38

Lloyd Zusman <ljz <at> asfast.com> writes:

> I'm fairly new to ocaml and even newer to ocamlbuild, and I'm trying
&gt; 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&quot; program from "l.ml" *)
(* to run: ocamlbuild l.native *)
open Ocamlbuild_plugin;;
open Command;;

let packages = "ljz,str,unix,extlib,pcre&quot;;;

let ocamlfind x = S[A"ocamlfind&quot;; 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&quot;;
A"-ccopt"; A"-static";
A"-ccopt"; A"-static-libgcc";
A"-linkpkg"])
| _ -> ()
end;;

--
Lloyd Zusman
ljz%40asfast.com">ljzasfast.com
God bless you.

__._,_.___
.

__,_._,___
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )