mirror of
https://github.com/nasa/trick.git
synced 2025-02-21 01:31:25 +00:00
Library dependencies with full path not found
When I merged the sections of code that look for library dependencies I left out the section that searches for dependencies that have a full path. I added that back in. refs #170
This commit is contained in:
parent
63f193441c
commit
bc9ef8c54b
@ -79,30 +79,55 @@ sub get_lib_deps ($$) {
|
||||
$l =~ s/o$// ;
|
||||
my ($rel_dir) = dirname($l) ;
|
||||
my ($base) = basename($l) ;
|
||||
foreach my $inc ( $file_path_dir , @inc_paths) {
|
||||
if ( $rel_dir =~ /^\// ) {
|
||||
# if the directory name of the dependency is absolute
|
||||
foreach my $ext ( "cpp" , "cc" , "c" , "c++" , "cxx" , "C" ) {
|
||||
if ( -e "$inc/$rel_dir/$base$ext" ) {
|
||||
my $f = abs_path("$inc/$rel_dir") . "/$base$ext" ;
|
||||
if ( -e "$rel_dir/$base$ext" ) {
|
||||
my $f = abs_path("$rel_dir") . "/$base$ext" ;
|
||||
#print "found $f\n" ;
|
||||
if ( ! exists $resolved_files{$f} ) {
|
||||
$resolved_files{$f} = 1 ;
|
||||
push @ordered_resolved_files , $f ;
|
||||
}
|
||||
$found = 1 ;
|
||||
last ;
|
||||
}
|
||||
elsif ( -e "$inc/$rel_dir/src/$base$ext" ) {
|
||||
my $f = abs_path("$inc/$rel_dir/src") . "/$base$ext" ;
|
||||
elsif ( -e "$rel_dir/src/$base$ext" ) {
|
||||
my $f = abs_path("$rel_dir/src") . "/$base$ext" ;
|
||||
#print "found $f\n" ;
|
||||
if ( ! exists $resolved_files{$f} ) {
|
||||
$resolved_files{$f} = 1 ;
|
||||
push @ordered_resolved_files , $f ;
|
||||
}
|
||||
$found = 1 ;
|
||||
last ;
|
||||
}
|
||||
}
|
||||
last if ( $found == 1 ) ;
|
||||
} else {
|
||||
# if the directory name of the dependency is a relative directory
|
||||
foreach my $inc ( $file_path_dir , @inc_paths) {
|
||||
foreach my $ext ( "cpp" , "cc" , "c" , "c++" , "cxx" , "C" ) {
|
||||
if ( -e "$inc/$rel_dir/$base$ext" ) {
|
||||
my $f = abs_path("$inc/$rel_dir") . "/$base$ext" ;
|
||||
#print "found $f\n" ;
|
||||
if ( ! exists $resolved_files{$f} ) {
|
||||
$resolved_files{$f} = 1 ;
|
||||
push @ordered_resolved_files , $f ;
|
||||
}
|
||||
$found = 1 ;
|
||||
last ;
|
||||
}
|
||||
elsif ( -e "$inc/$rel_dir/src/$base$ext" ) {
|
||||
my $f = abs_path("$inc/$rel_dir/src") . "/$base$ext" ;
|
||||
#print "found $f\n" ;
|
||||
if ( ! exists $resolved_files{$f} ) {
|
||||
$resolved_files{$f} = 1 ;
|
||||
push @ordered_resolved_files , $f ;
|
||||
}
|
||||
$found = 1 ;
|
||||
last ;
|
||||
}
|
||||
}
|
||||
last if ( $found == 1 ) ;
|
||||
}
|
||||
}
|
||||
# file not found, append the "o" we stripped for the error message
|
||||
$l .= "o" ;
|
||||
|
Loading…
x
Reference in New Issue
Block a user