* [Caml-list] malfunctioning -o command-line argument?
@ 2003-02-03 1:04 Ohad Rodeh
2003-02-03 1:24 ` Nicolas George
0 siblings, 1 reply; 5+ messages in thread
From: Ohad Rodeh @ 2003-02-03 1:04 UTC (permalink / raw)
To: caml-list
List,
I don't know how I haven't noticed this behavior before, but it seems
like the -o command-line argument for ocamlc/ocamlopt does not work in all
cases.
For example, if foo.ml is a file then:
ocamlc -c foo.ml -o /tmp/foo.cmo
will create foo.cmo in the current directory rather then /tmp.
This is also the case for .mli files. Furthermore, if I compile an .mli
file, move the .cmi file to /tmp, and compile the .ml like this:
ocamlc -c foo.mli
mv foo.cmi /tmp
ocamlc -I /tmp -c foo.ml
Then ocamlc will not be able to find foo.cmi.
Is this a bug or a feature?
For what I'm doing right now (multi-achitecture compilation support) I'd
really like this to work.
Ohad.
-----------------------------------------------------------------------------------
Ohad Rodeh
tel: +972-3-6401641
IBM Haifa, storage research
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] malfunctioning -o command-line argument?
2003-02-03 1:04 [Caml-list] malfunctioning -o command-line argument? Ohad Rodeh
@ 2003-02-03 1:24 ` Nicolas George
2003-02-03 1:32 ` Ohad Rodeh
2003-02-03 13:59 ` Fabrice Le Fessant
0 siblings, 2 replies; 5+ messages in thread
From: Nicolas George @ 2003-02-03 1:24 UTC (permalink / raw)
To: caml-list
Le quintidi 15 pluviôse, an CCXI, Ohad Rodeh a écrit :
> ocamlc -c foo.ml -o /tmp/foo.cmo
> will create foo.cmo in the current directory rather then /tmp.
> Is this a bug or a feature?
According to the man page, it is a feature:
-o exec-file
Specify the name of the output file produced by the linker.
It works for the linker, but not for the compiler.
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] malfunctioning -o command-line argument?
2003-02-03 1:24 ` Nicolas George
@ 2003-02-03 1:32 ` Ohad Rodeh
2003-02-03 13:59 ` Fabrice Le Fessant
1 sibling, 0 replies; 5+ messages in thread
From: Ohad Rodeh @ 2003-02-03 1:32 UTC (permalink / raw)
To: Nicolas George
Alright then, can we make this a feature request?
Ohad.
-----------------------------------------------------------------------------------
Ohad Rodeh
tel: +972-3-6401641
IBM Haifa, storage research
|---------+--------------------------------->
| | Nicolas George |
| | <nicolas.george@ens.fr|
| | > |
| | Sent by: |
| | owner-caml-list@pauill|
| | ac.inria.fr |
| | |
| | |
| | 02/02/03 17:24 |
|---------+--------------------------------->
>--------------------------------------------------------------------------------------------------------------------------------------------------|
| |
| To: caml-list@inria.fr |
| cc: |
| Subject: Re: [Caml-list] malfunctioning -o command-line argument? |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
Le quintidi 15 pluviôse, an CCXI, Ohad Rodeh a écrit :
> ocamlc -c foo.ml -o /tmp/foo.cmo
> will create foo.cmo in the current directory rather then /tmp.
> Is this a bug or a feature?
According to the man page, it is a feature:
-o exec-file
Specify the name of the output file produced by the linker.
It works for the linker, but not for the compiler.
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives:
http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ:
http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] malfunctioning -o command-line argument?
2003-02-03 1:24 ` Nicolas George
2003-02-03 1:32 ` Ohad Rodeh
@ 2003-02-03 13:59 ` Fabrice Le Fessant
2003-02-06 8:14 ` Stefano Zacchiroli
1 sibling, 1 reply; 5+ messages in thread
From: Fabrice Le Fessant @ 2003-02-03 13:59 UTC (permalink / raw)
To: Nicolas George; +Cc: caml-list
> Le quintidi 15 pluviôse, an CCXI, Ohad Rodeh a écrit :
> > ocamlc -c foo.ml -o /tmp/foo.cmo
> > will create foo.cmo in the current directory rather then /tmp.
Arguments are treated in the order they are read: here, foo.ml is
compiled before, and the -o option is added after. Fix:
ocamlc -c -o /tmp/foo.cmo foo.ml
- Fabrice
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] malfunctioning -o command-line argument?
2003-02-03 13:59 ` Fabrice Le Fessant
@ 2003-02-06 8:14 ` Stefano Zacchiroli
0 siblings, 0 replies; 5+ messages in thread
From: Stefano Zacchiroli @ 2003-02-06 8:14 UTC (permalink / raw)
To: caml-list
On Mon, Feb 03, 2003 at 02:59:16PM +0100, Fabrice Le Fessant wrote:
> Arguments are treated in the order they are read: here, foo.ml is
> compiled before, and the -o option is added after. Fix:
>
> ocamlc -c -o /tmp/foo.cmo foo.ml
This doesn't work for me, are you sure?
~$ cat a.ml
prerr_endline "a";;
~$ ocamlc -c -o /tmp/a.cmo a.ml
~$ ls a.*
a.cmi a.cmo a.ml
~$ ls /tmp/a.*
ls: /tmp/a.*: No such file or directory
Cheers
--
Stefano Zacchiroli - Undergraduate Student of CS @ Uni. Bologna, Italy
zack@{cs.unibo.it,debian.org,bononia.it} - http://www.bononia.it/zack/
" I know you believe you understood what you think I said, but I am not
sure you realize that what you heard is not what I meant! " -- G.Romney
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-02-06 10:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-03 1:04 [Caml-list] malfunctioning -o command-line argument? Ohad Rodeh
2003-02-03 1:24 ` Nicolas George
2003-02-03 1:32 ` Ohad Rodeh
2003-02-03 13:59 ` Fabrice Le Fessant
2003-02-06 8:14 ` Stefano Zacchiroli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox