Public Member Functions | |
LibraryAnalyzer (const cmt_string &package_name, Constituent &constituent_ref) | |
void | end () |
|
Definition at line 571 of file cmt_triggers.cxx.
00572 : 00573 DependencyAnalyzer (package_name, constituent_ref) 00574 { 00575 } |
|
Reimplemented from DependencyAnalyzer. Definition at line 577 of file cmt_triggers.cxx. References Symbol::build_macro_value(), Symbol::find(), Libmap::libmaps(), Libmap::LibmapVector, Libmap::name, Constituent::name, Libmap::package, SyntaxParser::parse_requirements_text(), Libmap::set_used(), cmt_vector< T >::size(), cmt_vector< Libmap * >::size(), and Libmap::used.
00578 { 00579 cmt_string macro_name; 00580 cmt_string output; 00581 00582 int i; 00583 00584 if (uses.size () > 0) 00585 { 00586 for (i = 0; i < uses.size (); i++) 00587 { 00588 Libmap& libmap = *(uses[i]); 00589 00590 libmap.set_used (); 00591 } 00592 00593 Libmap::LibmapVector& table = Libmap::libmaps (); 00594 00595 macro_name = constituent.name; 00596 macro_name += "_implied_libraries"; 00597 00598 output = "macro_prepend "; 00599 output += macro_name; 00600 output += " \""; 00601 for (i = 0; i < table.size (); i++) 00602 { 00603 Libmap& libmap = table[i]; 00604 00605 if (libmap.used) 00606 { 00607 #ifdef USE_PACKAGE_SCOPE 00608 output += libmap.package; 00609 output += "::"; 00610 #endif 00611 output += libmap.name; 00612 output += " "; 00613 } 00614 } 00615 output += "\""; 00616 00617 SyntaxParser::parse_requirements_text (output, "", 0); 00618 00619 Symbol* macro = Symbol::find (macro_name); 00620 output = macro_name; 00621 output += "="; 00622 output += macro->build_macro_value (); 00623 00624 cout << output << endl; 00625 } 00626 00627 if (triggers.size () > 0) 00628 { 00629 macro_name = constituent.name; 00630 macro_name += "_triggers"; 00631 00632 output = "macro_prepend "; 00633 output += macro_name; 00634 output += " \""; 00635 for (i = 0; i < triggers.size (); i++) 00636 { 00637 const cmt_string& trigger = triggers[i]; 00638 00639 output += trigger; 00640 output += " "; 00641 } 00642 output += "\""; 00643 00644 SyntaxParser::parse_requirements_text (output, "", 0); 00645 00646 Symbol* macro = Symbol::find (macro_name); 00647 output = macro_name; 00648 output += "="; 00649 output += macro->build_macro_value (); 00650 00651 cout << output << endl; 00652 } 00653 } |