I have a Makefile
with tput
color variables
_OFF := $(shell tput sgr0)
BG_RED := $(shell tput setab 1)
$(info TERM1=${BG_RED}${TERM}${_OFF}_xxx)
all:
@echo TERM2=${BG_RED}${TERM}${_OFF}_xxx
The second prompt will give out an error
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `echo TERM2=xterm-256color_xxx'
make: *** [all] Error 2
The interesting thing is even it report an error, but the word xterm-256color
in error message /bin/sh: -c: line 0: `echo TERM2=xterm-256color_xxx'`
actually has red background color, and the following _xxx
has normal background color.
Is it a bug? or is there anything wrong to my code?
I am using MacOS 11.6.1
, GNU bash 3.2.57(1)-release (x86_64-apple-darwin20)
, GNU Make 3.81
, tput ncurses 5.7.20081102