skins2: fix initial text state to reflect documentation
[vlc.git] / extras / buildsystem / make.pl
blob2fd4d33d70ca0a1938df2ee913182dd878a25c98
1 #! /usr/bin/perl
3 # Attributes
4 $bold = "\033[1m";
6 # Colors
7 $white = "\033[37m";
8 $yellow = "\033[33m";
9 $magenta = "\033[35m";
10 $blue = "\033[34m";
11 $red = "\033[31m";
12 $reset = "\033[0m";
14 # Combinations
15 $info = $white.$bold;
16 $warn = $yellow.$bold;
17 $error = $red.$bold;
18 $file = $magenta.$bold;
19 $lineno = $blue.$bold;
21 while(<STDIN>)
23 $line = $_;
24 chomp $line;
25 # Skip entering/leaving directories and incomplete lines
26 if($line =~ /make\[([0-9]*)\]:.*/ ||
27 # $line =~ /.*\s\\$/ ||
28 $line =~ /^test\s\-z\s/ ||
29 $line =~ /^Making\sclean\sin\s\./ ||
30 $line =~ /then\smv\s-f/ ||
31 $line =~ /.*make\s\s.*/ ||
32 $line =~ /make\s\sall-recursive/ ||
33 $line =~ /[A-z0-9-]*ar\s[A-z0-9]*\s([A-z0-9\-_\/\.]*)\s.*/ ||
34 $line =~ /^[A-z0-9-]*ranlib\s[A-z0-9-_]*plugin(.*)/ ||
35 $line =~ /^touch.*/ ||
36 $line =~ /^srcdir=.*/ ||
37 $line =~ /^.* (lib[A-z0-9-_]*plugin.so).*/ ||
38 $line =~ /^\s*gcc(-.*)?\s-std=.*/ ||
39 $line =~ /^\sgcc(-.*)?\s-mmacosx.*/ ||
40 $line =~ /^\sg\+\+(-.*)?\s.*/ ||
41 # $line =~ /^.*moc.*/ ||
42 $line =~ /^.*libtool.*\-o\s(lib.*\.la).*/ ||
43 $line =~ /^.*rm\s\-f\s(.*)/ ||
44 $line =~ /^rm\s-fr\s(.*)/ ||
45 $line =~ /^mv\s-f\s(.*)/ ||
46 $line =~ /^ln\s-s\s(.*)/ ||
47 $line =~ /^\s*echo\s/ ||
48 $line =~ /^mkdir\s/ ||
49 $line =~ /^\s*cat\s/ ||
50 $line =~ /^grep\s/ ||
51 $line =~ /^cd\s/ ||
52 $line =~ /^sed\s/ ||
53 $line =~ /^bindir=\s/ ||
54 $line =~ /^libtool:\s/ ||
55 $line =~ /^\/bin\/sh/ ||
56 $line =~ /^\/usr\/bin\/moc-qt4/ ||
57 $line =~ /^\/usr\/bin\/uic-qt4/ ||
58 $line =~ /^creating lib.*/)
60 # Info
61 elsif(
62 $line =~ s/^.*\-shared.*(lib.*\.so).*/ LINK : $1/g ||
63 $line =~ s/^.* (lib.*\.so).*/ LINK : $1/g ||
64 $line =~ s/^.* (lib.*\.o)\s\.\/(.*)/ COMPILE : $2/g ||
65 $line =~ s/^.*(lib.*\.lo)\s.*/ COMPILE : $1/g ||
66 $line =~ s/^.* (lib.*\.o)\s`.*`(.*);\ \\/ COMPILE : $2/ ||
67 $line =~ s/.*\-o\s([^\s]*)\s`.*`([^\s]*);.*/ COMPILE : $2/g ||
68 $line =~ s/^[A-z0-9-]*ranlib\s(.*)/ RANLIB : $1/g ||
69 $line =~ s/^Making\sall\sin\s(.*)/MAKE : $1/g ||
70 $line =~ s/^Making\sclean\sin\s(.*)/CLEAN : $1/g )
72 print $info.$line.$reset."\n";
74 # Warning
75 elsif (
76 $line =~ s/(.*):([0-9]*):\swarning\:(.*)/WARNING : $file$1: $lineno$2: $warn$3/g ||
77 $line =~ s/.*is\sdeprecated.*/WARNING : $line/g )
79 print STDERR $warn.$line.$reset."\n";
81 # Error
82 elsif (
83 $line =~ s/(.*):([0-9]*):\serror\:(.*)/ERROR : $file$1: $lineno$2: $error$3/g )
85 print STDERR $error.$line.$reset."\n";
87 # Print unmatched lines
88 else
90 print $line."\n";