caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* ocamlbuild and the "status bar"
@ 2007-02-27 11:04 Joel Reymont
  2007-02-27 12:58 ` Joel Reymont
  2007-02-27 13:06 ` [Caml-list] " Nicolas Pouillard
  0 siblings, 2 replies; 4+ messages in thread
From: Joel Reymont @ 2007-02-27 11:04 UTC (permalink / raw)
  To: caml-list

Folks,

I'm trying to set up my first OCaml project and I just read through  
the ocamlbuild presentation [1]. I really like this tool but I can't  
figure out where to get the nifty "status bar" functionality  
described towards the end of the slides.

Any clues?

	Thanks, Joel

[1] http://tinyurl.com/2skg5y

--
http://wagerlabs.com/






^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ocamlbuild and the "status bar"
  2007-02-27 11:04 ocamlbuild and the "status bar" Joel Reymont
@ 2007-02-27 12:58 ` Joel Reymont
  2007-02-27 13:28   ` [Caml-list] " Nicolas Pouillard
  2007-02-27 13:06 ` [Caml-list] " Nicolas Pouillard
  1 sibling, 1 reply; 4+ messages in thread
From: Joel Reymont @ 2007-02-27 12:58 UTC (permalink / raw)
  To: caml-list


On Feb 27, 2007, at 11:04 AM, Joel Reymont wrote:

> I really like this tool but I can't figure out where to get the  
> nifty "status bar" functionality described towards the end of the  
> slides.

This is a rather silly question so I retract it. A much better  
question is the following...

How do I integrate ocamlbuild with external libraries?

I have OUnit installed in /usr/local/lib/ocaml/site-lib/ounit since  
it uses ocamlfind during installation. I have to use a longish  
command line to make OUnit examples compile, like this:

ocamlbuild -cflags -I,/usr/local/lib/ocaml/site-lib/ounit -lflags -I,/ 
usr/local/lib/ocaml/site-lib/ounit -libs unix,ounit test_list.byte

Maybe the solution here is to build OUnit with ocamlbuild but I  
haven't figured how to do this yet. Investigating!

	Thanks, Joel

--
http://wagerlabs.com/






^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] ocamlbuild and the "status bar"
  2007-02-27 11:04 ocamlbuild and the "status bar" Joel Reymont
  2007-02-27 12:58 ` Joel Reymont
@ 2007-02-27 13:06 ` Nicolas Pouillard
  1 sibling, 0 replies; 4+ messages in thread
From: Nicolas Pouillard @ 2007-02-27 13:06 UTC (permalink / raw)
  To: Joel Reymont; +Cc: caml-list

On 2/27/07, Joel Reymont <joelr1@gmail.com> wrote:
> Folks,

Hi,

>
> I'm trying to set up my first OCaml project and I just read through
> the ocamlbuild presentation [1]. I really like this tool but I can't
> figure out where to get the nifty "status bar" functionality
> described towards the end of the slides.
>
> Any clues?
>

It's by default on the standard version.

It can be disabled with the -classic-output command line flag.
It's disabled in the ocamlbuildlight version that is used in OCaml for
bootstrapping.

Cheers,

-- 
Nicolas Pouillard


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] Re: ocamlbuild and the "status bar"
  2007-02-27 12:58 ` Joel Reymont
@ 2007-02-27 13:28   ` Nicolas Pouillard
  0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Pouillard @ 2007-02-27 13:28 UTC (permalink / raw)
  To: Joel Reymont; +Cc: caml-list

On 2/27/07, Joel Reymont <joelr1@gmail.com> wrote:
>
> On Feb 27, 2007, at 11:04 AM, Joel Reymont wrote:
>
> > I really like this tool but I can't figure out where to get the
> > nifty "status bar" functionality described towards the end of the
> > slides.
>
> This is a rather silly question so I retract it. A much better
> question is the following...
>
> How do I integrate ocamlbuild with external libraries?
>
> I have OUnit installed in /usr/local/lib/ocaml/site-lib/ounit since
> it uses ocamlfind during installation. I have to use a longish
> command line to make OUnit examples compile, like this:
>
> ocamlbuild -cflags -I,/usr/local/lib/ocaml/site-lib/ounit -lflags -I,/
> usr/local/lib/ocaml/site-lib/ounit -libs unix,ounit test_list.byte

There is many solutions and you get one of them.

1/ Comand line solutions

1.1/ Using ocamlfind:

Since it's an ocamlfind package you can use it.

ocamlbuild -ocamlc "ocamlfind ocamlc -package ounit" -lfags -linkpkg
-lib unix test_list.byte

1.2/ Using the library directly (like you did).

2/ Shell script/Makefile solution

Put all your stuffs form the previous solutions in a shell script or a Makefile.

3/ A solution with an Ocamlbuild plugin:

$ cat _tags
"test_list.byte": use_unix

$ cat myocamlbuild.ml
open Ocamlbuild_plugin;;
open Command;;

let packages = "ounit" (* "pkg1,pkg2,..." *);;

let ocamlfind cmd =
  S[A"ocamlfind"; A cmd; A"-package"; A packages];;

flag ["ocaml"; "link"] (A"-linkpkg");;

dispatch begin function
  | After_options ->
      Options.ocamlc := ocamlfind "ocamlc";
      Options.ocamlopt := ocamlfind "ocamlopt";
  | _ -> ()
end

$ ocamlbuild test_list.byte
Finished, 3 targets (2 cached) in 00:00:00.

Cheers,

-- 
Nicolas Pouillard


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-02-27 13:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-27 11:04 ocamlbuild and the "status bar" Joel Reymont
2007-02-27 12:58 ` Joel Reymont
2007-02-27 13:28   ` [Caml-list] " Nicolas Pouillard
2007-02-27 13:06 ` [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;
as well as URLs for NNTP newsgroup(s).