tools/summarise_gcc_errors.pl
changeset 11 3dcb71781467
parent 10 375cb23d95ba
equal deleted inserted replaced
10:375cb23d95ba 11:3dcb71781467
    31 
    31 
    32 Options:
    32 Options:
    33 
    33 
    34 -warnings      process warnings as well as errors
    34 -warnings      process warnings as well as errors
    35 -verbose       list the files associated with each error
    35 -verbose       list the files associated with each error
       
    36 -notfound      process "no such file" errors as well as compilation errors
    36 
    37 
    37 EOF
    38 EOF
    38   exit (1);  
    39   exit (1);  
    39   }
    40   }
    40 
    41 
    41 my $warnings = 0;
    42 my $warnings = 0;
    42 my $verbose = 0;
    43 my $verbose = 0;
       
    44 my $notfound = 0;
    43 
    45 
    44 # Analyse the rest of command-line parameters
    46 # Analyse the rest of command-line parameters
    45 if (!GetOptions(
    47 if (!GetOptions(
    46     "w|warnings" => \$warnings,
    48     "w|warnings" => \$warnings,
    47     "v|verbose" => \$verbose,
    49     "v|verbose" => \$verbose,
       
    50     "notfound" => \$notfound,
    48     ))
    51     ))
    49   {
    52   {
    50   Usage("Invalid argument");
    53   Usage("Invalid argument");
    51   }
    54   }
    52 
    55 
   249 			}
   252 			}
   250 		if ($messagetype eq "Warning" && $message =~ /No relevant classes found./)
   253 		if ($messagetype eq "Warning" && $message =~ /No relevant classes found./)
   251 			{
   254 			{
   252 			next;		# ignore Qt code generation warnings
   255 			next;		# ignore Qt code generation warnings
   253 			}
   256 			}
   254 		if ($message =~ /.*: No such file/ && !$warnings)
   257 		if ($message =~ /.*: No such file/ && !$notfound)
   255 			{
   258 			{
   256 			# next;		# ignore "no such file", as these aren't likely to be GCC-specific
   259 			next;		# ignore "no such file", as these aren't likely to be GCC-specific
   257 			}
   260 			}
   258 
   261 
   259 		handle_message($current_package,$filename,$lineno,$messagetype,$message);	
   262 		handle_message($current_package,$filename,$lineno,$messagetype,$message);	
   260 		next;
   263 		next;
   261 		}
   264 		}