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