summaryrefslogtreecommitdiff
path: root/Makefile.common
diff options
context:
space:
mode:
authorDavid Allsopp <david.allsopp@metastack.com>2021-04-30 11:44:25 +0100
committerDavid Allsopp <david.allsopp@metastack.com>2021-04-30 11:44:25 +0100
commit53890ca0074c3252a69366ba6bca512a3b479e8b (patch)
treeb5e21756bfac243c2bc5c35cc83daba5ebd21981 /Makefile.common
parent118b17afbfe3de985a3ab819683e96ccb064c002 (diff)
downloadocaml-53890ca0074c3252a69366ba6bca512a3b479e8b.tar.gz
Refactor one ifeq not to use continuation
Diffstat (limited to 'Makefile.common')
-rw-r--r--Makefile.common8
1 files changed, 5 insertions, 3 deletions
diff --git a/Makefile.common b/Makefile.common
index 61fd2e93bf..bd99f70dc0 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -50,10 +50,12 @@ endif
OCAMLRUN ?= $(ROOTDIR)/boot/ocamlrun$(EXE)
NEW_OCAMLRUN ?= $(ROOTDIR)/runtime/ocamlrun$(EXE)
-# Use boot/ocamlc.opt if available
-ifeq (0,$(shell \
+TEST_BOOT_OCAMLC_OPT = $(shell \
test $(ROOTDIR)/boot/ocamlc.opt -nt $(ROOTDIR)/boot/ocamlc; \
- echo $$?))
+ echo $$?)
+
+# Use boot/ocamlc.opt if available
+ifeq "$(TEST_BOOT_OCAMLC_OPT)" "0"
BOOT_OCAMLC = $(ROOTDIR)/boot/ocamlc.opt
else
BOOT_OCAMLC = $(OCAMLRUN) $(ROOTDIR)/boot/ocamlc