mirror of
https://github.com/nasa/trick.git
synced 2025-01-18 10:46:26 +00:00
convert_swig incorrectly excluding files #717
Added another grep to remove blank paths after abs_path is run. abs_path will return blank if a path does not exist. We want to remove that from the result.
This commit is contained in:
parent
6b6e4ea027
commit
bd4c25d927
@ -127,9 +127,9 @@ if ( $help ) {
|
||||
|
||||
@include_dirs = $ENV{"TRICK_CFLAGS"} =~ /-I\s*(\S+)/g ; # get include paths from TRICK_CFLAGS
|
||||
|
||||
# Get environment variables, split on colons, strip leading/trailing whitespace, remove empty elements, get absolute paths
|
||||
# Get environment variables, split on colons, strip leading/trailing whitespace, remove empty elements, get absolute paths then remove more empty elements
|
||||
sub get_paths {
|
||||
return map abs_path($_), grep { $_ ne '' } map { s/(^\s+|\s+$)//g ; $_ } split /:/, $ENV{$_[0]} ;
|
||||
return grep { $_ ne ''} map abs_path($_), grep { $_ ne '' } map { s/(^\s+|\s+$)//g ; $_ } split /:/, $ENV{$_[0]} ;
|
||||
}
|
||||
@exclude_paths = get_paths( "TRICK_EXCLUDE") ;
|
||||
@swig_exclude_paths = get_paths( "TRICK_SWIG_EXCLUDE") ;
|
||||
@ -265,6 +265,7 @@ sub process_file() {
|
||||
# Get the canonical path (resolve ., .., and symbolic links)
|
||||
$file_name = abs_path(dirname($file_name)) . "/" . basename($file_name) ;
|
||||
|
||||
|
||||
# Skip excluded paths
|
||||
foreach my $i ( @exclude_paths, @swig_exclude_paths ) {
|
||||
if ( $file_name =~ /^\Q$i/ ) {
|
||||
|
Loading…
Reference in New Issue
Block a user