From af137d191a55c817d2d750fef53026ff46f3b644 Mon Sep 17 00:00:00 2001 From: bdrewery Date: Fri, 16 Jun 2017 04:28:10 +0000 Subject: [PATCH] WITH_META_MODE: Don't try showing command if .ERROR_META_FILE is empty. This was sed'ing on stdin for failing .PHONY targets. Reported by: Mark Millard X-MFC-With: r319862 MFC after: 1 week Sponsored by: Dell EMC Isilon --- share/mk/local.sys.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/mk/local.sys.mk b/share/mk/local.sys.mk index 15b8eb402ea0..47c8034fb4af 100644 --- a/share/mk/local.sys.mk +++ b/share/mk/local.sys.mk @@ -13,7 +13,8 @@ MAKE_PRINT_VAR_ON_ERROR += \ .MAKE.MODE .endif -_ERROR_CMD=${sed -n '/^CMD/s,^CMD ,,p' ${.ERROR_META_FILE}:L:sh} +_ERROR_CMD_EXEC= ${sed -n '/^CMD/s,^CMD ,,p' ${.ERROR_META_FILE}:L:sh} +_ERROR_CMD= ${!empty(.ERROR_META_FILE):?${_ERROR_CMD_EXEC}:.PHONY} MAKE_PRINT_VAR_ON_ERROR+= \ _ERROR_CMD \ .CURDIR \