View previous topic :: View next topic |
Author |
Message |
voidzero Bodhisattva
Joined: 21 Jul 2002 Posts: 265 Location: Grnn
|
Posted: Mon Jun 04, 2007 1:55 am Post subject: [Mini-HOWTO] Colormake - colored make output, also in emerge |
|
|
Because I find this funny and less-boring to stare at, I found a way to get colored make output. It's not in portage but here's the codebit to get it working, partially used some debian magic to get it going. (Hey, finally some code without loads of explaining! )
Note
Ok well, a little bit of explaining might be in order. So here goes. I have /usr/local/bin set in my PATH environment variable, set before the usual /usr/bin andsoforth. PATH order preference goes from left to right, so make sure you have /usr/local/bin before /usr/bin. Example for a user, ie. not root:
Code: | export PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games" |
root usually has /usr/local/sbin, /usr/sbin and /sbin in that order, each one before their 'bin'-variant.
Here's how to get colored make output system-wide. Perform as root:
Code: | wget http://bre.klaki.net/programs/colormake/colormake-0.2.tar.gz
tar zxvf colormake-0.2.tar.gz
cd colormake
cp colormake.pl /usr/local/bin
cat > /usr/local/bin/colormake <<EOF
#!/bin/bash
#
# Wrapper around make, to colorize it's output and pipe through less.
# Jumps to the first gcc error that occurs during the build process.
# After a debian example.
/usr/bin/make "$@" 2>&1 | /usr/local/bin/colormake.pl
exit ${PIPESTATUS[0]}
EOF
chmod 755 /usr/local/bin/colormake
ln -s /usr/local/bin/colormake /usr/local/bin/make |
This should make it work without problems, yet with easy re traceable steps might anything go wrong. (Re-)emerge an application to try it out. _________________ Diplomacy is the art of letting the other party have things your way.
-- Daniele Vare |
|
Back to top |
|
|
voidzero Bodhisattva
Joined: 21 Jul 2002 Posts: 265 Location: Grnn
|
Posted: Tue Jun 12, 2007 12:18 pm Post subject: |
|
|
So no one's interested? _________________ Diplomacy is the art of letting the other party have things your way.
-- Daniele Vare |
|
Back to top |
|
|
sonicbhoc Veteran
Joined: 24 Oct 2005 Posts: 1805 Location: In front of the computer screen
|
Posted: Tue Jun 12, 2007 12:20 pm Post subject: |
|
|
I am! I would also like to figure out how to get colorgcc (in portage) to work as well, but I believe that these two programs do the same thing so colorgcc is not really important. _________________ I'm too lazy to keep this stupid signature up to date, so here's something more interesting:
My friend Hetdegon can draw if you ask me.
Now using PClinuxOS on my laptop and Gentoo on my desktop and new laptop. |
|
Back to top |
|
|
voidzero Bodhisattva
Joined: 21 Jul 2002 Posts: 265 Location: Grnn
|
Posted: Tue Jun 12, 2007 12:22 pm Post subject: |
|
|
sonicbhoc wrote: | I am! I would also like to figure out how to get colorgcc (in portage) to work as well, but I believe that these two programs do the same thing so colorgcc is not really important. |
Yeah colorgcc doesn't show colored gcc commands, only errors and warnings in colors (iirc!) _________________ Diplomacy is the art of letting the other party have things your way.
-- Daniele Vare |
|
Back to top |
|
|
ishanarora n00b
Joined: 13 Jul 2007 Posts: 40
|
Posted: Mon Aug 13, 2007 11:41 am Post subject: ebuild!!!!!! |
|
|
hi!
it would be nice to have an ebuild for this. you may then submit it for portage tree |
|
Back to top |
|
|
krushia n00b
Joined: 10 May 2007 Posts: 10
|
Posted: Tue Sep 04, 2007 8:21 pm Post subject: Warning: Breaks "make menuconfig" |
|
|
I just ran into an issue with "make menuconfig" not formatting or accepting keycodes correctly, and realized it was because colormake screws it up. Beware
Just specify the full path to the "real" make if you have issues, like "/usr/bin/make menuconfig" |
|
Back to top |
|
|
pota n00b
Joined: 25 Jan 2005 Posts: 22
|
Posted: Fri Oct 05, 2007 6:44 am Post subject: |
|
|
Also there's a problem with 'linux-info.eclass' calling make in function 'getfilevar()' like this:
Code: | make M="${S}" ${BUILD_FIXES} -s -f - 2>/dev/null |
which in turn breaks kernel version string so ebuilds for kernel modules can't work anymore
again - just specify the full path - '/usr/bin/make M="${S}"...' |
|
Back to top |
|
|
krushia n00b
Joined: 10 May 2007 Posts: 10
|
Posted: Fri Oct 12, 2007 5:48 pm Post subject: |
|
|
pota wrote: | Also there's a problem with 'linux-info.eclass' calling make in function 'getfilevar()' like this:
Code: | make M="${S}" ${BUILD_FIXES} -s -f - 2>/dev/null |
which in turn breaks kernel version string so ebuilds for kernel modules can't work anymore
again - just specify the full path - '/usr/bin/make M="${S}"...' |
Wow, that's nice to know. I ran into that problem as well, and thought it was a bug in the eclass. I've deleted the make->colormake link since the benefits don't seem to be worth the trouble it can cause. |
|
Back to top |
|
|
cubancigar11 Guru
Joined: 10 Jan 2005 Posts: 340
|
Posted: Wed Feb 13, 2008 1:29 pm Post subject: |
|
|
If you are still around, have a look at hmake from blender project.
Code: | https://svn.blender.org/svnroot/bf-blender/trunk/blender/source/tools/hmake/hmake |
|
|
Back to top |
|
|
|