Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
RIOT
Commits
c6af3f73
Commit
c6af3f73
authored
7 years ago
by
Xavier Clive
Browse files
Options
Downloads
Patches
Plain Diff
make: Do not attempt to use color if the terminal cannot support it
parent
4952ffba
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
makefiles/cflags.inc.mk
+0
-1
0 additions, 1 deletion
makefiles/cflags.inc.mk
makefiles/color.inc.mk
+17
-1
17 additions, 1 deletion
makefiles/color.inc.mk
with
17 additions
and
2 deletions
makefiles/cflags.inc.mk
+
0
−
1
View file @
c6af3f73
...
...
@@ -27,7 +27,6 @@ endif
# Use colored compiler output if the compiler supports this and if this is not
# disabled by the user
CC_NOCOLOR
?=
0
ifeq
($(CC_NOCOLOR),0)
ifeq
($(shell $(CC) -fdiagnostics-color -E - 2>/dev/null >/dev/null </dev/null ; echo $$?),0)
CFLAGS
+=
-fdiagnostics-color
...
...
This diff is collapsed.
Click to expand it.
makefiles/color.inc.mk
+
17
−
1
View file @
c6af3f73
# Set colored output control sequences if the terminal supports it and if
# not disabled by the user
COLOR_GREEN
:=
COLOR_RED
:=
COLOR_PURPLE
:=
COLOR_RESET
:=
COLOR_ECHO
:=
/bin/echo
ifeq
(0, $(shell tput colors 2>&1 > /dev/null; echo $$?))
ifeq
($(CC_NOCOLOR),)
available_colors
:=
$(
shell tput colors 2> /dev/null
)
ifeq
($(available_colors),)
CC_NOCOLOR
=
1
else
ifeq
($(available_colors),-1)
CC_NOCOLOR
=
1
else
ifeq
($(available_colors),0)
CC_NOCOLOR
=
1
else
CC_NOCOLOR
=
0
endif
endif
ifeq
($(CC_NOCOLOR),0)
COLOR_GREEN
:=
\0
33[1
;
32m
COLOR_RED
:=
\0
33[1
;
31m
COLOR_YELLOW
:=
\0
33[1
;
33m
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment