| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
$bold = "\033[1m"; |
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
$white = "\033[37m"; |
|---|
| 8 |
$yellow = "\033[33m"; |
|---|
| 9 |
$magenta = "\033[35m"; |
|---|
| 10 |
$blue = "\033[34m"; |
|---|
| 11 |
$red = "\033[31m"; |
|---|
| 12 |
$reset = "\033[0m"; |
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
$info = $white.$bold; |
|---|
| 16 |
$warn = $yellow.$bold; |
|---|
| 17 |
$error = $red.$bold; |
|---|
| 18 |
$file = $magenta.$bold; |
|---|
| 19 |
$lineno = $blue.$bold; |
|---|
| 20 |
|
|---|
| 21 |
while(<STDIN>) |
|---|
| 22 |
{ |
|---|
| 23 |
$line = $_; |
|---|
| 24 |
chomp $line; |
|---|
| 25 |
|
|---|
| 26 |
if( |
|---|
| 27 |
$line =~ /make\[([0-9]*)\]:.*/ || |
|---|
| 28 |
|
|---|
| 29 |
$line =~ /^test\s\-z\s/ || |
|---|
| 30 |
$line =~ /^Making\sclean\sin\s\./ || |
|---|
| 31 |
$line =~ /then\smv\s-f/ || |
|---|
| 32 |
$line =~ /.*make\s\s.*/ || |
|---|
| 33 |
$line =~ /make\s\sall-recursive/ || |
|---|
| 34 |
$line =~ /[A-z0-9-]*ar\s[A-z0-9]*\s([A-z0-9\-_\/\.]*)\s.*/ || |
|---|
| 35 |
$line =~ /^[A-z0-9-]*ranlib\s[A-z0-9-_]*plugin(.*)/ || |
|---|
| 36 |
$line =~ /^touch.*/ || |
|---|
| 37 |
$line =~ /^srcdir=.*/ || |
|---|
| 38 |
$line =~ /^.* (lib[A-z0-9-_]*plugin.so).*/ || |
|---|
| 39 |
$line =~ /^\s*gcc(-.*)?\s-std=.*/ || |
|---|
| 40 |
$line =~ /^\sgcc(-.*)?\s-mmacosx.*/ || |
|---|
| 41 |
$line =~ /^\sg\+\+(-.*)?\s.*/ || |
|---|
| 42 |
|
|---|
| 43 |
$line =~ /^.*libtool.*\-o\s(lib.*\.la).*/ || |
|---|
| 44 |
$line =~ /^.*rm\s\-f\s(.*)/ || |
|---|
| 45 |
$line =~ /^rm\s-fr\s(.*)/ || |
|---|
| 46 |
$line =~ /^mv\s-f\s(.*)/ || |
|---|
| 47 |
$line =~ /^ln\s-s\s(.*)/ || |
|---|
| 48 |
$line =~ /^echo\s/ || |
|---|
| 49 |
$line =~ /^mkdir\s/ || |
|---|
| 50 |
$line =~ /^cat\s/ || |
|---|
| 51 |
$line =~ /^grep\s/ || |
|---|
| 52 |
$line =~ /^cd\s/ || |
|---|
| 53 |
$line =~ /^sed\s/ || |
|---|
| 54 |
$line =~ /^bindir=\s/ || |
|---|
| 55 |
$line =~ /^libtool:\s/ || |
|---|
| 56 |
$line =~ /^creating lib.*/ || |
|---|
| 57 |
$line =~ /^\s*\// ) |
|---|
| 58 |
{} |
|---|
| 59 |
|
|---|
| 60 |
elsif( |
|---|
| 61 |
$line =~ s/^.*\-shared.*(lib.*\.so).*/ LINK : $1/g || |
|---|
| 62 |
$line =~ s/^.* (lib.*\.so).*/ LINK : $1/g || |
|---|
| 63 |
$line =~ s/^.* (lib.*\.o)\s\.\/(.*)/ COMPILE : $2/g || |
|---|
| 64 |
$line =~ s/^.* (lib.*\.o)\s`.*`(.*);\ \\/ COMPILE : $2/ || |
|---|
| 65 |
$line =~ s/.*\-o\s([^\s]*)\s`.*`([^\s]*);.*/ COMPILE : $2/g || |
|---|
| 66 |
$line =~ s/^[A-z0-9-]*ranlib\s(.*)/ RANLIB : $1/g || |
|---|
| 67 |
$line =~ s/^Making\sall\sin\s(.*)/MAKE : $1/g || |
|---|
| 68 |
$line =~ s/^Making\sclean\sin\s(.*)/CLEAN : $1/g ) |
|---|
| 69 |
{ |
|---|
| 70 |
print $info.$line.$reset."\n"; |
|---|
| 71 |
} |
|---|
| 72 |
|
|---|
| 73 |
elsif ( |
|---|
| 74 |
$line =~ s/(.*):([0-9]*):\swarning\:(.*)/WARNING : $file$1: $lineno$2: $warn$3/g || |
|---|
| 75 |
$line =~ s/.*is\sdeprecated.*/WARNING : $line/g ) |
|---|
| 76 |
{ |
|---|
| 77 |
print STDERR $warn.$line.$reset."\n"; |
|---|
| 78 |
} |
|---|
| 79 |
|
|---|
| 80 |
elsif ( |
|---|
| 81 |
$line =~ s/(.*):([0-9]*):\serror\:(.*)/ERROR : $file$1: $lineno$2: $error$3/g ) |
|---|
| 82 |
{ |
|---|
| 83 |
print STDERR $error.$line.$reset."\n"; |
|---|
| 84 |
} |
|---|
| 85 |
|
|---|
| 86 |
else |
|---|
| 87 |
{ |
|---|
| 88 |
print $line."\n"; |
|---|
| 89 |
} |
|---|
| 90 |
} |
|---|