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

Use enabled_if to control the Windows stubs #4777

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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))"
Expand Down
9 changes: 0 additions & 9 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(lang dune 2.0)
(lang dune 2.6)
(name opam)

(implicit_transitive_deps true)
1 change: 1 addition & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion opam-admin.opam
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
]
2 changes: 1 addition & 1 deletion opam-client.opam
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Expand Down
3 changes: 1 addition & 2 deletions opam-core.opam
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,14 @@ 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: [
"ocaml" {>= "4.08.0"}
"base-unix"
"ocamlgraph"
"re" {>= "1.9.0"}
"dune" {>= "2.0.0"}
"dune" {>= "2.6.0"}
"sha" {>= "1.13"}
"jsonm"
"swhid_core"
Expand Down
2 changes: 1 addition & 1 deletion opam-devel.opam
Original file line number Diff line number Diff line change
Expand Up @@ -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}
]
Expand Down
3 changes: 1 addition & 2 deletions opam-format.opam
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@ 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: [
"ocaml" {>= "4.08.0"}
"opam-core" {= version}
"opam-file-format" {>= "2.1.4"}
"re" {>= "1.9.0"}
"dune" {>= "2.0.0"}
"dune" {>= "2.6.0"}
]
2 changes: 1 addition & 1 deletion opam-installer.opam
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ depends: [
"ocaml" {>= "4.08.0"}
"opam-format" {= version}
"cmdliner" {>= "0.9.8"}
"dune" {>= "2.0.0"}
"dune" {>= "2.6.0"}
]
2 changes: 1 addition & 1 deletion opam-repository.opam
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ build: [
depends: [
"ocaml" {>= "4.08.0"}
"opam-format" {= version}
"dune" {>= "2.0.0"}
"dune" {>= "2.6.0"}
]
2 changes: 1 addition & 1 deletion opam-solver.opam
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
2 changes: 1 addition & 1 deletion opam-state.opam
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
]
2 changes: 1 addition & 1 deletion opam.opam
Original file line number Diff line number Diff line change
Expand Up @@ -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}
]
6 changes: 4 additions & 2 deletions src/stubs/win32/dune-win32 → src/stubs/win32/dune
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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)))