diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-02-10 17:22:36 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-02-10 17:22:36 +0000 |
commit | df167bf4ac944ad8c679d2b2751fcf94adc8c714 (patch) | |
tree | d418944782ed2e12a8016275937d48a7233ad7f4 /make | |
parent | a86b10b8831994a5f3ff970442714ceac7571656 (diff) |
Now very tidy make output, with pretty colours :p
(Unless it errors, then you get the full commandline and error output etc)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8878 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'make')
-rwxr-xr-x | make/run-cc.pl | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/make/run-cc.pl b/make/run-cc.pl index 380b01ef7..58e7f6050 100755 --- a/make/run-cc.pl +++ b/make/run-cc.pl @@ -16,6 +16,8 @@ use POSIX (); # The subs are passed the message, and anything the regex captured. +my $cc = shift(@ARGV); + my @msgfilters = ( [ qr/^(.*) warning: cannot pass objects of non-POD type `(.*)' through `\.\.\.'; call will abort at runtime/ => sub { my ($msg, $where, $type) = @_; @@ -33,6 +35,7 @@ my @msgfilters = ( [ qr/^.* error: / => sub { my ($msg) = @_; + print STDERR "An error occured when executing:\e[37;1m $cc " . join(' ', @ARGV) . "\n"; print STDERR "\e[31;1m$msg\e[0m\n"; } ], ); @@ -41,7 +44,15 @@ my $pid; my ($r_stderr, $w_stderr); -my $cc = shift(@ARGV); +my $name = ""; + +foreach my $n (@ARGV) +{ + if ($n =~ /\.cpp$/) + { + $name = $n; + } +} if (!defined($cc) || $cc eq "") { die "Compiler not specified!\n"; @@ -54,6 +65,9 @@ $pid = fork; die "Cannot fork to start gcc! $!\n" unless defined($pid); if ($pid) { + + print "\t\e[1;32mBUILD:\e[0m\t\t$name\n" unless $name eq ""; + my $fail = 0; # Parent - Close child-side pipes. close $w_stderr; |