cross-plat-dev-utils/build_target.pl
changeset 10 b2a53d442fd6
parent 6 787612182dd0
equal deleted inserted replaced
9:67f8bb81b054 10:b2a53d442fd6
    56 my $log_pattern = "$log_stem\.\*\.log"; 
    56 my $log_pattern = "$log_stem\.\*\.log"; 
    57 my $raptor = File::Spec->catfile(get_sbs_home(),"bin","sbs");
    57 my $raptor = File::Spec->catfile(get_sbs_home(),"bin","sbs");
    58 my $cmd = "$raptor -c tools2 -b $bld_inf @ARGV";
    58 my $cmd = "$raptor -c tools2 -b $bld_inf @ARGV";
    59 print ">>> Executing: $cmd\n";
    59 print ">>> Executing: $cmd\n";
    60 my $rc = system($cmd) >> 8;
    60 my $rc = system($cmd) >> 8;
       
    61 my $warnings = 0;
    61 my @build_logs = glob($log_pattern);
    62 my @build_logs = glob($log_pattern);
    62 open BLDLOG, "<$build_logs[-1]" or die $!;
    63 open BLDLOG, "<$build_logs[-1]" or die $!;
    63 while(<BLDLOG>) {
    64 while(<BLDLOG>) {
    64     print $_;
    65     print $_;
       
    66 	++$warnings, if (/<warning>/);
    65 }
    67 }
    66 close BLDLOG;
    68 close BLDLOG;
       
    69 print "*** Build failed ***\n", if ($rc);
       
    70 if ($warnings) {
       
    71 	print "*** Build has warnings ***\n";
       
    72 	$rc = 1;
       
    73 }
    67 exit $rc;
    74 exit $rc;
    68 
    75 
    69 
    76