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

Replace make lib-ext with a configure-based check #4776

Merged
merged 7 commits into from
Sep 3, 2021

Conversation

dra27
Copy link
Member

@dra27 dra27 commented Jul 29, 2021

make lib-ext is an artefact from the pre-Jbuilder days when it actually built .cma and .cmxa archives to be put into a separate lib directory. The workflow has never made sense since the switch to using jbuilder/dune vendored libraries for this.

This PR is on buy one, get two free:

  • Detection of C++ on Cygwin is fixed (or, more accurately, the detection when C++ is not present on Cygwin is fixed). It turns out this is not related, but I started with it because I thought it might be!
  • --without-dune is added to configure to allow disabling or forcing the use of dune from PATH. This is related. Default behaviour is unchanged: if you don't specify anything, Dune will be automatically built if it's missing.
  • --with-vendored-deps now replaces make lib-ext. By default, this gets enabled whenever the old lib-ext message would have been disabled. At the end of configure, sources are downloaded and extracted as required. It's all the same mechanism, it's only invocation which has altered, so full tarballs would use their local copies in the "download" phase, etc.

opam has always automatically built Dune if it was missing (even without
`make lib-ext`). This option adds support to force that by passing
`--without-dune` to configure, instructing `configure` to ignore any
dune binary in PATH.

`--with-dune` allows the opposite, forcing dune to be in PATH.

As a small debugging trick, `--with-dune=foo` allows `foo` to be used in
place of `dune`.
Related to an unreleased patch being backported to seq 0.1 and should
have been removed when seq 0.2 was adopted.
make lib-ext is an artefact of OPAM 1.2.2's build system, when it
actually did something. Since the switch to Jbuilder and then Dune, all
it does is set-up a source tree which is more appropriately done from
configure, whose job that is.
@rjbou rjbou moved this from PR to review to PR finalised in Opam 2.2.0 Sep 1, 2021
@dra27 dra27 merged commit 23d37e0 into ocaml:master Sep 3, 2021
Opam 2.2.0 automation moved this from PR finalised to Done Sep 3, 2021
@dra27 dra27 deleted the no-lib-ext branch September 3, 2021 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Opam 2.2.0
  
Done
2 participants