From 497f50e1529f849f6254f8772a16ef1edd7cd0cf Mon Sep 17 00:00:00 2001 From: Derek Bankieris Date: Thu, 11 Apr 2019 08:42:53 -0500 Subject: [PATCH] Immediately add file to md5s after check Fixes #753 --- libexec/trick/make_makefile_swig | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/libexec/trick/make_makefile_swig b/libexec/trick/make_makefile_swig index 7d5eedd3..d442049f 100755 --- a/libexec/trick/make_makefile_swig +++ b/libexec/trick/make_makefile_swig @@ -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 ;