Separate stdout and stderr during CP

Closes #703
This commit is contained in:
Derek Bankieris 2019-06-07 09:34:53 -05:00
parent 731b9b9c1f
commit b3c9e75c1b

View File

@ -4,6 +4,7 @@ MV := /bin/mv
RM := /bin/rm
CP := /bin/cp
MAKE_OUT := build/MAKE_out
MAKE_ERR := build/MAKE_err
PWD = $(shell /bin/pwd)
COLOR = $(1)
@ -19,7 +20,7 @@ endif
define ECHO_AND_LOG
$(call ECHO_TO_TERMINAL, $1)
@echo $1 >> $(MAKE_OUT)
@$1 2>&1 | $(TEE) -a $(MAKE_OUT) ; exit $${PIPESTATUS[0]}
@$1 > >($(TEE) -a $(MAKE_OUT)) 2> >($(TEE) -a $(MAKE_ERR) >&2)
endef
export TRICK_HOME := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))../../..)