Re: Compiling ocaml files from a "remote" toplevel
| Newsgroups | gmane.comp.lang.ocaml.beginners |
|---|---|
| Message-ID | <[email protected]> |
On 02.12.2015 14:40, [email protected] [ocaml_beginners] wrote: > > > I have two OCaml project directories, Controller_Dir and Controlled_Dir. > I am inside a toplevel located in Controller_Dir. From that toplevel, I would like > to compile the ocaml files contained in Controlled_Dir. > > If I were outside the toplevel, I would simply type : > > cd Controlled_Dir > ocamlc wathever_I_want_to_compile > cd Controller_Dir > > > How would I "translate" this in the toplevel ? I tried Sys.command-ing > everything, but unfortunately this does not work for the cd command. > Did you try Sys.chdir and Sys.getcwd to change directories for the current process? The cd command is normally a shell builtin: str@suse132-intel:~> type cd cd is a shell builtin /Str.