]> git.pld-linux.org Git - projects/cleanbuild.git/commitdiff
findbr: check errors from mkmf.log as well
authorElan Ruusamäe <glen@pld-linux.org>
Sat, 28 Oct 2017 18:23:14 +0000 (21:23 +0300)
committerElan Ruusamäe <glen@pld-linux.org>
Sat, 28 Oct 2017 18:23:14 +0000 (21:23 +0300)
findbr

diff --git a/findbr b/findbr
index e1389ff4dc9b84b9cccd3ada59fd139ecbe52082..9e2c930a36b67e261c6d7771204dad3f4bebd08f 100755 (executable)
--- a/findbr
+++ b/findbr
@@ -124,6 +124,7 @@ sub poldek_cmd
 
 my $check_ac = 0;
 my $check_config_log = undef;
+my $check_mkmf_log = undef;
 
 my %checked_files;
 sub poldek_file
@@ -515,6 +516,10 @@ while ( $_ = shift @lines ) {
                $check_config_log = 1 unless defined $check_config_log;
        }
 
+       if ( m{Check the mkmf.log file for more details} ) {
+               $check_mkmf_log = 1 unless defined $check_mkmf_log;
+       }
+
        if ( m{^CMake (?:Error|Warning) at (?:\S+/)?(\S+?)\.cmake:(\d+) } ) {
                my ( $module, $line ) = ( lc $1, $2 );
                my $br;
@@ -684,7 +689,7 @@ while ( $_ = shift @lines ) {
 
 
 
-sub wanted
+sub find_configure
 {
        return unless /^configure(\.(?:ac|in|in\.in))?$/;
        return unless -r;
@@ -708,10 +713,10 @@ sub wanted
 
 use File::Find;
 if ( $check_ac ) {
-       find( \&wanted, $builddir );
+       find( \&find_configure, $builddir );
 }
 
-sub wanted2
+sub find_config_log
 {
        return unless /^config\.log$/;
        return unless -r;
@@ -724,7 +729,21 @@ sub wanted2
 
 if ( $check_config_log ) {
        $check_config_log = 0;
-       find( \&wanted2, $builddir );
+       find( \&find_config_log, $builddir );
+       goto start_check if @lines;
+}
+
+if ($check_mkmf_log) {
+       $check_mkmf_log = 0;
+       find(sub {
+               return unless /^mkmf\.log$/;
+               return unless -r;
+
+               warn "$File::Find::name\n";
+               open F_IN, "<", $_;
+               push @lines, <F_IN>;
+               close F_IN;
+       }, $builddir);
        goto start_check if @lines;
 }
 
This page took 0.109169 seconds and 4 git commands to generate.