diff --git a/Examples/Makefile.in b/Examples/Makefile.in index 8775af330..feef7ff05 100644 --- a/Examples/Makefile.in +++ b/Examples/Makefile.in @@ -893,6 +893,13 @@ ocaml_dynamic_cpp: $(SRCS) -package dl -linkpkg \ $(INTERFACE:%.i=%.cmo) $(PROGFILE:%.ml=%.cmo) -cc '$(CXX) -Wno-write-strings' +# ----------------------------------------------------------------- +# Run ocaml example +# ----------------------------------------------------------------- + +ocaml_run: + $(RUNTOOL) false $(RUNPIPE) + # ----------------------------------------------------------------- # Version display # ----------------------------------------------------------------- diff --git a/Examples/ocaml/argout_ref/Makefile b/Examples/ocaml/argout_ref/Makefile index 8a260fe30..4e12e3769 100644 --- a/Examples/ocaml/argout_ref/Makefile +++ b/Examples/ocaml/argout_ref/Makefile @@ -7,21 +7,22 @@ MLFILE = example.ml PROGFILE = example_prog.ml OBJS = example.o -all:: static +check: build + $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' ocaml_run -static:: +build: static + +static: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' MLFILE='$(MLFILE)' \ PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \ ocaml_static_cpp -dynamic:: +dynamic: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' MLFILE='$(MLFILE)' \ PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \ ocaml_dynamic_cpp -clean:: +clean: $(MAKE) -f $(TOP)/Makefile MLFILE='$(MLFILE)' ocaml_clean - -check: all diff --git a/Examples/ocaml/contract/Makefile b/Examples/ocaml/contract/Makefile index 8e0f2a4fd..91d39247e 100644 --- a/Examples/ocaml/contract/Makefile +++ b/Examples/ocaml/contract/Makefile @@ -7,27 +7,28 @@ MLFILE = example.ml PROGFILE = example_prog.ml OBJS = -all:: static +check: build + $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' ocaml_run -dynamic:: +build: static + +dynamic: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' MLFILE='$(MLFILE)' \ PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \ ocaml_dynamic -static:: +static: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' MLFILE='$(MLFILE)' \ PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \ ocaml_static -toplevel:: +toplevel: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' MLFILE='$(MLFILE)' \ PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \ ocaml_static_toplevel -clean:: +clean: $(MAKE) -f $(TOP)/Makefile MLFILE='$(MLFILE)' ocaml_clean - -check: all diff --git a/Examples/ocaml/scoped_enum/Makefile b/Examples/ocaml/scoped_enum/Makefile index 45c5edca4..4920e3b3b 100644 --- a/Examples/ocaml/scoped_enum/Makefile +++ b/Examples/ocaml/scoped_enum/Makefile @@ -7,27 +7,28 @@ MLFILE = example.ml PROGFILE = example_prog.ml OBJS = -all:: static +check: build + $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' ocaml_run -dynamic:: +build: static + +dynamic: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' MLFILE='$(MLFILE)' \ PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \ ocaml_dynamic_cpp -static:: +static: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' MLFILE='$(MLFILE)' \ PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \ ocaml_static_cpp -toplevel:: +toplevel: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' MLFILE='$(MLFILE)' \ PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \ ocaml_static_cpp_toplevel -clean:: +clean: $(MAKE) -f $(TOP)/Makefile MLFILE='$(MLFILE)' ocaml_clean - -check: all diff --git a/Examples/ocaml/shapes/Makefile b/Examples/ocaml/shapes/Makefile index 31f9934a7..38230eb69 100644 --- a/Examples/ocaml/shapes/Makefile +++ b/Examples/ocaml/shapes/Makefile @@ -8,27 +8,28 @@ MLFILE = example.ml PROGFILE = example_prog.ml OBJS = example.o -all:: static static_top +check: build + $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' ocaml_run -static:: +build: static static_top + +static: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ MLFILE='$(MLFILE)' PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \ ocaml_static_cpp -static_top:: +static_top: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ MLFILE='$(MLFILE)' PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \ ocaml_static_cpp_toplevel -dynamic:: +dynamic: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' MLFILE='$(MLFILE)' PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \ ocaml_dynamic_cpp -clean:: +clean: $(MAKE) -f $(TOP)/Makefile MLFILE='$(MLFILE)' ocaml_clean - -check: all diff --git a/Examples/ocaml/simple/Makefile b/Examples/ocaml/simple/Makefile index 4b85bf33e..64c7256c1 100644 --- a/Examples/ocaml/simple/Makefile +++ b/Examples/ocaml/simple/Makefile @@ -7,27 +7,28 @@ MLFILE = example.ml PROGFILE = example_prog.ml OBJS = example.o -all:: static +check: build + $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' ocaml_run -dynamic:: +build: static + +dynamic: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' MLFILE='$(MLFILE)' \ PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \ ocaml_dynamic -static:: +static: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' MLFILE='$(MLFILE)' \ PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \ ocaml_static -toplevel:: +toplevel: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' MLFILE='$(MLFILE)' \ PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \ ocaml_static_toplevel -clean:: +clean: $(MAKE) -f $(TOP)/Makefile MLFILE='$(MLFILE)' ocaml_clean - -check: all diff --git a/Examples/ocaml/std_string/Makefile b/Examples/ocaml/std_string/Makefile index e5a8017ae..0250cfd2d 100644 --- a/Examples/ocaml/std_string/Makefile +++ b/Examples/ocaml/std_string/Makefile @@ -5,19 +5,20 @@ TARGET = example INTERFACE = example.i PROGFILE = runme.ml -all default:: static +check: build + $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' ocaml_run -static:: +build: static + +static: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ PROGFILE='$(PROGFILE)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ ocaml_static_cpp -dynamic:: +dynamic: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ PROGFILE='$(PROGFILE)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ ocaml_dynamic_cpp -clean:: +clean: $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' ocaml_clean - -check: all diff --git a/Examples/ocaml/std_vector/Makefile b/Examples/ocaml/std_vector/Makefile index e5a8017ae..0250cfd2d 100644 --- a/Examples/ocaml/std_vector/Makefile +++ b/Examples/ocaml/std_vector/Makefile @@ -5,19 +5,20 @@ TARGET = example INTERFACE = example.i PROGFILE = runme.ml -all default:: static +check: build + $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' ocaml_run -static:: +build: static + +static: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ PROGFILE='$(PROGFILE)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ ocaml_static_cpp -dynamic:: +dynamic: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ PROGFILE='$(PROGFILE)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ ocaml_dynamic_cpp -clean:: +clean: $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' ocaml_clean - -check: all diff --git a/Examples/ocaml/stl/Makefile b/Examples/ocaml/stl/Makefile index fa4333ec0..545f3229a 100644 --- a/Examples/ocaml/stl/Makefile +++ b/Examples/ocaml/stl/Makefile @@ -5,29 +5,30 @@ TARGET = example INTERFACE = example.i PROGFILE = runme.ml -all default:: static +check: build + $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' ocaml_run -static:: +build: static + +static: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ PROGFILE='$(PROGFILE)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ ocaml_static_cpp -director:: +director: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ PROGFILE='$(PROGFILE)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ ocaml_static_cpp_director -dynamic:: +dynamic: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ PROGFILE='$(PROGFILE)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ ocaml_static_cpp -toplevel:: +toplevel: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ PROGFILE='$(PROGFILE)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ ocaml_static_cpp_toplevel -clean:: +clean: $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' ocaml_clean - -check: all diff --git a/Examples/ocaml/string_from_ptr/Makefile b/Examples/ocaml/string_from_ptr/Makefile index 350d9734c..f7b808934 100644 --- a/Examples/ocaml/string_from_ptr/Makefile +++ b/Examples/ocaml/string_from_ptr/Makefile @@ -8,27 +8,28 @@ MLFILE = foolib.ml PROGFILE = example_prog.ml OBJS = -all:: static static_top +check: build + $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' ocaml_run -static:: +build: static static_top + +static: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ MLFILE='$(MLFILE)' PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \ ocaml_static_cpp -static_top:: +static_top: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ MLFILE='$(MLFILE)' PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \ ocaml_static_cpp_toplevel -dynamic:: +dynamic: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' MLFILE='$(MLFILE)' PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \ ocaml_dynamic_cpp -clean:: +clean: $(MAKE) -f $(TOP)/Makefile MLFILE='$(MLFILE)' ocaml_clean - -check: all diff --git a/Examples/ocaml/strings_test/Makefile b/Examples/ocaml/strings_test/Makefile index 8d1f96edf..14f55e0d9 100644 --- a/Examples/ocaml/strings_test/Makefile +++ b/Examples/ocaml/strings_test/Makefile @@ -5,24 +5,25 @@ TARGET = example INTERFACE = example.i PROGFILE = runme.ml -all default:: static top +check: build + $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' ocaml_run -static:: +build: static top + +static: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ PROGFILE='$(PROGFILE)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ ocaml_static_cpp -dynamic:: +dynamic: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ PROGFILE='$(PROGFILE)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ ocaml_static_cpp -top:: +top: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ PROGFILE='$(PROGFILE)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ ocaml_static_cpp_toplevel -clean:: +clean: $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' ocaml_clean - -check: all