my $check_ac = 0;
my $check_config_log = undef;
+my $check_mkmf_log = undef;
my %checked_files;
sub poldek_file
$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;
-sub wanted
+sub find_configure
{
return unless /^configure(\.(?:ac|in|in\.in))?$/;
return unless -r;
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;
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;
}