Add ability to use doxygen style library dependencies in S_define file. #373

Added a regular expression to collect the library dependencies in the S_define
file.
This commit is contained in:
Alex Lin 2017-01-10 08:09:19 -06:00
parent 0197df7103
commit 0140b0b966
2 changed files with 15 additions and 6 deletions

View File

@ -47,6 +47,13 @@ sub extract_trick_header($$$$) {
# print " "x$indent , "*/\n\n" ;
# }
if ( $contents =~ /(?:@|\\)trick_li(?:nk|b)_dependency\s*{\s*(.*?)\s*}/) {
my @lib_list ;
@lib_list = ($contents =~ m/(?:@|\\)trick_li(?:nk|b)_dependency\s*{\s*(.*?)\s*}/gs) ;
# save doxygen style trick_lib_dependency fields in field = liblist.
$header{liblist} = [@lib_list] ;
}
$header{language} = "CPP" if ( $header{language} =~ /c[p\+]+/i ) ;
return %header ;

View File

@ -250,6 +250,8 @@ sub parse_s_define ($) {
$header{libdep} =~ s/\(\(/\(/ ;
$header{libdep} =~ s/\)\)/\)/ ;
@lib_list = $header{libdep} =~ m/\((.+?)\)/sg ;
# Append any library deps in doxygen style comments.
push @lib_list , @{$header{liblist}} if ( exists $header{liblist} ) ;
foreach my $object_file (@lib_list) {
#print " look for object $object_file\n" ;
if ( $object_file =~ /^\// ) {