mirror of
https://github.com/nasa/trick.git
synced 2025-01-18 10:46:26 +00:00
library dependencies are lost
Fixed the problem where library dependencies for header and source files are saved to the same file and half are lost. Did this by not removing the suffix when creating the library dependency file name. refs #128
This commit is contained in:
parent
cab267c6c4
commit
f5b30a4841
@ -23,7 +23,7 @@ sub read_lib_deps($@) {
|
||||
next if ( $l =~ /^-|\.a$/ ) ;
|
||||
$non_lib_processed_files{$l} = 1 ;
|
||||
my ( $file, $dir, $suffix) = fileparse($l, qr/\.[^.]*/) ;
|
||||
my ($lib_dep_file_name) = "build$dir${file}.lib_deps" ;
|
||||
my ($lib_dep_file_name) = "build$dir${file}.${suffix}.lib_deps" ;
|
||||
if ( -e $lib_dep_file_name ) {
|
||||
open FH, "$lib_dep_file_name" or die 'cannot open $lib_dep_file_name' ;
|
||||
my (@all_lines) = <FH> ;
|
||||
|
@ -82,8 +82,8 @@ sub get_lib_deps ($$) {
|
||||
foreach my $inc ( $file_path_dir , @inc_paths) {
|
||||
foreach my $ext ( "cpp" , "cc" , "c" , "c++" , "cxx" , "C" ) {
|
||||
if ( -e "$inc/$rel_dir/$base$ext" ) {
|
||||
#print "found $inc/$l$ext\n" ;
|
||||
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 ;
|
||||
@ -92,8 +92,8 @@ sub get_lib_deps ($$) {
|
||||
last ;
|
||||
}
|
||||
elsif ( -e "$inc/$rel_dir/src/$base$ext" ) {
|
||||
#print "found $inc/src/$l$ext\n" ;
|
||||
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 ;
|
||||
@ -136,7 +136,7 @@ sub write_lib_deps($) {
|
||||
|
||||
# Build the library dependencies file name to store results
|
||||
my ( $file, $dir, $suffix) = fileparse($source_file_name, qr/\.[^.]*/) ;
|
||||
my ($lib_dep_file_name) = "build$dir${file}.lib_deps" ;
|
||||
my ($lib_dep_file_name) = "build$dir${file}.${suffix}.lib_deps" ;
|
||||
if ( ! -e "build$dir" ) {
|
||||
make_path("build$dir") ;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user