Blob Blame History Raw
From 841ecb34818397d39ebe508f1ffe8708b6e238e8 Mon Sep 17 00:00:00 2001
From: Raja Boujbel <raja.boujbel@ocamlpro.com>
Date: Tue, 14 Apr 2020 12:30:51 +0200
Subject: [PATCH] makefile: fix sed --promote-install-files dune arg retrieving

Get only the option itself in help, don't get appearing ones in text blocks
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 02db5f4e50..b5021fe633 100644
--- a/Makefile
+++ b/Makefile
@@ -24,7 +24,7 @@ OPAMINSTALLER = ./opam-installer$(EXE)
 ALWAYS:
 	@
 
-DUNE_PROMOTE_ARG := $(shell dune build --help=plain 2>/dev/null | sed -ne 's/.*\(--promote-install-files\).*/ \1/p')
+DUNE_PROMOTE_ARG := $(shell dune build --help=plain 2>/dev/null | sed -ne 's/^[[:space:]]*\(--promote-install-files\)[[:space:]]*$$/ \1/p')
 DUNE_DEP = $(DUNE_EXE)
 JBUILDER_ARGS ?= 
 DUNE_ARGS ?= $(JBUILDER_ARGS)