* ocamlbuild missing links: using a bash script
@ 2007-11-21 10:52 Hugo Ferreira
2007-11-21 11:19 ` [Caml-list] " Nicolas Pouillard
0 siblings, 1 reply; 2+ messages in thread
From: Hugo Ferreira @ 2007-11-21 10:52 UTC (permalink / raw)
To: Caml Mailing List
Hello,
I have a very simple bash script that I use to
build my project using ocamlbuild. The idea is
to build modules successively and execute tests
until compilation fails, a test fails or all
modules are correctly compiled.
It goes something like this:
.................................................
#!/bin/bash
# Exit on error
set -e
ocamlbuild src/comb/tests_comb.d.byte --
ocamlbuild -lib unix src/uf/bench.d.byte --
.................................................
I have noticed however that the build (if
successful) only retains the last symbolic
link to the compiled artefacts.
My questions are:
1. Is the above behaviour intended?
2. If so how can I keep all resulting links
TIA,
Hugo F.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] ocamlbuild missing links: using a bash script
2007-11-21 10:52 ocamlbuild missing links: using a bash script Hugo Ferreira
@ 2007-11-21 11:19 ` Nicolas Pouillard
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Pouillard @ 2007-11-21 11:19 UTC (permalink / raw)
To: hmf; +Cc: caml-list
Excerpts from hmf's message of Wed Nov 21 11:52:26 +0100 2007:
> Hello,
>
> I have a very simple bash script that I use to
> build my project using ocamlbuild. The idea is
> to build modules successively and execute tests
> until compilation fails, a test fails or all
> modules are correctly compiled.
>
> It goes something like this:
> .................................................
> #!/bin/bash
>
> # Exit on error
> set -e
>
> ocamlbuild src/comb/tests_comb.d.byte --
>
> ocamlbuild -lib unix src/uf/bench.d.byte --
> .................................................
>
> I have noticed however that the build (if
> successful) only retains the last symbolic
> link to the compiled artefacts.
>
> My questions are:
>
> 1. Is the above behaviour intended?
Yes, links made by ocamlbuild are made each time.
> 2. If so how can I keep all resulting links
If you ask for multiple programs you will get multiple links.
ocamlbuild -lib unix src/comb/tests_comb.d.byte src/uf/bench.d.byte
However it doesn't work in combination with running the given command (using '--').
The second option is to forget about this (mis-)feature of links. And use
binaries from the _build dir.
--
Nicolas Pouillard aka Ertai
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-11-21 11:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-21 10:52 ocamlbuild missing links: using a bash script Hugo Ferreira
2007-11-21 11:19 ` [Caml-list] " Nicolas Pouillard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox