diff --git a/Makefile b/Makefile
index 096220f5e55e0950c62835ee5239147d9993c351..da8bf42119adb2d12e515abbf30902ed5388862e 100644
--- a/Makefile
+++ b/Makefile
@@ -38,9 +38,7 @@ TARGETS  := src fuzz benchmark
 
 .PHONY: all
 all:
-	@ dune build $(PROFILE) $(TARGETS) ; make merlin
-# Regardless of whether compilation succeeds or fails,
-# invoke [make merlin] to patch src/.merlin.
+	@ dune build $(PROFILE) $(TARGETS)
 
 # [make setup] installs the packages that we need in whatever opam
 # switch is currently active.
@@ -52,6 +50,7 @@ setup:
 
 .PHONY: merlin
 merlin:
+	@ touch src/.merlin
 # Add a preprocessing directive at the end of the FLG line.
 	@ sed -i.bak '/^FLG/ s/$$/ -pp "cppo -D dev"/' src/.merlin
 	@ rm -f src/.merlin.bak