Changeset 428
- Timestamp:
- Oct 31, 2007, 4:48:32 PM (17 years ago)
- Location:
- CMT/HEAD
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
CMT/HEAD/ChangeLog
r427 r428 1 2007-10-31 <rybkin@lal.in2p3.fr> 334 2 3 * source/cmt_parser.cxx: idem 4 * source/cmt_commands.cxx: idem 5 * source/cmt_generator.h: idem 6 * source/cmt_generator.cxx: idem 7 * source/cmt_generators.h: idem 8 * source/cmt_generators.cxx: Implement the new -out=file option of the 9 cmt build constituent_makefile command 10 * mgr/fragments/constituent: Make use of the new -out=file option of the 11 cmt build constituent_makefile command to allow simultaneous builds for multiple 12 binary tags 13 1 14 2007-09-01 <rybkin@lal.in2p3.fr> 333 2 15 -
CMT/HEAD/mgr/fragments/constituent
r198 r428 43 43 $(cmt_local_${CONSTITUENT}_makefile) :: $(${CONSTITUENT}_dependencies) $(cmt_local_tagfile_${CONSTITUENT}) build_library_links dirs 44 44 @echo "------> (constituents.make) Building ${CONSTITUENT}.make"; \ 45 $(cmtexe) -quiet -tag=$(tags) $(${CONSTITUENT}_extratags) build constituent_makefile ${CONSTITUENT} ; \ 46 if test ! "$(bin)" = "./"; then /bin/mv -f ${CONSTITUENT}.make $(cmt_local_${CONSTITUENT}_makefile); fi 45 $(cmtexe) -quiet -tag=$(tags) $(${CONSTITUENT}_extratags) build constituent_makefile -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT} 47 46 48 47 ${CONSTITUENT} :: $(${CONSTITUENT}_dependencies) $(cmt_local_${CONSTITUENT}_makefile) -
CMT/HEAD/source/cmt_commands.cxx
r388 r428 559 559 if (arg == "constituent_makefile") 560 560 { 561 if (argc > 0) 562 { 563 fill_one_argument (); 561 // if (argc > 0) 562 if (argc == 1 || (argc == 2 && cmt_string (argv[0]).substr (0, 5) == "-out=")) 563 { 564 //fill_one_argument (); 565 fill_arguments (); 564 566 cmt.m_action = action_build_constituent_makefile; 567 } 568 else if (argc > 0) 569 { 570 if (!cmt.m_quiet) cerr << "#CMT> syntax error : wrong arguments" << endl; 571 cmt.m_action = action_build_constituent_makefile; 572 help_action = action_help; 565 573 } 566 574 else -
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 -
CMT/HEAD/source/cmt_generator.h
r11 r428 50 50 void reset (); 51 51 bool prepare_output (const cmt_string& package, 52 const Constituent& constituent); 52 const Constituent& constituent, 53 const cmt_string& file = ""); 53 54 void commit (const cmt_string& name); 54 55 static void check (const cmt_string& name); … … 160 161 161 162 // Build the makefile fragment for one constituent 162 static int build_constituent_makefile (const Constituent& constituent); 163 static void build_constituent_makefile (const cmt_string& name); 163 static int build_constituent_makefile (const Constituent& constituent, 164 const cmt_string& file = ""); 165 static void build_constituent_makefile (const CmtSystem::cmt_string_vector& arguments); 164 166 165 167 static void build_default_makefile (); -
CMT/HEAD/source/cmt_generators.cxx
r427 r428 10 10 #include "cmt_symbol.h" 11 11 #include "cmt_log.h" 12 #include <assert.h> 12 13 13 14 //-------------------------------------------------- … … 395 396 //-------------------------------------------------- 396 397 void LibraryGenerator::build (const cmt_string& package, 397 const Constituent& constituent) 398 const Constituent& constituent, 399 const cmt_string& file_name) 398 400 { 399 401 static cmt_string lib; … … 408 410 reset (); 409 411 410 if (!prepare_output (package, constituent )) return;412 if (!prepare_output (package, constituent, file_name)) return; 411 413 412 414 switch (constituent.type) … … 856 858 //-------------------------------------------------- 857 859 void DocumentGenerator::build (const cmt_string& package, 858 const Constituent& constituent) 860 const Constituent& constituent, 861 const cmt_string& file_name) 859 862 { 860 863 static cmt_string names; … … 869 872 reset (); 870 873 871 if (!prepare_output (package, constituent )) return;874 if (!prepare_output (package, constituent, file_name)) return; 872 875 873 876 is_library = false; -
CMT/HEAD/source/cmt_generators.h
r427 r428 35 35 DocumentGenerator (); 36 36 void build (const cmt_string& package, 37 const Constituent& constituent); 37 const Constituent& constituent, 38 const cmt_string& file = ""); 38 39 39 40 private: … … 51 52 LibraryGenerator (); 52 53 void build (const cmt_string& package, 53 const Constituent& constituent); 54 const Constituent& constituent, 55 const cmt_string& file = ""); 54 56 55 57 protected: -
CMT/HEAD/source/cmt_parser.cxx
r411 r428 1641 1641 { 1642 1642 set_standard_macros (); 1643 Generator::build_constituent_makefile (ap.arguments [0]);1643 Generator::build_constituent_makefile (ap.arguments); 1644 1644 } 1645 1645 }
Note: See TracChangeset
for help on using the changeset viewer.