Add rules for swig.cmi, swig.cmo, and swigp4.cmi
In addition, give runme executables unique names (based on the go Makefile).
This commit is contained in:
parent
98af86f58b
commit
7c653ba7df
1 changed files with 21 additions and 5 deletions
|
|
@ -3,7 +3,8 @@
|
|||
#######################################################################
|
||||
|
||||
LANGUAGE = ocaml
|
||||
OCAMLC = @OCAMLC@
|
||||
OCAMLP4WHERE =`$(COMPILETOOL) @CAMLP4@ -where`
|
||||
OCC =$(COMPILETOOL) @OCAMLC@
|
||||
VARIANT = _static
|
||||
SCRIPTSUFFIX = _runme.ml
|
||||
|
||||
|
|
@ -53,11 +54,11 @@ run_testcase = \
|
|||
if [ $(srcdir) != . ]; then \
|
||||
cp $(srcdir)/$(ml_runme) $(ml_runme); \
|
||||
fi ; \
|
||||
$(COMPILETOOL) $(OCAMLC) -c $(ml_runme) && \
|
||||
$(OCC) -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_obs: swig.cmi swig.cmo swigp4.cmi
|
||||
|
||||
$(C_TEST_CASES:=.ctest): extra_obs
|
||||
$(CPP_TEST_CASES:=.cpptest): extra_obs
|
||||
$(MULTI_CPP_TEST_CASES:=.multicpptest): extra_obs
|
||||
|
||||
# Clean
|
||||
%.clean:
|
||||
@rm -f $*.ml $*.mli;
|
||||
@rm -f $*.ml $*.mli $*_runme;
|
||||
@if test $(srcdir) != .; then rm -f $(ml_runme); fi
|
||||
|
||||
clean:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue