From 45f8d820902ac507cb7230d4e7864e2f2adde3d3 Mon Sep 17 00:00:00 2001 From: Jeremy Yallop Date: Sat, 11 Jul 2020 10:40:23 +0100 Subject: [PATCH] Remove the threaded/unthreaded split in ctypes-foreign. --- .depend | 77 +++-- .gitignore | 4 +- .merlin | 7 +- META | 41 +-- Makefile | 81 ++---- Makefile.examples | 22 +- Makefile.tests | 274 +++++++++--------- .../ctypes_gc_mutex.ml | 33 --- src/ctypes-foreign-unthreaded/foreign.ml | 8 - src/ctypes-foreign-unthreaded/foreign.mli | 188 ------------ .../ctypes_closure_properties.ml | 0 .../ctypes_closure_properties.mli | 0 .../ctypes_ffi.ml | 0 .../ctypes_ffi.mli | 0 .../ctypes_ffi_stubs.ml | 0 .../ctypes_foreign_basis.ml | 0 .../ctypes_foreign_threaded_stubs.ml | 0 .../ctypes_weak_ref.ml | 0 .../ctypes_weak_ref.mli | 0 .../dl.ml.unix | 0 .../dl.ml.win | 0 .../dl.mli | 0 .../dl_stubs.c.unix | 0 .../dl_stubs.c.win | 0 .../ffi_call_stubs.c | 0 .../ffi_type_stubs.c | 0 .../foreign.ml | 0 .../foreign.mli | 0 .../foreign_threaded_stubs.c | 0 .../libffi_abi.mli | 0 30 files changed, 221 insertions(+), 514 deletions(-) delete mode 100644 src/ctypes-foreign-unthreaded/ctypes_gc_mutex.ml delete mode 100644 src/ctypes-foreign-unthreaded/foreign.ml delete mode 100644 src/ctypes-foreign-unthreaded/foreign.mli rename src/{ctypes-foreign-base => ctypes-foreign}/ctypes_closure_properties.ml (100%) rename src/{ctypes-foreign-base => ctypes-foreign}/ctypes_closure_properties.mli (100%) rename src/{ctypes-foreign-base => ctypes-foreign}/ctypes_ffi.ml (100%) rename src/{ctypes-foreign-base => ctypes-foreign}/ctypes_ffi.mli (100%) rename src/{ctypes-foreign-base => ctypes-foreign}/ctypes_ffi_stubs.ml (100%) rename src/{ctypes-foreign-base => ctypes-foreign}/ctypes_foreign_basis.ml (100%) rename src/{ctypes-foreign-threaded => ctypes-foreign}/ctypes_foreign_threaded_stubs.ml (100%) rename src/{ctypes-foreign-base => ctypes-foreign}/ctypes_weak_ref.ml (100%) rename src/{ctypes-foreign-base => ctypes-foreign}/ctypes_weak_ref.mli (100%) rename src/{ctypes-foreign-base => ctypes-foreign}/dl.ml.unix (100%) rename src/{ctypes-foreign-base => ctypes-foreign}/dl.ml.win (100%) rename src/{ctypes-foreign-base => ctypes-foreign}/dl.mli (100%) rename src/{ctypes-foreign-base => ctypes-foreign}/dl_stubs.c.unix (100%) rename src/{ctypes-foreign-base => ctypes-foreign}/dl_stubs.c.win (100%) rename src/{ctypes-foreign-base => ctypes-foreign}/ffi_call_stubs.c (100%) rename src/{ctypes-foreign-base => ctypes-foreign}/ffi_type_stubs.c (100%) rename src/{ctypes-foreign-threaded => ctypes-foreign}/foreign.ml (100%) rename src/{ctypes-foreign-threaded => ctypes-foreign}/foreign.mli (100%) rename src/{ctypes-foreign-threaded => ctypes-foreign}/foreign_threaded_stubs.c (100%) rename src/{ctypes-foreign-base => ctypes-foreign}/libffi_abi.mli (100%) diff --git a/.depend b/.depend index f29ec30e..1df8a518 100644 --- a/.depend +++ b/.depend @@ -2,13 +2,13 @@ _build/examples/cstubs_structs/bindings.cmo : _build/src/ctypes/ctypes.cmi _buil _build/examples/cstubs_structs/bindings.cmx : _build/src/ctypes/ctypes.cmx _build/src/cstubs/cstubs_structs.cmx _build/examples/cstubs_structs/bindings_c_gen.cmo : _build/src/cstubs/cstubs_structs.cmi _build/examples/cstubs_structs/bindings_c_gen.cmx : _build/src/cstubs/cstubs_structs.cmx -_build/examples/cstubs_structs/main.cmo : _build/src/ctypes/posixTypes.cmi _build/src/ctypes-foreign-threaded/foreign.cmi _build/src/ctypes/ctypes.cmi -_build/examples/cstubs_structs/main.cmx : _build/src/ctypes/posixTypes.cmx _build/src/ctypes-foreign-threaded/foreign.cmx _build/src/ctypes/ctypes.cmx +_build/examples/cstubs_structs/main.cmo : _build/src/ctypes/posixTypes.cmi _build/src/ctypes-foreign/foreign.cmi _build/src/ctypes/ctypes.cmi +_build/examples/cstubs_structs/main.cmx : _build/src/ctypes/posixTypes.cmx _build/src/ctypes-foreign/foreign.cmx _build/src/ctypes/ctypes.cmx _build/examples/cstubs_structs/myocamlbuild.cmo : _build/examples/cstubs_structs/myocamlbuild.cmx : _build/examples/date/foreign/date.cmi : _build/src/ctypes/posixTypes.cmi _build/src/ctypes/ctypes.cmi -_build/examples/date/foreign/date.cmo : _build/src/ctypes/posixTypes.cmi _build/src/ctypes-foreign-threaded/foreign.cmi _build/src/ctypes/ctypes.cmi _build/examples/date/foreign/date.cmi -_build/examples/date/foreign/date.cmx : _build/src/ctypes/posixTypes.cmx _build/src/ctypes-foreign-threaded/foreign.cmx _build/src/ctypes/ctypes.cmx _build/examples/date/foreign/date.cmi +_build/examples/date/foreign/date.cmo : _build/src/ctypes/posixTypes.cmi _build/src/ctypes-foreign/foreign.cmi _build/src/ctypes/ctypes.cmi _build/examples/date/foreign/date.cmi +_build/examples/date/foreign/date.cmx : _build/src/ctypes/posixTypes.cmx _build/src/ctypes-foreign/foreign.cmx _build/src/ctypes/ctypes.cmx _build/examples/date/foreign/date.cmi _build/examples/date/stub-generation/bindings/date_stubs.cmo : _build/src/ctypes/posixTypes.cmi _build/src/ctypes/ctypes.cmi _build/examples/date/stub-generation/bindings/date_stubs.cmx : _build/src/ctypes/posixTypes.cmx _build/src/ctypes/ctypes.cmx _build/examples/date/stub-generation/date_cmd.cmo : _build/src/ctypes/posixTypes.cmi _build/src/ctypes/ctypes.cmi @@ -16,15 +16,15 @@ _build/examples/date/stub-generation/date_cmd.cmx : _build/src/ctypes/posixTypes _build/examples/date/stub-generation/stub-generator/date_stub_generator.cmo : _build/src/cstubs/cstubs.cmi _build/examples/date/stub-generation/stub-generator/date_stub_generator.cmx : _build/src/cstubs/cstubs.cmx _build/examples/fts/foreign/fts.cmi : _build/src/ctypes/posixTypes.cmi _build/src/ctypes/ctypes.cmi -_build/examples/fts/foreign/fts.cmo : _build/src/ctypes/posixTypes.cmi _build/src/ctypes-foreign-threaded/foreign.cmi _build/src/ctypes/ctypes_coerce.cmi _build/src/ctypes/ctypes.cmi _build/examples/fts/foreign/fts.cmi -_build/examples/fts/foreign/fts.cmx : _build/src/ctypes/posixTypes.cmx _build/src/ctypes-foreign-threaded/foreign.cmx _build/src/ctypes/ctypes_coerce.cmx _build/src/ctypes/ctypes.cmx _build/examples/fts/foreign/fts.cmi +_build/examples/fts/foreign/fts.cmo : _build/src/ctypes/posixTypes.cmi _build/src/ctypes-foreign/foreign.cmi _build/src/ctypes/ctypes_coerce.cmi _build/src/ctypes/ctypes.cmi _build/examples/fts/foreign/fts.cmi +_build/examples/fts/foreign/fts.cmx : _build/src/ctypes/posixTypes.cmx _build/src/ctypes-foreign/foreign.cmx _build/src/ctypes/ctypes_coerce.cmx _build/src/ctypes/ctypes.cmx _build/examples/fts/foreign/fts.cmi _build/examples/fts/foreign/fts_cmd.cmo : _build/src/ctypes/ctypes.cmi _build/examples/fts/foreign/fts_cmd.cmx : _build/src/ctypes/ctypes.cmx _build/examples/fts/stub-generation/bindings/fts.cmi : _build/src/ctypes/ctypes.cmi _build/examples/fts/stub-generation/bindings/fts_bindings.cmo : _build/src/ctypes/ctypes.cmi _build/examples/fts/stub-generation/bindings/fts_bindings.cmx : _build/src/ctypes/ctypes.cmx -_build/examples/fts/stub-generation/bindings/fts_types.cmo : _build/src/ctypes/posixTypes.cmi _build/src/ctypes-foreign-threaded/foreign.cmi _build/src/ctypes/ctypes_coerce.cmi _build/src/ctypes/ctypes.cmi -_build/examples/fts/stub-generation/bindings/fts_types.cmx : _build/src/ctypes/posixTypes.cmx _build/src/ctypes-foreign-threaded/foreign.cmx _build/src/ctypes/ctypes_coerce.cmx _build/src/ctypes/ctypes.cmx +_build/examples/fts/stub-generation/bindings/fts_types.cmo : _build/src/ctypes/posixTypes.cmi _build/src/ctypes-foreign/foreign.cmi _build/src/ctypes/ctypes_coerce.cmi _build/src/ctypes/ctypes.cmi +_build/examples/fts/stub-generation/bindings/fts_types.cmx : _build/src/ctypes/posixTypes.cmx _build/src/ctypes-foreign/foreign.cmx _build/src/ctypes/ctypes_coerce.cmx _build/src/ctypes/ctypes.cmx _build/examples/fts/stub-generation/fts_cmd.cmo : _build/src/ctypes/ctypes.cmi _build/examples/fts/stub-generation/fts_cmd.cmx : _build/src/ctypes/ctypes.cmx _build/examples/fts/stub-generation/fts_if.cmo : _build/src/ctypes/ctypes.cmi @@ -32,8 +32,8 @@ _build/examples/fts/stub-generation/fts_if.cmx : _build/src/ctypes/ctypes.cmx _build/examples/fts/stub-generation/stub-generator/fts_stub_generator.cmo : _build/src/cstubs/cstubs.cmi _build/examples/fts/stub-generation/stub-generator/fts_stub_generator.cmx : _build/src/cstubs/cstubs.cmx _build/examples/ncurses/foreign/ncurses.cmi : -_build/examples/ncurses/foreign/ncurses.cmo : _build/src/ctypes-foreign-threaded/foreign.cmi _build/src/ctypes/ctypes.cmi _build/examples/ncurses/foreign/ncurses.cmi -_build/examples/ncurses/foreign/ncurses.cmx : _build/src/ctypes-foreign-threaded/foreign.cmx _build/src/ctypes/ctypes.cmx _build/examples/ncurses/foreign/ncurses.cmi +_build/examples/ncurses/foreign/ncurses.cmo : _build/src/ctypes-foreign/foreign.cmi _build/src/ctypes/ctypes.cmi _build/examples/ncurses/foreign/ncurses.cmi +_build/examples/ncurses/foreign/ncurses.cmx : _build/src/ctypes-foreign/foreign.cmx _build/src/ctypes/ctypes.cmx _build/examples/ncurses/foreign/ncurses.cmi _build/examples/ncurses/foreign/ncurses_cmd.cmo : _build/examples/ncurses/foreign/ncurses_cmd.cmx : _build/examples/ncurses/stub-generation/bindings/ncurses_bindings.cmo : _build/src/ctypes/ctypes.cmi @@ -43,8 +43,8 @@ _build/examples/ncurses/stub-generation/ncurses_stub_cmd.cmx : _build/examples/ncurses/stub-generation/stub-generator/ncurses_stub_generator.cmo : _build/src/cstubs/cstubs.cmi _build/examples/ncurses/stub-generation/stub-generator/ncurses_stub_generator.cmx : _build/src/cstubs/cstubs.cmx _build/examples/sigset/sigset.cmi : _build/src/ctypes/posixTypes.cmi _build/src/ctypes/ctypes.cmi -_build/examples/sigset/sigset.cmo : _build/src/ctypes/posixTypes.cmi _build/src/ctypes-foreign-threaded/foreign.cmi _build/src/ctypes/ctypes.cmi _build/examples/sigset/sigset.cmi -_build/examples/sigset/sigset.cmx : _build/src/ctypes/posixTypes.cmx _build/src/ctypes-foreign-threaded/foreign.cmx _build/src/ctypes/ctypes.cmx _build/examples/sigset/sigset.cmi +_build/examples/sigset/sigset.cmo : _build/src/ctypes/posixTypes.cmi _build/src/ctypes-foreign/foreign.cmi _build/src/ctypes/ctypes.cmi _build/examples/sigset/sigset.cmi +_build/examples/sigset/sigset.cmx : _build/src/ctypes/posixTypes.cmx _build/src/ctypes-foreign/foreign.cmx _build/src/ctypes/ctypes.cmx _build/examples/sigset/sigset.cmi _build/src/configure/extract_from_c.cmo : _build/src/configure/extract_from_c.cmx : _build/src/configure/gen_c_primitives.cmo : @@ -82,35 +82,30 @@ _build/src/cstubs/cstubs_structs.cmx : _build/src/ctypes/ctypes_types.cmi _build _build/src/cstubs/ctypes_path.cmi : _build/src/cstubs/ctypes_path.cmo : _build/src/cstubs/ctypes_path.cmi _build/src/cstubs/ctypes_path.cmx : _build/src/cstubs/ctypes_path.cmi -_build/src/ctypes-foreign-base/ctypes_closure_properties.cmi : -_build/src/ctypes-foreign-base/ctypes_closure_properties.cmo : _build/src/ctypes-foreign-base/ctypes_closure_properties.cmi -_build/src/ctypes-foreign-base/ctypes_closure_properties.cmx : _build/src/ctypes-foreign-base/ctypes_closure_properties.cmi -_build/src/ctypes-foreign-base/ctypes_ffi.cmi : _build/src/ctypes-foreign-base/libffi_abi.cmi _build/src/ctypes/ctypes_static.cmi -_build/src/ctypes-foreign-base/ctypes_ffi.cmo : _build/src/ctypes-foreign-base/libffi_abi.cmi _build/src/ctypes-foreign-base/ctypes_weak_ref.cmi _build/src/ctypes/ctypes_type_printing.cmi _build/src/ctypes/ctypes_static.cmi _build/src/ctypes/ctypes_ptr.cmo _build/src/ctypes/ctypes_primitives.cmo _build/src/ctypes/ctypes_primitive_types.cmi _build/src/ctypes/ctypes_memory_stubs.cmo _build/src/ctypes/ctypes_memory.cmo _build/src/ctypes-foreign-base/ctypes_ffi_stubs.cmo _build/src/ctypes-foreign-base/ctypes_ffi.cmi -_build/src/ctypes-foreign-base/ctypes_ffi.cmx : _build/src/ctypes-foreign-base/libffi_abi.cmx _build/src/ctypes-foreign-base/ctypes_weak_ref.cmx _build/src/ctypes/ctypes_type_printing.cmx _build/src/ctypes/ctypes_static.cmx _build/src/ctypes/ctypes_ptr.cmx _build/src/ctypes/ctypes_primitives.cmx _build/src/ctypes/ctypes_primitive_types.cmx _build/src/ctypes/ctypes_memory_stubs.cmx _build/src/ctypes/ctypes_memory.cmx _build/src/ctypes-foreign-base/ctypes_ffi_stubs.cmx _build/src/ctypes-foreign-base/ctypes_ffi.cmi -_build/src/ctypes-foreign-base/ctypes_ffi_stubs.cmo : _build/src/ctypes/ctypes_static.cmi _build/src/ctypes/ctypes_ptr.cmo _build/src/ctypes/ctypes_primitive_types.cmi -_build/src/ctypes-foreign-base/ctypes_ffi_stubs.cmx : _build/src/ctypes/ctypes_static.cmx _build/src/ctypes/ctypes_ptr.cmx _build/src/ctypes/ctypes_primitive_types.cmx -_build/src/ctypes-foreign-base/ctypes_foreign_basis.cmo : _build/src/ctypes-foreign-base/libffi_abi.cmi _build/src/ctypes-foreign-base/dl.cmi _build/src/ctypes/ctypes_std_views.cmo _build/src/ctypes/ctypes_static.cmi _build/src/ctypes/ctypes_ptr.cmo _build/src/ctypes-foreign-base/ctypes_ffi_stubs.cmo _build/src/ctypes-foreign-base/ctypes_ffi.cmi _build/src/ctypes/ctypes_coerce.cmi _build/src/ctypes/ctypes.cmi -_build/src/ctypes-foreign-base/ctypes_foreign_basis.cmx : _build/src/ctypes-foreign-base/libffi_abi.cmx _build/src/ctypes-foreign-base/dl.cmx _build/src/ctypes/ctypes_std_views.cmx _build/src/ctypes/ctypes_static.cmx _build/src/ctypes/ctypes_ptr.cmx _build/src/ctypes-foreign-base/ctypes_ffi_stubs.cmx _build/src/ctypes-foreign-base/ctypes_ffi.cmx _build/src/ctypes/ctypes_coerce.cmx _build/src/ctypes/ctypes.cmx -_build/src/ctypes-foreign-base/ctypes_weak_ref.cmi : -_build/src/ctypes-foreign-base/ctypes_weak_ref.cmo : _build/src/ctypes-foreign-base/ctypes_weak_ref.cmi -_build/src/ctypes-foreign-base/ctypes_weak_ref.cmx : _build/src/ctypes-foreign-base/ctypes_weak_ref.cmi -_build/src/ctypes-foreign-base/dl.cmi : -_build/src/ctypes-foreign-base/dl.cmo : _build/src/ctypes-foreign-base/dl.cmi -_build/src/ctypes-foreign-base/dl.cmx : _build/src/ctypes-foreign-base/dl.cmi -_build/src/ctypes-foreign-base/libffi_abi.cmi : -_build/src/ctypes-foreign-base/libffi_abi.cmo : _build/src/ctypes/ctypes.cmi _build/src/ctypes-foreign-base/libffi_abi.cmi -_build/src/ctypes-foreign-base/libffi_abi.cmx : _build/src/ctypes/ctypes.cmx _build/src/ctypes-foreign-base/libffi_abi.cmi -_build/src/ctypes-foreign-threaded/ctypes_foreign_threaded_stubs.cmo : -_build/src/ctypes-foreign-threaded/ctypes_foreign_threaded_stubs.cmx : -_build/src/ctypes-foreign-threaded/foreign.cmi : _build/src/ctypes-foreign-base/libffi_abi.cmi _build/src/ctypes-foreign-base/dl.cmi _build/src/ctypes/ctypes.cmi -_build/src/ctypes-foreign-threaded/foreign.cmo : _build/src/ctypes-foreign-threaded/ctypes_foreign_threaded_stubs.cmo _build/src/ctypes-foreign-base/ctypes_foreign_basis.cmo _build/src/ctypes-foreign-base/ctypes_closure_properties.cmi _build/src/ctypes-foreign-threaded/foreign.cmi -_build/src/ctypes-foreign-threaded/foreign.cmx : _build/src/ctypes-foreign-threaded/ctypes_foreign_threaded_stubs.cmx _build/src/ctypes-foreign-base/ctypes_foreign_basis.cmx _build/src/ctypes-foreign-base/ctypes_closure_properties.cmx _build/src/ctypes-foreign-threaded/foreign.cmi -_build/src/ctypes-foreign-unthreaded/ctypes_gc_mutex.cmo : -_build/src/ctypes-foreign-unthreaded/ctypes_gc_mutex.cmx : -_build/src/ctypes-foreign-unthreaded/foreign.cmi : _build/src/ctypes-foreign-base/libffi_abi.cmi _build/src/ctypes-foreign-base/dl.cmi _build/src/ctypes/ctypes.cmi -_build/src/ctypes-foreign-unthreaded/foreign.cmo : _build/src/ctypes-foreign-unthreaded/ctypes_gc_mutex.cmo _build/src/ctypes-foreign-base/ctypes_foreign_basis.cmo _build/src/ctypes-foreign-base/ctypes_closure_properties.cmi _build/src/ctypes-foreign-unthreaded/foreign.cmi -_build/src/ctypes-foreign-unthreaded/foreign.cmx : _build/src/ctypes-foreign-unthreaded/ctypes_gc_mutex.cmx _build/src/ctypes-foreign-base/ctypes_foreign_basis.cmx _build/src/ctypes-foreign-base/ctypes_closure_properties.cmx _build/src/ctypes-foreign-unthreaded/foreign.cmi +_build/src/ctypes-foreign/ctypes_closure_properties.cmi : +_build/src/ctypes-foreign/ctypes_closure_properties.cmo : _build/src/ctypes-foreign/ctypes_closure_properties.cmi +_build/src/ctypes-foreign/ctypes_closure_properties.cmx : _build/src/ctypes-foreign/ctypes_closure_properties.cmi +_build/src/ctypes-foreign/ctypes_ffi.cmi : _build/src/ctypes-foreign/libffi_abi.cmi _build/src/ctypes/ctypes_static.cmi +_build/src/ctypes-foreign/ctypes_ffi.cmo : _build/src/ctypes-foreign/libffi_abi.cmi _build/src/ctypes-foreign/ctypes_weak_ref.cmi _build/src/ctypes/ctypes_type_printing.cmi _build/src/ctypes/ctypes_static.cmi _build/src/ctypes/ctypes_ptr.cmo _build/src/ctypes/ctypes_primitives.cmo _build/src/ctypes/ctypes_primitive_types.cmi _build/src/ctypes/ctypes_memory_stubs.cmo _build/src/ctypes/ctypes_memory.cmo _build/src/ctypes-foreign/ctypes_ffi_stubs.cmo _build/src/ctypes-foreign/ctypes_ffi.cmi +_build/src/ctypes-foreign/ctypes_ffi.cmx : _build/src/ctypes-foreign/libffi_abi.cmx _build/src/ctypes-foreign/ctypes_weak_ref.cmx _build/src/ctypes/ctypes_type_printing.cmx _build/src/ctypes/ctypes_static.cmx _build/src/ctypes/ctypes_ptr.cmx _build/src/ctypes/ctypes_primitives.cmx _build/src/ctypes/ctypes_primitive_types.cmx _build/src/ctypes/ctypes_memory_stubs.cmx _build/src/ctypes/ctypes_memory.cmx _build/src/ctypes-foreign/ctypes_ffi_stubs.cmx _build/src/ctypes-foreign/ctypes_ffi.cmi +_build/src/ctypes-foreign/ctypes_ffi_stubs.cmo : _build/src/ctypes/ctypes_static.cmi _build/src/ctypes/ctypes_ptr.cmo _build/src/ctypes/ctypes_primitive_types.cmi +_build/src/ctypes-foreign/ctypes_ffi_stubs.cmx : _build/src/ctypes/ctypes_static.cmx _build/src/ctypes/ctypes_ptr.cmx _build/src/ctypes/ctypes_primitive_types.cmx +_build/src/ctypes-foreign/ctypes_foreign_basis.cmo : _build/src/ctypes-foreign/libffi_abi.cmi _build/src/ctypes-foreign/dl.cmi _build/src/ctypes/ctypes_std_views.cmo _build/src/ctypes/ctypes_static.cmi _build/src/ctypes/ctypes_ptr.cmo _build/src/ctypes-foreign/ctypes_ffi_stubs.cmo _build/src/ctypes-foreign/ctypes_ffi.cmi _build/src/ctypes/ctypes_coerce.cmi _build/src/ctypes/ctypes.cmi +_build/src/ctypes-foreign/ctypes_foreign_basis.cmx : _build/src/ctypes-foreign/libffi_abi.cmx _build/src/ctypes-foreign/dl.cmx _build/src/ctypes/ctypes_std_views.cmx _build/src/ctypes/ctypes_static.cmx _build/src/ctypes/ctypes_ptr.cmx _build/src/ctypes-foreign/ctypes_ffi_stubs.cmx _build/src/ctypes-foreign/ctypes_ffi.cmx _build/src/ctypes/ctypes_coerce.cmx _build/src/ctypes/ctypes.cmx +_build/src/ctypes-foreign/ctypes_weak_ref.cmi : +_build/src/ctypes-foreign/ctypes_weak_ref.cmo : _build/src/ctypes-foreign/ctypes_weak_ref.cmi +_build/src/ctypes-foreign/ctypes_weak_ref.cmx : _build/src/ctypes-foreign/ctypes_weak_ref.cmi +_build/src/ctypes-foreign/dl.cmi : +_build/src/ctypes-foreign/dl.cmo : _build/src/ctypes-foreign/dl.cmi +_build/src/ctypes-foreign/dl.cmx : _build/src/ctypes-foreign/dl.cmi +_build/src/ctypes-foreign/libffi_abi.cmi : +_build/src/ctypes-foreign/libffi_abi.cmo : _build/src/ctypes/ctypes.cmi _build/src/ctypes-foreign/libffi_abi.cmi +_build/src/ctypes-foreign/libffi_abi.cmx : _build/src/ctypes/ctypes.cmx _build/src/ctypes-foreign/libffi_abi.cmi +_build/src/ctypes-foreign/ctypes_foreign_threaded_stubs.cmo : +_build/src/ctypes-foreign/ctypes_foreign_threaded_stubs.cmx : +_build/src/ctypes-foreign/foreign.cmi : _build/src/ctypes-foreign/libffi_abi.cmi _build/src/ctypes-foreign/dl.cmi _build/src/ctypes/ctypes.cmi +_build/src/ctypes-foreign/foreign.cmo : _build/src/ctypes-foreign/ctypes_foreign_threaded_stubs.cmo _build/src/ctypes-foreign/ctypes_foreign_basis.cmo _build/src/ctypes-foreign/ctypes_closure_properties.cmi _build/src/ctypes-foreign/foreign.cmi +_build/src/ctypes-foreign/foreign.cmx : _build/src/ctypes-foreign/ctypes_foreign_threaded_stubs.cmx _build/src/ctypes-foreign/ctypes_foreign_basis.cmx _build/src/ctypes-foreign/ctypes_closure_properties.cmx _build/src/ctypes-foreign/foreign.cmi _build/src/ctypes-top/ctypes_printers.cmi : _build/src/ctypes/posixTypes.cmi _build/src/ctypes/lDouble.cmi _build/src/ctypes/ctypes.cmi _build/src/ctypes/complexL.cmi _build/src/ctypes-top/ctypes_printers.cmo : _build/src/ctypes/posixTypes.cmi _build/src/ctypes/lDouble.cmi _build/src/ctypes/ctypes_static.cmi _build/src/ctypes/ctypes.cmi _build/src/ctypes/complexL.cmi _build/src/ctypes-top/ctypes_printers.cmi _build/src/ctypes-top/ctypes_printers.cmx : _build/src/ctypes/posixTypes.cmx _build/src/ctypes/lDouble.cmx _build/src/ctypes/ctypes_static.cmx _build/src/ctypes/ctypes.cmx _build/src/ctypes/complexL.cmx _build/src/ctypes-top/ctypes_printers.cmi diff --git a/.gitignore b/.gitignore index 908e18b6..b80a2984 100644 --- a/.gitignore +++ b/.gitignore @@ -10,8 +10,8 @@ gen_libffi_abi.log src/ctypes/ctypes_primitives.ml src/ctypes_config.h src/ctypes_config.ml -src/ctypes-foreign-base/dl_stubs.c -src/ctypes-foreign-base/dl.ml +src/ctypes-foreign/dl_stubs.c +src/ctypes-foreign/dl.ml src/discover/commands.cm* src/discover/discover.cm* src/configure/extract_from_c.cm* diff --git a/.merlin b/.merlin index 6629efc8..531c8496 100644 --- a/.merlin +++ b/.merlin @@ -5,20 +5,15 @@ S src/libffi-abigen S src/discover S src/ctypes S src/ctypes-top -S src/ctypes-foreign-threaded S src/configure -S src/ctypes-foreign-base S src/ctypes-foreign -S src/ctypes-foreign-unthreaded B _build B _build/src B _build/src/cstubs B _build/src/libffi-abigen B _build/src/ctypes B _build/src/ctypes-top -B _build/src/ctypes-foreign-threaded B _build/src/configure -B _build/src/ctypes-foreign-base -B _build/src/ctypes-foreign-unthreaded +B _build/src/ctypes-foreign PKG bytes PKG integers diff --git a/META b/META index 9f665517..3162265a 100644 --- a/META +++ b/META @@ -34,39 +34,10 @@ package "stubs" ( package "foreign" ( version = "0.17.1" description = "Dynamic linking of C functions" - requires(-mt) = "ctypes.foreign.unthreaded" - requires(mt) = "ctypes.foreign.threaded" - - package "base" ( - version = "0.17.1" - description = "Dynamic linking of C functions (base package)" - requires = "ctypes" - archive(byte) = "ctypes-foreign-base.cma" - archive(byte, plugin) = "ctypes-foreign-base.cma" - archive(native) = "ctypes-foreign-base.cmxa" - archive(native, plugin) = "ctypes-foreign-base.cmxs" - exists_if = "ctypes-foreign-base.cma" - ) - - package "threaded" ( - version = "0.17.1" - description = "Dynamic linking of C functions (for use in threaded programs)" - requires = "threads ctypes ctypes.foreign.base" - archive(byte) = "ctypes-foreign-threaded.cma" - archive(byte, plugin) = "ctypes-foreign-threaded.cma" - archive(native) = "ctypes-foreign-threaded.cmxa" - archive(native, plugin) = "ctypes-foreign-threaded.cmxs" - exists_if = "ctypes-foreign-threaded.cma" - ) - - package "unthreaded" ( - version = "0.17.1" - description = "Dynamic linking of C functions (for use in unthreaded programs)" - requires = "ctypes ctypes.foreign.base" - archive(byte) = "ctypes-foreign-unthreaded.cma" - archive(byte, plugin) = "ctypes-foreign-unthreaded.cma" - archive(native) = "ctypes-foreign-unthreaded.cmxa" - archive(native, plugin) = "ctypes-foreign-unthreaded.cmxs" - exists_if = "ctypes-foreign-unthreaded.cma" - ) + requires = "threads ctypes" + archive(byte) = "ctypes-foreign.cma" + archive(byte, plugin) = "ctypes-foreign.cma" + archive(native) = "ctypes-foreign.cmxa" + archive(native, plugin) = "ctypes-foreign.cmxs" + exists_if = "ctypes-foreign.cma" ) diff --git a/Makefile b/Makefile index 4edd3381..4ddab7a3 100644 --- a/Makefile +++ b/Makefile @@ -13,14 +13,14 @@ OCAMLMKLIB=$(OCAMLFIND) ocamlmklib VPATH=src examples BUILDDIR=_build BASE_PROJECTS=configure libffi-abigen configured ctypes ctypes-top -FOREIGN_PROJECTS=test-libffi ctypes-foreign-base ctypes-foreign-threaded ctypes-foreign-unthreaded +FOREIGN_PROJECTS=test-libffi ctypes-foreign STUB_PROJECTS=cstubs PROJECTS=$(BASE_PROJECTS) $(FOREIGN_PROJECTS) $(STUB_PROJECTS) DEP_DIRS=$(foreach project,$(PROJECTS),$($(project).dir)) GENERATED=src/ctypes/ctypes_primitives.ml \ - src/ctypes-foreign-base/libffi_abi.ml \ - src/ctypes-foreign-base/dl.ml \ - src/ctypes-foreign-base/dl_stubs.c \ + src/ctypes-foreign/libffi_abi.ml \ + src/ctypes-foreign/dl.ml \ + src/ctypes-foreign/dl_stubs.c \ libffi.config \ asneeded.config \ discover \ @@ -89,52 +89,23 @@ cstubs.extra_hs = $(package_integers_path)/ocaml_integers.h cstubs: PROJECT=cstubs cstubs: $(cstubs.dir)/$(cstubs.extra_mls) $$(LIB_TARGETS) -# ctypes-foreign-base subproject -ctypes-foreign-base.public = dl libffi_abi -ctypes-foreign-base.install = yes -ctypes-foreign-base.install_native_objects = yes -ctypes-foreign-base.threads = no -ctypes-foreign-base.dir = src/ctypes-foreign-base -ctypes-foreign-base.deps = integers -ctypes-foreign-base.subproject_deps = ctypes -ctypes-foreign-base.extra_mls = libffi_abi.ml dl.ml -ctypes-foreign-base.extra_cs = dl_stubs.c -ctypes-foreign-base.link_flags = $(libffi_lib) $(lib_process) -ctypes-foreign-base.cmo_opts = $(OCAML_FFI_INCOPTS:%=-ccopt %) -ctypes-foreign-base.cmx_opts = $(OCAML_FFI_INCOPTS:%=-ccopt %) - -ctypes-foreign-base: PROJECT=ctypes-foreign-base -ctypes-foreign-base: $$(LIB_TARGETS) - -# ctypes-foreign-threaded subproject -ctypes-foreign-threaded.public = foreign -ctypes-foreign-threaded.install = yes -ctypes-foreign-threaded.threads = yes -ctypes-foreign-threaded.dir = src/ctypes-foreign-threaded -ctypes-foreign-threaded.subproject_deps = ctypes ctypes-foreign-base -ctypes-foreign-threaded.link_flags = $(libffi_lib) $(lib_process) -ctypes-foreign-threaded.cmo_opts = $(OCAML_FFI_INCOPTS:%=-ccopt %) -ctypes-foreign-threaded.cmx_opts = $(OCAML_FFI_INCOPTS:%=-ccopt %) -ctypes-foreign-threaded.cmi_opts = $(OPAQUE) $(NO_KEEP_LOCS) -ctypes-foreign-threaded.install_native_objects = no - -ctypes-foreign-threaded: PROJECT=ctypes-foreign-threaded -ctypes-foreign-threaded: $$(LIB_TARGETS) - -# ctypes-foreign-unthreaded subproject -ctypes-foreign-unthreaded.public = foreign -ctypes-foreign-unthreaded.install = yes -ctypes-foreign-unthreaded.threads = no -ctypes-foreign-unthreaded.dir = src/ctypes-foreign-unthreaded -ctypes-foreign-unthreaded.subproject_deps = ctypes ctypes-foreign-base -ctypes-foreign-unthreaded.link_flags = $(libffi_lib) $(lib_process) -ctypes-foreign-unthreaded.cmo_opts = $(OCAML_FFI_INCOPTS:%=-ccopt %) -ctypes-foreign-unthreaded.cmx_opts = $(OCAML_FFI_INCOPTS:%=-ccopt %) -ctypes-foreign-unthreaded.cmi_opts = $(OPAQUE) $(NO_KEEP_LOCS) -ctypes-foreign-unthreaded.install_native_objects = no - -ctypes-foreign-unthreaded: PROJECT=ctypes-foreign-unthreaded -ctypes-foreign-unthreaded: $$(LIB_TARGETS) +# ctypes-foreign subproject +ctypes-foreign.public = dl libffi_abi foreign +ctypes-foreign.dir = src/ctypes-foreign +ctypes-foreign.subproject_deps = ctypes +ctypes-foreign.deps = integers +ctypes-foreign.install = yes +ctypes-foreign.install_native_objects = yes +ctypes-foreign.extra_cs = dl_stubs.c +ctypes-foreign.extra_mls = libffi_abi.ml dl.ml +ctypes-foreign.cmi_opts = $(OPAQUE) $(NO_KEEP_LOCS) +ctypes-foreign.cmo_opts = $(OCAML_FFI_INCOPTS:%=-ccopt %) +ctypes-foreign.cmx_opts = $(OCAML_FFI_INCOPTS:%=-ccopt %) +ctypes-foreign.link_flags = $(libffi_lib) $(lib_process) +ctypes-foreign.threads = yes + +ctypes-foreign: PROJECT=ctypes-foreign +ctypes-foreign: $$(LIB_TARGETS) # ctypes-top subproject ctypes-top.public = ctypes_printers @@ -148,18 +119,18 @@ ctypes-top: PROJECT=ctypes-top ctypes-top: $$(LIB_TARGETS) # configuration -configured: src/ctypes/ctypes_primitives.ml src/ctypes-foreign-base/libffi_abi.ml src/ctypes-foreign-base/dl.ml src/ctypes-foreign-base/dl_stubs.c +configured: src/ctypes/ctypes_primitives.ml src/ctypes-foreign/libffi_abi.ml src/ctypes-foreign/dl.ml src/ctypes-foreign/dl_stubs.c -src/ctypes-foreign-base/dl.ml: src/ctypes-foreign-base/dl.ml$(OS_ALT_SUFFIX) +src/ctypes-foreign/dl.ml: src/ctypes-foreign/dl.ml$(OS_ALT_SUFFIX) cp $< $@ -src/ctypes-foreign-base/dl_stubs.c: src/ctypes-foreign-base/dl_stubs.c$(OS_ALT_SUFFIX) +src/ctypes-foreign/dl_stubs.c: src/ctypes-foreign/dl_stubs.c$(OS_ALT_SUFFIX) cp $< $@ src/ctypes/ctypes_primitives.ml: src/configure/extract_from_c.ml src/configure/gen_c_primitives.ml $(HOSTOCAMLFIND) ocamlc -o gen_c_primitives -package str -strict-sequence -linkpkg $^ -I src/configure ./gen_c_primitives > $@ 2> gen_c_primitives.log || (rm $@ && cat gen_c_primitives.log || false) -src/ctypes-foreign-base/libffi_abi.ml: src/configure/extract_from_c.ml src/configure/gen_libffi_abi.ml +src/ctypes-foreign/libffi_abi.ml: src/configure/extract_from_c.ml src/configure/gen_libffi_abi.ml $(HOSTOCAMLFIND) ocamlc -o gen_libffi_abi -package str -strict-sequence -linkpkg $^ -I src/configure ./gen_libffi_abi > $@ 2> gen_c_primitives.log || (rm $@ && cat gen_c_primitives.log || false) @@ -199,8 +170,6 @@ DOCFILES=$(foreach project,$(PROJECTS),\ $(foreach mli,$($(project).public),\ $($(project).dir)/$(mli).mli)) DOCFLAGS=-I $(shell ocamlfind query integers) $(foreach project,$(PROJECTS),-I $(BUILDDIR)/$($(project).dir)) -# Avoid passing duplicate interfaces to ocamldoc. -DOCFILES:=$(filter-out src/ctypes-foreign-threaded/foreign.mli,$(DOCFILES)) doc: ocamldoc -html $(DOCFLAGS) $(DOCFILES) diff --git a/Makefile.examples b/Makefile.examples index 2ee51d5e..89c6d2d3 100644 --- a/Makefile.examples +++ b/Makefile.examples @@ -3,25 +3,27 @@ # subproject: fts with stub generation fts-stubs.install = no fts-stubs.dir = examples/fts/stub-generation/bindings +fts-stubs.threads = yes fts-stubs.deps = integers -fts-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-unthreaded +fts-stubs.subproject_deps = ctypes ctypes-foreign fts-stubs: PROJECT=fts-stubs fts-stubs: $$(LIB_TARGETS) fts-stub-generator.install = no fts-stub-generator.dir = examples/fts/stub-generation/stub-generator +fts-stub-generator.threads = yes fts-stub-generator.deps = integers fts-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-unthreaded fts-stubs + ctypes-foreign fts-stubs fts-stub-generator.deps = str unix bigarray integers fts-stub-generator: PROJECT=fts-stub-generator fts-stub-generator: $$(NATIVE_TARGET) fts-cmd.install = no fts-cmd.dir = examples/fts/stub-generation +fts-cmd.threads = yes fts-cmd.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-unthreaded fts-stubs + ctypes-foreign fts-stubs fts-cmd.deps = str unix bigarray integers fts-cmd.extra_mls = fts_generated.ml fts-cmd.extra_cs = fts_stubs.c @@ -36,8 +38,9 @@ examples/fts/stub-generation/fts_generated.ml: fts-stub-generator # subproject: fts using dynamic linking (foreign) fts.install = no fts.dir = examples/fts/foreign +fts.threads = yes fts.deps = unix bigarray str integers -fts.subproject_deps = ctypes ctypes-foreign-base ctypes-foreign-unthreaded +fts.subproject_deps = ctypes ctypes-foreign fts: PROJECT=fts fts: $$(NATIVE_TARGET) @@ -71,7 +74,8 @@ examples/date/stub-generation/date_generated.ml: # subproject: date using dynamic linking (foreign) date.install = no date.dir = examples/date/foreign -date.subproject_deps = ctypes ctypes-foreign-base ctypes-foreign-unthreaded +date.threads = yes +date.subproject_deps = ctypes ctypes-foreign date.deps = unix bigarray str integers date: PROJECT=date date: $$(NATIVE_TARGET) @@ -86,9 +90,10 @@ ncurses-stubs: $$(NATIVE_TARGET) $$(LIB_TARGETS) ncurses-stub-generator.install = no ncurses-stub-generator.dir = examples/ncurses/stub-generation/stub-generator +ncurses-stub-generator.threads = yes ncurses-stub-generator.deps = integers ncurses-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-unthreaded ncurses-stubs + ctypes-foreign ncurses-stubs ncurses-stub-generator.deps = str unix bigarray integers ncurses-stub-generator: PROJECT=ncurses-stub-generator ncurses-stub-generator: $$(NATIVE_TARGET) @@ -110,7 +115,8 @@ examples/ncurses/stub-generation/ncurses_generated.ml: ncurses-stubs # subproject: ncurses using dynamic linking (foreign) ncurses.install = no ncurses.dir = examples/ncurses/foreign -ncurses.subproject_deps = ctypes ctypes-foreign-base ctypes-foreign-unthreaded +ncurses.threads = yes +ncurses.subproject_deps = ctypes ctypes-foreign ncurses.deps = unix bigarray str integers ncurses.link_flags = -lncurses ncurses: PROJECT=ncurses diff --git a/Makefile.tests b/Makefile.tests index eb7e45a6..11e32e4c 100644 --- a/Makefile.tests +++ b/Makefile.tests @@ -9,7 +9,7 @@ CC=$(shell ocamlc -config | sed -n '/native_c_compiler/{ s/[^:]*://; p;}') # tests-common subproject tests-common.dir = tests/tests-common tests-common.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded + ctypes-foreign tests-common.install = no tests-common.install_native_objects = yes @@ -20,21 +20,21 @@ tests-common: $$(LIB_TARGETS) test-raw.dir = tests/test-raw test-raw.threads = yes test-raw.deps = bigarray oUnit str integers -test-raw.subproject_deps = ctypes ctypes-foreign-base ctypes-foreign-threaded +test-raw.subproject_deps = ctypes ctypes-foreign test-raw: PROJECT=test-raw test-raw: $$(BEST_TARGET) test-pointers-stubs.dir = tests/test-pointers/stubs test-pointers-stubs.threads = yes test-pointers-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-pointers-stubs: PROJECT=test-pointers-stubs test-pointers-stubs: $$(LIB_TARGETS) test-pointers-stub-generator.dir = tests/test-pointers/stub-generator test-pointers-stub-generator.threads = yes test-pointers-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded test-pointers-stubs tests-common + ctypes-foreign test-pointers-stubs tests-common test-pointers-stub-generator.deps = str bigarray integers test-pointers-stub-generator: PROJECT=test-pointers-stub-generator test-pointers-stub-generator: $$(BEST_TARGET) @@ -42,8 +42,8 @@ test-pointers-stub-generator: $$(BEST_TARGET) test-pointers.dir = tests/test-pointers test-pointers.threads = yes test-pointers.deps = str bigarray oUnit integers -test-pointers.subproject_deps = ctypes ctypes-foreign-base \ - ctypes-foreign-threaded cstubs tests-common test-pointers-stubs +test-pointers.subproject_deps = ctypes ctypes-foreign \ + cstubs tests-common test-pointers-stubs test-pointers.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-pointers: PROJECT=test-pointers test-pointers: $$(BEST_TARGET) @@ -62,14 +62,14 @@ tests/test-pointers/generated_bindings.ml: $(BUILDDIR)/test-pointers-stub-genera test-integers-stubs.dir = tests/test-integers/stubs test-integers-stubs.threads = yes test-integers-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-integers-stubs: PROJECT=test-integers-stubs test-integers-stubs: $$(LIB_TARGETS) test-integers-stub-generator.dir = tests/test-integers/stub-generator test-integers-stub-generator.threads = yes test-integers-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded test-integers-stubs tests-common + ctypes-foreign test-integers-stubs tests-common test-integers-stub-generator.deps = str bigarray integers test-integers-stub-generator: PROJECT=test-integers-stub-generator test-integers-stub-generator: $$(BEST_TARGET) @@ -77,8 +77,8 @@ test-integers-stub-generator: $$(BEST_TARGET) test-integers.dir = tests/test-integers test-integers.threads = yes test-integers.deps = str bigarray oUnit integers -test-integers.subproject_deps = ctypes ctypes-foreign-base \ - ctypes-foreign-threaded cstubs tests-common test-integers-stubs +test-integers.subproject_deps = ctypes ctypes-foreign \ + cstubs tests-common test-integers-stubs test-integers.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-integers: PROJECT=test-integers test-integers: $$(BEST_TARGET) @@ -98,14 +98,14 @@ test-variadic-stubs.dir = tests/test-variadic/stubs test-variadic-stubs.threads = yes test-variadic-stubs.deps = integers test-variadic-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-variadic-stubs: PROJECT=test-variadic-stubs test-variadic-stubs: $$(LIB_TARGETS) test-variadic-stub-generator.dir = tests/test-variadic/stub-generator test-variadic-stub-generator.threads = yes test-variadic-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded test-variadic-stubs tests-common + ctypes-foreign test-variadic-stubs tests-common test-variadic-stub-generator.deps = str bigarray integers test-variadic-stub-generator: PROJECT=test-variadic-stub-generator test-variadic-stub-generator: $$(BEST_TARGET) @@ -113,8 +113,8 @@ test-variadic-stub-generator: $$(BEST_TARGET) test-variadic.dir = tests/test-variadic test-variadic.threads = yes test-variadic.deps = str bigarray oUnit integers -test-variadic.subproject_deps = ctypes ctypes-foreign-base \ - ctypes-foreign-threaded cstubs tests-common test-variadic-stubs +test-variadic.subproject_deps = ctypes ctypes-foreign \ + cstubs tests-common test-variadic-stubs test-variadic.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-variadic: PROJECT=test-variadic test-variadic: $$(BEST_TARGET) @@ -140,7 +140,7 @@ test-builtins-stubs: $$(LIB_TARGETS) test-builtins-stub-generator.dir = tests/test-builtins/stub-generator test-builtins-stub-generator.threads = yes test-builtins-stub-generator.subproject_deps = ctypes cstubs \ - test-builtins-stubs ctypes-foreign-base ctypes-foreign-threaded tests-common + test-builtins-stubs ctypes-foreign tests-common test-builtins-stub-generator.deps = str bigarray integers test-builtins-stub-generator: PROJECT=test-builtins-stub-generator test-builtins-stub-generator: $$(BEST_TARGET) @@ -149,7 +149,7 @@ test-builtins.dir = tests/test-builtins test-builtins.threads = yes test-builtins.deps = str bigarray oUnit integers test-builtins.subproject_deps = ctypes cstubs test-builtins-stubs \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-builtins.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-builtins: PROJECT=test-builtins test-builtins: $$(BEST_TARGET) @@ -175,7 +175,7 @@ test-macros-stubs: $$(LIB_TARGETS) test-macros-stub-generator.dir = tests/test-macros/stub-generator test-macros-stub-generator.threads = yes test-macros-stub-generator.subproject_deps = ctypes cstubs \ - test-macros-stubs ctypes-foreign-base ctypes-foreign-threaded tests-common + test-macros-stubs ctypes-foreign tests-common test-macros-stub-generator.deps = str bigarray integers test-macros-stub-generator: PROJECT=test-macros-stub-generator test-macros-stub-generator: $$(BEST_TARGET) @@ -184,7 +184,7 @@ test-macros.dir = tests/test-macros test-macros.threads = yes test-macros.deps = str bigarray oUnit integers test-macros.subproject_deps = ctypes cstubs test-macros-stubs \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-macros.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-macros: PROJECT=test-macros test-macros: $$(BEST_TARGET) @@ -204,14 +204,14 @@ tests/test-macros/generated_bindings.ml: $(BUILDDIR)/test-macros-stub-generator. test-higher_order-stubs.dir = tests/test-higher_order/stubs test-higher_order-stubs.threads = yes test-higher_order-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-higher_order-stubs: PROJECT=test-higher_order-stubs test-higher_order-stubs: $$(LIB_TARGETS) test-higher_order-stub-generator.dir = tests/test-higher_order/stub-generator test-higher_order-stub-generator.threads = yes test-higher_order-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded test-higher_order-stubs tests-common + ctypes-foreign test-higher_order-stubs tests-common test-higher_order-stub-generator.deps = str bigarray integers test-higher_order-stub-generator: PROJECT=test-higher_order-stub-generator test-higher_order-stub-generator: $$(BEST_TARGET) @@ -219,8 +219,8 @@ test-higher_order-stub-generator: $$(BEST_TARGET) test-higher_order.dir = tests/test-higher_order test-higher_order.threads = yes test-higher_order.deps = str bigarray oUnit integers -test-higher_order.subproject_deps = ctypes ctypes-foreign-base \ - ctypes-foreign-threaded cstubs test-higher_order-stubs tests-common +test-higher_order.subproject_deps = ctypes ctypes-foreign \ + cstubs test-higher_order-stubs tests-common test-higher_order.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-higher_order: PROJECT=test-higher_order test-higher_order: $$(BEST_TARGET) @@ -239,7 +239,7 @@ tests/test-higher_order/generated_bindings.ml: $(BUILDDIR)/test-higher_order-stu test-enums-struct-stubs.dir = tests/test-enums/struct-stubs test-enums-struct-stubs.threads = yes test-enums-struct-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-enums-struct-stubs: PROJECT=test-enums-struct-stubs test-enums-struct-stubs: $$(LIB_TARGETS) @@ -249,7 +249,7 @@ test-enums-stubs.extra_mls = generated_struct_bindings.ml test-enums-stubs.subproject_deps = ctypes \ test-enums-struct-stubs \ test-enums-struct-stubs-generator \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-enums-stubs: PROJECT=test-enums-stubs test-enums-stubs: $$(LIB_TARGETS) @@ -257,7 +257,7 @@ test-enums-stub-generator.dir = tests/test-enums/stub-generator test-enums-stub-generator.threads = yes test-enums-stub-generator.subproject_deps = ctypes cstubs \ test-enums-struct-stubs \ - ctypes-foreign-base ctypes-foreign-threaded test-enums-stubs tests-common + ctypes-foreign test-enums-stubs tests-common test-enums-stub-generator.deps = str bigarray integers test-enums-stub-generator: PROJECT=test-enums-stub-generator test-enums-stub-generator: $$(BEST_TARGET) @@ -265,7 +265,7 @@ test-enums-stub-generator: $$(BEST_TARGET) test-enums-struct-stub-generator.dir = tests/test-enums/struct-stub-generator test-enums-struct-stub-generator.threads = yes test-enums-struct-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded test-enums-struct-stubs tests-common + ctypes-foreign test-enums-struct-stubs tests-common test-enums-struct-stub-generator.deps = str bigarray integers test-enums-struct-stub-generator: PROJECT=test-enums-struct-stub-generator test-enums-struct-stub-generator: $$(BEST_TARGET) @@ -273,8 +273,8 @@ test-enums-struct-stub-generator: $$(BEST_TARGET) test-enums.dir = tests/test-enums test-enums.threads = yes test-enums.deps = str bigarray oUnit integers -test-enums.subproject_deps = ctypes ctypes-foreign-base \ - ctypes-foreign-threaded cstubs test-enums-struct-stubs test-enums-stubs tests-common +test-enums.subproject_deps = ctypes ctypes-foreign \ + cstubs test-enums-struct-stubs test-enums-stubs tests-common test-enums.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-enums: PROJECT=test-enums test-enums: $$(BEST_TARGET) @@ -305,14 +305,14 @@ $(BUILDDIR)/tests/test-enums/generated_struct_stubs.c: $(BUILDDIR)/test-enums-st test-structs-stubs.dir = tests/test-structs/stubs test-structs-stubs.threads = yes test-structs-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-structs-stubs: PROJECT=test-structs-stubs test-structs-stubs: $$(LIB_TARGETS) test-structs-stub-generator.dir = tests/test-structs/stub-generator test-structs-stub-generator.threads = yes test-structs-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded test-structs-stubs tests-common + ctypes-foreign test-structs-stubs tests-common test-structs-stub-generator.deps = str bigarray integers test-structs-stub-generator: PROJECT=test-structs-stub-generator test-structs-stub-generator: $$(BEST_TARGET) @@ -320,8 +320,8 @@ test-structs-stub-generator: $$(BEST_TARGET) test-structs.dir = tests/test-structs test-structs.threads = yes test-structs.deps = str bigarray oUnit integers -test-structs.subproject_deps = ctypes ctypes-foreign-base \ - ctypes-foreign-threaded cstubs test-structs-stubs tests-common +test-structs.subproject_deps = ctypes ctypes-foreign \ + cstubs test-structs-stubs tests-common test-structs.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-structs: PROJECT=test-structs test-structs: $$(BEST_TARGET) @@ -348,14 +348,14 @@ $(BUILDDIR)/tests/test-structs/generated_struct_stubs.c: $(BUILDDIR)/test-struct test-constants-stubs.dir = tests/test-constants/stubs test-constants-stubs.threads = yes test-constants-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-constants-stubs: PROJECT=test-constants-stubs test-constants-stubs: $$(LIB_TARGETS) test-constants-stub-generator.dir = tests/test-constants/stub-generator test-constants-stub-generator.threads = yes test-constants-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded test-constants-stubs tests-common + ctypes-foreign test-constants-stubs tests-common test-constants-stub-generator.deps = str bigarray integers test-constants-stub-generator: PROJECT=test-constants-stub-generator test-constants-stub-generator: $$(BEST_TARGET) @@ -363,8 +363,8 @@ test-constants-stub-generator: $$(BEST_TARGET) test-constants.dir = tests/test-constants test-constants.threads = yes test-constants.deps = str bigarray oUnit integers -test-constants.subproject_deps = ctypes ctypes-foreign-base \ - ctypes-foreign-threaded cstubs test-constants-stubs tests-common +test-constants.subproject_deps = ctypes ctypes-foreign \ + cstubs test-constants-stubs tests-common test-constants.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-constants: PROJECT=test-constants test-constants: $$(BEST_TARGET) @@ -392,21 +392,21 @@ $(BUILDDIR)/tests/test-constants/generated_struct_stubs.c: $(BUILDDIR)/test-cons test-finalisers.dir = tests/test-finalisers test-finalisers.threads = yes test-finalisers.deps = str bigarray oUnit integers -test-finalisers.subproject_deps = ctypes ctypes-foreign-base ctypes-foreign-threaded +test-finalisers.subproject_deps = ctypes ctypes-foreign test-finalisers: PROJECT=test-finalisers test-finalisers: $$(BEST_TARGET) test-cstdlib-stubs.dir = tests/test-cstdlib/stubs test-cstdlib-stubs.threads = yes test-cstdlib-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-cstdlib-stubs: PROJECT=test-cstdlib-stubs test-cstdlib-stubs: $$(LIB_TARGETS) test-cstdlib-stub-generator.dir = tests/test-cstdlib/stub-generator test-cstdlib-stub-generator.threads = yes test-cstdlib-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded test-cstdlib-stubs tests-common + ctypes-foreign test-cstdlib-stubs tests-common test-cstdlib-stub-generator.deps = str bigarray integers test-cstdlib-stub-generator: PROJECT=test-cstdlib-stub-generator test-cstdlib-stub-generator: $$(BEST_TARGET) @@ -414,8 +414,8 @@ test-cstdlib-stub-generator: $$(BEST_TARGET) test-cstdlib.dir = tests/test-cstdlib test-cstdlib.threads = yes test-cstdlib.deps = str bigarray oUnit integers -test-cstdlib.subproject_deps = ctypes ctypes-foreign-base \ - ctypes-foreign-threaded cstubs test-cstdlib-stubs tests-common +test-cstdlib.subproject_deps = ctypes ctypes-foreign \ + cstubs test-cstdlib-stubs tests-common test-cstdlib.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-cstdlib: PROJECT=test-cstdlib test-cstdlib: $$(BEST_TARGET) @@ -434,21 +434,21 @@ tests/test-cstdlib/generated_bindings.ml: $(BUILDDIR)/test-cstdlib-stub-generato test-sizeof.dir = tests/test-sizeof test-sizeof.threads = yes test-sizeof.deps = str bigarray oUnit integers -test-sizeof.subproject_deps = ctypes ctypes-foreign-base ctypes-foreign-threaded +test-sizeof.subproject_deps = ctypes ctypes-foreign test-sizeof: PROJECT=test-sizeof test-sizeof: $$(BEST_TARGET) test-foreign_values-stubs.dir = tests/test-foreign_values/stubs test-foreign_values-stubs.threads = yes test-foreign_values-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-foreign_values-stubs: PROJECT=test-foreign_values-stubs test-foreign_values-stubs: $$(LIB_TARGETS) test-foreign_values-stub-generator.dir = tests/test-foreign_values/stub-generator test-foreign_values-stub-generator.threads = yes test-foreign_values-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded test-foreign_values-stubs tests-common + ctypes-foreign test-foreign_values-stubs tests-common test-foreign_values-stub-generator.deps = str bigarray integers test-foreign_values-stub-generator: PROJECT=test-foreign_values-stub-generator test-foreign_values-stub-generator: $$(BEST_TARGET) @@ -456,8 +456,8 @@ test-foreign_values-stub-generator: $$(BEST_TARGET) test-foreign_values.dir = tests/test-foreign_values test-foreign_values.threads = yes test-foreign_values.deps = str bigarray oUnit integers -test-foreign_values.subproject_deps = ctypes ctypes-foreign-base \ - ctypes-foreign-threaded cstubs tests-common test-foreign_values-stubs +test-foreign_values.subproject_deps = ctypes ctypes-foreign \ + cstubs tests-common test-foreign_values-stubs test-foreign_values.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-foreign_values: PROJECT=test-foreign_values test-foreign_values: $$(BEST_TARGET) @@ -476,14 +476,14 @@ tests/test-foreign_values/generated_bindings.ml: $(BUILDDIR)/test-foreign_values test-unions-stubs.dir = tests/test-unions/stubs test-unions-stubs.threads = yes test-unions-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-unions-stubs: PROJECT=test-unions-stubs test-unions-stubs: $$(LIB_TARGETS) test-unions-stub-generator.dir = tests/test-unions/stub-generator test-unions-stub-generator.threads = yes test-unions-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded test-unions-stubs tests-common + ctypes-foreign test-unions-stubs tests-common test-unions-stub-generator.deps = str bigarray integers test-unions-stub-generator: PROJECT=test-unions-stub-generator test-unions-stub-generator: $$(BEST_TARGET) @@ -491,8 +491,8 @@ test-unions-stub-generator: $$(BEST_TARGET) test-unions.dir = tests/test-unions test-unions.threads = yes test-unions.deps = str bigarray oUnit integers -test-unions.subproject_deps = ctypes ctypes-foreign-base \ - ctypes-foreign-threaded cstubs test-unions-stubs tests-common +test-unions.subproject_deps = ctypes ctypes-foreign \ + cstubs test-unions-stubs tests-common test-unions.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-unions: PROJECT=test-unions test-unions: $$(BEST_TARGET) @@ -519,21 +519,21 @@ $(BUILDDIR)/tests/test-unions/generated_struct_stubs.c: $(BUILDDIR)/test-unions- test-custom_ops.dir = tests/test-custom_ops test-custom_ops.threads = yes test-custom_ops.deps = str bigarray oUnit integers -test-custom_ops.subproject_deps = ctypes ctypes-foreign-base ctypes-foreign-threaded +test-custom_ops.subproject_deps = ctypes ctypes-foreign test-custom_ops: PROJECT=test-custom_ops test-custom_ops: $$(BEST_TARGET) test-arrays-stubs.dir = tests/test-arrays/stubs test-arrays-stubs.threads = yes test-arrays-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-arrays-stubs: PROJECT=test-arrays-stubs test-arrays-stubs: $$(LIB_TARGETS) test-arrays-stub-generator.dir = tests/test-arrays/stub-generator test-arrays-stub-generator.threads = yes test-arrays-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded test-arrays-stubs tests-common + ctypes-foreign test-arrays-stubs tests-common test-arrays-stub-generator.deps = str bigarray integers test-arrays-stub-generator: PROJECT=test-arrays-stub-generator test-arrays-stub-generator: $$(BEST_TARGET) @@ -541,8 +541,8 @@ test-arrays-stub-generator: $$(BEST_TARGET) test-arrays.dir = tests/test-arrays test-arrays.threads = yes test-arrays.deps = str bigarray oUnit integers -test-arrays.subproject_deps = ctypes ctypes-foreign-base \ - ctypes-foreign-threaded cstubs test-arrays-stubs tests-common +test-arrays.subproject_deps = ctypes ctypes-foreign \ + cstubs test-arrays-stubs tests-common test-arrays.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-arrays: PROJECT=test-arrays test-arrays: $$(BEST_TARGET) @@ -561,35 +561,35 @@ tests/test-arrays/generated_bindings.ml: $(BUILDDIR)/test-arrays-stub-generator. test-foreign-errno.dir = tests/test-foreign-errno test-foreign-errno.threads = yes test-foreign-errno.deps = str bigarray oUnit integers -test-foreign-errno.subproject_deps = ctypes ctypes-foreign-base ctypes-foreign-threaded +test-foreign-errno.subproject_deps = ctypes ctypes-foreign test-foreign-errno: PROJECT=test-foreign-errno test-foreign-errno: $$(BEST_TARGET) test-passable.dir = tests/test-passable test-passable.threads = yes test-passable.deps = str bigarray oUnit integers -test-passable.subproject_deps = ctypes ctypes-foreign-base ctypes-foreign-threaded cstubs +test-passable.subproject_deps = ctypes ctypes-foreign cstubs test-passable: PROJECT=test-passable test-passable: $$(BEST_TARGET) test-alignment.dir = tests/test-alignment test-alignment.threads = yes test-alignment.deps = str bigarray oUnit integers -test-alignment.subproject_deps = ctypes ctypes-foreign-base ctypes-foreign-threaded +test-alignment.subproject_deps = ctypes ctypes-foreign test-alignment: PROJECT=test-alignment test-alignment: $$(BEST_TARGET) test-views-stubs.dir = tests/test-views/stubs test-views-stubs.threads = yes test-views-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-views-stubs: PROJECT=test-views-stubs test-views-stubs: $$(LIB_TARGETS) test-views-stub-generator.dir = tests/test-views/stub-generator test-views-stub-generator.threads = yes test-views-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded test-views-stubs tests-common + ctypes-foreign test-views-stubs tests-common test-views-stub-generator.deps = str bigarray integers test-views-stub-generator: PROJECT=test-views-stub-generator test-views-stub-generator: $$(BEST_TARGET) @@ -597,7 +597,7 @@ test-views-stub-generator: $$(BEST_TARGET) test-views.dir = tests/test-views test-views.threads = yes test-views.deps = str bigarray oUnit integers -test-views.subproject_deps = ctypes ctypes-foreign-base ctypes-foreign-threaded cstubs test-views-stubs tests-common +test-views.subproject_deps = ctypes ctypes-foreign cstubs test-views-stubs tests-common test-views.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-views: PROJECT=test-views test-views: $$(BEST_TARGET) @@ -616,14 +616,14 @@ tests/test-views/generated_bindings.ml: $(BUILDDIR)/test-views-stub-generator.$( test-oo_style-stubs.dir = tests/test-oo_style/stubs test-oo_style-stubs.threads = yes test-oo_style-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-oo_style-stubs: PROJECT=test-oo_style-stubs test-oo_style-stubs: $$(LIB_TARGETS) test-oo_style-stub-generator.dir = tests/test-oo_style/stub-generator test-oo_style-stub-generator.threads = yes test-oo_style-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded test-oo_style-stubs tests-common + ctypes-foreign test-oo_style-stubs tests-common test-oo_style-stub-generator.deps = str bigarray integers test-oo_style-stub-generator: PROJECT=test-oo_style-stub-generator test-oo_style-stub-generator: $$(BEST_TARGET) @@ -631,8 +631,8 @@ test-oo_style-stub-generator: $$(BEST_TARGET) test-oo_style.dir = tests/test-oo_style test-oo_style.threads = yes test-oo_style.deps = str bigarray oUnit integers -test-oo_style.subproject_deps = ctypes ctypes-foreign-base \ - ctypes-foreign-threaded cstubs test-oo_style-stubs tests-common +test-oo_style.subproject_deps = ctypes ctypes-foreign \ + cstubs test-oo_style-stubs tests-common test-oo_style.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-oo_style: PROJECT=test-oo_style test-oo_style: $$(BEST_TARGET) @@ -651,8 +651,8 @@ tests/test-oo_style/generated_bindings.ml: $(BUILDDIR)/test-oo_style-stub-genera test-marshal.dir = tests/test-marshal test-marshal.threads = yes test-marshal.deps = str bigarray oUnit integers -test-marshal.subproject_deps = ctypes ctypes-foreign-base \ - ctypes-foreign-threaded cstubs tests-common +test-marshal.subproject_deps = ctypes ctypes-foreign \ + cstubs tests-common test-marshal.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-marshal: PROJECT=test-marshal test-marshal: $$(BEST_TARGET) @@ -660,7 +660,7 @@ test-marshal: $$(BEST_TARGET) test-type_printing.dir = tests/test-type_printing test-type_printing.threads = yes test-type_printing.deps = str bigarray oUnit integers -test-type_printing.subproject_deps = ctypes ctypes-foreign-base ctypes-foreign-threaded \ +test-type_printing.subproject_deps = ctypes ctypes-foreign \ cstubs test-type_printing-stubs tests-common test-type_printing.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-type_printing: PROJECT=test-type_printing @@ -669,14 +669,14 @@ test-type_printing: $$(BEST_TARGET) test-type_printing-stubs.dir = tests/test-type_printing/stubs test-type_printing-stubs.threads = yes test-type_printing-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-type_printing-stubs: PROJECT=test-type_printing-stubs test-type_printing-stubs: $$(LIB_TARGETS) test-type_printing-stub-generator.dir = tests/test-type_printing/stub-generator test-type_printing-stub-generator.threads = yes test-type_printing-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded test-type_printing-stubs tests-common + ctypes-foreign test-type_printing-stubs tests-common test-type_printing-stub-generator.deps = str bigarray integers test-type_printing-stub-generator: PROJECT=test-type_printing-stub-generator test-type_printing-stub-generator: $$(BEST_TARGET) @@ -697,14 +697,14 @@ $(BUILDDIR)/tests/test-type_printing/generated_struct_stubs.c: $(BUILDDIR)/test- test-value_printing-stubs.dir = tests/test-value_printing/stubs test-value_printing-stubs.threads = yes test-value_printing-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-value_printing-stubs: PROJECT=test-value_printing-stubs test-value_printing-stubs: $$(LIB_TARGETS) test-value_printing-stub-generator.dir = tests/test-value_printing/stub-generator test-value_printing-stub-generator.threads = yes test-value_printing-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded test-value_printing-stubs tests-common + ctypes-foreign test-value_printing-stubs tests-common test-value_printing-stub-generator.deps = str bigarray integers test-value_printing-stub-generator: PROJECT=test-value_printing-stub-generator test-value_printing-stub-generator: $$(BEST_TARGET) @@ -712,8 +712,8 @@ test-value_printing-stub-generator: $$(BEST_TARGET) test-value_printing.dir = tests/test-value_printing test-value_printing.threads = yes test-value_printing.deps = str bigarray oUnit integers -test-value_printing.subproject_deps = ctypes ctypes-foreign-base \ - ctypes-foreign-threaded cstubs tests-common test-value_printing-stubs +test-value_printing.subproject_deps = ctypes ctypes-foreign \ + cstubs tests-common test-value_printing-stubs test-value_printing.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-value_printing: PROJECT=test-value_printing test-value_printing: $$(BEST_TARGET) @@ -732,14 +732,14 @@ tests/test-value_printing/generated_bindings.ml: $(BUILDDIR)/test-value_printing test-complex-stubs.dir = tests/test-complex/stubs test-complex-stubs.threads = yes test-complex-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-complex-stubs: PROJECT=test-complex-stubs test-complex-stubs: $$(LIB_TARGETS) test-complex-stub-generator.dir = tests/test-complex/stub-generator test-complex-stub-generator.threads = yes test-complex-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded test-complex-stubs tests-common + ctypes-foreign test-complex-stubs tests-common test-complex-stub-generator.deps = str bigarray integers test-complex-stub-generator: PROJECT=test-complex-stub-generator test-complex-stub-generator: $$(BEST_TARGET) @@ -747,8 +747,8 @@ test-complex-stub-generator: $$(BEST_TARGET) test-complex.dir = tests/test-complex test-complex.threads = yes test-complex.deps = str bigarray oUnit integers -test-complex.subproject_deps = ctypes ctypes-foreign-base \ - ctypes-foreign-threaded cstubs tests-common test-complex-stubs +test-complex.subproject_deps = ctypes ctypes-foreign \ + cstubs tests-common test-complex-stubs test-complex.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-complex: PROJECT=test-complex test-complex: $$(BEST_TARGET) @@ -767,14 +767,14 @@ tests/test-complex/generated_bindings.ml: $(BUILDDIR)/test-complex-stub-generato test-bools-stubs.dir = tests/test-bools/stubs test-bools-stubs.threads = yes test-bools-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-bools-stubs: PROJECT=test-bools-stubs test-bools-stubs: $$(LIB_TARGETS) test-bools-stub-generator.dir = tests/test-bools/stub-generator test-bools-stub-generator.threads = yes test-bools-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded test-bools-stubs tests-common + ctypes-foreign test-bools-stubs tests-common test-bools-stub-generator.deps = str bigarray integers test-bools-stub-generator: PROJECT=test-bools-stub-generator test-bools-stub-generator: $$(BEST_TARGET) @@ -782,8 +782,8 @@ test-bools-stub-generator: $$(BEST_TARGET) test-bools.dir = tests/test-bools test-bools.threads = yes test-bools.deps = str bigarray oUnit integers -test-bools.subproject_deps = ctypes ctypes-foreign-base \ - ctypes-foreign-threaded cstubs tests-common test-bools-stubs +test-bools.subproject_deps = ctypes ctypes-foreign \ + cstubs tests-common test-bools-stubs test-bools.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-bools: PROJECT=test-bools test-bools: $$(BEST_TARGET) @@ -802,14 +802,14 @@ tests/test-bools/generated_bindings.ml: $(BUILDDIR)/test-bools-stub-generator.$( test-callback_lifetime-stubs.dir = tests/test-callback_lifetime/stubs test-callback_lifetime-stubs.threads = yes test-callback_lifetime-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-callback_lifetime-stubs: PROJECT=test-callback_lifetime-stubs test-callback_lifetime-stubs: $$(LIB_TARGETS) test-callback_lifetime-stub-generator.dir = tests/test-callback_lifetime/stub-generator test-callback_lifetime-stub-generator.threads = yes test-callback_lifetime-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded test-callback_lifetime-stubs tests-common + ctypes-foreign test-callback_lifetime-stubs tests-common test-callback_lifetime-stub-generator.deps = str bigarray integers test-callback_lifetime-stub-generator: PROJECT=test-callback_lifetime-stub-generator test-callback_lifetime-stub-generator: $$(BEST_TARGET) @@ -817,8 +817,8 @@ test-callback_lifetime-stub-generator: $$(BEST_TARGET) test-callback_lifetime.dir = tests/test-callback_lifetime test-callback_lifetime.threads = yes test-callback_lifetime.deps = str bigarray oUnit integers -test-callback_lifetime.subproject_deps = ctypes ctypes-foreign-base \ - ctypes-foreign-threaded cstubs test-callback_lifetime-stubs tests-common +test-callback_lifetime.subproject_deps = ctypes ctypes-foreign \ + cstubs test-callback_lifetime-stubs tests-common test-callback_lifetime.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-callback_lifetime: PROJECT=test-callback_lifetime test-callback_lifetime: $$(BEST_TARGET) @@ -837,14 +837,14 @@ tests/test-callback_lifetime/generated_bindings.ml: $(BUILDDIR)/test-callback_li test-lifetime-stubs.dir = tests/test-lifetime/stubs test-lifetime-stubs.threads = yes test-lifetime-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-lifetime-stubs: PROJECT=test-lifetime-stubs test-lifetime-stubs: $$(LIB_TARGETS) test-lifetime-stub-generator.dir = tests/test-lifetime/stub-generator test-lifetime-stub-generator.threads = yes test-lifetime-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded test-lifetime-stubs tests-common + ctypes-foreign test-lifetime-stubs tests-common test-lifetime-stub-generator.deps = str bigarray integers test-lifetime-stub-generator: PROJECT=test-lifetime-stub-generator test-lifetime-stub-generator: $$(BEST_TARGET) @@ -852,8 +852,8 @@ test-lifetime-stub-generator: $$(BEST_TARGET) test-lifetime.dir = tests/test-lifetime test-lifetime.threads = yes test-lifetime.deps = str bigarray oUnit integers -test-lifetime.subproject_deps = ctypes ctypes-foreign-base \ - ctypes-foreign-threaded cstubs test-lifetime-stubs tests-common +test-lifetime.subproject_deps = ctypes ctypes-foreign \ + cstubs test-lifetime-stubs tests-common test-lifetime.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-lifetime: PROJECT=test-lifetime test-lifetime: $$(BEST_TARGET) @@ -872,21 +872,21 @@ tests/test-lifetime/generated_bindings.ml: $(BUILDDIR)/test-lifetime-stub-genera test-stubs.dir = tests/test-stubs test-stubs.threads = yes test-stubs.deps = str bigarray oUnit integers -test-stubs.subproject_deps = ctypes ctypes-foreign-base ctypes-foreign-threaded +test-stubs.subproject_deps = ctypes ctypes-foreign test-stubs: PROJECT=test-stubs test-stubs: $$(BEST_TARGET) test-bigarrays-stubs.dir = tests/test-bigarrays/stubs test-bigarrays-stubs.threads = yes test-bigarrays-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-bigarrays-stubs: PROJECT=test-bigarrays-stubs test-bigarrays-stubs: $$(LIB_TARGETS) test-bigarrays-stub-generator.dir = tests/test-bigarrays/stub-generator test-bigarrays-stub-generator.threads = yes test-bigarrays-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded test-bigarrays-stubs tests-common + ctypes-foreign test-bigarrays-stubs tests-common test-bigarrays-stub-generator.deps = str bigarray integers test-bigarrays-stub-generator: PROJECT=test-bigarrays-stub-generator test-bigarrays-stub-generator: $$(BEST_TARGET) @@ -894,8 +894,8 @@ test-bigarrays-stub-generator: $$(BEST_TARGET) test-bigarrays.dir = tests/test-bigarrays test-bigarrays.threads = yes test-bigarrays.deps = str bigarray oUnit integers -test-bigarrays.subproject_deps = ctypes ctypes-foreign-base \ - ctypes-foreign-threaded cstubs tests-common test-bigarrays-stubs +test-bigarrays.subproject_deps = ctypes ctypes-foreign \ + cstubs tests-common test-bigarrays-stubs test-bigarrays.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-bigarrays: PROJECT=test-bigarrays test-bigarrays: $$(BEST_TARGET) @@ -914,14 +914,14 @@ tests/test-bigarrays/generated_bindings.ml: $(BUILDDIR)/test-bigarrays-stub-gene test-coercions-stubs.dir = tests/test-coercions/stubs test-coercions-stubs.threads = yes test-coercions-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-coercions-stubs: PROJECT=test-coercions-stubs test-coercions-stubs: $$(LIB_TARGETS) test-coercions-stub-generator.dir = tests/test-coercions/stub-generator test-coercions-stub-generator.threads = yes test-coercions-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded test-coercions-stubs tests-common + ctypes-foreign test-coercions-stubs tests-common test-coercions-stub-generator.deps = str bigarray integers test-coercions-stub-generator: PROJECT=test-coercions-stub-generator test-coercions-stub-generator: $$(BEST_TARGET) @@ -929,8 +929,8 @@ test-coercions-stub-generator: $$(BEST_TARGET) test-coercions.dir = tests/test-coercions test-coercions.threads = yes test-coercions.deps = str bigarray oUnit integers -test-coercions.subproject_deps = ctypes ctypes-foreign-base \ - ctypes-foreign-threaded cstubs tests-common test-coercions-stubs +test-coercions.subproject_deps = ctypes ctypes-foreign \ + cstubs tests-common test-coercions-stubs test-coercions.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-coercions: PROJECT=test-coercions test-coercions: $$(BEST_TARGET) @@ -949,8 +949,8 @@ tests/test-coercions/generated_bindings.ml: $(BUILDDIR)/test-coercions-stub-gene test-roots.dir = tests/test-roots test-roots.threads = yes test-roots.deps = str bigarray oUnit integers -test-roots.subproject_deps = ctypes ctypes-foreign-base \ - ctypes-foreign-threaded cstubs tests-common +test-roots.subproject_deps = ctypes ctypes-foreign \ + cstubs tests-common test-roots.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-roots: PROJECT=test-roots test-roots: $$(BEST_TARGET) @@ -958,14 +958,14 @@ test-roots: $$(BEST_TARGET) test-passing-ocaml-values-stubs.dir = tests/test-passing-ocaml-values/stubs test-passing-ocaml-values-stubs.threads = yes test-passing-ocaml-values-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-passing-ocaml-values-stubs: PROJECT=test-passing-ocaml-values-stubs test-passing-ocaml-values-stubs: $$(LIB_TARGETS) test-passing-ocaml-values-stub-generator.dir = tests/test-passing-ocaml-values/stub-generator test-passing-ocaml-values-stub-generator.threads = yes test-passing-ocaml-values-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded test-passing-ocaml-values-stubs tests-common + ctypes-foreign test-passing-ocaml-values-stubs tests-common test-passing-ocaml-values-stub-generator.deps = str bigarray integers test-passing-ocaml-values-stub-generator: PROJECT=test-passing-ocaml-values-stub-generator test-passing-ocaml-values-stub-generator: $$(BEST_TARGET) @@ -973,8 +973,8 @@ test-passing-ocaml-values-stub-generator: $$(BEST_TARGET) test-passing-ocaml-values.dir = tests/test-passing-ocaml-values test-passing-ocaml-values.threads = yes test-passing-ocaml-values.deps = str bigarray oUnit integers -test-passing-ocaml-values.subproject_deps = ctypes ctypes-foreign-base \ - ctypes-foreign-threaded cstubs tests-common test-passing-ocaml-values-stubs +test-passing-ocaml-values.subproject_deps = ctypes ctypes-foreign \ + cstubs tests-common test-passing-ocaml-values-stubs test-passing-ocaml-values.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-passing-ocaml-values: PROJECT=test-passing-ocaml-values test-passing-ocaml-values: $$(BEST_TARGET) @@ -993,14 +993,14 @@ tests/test-passing-ocaml-values/generated_bindings.ml: $(BUILDDIR)/test-passing- test-funptrs-stubs.dir = tests/test-funptrs/stubs test-funptrs-stubs.threads = yes test-funptrs-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-funptrs-stubs: PROJECT=test-funptrs-stubs test-funptrs-stubs: $$(LIB_TARGETS) test-funptrs-stub-generator.dir = tests/test-funptrs/stub-generator test-funptrs-stub-generator.threads = yes test-funptrs-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded test-funptrs-stubs tests-common + ctypes-foreign test-funptrs-stubs tests-common test-funptrs-stub-generator.deps = str bigarray integers test-funptrs-stub-generator: PROJECT=test-funptrs-stub-generator test-funptrs-stub-generator: $$(BEST_TARGET) @@ -1008,8 +1008,8 @@ test-funptrs-stub-generator: $$(BEST_TARGET) test-funptrs.dir = tests/test-funptrs test-funptrs.threads = yes test-funptrs.deps = str bigarray oUnit integers -test-funptrs.subproject_deps = ctypes ctypes-foreign-base \ - ctypes-foreign-threaded cstubs tests-common test-funptrs-stubs +test-funptrs.subproject_deps = ctypes ctypes-foreign \ + cstubs tests-common test-funptrs-stubs test-funptrs.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-funptrs: PROJECT=test-funptrs test-funptrs: $$(BEST_TARGET) @@ -1028,14 +1028,14 @@ tests/test-funptrs/generated_bindings.ml: $(BUILDDIR)/test-funptrs-stub-generato test-lwt-jobs-stubs.dir = tests/test-lwt-jobs/stubs test-lwt-jobs-stubs.threads = yes test-lwt-jobs-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-lwt-jobs-stubs: PROJECT=test-lwt-jobs-stubs test-lwt-jobs-stubs: $$(LIB_TARGETS) test-lwt-jobs-stub-generator.dir = tests/test-lwt-jobs/stub-generator test-lwt-jobs-stub-generator.threads = yes test-lwt-jobs-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded test-lwt-jobs-stubs tests-common + ctypes-foreign test-lwt-jobs-stubs tests-common test-lwt-jobs-stub-generator.deps = str bigarray integers test-lwt-jobs-stub-generator: PROJECT=test-lwt-jobs-stub-generator test-lwt-jobs-stub-generator: $$(BEST_TARGET) @@ -1043,8 +1043,8 @@ test-lwt-jobs-stub-generator: $$(BEST_TARGET) test-lwt-jobs.dir = tests/test-lwt-jobs test-lwt-jobs.threads = yes test-lwt-jobs.deps = str bigarray oUnit integers lwt.unix -test-lwt-jobs.subproject_deps = ctypes ctypes-foreign-base \ - ctypes-foreign-threaded cstubs tests-common test-lwt-jobs-stubs +test-lwt-jobs.subproject_deps = ctypes ctypes-foreign \ + cstubs tests-common test-lwt-jobs-stubs test-lwt-jobs.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-lwt-jobs: PROJECT=test-lwt-jobs test-lwt-jobs: $$(BEST_TARGET) @@ -1071,14 +1071,14 @@ $(BUILDDIR)/tests/test-lwt-jobs/generated_struct_stubs.c: $(BUILDDIR)/test-lwt-j test-lwt-preemptive-stubs.dir = tests/test-lwt-preemptive/stubs test-lwt-preemptive-stubs.threads = yes test-lwt-preemptive-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-lwt-preemptive-stubs: PROJECT=test-lwt-preemptive-stubs test-lwt-preemptive-stubs: $$(LIB_TARGETS) test-lwt-preemptive-stub-generator.dir = tests/test-lwt-preemptive/stub-generator test-lwt-preemptive-stub-generator.threads = yes test-lwt-preemptive-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded test-lwt-preemptive-stubs tests-common + ctypes-foreign test-lwt-preemptive-stubs tests-common test-lwt-preemptive-stub-generator.deps = str bigarray integers test-lwt-preemptive-stub-generator: PROJECT=test-lwt-preemptive-stub-generator test-lwt-preemptive-stub-generator: $$(BEST_TARGET) @@ -1086,8 +1086,8 @@ test-lwt-preemptive-stub-generator: $$(BEST_TARGET) test-lwt-preemptive.dir = tests/test-lwt-preemptive test-lwt-preemptive.threads = yes test-lwt-preemptive.deps = str bigarray oUnit integers lwt.unix -test-lwt-preemptive.subproject_deps = ctypes ctypes-foreign-base \ - ctypes-foreign-threaded cstubs tests-common test-lwt-preemptive-stubs +test-lwt-preemptive.subproject_deps = ctypes ctypes-foreign \ + cstubs tests-common test-lwt-preemptive-stubs test-lwt-preemptive.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-lwt-preemptive: PROJECT=test-lwt-preemptive test-lwt-preemptive: $$(BEST_TARGET) @@ -1114,14 +1114,14 @@ $(BUILDDIR)/tests/test-lwt-preemptive/generated_struct_stubs.c: $(BUILDDIR)/test test-returning-errno-lwt-jobs-stubs.dir = tests/test-returning-errno-lwt-jobs/stubs test-returning-errno-lwt-jobs-stubs.threads = yes test-returning-errno-lwt-jobs-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-returning-errno-lwt-jobs-stubs: PROJECT=test-returning-errno-lwt-jobs-stubs test-returning-errno-lwt-jobs-stubs: $$(LIB_TARGETS) test-returning-errno-lwt-jobs-stub-generator.dir = tests/test-returning-errno-lwt-jobs/stub-generator test-returning-errno-lwt-jobs-stub-generator.threads = yes test-returning-errno-lwt-jobs-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded test-returning-errno-lwt-jobs-stubs tests-common + ctypes-foreign test-returning-errno-lwt-jobs-stubs tests-common test-returning-errno-lwt-jobs-stub-generator.deps = str bigarray integers test-returning-errno-lwt-jobs-stub-generator: PROJECT=test-returning-errno-lwt-jobs-stub-generator test-returning-errno-lwt-jobs-stub-generator: $$(BEST_TARGET) @@ -1129,8 +1129,8 @@ test-returning-errno-lwt-jobs-stub-generator: $$(BEST_TARGET) test-returning-errno-lwt-jobs.dir = tests/test-returning-errno-lwt-jobs test-returning-errno-lwt-jobs.threads = yes test-returning-errno-lwt-jobs.deps = str bigarray oUnit integers lwt.unix -test-returning-errno-lwt-jobs.subproject_deps = ctypes ctypes-foreign-base \ - ctypes-foreign-threaded cstubs tests-common test-returning-errno-lwt-jobs-stubs +test-returning-errno-lwt-jobs.subproject_deps = ctypes ctypes-foreign \ + cstubs tests-common test-returning-errno-lwt-jobs-stubs test-returning-errno-lwt-jobs.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-returning-errno-lwt-jobs: PROJECT=test-returning-errno-lwt-jobs test-returning-errno-lwt-jobs: $$(BEST_TARGET) @@ -1156,14 +1156,14 @@ $(BUILDDIR)/tests/test-returning-errno-lwt-jobs/generated_struct_stubs.c: $(BUIL test-returning-errno-lwt-preemptive-stubs.dir = tests/test-returning-errno-lwt-preemptive/stubs test-returning-errno-lwt-preemptive-stubs.threads = yes test-returning-errno-lwt-preemptive-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-returning-errno-lwt-preemptive-stubs: PROJECT=test-returning-errno-lwt-preemptive-stubs test-returning-errno-lwt-preemptive-stubs: $$(LIB_TARGETS) test-returning-errno-lwt-preemptive-stub-generator.dir = tests/test-returning-errno-lwt-preemptive/stub-generator test-returning-errno-lwt-preemptive-stub-generator.threads = yes test-returning-errno-lwt-preemptive-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded test-returning-errno-lwt-preemptive-stubs tests-common + ctypes-foreign test-returning-errno-lwt-preemptive-stubs tests-common test-returning-errno-lwt-preemptive-stub-generator.deps = str bigarray integers test-returning-errno-lwt-preemptive-stub-generator: PROJECT=test-returning-errno-lwt-preemptive-stub-generator test-returning-errno-lwt-preemptive-stub-generator: $$(BEST_TARGET) @@ -1171,8 +1171,8 @@ test-returning-errno-lwt-preemptive-stub-generator: $$(BEST_TARGET) test-returning-errno-lwt-preemptive.dir = tests/test-returning-errno-lwt-preemptive test-returning-errno-lwt-preemptive.threads = yes test-returning-errno-lwt-preemptive.deps = str bigarray oUnit integers lwt.unix -test-returning-errno-lwt-preemptive.subproject_deps = ctypes ctypes-foreign-base \ - ctypes-foreign-threaded cstubs tests-common test-returning-errno-lwt-preemptive-stubs +test-returning-errno-lwt-preemptive.subproject_deps = ctypes ctypes-foreign \ + cstubs tests-common test-returning-errno-lwt-preemptive-stubs test-returning-errno-lwt-preemptive.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-returning-errno-lwt-preemptive: PROJECT=test-returning-errno-lwt-preemptive test-returning-errno-lwt-preemptive: $$(BEST_TARGET) @@ -1198,14 +1198,14 @@ $(BUILDDIR)/tests/test-returning-errno-lwt-preemptive/generated_struct_stubs.c: test-returning-errno-stubs.dir = tests/test-returning-errno/stubs test-returning-errno-stubs.threads = yes test-returning-errno-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-returning-errno-stubs: PROJECT=test-returning-errno-stubs test-returning-errno-stubs: $$(LIB_TARGETS) test-returning-errno-stub-generator.dir = tests/test-returning-errno/stub-generator test-returning-errno-stub-generator.threads = yes test-returning-errno-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded test-returning-errno-stubs tests-common + ctypes-foreign test-returning-errno-stubs tests-common test-returning-errno-stub-generator.deps = str bigarray integers test-returning-errno-stub-generator: PROJECT=test-returning-errno-stub-generator test-returning-errno-stub-generator: $$(BEST_TARGET) @@ -1213,8 +1213,8 @@ test-returning-errno-stub-generator: $$(BEST_TARGET) test-returning-errno.dir = tests/test-returning-errno test-returning-errno.threads = yes test-returning-errno.deps = str bigarray oUnit integers -test-returning-errno.subproject_deps = ctypes ctypes-foreign-base \ - ctypes-foreign-threaded cstubs tests-common test-returning-errno-stubs +test-returning-errno.subproject_deps = ctypes ctypes-foreign \ + cstubs tests-common test-returning-errno-stubs test-returning-errno.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-returning-errno: PROJECT=test-returning-errno test-returning-errno: $$(BEST_TARGET) @@ -1241,14 +1241,14 @@ $(BUILDDIR)/tests/test-returning-errno/generated_struct_stubs.c: $(BUILDDIR)/tes test-threads-stubs.dir = tests/test-threads/stubs test-threads-stubs.threads = yes test-threads-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-threads-stubs: PROJECT=test-threads-stubs test-threads-stubs: $$(LIB_TARGETS) test-threads-stub-generator.dir = tests/test-threads/stub-generator test-threads-stub-generator.threads = yes test-threads-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded test-threads-stubs tests-common + ctypes-foreign test-threads-stubs tests-common test-threads-stub-generator.deps = str bigarray integers test-threads-stub-generator: PROJECT=test-threads-stub-generator test-threads-stub-generator: $$(BEST_TARGET) @@ -1256,8 +1256,8 @@ test-threads-stub-generator: $$(BEST_TARGET) test-threads.dir = tests/test-threads test-threads.threads = yes test-threads.deps = str bigarray oUnit integers -test-threads.subproject_deps = ctypes ctypes-foreign-base \ - ctypes-foreign-threaded cstubs tests-common test-threads-stubs +test-threads.subproject_deps = ctypes ctypes-foreign \ + cstubs tests-common test-threads-stubs test-threads.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-threads: PROJECT=test-threads test-threads: $$(BEST_TARGET) @@ -1276,14 +1276,14 @@ tests/test-threads/generated_bindings.ml: $(BUILDDIR)/test-threads-stub-generato test-closure-type-promotion-stubs.dir = tests/test-closure-type-promotion/stubs test-closure-type-promotion-stubs.threads = yes test-closure-type-promotion-stubs.subproject_deps = ctypes \ - ctypes-foreign-base ctypes-foreign-threaded tests-common + ctypes-foreign tests-common test-closure-type-promotion-stubs: PROJECT=test-closure-type-promotion-stubs test-closure-type-promotion-stubs: $$(LIB_TARGETS) test-closure-type-promotion-stub-generator.dir = tests/test-closure-type-promotion/stub-generator test-closure-type-promotion-stub-generator.threads = yes test-closure-type-promotion-stub-generator.subproject_deps = ctypes cstubs \ - ctypes-foreign-base ctypes-foreign-threaded test-closure-type-promotion-stubs tests-common + ctypes-foreign test-closure-type-promotion-stubs tests-common test-closure-type-promotion-stub-generator.deps = str bigarray integers test-closure-type-promotion-stub-generator: PROJECT=test-closure-type-promotion-stub-generator test-closure-type-promotion-stub-generator: $$(BEST_TARGET) @@ -1291,8 +1291,8 @@ test-closure-type-promotion-stub-generator: $$(BEST_TARGET) test-closure-type-promotion.dir = tests/test-closure-type-promotion test-closure-type-promotion.threads = yes test-closure-type-promotion.deps = str bigarray oUnit integers -test-closure-type-promotion.subproject_deps = ctypes ctypes-foreign-base \ - ctypes-foreign-threaded cstubs test-closure-type-promotion-stubs tests-common +test-closure-type-promotion.subproject_deps = ctypes ctypes-foreign \ + cstubs test-closure-type-promotion-stubs tests-common test-closure-type-promotion.link_flags = -L$(BUILDDIR)/clib -ltest_functions test-closure-type-promotion: PROJECT=test-closure-type-promotion test-closure-type-promotion: $$(BEST_TARGET) diff --git a/src/ctypes-foreign-unthreaded/ctypes_gc_mutex.ml b/src/ctypes-foreign-unthreaded/ctypes_gc_mutex.ml deleted file mode 100644 index 8b438a1d..00000000 --- a/src/ctypes-foreign-unthreaded/ctypes_gc_mutex.ml +++ /dev/null @@ -1,33 +0,0 @@ -(* - * Copyright (c) 2013 Jeremy Yallop. - * - * This file is distributed under the terms of the MIT License. - * See the file LICENSE for details. - *) - -(* For internal use only, and really only for use with Closure_properties_base. - A mutex for synchronizing between the GC (i.e. finalisers) and the single - mutator thread. Provides very few guarantees. Since the program is - single-threaded, there is no waiting; locking either succeeds or fails - immediately. -*) - -exception MutexError of string - -type t = { mutable locked: bool } - -let create () = { locked = false } - -(* the only allocation below is exception raising *) - -let lock m = - if m.locked then raise (MutexError "Locking locked mutex") - else m.locked <- true - -let try_lock m = - if m.locked then false - else (m.locked <- true; true) - -let unlock m = - if not m.locked then raise (MutexError "Unlocking unlocked mutex") - else m.locked <- false diff --git a/src/ctypes-foreign-unthreaded/foreign.ml b/src/ctypes-foreign-unthreaded/foreign.ml deleted file mode 100644 index a4c7e34b..00000000 --- a/src/ctypes-foreign-unthreaded/foreign.ml +++ /dev/null @@ -1,8 +0,0 @@ -(* - * Copyright (c) 2013 Jeremy Yallop. - * - * This file is distributed under the terms of the MIT License. - * See the file LICENSE for details. - *) - -include Ctypes_foreign_basis.Make(Ctypes_closure_properties.Make(Ctypes_gc_mutex)) diff --git a/src/ctypes-foreign-unthreaded/foreign.mli b/src/ctypes-foreign-unthreaded/foreign.mli deleted file mode 100644 index 454e78ea..00000000 --- a/src/ctypes-foreign-unthreaded/foreign.mli +++ /dev/null @@ -1,188 +0,0 @@ -(* - * Copyright (c) 2013 Jeremy Yallop. - * - * This file is distributed under the terms of the MIT License. - * See the file LICENSE for details. - *) - -(** High-level bindings for C functions and values *) - -val foreign : - ?abi:Libffi_abi.abi -> - ?from:Dl.library -> - ?stub:bool -> - ?check_errno:bool -> - ?release_runtime_lock:bool -> - string -> - ('a -> 'b) Ctypes.fn -> - ('a -> 'b) -(** [foreign name typ] exposes the C function of type [typ] named by [name] as - an OCaml value. - - The argument [?from], if supplied, is a library handle returned by - {!Dl.dlopen}. - - The argument [?stub], if [true] (defaults to [false]), indicates that the - function should not raise an exception if [name] is not found but return - an OCaml value that raises an exception when called. - - The value [?check_errno], which defaults to [false], indicates whether - {!Unix.Unix_error} should be raised if the C function modifies [errno]. - Please note that a function that succeeds is allowed to change errno. So - use this option with caution. - - The value [?release_runtime_lock], which defaults to [false], indicates - whether the OCaml runtime lock should be released during the call to the C - function, allowing other threads to run. If the runtime lock is released - then the C function must not access OCaml heap objects, such as arguments - passed using {!Ctypes.ocaml_string} and {!Ctypes.ocaml_bytes}, and must not - call back into OCaml. - - @raise Dl.DL_error if [name] is not found in [?from] and [?stub] is - [false]. *) - -val foreign_value : ?from:Dl.library -> string -> 'a Ctypes.typ -> 'a Ctypes.ptr -(** [foreign_value name typ] exposes the C value of type [typ] named by [name] - as an OCaml value. The argument [?from], if supplied, is a library handle - returned by {!Dl.dlopen}. *) - -val funptr : - ?abi:Libffi_abi.abi -> - ?name:string -> - ?check_errno:bool -> - ?runtime_lock:bool -> - ?thread_registration:bool -> - ('a -> 'b) Ctypes.fn -> - ('a -> 'b) Ctypes.typ -(** Construct a function pointer type from a function type. - - The ctypes library, like C itself, distinguishes functions and function - pointers. Functions are not first class: it is not possible to use them - as arguments or return values of calls, or store them in addressable - memory. Function pointers are first class, and so have none of these - restrictions. - - The value [?check_errno], which defaults to [false], indicates whether - {!Unix.Unix_error} should be raised if the C function modifies [errno]. - - The value [?runtime_lock], which defaults to [false], indicates whether - the OCaml runtime lock should be released during the call to the C - function, allowing other threads to run. If the runtime lock is released - then the C function must not access OCaml heap objects, such as arguments - passed using {!Ctypes.ocaml_string} and {!Ctypes.ocaml_bytes}, and must - not call back into OCaml. If the function pointer is used to call into - OCaml from C then the [?runtime_lock] argument indicates whether the lock - should be acquired and held during the call. - - @raise Dl.DL_error if [name] is not found in [?from] and [?stub] is - [false]. - - A note on lifetime: this function ties the lifetime of the C function to - the associated OCaml closure, so that the C function may be used only - while the closure is still live. - - The {!dynamic_funptr} function is an alternative to {!funptr} with explicit - lifetime management. - *) - -val funptr_opt : - ?abi:Libffi_abi.abi -> - ?name:string -> - ?check_errno:bool -> - ?runtime_lock:bool -> - ?thread_registration:bool -> - ('a -> 'b) Ctypes.fn -> - ('a -> 'b) option Ctypes.typ -(** Construct a function pointer type from a function type. - - This behaves like {!funptr}, except that null pointers appear in OCaml as - [None]. *) - -exception CallToExpiredClosure -(** A closure passed to C was collected by the OCaml garbage collector before - it was called. *) - -module type Funptr = sig - type fn - (** [fn] is the signature of the underlying OCaml function. *) - - type t - (** Handle to an OCaml function that can be passed to C for use in - callbacks. - - Each value of type {!t} allocated by {!of_fun} must be deallocated by - calling {!free}. Alternatively {!with_fun} encapsulates both allocation - and deallocation. *) - - val t : t Ctypes.typ - (** A type representation for a function pointer type with explicit lifetime - management. *) - - val t_opt : t option Ctypes.typ - (** This behaves like {!t}, except that null pointers appear in OCaml as [None]. *) - - val free : t -> unit - (** Indicate that the [fptr] is no longer needed. - - Once [free] has been called any C calls to this [Dynamic_funptr.t] are - unsafe. Only call [free] once the callback is no longer used from C. *) - - val of_fun : fn -> t - (** Turn an OCaml closure into a function pointer that can be passed to C. - - The function pointer returned by [of_fun] should be deallocated by a - call to {!free} once it is no longer in use. Failure to call {!free} is - an error. - - Alternatively, {!with_fun} encapsulates both allocation and - deallocation. - - Implementation detail: to avoid crashes, if {!free} is not called then - the implementation will retain a reference to the OCaml closure and - report a warning. See {!report_leaked_funptr}. *) - - val with_fun : fn -> (t -> 'c) -> 'c -(** [with_fun fn (fun fptr -> e)] - Turn an OCaml closure into a function - pointer and perform simple life cycle management. - - [with_fun fn (fun fptr -> e)] will call [free fptr] after [e] completes. - - [with_fun] is not safe to use if the C function ptr [fptr] may still be - used after [e] completes. *) -end - -val dynamic_funptr - : ?abi:Libffi_abi.abi - -> ?runtime_lock:bool - -> ?thread_registration:bool - -> ('a -> 'b) Ctypes.fn - -> (module Funptr with type fn = 'a->'b) -(** Define a type representation for passing OCaml functions to C with - explicit lifetime management. - - [(val (dynamic_funptr (foo @-> returning bar)))] corresponds to - the C type [bar( * )(foo)]. - - Example: - {[ - module Progress_callback = - (val (dynamic_funptr (int @-> int @-> ptr void @-> returning void))) - let keygen = foreign "RSA_generate_key" - (int @-> int @-> Progress_callback.t @-> ptr void @-> returning rsa_key) - let secret_key = - Progress_callback.with_fun - (fun a b _ -> printf "progress: a:%d, b:%d\n" a b) - (fun progress -> - keygen 2048 65537 progress null) - ]} -*) - -val report_leaked_funptr : (string -> unit) ref -(** Hook called on collection of closures associated with - {!dynamic_funptr} values that have not been deallocated with {!free}. - - By default the ctypes library retains closures associated with function - pointers that have not been freed and prints a warning to stderr. - - You can use this hook to change how these error messages are reported. - *) diff --git a/src/ctypes-foreign-base/ctypes_closure_properties.ml b/src/ctypes-foreign/ctypes_closure_properties.ml similarity index 100% rename from src/ctypes-foreign-base/ctypes_closure_properties.ml rename to src/ctypes-foreign/ctypes_closure_properties.ml diff --git a/src/ctypes-foreign-base/ctypes_closure_properties.mli b/src/ctypes-foreign/ctypes_closure_properties.mli similarity index 100% rename from src/ctypes-foreign-base/ctypes_closure_properties.mli rename to src/ctypes-foreign/ctypes_closure_properties.mli diff --git a/src/ctypes-foreign-base/ctypes_ffi.ml b/src/ctypes-foreign/ctypes_ffi.ml similarity index 100% rename from src/ctypes-foreign-base/ctypes_ffi.ml rename to src/ctypes-foreign/ctypes_ffi.ml diff --git a/src/ctypes-foreign-base/ctypes_ffi.mli b/src/ctypes-foreign/ctypes_ffi.mli similarity index 100% rename from src/ctypes-foreign-base/ctypes_ffi.mli rename to src/ctypes-foreign/ctypes_ffi.mli diff --git a/src/ctypes-foreign-base/ctypes_ffi_stubs.ml b/src/ctypes-foreign/ctypes_ffi_stubs.ml similarity index 100% rename from src/ctypes-foreign-base/ctypes_ffi_stubs.ml rename to src/ctypes-foreign/ctypes_ffi_stubs.ml diff --git a/src/ctypes-foreign-base/ctypes_foreign_basis.ml b/src/ctypes-foreign/ctypes_foreign_basis.ml similarity index 100% rename from src/ctypes-foreign-base/ctypes_foreign_basis.ml rename to src/ctypes-foreign/ctypes_foreign_basis.ml diff --git a/src/ctypes-foreign-threaded/ctypes_foreign_threaded_stubs.ml b/src/ctypes-foreign/ctypes_foreign_threaded_stubs.ml similarity index 100% rename from src/ctypes-foreign-threaded/ctypes_foreign_threaded_stubs.ml rename to src/ctypes-foreign/ctypes_foreign_threaded_stubs.ml diff --git a/src/ctypes-foreign-base/ctypes_weak_ref.ml b/src/ctypes-foreign/ctypes_weak_ref.ml similarity index 100% rename from src/ctypes-foreign-base/ctypes_weak_ref.ml rename to src/ctypes-foreign/ctypes_weak_ref.ml diff --git a/src/ctypes-foreign-base/ctypes_weak_ref.mli b/src/ctypes-foreign/ctypes_weak_ref.mli similarity index 100% rename from src/ctypes-foreign-base/ctypes_weak_ref.mli rename to src/ctypes-foreign/ctypes_weak_ref.mli diff --git a/src/ctypes-foreign-base/dl.ml.unix b/src/ctypes-foreign/dl.ml.unix similarity index 100% rename from src/ctypes-foreign-base/dl.ml.unix rename to src/ctypes-foreign/dl.ml.unix diff --git a/src/ctypes-foreign-base/dl.ml.win b/src/ctypes-foreign/dl.ml.win similarity index 100% rename from src/ctypes-foreign-base/dl.ml.win rename to src/ctypes-foreign/dl.ml.win diff --git a/src/ctypes-foreign-base/dl.mli b/src/ctypes-foreign/dl.mli similarity index 100% rename from src/ctypes-foreign-base/dl.mli rename to src/ctypes-foreign/dl.mli diff --git a/src/ctypes-foreign-base/dl_stubs.c.unix b/src/ctypes-foreign/dl_stubs.c.unix similarity index 100% rename from src/ctypes-foreign-base/dl_stubs.c.unix rename to src/ctypes-foreign/dl_stubs.c.unix diff --git a/src/ctypes-foreign-base/dl_stubs.c.win b/src/ctypes-foreign/dl_stubs.c.win similarity index 100% rename from src/ctypes-foreign-base/dl_stubs.c.win rename to src/ctypes-foreign/dl_stubs.c.win diff --git a/src/ctypes-foreign-base/ffi_call_stubs.c b/src/ctypes-foreign/ffi_call_stubs.c similarity index 100% rename from src/ctypes-foreign-base/ffi_call_stubs.c rename to src/ctypes-foreign/ffi_call_stubs.c diff --git a/src/ctypes-foreign-base/ffi_type_stubs.c b/src/ctypes-foreign/ffi_type_stubs.c similarity index 100% rename from src/ctypes-foreign-base/ffi_type_stubs.c rename to src/ctypes-foreign/ffi_type_stubs.c diff --git a/src/ctypes-foreign-threaded/foreign.ml b/src/ctypes-foreign/foreign.ml similarity index 100% rename from src/ctypes-foreign-threaded/foreign.ml rename to src/ctypes-foreign/foreign.ml diff --git a/src/ctypes-foreign-threaded/foreign.mli b/src/ctypes-foreign/foreign.mli similarity index 100% rename from src/ctypes-foreign-threaded/foreign.mli rename to src/ctypes-foreign/foreign.mli diff --git a/src/ctypes-foreign-threaded/foreign_threaded_stubs.c b/src/ctypes-foreign/foreign_threaded_stubs.c similarity index 100% rename from src/ctypes-foreign-threaded/foreign_threaded_stubs.c rename to src/ctypes-foreign/foreign_threaded_stubs.c diff --git a/src/ctypes-foreign-base/libffi_abi.mli b/src/ctypes-foreign/libffi_abi.mli similarity index 100% rename from src/ctypes-foreign-base/libffi_abi.mli rename to src/ctypes-foreign/libffi_abi.mli