mirror of
https://github.com/nasa/trick.git
synced 2025-01-22 04:18:09 +00:00
Library dependencies not found in Trick 15 #325
There are 2 bugs. The first in ICG.pm did not look for dependencies that included "src" in the name correctly. The code was inserting the "src" in the incorrect place. The second bug is in mis_dep.pm. That bug did not include non ".o" files from the beginning.
This commit is contained in:
parent
e9a3a54fad
commit
3260e54cd7
@ -400,6 +400,8 @@ sub ICG(\@$$$) {
|
||||
}
|
||||
} else {
|
||||
$l =~ s/o$// ;
|
||||
my $file_name = basename($l) ;
|
||||
my $dir_name = dirname($l) ;
|
||||
foreach my $inc ( $file_path_dir , @inc_paths) {
|
||||
foreach my $ext ( "cpp" , "cc" , "c" , "c++" , "cxx" , "C" ) {
|
||||
if ( -e "$inc/$l$ext" ) {
|
||||
@ -410,9 +412,9 @@ sub ICG(\@$$$) {
|
||||
$found = 1 ;
|
||||
last ;
|
||||
}
|
||||
elsif ( -e "$inc/src/$l$ext" ) {
|
||||
#print "found $inc/src/$l$ext\n" ;
|
||||
my $f = abs_path(dirname("$inc/src/$l$ext")) . "/" . basename("$inc/src/$l$ext") ;
|
||||
elsif ( -e "$inc/$dir_name/src/$file_name$ext" ) {
|
||||
#print "found $inc/$dir_name/src/$file_name$ext\n" ;
|
||||
my $f = abs_path("$inc/$dir_name/src/$file_name$ext") ;
|
||||
push @{$$sim_ref{mis_entry_files}} , $f ;
|
||||
push @{$$sim_ref{head_deps}{$f}{files}} , $f ;
|
||||
$found = 1 ;
|
||||
|
@ -114,7 +114,7 @@ sub get_depends($$) {
|
||||
s/\(|\)|\s+//g ;
|
||||
s/\${(.+?)}/$ENV{$1}/eg ;
|
||||
}
|
||||
@list_objects = grep /\.o$/ , @lib_list ;
|
||||
@list_objects = grep !/\.so$|\.a$/ , @lib_list ;
|
||||
@list_libs = grep /\.so$|\.a$/ , @lib_list ;
|
||||
|
||||
# Always add self-dependency
|
||||
|
Loading…
Reference in New Issue
Block a user