Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/lavabit/magma.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLadar Levison <ladar@lavabit.com>2019-03-06 23:41:49 +0300
committerLadar Levison <ladar@users.noreply.github.com>2019-03-07 00:09:38 +0300
commitdeb821da1de05fdca67e2c87fd3d6f9365c40081 (patch)
tree75860aa6e5927335ff903058b02e16f6bae9b066 /Makefile
parentdf3bb7c5f22fa9dcf589d6f1eb804ec270d4e90f (diff)
Updated the Makefile/Library builder to handle no TERM var.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile29
1 files changed, 19 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index aac136dc..a56b4934 100644
--- a/Makefile
+++ b/Makefile
@@ -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'))