Immediately add file to md5s after check

Fixes #753
This commit is contained in:
Derek Bankieris 2019-04-11 08:42:53 -05:00 committed by dbankieris
parent bde2ec5158
commit 497f50e152

View File

@ -70,6 +70,7 @@ sub read_files_to_process() {
# skip duplicate files
next if (exists($md5s{$word})) ;
$md5s{$word} = md5_hex($word) ;
# skip system headers that are missed by the compiler -MM flag
next if ( $word =~ /^\/usr\/include/ ) ;
@ -81,11 +82,7 @@ sub read_files_to_process() {
# skip paths in TRICK_EXCLUDE
foreach my $path ( @exclude_paths ) {
if ( $word =~ /^\Q$path\E(.*)/ ) {
print "SWIG Skip TRICK_EXCLUDE: $path$1\n" if $verbose_build ;
next outer ;
}
if ( abs_path($word) =~ /^\Q$path\E(.*)/ ) {
if ( $word =~ /^\Q$path\E(.*)/ or abs_path($word) =~ /^\Q$path\E(.*)/ ) {
print "SWIG Skip TRICK_EXCLUDE: $path$1\n" if $verbose_build ;
next outer ;
}
@ -93,22 +90,15 @@ sub read_files_to_process() {
# skip paths in TRICK_SWIG_EXCLUDE
foreach my $path ( @swig_exclude_paths ) {
if ( $word =~ /^\Q$path\E(.*)/ ) {
print "SWIG Skip TRICK_SWIG_EXCLUDE: $path$1\n" if $verbose_build ;
next outer ;
}
if ( abs_path($word) =~ /^\Q$path\E(.*)/ ) {
if ( $word =~ /^\Q$path\E(.*)/ or abs_path($word) =~ /^\Q$path\E(.*)/ ) {
print "SWIG Skip TRICK_SWIG_EXCLUDE: $path$1\n" if $verbose_build ;
next outer ;
}
}
# we'll be needing this later
$md5s{$word} = md5_hex($word) ;
# separate paths in TRICK_EXT_LIB_DIRS
foreach my $path ( @ext_lib_paths ) {
if ( $word =~ /^\Q$path\E(.*)/ ) {
if ( $word =~ /^\Q$path\E(.*)/ or abs_path($word) =~ /^\Q$path\E(.*)/ ) {
print "SWIG Skip TRICK_EXT_LIB_DIRS: $path$1\n" if $verbose_build ;
$ext_libs{$word} = 1 ;
next outer ;