summaryrefslogtreecommitdiffstats
path: root/testsuite/makefiles/Makefile.several
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2013-05-14 17:05:21 +0000
committerDamien Doligez <damien.doligez-inria.fr>2013-05-14 17:05:21 +0000
commit0e199b5f7d94b9864742c7d9f03971208bec79d9 (patch)
treeaaf3ce8268054b99b5f774db423bab4dc14922d5 /testsuite/makefiles/Makefile.several
parent4efee60493fc7f2b70fd37db072858239c507df6 (diff)
testsuite: more cleanup of the makefiles
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13670 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'testsuite/makefiles/Makefile.several')
-rw-r--r--testsuite/makefiles/Makefile.several40
1 files changed, 32 insertions, 8 deletions
diff --git a/testsuite/makefiles/Makefile.several b/testsuite/makefiles/Makefile.several
index 0dfe5ca98..e09bb0804 100644
--- a/testsuite/makefiles/Makefile.several
+++ b/testsuite/makefiles/Makefile.several
@@ -24,11 +24,13 @@ FORTRAN_LIB=`if [ -n "$(F_FILES)" ]; then echo '$(FORTRAN_LIBRARY)'; fi`
ADD_CFLAGS+=$(FORTRAN_LIB)
ADD_OPTFLAGS+=$(FORTRAN_LIB)
+.PHONY: check
check:
@if [ -n "$(FORTRAN_COMPILER)" -o -z "$(F_FILES)" ]; then \
$(MAKE) run-all; \
fi
+.PHONY: run-all
run-all:
@for file in $(C_FILES); do \
$(CC) -c -I$(PREFIX)/lib/ocaml/caml $$file.c; \
@@ -41,19 +43,39 @@ run-all:
CANKILL=$(CANKILL) sh `basename $$file ml`precheck || continue; \
fi; \
printf " ... testing '$$file':"; \
- $(MAKE) run-file DESC=ocamlc COMP='$(OCAMLC)' COMPFLAGS='$(ADD_COMPFLAGS) $(ADD_CFLAGS) $(O_FILES) -w a $(CMA_FILES) -I $(OTOPDIR)/testsuite/lib $(CMO_FILES)' FILE=$$file PROGRAM_ARGS=$(PROGRAM_ARGS) \
- && if [ -z "$(BYTECODE_ONLY)" ]; then \
- $(MAKE) run-file DESC=ocamlopt COMP='$(OCAMLOPT)' COMPFLAGS='$(ADD_COMPFLAGS) $(ADD_OPTFLAGS) $(O_FILES) -w a $(CMXA_FILES) -I $(OTOPDIR)/testsuite/lib $(CMX_FILES)' FILE=$$file PROGRAM_ARGS=$(PROGRAM_ARGS); \
- fi \
- && if [ ! -z $(UNSAFE) ]; then \
- $(MAKE) run-file DESC=ocamlc-unsafe COMP='$(OCAMLC)' COMPFLAGS='-w a -unsafe -I $(OTOPDIR)/testsuite/lib $(CMO_FILES)' FILE=$$file \
- && if [ -z "$(BYTECODE_ONLY)" ]; then \
- $(MAKE) run-file DESC=ocamlopt-unsafe COMP='$(OCAMLOPT)' COMPFLAGS='-w a -unsafe -I $(OTOPDIR)/testsuite/lib $(CMX_FILES)' FILE=$$file; \
+ $(MAKE) run-file DESC=ocamlc COMP='$(OCAMLC)' \
+ COMPFLAGS='-w a $(ADD_COMPFLAGS) $(ADD_CFLAGS) $(O_FILES) \
+ $(CMA_FILES) -I $(OTOPDIR)/testsuite/lib \
+ $(CMO_FILES)' \
+ FILE=$$file PROGRAM_ARGS=$(PROGRAM_ARGS) \
+ && \
+ if [ -z "$(BYTECODE_ONLY)" ]; then \
+ $(MAKE) run-file DESC=ocamlopt COMP='$(OCAMLOPT)' \
+ COMPFLAGS='-w a $(ADD_COMPFLAGS) $(ADD_OPTFLAGS) $(O_FILES)\
+ $(CMXA_FILES) -I $(OTOPDIR)/testsuite/lib \
+ $(CMX_FILES)' \
+ FILE=$$file PROGRAM_ARGS=$(PROGRAM_ARGS); \
+ fi \
+ && \
+ if [ -n "$(UNSAFE)" ]; then \
+ $(MAKE) run-file DESC=ocamlc-unsafe COMP='$(OCAMLC)' \
+ COMPFLAGS='-w a -unsafe $(ADD_COMPFLAGS) $(ADD_CFLAGS) \
+ $(O_FILES) $(CMA_FILES) \
+ -I $(OTOPDIR)/testsuite/lib $(CMO_FILES)' \
+ FILE=$$file \
+ && \
+ if [ -z "$(BYTECODE_ONLY)" ]; then \
+ $(MAKE) run-file DESC=ocamlopt-unsafe COMP='$(OCAMLOPT)' \
+ COMPFLAGS='-w a -unsafe $(ADD_COMPFLAGS) $(ADD_OPTFLAGS) \
+ $(O_FILES) $(CMXA_FILES) -I $(OTOPDIR)/testsuite/lib \
+ $(CMX_FILES)' \
+ FILE=$$file; \
fi; \
fi \
&& echo " => passed" || echo " => failed"; \
done
+.PHONY: run-file
run-file:
@printf " $(DESC)"
@rm -f program program.exe
@@ -71,7 +93,9 @@ run-file:
$(DIFF) $$F.reference $$F.result >/dev/null; \
fi
+.PHONY: promote
promote: defaultpromote
+.PHONY: clean
clean: defaultclean
@rm -f *.result program program.exe