From c715d93da558ff42216bc233de22b6c7700e470e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Hinderer?= Date: Wed, 14 Mar 2018 13:15:27 +0100 Subject: [PATCH] ocamltest: Makefile improvements - Use := everywhere - Merge two ifeq blocks --- ocamltest/Makefile | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/ocamltest/Makefile b/ocamltest/Makefile index f0d901f70..d61761c96 100644 --- a/ocamltest/Makefile +++ b/ocamltest/Makefile @@ -21,9 +21,15 @@ ifeq "$(UNIX_OR_WIN32)" "win32" unix := false ocamlsrcdir := $(shell echo "$(abspath $(shell pwd)/..)"|cygpath -w -f - \ | sed 's/\\/\\\\\\\\/g') + ifeq "$(wildcard ../flexdll/Makefile)" "" + FLEXLINK_ENV= + else + FLEXLINK_ENV=OCAML_FLEXLINK="../boot/ocamlrun ../flexdll/flexlink.exe" + endif else unix := true ocamlsrcdir := $(abspath $(shell pwd)/..) + FLEXLINK_ENV= endif ifeq "$(TOOLCHAIN)" "msvc" @@ -119,24 +125,14 @@ bytecode_modules := $(o_files) $(cmo_files) native_modules := $(o_files) $(cmx_files) -directories = ../utils ../parsing ../stdlib ../compilerlibs +directories := ../utils ../parsing ../stdlib ../compilerlibs -include_directories = $(addprefix -I , $(directories)) +include_directories := $(addprefix -I , $(directories)) -flags = -g -nostdlib $(include_directories) \ +flags := -g -nostdlib $(include_directories) \ -strict-sequence -safe-string -strict-formats \ -w +a-4-9-41-42-44-45-48 -warn-error A -ifeq "$(UNIX_OR_WIN32)" "unix" -FLEXLINK_ENV= -else # Windows - ifeq "$(wildcard ../flexdll/Makefile)" "" - FLEXLINK_ENV= - else - FLEXLINK_ENV=OCAML_FLEXLINK="../boot/ocamlrun ../flexdll/flexlink.exe" - endif -endif - ocamlc := $(FLEXLINK_ENV) ../byterun/ocamlrun ../ocamlc $(flags) ocamlopt := $(FLEXLINK_ENV) ../byterun/ocamlrun ../ocamlopt $(flags)