]> ruderich.org/simon Gitweb - blhc/blhc.git/blobdiff - bin/blhc
Fix non-verbose compiler commands spanning multiple lines.
[blhc/blhc.git] / bin / blhc
index c77a16cedddc3c91333098f9a96a4104abdaae6a..b45439ca9e533a7e01fbb2bc8759d5be8571d29e 100755 (executable)
--- a/bin/blhc
+++ b/bin/blhc
@@ -442,6 +442,8 @@ sub is_non_verbose_build {
     # C++ compiler setting.
     return 0 if $line =~ /^\s*C\+\+.+?:\s+(?:yes|no)\s*$/;
     return 0 if $line =~ /^\s*C\+\+ Library: stdc\+\+$/;
+    # "Compiling" non binary files.
+    return 0 if $line =~ /^\s*Compiling \S+\.(?:py|el)['"]?(?:\.\.\.)?$/;
     # "Compiling" with no file name.
     if ($line =~ /^\s*[Cc]ompiling\s+(.+?)(?:\.\.\.)?$/) {
         # $file_extension_regex may need spaces around the filename.
@@ -773,6 +775,7 @@ foreach my $file (@ARGV) {
 
     my $continuation = 0;
     my $complete_line = undef;
+    my $non_verbose;
     while (my $line = <$fh>) {
         # And stop at the end of the build log. Package details (reported by
         # the buildd logs) are not important for us. This also prevents false
@@ -780,6 +783,10 @@ foreach my $file (@ARGV) {
         last if index($line, 'Build finished at ') == 0
                 and $line =~ /^Build finished at \d{8}-\d{4}$/;
 
+        if (not $continuation) {
+            $non_verbose = 0;
+        }
+
         # Detect architecture automatically unless overridden.
         if (not $arch
                 and index($line, 'dpkg-buildpackage: host architecture ') == 0) {
@@ -809,7 +816,7 @@ foreach my $file (@ARGV) {
         }
 
         # Check if this line indicates a non verbose build.
-        my $non_verbose = is_non_verbose_build($line);
+        $non_verbose |= is_non_verbose_build($line);
 
         # One line may contain multiple commands (";"). Treat each one as
         # single line. parse_line() is slow, only use it when necessary.