Skip to content

Commit

Permalink
Merge pull request #749 from emillon/build-if
Browse files Browse the repository at this point in the history
dune: use build_if instead of workaround
  • Loading branch information
yallop authored Feb 1, 2025
2 parents 945ef0a + 3a46c0d commit d1d47ad
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 18 deletions.
4 changes: 1 addition & 3 deletions ctypes-foreign.opam
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ homepage: "https://github.com/yallop/ocaml-ctypes"
doc: "https://yallop.github.io/ocaml-ctypes/"
bug-reports: "https://github.com/yallop/ocaml-ctypes/issues"
depends: [
"dune" {>= "2.9"}
"dune" {>= "3.9"}
"ocaml" {>= "4.03.0"}
"integers" {with-test & >= "0.2.2"}
"ctypes" {= version}
Expand All @@ -36,12 +36,10 @@ build: [
name
"-j"
jobs
"--promote-install-files=false"
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
["dune" "install" "-p" name "--create-install-files" name]
]
dev-repo: "git+https://github.com/yallop/ocaml-ctypes.git"
x-maintenance-intent: ["(any).(any).(latest)"]
4 changes: 1 addition & 3 deletions ctypes.opam
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ homepage: "https://github.com/yallop/ocaml-ctypes"
doc: "https://yallop.github.io/ocaml-ctypes/"
bug-reports: "https://github.com/yallop/ocaml-ctypes/issues"
depends: [
"dune" {>= "2.9"}
"dune" {>= "3.9"}
"ocaml" {>= "4.03.0"}
"integers"
"dune-configurator"
Expand All @@ -45,12 +45,10 @@ build: [
name
"-j"
jobs
"--promote-install-files=false"
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
["dune" "install" "-p" name "--create-install-files" name]
]
dev-repo: "git+https://github.com/yallop/ocaml-ctypes.git"
x-maintenance-intent: ["(any).(any).(latest)"]
2 changes: 1 addition & 1 deletion dune
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(env
(dev
(flags
(:standard -principal))))
(:standard -principal -w -67-69))))

(deprecated_library_name
(old_public_name "ctypes.foreign")
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.9)
(lang dune 3.9)
(name ctypes)
(version 0.23.0)
(formatting (enabled_for dune))
Expand Down
10 changes: 1 addition & 9 deletions examples/fts/stub-generation/dune
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
(* -*- tuareg -*- *)

(* This can be ported to build_if once available, ocaml/dune#7899 *)

let unix = List.mem ("os_type", "Unix") Jbuild_plugin.V1.ocamlc_config

let () = Jbuild_plugin.V1.send @@ if not unix then "" else {|
(test
(name fts_cmd)
(enabled_if
(build_if
(= %{os_type} Unix))
(libraries fts_stubs fts_generated)
(package ctypes)
(action (progn))
(link_flags
:standard
(:include config/c_library_flags.sexp)))
|}
1 change: 0 additions & 1 deletion tests/test-bigarrays/test_bigarrays.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*)

module Std_array = Array
type 'a std_array = 'a array

let _ = Dl.(dlopen ~filename:"../clib/clib.so" ~flags:[RTLD_NOW])

Expand Down

0 comments on commit d1d47ad

Please sign in to comment.