diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2015-01-28 12:24:06 +0100 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2015-01-28 12:24:06 +0100 |
commit | 1dcc5c49cc75778bcdde770f2d6c2700dd2bec2e (patch) | |
tree | 013853d9e2750e45df2af1fb4a3c36ebc4fb94f5 | |
parent | 27b2701340648e2fde1992b175abfa591e0eee01 (diff) | |
parent | a25dbb3c8e795b90869c480ae5c62c84b8424b3c (diff) | |
download | px4-firmware-1dcc5c49cc75778bcdde770f2d6c2700dd2bec2e.tar.gz px4-firmware-1dcc5c49cc75778bcdde770f2d6c2700dd2bec2e.tar.bz2 px4-firmware-1dcc5c49cc75778bcdde770f2d6c2700dd2bec2e.zip |
Merge pull request #1719 from sjwilks/make_colour
Add a compiler coloring tool to highlight warning and errors in the output
-rwxr-xr-x | Tools/make_color.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Tools/make_color.sh b/Tools/make_color.sh new file mode 100755 index 000000000..81316a932 --- /dev/null +++ b/Tools/make_color.sh @@ -0,0 +1,36 @@ +#!/bin/sh +# make_color.sh +# +# Author: Simon Wilks (simon@uaventure.com) +# +# A compiler color coder. +# +# To invoke this script everytime you run make simply create the alias: +# +# alias make='<your-firmware-directory>/Tools/make_color.sh' +# +# Color codes: +# +# white "\033[1,37m" +# yellow "\033[1,33m" +# green "\033[1,32m" +# blue "\033[1,34m" +# cyan "\033[1,36m" +# red "\033[1,31m" +# magenta "\033[1,35m" +# black "\033[1,30m" +# darkwhite "\033[0,37m" +# darkyellow "\033[0,33m" +# darkgreen "\033[0,32m" +# darkblue "\033[0,34m" +# darkcyan "\033[0,36m" +# darkred "\033[0,31m" +# darkmagenta "\033[0,35m" +# off "\033[0,0m" +# +OFF="\o033[0m" +WARN="\o033[1;33m" +ERROR="\o033[1;31m" +INFO="\o033[0;37m" + +make ${@} 2>&1 | sed "s/make\[[0-9]\].*/$INFO & $OFF/;s/.*: warning: .*/$WARN & $OFF/;s/.*: error: .*/$ERROR & $OFF/" |