mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-11 01:53:47 +01:00
932b83e6b1
Signed-off-by: Benoît Taine <ork@olol.eu>
27 lines
618 B
Makefile
27 lines
618 B
Makefile
# See LICENSE file for license and copyright information
|
|
#
|
|
|
|
TPUT ?= /usr/bin/tput
|
|
TPUT_AVAILABLE ?= $(shell ${TPUT} -V 2>/dev/null)
|
|
|
|
ifdef TPUT_AVAILABLE
|
|
ifeq ($(COLOR),1)
|
|
COLOR_NORMAL = `$(TPUT) sgr0`
|
|
COLOR_ACTION = `$(TPUT) bold``$(TPUT) setaf 3`
|
|
COLOR_COMMENT = `$(TPUT) bold``$(TPUT) setaf 2`
|
|
COLOR_BRACKET = `$(TPUT) setaf 4`
|
|
CC += -fdiagnostics-color=always
|
|
define colorecho
|
|
@echo $(COLOR_BRACKET)" ["$(COLOR_ACTION)$1$(COLOR_BRACKET)"] "$(COLOR_COMMENT)$2$(COLOR_BRACKET) $(COLOR_NORMAL)
|
|
endef
|
|
else
|
|
define colorecho
|
|
@echo " [$1]" $2
|
|
endef
|
|
endif
|
|
else
|
|
define colorecho
|
|
@echo " [$1]" $2
|
|
endef
|
|
endif
|