my ($line, $next_line, $skip_ref) = @_;
if (not ($line =~ /^checking if you want to see long compiling messages\.\.\. no/
- or $line =~ /^\s*(?:CC|CCLD)\s+(.+?)$/
+ or $line =~ /^\s*\[?(?:CC|CCLD|LD)\]?\s+(.+?)$/
or $line =~ /^\s*(?:C|c)ompiling\s+(.+?)(?:\.\.\.)?$/
or $line =~ /^\s*(?:B|b)uilding (?:program|shared library)\s+(.+?)$/
or $line =~ /^\s*\[[\d ]+%\] Building (?:C|CXX) object (.+?)$/)) {
# Ignore compiler warnings for now.
next if $line =~ /$warning_regex/;
+ # Remove all ANSI color sequences which are sometimes used in non-verbose
+ # builds.
+ $line = Term::ANSIColor::colorstrip($line);
+ # Also strip '\0xf' (delete previous character), used by Elink's build
+ # system.
+ $line =~ s/\x0f//g;
+
# Check if this line indicates a non verbose build.
my $non_verbose = is_non_verbose_build($line);
...
CCLD libtest.la
+ [CC] src/test-a.o
+ [CC] src/test-b.o
+ [CC] src/test_c.o
+...
+ [LD] src/test.o
+
+# Colored build output.
+ [\e[36mCC\e[m\ f] src/test-a.o
+ [\e[36mCC\e[m\ f] src/test-b.o
+ [\e[36mCC\e[m\ f] src/test_c.o
+...
+ [\e[32mLD\e[m\ f] src/test.o
+
CC modules/server/test.c
Byte-compiling python modules...
NONVERBOSE BUILD: CC libtest_c.lo
NONVERBOSE BUILD: CC libtest-d.lo
NONVERBOSE BUILD: CCLD libtest.la
+NONVERBOSE BUILD: [CC] src/test-a.o
+NONVERBOSE BUILD: [CC] src/test-b.o
+NONVERBOSE BUILD: [CC] src/test_c.o
+NONVERBOSE BUILD: [LD] src/test.o
+NONVERBOSE BUILD: [CC] src/test-a.o
+NONVERBOSE BUILD: [CC] src/test-b.o
+NONVERBOSE BUILD: [CC] src/test_c.o
+NONVERBOSE BUILD: [LD] src/test.o
NONVERBOSE BUILD: CC modules/server/test.c
NONVERBOSE BUILD: Compiling test/test.cc to ../build/test/test.o
NONVERBOSE BUILD: Building shared library ../build/test/libtest.so.1.2.3