Changeset 628 for CMT/HEAD/source
- Timestamp:
- Jan 11, 2013, 11:23:19 AM (11 years ago)
- Location:
- CMT/HEAD/source
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
CMT/HEAD/source/cmt_generator.cxx
r627 r628 86 86 m_HASTARGETTAG.set ("HASTARGETTAG"); 87 87 m_HASDEPENDENCIES.set ("HASDEPENDENCIES"); 88 m_HASPROTOTYPES.set ("HASPROTOTYPES"); 88 89 m_ISCHECKGROUP.set ("ISCHECKGROUP"); 89 90 } … … 126 127 m_HASTARGETTAG = ""; 127 128 m_HASDEPENDENCIES = ""; 129 m_HASPROTOTYPES = ""; 128 130 m_ISCHECKGROUP = ""; 129 131 m_PACKINCLUDES = ""; -
CMT/HEAD/source/cmt_generator.h
r627 r628 133 133 Variable m_HASTARGETTAG; 134 134 Variable m_HASDEPENDENCIES; 135 Variable m_HASPROTOTYPES; 135 136 Variable m_ISCHECKGROUP; 136 137 }; -
CMT/HEAD/source/cmt_generators.cxx
r627 r628 468 468 const cmt_string& file_name) 469 469 { 470 static cmt_string lib;470 //static cmt_string lib; 471 471 static cmt_string allsources; 472 472 static cmt_string file; … … 499 499 need_prototypes = constituent.need_prototypes; 500 500 501 if (constituent.need_prototypes) 502 { 503 m_HASPROTOTYPES = "has_prototypes"; 504 } 505 else 506 { 507 m_HASPROTOTYPES = "has_no_prototypes"; 508 } 509 501 510 // cout << m_TITLE << " " << m_CONSTITUENT << endl; 502 511 CmtMessage::info (m_TITLE + " " + m_CONSTITUENT); 503 512 513 /* 504 514 lib = "$("; 505 515 lib += m_CONSTITUENT; 506 516 lib += "lib)"; 507 517 */ 508 518 // 509 519 // Prepare the include paths … … 639 649 if (is_library) 640 650 { 641 jar_header_fragment.copy (m_output_file, constituent.variables, 3,651 jar_header_fragment.copy (m_output_file, constituent.variables, 5, 642 652 &m_CONSTITUENT, 643 653 &m_CONSTITUENTSUFFIX, 644 &m_OBJS); 654 &m_OBJS, 655 &m_PROTOTARGET, 656 &m_HASPROTOTYPES); 645 657 } 646 658 else 647 659 { 648 java_header_fragment.copy (m_output_file, constituent.variables, 3,660 java_header_fragment.copy (m_output_file, constituent.variables, 5, 649 661 &m_CONSTITUENT, 650 662 &m_CONSTITUENTSUFFIX, 651 &m_OBJS); 663 &m_OBJS, 664 &m_PROTOTARGET, 665 &m_HASPROTOTYPES); 652 666 } 653 667 } … … 656 670 if (is_library) 657 671 { 658 library_header_fragment.copy (m_output_file, constituent.variables, 3,672 library_header_fragment.copy (m_output_file, constituent.variables, 5, 659 673 &m_CONSTITUENT, 660 674 &m_CONSTITUENTSUFFIX, 661 &m_PROTOTARGET); 675 &m_OBJS, 676 &m_PROTOTARGET, 677 &m_HASPROTOTYPES); 662 678 } 663 679 else 664 680 { 665 application_header_fragment.copy (m_output_file, constituent.variables, 3, 666 &m_CONSTITUENT, 667 &m_CONSTITUENTSUFFIX, 668 &m_PROTOTARGET); 681 application_header_fragment.copy (m_output_file, constituent.variables, 5, 682 &m_CONSTITUENT, 683 &m_CONSTITUENTSUFFIX, 684 &m_OBJS, 685 &m_PROTOTARGET, 686 &m_HASPROTOTYPES); 669 687 } 670 688 } … … 806 824 if (need_dependencies) 807 825 { 808 809 810 811 812 826 dependencies_fragment.copy (m_output_file, 827 constituent.variables, 3, 828 &m_CONSTITUENT, 829 &m_CONSTITUENTSUFFIX, 830 &m_LINE); 813 831 } 814 832 } … … 2601 2619 constituent_fragment.set ("constituent"); 2602 2620 constituent_lock_fragment.set ("constituent_lock"); 2621 constituent_app_lib_fragment.set ("constituent_app_lib"); 2603 2622 check_application_header_fragment.set ("check_application_header"); 2604 2623 } … … 2612 2631 constituent_fragment.reset (); 2613 2632 constituent_lock_fragment.reset (); 2633 constituent_app_lib_fragment.reset (); 2614 2634 check_application_header_fragment.reset (); 2615 2635 } … … 2738 2758 { 2739 2759 case Application: 2740 m_HASDEPENDENCIES = "has_dependencies";2741 break;2742 2760 case Library: 2743 2761 m_HASDEPENDENCIES = "has_dependencies"; 2762 m_HASPROTOTYPES = constituent.need_prototypes ? "has_prototypes" : "has_no_prototypes" ; 2744 2763 break; 2745 2764 case Document: … … 2758 2777 &m_HASDEPENDENCIES, 2759 2778 &m_HASTARGETTAG); 2779 } 2780 else if (constituent.type == Application || 2781 constituent.type == Library) 2782 { 2783 constituent_app_lib_fragment.copy (m_output_file, constituent.variables, 2784 7, 2785 &m_PACKAGE, 2786 &m_CONSTITUENT, 2787 &m_CONSTITUENTSUFFIX, 2788 &m_LINE, 2789 &m_HASDEPENDENCIES, 2790 &m_HASTARGETTAG, 2791 &m_HASPROTOTYPES); 2760 2792 } 2761 2793 else -
CMT/HEAD/source/cmt_generators.h
r588 r628 220 220 FragmentHandle constituent_fragment; 221 221 FragmentHandle constituent_lock_fragment; 222 FragmentHandle constituent_app_lib_fragment; 222 223 FragmentHandle check_application_header_fragment; 223 224 }; -
CMT/HEAD/source/cmt_parser.cxx
r621 r628 9620 9620 SyntaxParser::parse_requirements_line (temp, current_use); 9621 9621 } 9622 9623 for (int i = 0; i < constituents.size (); i++) 9624 { 9625 const Constituent& constituent = constituents[i]; 9626 if (constituent.type == Document) continue; 9627 const cmt_string macro_name = constituent.name + "compile_dependencies"; 9628 if (!Symbol::is_selected (macro_name)) 9629 { 9630 temp = "macro_append "; 9631 temp += macro_name; 9632 temp += " \""; 9633 9634 const Symbol* deps_macro = Symbol::find (constituent.name + "_dependencies"); 9635 if (deps_macro != 0) 9636 { 9637 const cmt_string deps_value (deps_macro->resolve_macro_value ()); 9638 CmtSystem::cmt_string_vector words; 9639 CmtSystem::split (deps_value, " \t", words); 9640 for (int i = 0; i < words.size (); i++) 9641 { 9642 const cmt_string& word = words[i]; 9643 const Constituent* dep = Constituent::find (word); 9644 if (dep == 0) 9645 { 9646 if (CmtMessage::active (Verbose)) 9647 CmtMessage::warning 9648 (CmtError::get_error_name (CmtError::configuration_error) 9649 + ": " + word + ": non-constituent name in macro " 9650 + constituent.name + "_dependencies value"); 9651 continue; 9652 } 9653 switch (dep->type) 9654 { 9655 case Application: 9656 case Library: 9657 if (dep->need_prototypes) 9658 temp += " " + word + "prototype"; 9659 break; 9660 case Document: 9661 temp += " " + word; 9662 break; 9663 } 9664 } 9665 } 9666 9667 temp += "\""; 9668 9669 SyntaxParser::parse_requirements_line (temp, current_use); 9670 } 9671 if (constituent.need_prototypes) 9672 { 9673 const cmt_string macro_name = constituent.name + "prototype_dependencies"; 9674 if (!Symbol::is_selected (macro_name)) 9675 { 9676 temp = "macro_append "; 9677 temp += macro_name; 9678 temp += " \" $("; 9679 temp += constituent.name + "compile_dependencies)\""; 9680 9681 SyntaxParser::parse_requirements_line (temp, current_use); 9682 } 9683 } 9684 } 9622 9685 } 9623 9686
Note: See TracChangeset
for help on using the changeset viewer.