Skip to content

Commit

Permalink
Merge pull request #537 from yallop/cstubs-split-foreign
Browse files Browse the repository at this point in the history
Move Cstubs_internals and FOREIGN from cstubs to ctypes
  • Loading branch information
yallop authored Jul 14, 2017
2 parents 6d70e0d + 56733ea commit 75b9010
Show file tree
Hide file tree
Showing 43 changed files with 143 additions and 120 deletions.
18 changes: 9 additions & 9 deletions .depend
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ _build/examples/date/stub-generation/bindings/date_stubs.cmo : _build/src/ctypes
_build/examples/date/stub-generation/bindings/date_stubs.cmx : _build/src/ctypes/posixTypes.cmx _build/src/ctypes/ctypes.cmx _build/src/cstubs/cstubs.cmx
_build/examples/date/stub-generation/date_cmd.cmo : _build/src/ctypes/posixTypes.cmi _build/src/ctypes/ctypes.cmi
_build/examples/date/stub-generation/date_cmd.cmx : _build/src/ctypes/posixTypes.cmx _build/src/ctypes/ctypes.cmx
_build/examples/date/stub-generation/date_generated.cmo : _build/src/ctypes/ctypes.cmi _build/src/cstubs/cstubs_internals.cmi
_build/examples/date/stub-generation/date_generated.cmx : _build/src/ctypes/ctypes.cmx _build/src/cstubs/cstubs_internals.cmx
_build/examples/date/stub-generation/date_generated.cmo : _build/src/ctypes/ctypes.cmi _build/src/ctypes/cstubs_internals.cmi
_build/examples/date/stub-generation/date_generated.cmx : _build/src/ctypes/ctypes.cmx _build/src/ctypes/cstubs_internals.cmx
_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_cmd.cmo : _build/src/ctypes/ctypes.cmi
Expand All @@ -29,8 +29,8 @@ _build/examples/fts/stub-generation/bindings/fts_types.cmo : _build/src/ctypes/p
_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/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_generated.cmo : _build/src/ctypes/ctypes.cmi _build/src/cstubs/cstubs_internals.cmi
_build/examples/fts/stub-generation/fts_generated.cmx : _build/src/ctypes/ctypes.cmx _build/src/cstubs/cstubs_internals.cmx
_build/examples/fts/stub-generation/fts_generated.cmo : _build/src/ctypes/ctypes.cmi _build/src/ctypes/cstubs_internals.cmi
_build/examples/fts/stub-generation/fts_generated.cmx : _build/src/ctypes/ctypes.cmx _build/src/ctypes/cstubs_internals.cmx
_build/examples/fts/stub-generation/fts_if.cmo : _build/src/ctypes/ctypes.cmi
_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
Expand All @@ -42,8 +42,8 @@ _build/examples/ncurses/foreign/ncurses.cmo : _build/src/ctypes-foreign-threaded
_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/stub-generation/bindings/ncurses_bindings.cmo : _build/src/ctypes/ctypes.cmi _build/src/cstubs/cstubs.cmi
_build/examples/ncurses/stub-generation/bindings/ncurses_bindings.cmx : _build/src/ctypes/ctypes.cmx _build/src/cstubs/cstubs.cmx
_build/examples/ncurses/stub-generation/ncurses_generated.cmo : _build/src/ctypes/ctypes.cmi _build/src/cstubs/cstubs_internals.cmi
_build/examples/ncurses/stub-generation/ncurses_generated.cmx : _build/src/ctypes/ctypes.cmx _build/src/cstubs/cstubs_internals.cmx
_build/examples/ncurses/stub-generation/ncurses_generated.cmo : _build/src/ctypes/ctypes.cmi _build/src/ctypes/cstubs_internals.cmi
_build/examples/ncurses/stub-generation/ncurses_generated.cmx : _build/src/ctypes/ctypes.cmx _build/src/ctypes/cstubs_internals.cmx
_build/examples/ncurses/stub-generation/ncurses_stub_cmd.cmo :
_build/examples/ncurses/stub-generation/ncurses_stub_cmd.cmx :
_build/examples/sigset/sigset.cmi : _build/src/ctypes/posixTypes.cmi _build/src/ctypes/ctypes.cmi
Expand Down Expand Up @@ -74,9 +74,9 @@ _build/src/cstubs/cstubs_generate_c.cmx : _build/src/ctypes/ctypes_static.cmx _b
_build/src/cstubs/cstubs_generate_ml.cmi : _build/src/ctypes/ctypes.cmi
_build/src/cstubs/cstubs_generate_ml.cmo : _build/src/ctypes/ctypes_static.cmi _build/src/ctypes/ctypes_primitive_types.cmi _build/src/cstubs/ctypes_path.cmi _build/src/ctypes/ctypes.cmi _build/src/cstubs/cstubs_public_name.cmi _build/src/cstubs/cstubs_errors.cmi _build/src/cstubs/cstubs_analysis.cmi _build/src/cstubs/cstubs_generate_ml.cmi
_build/src/cstubs/cstubs_generate_ml.cmx : _build/src/ctypes/ctypes_static.cmx _build/src/ctypes/ctypes_primitive_types.cmx _build/src/cstubs/ctypes_path.cmx _build/src/ctypes/ctypes.cmx _build/src/cstubs/cstubs_public_name.cmx _build/src/cstubs/cstubs_errors.cmx _build/src/cstubs/cstubs_analysis.cmx _build/src/cstubs/cstubs_generate_ml.cmi
_build/src/cstubs/cstubs_internals.cmi : _build/src/ctypes/lDouble.cmi _build/src/ctypes/ctypes_static.cmi _build/src/ctypes/ctypes_ptr.cmo _build/src/ctypes/ctypes_primitive_types.cmi _build/src/ctypes/ctypes_memory_stubs.cmo _build/src/ctypes/ctypes_bigarray.cmi _build/src/ctypes/ctypes.cmi _build/src/ctypes/complexL.cmi
_build/src/cstubs/cstubs_internals.cmo : _build/src/ctypes/ctypes_static.cmi _build/src/ctypes/ctypes_ptr.cmo _build/src/ctypes/ctypes_primitive_types.cmi _build/src/ctypes/ctypes_memory_stubs.cmo _build/src/ctypes/ctypes.cmi _build/src/cstubs/cstubs_internals.cmi
_build/src/cstubs/cstubs_internals.cmx : _build/src/ctypes/ctypes_static.cmx _build/src/ctypes/ctypes_ptr.cmx _build/src/ctypes/ctypes_primitive_types.cmx _build/src/ctypes/ctypes_memory_stubs.cmx _build/src/ctypes/ctypes.cmx _build/src/cstubs/cstubs_internals.cmi
_build/src/ctypes/cstubs_internals.cmi : _build/src/ctypes/lDouble.cmi _build/src/ctypes/ctypes_static.cmi _build/src/ctypes/ctypes_ptr.cmo _build/src/ctypes/ctypes_primitive_types.cmi _build/src/ctypes/ctypes_memory_stubs.cmo _build/src/ctypes/ctypes_bigarray.cmi _build/src/ctypes/ctypes.cmi _build/src/ctypes/complexL.cmi
_build/src/ctypes/cstubs_internals.cmo : _build/src/ctypes/ctypes_static.cmi _build/src/ctypes/ctypes_ptr.cmo _build/src/ctypes/ctypes_primitive_types.cmi _build/src/ctypes/ctypes_memory_stubs.cmo _build/src/ctypes/ctypes.cmi _build/src/ctypes/cstubs_internals.cmi
_build/src/ctypes/cstubs_internals.cmx : _build/src/ctypes/ctypes_static.cmx _build/src/ctypes/ctypes_ptr.cmx _build/src/ctypes/ctypes_primitive_types.cmx _build/src/ctypes/ctypes_memory_stubs.cmx _build/src/ctypes/ctypes.cmx _build/src/ctypes/cstubs_internals.cmi
_build/src/cstubs/cstubs_inverted.cmi : _build/src/ctypes/ctypes.cmi
_build/src/cstubs/cstubs_inverted.cmo : _build/src/ctypes/ctypes_type_printing.cmi _build/src/ctypes/ctypes.cmi _build/src/cstubs/cstubs_generate_ml.cmi _build/src/cstubs/cstubs_generate_c.cmi _build/src/cstubs/cstubs_inverted.cmi
_build/src/cstubs/cstubs_inverted.cmx : _build/src/ctypes/ctypes_type_printing.cmx _build/src/ctypes/ctypes.cmx _build/src/cstubs/cstubs_generate_ml.cmx _build/src/cstubs/cstubs_generate_c.cmx _build/src/cstubs/cstubs_inverted.cmi
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ clean: clean-examples clean-tests
rm -f $(GENERATED)

# ctypes subproject
ctypes.cmi_only = ctypes_static ctypes_primitive_types ctypes_structs
ctypes.cmi_only = ctypes_static ctypes_primitive_types ctypes_structs cstubs_internals
ctypes.public = lDouble complexL ctypes posixTypes ctypes_types
ctypes.dir = src/ctypes
ctypes.extra_mls = ctypes_primitives.ml
Expand All @@ -77,7 +77,6 @@ ctypes: PROJECT=ctypes
ctypes: $(ctypes.dir)/$(ctypes.extra_mls) $$(LIB_TARGETS)

# cstubs subproject
cstubs.cmi_only = cstubs_internals
cstubs.public = cstubs_structs cstubs cstubs_inverted
cstubs.dir = src/cstubs
cstubs.subproject_deps = ctypes
Expand Down
25 changes: 17 additions & 8 deletions Makefile.examples
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
fts-stubs.install = no
fts-stubs.dir = examples/fts/stub-generation/bindings
fts-stubs.deps = integers
fts-stubs.subproject_deps = ctypes cstubs \
fts-stubs.subproject_deps = ctypes \
ctypes-foreign-base ctypes-foreign-unthreaded
fts-stubs: PROJECT=fts-stubs
fts-stubs: $$(LIB_TARGETS)
Expand All @@ -20,7 +20,7 @@ fts-stub-generator: $$(NATIVE_TARGET)

fts-cmd.install = no
fts-cmd.dir = examples/fts/stub-generation
fts-cmd.subproject_deps = ctypes cstubs \
fts-cmd.subproject_deps = ctypes \
ctypes-foreign-base ctypes-foreign-unthreaded fts-stubs
fts-cmd.deps = bytes str unix bigarray integers
fts-cmd.extra_mls = fts_generated.ml
Expand All @@ -44,7 +44,7 @@ fts: $$(NATIVE_TARGET)
# subproject: date with stub generation
date-stubs.install = no
date-stubs.dir = examples/date/stub-generation/bindings
date-stubs.subproject_deps = ctypes cstubs
date-stubs.subproject_deps = ctypes
date-stubs: PROJECT=date-stubs
date-stubs: $$(LIB_TARGETS)

Expand All @@ -57,7 +57,7 @@ date-stub-generator: $$(NATIVE_TARGET)

date-cmd.install = no
date-cmd.dir = examples/date/stub-generation
date-cmd.subproject_deps = ctypes cstubs date-stubs
date-cmd.subproject_deps = ctypes date-stubs
date-cmd.deps = bytes str unix bigarray integers
date-cmd.extra_mls = date_generated.ml
date-cmd.extra_cs = date_stubs.c
Expand All @@ -79,14 +79,23 @@ date: $$(NATIVE_TARGET)
# subproject: ncurses with stub generation
ncurses-stubs.install = no
ncurses-stubs.dir = examples/ncurses/stub-generation/bindings
ncurses-stubs.subproject_deps = ctypes cstubs
ncurses-stubs.subproject_deps = ctypes
ncurses-stubs.deps = bytes str unix bigarray integers
ncurses-stubs: PROJECT=ncurses-stubs
ncurses-stubs: $$(NATIVE_TARGET) $$(LIB_TARGETS)

ncurses-stub-generator.install = no
ncurses-stub-generator.dir = examples/ncurses/stub-generation/stub-generator
ncurses-stub-generator.deps = integers
ncurses-stub-generator.subproject_deps = ctypes cstubs \
ctypes-foreign-base ctypes-foreign-unthreaded ncurses-stubs
ncurses-stub-generator.deps = bytes str unix bigarray integers
ncurses-stub-generator: PROJECT=ncurses-stub-generator
ncurses-stub-generator: $$(NATIVE_TARGET)

ncurses-cmd.install = no
ncurses-cmd.dir = examples/ncurses/stub-generation
ncurses-cmd.subproject_deps = ctypes cstubs ncurses-stubs
ncurses-cmd.subproject_deps = ctypes ncurses-stubs
ncurses-cmd.deps = bytes str unix bigarray integers
ncurses-cmd.extra_mls = ncurses_generated.ml
ncurses-cmd.extra_cs = ncurses_stubs.c
Expand All @@ -96,7 +105,7 @@ ncurses-cmd: $$(NATIVE_TARGET)

ncurses-cmd-build: examples/ncurses/stub-generation/ncurses_generated.ml
examples/ncurses/stub-generation/ncurses_generated.ml: ncurses-stubs
_build/ncurses-stubs.native
_build/ncurses-stub-generator.native

# subproject: ncurses using dynamic linking (foreign)
ncurses.install = no
Expand All @@ -108,7 +117,7 @@ ncurses: PROJECT=ncurses
ncurses: $$(NATIVE_TARGET)

EXAMPLES =
EXAMPLES += ncurses ncurses-stubs ncurses-cmd-build ncurses-cmd
EXAMPLES += ncurses ncurses-stubs ncurses-stub-generator ncurses-cmd-build ncurses-cmd
EXAMPLES += fts fts-stubs fts-stub-generator fts-cmd-build fts-cmd
EXAMPLES += date date-stubs date-stub-generator date-cmd-build date-cmd

Expand Down
Loading

0 comments on commit 75b9010

Please sign in to comment.