List Info

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




"ocaml_beginners"::[] ocamlbuild: forcing a re-build if a dependent library changes
country flaguser name
Norway
2008-03-06 08:44:25

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.

I have a program called l.ml which produces a statically linked native
binary. This program depends on statically linked native library that I
wrote called ljz.cmxa which implements a module called Ljz. This
ljz.cmxa library resides in a completely different directory tree to the
one in which l.ml resides.

I know that I have to put "ljz" within the "packages" variable within
myocamlbuild.ml, and this indeed causes the Ljz module to be included
in the build of my executable.

I occasionally make changes to ljz.cmxa, and when I do, I'd like the next
ocamlbuild run for the l.ml program to cause that program to be rebuilt.
However, this does not happen automatically. I therefore would like to
put something into the myocamlbuild.ml file which sets up a dependency
on ljz.cmxa.

I never want ljz.cmxa to be rebuilt or changed in any way when running
ocamlbuild for my l.ml program; all I want is for this library to be
checked at build time, and if it has changed since the last ocamlbuild
invocation, to simply cause my program to be rebuilt.

I'm not sure, but I'm guessing that part of the reason for why I can't
make this work is because the ocamldep program doesn't seem to pay
attention to *.cmxa files.

But whatever my problem is, thanks in advance for any tips or pointers
to documentation that you folks might be able to provide.

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

__._,_.___
.

__,_._,___
[1]

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