Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
022a5e9259 |
5 changed files with 158 additions and 1 deletions
37
README
Normal file
37
README
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
The colorgcc is a perl script written by Jamie Moyers to colorize the
|
||||||
|
terminal output of C++, CC, CCACHE, G++, GCC so error messages can be
|
||||||
|
found within longer compiler outputs.
|
||||||
|
|
||||||
|
Homepage:
|
||||||
|
|
||||||
|
http://schlueters.de/colorgcc.html
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
|
||||||
|
Call the compiler name with the 'color-' prefix, eg:
|
||||||
|
|
||||||
|
color-gcc
|
||||||
|
color-g++
|
||||||
|
color-cc
|
||||||
|
color-c++
|
||||||
|
|
||||||
|
That's it. Alternatively you may want to create following handy aliases:
|
||||||
|
|
||||||
|
alias gcc='color-gcc'
|
||||||
|
alias g++='color-g++'
|
||||||
|
alias cc='color-cc'
|
||||||
|
alias c++='color-c++'
|
||||||
|
|
||||||
|
The default settings can be overridden with ~/.colorgccrc. See the
|
||||||
|
comments in the packaged sample config file for more information.
|
||||||
|
|
||||||
|
Note:
|
||||||
|
|
||||||
|
colorgcc will only emit color codes if:
|
||||||
|
|
||||||
|
(1) Its STDOUT is a tty and
|
||||||
|
(2) the value of $TERM is not listed in the "nocolor" option.
|
||||||
|
|
||||||
|
If colorgcc colorizes the output, the compiler's STDERR will be combined
|
||||||
|
with STDOUT. Otherwise, colorgcc just passes the output from the
|
||||||
|
compiler through without modification.
|
||||||
17
colorgcc-1.3.2-bz1078180.patch
Normal file
17
colorgcc-1.3.2-bz1078180.patch
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
diff --git a/colorgcc.1.3.2.txt b/colorgcc.1.3.2.txt
|
||||||
|
index 258ab97..f7c4a1e 100644
|
||||||
|
--- a/colorgcc.1.3.2.txt
|
||||||
|
+++ b/colorgcc.1.3.2.txt
|
||||||
|
@@ -95,6 +95,12 @@ sub initDefaults
|
||||||
|
$compilerPaths{"color-c++"} = "c++";
|
||||||
|
$compilerPaths{"color-ccache"} = "ccache";
|
||||||
|
|
||||||
|
+ $compilerPaths{"colorgcc"} = "gcc";
|
||||||
|
+ $compilerPaths{"colorg++"} = "g++";
|
||||||
|
+ $compilerPaths{"colorcc"} = "cc";
|
||||||
|
+ $compilerPaths{"colorc++"} = "c++";
|
||||||
|
+ $compilerPaths{"colorccache"} = "ccache";
|
||||||
|
+
|
||||||
|
$nocolor{"dumb"} = "true";
|
||||||
|
|
||||||
|
$colors{"srcColor"} = color("cyan");
|
||||||
|
|
@ -1,13 +1,17 @@
|
||||||
Summary: Script to colorize the compiler output
|
Summary: Script to colorize the compiler output
|
||||||
Name: colorgcc
|
Name: colorgcc
|
||||||
Version: 1.3.2
|
Version: 1.3.2
|
||||||
Release: 7%{?dist}
|
Release: 8%{?dist}
|
||||||
License: GPL+
|
License: GPL+
|
||||||
Group: Development/Tools
|
Group: Development/Tools
|
||||||
Url: http://schlueters.de/colorgcc.html
|
Url: http://schlueters.de/colorgcc.html
|
||||||
Source0: http://schlueters.de/colorgcc.%{version}.txt
|
Source0: http://schlueters.de/colorgcc.%{version}.txt
|
||||||
|
Source1: http://schlueters.de/colorgccrc.txt
|
||||||
|
Source2: README
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
Patch0: colorgcc-1.3.2-invocation.patch
|
Patch0: colorgcc-1.3.2-invocation.patch
|
||||||
|
Patch1: sampleconfig.patch
|
||||||
|
Patch2: colorgcc-1.3.2-bz1078180.patch
|
||||||
Requires: perl
|
Requires: perl
|
||||||
|
|
||||||
%description
|
%description
|
||||||
|
|
@ -17,7 +21,11 @@ CCACHE, G++, GCC so error messages can be found within longer compiler outputs.
|
||||||
%prep
|
%prep
|
||||||
%setup -q -c -T
|
%setup -q -c -T
|
||||||
cp -p %{SOURCE0} .
|
cp -p %{SOURCE0} .
|
||||||
|
cp -p %{SOURCE1} ./colorgccrc.sample
|
||||||
|
cp -p %{SOURCE2} .
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
|
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
|
||||||
|
|
@ -27,6 +35,12 @@ ln -s %{_bindir}/color-gcc $RPM_BUILD_ROOT/%{_bindir}/color-cc
|
||||||
ln -s %{_bindir}/color-gcc $RPM_BUILD_ROOT/%{_bindir}/color-c++
|
ln -s %{_bindir}/color-gcc $RPM_BUILD_ROOT/%{_bindir}/color-c++
|
||||||
ln -s %{_bindir}/color-gcc $RPM_BUILD_ROOT/%{_bindir}/color-ccache
|
ln -s %{_bindir}/color-gcc $RPM_BUILD_ROOT/%{_bindir}/color-ccache
|
||||||
|
|
||||||
|
ln -s %{_bindir}/color-gcc $RPM_BUILD_ROOT/%{_bindir}/colorgcc
|
||||||
|
ln -s %{_bindir}/color-gcc $RPM_BUILD_ROOT/%{_bindir}/colorg++
|
||||||
|
ln -s %{_bindir}/color-gcc $RPM_BUILD_ROOT/%{_bindir}/colorcc
|
||||||
|
ln -s %{_bindir}/color-gcc $RPM_BUILD_ROOT/%{_bindir}/colorc++
|
||||||
|
ln -s %{_bindir}/color-gcc $RPM_BUILD_ROOT/%{_bindir}/colorccache
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%{_bindir}/color-gcc
|
%{_bindir}/color-gcc
|
||||||
|
|
@ -35,7 +49,18 @@ ln -s %{_bindir}/color-gcc $RPM_BUILD_ROOT/%{_bindir}/color-ccache
|
||||||
%{_bindir}/color-c++
|
%{_bindir}/color-c++
|
||||||
%{_bindir}/color-ccache
|
%{_bindir}/color-ccache
|
||||||
|
|
||||||
|
%{_bindir}/colorgcc
|
||||||
|
%{_bindir}/colorg++
|
||||||
|
%{_bindir}/colorcc
|
||||||
|
%{_bindir}/colorc++
|
||||||
|
%{_bindir}/colorccache
|
||||||
|
%doc README colorgccrc.sample
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Apr 17 2014 Martin Cermak <mcermak@redhat.com> 1.3.2-8
|
||||||
|
- Allow using "color" prefix as well as "color-" prefix (bz1078180)
|
||||||
|
- Added README and sample config file
|
||||||
|
|
||||||
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-7
|
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-7
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||||
|
|
||||||
|
|
|
||||||
54
colorgccrc.txt
Normal file
54
colorgccrc.txt
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
#
|
||||||
|
# colorgcc configuration file
|
||||||
|
#
|
||||||
|
# $Id: colorgccrc,v 1.1.1.1 1999/04/25 15:24:03 jamoyers Exp $
|
||||||
|
#
|
||||||
|
# This file should be named $HOME/.colorgccrc
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# The following groups of attributes may be combined for a given color:
|
||||||
|
#
|
||||||
|
# clear black on_black
|
||||||
|
# reset red on_red
|
||||||
|
# bold green on_green
|
||||||
|
# underline yellow on_yellow
|
||||||
|
# underscore blue on_blue
|
||||||
|
# blink magenta on_magenta
|
||||||
|
# reverse cyan on_cyan
|
||||||
|
# concealed white on_white
|
||||||
|
#
|
||||||
|
# For example, srcColor: bold cyan on_yellow
|
||||||
|
#
|
||||||
|
|
||||||
|
# Define the paths to the actual location of the various compilers.
|
||||||
|
# (Currently, colorgcc only understands these: g++ gcc c++ cc)
|
||||||
|
g++: /usr/bin/g++
|
||||||
|
gcc: /usr/bin/gcc
|
||||||
|
c++: /usr/bin/c++
|
||||||
|
cc: /usr/bin/cc
|
||||||
|
|
||||||
|
# Don't do color if our terminal type ($TERM) is one of these.
|
||||||
|
# (List all terminal types on one line, seperated by whitespace.)
|
||||||
|
nocolor: dumb
|
||||||
|
|
||||||
|
# Text between ` and ' is usually source code.
|
||||||
|
srcColor: bold cyan
|
||||||
|
|
||||||
|
# Text other than a warning or error.
|
||||||
|
introColor: reset
|
||||||
|
|
||||||
|
# Warnings and errors both have similar formats:
|
||||||
|
# filename:999:Message
|
||||||
|
# Each field may be assigned a different color.
|
||||||
|
|
||||||
|
# Warnings
|
||||||
|
warningFileNameColor: reset
|
||||||
|
warningNumberColor: white
|
||||||
|
warningMessageColor: yellow
|
||||||
|
|
||||||
|
# Errors
|
||||||
|
errorFileNameColor: reset
|
||||||
|
errorNumberColor: white
|
||||||
|
errorMessageColor: bold red
|
||||||
|
|
||||||
|
|
||||||
24
sampleconfig.patch
Normal file
24
sampleconfig.patch
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
diff --git a/colorgccrc.sample b/colorgccrc.sample
|
||||||
|
index 5ec5949..8e87f98 100644
|
||||||
|
--- a/colorgccrc.sample
|
||||||
|
+++ b/colorgccrc.sample
|
||||||
|
@@ -20,12 +20,14 @@
|
||||||
|
# For example, srcColor: bold cyan on_yellow
|
||||||
|
#
|
||||||
|
|
||||||
|
-# Define the paths to the actual location of the various compilers.
|
||||||
|
+# Define the paths to the actual location of the various compilers. By default
|
||||||
|
+# colorgcc calls basenames (e.g. 'gcc') so that $PATH setting is important.
|
||||||
|
# (Currently, colorgcc only understands these: g++ gcc c++ cc)
|
||||||
|
-g++: /usr/bin/g++
|
||||||
|
-gcc: /usr/bin/gcc
|
||||||
|
-c++: /usr/bin/c++
|
||||||
|
-cc: /usr/bin/cc
|
||||||
|
+#
|
||||||
|
+# g++: /usr/bin/g++
|
||||||
|
+# gcc: /usr/bin/gcc
|
||||||
|
+# c++: /usr/bin/c++
|
||||||
|
+# cc: /usr/bin/cc
|
||||||
|
|
||||||
|
# Don't do color if our terminal type ($TERM) is one of these.
|
||||||
|
# (List all terminal types on one line, seperated by whitespace.)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue