diff --git a/.gitignore b/.gitignore index f6b6ed79d51..2dfa3803d51 100644 --- a/.gitignore +++ b/.gitignore @@ -89,7 +89,6 @@ src/manifest/install.inc src/stubs/libacl/dune src/stubs/libacl/c-libraries.sexp src/stubs/win32/cc64 -src/stubs/win32/dune src/stubs/c-flags.sexp # doc doc/dev-manual/*aux diff --git a/Makefile b/Makefile index 922e0c58490..c3a8daee7f4 100644 --- a/Makefile +++ b/Makefile @@ -42,10 +42,7 @@ DUNE_ARGS ?= $(JBUILDER_ARGS) DUNE_PROFILE ?= release ifeq ($(DUNE_PROFILE_ARG),release) - # TODO Replace with --release when we require dune >= 2.5 - DUNE_PROFILE_ARG = --profile=release -else - DUNE_PROFILE_ARG = --profile=$(DUNE_PROFILE) + DUNE_PROFILE_ARG = --release endif src_ext/dune-local/dune.exe: src_ext/dune-local.stamp $(DUNE_SECONDARY) @@ -102,7 +99,7 @@ clean: distclean: clean clean-ext rm -rf autom4te.cache bootstrap rm -f Makefile.config config.log config.status aclocal.m4 - rm -f src/*.META src/*/.merlin src/manifest/dune src/manifest/install.inc src/stubs/libacl/dune src/stubs/win32/dune src/stubs/win32/cc64 src/ocaml-flags-configure.sexp src/stubs/libacl/c-libraries.sexp + rm -f src/*.META src/*/.merlin src/manifest/dune src/manifest/install.inc src/stubs/libacl/dune src/stubs/win32/cc64 src/ocaml-flags-configure.sexp src/stubs/libacl/c-libraries.sexp rm -f src/client/linking.sexp src/stubs/c-flags.sexp src/core/developer src/core/version OPAMINSTALLER_FLAGS = --prefix "$(call CYGPATH,$(DESTDIR)$(prefix))" diff --git a/configure b/configure index 289378fc0fe..5434980104c 100755 --- a/configure +++ b/configure @@ -8516,15 +8516,6 @@ fi fi -rm -f src/stubs/win32/dune -if test ${WIN32} -eq 1 -then : - - cd src/stubs/win32 - ${LN_S} -f dune-win32 dune - cd ../../.. - -fi rm -f src/stubs/libacl/dune if test "x${with_libacl}" = "xyes" then : diff --git a/configure.ac b/configure.ac index 219605e4d5b..35fe52b88e5 100644 --- a/configure.ac +++ b/configure.ac @@ -428,12 +428,6 @@ AS_IF([test "x${with_private_runtime}" != "xno"],[ ]) ]) -rm -f src/stubs/win32/dune -AS_IF([ test ${WIN32} -eq 1],[ - cd src/stubs/win32 - ${LN_S} -f dune-win32 dune - cd ../../.. -]) rm -f src/stubs/libacl/dune AS_IF([ test "x${with_libacl}" = "xyes" ],[ cd src/stubs/libacl diff --git a/dune-project b/dune-project index 9efdaf3e86f..54552930bdc 100644 --- a/dune-project +++ b/dune-project @@ -1,4 +1,4 @@ -(lang dune 2.0) +(lang dune 2.6) (name opam) (implicit_transitive_deps true) diff --git a/master_changes.md b/master_changes.md index 3c2b50005b0..e7919e8cc20 100644 --- a/master_changes.md +++ b/master_changes.md @@ -76,6 +76,7 @@ users) * Remove `bigarray` dependency [#5612 @kit-ty-kate] * Remove use of deprecated `Printf.kprintf" [#5612 @kit-ty-kate] * Fix "make cold" on Windows when gcc is available [#5635 @kit-ty-kate - fixes #5600] + * Control the Windows stubs using `(enabled_if)` [#4777 @dra27 - fix #4726] ## Infrastructure diff --git a/opam-admin.opam b/opam-admin.opam index 4a4e68b3be6..7b77d9b1af0 100644 --- a/opam-admin.opam +++ b/opam-admin.opam @@ -19,7 +19,7 @@ homepage: "https://opam.ocaml.org/" bug-reports: "https://github.com/ocaml/opam/issues" license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" depends: [ - "dune" {>= "2.0.0"} + "dune" {>= "2.6.0"} "re" {>= "1.9.0"} "opam-file-format" {>= "2.1.4"} ] diff --git a/opam-client.opam b/opam-client.opam index 9ee341da655..6a7f9bf4d1e 100644 --- a/opam-client.opam +++ b/opam-client.opam @@ -35,7 +35,7 @@ depends: [ "opam-repository" {= version} "re" {>= "1.9.0"} "cmdliner" {>= "1.1.0"} - "dune" {>= "2.0.0"} + "dune" {>= "2.6.0"} ] conflicts: [ "extlib" {< "1.7.8"} diff --git a/opam-core.opam b/opam-core.opam index 8907aba1438..49187076d82 100644 --- a/opam-core.opam +++ b/opam-core.opam @@ -24,7 +24,6 @@ bug-reports: "https://github.com/ocaml/opam/issues" dev-repo: "git+https://github.com/ocaml/opam.git" license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" build: [ - ["./configure" "--disable-checks" "--prefix" prefix] ["dune" "build" "-p" name "-j" jobs] ] depends: [ @@ -32,7 +31,7 @@ depends: [ "base-unix" "ocamlgraph" "re" {>= "1.9.0"} - "dune" {>= "2.0.0"} + "dune" {>= "2.6.0"} "sha" {>= "1.13"} "jsonm" "swhid_core" diff --git a/opam-devel.opam b/opam-devel.opam index e41283f7de0..0388ee87f1e 100644 --- a/opam-devel.opam +++ b/opam-devel.opam @@ -31,7 +31,7 @@ depends: [ "ocaml" {>= "4.08.0"} "opam-client" {= version} "cmdliner" {>= "1.1.0"} - "dune" {>= "2.0.0"} + "dune" {>= "2.6.0"} "conf-openssl" {with-test} "conf-diffutils" {with-test} ] diff --git a/opam-format.opam b/opam-format.opam index deb83fd79c2..fb4efb1fad1 100644 --- a/opam-format.opam +++ b/opam-format.opam @@ -24,7 +24,6 @@ bug-reports: "https://github.com/ocaml/opam/issues" dev-repo: "git+https://github.com/ocaml/opam.git" license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" build: [ - ["./configure" "--disable-checks" "--prefix" prefix] ["dune" "build" "-p" name "-j" jobs] ] depends: [ @@ -32,5 +31,5 @@ depends: [ "opam-core" {= version} "opam-file-format" {>= "2.1.4"} "re" {>= "1.9.0"} - "dune" {>= "2.0.0"} + "dune" {>= "2.6.0"} ] diff --git a/opam-installer.opam b/opam-installer.opam index ed7978a636d..0e447e6fb28 100644 --- a/opam-installer.opam +++ b/opam-installer.opam @@ -33,5 +33,5 @@ depends: [ "ocaml" {>= "4.08.0"} "opam-format" {= version} "cmdliner" {>= "0.9.8"} - "dune" {>= "2.0.0"} + "dune" {>= "2.6.0"} ] diff --git a/opam-repository.opam b/opam-repository.opam index aff9a96f5a9..728bb26e48f 100644 --- a/opam-repository.opam +++ b/opam-repository.opam @@ -30,5 +30,5 @@ build: [ depends: [ "ocaml" {>= "4.08.0"} "opam-format" {= version} - "dune" {>= "2.0.0"} + "dune" {>= "2.6.0"} ] diff --git a/opam-solver.opam b/opam-solver.opam index a344a2fed2c..59dc6e8ba37 100644 --- a/opam-solver.opam +++ b/opam-solver.opam @@ -34,7 +34,7 @@ depends: [ "dose3" {>= "6.1"} "cudf" {>= "0.7"} "re" {>= "1.9.0"} - "dune" {>= "2.0.0"} + "dune" {>= "2.6.0"} "opam-0install-cudf" {>= "0.4"} ] depopts: [ diff --git a/opam-state.opam b/opam-state.opam index a599b49be44..2e2258bc476 100644 --- a/opam-state.opam +++ b/opam-state.opam @@ -32,5 +32,5 @@ depends: [ "opam-repository" {= version} "re" {>= "1.9.0"} "spdx_licenses" {>= "1.0.0"} - "dune" {>= "2.0.0"} + "dune" {>= "2.6.0"} ] diff --git a/opam.opam b/opam.opam index 36049ba955b..b42d3ecdeef 100644 --- a/opam.opam +++ b/opam.opam @@ -20,6 +20,6 @@ homepage: "https://opam.ocaml.org/" bug-reports: "https://github.com/ocaml/opam/issues" license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" depends: [ - "dune" {>= "2.0.0"} + "dune" {>= "2.6.0"} "opam-client" {= version} ] diff --git a/src/stubs/win32/dune-win32 b/src/stubs/win32/dune similarity index 89% rename from src/stubs/win32/dune-win32 rename to src/stubs/win32/dune index 4cfc4b8e03a..d38a121c419 100644 --- a/src/stubs/win32/dune-win32 +++ b/src/stubs/win32/dune @@ -16,7 +16,8 @@ (:include ../c-flags.sexp))) (c_library_flags (:standard (:include c-libraries.sexp))) - (wrapped false)) + (wrapped false) + (enabled_if (= %{os_type} "Win32"))) (rule (copy opamWin32Stubs.ml opamWin32Stubs.mli)) @@ -34,7 +35,8 @@ (install (section bin) (package opam) - (files opam-putenv.exe)) + (files opam-putenv.exe) + (enabled_if (= %{os_type} "Win32"))) (rule (with-stdout-to c-libraries.sexp (run ocaml %{dep:../../../shell/context_flags.ml} clibs)))