X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=bin%2Fblhc;h=d276bc001b37b302672e35c6bff4abc1c7ba56ac;hb=388bdf91c4879a0212ac77840d2c3f016ff4b75b;hp=22ebd6f8a802e380e02d5a1fa02b0d92c45111a6;hpb=b254eba41857cd7c2cd9d9e3ac019fae1979aae2;p=blhc%2Fblhc.git diff --git a/bin/blhc b/bin/blhc index 22ebd6f..d276bc0 100755 --- a/bin/blhc +++ b/bin/blhc @@ -90,10 +90,14 @@ my @source_no_preprocess_compile = ( qw( mi ), # Fortran qw( f for ftn f90 f95 f03 f08 ), + # Ada body + qw( adb ), ); my @source_no_preprocess_no_compile = ( # Assembly qw( s ), + # Ada specification + qw( ads ), ); my @source_no_preprocess = ( @source_no_preprocess_compile, @@ -430,8 +434,8 @@ sub is_non_verbose_build { $file = $1; if (index($next_line, $file) != -1 and $next_line =~ /$cc_regex/o) { - # We still have to skip the current line as it doesn't contain any - # compiler commands. + # Not a non-verbose line, but we still have to skip the current line + # as it doesn't contain any compiler commands. ${$skip_ref} = 1; return 0; } @@ -641,8 +645,8 @@ foreach my $file (@ARGV) { # only, doesn't use the dpkg-buildpackage header. Necessary to ignore # build logs which aren't built (wrong architecture, build error, # etc.). - if (not $arch and $line =~ /^Architecture: (.+)$/) { - $arch = $1; + if (not $arch and index($line, 'Architecture: ') == 0) { + $arch = substr $line, 14, -1; # -1 to ignore '\n' at the end } # dpkg-buildflags only provides hardening flags since 1.16.1, don't @@ -713,12 +717,13 @@ foreach my $file (@ARGV) { # 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 # positives. - last if $line =~ /^Build finished at \d{8}-\d{4}$/; + last if index($line, 'Build finished at ') == 0 + and $line =~ /^Build finished at \d{8}-\d{4}$/; # Detect architecture automatically unless overridden. if (not $arch - and $line =~ /^dpkg-buildpackage: host architecture (.+)$/) { - $arch = $1; + and index($line, 'dpkg-buildpackage: host architecture ') == 0) { + $arch = substr $line, 37, -1; # -1 to ignore '\n' at the end } # Ignore compiler warnings for now.