caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* ocamlc/ocamlopt output directory
@ 2008-02-04 14:01 Dmitry Bely
  2008-02-04 15:11 ` [Caml-list] " Romain Bardou
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Bely @ 2008-02-04 14:01 UTC (permalink / raw)
  To: ocaml

By default Ocaml compilers place output files to the same directory
where the source resides:

ocamlc -c ../src/foo.ml -> generates ../src//foo.cmo, not ./foo.cmo as
one would expect from other compilers experience!

This can be overwritten by -o flag, but it's a) completely
undocumented for this purpose (manual says that it only affects the
linking phase) and b) affects ALL generated files at once.

Is this the design decision or just a faulty implementation? Should I
submit a bug report (together with a rather trivial fix) or this
behavior considered standard because it's too late to change anything?

- Dmitry Bely


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

* Re: [Caml-list] ocamlc/ocamlopt output directory
  2008-02-04 14:01 ocamlc/ocamlopt output directory Dmitry Bely
@ 2008-02-04 15:11 ` Romain Bardou
  0 siblings, 0 replies; 2+ messages in thread
From: Romain Bardou @ 2008-02-04 15:11 UTC (permalink / raw)
  To: ocaml

What would be the point of placing all cmo files in the current 
directory? This could even lead to errors if some files have the same 
names, like "bla/foo.ml" and "bli/foo.ml".

My advice would be to use ocamlbuild if you don't like the cmo files in 
the source tree =)

     Romain Bardou

Dmitry Bely a écrit :
> By default Ocaml compilers place output files to the same directory
> where the source resides:
> 
> ocamlc -c ../src/foo.ml -> generates ../src//foo.cmo, not ./foo.cmo as
> one would expect from other compilers experience!
> 
> This can be overwritten by -o flag, but it's a) completely
> undocumented for this purpose (manual says that it only affects the
> linking phase) and b) affects ALL generated files at once.
> 
> Is this the design decision or just a faulty implementation? Should I
> submit a bug report (together with a rather trivial fix) or this
> behavior considered standard because it's too late to change anything?
> 
> - Dmitry Bely
> 
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs


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

end of thread, other threads:[~2008-02-04 15:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-04 14:01 ocamlc/ocamlopt output directory Dmitry Bely
2008-02-04 15:11 ` [Caml-list] " Romain Bardou

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).