- Timestamp:
- Feb 2, 2008, 6:44:28 PM (16 years ago)
- Location:
- CMT/HEAD
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
CMT/HEAD/ChangeLog
r437 r438 1 2008-02-02 <rybkin@lal.in2p3.fr> 343 2 3 * source/cmt_parser.cxx: Correct treatment of the -with_version_directory 4 and -without_version_directory command line options 5 * source/cmt.h: idem 6 1 7 2008-02-02 <rybkin@lal.in2p3.fr> 342 2 8 -
CMT/HEAD/source/cmt.h
r411 r438 83 83 static void clear (); 84 84 85 static void configure (); 85 // static void configure (); 86 static void configure (const ArgParser& ap); 86 87 static void configure_cmt_path (Use* use); 87 88 static void configure_config_tag (); … … 89 90 static void configure_current_dir (); 90 91 static void configure_current_package (); 91 static void configure_current_structuring_style (); 92 // static void configure_current_structuring_style (); 93 static void configure_current_structuring_style (const ArgParser& ap); 92 94 static void configure_default_path (); 93 95 static void configure_home (Use* use); … … 228 230 static void install_test_cleanup_scripts (); 229 231 static void install_test_setup_scripts (); 230 static bool load (const cmt_string& path, 232 // static bool load (const cmt_string& path, 233 static bool load (const ArgParser& ap, 234 const cmt_string& path, 231 235 const cmt_string& package, 232 236 const cmt_string& version, -
CMT/HEAD/source/cmt_parser.cxx
r435 r438 505 505 506 506 //---------------------------------------------------------- 507 void Cmt::configure () 507 //void Cmt::configure () 508 void Cmt::configure (const ArgParser& ap) 508 509 { 509 510 Log; … … 546 547 547 548 log << "configure_current_structuring_style" << log_endl; 548 configure_current_structuring_style (); 549 // configure_current_structuring_style (); 550 configure_current_structuring_style (ap); 549 551 550 552 log << "configure_current_package" << log_endl; … … 881 883 CmtStructuringStyle structuring_style(default_structuring_style); 882 884 CmtStructuringStyle style(default_structuring_style); 883 // - the project the package belongs to 884 Project* p = Project::get_current (); 885 if (p) 886 { 887 style = p->get_strategy ("VersionDirectory") ? with_version_directory : without_version_directory ; 888 StrategyDef* def = StrategyMgr::find_strategy ("VersionDirectory"); 889 if (def != 0) 890 { 891 if (p->is_specified (def)) structuring_style = style; 892 } 893 } 885 // - the command line options 886 // or 894 887 // - the CMTSTRUCTURINGSTYLE environment variable 895 888 if (structuring_style == default_structuring_style) 896 889 { 897 890 structuring_style = get_current_structuring_style (); 891 } 892 // - the project the package belongs to 893 if (structuring_style == default_structuring_style) 894 { 895 Project* p = Project::get_current (); 896 if (p) 897 { 898 style = p->get_strategy ("VersionDirectory") ? with_version_directory : without_version_directory ; 899 StrategyDef* def = StrategyMgr::find_strategy ("VersionDirectory"); 900 if (def != 0) 901 { 902 if (p->is_specified (def)) structuring_style = style; 903 } 904 } 898 905 } 899 906 // - the child projects of the project the package belongs to … … 950 957 951 958 //---------------------------------------------------------- 952 void Cmt::configure_current_structuring_style () 953 { 959 //void Cmt::configure_current_structuring_style () 960 void Cmt::configure_current_structuring_style (const ArgParser& ap) 961 { 962 for (int i = ap.argc - 1; i >= 0; i--) 963 { 964 const cmt_string& arg = ap.argv[i]; 965 if (arg == "-without_version_directory") 966 { 967 Me.m_current_structuring_style = without_version_directory; 968 return; 969 } 970 else if (arg == "-with_version_directory") 971 { 972 Me.m_current_structuring_style = with_version_directory; 973 return; 974 } 975 } 976 954 977 cmt_string s; 955 978 … … 2137 2160 } 2138 2161 2139 configure_current_package ();2162 // configure_current_package (); 2140 2163 2141 2164 Generator::build_default_makefile (); … … 2307 2330 } 2308 2331 2309 configure_current_package ();2332 // configure_current_package (); 2310 2333 2311 2334 Generator::build_default_makefile (); … … 3432 3455 3433 3456 clear (); 3434 configure (); 3457 // configure (); 3458 configure (ap); 3435 3459 3436 3460 cout << "# ----------- Clients of " << package << … … 4650 4674 * This is considered to be rather unsafe, and should be replaced by query functions. 4651 4675 */ 4652 bool Cmt::load (const cmt_string& path, 4676 //bool Cmt::load (const cmt_string& path, 4677 bool Cmt::load (const ArgParser& ap, 4678 const cmt_string& path, 4653 4679 const cmt_string& package, 4654 4680 const cmt_string& version, … … 4656 4682 { 4657 4683 clear (); 4658 configure (); 4684 // configure (); 4685 configure (ap); 4659 4686 4660 4687 Me.m_action = action_load; … … 4975 5002 clear (); 4976 5003 4977 configure (); 5004 // configure (); 5005 configure (ap); 4978 5006 4979 5007 CmtError::clear ();
Note: See TracChangeset
for help on using the changeset viewer.