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

Allow user to add new commandline options in the plugin. #6097

Closed
vicuna opened this issue Jul 28, 2013 · 3 comments
Closed

Allow user to add new commandline options in the plugin. #6097

vicuna opened this issue Jul 28, 2013 · 3 comments

Comments

@vicuna
Copy link

vicuna commented Jul 28, 2013

Original bug ID: 6097
Reporter: meyer
Status: resolved (set by @damiendoligez on 2017-03-01T15:37:22Z)
Resolution: suspended
Priority: normal
Severity: feature
Version: 4.01.1+dev
Category: -for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues
Monitored by: @gasche

Bug description

For instance user wants to options and tags for the js_of_ocaml compiler.

Then in his myocamlbuild.ml (s)he will say (roughly):

let jopts := ref ""
dispatch begin function
| Before_construct_options ->
add_option ("-jopts", String (fun x -> jopts := !jopts ^ " " ^ x, " js_of_ocaml
options")
| _ -> () end

of course that, and possibility of passing the options to the plugin, make is relatively easy to extend ocamlbuild itself not only with rules but also with new funcionality.

Then we can use the new options like this (hypothetically):

ocamlbuild -popts "-package js_of_ocaml.build" -jopts -pretty foo.js

(or use _tags to get the same functionality)

@vicuna
Copy link
Author

vicuna commented Jul 28, 2013

Comment author: @dbuenzli

Do we really care about that ? the -tag option can somehow handle that no ?

@vicuna
Copy link
Author

vicuna commented Jul 28, 2013

Comment author: meyer

yes, -tag will handle that. On a side note we might just want to get rid of most command line options and turn it to global tags:

#6098

what do you think?

@vicuna
Copy link
Author

vicuna commented Mar 1, 2017

Comment author: @damiendoligez

ocamlbuild is now a separate project that lives on GitHub.
PR transferred to ocaml/ocamlbuild#193

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