diff options
Diffstat (limited to 'testsuite/makefiles/Makefile.common')
-rw-r--r-- | testsuite/makefiles/Makefile.common | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/testsuite/makefiles/Makefile.common b/testsuite/makefiles/Makefile.common index bd2fce2201..d6a21b7ec3 100644 --- a/testsuite/makefiles/Makefile.common +++ b/testsuite/makefiles/Makefile.common @@ -43,10 +43,12 @@ include $(TOPDIR)/config/Makefile ifneq ($(USE_RUNTIME),) #Check USE_RUNTIME value ifeq ($(findstring $(USE_RUNTIME),d i),) -$(error If set, USE_RUNTIME must be equal to "d" (debug runtime) or "i" (instrumented runtime)) +$(error If set, USE_RUNTIME must be equal to "d" (debug runtime) \ + or "i" (instrumented runtime)) endif -RUNTIME_VARIANT=-I $(OTOPDIR)/asmrun -I $(OTOPDIR)/byterun -runtime-variant $(USE_RUNTIME) +RUNTIME_VARIANT=-I $(OTOPDIR)/asmrun -I $(OTOPDIR)/byterun \ + -runtime-variant $(USE_RUNTIME) export OCAMLRUNPARAM?=v=0 endif @@ -63,9 +65,20 @@ endif OCAML=$(OCAMLRUN) $(OTOPDIR)/ocaml $(OCFLAGS) \ -init $(OTOPDIR)/testsuite/lib/empty -FLEXLINK_PREFIX=$(if $(FLEXLINK),$(if $(wildcard $(TOPDIR)/flexdll/Makefile),OCAML_FLEXLINK="$(WINTOPDIR)/boot/ocamlrun $(WINTOPDIR)/flexdll/flexlink.exe" )) -OCAMLC=$(FLEXLINK_PREFIX)$(OCAMLRUN) $(OTOPDIR)/ocamlc $(CUSTOM) $(OCFLAGS) $(RUNTIME_VARIANT) -OCAMLOPT=$(FLEXLINK_PREFIX)$(OCAMLRUN) $(OTOPDIR)/ocamlopt $(OCFLAGS) $(RUNTIME_VARIANT) +ifeq "$(FLEXLINK)" "" + FLEXLINK_PREFIX= +else + ifeq "$(wildcard $(TOPDIR)/flexdll/Makefile)" "" + FLEXLINK_PREFIX= + else + FLEXLINK_PREFIX=OCAML_FLEXLINK="$(WINTOPDIR)/boot/ocamlrun \ + $(WINTOPDIR)/flexdll/flexlink.exe" + endif +endif +OCAMLC=$(FLEXLINK_PREFIX)$(OCAMLRUN) $(OTOPDIR)/ocamlc $(CUSTOM) $(OCFLAGS) \ + $(RUNTIME_VARIANT) +OCAMLOPT=$(FLEXLINK_PREFIX)$(OCAMLRUN) $(OTOPDIR)/ocamlopt $(OCFLAGS) \ + $(RUNTIME_VARIANT) OCAMLDOC=$(OCAMLRUN) $(OTOPDIR)/ocamldoc/ocamldoc OCAMLLEX=$(OCAMLRUN) $(OTOPDIR)/lex/ocamllex OCAMLMKLIB=$(FLEXLINK_PREFIX)$(OCAMLRUN) $(OTOPDIR)/tools/ocamlmklib \ @@ -130,7 +143,9 @@ defaultclean: @$(ASM) -o $*.o $*.s .cmm.obj: - @$(OCAMLRUN) ./codegen $*.cmm | grep -v "_caml_\(young_ptr\|young_limit\|extra_params\|allocN\|raise_exn\|reraise_exn\)" > $*.s + @$(OCAMLRUN) ./codegen $*.cmm \ + | grep -v "_caml_\(young_ptr\|young_limit\|extra_params\ + \|allocN\|raise_exn\|reraise_exn\)" > $*.s @set -o pipefail ; \ $(ASM) $*.obj $*.s | tail -n +2 |