You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have not find how to build an ocaml toplevel using OASIS. The "Executable" section try to compile the target "foo.byte" or "foo.native" but not "foo.top".
create a file lablgtktop.mltop containing the list of modules (publics and internals)
build the target lablgtktop.top with ocamlbuild
copy lablgtktop.top to lablgtktop
note: toplevels must also be linked with the "-linkpkg" switch if using ocamlfind
build (with expunge):
create a file lablgtktop.mltop containing the list of modules (publics and internals)
build the target lablgtktop.top with ocamlbuild
list all modules that should be accessible in the toplevel i.e:
all modules of the "Modules" field
all public modules of libraries (internals and externals) linked with the toplevel
call "expunge lablgtktop.top lablgtktop "
install:
install lablgtktop
The expunge phase is not mandatory but it avoids name clashes with internal modules of the compiler (such as Types, Env, ...). The expunge executable is located in the standard library directory.
This feature request has been migrated from artifact #740 on forge.ocamlcore.org. It was assigned to user102.
user145 posted on 2010-09-06 08:53:17:
I have not find how to build an ocaml toplevel using OASIS. The "Executable" section try to compile the target "foo.byte" or "foo.native" but not "foo.top".
user102 replied on 2010-09-06 09:09:03:
Indeed. I need to add a section "Toplevel" just like "Executable".
Sylvain Le Gall
user102 replied on 2010-09-09 13:41:36:
I don't often build toplevels, so I have no real idea how to it the right way.
Could you give me an example? E.g. a toplevel section as should be written in _oasis and the corresponding step to build it (using ocamlbuild maybe).
_oasis:
Toplevel lablgtktop
Path: top/
BuildDepends: lablgtk
XXXX
build:
create a file top/lablgtktop.mltop with content
...
Thank you for you time.
user145 replied on 2010-09-09 14:43:21:
I think the specific fields for toplevel sections should be "Modules", "InternalModules" and maybe "Expunge":
_oasis:
Toplevel lablgtktop
Path: top/
Modules: Gtk_toplevel
InternalModules: Foo, Bar
BuildDepends: lablgtk
Expunge: true
build (without expunge):
note: toplevels must also be linked with the "-linkpkg" switch if using ocamlfind
build (with expunge):
install:
The expunge phase is not mandatory but it avoids name clashes with internal modules of the compiler (such as Types, Env, ...). The expunge executable is located in the standard library directory.
user102 replied on 2010-09-09 15:28:06:
The difference between InternalModules and Modules is that with expunge, you don't list InternalModules?
How can you list public modules modules of libraries ?
I will use ocamlfind anyway.
user145 replied on 2010-09-09 16:10:25:
Yes.
I get the library path with ocamlfind and list .cmi files it contains.
The text was updated successfully, but these errors were encountered: