Skip to content

Commit

Permalink
Skip non existing headers
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartik Thakore committed Feb 2, 2010
1 parent ee75b7e commit dee6ad8
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions tools/GFX_headers_digest.pl
Expand Up @@ -12,7 +12,7 @@
#check to see we have a different path set for SDL_gfx
#

if ( -d $ENV{SDL_GFX_LOC})
if ( $ENV{SDL_GFX_LOC} && -d $ENV{SDL_GFX_LOC})
{
warn 'Using user defined location for SDL_GFX and not '.$head_loc;
$head_loc = $ENV{SDL_GFX_LOC};
Expand All @@ -24,12 +24,19 @@


my $file = File::Spec->catfile($head_loc, $header);
print " ################## $file ####################\n";

open my $FH, '<'.$file or warn "Cannot find $file please set \$ENV{SDL_GFX_LOC} to point to a different location : $!";

warn " Creating Config for: $file at \n";

my $FH;
open $FH, '<'.$file or warn "Cannot find $file please set \$ENV{SDL_GFX_LOC} to point to a different location : $!";

next if !$FH;

grep { $_ =~ /^(\s+|)(\S+) (\S+) (\*|)(\S+)(\()/; print "$5 \n" if $5 } <$FH>;

close $FH

}


Expand Down

0 comments on commit dee6ad8

Please sign in to comment.