tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Updating lang/ocaml
Hi list,
I'm working on updating lang/ocaml to version 4.14 (in alpha at the
moment - I'm working in wip so far), and with this update I'd like to
change the way that the package determines when to build its native
compiler and other stuff, in order to get rid of the cumbersome
conditionals in lang/ocaml/Makefile and mk/ocaml.mk, or at least
concentrate them in one place.
My idea was to have one option (ocaml-native) that has a default value
determined by whether the architecture supports the native code
compiler, which is then interpreted by all the ocaml packages (through
mk/ocaml.mk) to build/use the native compiler or not.
My first interpretation of section 16.4 of the pkgsrc guide (dealing
with pkg-build-options.mk) was that this was the way to do it: in
ocaml.mk we could check if lang/ocaml had the ocaml-native option set,
and act accordingly. But this doesn't seem to work, since if I try this
out in ocaml.mk I get the message that pkg-build-options can only be
included in a buildlink3.mk file.
So I'm now thinking of just having an ocaml-native global option that
gets checked by every ocaml package (and the compiler) separately. It's
not completely fool-proof, since if you change that option you'd have to
delete and rebuild all your ocaml packages, but it's doable.
I now have three questions for the collective wisdom of tech-pkg@ to
consider:
- can this be done more elegantly?
- how can I set a default value for an option globally, rather than in
one specific options.mk?
- can I use the options.mk framework in mk files?
I'd be grateful for any advice.
best,
Jaap
Home |
Main Index |
Thread Index |
Old Index