Changeset 428 for CMT/HEAD/source/cmt_generator.cxx
- Timestamp:
- Oct 31, 2007, 4:48:32 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CMT/HEAD/source/cmt_generator.cxx
r400 r428 219 219 //-------------------------------------------------- 220 220 bool CmtGenerator::prepare_output (const cmt_string& package, 221 const Constituent& constituent) 221 const Constituent& constituent, 222 const cmt_string& file) 222 223 { 223 224 m_PACKAGE = package; … … 238 239 } 239 240 241 if (file != "") m_output_file_name = file; 242 240 243 m_output_file_name += "new"; 241 244 … … 692 695 693 696 //-------------------------------------------------- 694 int Generator::build_constituent_makefile (const Constituent& constituent) 697 int Generator::build_constituent_makefile (const Constituent& constituent, 698 const cmt_string& file) 695 699 { 696 700 const cmt_string& package = Cmt::get_current_package (); … … 699 703 { 700 704 case Application: 701 ApplicationContext.build (package, constituent );705 ApplicationContext.build (package, constituent, file); 702 706 break; 703 707 case Library: 704 LibraryContext.build (package, constituent );708 LibraryContext.build (package, constituent, file); 705 709 break; 706 710 case Document: 707 DocumentContext.build (package, constituent );711 DocumentContext.build (package, constituent, file); 708 712 break; 709 713 } … … 713 717 714 718 //-------------------------------------------------- 715 void Generator::build_constituent_makefile (const cmt_string& name) 716 { 719 void Generator::build_constituent_makefile (const CmtSystem::cmt_string_vector& arguments) 720 { 721 cmt_string name; 722 cmt_string file; 723 724 if (arguments.size () == 1) 725 { 726 file = ""; 727 name = arguments[0]; 728 } 729 else if (arguments.size () == 2) // arguments[0].substr (0, 5) == "-out=" 730 { 731 cmt_string arg = arguments[0]; 732 arg.erase (0, 5); 733 file = arg; 734 name = arguments[1]; 735 } 736 else 737 { 738 cerr << "#CMT> build constituent_makefile : wrong arguments" << endl; 739 return; 740 } 741 717 742 const Constituent* constituent = Constituent::find (name); 718 if (constituent != 0) build_constituent_makefile (*constituent );743 if (constituent != 0) build_constituent_makefile (*constituent, file); 719 744 } 720 745
Note: See TracChangeset
for help on using the changeset viewer.