From b18b8e4f775b154cdaee2f1b96dae59458d26c98 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Fri, 27 Dec 2019 01:09:53 +0100 Subject: [PATCH] makefiles/color: fix build on NixOS On NixOS, there is no `/bin/echo`, instead `which echo` will return /home/benpicco/.nix-profile/bin/echo so hard-coding the path will break here. Use `/usr/bin/env` to get the path of `echo`. This should be availiable on all systems at the same location. --- makefiles/color.inc.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/makefiles/color.inc.mk b/makefiles/color.inc.mk index 3e2b1f9d7d..31f6bb6842 100644 --- a/makefiles/color.inc.mk +++ b/makefiles/color.inc.mk @@ -5,7 +5,7 @@ COLOR_GREEN := COLOR_RED := COLOR_PURPLE := COLOR_RESET := -COLOR_ECHO := /bin/echo +COLOR_ECHO := /usr/bin/env echo # Check if colored output is not disabled by user, i.e: CC_NOCOLOR unset # or 0 @@ -22,7 +22,7 @@ ifneq ($(CC_NOCOLOR),1) COLOR_ECHO := echo -e SHELL=bash else - COLOR_ECHO := /bin/echo -e + COLOR_ECHO := /usr/bin/env echo -e endif endif endif