mirror of
https://github.com/nasa/trick.git
synced 2025-01-18 10:46:26 +00:00
Lift get_paths into its own module
Fixes #752
(cherry picked from commit bde2ec5158
)
Conflicts:
libexec/trick/convert_swig
libexec/trick/make_makefile_swig
This commit is contained in:
parent
f85111427f
commit
6fc9e5d1ef
@ -11,6 +11,7 @@ use Digest::MD5 qw(md5_hex) ;
|
||||
use trick_version ;
|
||||
use html ;
|
||||
use verbose_build ;
|
||||
use get_paths ;
|
||||
use strict ;
|
||||
|
||||
my @exclude_paths ;
|
||||
@ -24,21 +25,6 @@ my %trick_headers ;
|
||||
my %python_modules ;
|
||||
my %python_module_dirs ;
|
||||
|
||||
sub get_paths {
|
||||
my @paths = split /:/ , $ENV{$_[0]} ;
|
||||
if (scalar @paths) {
|
||||
@paths = sort(@paths ) ;
|
||||
# trim whitespace
|
||||
@paths = map { s/(^\s+|\s+$)//g ; $_ } @paths ;
|
||||
# Remove empty elements. Sort forced all blank names to the front.
|
||||
while ( scalar @paths and not length @paths[0] ) {
|
||||
shift @paths ;
|
||||
}
|
||||
@paths = map { (-e $_) ? abs_path($_) : $_ } @paths ;
|
||||
}
|
||||
return @paths ;
|
||||
}
|
||||
|
||||
sub read_files_to_process() {
|
||||
my @include_paths ;
|
||||
my $cc ;
|
||||
|
Loading…
Reference in New Issue
Block a user