Replace mv hack.

This commit is contained in:
Zackery Spytz 2019-01-02 01:33:53 -07:00
commit 5f941bc3c7

View file

@ -44,16 +44,19 @@ preproc_constants_c \
string_simple \
unions \
ml_runme = $(SCRIPTPREFIX)$*$(SCRIPTSUFFIX)
run_testcase = \
if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) -a \
-f $(top_srcdir)/Examples/test-suite/$*.list ] ; then \
$(COMPILETOOL) $(OCAMLC) -c $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
$(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; \
elif [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
$(COMPILETOOL) $(OCAMLC) -c $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
$(foreach ext,cmo cmi,mv $(srcdir)/$(*)_runme.$(ext) $(*)_runme.$(ext) 2>/dev/null;) \
$(COMPILETOOL) $(OCAMLC) swig.cmo -custom -g -cc '$(CXX)' -o runme $(*).cmo $(*)_runme.cmo $(*)_wrap.o && \
$(RUNTOOL) ./runme; \
if [ -f $(srcdir)/$(ml_runme) ]; then \
if [ $(srcdir) != $(SCRIPTDIR) ]; then \
cp $(srcdir)/$(ml_runme) $(ml_runme); \
fi ; \
$(COMPILETOOL) $(OCAMLC) -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; \
else \
$(COMPILETOOL) $(OCAMLC) swig.cmo -custom -g -cc '$(CXX)' -o runme $(*).cmo $(*)_runme.cmo $(*)_wrap.o && $(RUNTOOL) ./runme; \
fi ; \
fi ;
check_quant:
@ -68,7 +71,7 @@ check_quant:
include $(srcdir)/../common.mk
# Overridden variables here
# none!
SCRIPTDIR = .
# Custom tests - tests with additional commandline options
# none!