Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ability to specify root directory for compiler output #3023

Closed
vicuna opened this issue Jul 30, 2004 · 2 comments
Closed

ability to specify root directory for compiler output #3023

vicuna opened this issue Jul 30, 2004 · 2 comments

Comments

@vicuna
Copy link

vicuna commented Jul 30, 2004

Original bug ID: 3023
Reporter: administrator
Status: closed
Resolution: won't fix
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Charles Martin
Version: 3.08
OS: linux, mac osx
Submission from: 65.57.245.11 (65.57.245.11)

I would like to be able to specify the root directory for compiler output. The
compiler output for files specified with a relative pathname would be based from
the specified root directory. Absolute pathnames would still resolve normally.

This feature will be useful for: (a) maintaining separate directories for debug
and release builds and (b) compiling code on a networked resource (nfs, network
appliance) to a local machine.

Current behavior:

$ cd /usr/home/charles
$ ocamlc -o foo one/foo.ml

/usr/home/charles/one/foo.cmi
/usr/home/charles/one/foo.cmo
/usr/home/charles/foo

Behavior with the feature wish:

$ cd /usr/home/charles
$ ocamlc -o foo -O other one/foo.ml

/usr/home/charles/other/one/foo.cmi
/usr/home/charles/other/one/foo.cmo
/usr/home/charles/other/foo

Thanks for considering this feature.

Charles

@vicuna
Copy link
Author

vicuna commented Aug 6, 2004

Comment author: administrator

I would like to be able to specify the root directory for compiler
output. The compiler output for files specified with a relative
pathname would be based from the specified root directory. Absolute
pathnames would still resolve normally. This feature will be useful
for: (a) maintaining separate directories for debug and release
builds and (b) compiling code on a networked resource (nfs, network
appliance) to a local machine.

Current behavior:

$ cd /usr/home/charles
$ ocamlc -o foo one/foo.ml

/usr/home/charles/one/foo.cmi
/usr/home/charles/one/foo.cmo
/usr/home/charles/foo

Behavior with the feature wish:

$ cd /usr/home/charles
$ ocamlc -o foo -O other one/foo.ml

/usr/home/charles/other/one/foo.cmi
/usr/home/charles/other/one/foo.cmo
/usr/home/charles/other/foo

Starting with release 3.08, the -o option for single-file compiles
indicates where to put the generated files. So, you can get the
desired behavior by

ocamlc -c -o other/one/foo.cmo one/foo.ml
ocamlc -o other/foo other/one/foo.cmo
  • Xavier Leroy

@vicuna
Copy link
Author

vicuna commented Aug 6, 2004

Comment author: administrator

Equivalent effect can be achieved with -o option a la gcc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant