Re: "ocaml_beginners":: Re: [OASIS help] Code in subdirectories for executable
Actually, I only have a single executable this is why I am using a single
Executable section in my _oasis file.
Should I therefore extract some code into a lib ?
Thanks a lot for your time.
2012/8/29 Sylvain Le Gall <sylvain@...>
> **[Non-text portions of this message have been removed]
> On 16-08-2012, Johan Mazel <johan.mazel@...> wrote:
> > --MSZAH53qNVnmw7IMWRYlJVCerZXfC6jCcJo75Qf
> > Content-Type: text/plain; charset=ISO-8859-1
> > Content-Transfer-Encoding: 7bit
> > Hi
> > I am using OASIS 0.3.0 and OCaml 3.12.1.
> > I am trying to switch one of my projects to OASIS. However, I cannot
> > find a way to tell OASIS that the field path "src" actually contains
> > several other sub-directories and to create a _tags file that takes
> > this into account.
> > However, if I manually add directories in the _tags file with several
> > lines like "<src/sub-directory>: include", "ocaml setup.ml -build" is
> > working.
> > I cannot find anything in OASIS documentation regarding this problem.
> > Does anybody has an idea on how to fix this ?
> > Thanks in advance for your time.
> > Johan
> Just add the relative path to your module:
> Library foo
> Path: src
> Modules: bar/Baz, Foo
> It will include src/ and src/bar automatically. However, you won't find
> a "src/bar": include in you _tags because it is handled in
> myocamlbuild.ml in a more precise way.
> The problem with the _tags line is that it includes the subdirectory for
> everything in your project. Using myocamlbuild, as OASIS does, allow to
> only include directories for Library/Executable that uses "Library foo".
> It also make a difference between InternalModules (which should be
> hidden) and Modules (which are public interfaces). So you can even go
> further and have src/foo and src/foo/internal, if you want to be 100%
> sure that other Libraries/Executables doesn't use internal stuff.
> p.s.: please CC sylvain@... for this kind of questions, I am not
> reading caml-list as frequently as before.