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
This commit is contained in:
bdrewery 2017-06-16 04:28:10 +00:00
parent 67d8903aad
commit af137d191a

View File

@ -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 \