diff options
Diffstat (limited to 'Examples/test-suite/ocaml/Makefile.in')
-rw-r--r-- | Examples/test-suite/ocaml/Makefile.in | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/Examples/test-suite/ocaml/Makefile.in b/Examples/test-suite/ocaml/Makefile.in index 5e4960169..23b05e477 100644 --- a/Examples/test-suite/ocaml/Makefile.in +++ b/Examples/test-suite/ocaml/Makefile.in @@ -3,7 +3,8 @@ ####################################################################### LANGUAGE = ocaml -OCAMLC = @OCAMLC@ +OCAMLP4WHERE =`$(COMPILETOOL) @CAMLP4@ -where` +OCC =$(COMPILETOOL) @OCAMLC@ OCAMLPP = -pp "camlp4o ./swigp4.cmo" VARIANT = _static SCRIPTSUFFIX = _runme.ml @@ -53,11 +54,11 @@ run_testcase = \ if [ $(srcdir) != . ]; then \ cp $(srcdir)/$(ml_runme) $(ml_runme); \ fi ; \ - $(COMPILETOOL) $(OCAMLC) $(OCAMLPP) -c $(ml_runme) && \ + $(OCC) $(OCAMLPP) -c $(ml_runme) && \ if [ -f $(top_srcdir)/Examples/test-suite/$*.list ]; then \ - $(COMPILETOOL) $(OCAMLC) swig.cmo -custom -g -cc '$(CXX)' -o runme `cat $(top_srcdir)/Examples/test-suite/$(*).list | sed -e 's/\(.*\)/\1_wrap.o \1.cmo/g'`&& $(RUNTOOL) ./runme; \ + $(OCC) swig.cmo -custom -g -cc '$(CXX)' -o $*_runme `cat $(top_srcdir)/Examples/test-suite/$(*).list | sed -e 's/\(.*\)/\1_wrap.o \1.cmo/g'`&& $(RUNTOOL) ./$*_runme; \ else \ - $(COMPILETOOL) $(OCAMLC) swig.cmo -custom -g -cc '$(CXX)' -o runme $(*).cmo $(*)_runme.cmo $(*)_wrap.o && $(RUNTOOL) ./runme; \ + $(OCC) swig.cmo -custom -g -cc '$(CXX)' -o $*_runme $(*).cmo $(*)_runme.cmo $(*)_wrap.o && $(RUNTOOL) ./$*_runme; \ fi ; \ fi ; @@ -85,9 +86,24 @@ include $(srcdir)/../common.mk $(setup) $(run_testcase) +swig.cmi: + env SWIG_LIB=$(SWIG_LIB_DIR) $(SWIGEXE) -ocaml -co swig.mli + $(OCC) -c swig.mli +swig.cmo: + env SWIG_LIB=$(SWIG_LIB_DIR) $(SWIGEXE) -ocaml -co swig.ml + $(OCC) -c swig.ml +swigp4.cmi: + env SWIG_LIB=$(SWIG_LIB_DIR) $(SWIGEXE) -ocaml -co swigp4.ml + $(OCC) -I $(OCAMLP4WHERE) -pp "camlp4o pa_extend.cmo q_MLast.cmo" -c swigp4.ml +extra_objects: swig.cmi swig.cmo swigp4.cmi + +$(C_TEST_CASES:=.ctest): extra_objects +$(CPP_TEST_CASES:=.cpptest): extra_objects +$(MULTI_CPP_TEST_CASES:=.multicpptest): extra_objects + # Clean %.clean: - @rm -f $*.ml $*.mli; + @rm -f $*.ml $*.mli $*_runme; @if test $(srcdir) != .; then rm -f $(ml_runme); fi clean: |