LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-15-2007, 03:17 AM   #1
smOk3
Member
 
Registered: Feb 2007
Posts: 43

Rep: Reputation: 15
Color for make?


I have been doing a lot of compiling and kinda sick of looking at the white on black when compiling source. I was just wondering if there is a way to change all the code that is running across the screen when doing ./configure && make?
 
Old 10-15-2007, 09:57 AM   #2
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 6, KDE Neon
Posts: 4,313

Rep: Reputation: 212Reputation: 212Reputation: 212
Quote:
Originally Posted by smOk3 View Post
I have been doing a lot of compiling and kinda sick of looking at the white on black when compiling source. I was just wondering if there is a way to change all the code that is running across the screen when doing ./configure && make?
I don't know if this will work, but you can colourize your konsole with this command: export CLICOLOR="yes". To make it permenant just add it to your ~.bashrc file.
 
Old 10-15-2007, 11:33 AM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
In KDE, when using the console, go to Settings - Schema and choose a different color scheme. I'd guess that gnome has something similar. I don't know about other desktop environments.
 
Old 10-15-2007, 12:42 PM   #4
ghostdancer
Member
 
Registered: Apr 2002
Distribution: Slackware
Posts: 266

Rep: Reputation: 30
I wrote a little perl script that wrap around standard make for creating colorful make. I do not know if there any other available tools that do this, but if you find mine is what you are looking for, you can use it:

Code:
#!/usr/bin/perl -w

use strict;
use Term::ANSIColor qw(:constants);
use IO::File;

my $cmd = "/usr/bin/make";

BEGIN:
{
	my $cmdargs = "";
	foreach my $opt (@ARGV){
		$cmdargs .= " " . $opt;
	}

	my $fh = new IO::File "$cmd $cmdargs |";

	while( <$fh> ){
		my $line = $_;

		chomp($line);

		ColorPrint($line);
	}

	$fh->close();
}

sub ColorPrint
{
	my $line = shift;

	my @data = split(/\s/, $line);

	foreach my $elem (@data){
		if( length($elem) == 0 ){
			next;
		}

		if ( $elem =~ /\.[c|h]/i ){
			print BOLD GREEN $elem, RESET;
		} elsif ( $elem =~ /\.[o|a]/i ){
			print BOLD RED $elem, RESET;
		} elsif ( $elem =~ /^\-/ ){
			print BOLD BLUE $elem, RESET;
		} elsif( ($elem) =~ /g?cc/i || $elem =~ /cp/i || 
			$elem =~ /rm/i || $elem =~ /install/i ||
			$elem =~ /make/ || $elem =~ /ld/i ||
			$elem =~ /ar/ ){
			print BOLD CYAN $elem, RESET;
		} else {
			print $elem;
		}

		print " ";
	}

	print "\n";
	return;
}
You need to install Term::ANSIColor if your perl does not have this module.
 
Old 10-15-2007, 01:12 PM   #5
ghostdancer
Member
 
Registered: Apr 2002
Distribution: Slackware
Posts: 266

Rep: Reputation: 30
I just found someone did what I did:

Colormake

This is using Perl as well.
 
Old 10-15-2007, 01:19 PM   #6
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561

Rep: Reputation: 57
Debian Stable, repos:

Code:
apt-get install colormake
 
Old 10-18-2007, 04:49 AM   #7
smOk3
Member
 
Registered: Feb 2007
Posts: 43

Original Poster
Rep: Reputation: 15
Awesome, thanks for the help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to make terminal Color ful sajidmumtaz Solaris / OpenSolaris 8 06-22-2006 07:41 AM
How to make the directories and files in color in the terminal leonall Linux - Newbie 1 03-09-2006 09:13 PM
How can i make Vim work in 256 color mode ? landuchi Linux - Software 4 01-30-2006 08:14 PM
[COLOR=red]ENCORE WIRELESS PCI Card 802.11b [/COLOR] enrique145 Linux - Hardware 3 07-07-2004 02:31 PM
how to make my linux box work at 32 color depth? NeoAnderson Linux - Software 2 07-30-2002 02:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration