From 453565afb67b3c4390dc6c4df79a230edc390727 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr>
Date: Wed, 11 Jan 2023 14:10:47 +0100
Subject: [PATCH] [make] avoid differences between macOS and Linux due to usage
 of 'echo -n'

On macOS, when running via Makefile, '-n' is not seen as an 'echo' option and
gets printed in the output. With 'echo <msg>\c', it works on macOS, but not on
Linux, which requires '-e' to interpret escape characters.
'printf' avoids the issue since it does not include a terminating newline by
default.
---
 share/Makefile.installation | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/share/Makefile.installation b/share/Makefile.installation
index d89e9d704ee..20763187074 100644
--- a/share/Makefile.installation
+++ b/share/Makefile.installation
@@ -64,12 +64,12 @@ ifndef PREFIX
 else
 ifeq ($(PREFIX),$(OPAM_SWITCH_PREFIX))
 	@echo "Installing $(INSTALL_TARGET)to current Opam switch"
-	@echo -n "  Copying and relocating files..."
+	@printf "  Copying and relocating files..."
 	dune install ${MANDIR_OPT} 2> /dev/null
 	@echo " (done)"
 else
 	@echo "Installing $(INSTALL_TARGET)to ${PREFIX}"
-	@echo -n " Copying and relocating files..."
+	@printf " Copying and relocating files..."
 	dune install --prefix ${PREFIX} ${MANDIR_OPT} 2> /dev/null
 	@echo " (done)"
 	@echo 'DO NOT FORGET TO EXPAND YOUR OCAMLPATH VARIABLE:'
-- 
GitLab