dbuenzli / topkg

The transitory OCaml software packager
http://erratique.ch/software/topkg
ISC License
69 stars 25 forks source link

Propagate `--with-X true/false` in the build invocations #64

Closed samoht closed 8 years ago

samoht commented 8 years ago

Would it be possible to pass some parts of the build context to the ocamlbuild invocations?

See https://github.com/samoht/irmin-watcher/blob/9e1329d567155ffa65d728ac6a11daa8d81e4718/pkg/pkg.ml#L25-L31 for instance, which redefine the main build command to add -tag with-X or -tag without-X to the ocamlbuild invocations depending on whether topkg build -- --with-X is called with true or false.

dbuenzli commented 8 years ago

I have to think about it, though the fact that this seems to be motivated by a cppo use does not motivate me.

In any case I think only positive information should be propagated as tags. I'd also like to avoid polluting too much the build invocation.

dbuenzli commented 8 years ago

A first good step would be to expose the base build command so that people can easily reuse and extend it.

samoht commented 8 years ago

Yes exposing the build base command will already covers most of my use-case.

dbuenzli commented 8 years ago

Ok so we'll already go with this to see how it goes.