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

Port to Dune/Jbuilder #10

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Port to Dune/Jbuilder #10

wants to merge 8 commits into from

Conversation

dra27
Copy link
Member

@dra27 dra27 commented May 11, 2018

Hey, it's Friday - why have one port when you can have two? This is presently based on #9. Only the last two commits are new.

The addition of the opam file should be non-controversial - it's just the one from opam-repository with the addition of a version field. This version gets picked up by jbuilder and transferred to the generated META file. In general, once released, it's worth bumping the version in dbm.opam (just like we do with VERSION in OCaml) as that means if you pin the package in opam, it looks like a newer version at once.

This port differs from #8 in a few ways:

  • configure is called by jbuild rules. Importantly, configure can also be called manually which will take precedent (this is done using Dune's fallback mode for generated files).
  • The original Makefile is preserved - I certainly prefer typing make, even in a Dune project. The old targets are maintained. I have ported over the old install target for completeness - though obviously installation using opam-installer (or jbuilder install) would be preferred.

The only future work which would want doing here would be to eliminate the configure script and convert it to Configurator, but this is best left until the imminent release of Dune 1.0.0.

I haven't tried this on MSVC, because there are limits even to my ability to distract myself from what I should be doing. I would anticipate it would work as long as the c-flags.sexp and c-library-flags.sexp are generated by hand with the correct flags to point cl at the header and import library.

dra27 added 8 commits March 30, 2021 16:41
It's possible to persuade GCC to reveal its search path for header
files, which provides a better default for systems compiling with gcc.
It also means that the mingw-w64 libraries are automatically detected.
Unused variable and a typo which should have been removed in 1996!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant