diff options
author | Ladar Levison <ladar@lavabit.com> | 2019-03-06 23:41:49 +0300 |
---|---|---|
committer | Ladar Levison <ladar@users.noreply.github.com> | 2019-03-07 00:09:38 +0300 |
commit | deb821da1de05fdca67e2c87fd3d6f9365c40081 (patch) | |
tree | 75860aa6e5927335ff903058b02e16f6bae9b066 /Makefile | |
parent | df3bb7c5f22fa9dcf589d6f1eb804ec270d4e90f (diff) |
Updated the Makefile/Library builder to handle no TERM var.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 29 |
1 files changed, 19 insertions, 10 deletions
@@ -239,16 +239,25 @@ RM = rm --force RMDIR = rmdir --parents --ignore-fail-on-non-empty MKDIR = mkdir --parents -# Text Coloring -RED = $$(tput setaf 1) -BLUE = $$(tput setaf 4) -GREEN = $$(tput setaf 2) -WHITE = $$(tput setaf 7) -YELLOW = $$(tput setaf 3) - -# Text Weighting -BOLD = $$(tput bold) -NORMAL = $$(tput sgr0) +# Control the Text Color/Weight if the TERM supports it. If no TERM is available, then +# default to using vt100 as the terminal type. +ifdef TERM + RED = $$(tput setaf 1) + BLUE = $$(tput setaf 4) + GREEN = $$(tput setaf 2) + WHITE = $$(tput setaf 7) + YELLOW = $$(tput setaf 3) + BOLD = $$(tput bold) + NORMAL = $$(tput sgr0) +else + RED = $$(tput -Tvt100 setaf 1) + BLUE = $$(tput -Tvt100 setaf 4) + GREEN = $$(tput -Tvt100 setaf 2) + WHITE = $$(tput -Tvt100 setaf 7) + YELLOW = $$(tput -Tvt100 setaf 3) + BOLD = $$(tput -Tvt100 bold) + NORMAL = $$(tput -Tvt100 sgr0) +endif # Calculate the version, commit and timestamp strings. MAGMA_REPO = $(strip $(shell which git 2>&1 > /dev/null && git log 2>&1 > /dev/null && echo '1')) |