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
add possibilité to customize ocamlbuild options #5139
Comments
Comment author: @xclerc A function named 'add' has been added to 'Ocamlbuild_plugin.Options'. Here is a 'myocamlbuild.ml' example:open Ocamlbuild_plugin let () =
|
Comment author: daweil That works but it is not what I wished! It looks quite heavy to use for the user and it looks redundant with the "--" option of ocamlbuild? I use ocamlbuild to build project which do not compile any ocaml code. I even want to hide from the user of the plugin I develop that my plugin is able to compile Ocaml code. |
Comment author: @xclerc First, this is not redundant with the "--" option of ocamlbuild that is used to pass For what you are trying to achieve, I would suggest to use ocamlbuild as |
Comment author: daweil You're right. It's not a plugin that I wish but a "custom" build tool. In that case, what should be my entry points ? |
Comment author: @xclerc You could take a look at "$ROOT/ocamlbuild/ocamlbuildlib.mllib" that defines
|
Comment author: daweil OK. I understand that I should link with this library, specify my own command line options, customize the main.ml file to parse my options and link it with a copy of ocamlbuild.ml and of course with myocamlbuild.ml file. |
Comment author: @xclerc Well, if your tool is a build tool that need no OCaml support, you can leave |
Comment author: daweil OK, I'll try. |
Comment author: @ygrek Why would one want to add cmdline options to plugin when there is _tags file for that? It looks like duplicate functionality with no benefits.. |
Comment author: @xclerc The "_tags" file is essentially a static one describing how to build Some simple things may be done through the "-tag" / "-tags" / |
Comment author: @xclerc I mark the issue as "resolved/fixed", but the original reporter |
Original bug ID: 5139
Reporter: daweil
Assigned to: @xclerc
Status: closed (set by @xavierleroy on 2012-09-25T18:06:17Z)
Resolution: fixed
Priority: normal
Severity: feature
Fixed in version: 3.12.1+dev
Category: -for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues
Monitored by: daweil
Bug description
Could the list "spec" in the module Command of ocamlbuild be a reference on a liste, so that the writer of plugin could add its own options ?
The text was updated successfully, but these errors were encountered: