#include
Collaboration diagram for Cmt:
|
? |
Append "CONFIG" to the prefix. Definition at line 374 of file cmt_parser.cxx. Referenced by configure_current_package(), load(), and reach_current_package(). 00376 { 00377 /* 00378 Building the config from |
|
? |
Definition at line 386 of file cmt_parser.cxx. References Constituent::build_all_makefiles(), Constituent::build_makefile(), Constituent::find(), m_simulation, and cmt_string::size(). Referenced by build_OS9_makefile(). 00387 { 00388 Constituent* constituent = 0; 00389 00390 if (target.size () > 0) 00391 { 00392 /* 00393 Do genmake for one specific target. 00394 */ 00395 constituent = Constituent::find (target); 00396 if (constituent != 0) 00397 { 00398 constituent->build_makefile (m_simulation); 00399 } 00400 } 00401 else 00402 { 00403 /* 00404 Do genmake for all possible targets. 00405 */ 00406 Constituent::build_all_makefiles (m_simulation); 00407 } 00408 } |
|
? |
Definition at line 411 of file cmt_parser.cxx. References Constituent::build_all_msdev_files(), Constituent::build_msdev_file(), Constituent::find(), m_simulation, and set_standard_macros(). Referenced by do_build_msdev(). 00412 { 00413 Constituent* constituent = 0; 00414 00415 set_standard_macros (); 00416 00417 if (target != "") 00418 { 00419 /* 00420 Do genmsdev for one specific target. 00421 */ 00422 constituent = Constituent::find (target); 00423 if (constituent != 0) 00424 { 00425 constituent->build_msdev_file (m_simulation); 00426 } 00427 } 00428 else 00429 { 00430 /* 00431 Do genmsdev for all possible targets. 00432 */ 00433 Constituent::build_all_msdev_files (m_simulation); 00434 } 00435 } |
|
? |
Definition at line 467 of file cmt_parser.cxx. Referenced by LibraryGenerator::analyze_file(), DependencyGenerator::build(), ConstituentsMakefileGenerator::build(), MakeSetupGenerator::build(), Fragment::locate(), and CmtGenerator::prepare_output(). 00468 {
00469 return (m_build_nmake);
00470 }
|
|
? |
Definition at line 473 of file cmt_parser.cxx. References build_makefile(). Referenced by do_build_os9_makefile(). 00474 { 00475 build_makefile (target); 00476 } |
|
? |
Convert a package name to its upper case copy. Definition at line 481 of file cmt_parser.cxx. References cmt_string::size(). Referenced by configure_current_package(), load(), reach_current_package(), and Use::set(). 00482 { 00483 int pos; 00484 char c; 00485 00486 /* 00487 Building the prefix from |
|
? |
Visual Studio.net Support. Definition at line 440 of file cmt_parser.cxx. References Constituent::build_all_vsnet_files(), Constituent::build_vsnet_file(), Constituent::find(), m_simulation, and set_standard_macros(). Referenced by do_build_vsnet(). 00441 { 00442 Constituent* constituent = 0; 00443 00444 set_standard_macros (); 00445 00446 if (target != "") 00447 { 00448 /* 00449 Do genvsnet for one specific target. 00450 */ 00451 constituent = Constituent::find (target); 00452 if (constituent != 0) 00453 { 00454 constituent->build_vsnet_file (m_simulation); 00455 } 00456 } 00457 else 00458 { 00459 /* 00460 Do genvsnet for all possible targets. 00461 */ 00462 Constituent::build_all_vsnet_files (m_simulation); 00463 } 00464 } |
|
? |
Definition at line 500 of file cmt_parser.cxx. References action_none, CmtError::clear(), Database::clear(), Script::clear_all(), Include::clear_all(), default_filtering_mode, DefaultBuildStrategy, DefaultSetupStrategy, DeveloperMode, m_action, m_build_nmake, m_cmt_config, m_cmt_root, m_cmt_version, m_current_access, m_current_build_strategy, m_current_cmtpath, m_current_config, m_current_dir, m_current_offset, m_current_package, m_current_path, m_current_prefix, m_current_setup_strategy, m_current_tag, m_current_target, m_current_version, m_default_path, m_help_action, m_quiet, m_recursive, m_scope_filtering_mode, m_simulation, and m_standard_macros_done. Referenced by do_show_clients(), load(), and parser(). 00501 { 00502 m_action = action_none; 00503 m_help_action = action_none; 00504 m_build_nmake = false; 00505 m_cmt_config = ""; 00506 //m_cmt_path.clear (); 00507 //m_cmt_path_pwds.clear (); 00508 //m_cmt_path_sources.clear (); 00509 m_cmt_root = ""; 00510 m_cmt_version = ""; 00511 m_current_build_strategy = DefaultBuildStrategy; 00512 m_current_setup_strategy = DefaultSetupStrategy; 00513 m_current_dir = ""; 00514 m_current_package = ""; 00515 m_current_config = ""; 00516 m_current_path = ""; 00517 m_current_prefix = ""; 00518 m_current_cmtpath = ""; 00519 m_current_offset = ""; 00520 00521 m_current_access = DeveloperMode; 00522 00523 m_current_tag = ""; 00524 m_current_target = ""; 00525 m_current_version = ""; 00526 m_default_path = ""; 00527 m_quiet = false; 00528 m_recursive = false; 00529 00530 m_scope_filtering_mode = default_filtering_mode; 00531 m_simulation = false; 00532 00533 m_standard_macros_done = false; 00534 00535 Database::clear (); 00536 Include::clear_all (); 00537 Script::clear_all (); 00538 CmtError::clear (); 00539 } |
|
? |
Definition at line 542 of file cmt_parser.cxx. References Use::change_path(), configure_config_tag(), configure_current_dir(), configure_current_package(), configure_current_structuring_style(), configure_default_path(), configure_home(), configure_hosttype_tag(), configure_site_tag(), configure_uname_tag(), configure_version_tag(), Use::current(), CmtError::get_last_error(), CmtError::has_pending_error(), m_cmt_version, m_configure_error, m_current_cmtpath, m_current_config, m_current_dir, m_current_offset, m_current_package, m_current_path, m_current_prefix, m_current_style, m_current_tag, m_current_version, m_debug, m_default_path, Use::set(), and Use::style. Referenced by do_show_clients(), load(), and parser(). 00543 { 00544 static bool configured = false; 00545 00546 if (configured) return; 00547 00548 m_cmt_version = ""; 00549 m_current_dir = ""; 00550 m_current_package = ""; 00551 m_current_prefix = ""; 00552 m_current_config = ""; 00553 m_current_path = ""; 00554 m_current_cmtpath = ""; 00555 m_current_offset = ""; 00556 00557 m_current_tag = ""; 00558 m_current_version = ""; 00559 00560 m_configure_error = ""; 00561 00562 m_debug = false; 00563 if (getenv ("CMTDEBUG") != 0) m_debug = true; 00564 00565 m_default_path = ""; 00566 00567 configure_default_path (); 00568 configure_version_tag (); 00569 configure_uname_tag (); 00570 configure_hosttype_tag (); 00571 configure_config_tag (); 00572 configure_site_tag (0); 00573 configure_home (0); 00574 configure_current_dir (); 00575 configure_current_package (); 00576 configure_current_structuring_style (); 00577 00578 Use& use = Use::current(); 00579 00580 use.set (m_current_package, 00581 m_current_version, 00582 m_current_path, 00583 "", 00584 ""); 00585 00586 use.style = m_current_style; 00587 00588 use.change_path (m_current_path); 00589 00590 if (CmtError::has_pending_error ()) 00591 { 00592 m_configure_error = CmtError::get_last_error (); 00593 } 00594 } |
|
? |
Definition at line 597 of file cmt_parser.cxx. References action_none, action_show_set, Symbol::build_macro_value(), IProjectFactory::create_project(), Symbol::expand(), Symbol::find(), CmtSystem::get_cmt_paths(), ProjectFactory::instance(), m_action, m_cmt_home, m_cmt_user_context, and IProjectFactory::reset(). Referenced by Symbol::action(), and configure_user_context(). 00598 { 00599 cmt_string s; 00600 00601 Symbol* symbol = Symbol::find ("CMTPATH"); 00602 if (symbol != 0) 00603 { 00604 bool show_set_hidden = false; 00605 00606 if (Cmt::m_action == action_show_set) 00607 { 00608 show_set_hidden = true; 00609 Cmt::m_action = action_none; 00610 } 00611 00612 s = symbol->build_macro_value (); 00613 Symbol::expand (s); 00614 00615 if (show_set_hidden) 00616 { 00617 show_set_hidden = false; 00618 Cmt::m_action = action_show_set; 00619 } 00620 } 00621 00622 IProjectFactory& factory = ProjectFactory::instance (); 00623 factory.reset (); 00624 00625 CmtSystem::get_cmt_paths (factory, s); 00626 if (m_cmt_user_context != "") factory.create_project (m_cmt_user_context, "CMTUSERCONTEXT"); 00627 if (m_cmt_home != "") factory.create_project (m_cmt_home, "CMTHOME"); 00628 } |
|
? |
Definition at line 631 of file cmt_parser.cxx. References Tag::add(), CmtSystem::get_cmt_config(), m_cmt_config, Tag::mark(), and PriorityConfig. Referenced by configure(), and parse_arguments(). 00632 { 00633 m_cmt_config = CmtSystem::get_cmt_config (); 00634 if (m_cmt_config != "") 00635 { 00636 Tag* tag; 00637 00638 tag = Tag::add (m_cmt_config, PriorityConfig, "CMTCONFIG", 0); 00639 tag->mark (); 00640 } 00641 } |
|
? |
Definition at line 644 of file cmt_parser.cxx. References Use::current(), CmtSystem::file_separator(), Project::find_in_cmt_paths(), m_current_cmtpath, m_current_offset, Use::path, and cmt_string::replace(). Referenced by StandardMacroBuilder::fill_for_branches(). 00645 { 00646 Use& current_use = Use::current (); 00647 00648 m_current_cmtpath = ""; 00649 m_current_offset = ""; 00650 00651 m_current_cmtpath = Project::find_in_cmt_paths (current_use.path); 00652 00653 if (m_current_cmtpath != "") 00654 { 00655 static const cmt_string empty_string; 00656 static const cmt_string fs = CmtSystem::file_separator (); 00657 00658 m_current_offset = current_use.path; 00659 00666 m_current_offset.replace (m_current_cmtpath, empty_string); 00667 if (m_current_offset[0] == CmtSystem::file_separator ()) 00668 { 00669 // Just in case there is a part left after removing the cmtpath entry 00670 00671 m_current_offset.replace (fs, empty_string); 00672 } 00673 } 00674 } |
|
? |
Definition at line 756 of file cmt_parser.cxx. References CmtSystem::file_separator(), CmtMountFilterParser::get_current_dir(), CmtSystem::get_home_directory(), m_cmt_version, m_current_dir, m_default_path, FAwk::run(), and CmtMountFilterParser::set_prefix(). Referenced by configure(), load(), and reach_current_package(). 00757 { 00758 cmt_string file_name; 00759 00760 /* 00761 Building current_dir : 00762 00763 o we first get the physical value (using getwd) 00764 o then this value is possibly filtered using the 00765 cmt_mount_filter file. 00766 */ 00767 00768 CmtMountFilterParser mount_filter; 00769 00775 file_name = m_default_path; 00776 if (file_name != "") 00777 { 00778 file_name += CmtSystem::file_separator (); 00779 file_name += "CMT"; 00780 file_name += CmtSystem::file_separator (); 00781 file_name += m_cmt_version; 00782 file_name += CmtSystem::file_separator (); 00783 file_name += "mgr"; 00784 file_name += CmtSystem::file_separator (); 00785 } 00786 00787 file_name += "cmt_mount_filter"; 00788 00789 mount_filter.run (file_name); 00790 00796 mount_filter.set_prefix ("mount_filter"); 00797 00798 mount_filter.run (".cmtrc"); 00799 00805 if (CmtSystem::get_home_directory (file_name)) 00806 { 00807 file_name += CmtSystem::file_separator (); 00808 file_name += ".cmtrc"; 00809 mount_filter.run (file_name); 00810 } 00811 00812 m_current_dir = mount_filter.get_current_dir (); 00813 } |
|
? |
Now try with ${HOME}/.cmtrc with "mount_filter" keyword. Definition at line 816 of file cmt_parser.cxx. References CmtSystem::basename(), build_config(), build_prefix(), cmt_style, CmtSystem::dirname(), cmt_string::erase(), CmtSystem::file_separator(), cmt_string::find(), CmtSystem::is_version_directory(), m_current_config, m_current_dir, m_current_package, m_current_path, m_current_prefix, m_current_style, m_current_version, mgr_style, no_version_style, none_style, cmt_string::npos, CmtSystem::pwd(), cmt_string::read(), and CmtSystem::test_file(). Referenced by configure(), and do_config(). 00817 { 00818 /* 00819 Build current_package and current_prefix. 00820 00821 This is only possible if we are within the cmt/mgr branch of a 00822 standard directory tree (i.e. |
|
? |
Definition at line 948 of file cmt_parser.cxx. References CmtSystem::getenv(), m_current_structuring_style, and without_version_directory. Referenced by configure(). 00949 { 00950 cmt_string s; 00951 00952 s = CmtSystem::getenv ("CMTSTRUCTURINGSTYLE"); 00953 if (s == "without_version_directory") 00954 { 00955 m_current_structuring_style = without_version_directory; 00956 } 00957 } |
|
? |
Definition at line 960 of file cmt_parser.cxx. References CmtSystem::file_separator(), CmtSystem::get_cmt_root(), CmtSystem::get_cmt_version(), m_cmt_root, m_cmt_version, and m_default_path. Referenced by configure(). 00961 { 00962 m_default_path = CmtSystem::get_cmt_root (); 00963 CmtSystem::get_cmt_version (m_cmt_version); 00964 m_cmt_root = m_default_path; 00965 m_cmt_root += CmtSystem::file_separator (); 00966 m_cmt_root += "CMT"; 00967 m_cmt_root += CmtSystem::file_separator (); 00968 m_cmt_root += m_cmt_version; 00969 } |
|
? |
Definition at line 972 of file cmt_parser.cxx. References Symbol::build_macro_value(), configure_user_context(), Symbol::expand(), Symbol::find(), CmtSystem::getenv(), m_cmt_home, CmtSystem::test_directory(), and CmtSystem::testenv(). Referenced by Symbol::action(), configure(), and parse_arguments(). 00973 { 00974 m_cmt_home = ""; 00975 00976 Symbol* symbol = Symbol::find ("CMTHOME"); 00977 if (symbol != 0) 00978 { 00979 m_cmt_home = symbol->build_macro_value (); 00980 Symbol::expand (m_cmt_home); 00981 } 00982 else if (CmtSystem::testenv ("CMTHOME")) 00983 { 00984 m_cmt_home = CmtSystem::getenv ("CMTHOME"); 00985 } 00986 00987 if ((m_cmt_home != "") && !CmtSystem::test_directory (m_cmt_home)) 00988 { 00989 m_cmt_home = ""; 00990 } 00991 00992 configure_user_context (0); 00993 } |
|
? |
Definition at line 1022 of file cmt_parser.cxx. References Tag::add(), CmtSystem::get_hosttype(), Tag::mark(), and PriorityUname. Referenced by configure(), load(), and parse_arguments(). 01023 { 01024 cmt_string hosttype; 01025 01026 CmtSystem::get_hosttype (hosttype); 01027 01028 if (hosttype != "") 01029 { 01030 Tag* tag; 01031 01032 tag = Tag::add (hosttype, PriorityUname, "HOSTTYPE", 0); 01033 tag->mark (); 01034 } 01035 } |
|
? |
Definition at line 1038 of file cmt_parser.cxx. References Tag::add(), Symbol::build_macro_value(), Symbol::expand(), Symbol::find(), CmtSystem::get_cmt_site(), m_cmt_site, Tag::mark(), and PrioritySite. Referenced by Symbol::action(), configure(), load(), and parse_arguments(). 01039 { 01040 Symbol* symbol = Symbol::find ("CMTSITE"); 01041 if (symbol != 0) 01042 { 01043 m_cmt_site = symbol->build_macro_value (); 01044 Symbol::expand (m_cmt_site); 01045 } 01046 else 01047 { 01048 m_cmt_site = CmtSystem::get_cmt_site (); 01049 } 01050 01051 if (m_cmt_site != "") 01052 { 01053 cmt_string s = "CMTSITE"; 01054 01055 if (use != 0) 01056 { 01057 s += " in "; 01058 } 01059 01060 Tag* tag; 01061 01062 tag = Tag::add (m_cmt_site, PrioritySite, s, use); 01063 tag->mark (); 01064 } 01065 } |
|
? |
Definition at line 1111 of file cmt_parser.cxx. References action_none, action_show_set, Tag::add(), Symbol::build_macro_value(), Symbol::expand(), Symbol::find(), CmtSystem::get_uname(), CmtSystem::getenv(), log, Log, log_endl, m_action, m_current_tag, Tag::mark(), PriorityConfig, and CmtSystem::testenv(). Referenced by Symbol::action(), and restore_all_tags(). 01112 { 01113 cmt_string config_tag; 01114 01115 Log; 01116 01117 //if (m_debug) cout << "configure_tags0> current_tag=" << m_current_tag << endl; 01118 01119 log << "current_tag=" << m_current_tag << log_endl; 01120 01121 Symbol* symbol = Symbol::find ("CMTCONFIG"); 01122 if (symbol != 0) 01123 { 01124 bool show_set_hidden = false; 01125 01126 if (Cmt::m_action == action_show_set) 01127 { 01128 show_set_hidden = true; 01129 Cmt::m_action = action_none; 01130 } 01131 01132 config_tag = symbol->build_macro_value (); 01133 Symbol::expand (config_tag); 01134 01135 if (show_set_hidden) 01136 { 01137 show_set_hidden = false; 01138 Cmt::m_action = action_show_set; 01139 } 01140 } 01141 else if (CmtSystem::testenv ("CMTCONFIG")) 01142 { 01143 config_tag = CmtSystem::getenv ("CMTCONFIG"); 01144 } 01145 else if (CmtSystem::testenv ("CMTBIN")) 01146 { 01147 config_tag = CmtSystem::getenv ("CMTBIN"); 01148 } 01149 01150 if (config_tag == "") 01151 { 01152 CmtSystem::get_uname (config_tag); 01153 } 01154 01155 //if (m_debug) cout << "configure_tags> current_tag=" << m_current_tag << endl; 01156 log << "current_tag=" << m_current_tag << log_endl; 01157 01158 cmt_string s = "CMTCONFIG"; 01159 01160 if (use != 0) 01161 { 01162 s += " in "; 01163 } 01164 01165 Tag* tag; 01166 01167 tag = Tag::add (config_tag, PriorityConfig, s, use); 01168 tag->mark (); 01169 01170 //m_current_tag = config_tag; 01171 } |
|
? |
Definition at line 1174 of file cmt_parser.cxx. References Tag::add(), CmtSystem::get_uname(), Tag::mark(), and PriorityUname. Referenced by configure(), load(), and parse_arguments(). 01175 { 01176 cmt_string uname; 01177 01178 CmtSystem::get_uname (uname); 01179 01180 if (uname != "") 01181 { 01182 Tag* tag; 01183 01184 tag = Tag::add (uname, PriorityUname, "uname", 0); 01185 tag->mark (); 01186 } 01187 } |
|
? |
Definition at line 996 of file cmt_parser.cxx. References Symbol::build_macro_value(), configure_cmt_path(), Symbol::expand(), Symbol::find(), CmtSystem::getenv(), m_cmt_user_context, CmtSystem::test_directory(), and CmtSystem::testenv(). Referenced by Symbol::action(), and configure_home(). 00997 { 00998 m_cmt_user_context = ""; 00999 01000 Symbol* symbol = Symbol::find ("CMTUSERCONTEXT"); 01001 if (symbol != 0) 01002 { 01003 m_cmt_user_context = symbol->build_macro_value (); 01004 Symbol::expand (m_cmt_user_context); 01005 } 01006 else if (CmtSystem::testenv ("CMTUSERCONTEXT")) 01007 { 01008 m_cmt_user_context = CmtSystem::getenv ("CMTUSERCONTEXT"); 01009 } 01010 01011 if ((m_cmt_user_context != "") && !CmtSystem::test_directory (m_cmt_user_context)) 01012 { 01013 m_cmt_user_context = ""; 01014 } 01015 01016 if (m_debug) cout << "configure_user_context> user_context=" << m_cmt_user_context << endl; 01017 01018 configure_cmt_path (0); 01019 } |
|
? |
Definition at line 1190 of file cmt_parser.cxx. References Tag::add(), CMTVERSION, CmtSystem::is_version_directory(), Tag::mark(), and PriorityVersion. Referenced by configure(), load(), and parse_arguments(). 01191 { 01192 int v = 0; 01193 int r = 0; 01194 int p = 0; 01195 01196 CmtSystem::is_version_directory (CMTVERSION, v, r, p); 01197 01198 Tag* tag; 01199 01200 static char temp[80]; 01201 01202 sprintf (temp, "CMTv%d", v); 01203 01204 tag = Tag::add (temp, PriorityVersion, "CMTVERSION", 0); 01205 tag->mark (); 01206 01207 sprintf (temp, "CMTr%d", r); 01208 01209 tag = Tag::add (temp, PriorityVersion, "CMTVERSION", 0); 01210 tag->mark (); 01211 01212 sprintf (temp, "CMTp%d", p); 01213 01214 tag = Tag::add (temp, PriorityVersion, "CMTVERSION", 0); 01215 tag->mark (); 01216 01217 } |
|
? |
Definition at line 1236 of file cmt_parser.cxx. References cmt_string::read(), Awk::run(), and cmt_vector< cmt_string >::size(). Referenced by parser(). 01237 { 01238 if (arguments.size () < 1) 01239 { 01240 cerr << "#CMT> cmt awk |
|
? |
Definition at line 1258 of file cmt_parser.cxx. References cmt_vector< cmt_string >::add(), Symbol::all_set(), CmtSystem::basename(), cmt_string::c_str(), CmtSystem::cd(), CmtLock::check(), cmt_vector< cmt_string >::clear(), Use::current(), CmtSystem::dirname(), Use::discarded, cmt_string::erase(), CmtSystem::execute(), CmtError::execution_error, CmtSystem::file_separator(), Project::fill_selection(), cmt_string::find(), Project::find_in_cmt_paths(), Use::get_full_path(), Use::get_ordered_uses(), Use::get_package_name(), Use::located(), CmtLock::locked_by_another_user, m_quiet, mgr_style, cmt_string::npos, parser(), Use::path, CmtSystem::pwd(), cmt_string::replace(), cmt_string::replace_all(), Project::scan_paths(), CmtError::set(), cmt_vector< Use * >::size(), cmt_string::size(), cmt_vector< cmt_string >::size(), CmtSystem::split(), Use::style, cmt_string::substr(), and Use::version. Referenced by do_set_versions(), and parser(). 01261 { 01262 Use::UsePtrVector& Uses = Use::get_ordered_uses (); 01263 01264 CmtSystem::cmt_string_vector uses; 01265 CmtSystem::cmt_string_vector packages; 01266 CmtSystem::cmt_string_vector versions; 01267 CmtSystem::cmt_string_vector path_selections; 01268 CmtSystem::cmt_string_vector selections; 01269 CmtSystem::cmt_string_vector exclusions; 01270 cmt_string begin; 01271 cmt_string command; 01272 bool is_cmt = false; 01273 int first = 0; 01274 int i; 01275 bool ignore_errors = false; 01276 bool all_packages = false; 01277 01278 bool local = true; 01279 01280 for (i = 0; i < arguments.size (); i++) 01281 { 01282 const cmt_string& w = arguments[i]; 01283 01284 if (command == "") 01285 { 01286 if (w.substr (0, 13) == "-all_packages") 01287 { 01288 local = false; 01289 all_packages = true; 01290 } 01291 else if (w.substr (0, 7) == "-depth=") 01292 { 01293 local = false; 01294 01295 cmt_string depth_str; 01296 int depth_value = 0; 01297 01298 w.substr (7, depth_str); 01299 if ((sscanf (depth_str.c_str (), "%d", &depth_value) < 1) || 01300 (depth_value < 1)) 01301 { 01302 // Syntax error 01303 // We shall restrict to packages found within 01304 // the |
|
? |
Definition at line 1853 of file cmt_parser.cxx. References CMTVERSION, CmtSystem::file_separator(), m_cmt_root, cmt_string::read(), and cmt_string::replace_all(). Referenced by parser(). 01854 { 01855 cmt_string pacman_file; 01856 01857 pacman_file = m_cmt_root; 01858 pacman_file += CmtSystem::file_separator (); 01859 pacman_file += "mgr"; 01860 pacman_file += CmtSystem::file_separator (); 01861 pacman_file += "CMT.pacman"; 01862 01863 cmt_string pacman; 01864 cmt_string pattern = " |
|
? |
Definition at line 1664 of file cmt_parser.cxx. References Generator::build_constituent_makefile(), CmtLock::check(), CmtError::conflicting_lock, CmtLock::locked_by_another_user, CmtError::set(), set_standard_macros(), and cmt_vector< cmt_string >::size(). Referenced by parser(). 01667 { 01668 if (CmtLock::check () == CmtLock::locked_by_another_user) 01669 { 01670 CmtError::set (CmtError::conflicting_lock, "build_constituent_makefile>"); 01671 return; 01672 } 01673 if (arguments.size () > 0) 01674 { 01675 set_standard_macros (); 01676 Generator::build_constituent_makefile (arguments[0]); 01677 } 01678 } |
|
? |
Definition at line 1681 of file cmt_parser.cxx. References Generator::build_constituents_makefile(), CmtLock::check(), CmtError::conflicting_lock, CmtLock::locked_by_another_user, m_current_package, CmtError::set(), and set_standard_macros(). Referenced by parser(). 01684 { 01685 if (CmtLock::check () == CmtLock::locked_by_another_user) 01686 { 01687 CmtError::set (CmtError::conflicting_lock, "build_constituents_makefile>"); 01688 return; 01689 } 01690 set_standard_macros (); 01691 01692 Generator::build_constituents_makefile (m_current_package, arguments); 01693 } |
|
? |
Definition at line 1696 of file cmt_parser.cxx. References Generator::build_dependencies(), CmtLock::check(), CmtError::conflicting_lock, CmtLock::locked_by_another_user, CmtError::set(), set_standard_macros(), and cmt_vector< cmt_string >::size(). Referenced by parser(). 01699 { 01700 if (CmtLock::check () == CmtLock::locked_by_another_user) 01701 { 01702 CmtError::set (CmtError::conflicting_lock, "build_dependencies>"); 01703 return; 01704 } 01705 if (arguments.size () > 0) 01706 { 01707 set_standard_macros (); 01708 01709 while (argc > 0) 01710 { 01711 if (strcmp (argv[0], "dependencies") != 0) 01712 { 01713 argc--; 01714 argv++; 01715 } 01716 else 01717 { 01718 argc--; 01719 argv++; 01720 argc--; 01721 argv++; 01722 01723 Generator::build_dependencies (arguments[0], argc, argv); 01724 01725 break; 01726 } 01727 } 01728 } 01729 } |
|
? |
Definition at line 1732 of file cmt_parser.cxx. References Use::build_library_links(), Symbol::build_macro_value(), CmtLock::check(), CmtError::conflicting_lock, Use::current(), Use::discarded, Symbol::expand(), CmtSystem::file_separator(), Symbol::find(), get_build_strategy(), CmtInstallAreaMgr::get_installarea(), Use::get_ordered_uses(), Use::get_package_name(), InstallAreaMask, CmtInstallAreaMgr::instance(), CmtLock::locked_by_another_user, CmtSystem::mkdir(), CmtError::set(), set_standard_macros(), cmt_vector< Use * >::size(), and WithInstallArea. Referenced by parser(). 01733 { 01734 cmt_string cmtinstallarea = ""; 01735 cmt_string tag = ""; 01736 cmt_string shlibsuffix; 01737 cmt_string symlinkcmd; 01738 01739 if (CmtLock::check () == CmtLock::locked_by_another_user) 01740 { 01741 CmtError::set (CmtError::conflicting_lock, "build_library_links>"); 01742 return; 01743 } 01744 01745 set_standard_macros (); 01746 01747 Use::UsePtrVector& Uses = Use::get_ordered_uses (); 01748 Use& current_use = Use::current (); 01749 int i; 01750 01751 { 01752 Symbol* macro = Symbol::find ("shlibsuffix"); 01753 if (macro == 0) return; 01754 shlibsuffix = macro->build_macro_value (); 01755 Symbol::expand (shlibsuffix); 01756 } 01757 01758 { 01759 Symbol* macro = Symbol::find ("cmt_symlink_command"); 01760 if (macro != 0) 01761 { 01762 symlinkcmd = macro->build_macro_value (); 01763 Symbol::expand (symlinkcmd); 01764 } 01765 } 01766 01767 if ((get_build_strategy () & InstallAreaMask) == WithInstallArea) 01768 { 01769 const CmtInstallAreaMgr& ia_mgr = CmtInstallAreaMgr::instance (); 01770 01771 //cout << "#IA2>" << endl; 01772 01773 cmt_string s1 = ia_mgr.get_installarea (); 01774 01775 { 01776 Symbol* symbol = Symbol::find ("CMTINSTALLAREA"); 01777 if (symbol != 0) 01778 { 01779 s1 = symbol->build_macro_value (); 01780 Symbol::expand (s1); 01781 } 01782 } 01783 01784 cmtinstallarea = s1; 01785 01786 cmt_string s2; 01787 01788 { 01789 Symbol* macro = Symbol::find ("tag"); 01790 if (macro != 0) 01791 { 01792 s2 = macro->build_macro_value (); 01793 Symbol::expand (s2); 01794 } 01795 } 01796 01797 tag = s2; 01798 01799 cmt_string s = s1; 01800 s += CmtSystem::file_separator (); 01801 s += s2; 01802 s += CmtSystem::file_separator (); 01803 s += "lib"; 01804 01805 CmtSystem::mkdir (s); 01806 } 01807 01808 current_use.build_library_links (cmtinstallarea, tag, shlibsuffix, symlinkcmd); 01809 01810 for (i = 0; i < Uses.size (); i++) 01811 { 01812 Use* use = Uses[i]; 01813 01814 if (use == 0) continue; 01815 if (use->discarded) continue; 01816 01817 if (use->get_package_name () == "CMT") continue; 01818 if (use->get_package_name () == current_use.get_package_name ()) continue; 01819 01820 use->build_library_links (cmtinstallarea, tag, shlibsuffix, symlinkcmd); 01821 } 01822 } |
|
? |
Definition at line 1825 of file cmt_parser.cxx. References Generator::build_make_setup(), CmtLock::check(), CmtError::conflicting_lock, CmtLock::locked_by_another_user, m_current_package, CmtError::set(), and set_standard_macros(). Referenced by parser(). 01826 { 01827 if (CmtLock::check () == CmtLock::locked_by_another_user) 01828 { 01829 CmtError::set (CmtError::conflicting_lock, "build_make_setup>"); 01830 return; 01831 } 01832 set_standard_macros (); 01833 Generator::build_make_setup (m_current_package); 01834 } |
|
? |
Definition at line 1837 of file cmt_parser.cxx. References build_msdev_file(), CmtLock::check(), CmtError::conflicting_lock, CmtLock::locked_by_another_user, CmtError::set(), set_standard_macros(), and cmt_vector< cmt_string >::size(). Referenced by parser(). 01838 { 01839 if (CmtLock::check () == CmtLock::locked_by_another_user) 01840 { 01841 CmtError::set (CmtError::conflicting_lock, "build_msdev>"); 01842 return; 01843 } 01844 01845 if (true) 01846 { 01847 set_standard_macros (); 01848 if (arguments.size () > 0) build_msdev_file (arguments[0]); 01849 else build_msdev_file (""); 01850 } 01851 } |
|
? |
Definition at line 1893 of file cmt_parser.cxx. References build_OS9_makefile(), CmtLock::check(), CmtError::conflicting_lock, CmtLock::locked_by_another_user, CmtError::set(), set_standard_macros(), and cmt_vector< cmt_string >::size(). Referenced by parser(). 01894 { 01895 if (CmtLock::check () == CmtLock::locked_by_another_user) 01896 { 01897 CmtError::set (CmtError::conflicting_lock, "build_os9_makefile>"); 01898 return; 01899 } 01900 01901 if (arguments.size () > 0) 01902 { 01903 set_standard_macros (); 01904 build_OS9_makefile (arguments[0]); 01905 } 01906 } |
|
? |
Definition at line 1909 of file cmt_parser.cxx. References Generator::build_prototype(), CmtLock::check(), CmtError::conflicting_lock, CmtLock::locked_by_another_user, CmtError::set(), set_standard_macros(), and cmt_vector< cmt_string >::size(). Referenced by parser(). 01910 { 01911 if (CmtLock::check () == CmtLock::locked_by_another_user) 01912 { 01913 CmtError::set (CmtError::conflicting_lock, "build_prototype>"); 01914 return; 01915 } 01916 01917 if (arguments.size () > 0) 01918 { 01919 set_standard_macros (); 01920 Generator::build_prototype (arguments[0]); 01921 } 01922 } |
|
? |
Definition at line 1925 of file cmt_parser.cxx. References Generator::build_readme(), CmtLock::check(), CmtError::conflicting_lock, CmtLock::locked_by_another_user, CmtError::set(), and set_standard_macros(). Referenced by parser(). 01926 { 01927 if (CmtLock::check () == CmtLock::locked_by_another_user) 01928 { 01929 CmtError::set (CmtError::conflicting_lock, "build_readme>"); 01930 return; 01931 } 01932 01933 set_standard_macros (); 01934 Generator::build_readme (arguments); 01935 } |
|
? |
Definition at line 1938 of file cmt_parser.cxx. References CmtLock::check(), CmtError::conflicting_lock, CmtLock::locked_by_another_user, Make, print_macros(), and CmtError::set(). Referenced by parser(). 01939 { 01940 if (CmtLock::check () == CmtLock::locked_by_another_user) 01941 { 01942 CmtError::set (CmtError::conflicting_lock, "build_tag_makefile>"); 01943 return; 01944 } 01945 01946 print_macros (Make); 01947 } |
|
? |
Definition at line 1950 of file cmt_parser.cxx. References CmtSystem::get_temporary_name(). Referenced by parser(). 01951 { 01952 cmt_string name = CmtSystem::get_temporary_name (); 01953 cout << name << endl; 01954 } |
|
? |
Definition at line 1957 of file cmt_parser.cxx. References CmtLock::check(), CmtError::conflicting_lock, CmtLock::locked_by_another_user, TriggerGenerator::run(), CmtError::set(), set_standard_macros(), and cmt_vector< cmt_string >::size(). Referenced by parser(). 01958 { 01959 if (CmtLock::check () == CmtLock::locked_by_another_user) 01960 { 01961 CmtError::set (CmtError::conflicting_lock, "build_tag_makefile>"); 01962 return; 01963 } 01964 01965 if (arguments.size () > 0) 01966 { 01967 set_standard_macros (); 01968 TriggerGenerator::run (arguments[0]); 01969 } 01970 } |
|
? |
Definition at line 1876 of file cmt_parser.cxx. References build_vsnet_file(), CmtLock::check(), CmtError::conflicting_lock, CmtLock::locked_by_another_user, CmtError::set(), set_standard_macros(), and cmt_vector< cmt_string >::size(). Referenced by parser(). 01877 { 01878 if (CmtLock::check () == CmtLock::locked_by_another_user) 01879 { 01880 CmtError::set (CmtError::conflicting_lock, "build_vsnet>"); 01881 return; 01882 } 01883 01884 if (true) 01885 { 01886 set_standard_macros (); 01887 if (arguments.size () > 0) build_vsnet_file (arguments[0]); 01888 else build_vsnet_file (""); 01889 } 01890 } |
|
? |
Definition at line 1973 of file cmt_parser.cxx. References Generator::build_windefs(), CmtLock::check(), CmtError::conflicting_lock, CmtLock::locked_by_another_user, CmtError::set(), set_standard_macros(), and cmt_vector< cmt_string >::size(). Referenced by parser(). 01974 { 01975 if (CmtLock::check () == CmtLock::locked_by_another_user) 01976 { 01977 CmtError::set (CmtError::conflicting_lock, "build_windefs>"); 01978 return; 01979 } 01980 01981 if (arguments.size () > 0) 01982 { 01983 set_standard_macros (); 01984 Generator::build_windefs (arguments[0]); 01985 } 01986 } |
|
? |
Definition at line 1989 of file cmt_parser.cxx. Referenced by parser(). 01990 { 01991 } |
|
? |
Definition at line 1994 of file cmt_parser.cxx. References CmtSystem::compare_and_update_files(), and cmt_vector< cmt_string >::size(). Referenced by parser(). 01995 { 01996 if (arguments.size () >= 2) 01997 { 01998 cmt_string first_file = arguments[0]; 01999 cmt_string second_file = arguments[1]; 02000 02001 if (first_file == "") return; 02002 if (second_file == "") return; 02003 02004 CmtSystem::compare_and_update_files (first_file, second_file); 02005 } 02006 } |
|
? |
Definition at line 2009 of file cmt_parser.cxx. References CmtSystem::is_version_directory(), and cmt_vector< cmt_string >::size(). Referenced by parser(). 02010 { 02011 if (arguments.size () > 0) 02012 { 02013 cmt_string name = arguments[0]; 02014 02015 if (name == "") return; 02016 int v = 0; 02017 int r = 0; 02018 int p = 0; 02019 02020 bool ok = CmtSystem::is_version_directory (name, v, r, p); 02021 02022 if (ok) 02023 { 02024 cout << "# " << name << " is version " << v << " release " << r << " patch " << p << endl; 02025 } 02026 else 02027 { 02028 cout << "# " << name << " is not a version tag" << endl; 02029 } 02030 } 02031 } |
|
? |
Definition at line 2034 of file cmt_parser.cxx. References Cvs::checkout(). Referenced by parser(). 02035 { 02036 Cvs::checkout (arguments); 02037 } |
|
? |
Definition at line 2040 of file cmt_parser.cxx. References print_clean(), and PrintMode. Referenced by parser(). 02041 { 02042 print_clean (mode); 02043 } |
|
? |
Definition at line 2046 of file cmt_parser.cxx. References CmtSystem::basename(), Branch::branches(), Generator::build_default_makefile(), CmtSystem::cd(), Use::change_path(), CmtLock::check(), configure_current_package(), CmtError::conflicting_lock, Use::current(), install_cleanup_scripts(), install_setup_scripts(), install_test_cleanup_scripts(), install_test_setup_scripts(), CmtLock::locked_by_another_user, m_cmt_config, m_cmt_version, m_current_dir, m_current_package, m_current_path, m_current_style, m_current_version, m_default_path, m_quiet, CmtSystem::mkdir(), Branch::name(), CmtSystem::pwd(), reach_current_package(), CmtSystem::remove_file(), CmtSystem::scan_dir(), Use::set(), CmtError::set(), cmt_vector< Branch >::size(), cmt_vector< cmt_string >::size(), Use::style, CmtSystem::test_directory(), and CmtSystem::test_file(). Referenced by do_create(), parser(), and print_context(). 02047 { 02048 if (CmtLock::check () == CmtLock::locked_by_another_user) 02049 { 02050 CmtError::set (CmtError::conflicting_lock, "config>"); 02051 return; 02052 } 02053 02054 //Use::UsePtrVector& Uses = Use::get_ordered_uses (); 02055 02056 if (m_debug) 02057 { 02058 cout << "Cmt::do_config> " << endl; 02059 cout << "pwd " << CmtSystem::pwd () << endl; 02060 cout << "current_dir " << m_current_dir << endl; 02061 cout << "default_path " << m_default_path << endl; 02062 cout << "cmt config " << 02063 m_current_package << " " << 02064 m_current_version << " " << 02065 m_current_path << endl; 02066 } 02067 02068 if (m_current_package == "CMT") return; 02069 if (m_current_package == "methods") return; 02070 02071 cmt_string branch; 02072 02073 CmtSystem::basename (m_current_dir, branch); 02074 02075 if ((branch != "mgr") && (branch != "cmt")) 02076 { 02077 02078 // 02079 // Here we are in a standalone package (ie completely unstructured) 02080 // 02081 02082 if (CmtSystem::test_file ("requirements")) 02083 { 02084 cout << "------------------------------------------" << endl; 02085 cout << "Configuring environment for standalone package." << endl; 02086 cout << "CMT version " << m_cmt_version << "." << endl; 02087 cout << "System is " << m_cmt_config << endl; 02088 cout << "------------------------------------------" << endl; 02089 02090 install_test_setup_scripts (); 02091 install_test_cleanup_scripts (); 02092 02093 Generator::build_default_makefile (); 02094 } 02095 else 02096 { 02097 cout << "==============================================" << endl; 02098 cout << "cmt config must be operated either upon " 02099 "an existing package" << endl; 02100 cout << " (ie. when a requirements file already exists)" << endl; 02101 cout << " > cd ..." << endl; 02102 cout << " > cmt config" << endl; 02103 cout << "or to create a new package" << endl; 02104 cout << " > cmt config |
|
? |
Definition at line 2222 of file cmt_parser.cxx. References CmtSystem::absolute_path(), Generator::build_default_makefile(), CmtSystem::cd(), cmt_style, CmtSystem::compress_path(), do_config(), CmtSystem::file_separator(), mgr_style, CmtSystem::mkdir(), no_version_style, CmtSystem::pwd(), cmt_vector< cmt_string >::size(), CmtSystem::test_directory(), CmtSystem::test_file(), with_version_directory, and without_version_directory. Referenced by parser(). 02223 { 02224 if (arguments.size () < 2) return; 02225 02226 const cmt_string& package = arguments[0]; 02227 const cmt_string& version = arguments[1]; 02228 cmt_string offset; 02229 if (arguments.size () >= 3) offset = arguments[2]; 02230 02231 if (m_debug) 02232 { 02233 cout << "do_create>m_current_package=" << m_current_package << endl; 02234 cout << "do_create>package=" << package << endl; 02235 } 02236 02237 //if (m_current_package == "CMT") return; 02238 //if (m_current_package == "methods") return; 02239 02240 cmt_string the_path; 02241 02242 the_path = CmtSystem::pwd (); 02243 02244 if (offset != "") 02245 { 02246 if (!CmtSystem::absolute_path (offset)) 02247 { 02248 // offset is really a relative offset 02249 the_path += CmtSystem::file_separator (); 02250 the_path += offset; 02251 } 02252 else // absolute path 02253 { 02254 the_path = offset; 02255 } 02256 } 02257 02258 CmtSystem::compress_path (the_path); 02259 02260 // Now 'the_path' contains the complete path where the package will be created 02261 02262 cout << "------------------------------------------" << endl; 02263 cout << "Configuring environment for package " << package << 02264 " version " << version << "." << endl; 02265 cout << "CMT version " << m_cmt_version << "." << endl; 02266 cout << "Root set to " << the_path << "." << endl; 02267 cout << "System is " << m_cmt_config << endl; 02268 cout << "------------------------------------------" << endl; 02269 02270 if (!CmtSystem::test_directory (the_path)) 02271 { 02272 if (!CmtSystem::mkdir (the_path)) 02273 { 02274 cout << "Cannot create the path directory" << endl; 02275 return; 02276 } 02277 else 02278 { 02279 cout << "Installing the path directory" << endl; 02280 } 02281 } 02282 02283 CmtSystem::cd (the_path); 02284 02285 if (!CmtSystem::test_directory (package)) 02286 { 02287 if (!CmtSystem::mkdir (package)) 02288 { 02289 cout << "Cannot create the package directory" << endl; 02290 return; 02291 } 02292 else 02293 { 02294 cout << "Installing the package directory" << endl; 02295 } 02296 } 02297 else 02298 { 02299 cout << "Package directory already installed" << endl; 02300 } 02301 02302 CmtSystem::cd (package); 02303 02304 if (m_current_structuring_style == with_version_directory) 02305 { 02306 if (!CmtSystem::test_directory (version)) 02307 { 02308 if (!CmtSystem::mkdir (version)) 02309 { 02310 cout << "Cannot create the version directory" << endl; 02311 return; 02312 } 02313 else 02314 { 02315 cout << "Installing the version directory" << endl; 02316 } 02317 } 02318 else 02319 { 02320 cout << "Version directory already installed" << endl; 02321 } 02322 02323 CmtSystem::cd (version); 02324 } 02325 else 02326 { 02327 cout << "Version directory will not be created due to structuring style" << endl; 02328 } 02329 02330 if (!CmtSystem::test_directory ("cmt")) 02331 { 02332 if (!CmtSystem::test_directory ("mgr")) 02333 { 02334 if (!CmtSystem::mkdir ("cmt")) 02335 { 02336 cout << "Cannot create the cmt directory" << endl; 02337 return; 02338 } 02339 else 02340 { 02341 if (m_current_structuring_style == with_version_directory) 02342 { 02343 m_current_style = cmt_style; 02344 } 02345 else 02346 { 02347 m_current_style = no_version_style; 02348 } 02349 02350 cout << "Installing the cmt directory" << endl; 02351 } 02352 } 02353 else 02354 { 02355 if (m_current_structuring_style == with_version_directory) 02356 { 02357 m_current_style = mgr_style; 02358 } 02359 else 02360 { 02361 m_current_style = no_version_style; 02362 } 02363 02364 cout << "Mgr directory already installed" << endl; 02365 } 02366 } 02367 else 02368 { 02369 if (m_current_structuring_style == with_version_directory) 02370 { 02371 m_current_style = cmt_style; 02372 } 02373 else 02374 { 02375 m_current_style = no_version_style; 02376 } 02377 02378 cout << "Cmt directory already installed" << endl; 02379 } 02380 02381 if (!CmtSystem::test_directory ("src")) 02382 { 02383 if (!CmtSystem::mkdir ("src")) 02384 { 02385 cout << "Cannot create the src directory" << endl; 02386 return; 02387 } 02388 else 02389 { 02390 cout << "Installing the src directory" << endl; 02391 } 02392 } 02393 else 02394 { 02395 cout << "src directory already installed" << endl; 02396 } 02397 02398 switch (m_current_style) 02399 { 02400 case cmt_style: 02401 case no_version_style: 02402 CmtSystem::cd ("cmt"); 02403 break; 02404 case mgr_style: 02405 CmtSystem::cd ("mgr"); 02406 break; 02407 } 02408 02409 Generator::build_default_makefile (); 02410 02411 if (!CmtSystem::test_file ("requirements")) 02412 { 02413 // create an empty requirement file. 02414 ofstream f ("requirements"); 02415 if (f) 02416 { 02417 f << "package " << package << endl; 02418 f << endl; 02419 f.close (); 02420 } 02421 } 02422 02423 if (m_current_structuring_style == without_version_directory) 02424 { 02425 ofstream f ("version.cmt"); 02426 if (f) 02427 { 02428 f << version << endl; 02429 f.close (); 02430 } 02431 } 02432 02433 m_current_package = package; 02434 m_current_version = version; 02435 m_current_path = the_path; 02436 m_current_dir = CmtSystem::pwd (); 02437 02438 do_config (); 02439 } |
|
? |
Definition at line 2442 of file cmt_parser.cxx. References Project::create(), and cmt_vector< cmt_string >::size(). Referenced by parser(). 02443 { 02444 if (arguments.size () < 1) return; 02445 02446 const cmt_string& project = arguments[0]; 02447 02448 Project::create (project); 02449 } |
|
? |
Definition at line 2452 of file cmt_parser.cxx. References Cvs::branches(). Referenced by parser(). 02453 { 02454 Cvs::branches (arguments[0]); 02455 } |
|
? |
Definition at line 2458 of file cmt_parser.cxx. References Cvs::subpackages(). Referenced by parser(). 02459 { 02460 Cvs::subpackages (arguments[0]); 02461 } |
|
? |
Definition at line 2464 of file cmt_parser.cxx. References Cvs::tags(). Referenced by parser(). 02465 { 02466 Cvs::tags (arguments); 02467 } |
|
? |
Definition at line 2470 of file cmt_parser.cxx. References Symbol::all_set(), Symbol::build_macro_value(), Use::current(), cmt_string::erase(), CmtSystem::execute(), Symbol::expand(), cmt_string::find(), Symbol::find(), cmt_string::npos, SyntaxParser::parse_requirements_line(), CmtError::set(), set_standard_macros(), cmt_string::size(), cmt_vector< cmt_string >::size(), cmt_string::substr(), and CmtError::symbol_not_found. Referenced by parser(). 02471 { 02472 if (arguments.size () > 0) 02473 { 02474 set_standard_macros (); 02475 Symbol::all_set (); 02476 02477 Symbol* symbol = Symbol::find (arguments[0]); 02478 02479 if (symbol == 0) 02480 { 02481 CmtError::set (CmtError::symbol_not_found, arguments[0]); 02482 return; 02483 } 02484 02485 /* 02486 We then look for all |
|
? |
Definition at line 2534 of file cmt_parser.cxx. References CmtModel::expand(), set_standard_macros(), cmt_vector< cmt_string >::size(), CmtModel::strict_expand(), and CmtModel::test_regexp(). Referenced by parser(). 02535 { 02536 set_standard_macros (); 02537 02538 if ((arguments[0] == "-strict") && (arguments.size () > 1)) 02539 { 02540 CmtModel::strict_expand (arguments[1]); 02541 } 02542 else if ((arguments[0] == "-test") && (arguments.size () > 2)) 02543 { 02544 CmtModel::test_regexp (arguments[1], arguments[2]); 02545 } 02546 else if (arguments.size () > 0) 02547 { 02548 CmtModel::expand (arguments[0]); 02549 } 02550 } |
|
? |
Handle free filtering of text files containing or ${xxx} patterns. Substitution is performed against CMT macros and environment variables. Arguments: cmt filter input-file-name output-file-name Definition at line 2562 of file cmt_parser.cxx. References Symbol::expand(), cmt_string::read(), set_standard_macros(), cmt_vector< cmt_string >::size(), CmtSystem::test_file(), and cmt_string::write(). Referenced by parser(). 02563 { 02564 if (arguments.size () < 2) return; 02565 02566 cmt_string& input = arguments[0]; 02567 cmt_string& output = arguments[1]; 02568 02569 if (!CmtSystem::test_file (input)) 02570 { 02571 cerr << "#CMT> File " << input << " not found" << endl; 02572 return; 02573 } 02574 02575 cmt_string text; 02576 02577 text.read (input); 02578 02579 set_standard_macros (); 02580 02581 Symbol::expand (text); 02582 02583 FILE* file = fopen (output, "wb"); 02584 if (file == NULL) 02585 { 02586 cerr << "#CMT> Cannot write filtered file " << output << endl; 02587 } 02588 else 02589 { 02590 text.write (file); 02591 fclose (file); 02592 } 02593 } |
|
? |
Definition at line 2596 of file cmt_parser.cxx. References action_none, ActionType, CommandParser::show(), and CommandParser::show_all(). Referenced by parser(). 02597 { 02598 if (help_action == action_none) 02599 { 02600 CommandParser::show_all (); 02601 } 02602 else 02603 { 02604 CommandParser::show (help_action); 02605 } 02606 } |
|
? |
Definition at line 2609 of file cmt_parser.cxx. References CmtLock::lock(), set_standard_macros(), and CmtLock::status. Referenced by parser(). 02612 { 02613 //(unsused) Use& use = Use::current(); 02614 02615 cout << "try to lock package " << package << " in " << CmtSystem::pwd () << endl; 02616 02617 set_standard_macros (); 02618 02619 CmtLock::status status = CmtLock::lock (); 02620 } |
|
? |
Definition at line 2623 of file cmt_parser.cxx. References CmtSystem::absolute_path(), CmtSystem::cd(), CmtSystem::compress_path(), CmtSystem::file_separator(), m_current_package, CmtSystem::pwd(), cmt_string::read(), CmtSystem::remove_directory(), CmtSystem::scan_dir(), cmt_vector< cmt_string >::size(), and CmtSystem::test_directory(). Referenced by parser(). 02626 { 02627 //Use::UsePtrVector& Uses = Use::get_ordered_uses (); 02628 02629 if (m_current_package == "CMT") return; 02630 if (m_current_package == "methods") return; 02631 02632 cmt_string the_path; 02633 02634 //the_path = m_default_path; 02635 the_path = CmtSystem::pwd (); 02636 02637 if (path != "") 02638 { 02639 if (!CmtSystem::absolute_path (path)) 02640 { 02641 // path is just a suffix 02642 the_path += CmtSystem::file_separator (); 02643 the_path += path; 02644 } 02645 else // absolute path 02646 { 02647 the_path = path; 02648 } 02649 } 02650 02651 CmtSystem::compress_path (the_path); 02652 02653 cout << "------------------------------------------" << endl; 02654 cout << "Removing package " << package << 02655 " version " << version << "." << endl; 02656 cout << "CMT version " << m_cmt_version << "." << endl; 02657 cout << "Root set to " << the_path << "." << endl; 02658 cout << "System is " << m_cmt_config << endl; 02659 cout << "------------------------------------------" << endl; 02660 02661 the_path += CmtSystem::file_separator (); 02662 the_path += package; 02663 02664 if (!CmtSystem::cd (the_path)) 02665 { 02666 cout << "Path " << the_path << " not reachable" << endl; 02667 return; 02668 } 02669 02670 if (CmtSystem::test_directory (version)) 02671 { 02672 if (CmtSystem::remove_directory (version)) 02673 { 02674 cout << "Version " << version << " has been removed from " << the_path << endl; 02675 CmtSystem::cmt_string_vector contents; 02676 CmtSystem::scan_dir (".", contents); 02677 if (contents.size () == 0) 02678 { 02679 CmtSystem::cd (".."); 02680 if (CmtSystem::remove_directory (package)) 02681 { 02682 cout << "Package " << package << " has no more versions. Thus it has been removed."<< endl; 02683 } 02684 } 02685 } 02686 else 02687 { 02688 cout << "Impossible to remove version " << version << " from " << the_path << endl; 02689 } 02690 } 02691 else if (CmtSystem::test_directory ("cmt")) 02692 { 02693 CmtSystem::cd ("cmt"); 02694 02695 cmt_string v; 02696 02697 v.read ("version.cmt"); 02698 if (v == version) 02699 { 02700 CmtSystem::cd (".."); 02701 if (!CmtSystem::remove_directory ("cmt")) 02702 { 02703 cout << "Unstructured version " << version 02704 << " has been removed from " << the_path << endl; 02705 } 02706 else 02707 { 02708 cout << "Impossible to remove unstructured version " << version 02709 << " from " << the_path << endl; 02710 } 02711 } 02712 else 02713 { 02714 cout << "Version " << version << " not found" << endl; 02715 } 02716 } 02717 else 02718 { 02719 cout << "Version " << version << " not found" << endl; 02720 } 02721 } |
|
? |
Definition at line 2724 of file cmt_parser.cxx. References CmtSystem::absolute_path(), CmtSystem::basename(), Symbol::build_macro_value(), CmtLock::check(), CmtError::conflicting_lock, Use::current(), Use::discarded, CmtSystem::execute(), CmtError::execution_error, Symbol::expand(), CmtSystem::file_separator(), Symbol::find(), get_build_strategy(), CmtInstallAreaMgr::get_installarea(), Use::get_ordered_uses(), Use::get_package_name(), InstallAreaMask, CmtInstallAreaMgr::instance(), Use::located(), CmtLock::locked_by_another_user, m_quiet, Use::path, CmtError::set(), set_standard_macros(), cmt_vector< cmt_string >::size(), cmt_vector< Use * >::size(), CmtSystem::split(), Use::version, and WithInstallArea. Referenced by parser(). 02725 { 02726 if (CmtLock::check () == CmtLock::locked_by_another_user) 02727 { 02728 CmtError::set (CmtError::conflicting_lock, "remove_library_links>"); 02729 return; 02730 } 02731 02732 set_standard_macros (); 02733 02734 Use::UsePtrVector& Uses = Use::get_ordered_uses (); 02735 Use& current_use = Use::current (); 02736 int i; 02737 cmt_string shlibsuffix; 02738 cmt_string symunlink; 02739 02740 { 02741 Symbol* macro = Symbol::find ("shlibsuffix"); 02742 if (macro == 0) return; 02743 shlibsuffix = macro->build_macro_value (); 02744 Symbol::expand (shlibsuffix); 02745 } 02746 02747 { 02748 Symbol* macro = Symbol::find ("symunlink"); 02749 if (macro == 0) return; 02750 symunlink = macro->build_macro_value (); 02751 Symbol::expand (symunlink); 02752 } 02753 02754 for (i = 0; i < Uses.size (); i++) 02755 { 02756 Use* use = Uses[i]; 02757 02758 if (use->discarded) continue; 02759 02760 if (!use->located ()) 02761 { 02762 if (!m_quiet) 02763 { 02764 cerr << "#CMT> package " << use->get_package_name () << 02765 " " << use->version << " " << use->path << 02766 " not found" << 02767 endl; 02768 } 02769 } 02770 else 02771 { 02772 if (use->get_package_name () == "CMT") continue; 02773 if (use->get_package_name () == current_use.get_package_name ()) continue; 02774 02775 cmt_string s; 02776 02777 s = use->get_package_name (); 02778 s += "_libraries"; 02779 02780 Symbol* libraries_macro = Symbol::find (s); 02781 02782 if (libraries_macro == 0) continue; 02783 02784 cmt_string libraries = libraries_macro->build_macro_value (); 02785 Symbol::expand (libraries); 02786 02787 static CmtSystem::cmt_string_vector values; 02788 02789 CmtSystem::split (libraries, " \t", values); 02790 02791 for (int j = 0; j < values.size (); j++) 02792 { 02793 const cmt_string& library = values[j]; 02794 02795 static cmt_string libname; 02796 static cmt_string name; 02797 02798 // Is it a simple name or a complete path? 02799 02800 libname = library; 02801 Symbol::expand (libname); 02802 02803 if (CmtSystem::absolute_path (libname)) 02804 { 02810 cmt_string suffix; 02811 CmtSystem::basename (library, name); 02812 } 02813 else 02814 { 02822 name = "lib"; 02823 name += libname; 02824 name += "."; 02825 name += shlibsuffix; 02826 } 02827 02828 Symbol::expand (libname); 02829 02830 if ((get_build_strategy () & InstallAreaMask) == WithInstallArea) 02831 { 02832 const CmtInstallAreaMgr& ia_mgr = CmtInstallAreaMgr::instance (); 02833 02834 //cout << "#IA4>" << endl; 02835 02836 cmt_string s1 = ia_mgr.get_installarea (); 02837 02838 { 02839 Symbol* symbol = Symbol::find ("CMTINSTALLAREA"); 02840 if (symbol != 0) 02841 { 02842 s1 = symbol->build_macro_value (); 02843 Symbol::expand (s1); 02844 } 02845 } 02846 02847 cmt_string s2; 02848 02849 { 02850 Symbol* macro = Symbol::find ("tag"); 02851 if (macro != 0) 02852 { 02853 s2 = macro->build_macro_value (); 02854 Symbol::expand (s2); 02855 } 02856 } 02857 02858 // Now deleting the reference file 02859 02860 s = symunlink; 02861 s += " "; 02862 s += s1; 02863 s += CmtSystem::file_separator (); 02864 s += s2; 02865 s += CmtSystem::file_separator (); 02866 s += "lib"; 02867 s += CmtSystem::file_separator (); 02868 s += name; 02869 s += ".cmtref"; 02870 s += " "; 02871 s += s1; 02872 s += CmtSystem::file_separator (); 02873 s += s2; 02874 s += CmtSystem::file_separator (); 02875 s += "lib"; 02876 s += CmtSystem::file_separator (); 02877 s += name; 02878 } 02879 else 02880 { 02881 s = symunlink; 02882 s += " ../$("; 02883 s += current_use.get_package_name (); 02884 s += "_tag)/"; 02885 s += name; 02886 } 02887 02888 Symbol::expand (s); 02889 02890 if (!m_quiet) cout << s << endl; 02891 int status = CmtSystem::execute (s); 02892 02893 if (status != 0) 02894 { 02895 if (status != 2) CmtError::set (CmtError::execution_error, s); 02896 02897 cerr << "#CMT> Cannot remove the symbolic link " << s << endl; 02898 02899 break; 02900 } 02901 } 02902 } 02903 } 02904 } |
|
? |
Here we expect that only the base name of the library is given : ie it should not contain the "lib" prefix, nor the suffix .so, nor any path prefix. This of course should generally correspond to a constituent name. Definition at line 2907 of file cmt_parser.cxx. References Symbol::all_set(), CmtSystem::execute(), set_standard_macros(), and cmt_vector< cmt_string >::size(). Referenced by parser(). 02908 { 02909 if (arguments.size () > 0) 02910 { 02911 set_standard_macros (); 02912 Symbol::all_set (); 02913 02914 cmt_string cmd; 02915 02916 for (int i = 0; i < arguments.size (); i++) 02917 { 02918 cmd += arguments[i]; 02919 cmd += " "; 02920 } 02921 02922 CmtSystem::execute (cmd); 02923 } 02924 } |
|
? |
Definition at line 2927 of file cmt_parser.cxx. References FAwk::run(), and cmt_vector< cmt_string >::size(). Referenced by parser(). 02928 { 02929 if (arguments.size () == 0) cerr << "#CMT> run_sequence: no sequence specified" << endl; 02930 02931 SequenceRunner runner; 02932 02933 cout << "# cmt run_sequence: sequence " << arguments[0] << endl; 02934 02935 runner.run (arguments[0]); 02936 } |
|
? |
Definition at line 2939 of file cmt_parser.cxx. References CmtSystem::basename(), CmtSystem::dirname(), CmtSystem::is_version_directory(), CmtSystem::pwd(), cmt_vector< cmt_string >::size(), and cmt_string::write(). Referenced by parser(). 02940 { 02941 if (arguments.size () == 0) cerr << "#CMT> set version: no version specified" << endl; 02942 02943 const cmt_string& version = arguments[0]; 02944 02945 int v, r, p; 02946 02947 if (!CmtSystem::is_version_directory (version, v, r, p)) 02948 { 02949 cerr << "#CMT> set version " << version << " is not a correct version syntax" << endl; 02950 return; 02951 } 02952 02953 if ((v == -1) || (r == -1) || (p == -1)) 02954 { 02955 cerr << "#CMT> set version " << version 02956 << " You cannot use wild card to set a version" << endl; 02957 return; 02958 } 02959 02960 // We want to install the version.cmt file 02961 02962 // We first check we are in a cmt branch 02963 cmt_string h = CmtSystem::pwd (); 02964 cmt_string branch; 02965 CmtSystem::basename (h, branch); 02966 02967 if (branch != "cmt") 02968 { 02969 cerr << "#CMT> set version " << version << " must be applied in a cmt directory" 02970 << endl; 02971 return; 02972 } 02973 02974 CmtSystem::dirname (h, h); 02975 CmtSystem::basename (h, branch); 02976 02977 if (branch == version) 02978 { 02979 cerr << "#CMT> set version " << version << " is already available as a version directory" 02980 << endl; 02981 return; 02982 } 02983 02984 cout << "Writing version file : " << version << endl; 02985 02986 version.write ("version.cmt"); 02987 } |
|
? |
Definition at line 2990 of file cmt_parser.cxx. References action_broadcast, cmt_vector< cmt_string >::add(), do_broadcast(), and m_action. Referenced by parser(). 02991 { 02992 CmtSystem::cmt_string_vector args; 02993 02994 args = arguments; 02995 { 02996 cmt_string& s = args.add (); 02997 s = "cmt"; 02998 } 02999 { 03000 cmt_string& s = args.add (); 03001 s = "set"; 03002 } 03003 { 03004 cmt_string& s = args.add (); 03005 s = "version"; 03006 } 03007 { 03008 cmt_string& s = args.add (); 03009 s = " |
|
? |
Definition at line 3018 of file cmt_parser.cxx. References get_build_strategy(), InstallAreaMask, CmtInstallAreaMgr::instance(), print(), PrintMode, CmtInstallAreaMgr::setup(), and WithInstallArea. Referenced by parser(). 03019 { 03020 print (mode); 03021 03022 // 03023 // Try a cleanup of the installation area 03024 // 03025 if ((get_build_strategy () & InstallAreaMask) == WithInstallArea) 03026 { 03027 CmtInstallAreaMgr& ia_mgr = CmtInstallAreaMgr::instance (); 03028 03029 //cout << "#IA5>" << endl; 03030 03031 ia_mgr.setup (); 03032 03033 /* 03034 if ((get_setup_strategy () & SetupCleanupMask) == SetupCleanup) 03035 { 03036 const cmt_string& installarea = ia_mgr.get_installarea (); 03037 03038 if (installarea != "") 03039 { 03040 cmt_string q; 03041 03042 switch (mode) 03043 { 03044 case Sh : 03045 case Csh : 03046 q = "\'"; 03047 break; 03048 default : 03049 break; 03050 } 03051 03052 if (!m_quiet) 03053 { 03054 cout << "echo " << q 03055 << "# Doing cleanup in the installation area " << installarea 03056 << q << endl; 03057 } 03058 } 03059 03060 ia_mgr.config (); 03061 } 03062 */ 03063 } 03064 } |
|
? |
Definition at line 3067 of file cmt_parser.cxx. References action_show_action, action_show_action_value, Symbol::find(), m_action, PrintMode, CmtError::set(), set_standard_macros(), Symbol::show_macro(), cmt_vector< SymbolValueList >::size(), cmt_vector< cmt_string >::size(), CmtError::symbol_not_found, Symbol::SymbolAction, Symbol::SymbolAlias, Symbol::SymbolMacro, Symbol::SymbolPath, Symbol::SymbolSet, Symbol::type, Symbol::value_lists, and CmtError::warning. Referenced by parser(). 03069 { 03070 cmt_string target; 03071 03072 if (arguments.size () > 0) target = arguments[0]; 03073 03074 Symbol* symbol; 03075 03076 set_standard_macros (); 03077 03078 symbol = Symbol::find (target); 03079 03080 if (symbol == 0) 03081 { 03082 cmt_string t = " "; 03083 t += target; 03084 t += " is not defined "; 03085 03086 CmtError::set (CmtError::symbol_not_found, t); 03087 03088 return; 03089 } 03090 else 03091 { 03092 cmt_string t = target; 03093 t += " is a "; 03094 03095 if ((m_action == action_show_action) || 03096 (m_action == action_show_action_value)) 03097 { 03098 if (symbol->type != Symbol::SymbolAction) 03099 { 03100 if (symbol->type == Symbol::SymbolMacro) 03101 { 03102 t += "macro"; 03103 } 03104 else if (symbol->type == Symbol::SymbolSet) 03105 { 03106 t += "set"; 03107 } 03108 else if (symbol->type == Symbol::SymbolPath) 03109 { 03110 t += "path"; 03111 } 03112 else if (symbol->type == Symbol::SymbolAlias) 03113 { 03114 t += "alias"; 03115 } 03116 03117 CmtError::set (CmtError::warning, t); 03118 } 03119 } 03120 } 03121 03122 if (symbol->value_lists.size () < 1) return; 03123 03124 symbol->show_macro (mode); 03125 } |
|
? |
Definition at line 3128 of file cmt_parser.cxx. References print_symbol_names(), PrintMode, and cmt_vector< cmt_string >::size(). Referenced by parser(). 03130 { 03131 if (arguments.size () > 0) 03132 { 03133 const cmt_string& pattern = arguments[0]; 03134 print_symbol_names (mode, pattern); 03135 } 03136 else 03137 { 03138 print_symbol_names (mode); 03139 } 03140 } |
|
? |
Definition at line 3143 of file cmt_parser.cxx. References do_show_macro(), and PrintMode. Referenced by parser(). 03145 { 03146 do_show_macro (arguments, mode); 03147 } |
|
? |
Definition at line 3150 of file cmt_parser.cxx. References print_macros(), PrintMode, and cmt_vector< cmt_string >::size(). Referenced by parser(). 03152 { 03153 if (arguments.size () > 0) 03154 { 03155 const cmt_string& pattern = arguments[0]; 03156 print_macros (mode, pattern); 03157 } 03158 else 03159 { 03160 print_macros (mode); 03161 } 03162 } |
|
? |
Definition at line 3165 of file cmt_parser.cxx. References set_standard_macros(), Tag::show_definition(), cmt_vector< Tag * >::size(), and Tag::tags(). Referenced by parser(). 03166 { 03167 Tag::TagPtrVector tags = Tag::tags (); 03168 int index; 03169 03170 set_standard_macros (); 03171 03172 for (index = 0; index < tags.size (); index++) 03173 { 03174 const Tag* tag = tags[index]; 03175 if (tag != 0) 03176 { 03177 tag->show_definition (true); 03178 } 03179 } 03180 } |
|
? |
Definition at line 3183 of file cmt_parser.cxx. References Pattern::show_all_applied_patterns(). Referenced by parser(). 03184 { 03185 Pattern::show_all_applied_patterns (); 03186 } |
|
? |
Definition at line 3189 of file cmt_parser.cxx. References Use::author, and Use::current(). Referenced by parser(). 03190 { 03191 Use& use = Use::current(); 03192 03193 cout << use.author << endl; 03194 } |
|
? |
Definition at line 3197 of file cmt_parser.cxx. References Branch::print_all(), and PrintMode. Referenced by parser(). 03198 { 03199 Branch::print_all (mode); 03200 } |
|
? |
Definition at line 3203 of file cmt_parser.cxx. References clear(), configure(), ClientCollector::count(), PathScanner::scan_path(), Project::scan_paths(), and cmt_vector< cmt_string >::size(). Referenced by parser(). 03204 { 03205 cmt_string package; 03206 cmt_string version; 03207 cmt_string path_name; 03208 03209 if (arguments.size () >= 1) package = arguments[0]; 03210 if (arguments.size () >= 2) version = arguments[1]; 03211 if (arguments.size () >= 3) path_name = arguments[2]; 03212 03213 PathScanner scanner; 03214 ClientCollector collector (package, version); 03215 03216 clear (); 03217 configure (); 03218 03219 cout << "# ----------- Clients of " << package << 03220 " " << version << 03221 " " << path_name << 03222 endl; 03223 03224 if (path_name == "") 03225 { 03226 Project::scan_paths (scanner, collector); 03227 } 03228 else 03229 { 03230 scanner.scan_path (path_name, collector); 03231 } 03232 cout << "# ----------- " << collector.count () << " clients found." << endl; 03233 } |
|
? |
Definition at line 3236 of file cmt_parser.cxx. References set_standard_macros(), and CmtPathPattern::show_all(). Referenced by parser(). 03237 { 03238 set_standard_macros (); 03239 CmtPathPattern::show_all (); 03240 } |
|
? |
Definition at line 3243 of file cmt_parser.cxx. References Constituent::find(), set_standard_macros(), Constituent::show(), and cmt_vector< cmt_string >::size(). Referenced by parser(). 03244 { 03245 if (arguments.size () > 0) 03246 { 03247 set_standard_macros (); 03248 03249 Constituent* c = Constituent::find (arguments[0]); 03250 if (c != 0) 03251 { 03252 c->show (); 03253 } 03254 } 03255 } |
|
? |
Definition at line 3258 of file cmt_parser.cxx. References set_standard_macros(), and Constituent::show_names(). Referenced by parser(). 03259 { 03260 set_standard_macros (); 03261 Constituent::show_names (); 03262 } |
|
? |
Definition at line 3265 of file cmt_parser.cxx. References set_standard_macros(), and Constituent::show_all(). Referenced by parser(). 03266 { 03267 set_standard_macros (); 03268 Constituent::show_all (); 03269 } |
|
? |
Definition at line 3272 of file cmt_parser.cxx. References Use::current(), set_standard_macros(), and Use::show_cycles(). Referenced by parser(). 03273 { 03274 set_standard_macros (); 03275 Use& use = Use::current(); 03276 03277 use.show_cycles (); 03278 } |
|
? |
Definition at line 3281 of file cmt_parser.cxx. References Fragment::show(), and cmt_vector< cmt_string >::size(). Referenced by parser(). 03282 { 03283 if (arguments.size () > 0) Fragment::show (arguments[0]); 03284 } |
|
? |
Definition at line 3287 of file cmt_parser.cxx. References Fragment::show_all(). Referenced by parser(). 03288 { 03289 Fragment::show_all (); 03290 } |
|
? |
Definition at line 3293 of file cmt_parser.cxx. References Group::show_all(). Referenced by parser(). 03294 { 03295 Group::show_all (); 03296 } |
|
? |
Definition at line 3299 of file cmt_parser.cxx. References Use::current(), Use::include_path, Use::includes, Include::name, set_standard_macros(), and cmt_vector< Include >::size(). Referenced by parser(). 03300 { 03301 cmt_string temp; 03302 03303 Use& use = Use::current(); 03304 03305 set_standard_macros (); 03306 03307 if (use.include_path == "") 03308 { 03309 temp += "$(src) "; 03310 } 03311 else if (use.include_path != "none") 03312 { 03313 temp += use.include_path; 03314 temp += " "; 03315 } 03316 03317 for (int include_number = 0; 03318 include_number < use.includes.size (); 03319 include_number++) 03320 { 03321 Include& incl = use.includes[include_number]; 03322 03323 temp += incl.name; 03324 temp += " "; 03325 } 03326 03327 cout << temp << endl; 03328 } |
|
? |
Definition at line 3331 of file cmt_parser.cxx. References set_standard_macros(), Language::show(), and cmt_vector< cmt_string >::size(). Referenced by parser(). 03332 { 03333 if (arguments.size () > 0) 03334 { 03335 set_standard_macros (); 03336 Language::show (arguments[0]); 03337 } 03338 } |
|
? |
Definition at line 3341 of file cmt_parser.cxx. References set_standard_macros(), and Language::show_all(). Referenced by parser(). 03342 { 03343 set_standard_macros (); 03344 Language::show_all (); 03345 } |
|
? |
Definition at line 3348 of file cmt_parser.cxx. References action_show_macro, action_show_macro_value, action_show_set, action_show_set_value, Symbol::find(), m_action, PrintMode, CmtError::set(), set_standard_macros(), Symbol::show_macro(), cmt_vector< SymbolValueList >::size(), cmt_vector< cmt_string >::size(), CmtError::symbol_not_found, Symbol::SymbolAction, Symbol::SymbolAlias, Symbol::SymbolMacro, Symbol::SymbolPath, Symbol::SymbolSet, Symbol::type, Symbol::value_lists, and CmtError::warning. Referenced by do_show_action_value(), do_show_macro_value(), do_show_set(), do_show_set_value(), and parser(). 03350 { 03351 cmt_string target; 03352 03353 if (arguments.size () > 0) target = arguments[0]; 03354 03355 Symbol* symbol; 03356 03357 set_standard_macros (); 03358 03359 symbol = Symbol::find (target); 03360 03361 if (symbol == 0) 03362 { 03363 cmt_string t = " "; 03364 t += target; 03365 t += " is not defined "; 03366 03367 CmtError::set (CmtError::symbol_not_found, t); 03368 03369 return; 03370 } 03371 else 03372 { 03373 cmt_string t = target; 03374 t += " is a "; 03375 03376 if ((m_action == action_show_macro) || 03377 (m_action == action_show_macro_value)) 03378 { 03379 if (symbol->type != Symbol::SymbolMacro) 03380 { 03381 if (symbol->type == Symbol::SymbolAction) 03382 { 03383 t += "action"; 03384 } 03385 else if (symbol->type == Symbol::SymbolSet) 03386 { 03387 t += "set"; 03388 } 03389 else if (symbol->type == Symbol::SymbolPath) 03390 { 03391 t += "path"; 03392 } 03393 else if (symbol->type == Symbol::SymbolAlias) 03394 { 03395 t += "alias"; 03396 } 03397 03398 CmtError::set (CmtError::warning, t); 03399 } 03400 } 03401 else if ((m_action == action_show_set) || 03402 (m_action == action_show_set_value)) 03403 { 03404 if ((symbol->type != Symbol::SymbolSet) && 03405 (symbol->type != Symbol::SymbolPath) && 03406 (symbol->type != Symbol::SymbolAction) && 03407 (symbol->type != Symbol::SymbolAlias)) 03408 { 03409 t += "macro"; 03410 03411 CmtError::set (CmtError::warning, t); 03412 } 03413 } 03414 } 03415 03416 if (symbol->value_lists.size () < 1) return; 03417 03418 symbol->show_macro (mode); 03419 } |
|
? |
Definition at line 3422 of file cmt_parser.cxx. References print_symbol_names(), PrintMode, and cmt_vector< cmt_string >::size(). Referenced by parser(). 03424 { 03425 if (arguments.size () > 0) 03426 { 03427 const cmt_string& pattern = arguments[0]; 03428 print_symbol_names (mode, pattern); 03429 } 03430 else 03431 { 03432 print_symbol_names (mode); 03433 } 03434 } |
|
? |
Definition at line 3437 of file cmt_parser.cxx. References do_show_macro(), and PrintMode. Referenced by parser(). 03439 { 03440 do_show_macro (arguments, mode); 03441 } |
|
? |
Definition at line 3444 of file cmt_parser.cxx. References print_macros(), PrintMode, and cmt_vector< cmt_string >::size(). Referenced by parser(). 03446 { 03447 if (arguments.size () > 0) 03448 { 03449 const cmt_string& pattern = arguments[0]; 03450 print_macros (mode, pattern); 03451 } 03452 else 03453 { 03454 print_macros (mode); 03455 } 03456 } |
|
? |
Definition at line 3459 of file cmt_parser.cxx. References Use::current(), and Use::manager. Referenced by parser(). 03460 { 03461 Use& use = Use::current(); 03462 03463 cout << use.manager << endl; 03464 } |
|
? |
Definition at line 3467 of file cmt_parser.cxx. References PathScanner::scan_path(), Project::scan_paths(), and cmt_vector< cmt_string >::size(). Referenced by parser(). 03468 { 03469 cmt_string path_name; 03470 03471 if (arguments.size () > 0) path_name = arguments[0]; 03472 03473 PathScanner scanner; 03474 PackageViewer viewer; 03475 03476 if (path_name == "") 03477 { 03478 Project::scan_paths (scanner, viewer); 03479 } 03480 else 03481 { 03482 scanner.scan_path (path_name, viewer); 03483 } 03484 } |
|
? |
Definition at line 3487 of file cmt_parser.cxx. References Project::show_paths(). Referenced by do_show_setup(), and parser(). 03488 { 03489 Project::show_paths (); 03490 } |
|
? |
Definition at line 3493 of file cmt_parser.cxx. References Pattern::show(), and cmt_vector< cmt_string >::size(). Referenced by parser(). 03494 { 03495 cmt_string name; 03496 if (arguments.size () > 0) name = arguments[0]; 03497 Pattern::show (name); 03498 } |
|
? |
Definition at line 3501 of file cmt_parser.cxx. References Pattern::show_all_names(). Referenced by parser(). 03502 { 03503 Pattern::show_all_names (); 03504 } |
|
? |
Definition at line 3507 of file cmt_parser.cxx. References Pattern::show_all(). Referenced by parser(). 03508 { 03509 Pattern::show_all (); 03510 } |
|
? |
Definition at line 3513 of file cmt_parser.cxx. References Project::show_all(). Referenced by parser(). 03514 { 03515 Project::show_all (); 03516 } |
|
? |
Definition at line 3519 of file cmt_parser.cxx. References m_current_dir. Referenced by parser(). 03520 { 03521 cout << m_current_dir << endl; 03522 } |
|
? |
Definition at line 3538 of file cmt_parser.cxx. References do_show_macro(), and PrintMode. Referenced by parser(). 03540 { 03541 do_show_macro (arguments, mode); 03542 } |
|
? |
Definition at line 3545 of file cmt_parser.cxx. References print_symbol_names(), PrintMode, and cmt_vector< cmt_string >::size(). Referenced by parser(). 03547 { 03548 if (arguments.size () > 0) 03549 { 03550 const cmt_string& pattern = arguments[0]; 03551 print_symbol_names (mode, pattern); 03552 } 03553 else 03554 { 03555 print_symbol_names (mode); 03556 } 03557 } |
|
? |
Definition at line 3560 of file cmt_parser.cxx. References do_show_macro(), and PrintMode. Referenced by parser(). 03562 { 03563 do_show_macro (arguments, mode); 03564 } |
|
? |
Definition at line 3567 of file cmt_parser.cxx. References print_macros(), PrintMode, and cmt_vector< cmt_string >::size(). Referenced by parser(). 03569 { 03570 if (arguments.size () > 0) 03571 { 03572 const cmt_string& pattern = arguments[0]; 03573 print_macros (mode, pattern); 03574 } 03575 else 03576 { 03577 print_macros (mode); 03578 } 03579 } |
|
? |
Definition at line 3525 of file cmt_parser.cxx. References do_show_path(), do_show_tags(), and do_show_uses(). Referenced by parser(). 03526 { 03527 cout << "----------> uses" << endl; 03528 do_show_uses (); 03529 03530 cout << "----------> tags" << endl; 03531 do_show_tags (); 03532 03533 cout << "----------> CMTPATH" << endl; 03534 do_show_path (); 03535 } |
|
? |
Definition at line 3582 of file cmt_parser.cxx. References Project::get_build_strategy(), Project::get_current(), get_setup_strategy(), InstallAreaMask, KeepMakefiles, KeepMakefilesMask, m_current_build_strategy, Prototypes, PrototypesMask, SetupCleanup, SetupCleanupMask, SetupConfig, SetupConfigMask, SetupRoot, SetupRootMask, Project::show(), with_version_directory, WithInstallArea, and without_version_directory. Referenced by parser(). 03583 { 03584 Project* p = Project::get_current (); 03585 03586 if (p != 0) p->show (); 03587 else cout << "No current project" << endl; 03588 03589 cout << "Structuring style : "; 03590 03591 int strategy = 0; 03592 03593 switch (m_current_structuring_style) 03594 { 03595 case without_version_directory: 03596 cout << "without_version_directory"; 03597 break; 03598 case with_version_directory: 03599 cout << "with_version_directory"; 03600 break; 03601 } 03602 03603 cout << endl; 03604 03605 cout << "Build strategy : "; 03606 03607 if (p == 0) strategy = m_current_build_strategy; 03608 else strategy = p->get_build_strategy (); 03609 03610 if ((strategy & PrototypesMask) == Prototypes) 03611 { 03612 cout << "prototypes"; 03613 } 03614 else 03615 { 03616 cout << "no_prototypes"; 03617 } 03618 03619 if ((strategy & KeepMakefilesMask) == KeepMakefiles) 03620 { 03621 cout << " keep_makefiles"; 03622 } 03623 else 03624 { 03625 cout << " rebuild_makefiles"; 03626 } 03627 03628 if ((strategy & InstallAreaMask) == WithInstallArea) 03629 { 03630 cout << " with_installarea"; 03631 } 03632 else 03633 { 03634 cout << " without_installarea"; 03635 } 03636 03637 cout << endl; 03638 03639 cout << "Setup strategy : "; 03640 03641 strategy = get_setup_strategy (); 03642 03643 if ((strategy & SetupConfigMask) == SetupConfig) 03644 { 03645 cout << "config"; 03646 } 03647 else 03648 { 03649 cout << "no_config"; 03650 } 03651 03652 if ((strategy & SetupRootMask) == SetupRoot) 03653 { 03654 cout << " root"; 03655 } 03656 else 03657 { 03658 cout << " no_root"; 03659 } 03660 03661 if ((strategy & SetupCleanupMask) == SetupCleanup) 03662 { 03663 cout << " cleanup"; 03664 } 03665 else 03666 { 03667 cout << " no_cleanup"; 03668 } 03669 03670 cout << endl; 03671 } |
|
? |
Definition at line 3726 of file cmt_parser.cxx. References CmtSystem::get_cmt_config(). Referenced by parser(). 03727 { 03728 cout << CmtSystem::get_cmt_config () << endl; 03729 } |
|
? |
Definition at line 3674 of file cmt_parser.cxx. References m_quiet, set_standard_macros(), Tag::show(), cmt_vector< Tag * >::size(), and Tag::tags(). Referenced by do_show_setup(), and parser(). 03675 { 03676 Tag::TagPtrVector tags = Tag::tags (); 03677 int index; 03678 03679 set_standard_macros (); 03680 03681 for (index = 0; index < tags.size (); index++) 03682 { 03683 const Tag* tag = tags[index]; 03684 if (tag != 0) 03685 { 03686 tag->show (m_quiet); 03687 } 03688 } 03689 } |
|
? |
Definition at line 3692 of file cmt_parser.cxx. References Use::current(), and Use::get_all_clients(). Referenced by parser(). 03693 { 03694 const cmt_string& to_name = arguments[0]; 03695 03696 Use* current = &(Use::current()); 03697 03698 current->get_all_clients (to_name); 03699 } |
|
? |
Definition at line 3702 of file cmt_parser.cxx. References Use::show_all(). Referenced by do_show_setup(), and parser(). 03703 { 03704 Use::show_all (); 03705 } |
|
? |
Definition at line 3708 of file cmt_parser.cxx. References m_current_version. Referenced by parser(). 03709 { 03710 cout << m_current_version << endl; 03711 } |
|
? |
Definition at line 3714 of file cmt_parser.cxx. References Project::scan_paths_for_package(), and cmt_vector< cmt_string >::size(). Referenced by parser(). 03715 { 03716 cmt_string package_name; 03717 03718 if (arguments.size () > 0) package_name = arguments[0]; 03719 03720 PathScanner scanner; 03721 03722 Project::scan_paths_for_package (scanner, package_name); 03723 } |
|
? |
Definition at line 3732 of file cmt_parser.cxx. References set_standard_macros(), CmtLock::status, and CmtLock::unlock(). Referenced by parser(). 03735 { 03736 // (unused??) Use& use = Use::current(); 03737 03738 cout << "try to unlock package " << package << " in " << CmtSystem::pwd () << endl; 03739 03740 set_standard_macros (); 03741 03742 CmtLock::status status = CmtLock::unlock (); 03743 } |
|
? |
Definition at line 3746 of file cmt_parser.cxx. References CMTVERSION. Referenced by parser(). 03747 { 03748 cout << CMTVERSION << endl; 03749 } |
|
? |
Definition at line 3874 of file cmt_parser.cxx. References CmtSystem::compress_path(). Referenced by Include::print_filters(). 03875 { 03876 static cmt_string newdir; 03877 03878 CmtSystem::compress_path (dir, newdir); 03879 03880 return (newdir); 03881 } |
|
? |
Definition at line 3754 of file cmt_parser.cxx. References ActionType. Referenced by KwdSetupStrategy::action(), KwdBuildStrategy::action(), ActionBuilder::build(), MacroBuilder::build(), PathBuilder::build(), SetBuilder::build(), Symbol::create(), SyntaxParser::do_parse_text(), use_action_iterator::get_use(), SymbolValueList::show(), and Symbol::show_macro(). 03755 {
03756 return (m_action);
03757 }
|
|
? |
Definition at line 3776 of file cmt_parser.cxx. Referenced by Use::show_all(). 03777 {
03778 return (m_cmt_home);
03779 }
|
|
? |
Definition at line 3781 of file cmt_parser.cxx. Referenced by Use::show_all(). 03782 {
03783 return (m_cmt_user_context);
03784 }
|
|
? |
Definition at line 3786 of file cmt_parser.cxx. Referenced by Project::create(). 03787 {
03788 return (m_cmt_version);
03789 }
|
|
? |
Definition at line 3811 of file cmt_parser.cxx. References AccessMode. Referenced by Symbol::action(), Fragment::action(), SyntaxParser::parse_requirements(), and SyntaxParser::parse_requirements_text(). 03812 {
03813 return (m_current_access);
03814 }
|
|
? |
Definition at line 3816 of file cmt_parser.cxx. Referenced by Project::get_build_strategy(), and get_build_strategy(). 03817 {
03818 return (m_current_build_strategy);
03819 }
|
|
? |
Definition at line 3801 of file cmt_parser.cxx. 03802 {
03803 return (m_current_cmtpath);
03804 }
|
|
? |
Definition at line 3791 of file cmt_parser.cxx. Referenced by VSNETGenerator::reset(), MSDEVGenerator::reset(), and CmtGenerator::reset(). 03792 {
03793 return (m_current_dir);
03794 }
|
|
? |
Definition at line 3806 of file cmt_parser.cxx. 03807 {
03808 return (m_current_offset);
03809 }
|
|
? |
Definition at line 3796 of file cmt_parser.cxx. Referenced by ReadmeGenerator::build(). 03797 {
03798 return (m_current_package);
03799 }
|
|
? |
Definition at line 3821 of file cmt_parser.cxx. Referenced by Project::get_setup_strategy(), and get_setup_strategy(). 03822 {
03823 return (m_current_setup_strategy);
03824 }
|
|
? |
Definition at line 3826 of file cmt_parser.cxx. References CmtStructuringStyle. Referenced by CvsImplementation::build_version_directory(), CvsImplementation::checkout_package(), and CvsImplementation::really_checkout_package(). 03827 {
03828 return (m_current_structuring_style);
03829 }
|
|
? |
Definition at line 3831 of file cmt_parser.cxx. References CmtDirStyle. Referenced by dos_script_prefix(). 03832 {
03833 return (m_current_style);
03834 }
|
|
? |
Definition at line 3841 of file cmt_parser.cxx. Referenced by ActionBuilder::build(), MacroBuilder::build(), PathBuilder::build(), and SetBuilder::build(). 03842 {
03843 return (m_current_target);
03844 }
|
|
? |
Definition at line 3836 of file cmt_parser.cxx. Referenced by ReadmeGenerator::build(), VSNETGenerator::build_project(), and VSNETGenerator::build_workspace(). 03837 {
03838 return (m_current_version);
03839 }
|
|
? |
Definition at line 3846 of file cmt_parser.cxx. Referenced by Symbol::action(), CmtPathPattern::action(), Package::add(), Use::add(), Symbol::all_set(), LibraryGenerator::analyze_file(), Pattern::apply(), CmtPathPattern::apply(), DefaultMakefileGenerator::build(), build_deps(), build_deps_stream(), CmtLog::check(), CmtInstallAreaMgr::config(), Project::configure(), SyntaxParser::do_parse_line(), StandardMacroBuilder::fill_for_all_constituents(), StandardMacroBuilder::fill_for_use_includes(), CmtGenerator::fill_outputs(), Use::find_index(), CmtGenerator::get_all_files(), Use::get_paths(), Use::get_selected_version(), use_action_iterator::get_use(), Use::move_to(), Package::Package(), Use::reach_package(), Package::remove_use(), Use::reorder(), resolve_value(), resolve_value_for_macros(), UseProjectAction::run(), CmtPathPatternProjectAction::run(), Use::select_alternate(), Use::set_auto_imports(), Use::set_auto_imports_state(), Use::show_all(), Symbol::show_macro(), and suppress_OS_delimiters(). 03847 {
03848 return (m_debug);
03849 }
|
|
? |
Definition at line 3851 of file cmt_parser.cxx. Referenced by KwdDefault::action(), KwdSetupStrategy::action(), KwdBuildStrategy::action(), ApplyPattern::action(), Tag::action_apply(), Use::add(), ActionBuilder::build(), PathBuilder::build(), SetBuilder::build(), Use::build_library_links(), CmtInstallAreaMgr::config(), Symbol::create(), SyntaxParser::do_parse_words(), DependencyAnalyzer::filter(), TriggerAnalyzer::filter(), install_library(), BestFitSelector::operate(), constituents_action_iterator::set(), Use::show_all(), Symbol::show_macro(), and Project::show_paths(). 03852 {
03853 return (m_quiet);
03854 }
|
|
? |
Definition at line 3856 of file cmt_parser.cxx. Referenced by Use::add(). 03857 {
03858 return (m_recursive);
03859 }
|
|
? |
Definition at line 3861 of file cmt_parser.cxx. References CmtScopeFilteringMode, default_filtering_mode, and m_scope_filtering_mode. Referenced by use_action_iterator::get_use(). 03862 { 03863 if (m_scope_filtering_mode == default_filtering_mode) 03864 { 03865 return (block_private_uses); 03866 } 03867 else 03868 { 03869 return (m_scope_filtering_mode); 03870 } 03871 } |
|
? |
Definition at line 3935 of file cmt_parser.cxx. References Bat, cmt_string::c_str(), CmtSystem::compare_and_update_files(), Csh, dos_script_prefix(), m_cmt_root, m_current_package, m_current_path, m_current_version, PrintMode, and Sh. Referenced by do_config(). 03936 { 03937 #ifdef WIN32 03938 static const int modes = 1; 03939 static const cmt_string suffix[1] = {"bat"}; 03940 static const PrintMode mode[1] = {Bat}; 03941 #else 03942 static const int modes = 2; 03943 static const cmt_string suffix[2] = {"csh", "sh"}; 03944 static const PrintMode mode[2] = {Csh, Sh}; 03945 #endif 03946 03947 cout << "Creating cleanup scripts." << endl; 03948 03949 cmt_string temp; 03950 int i; 03951 03952 cmt_string version = m_current_version; 03953 if (version == "v*") version = ""; 03954 03955 for (i = 0; i < modes; i++) 03956 { 03957 cmt_string file_name = "cleanup"; 03958 file_name += "."; 03959 file_name += suffix[i]; 03960 file_name += "."; 03961 file_name += "new"; 03962 03963 FILE* f = fopen (file_name.c_str (), "wb"); 03964 if (f != NULL) 03965 { 03966 if (mode[i] == Csh) 03967 { 03968 fprintf (f, "if ( $?CMTROOT == 0 ) then\n"); 03969 fprintf (f, " setenv CMTROOT %s\n", m_cmt_root.c_str ()); 03970 fprintf (f, "endif\n"); 03971 fprintf (f, "source ${CMTROOT}/mgr/setup.csh\n"); 03972 fprintf (f, "set tempfile=`${CMTROOT}/mgr/cmt -quiet build temporary_name`\n"); 03973 fprintf (f, "if $status != 0 then\n set tempfile=/tmp/cmt.$$\nendif\n"); 03974 fprintf (f, "${CMTROOT}/mgr/cmt cleanup -%s " 03975 "-pack=%s -version=%s -path=%s $* >${tempfile}; " 03976 "source ${tempfile}\n", 03977 suffix[i].c_str (), 03978 m_current_package.c_str (), 03979 version.c_str (), 03980 m_current_path.c_str ()); 03981 fprintf (f, "/bin/rm -f ${tempfile}\n"); 03982 } 03983 else if (mode[i] == Sh) 03984 { 03985 fprintf (f, "if test \"${CMTROOT}\" = \"\"; then\n"); 03986 fprintf (f, " CMTROOT=%s; export CMTROOT\n", m_cmt_root.c_str ()); 03987 fprintf (f, "fi\n"); 03988 fprintf (f, ". ${CMTROOT}/mgr/setup.sh\n"); 03989 fprintf (f, "tempfile=`${CMTROOT}/mgr/cmt -quiet build temporary_name`\n"); 03990 fprintf (f, "if test ! $? = 0 ; then tempfile=/tmp/cmt.$$; fi\n"); 03991 fprintf (f, "${CMTROOT}/mgr/cmt cleanup -%s " 03992 "-pack=%s -version=%s -path=%s $* >${tempfile}; " 03993 ". ${tempfile}\n", 03994 suffix[i].c_str (), 03995 m_current_package.c_str (), 03996 version.c_str (), 03997 m_current_path.c_str ()); 03998 fprintf (f, "/bin/rm -f ${tempfile}\n"); 03999 } 04000 else if (mode[i] == Bat) 04001 { 04002 dos_script_prefix (f, m_cmt_root, 04003 m_current_package, version, m_current_path, 04004 "cleanup"); 04005 } 04006 04007 fprintf (f, "\n"); 04008 04009 fclose (f); 04010 04011 cmt_string old_file_name = "cleanup"; 04012 old_file_name += "."; 04013 old_file_name += suffix[i]; 04014 04015 CmtSystem::compare_and_update_files (file_name, old_file_name); 04016 } 04017 } 04018 } |
|
? |
Definition at line 4021 of file cmt_parser.cxx. References Bat, cmt_string::c_str(), CmtSystem::compare_and_update_files(), Csh, dos_script_prefix(), get_setup_strategy(), m_cmt_root, m_current_package, m_current_path, m_current_version, PrintMode, SetupCleanup, SetupCleanupMask, and Sh. Referenced by do_config(). 04022 { 04023 #ifdef WIN32 04024 static const int modes = 1; 04025 static const cmt_string suffix[1] = {"bat"}; 04026 static const PrintMode mode[1] = {Bat}; 04027 #else 04028 static const int modes = 2; 04029 static const cmt_string suffix[2] = {"csh", "sh"}; 04030 static const PrintMode mode[2] = {Csh, Sh}; 04031 #endif 04032 04033 cout << "Creating setup scripts." << endl; 04034 04035 04036 cmt_string no_cleanup_opt; 04037 04038 if ((get_setup_strategy () & SetupCleanupMask) != SetupCleanup) 04039 { 04040 no_cleanup_opt = " -no_cleanup"; 04041 } 04042 04043 cmt_string temp; 04044 int i; 04045 04046 cmt_string version = m_current_version; 04047 if (version == "v*") version = ""; 04048 04049 for (i = 0; i < modes; i++) 04050 { 04051 cmt_string file_name = "setup"; 04052 file_name += "."; 04053 file_name += suffix[i]; 04054 file_name += "."; 04055 file_name += "new"; 04056 04057 FILE* f = fopen (file_name.c_str (), "wb"); 04058 if (f != NULL) 04059 { 04060 if (mode[i] == Csh) 04061 { 04062 fprintf (f, "# echo \"Setting %s %s in %s\"\n", 04063 m_current_package.c_str (), 04064 version.c_str (), 04065 m_current_path.c_str ()); 04066 fprintf (f, "\n"); 04067 04068 fprintf (f, "if ( $?CMTROOT == 0 ) then\n"); 04069 fprintf (f, " setenv CMTROOT %s\n", m_cmt_root.c_str ()); 04070 fprintf (f, "endif\n"); 04071 fprintf (f, "source ${CMTROOT}/mgr/setup.csh\n"); 04072 fprintf (f, "\n"); 04073 fprintf (f, "set tempfile=`${CMTROOT}/mgr/cmt -quiet build temporary_name`\n"); 04074 fprintf (f, "if $status != 0 then\n set tempfile=/tmp/cmt.$$\nendif\n"); 04075 fprintf (f, "${CMTROOT}/mgr/cmt setup -%s " 04076 "-pack=%s -version=%s -path=%s %s $* >${tempfile}; " 04077 "source ${tempfile}\n", 04078 suffix[i].c_str (), 04079 m_current_package.c_str (), 04080 version.c_str (), 04081 m_current_path.c_str (), 04082 no_cleanup_opt.c_str ()); 04083 fprintf (f, "/bin/rm -f ${tempfile}\n"); 04084 } 04085 else if (mode[i] == Sh) 04086 { 04087 fprintf (f, "# echo \"Setting %s %s in %s\"\n", 04088 m_current_package.c_str (), 04089 version.c_str (), 04090 m_current_path.c_str ()); 04091 fprintf (f, "\n"); 04092 04093 fprintf (f, "if test \"${CMTROOT}\" = \"\"; then\n"); 04094 fprintf (f, " CMTROOT=%s; export CMTROOT\n", m_cmt_root.c_str ()); 04095 fprintf (f, "fi\n"); 04096 fprintf (f, ". ${CMTROOT}/mgr/setup.sh\n"); 04097 fprintf (f, "\n"); 04098 fprintf (f, "tempfile=`${CMTROOT}/mgr/cmt -quiet build temporary_name`\n"); 04099 fprintf (f, "if test ! $? = 0 ; then tempfile=/tmp/cmt.$$; fi\n"); 04100 fprintf (f, "${CMTROOT}/mgr/cmt setup -%s " 04101 "-pack=%s -version=%s -path=%s %s $* >${tempfile}; " 04102 ". ${tempfile}\n", 04103 suffix[i].c_str (), 04104 m_current_package.c_str (), 04105 version.c_str (), 04106 m_current_path.c_str (), 04107 no_cleanup_opt.c_str ()); 04108 fprintf (f, "/bin/rm -f ${tempfile}\n"); 04109 } 04110 else if (mode[i] == Bat) 04111 { 04112 fprintf (f, "rem Setting %s %s in %%~d0%%~p0\n", 04113 m_current_package.c_str (), 04114 version.c_str ()); 04115 dos_script_prefix (f, m_cmt_root, 04116 m_current_package, version, m_current_path, 04117 "setup", no_cleanup_opt); 04118 } 04119 04120 fprintf (f, "\n"); 04121 04122 fclose (f); 04123 04124 cmt_string old_file_name = "setup"; 04125 old_file_name += "."; 04126 old_file_name += suffix[i]; 04127 04128 CmtSystem::compare_and_update_files (file_name, old_file_name); 04129 } 04130 } 04131 } |
|
? |
Definition at line 4134 of file cmt_parser.cxx. References Bat, cmt_string::c_str(), CmtSystem::compare_and_update_files(), Csh, dos_script_prefix(), m_cmt_root, m_current_path, m_current_version, PrintMode, and Sh. Referenced by do_config(). 04135 { 04136 #ifdef WIN32 04137 static const int modes = 1; 04138 static const cmt_string suffix[1] = {"bat"}; 04139 static const PrintMode mode[1] = {Bat}; 04140 #else 04141 static const int modes = 2; 04142 static const cmt_string suffix[2] = {"csh", "sh"}; 04143 static const PrintMode mode[2] = {Csh, Sh}; 04144 #endif 04145 04146 cout << "Creating cleanup scripts." << endl; 04147 04148 cmt_string temp; 04149 int i; 04150 04151 cmt_string version = m_current_version; 04152 if (version == "v*") version = ""; 04153 04154 for (i = 0; i < modes; i++) 04155 { 04156 cmt_string file_name = "cleanup"; 04157 file_name += "."; 04158 file_name += suffix[i]; 04159 file_name += "."; 04160 file_name += "new"; 04161 04162 FILE* f = fopen (file_name.c_str (), "wb"); 04163 if (f != NULL) 04164 { 04165 if (mode[i] == Csh) 04166 { 04167 fprintf (f, "if ( $?CMTROOT == 0 ) then\n"); 04168 fprintf (f, " setenv CMTROOT %s\n", m_cmt_root.c_str ()); 04169 fprintf (f, "endif\n"); 04170 fprintf (f, "source ${CMTROOT}/mgr/setup.csh\n"); 04171 fprintf (f, "set tempfile=`${CMTROOT}/mgr/cmt -quiet build temporary_name`\n"); 04172 fprintf (f, "if $status != 0 then\n set tempfile=/tmp/cmt.$$\nendif\n"); 04173 fprintf (f, "${CMTROOT}/mgr/cmt cleanup -%s -pack=cmt_standalone -path=%s $* >${tempfile}; " 04174 "source ${tempfile}\n", 04175 suffix[i].c_str (), 04176 m_current_path.c_str ()); 04177 fprintf (f, "/bin/rm -f ${tempfile}\n"); 04178 } 04179 else if (mode[i] == Sh) 04180 { 04181 fprintf (f, "if test \"${CMTROOT}\" = \"\"; then\n"); 04182 fprintf (f, " CMTROOT=%s; export CMTROOT\n", m_cmt_root.c_str ()); 04183 fprintf (f, "fi\n"); 04184 fprintf (f, ". ${CMTROOT}/mgr/setup.sh\n"); 04185 fprintf (f, "tempfile=`${CMTROOT}/mgr/cmt -quiet build temporary_name`\n"); 04186 fprintf (f, "if test ! $? = 0 ; then tempfile=/tmp/cmt.$$; fi\n"); 04187 fprintf (f, "${CMTROOT}/mgr/cmt cleanup -%s -pack=cmt_standalone -path=%s $* >${tempfile}; " 04188 ". ${tempfile}\n", 04189 suffix[i].c_str (), 04190 m_current_path.c_str ()); 04191 fprintf (f, "/bin/rm -f ${tempfile}\n"); 04192 } 04193 else 04194 { 04195 dos_script_prefix (f, m_cmt_root, 04196 "cmt_standalone", "", m_current_path, 04197 "cleanup"); 04198 } 04199 04200 fprintf (f, "\n"); 04201 04202 fclose (f); 04203 04204 cmt_string old_file_name = "cleanup"; 04205 old_file_name += "."; 04206 old_file_name += suffix[i]; 04207 04208 CmtSystem::compare_and_update_files (file_name, old_file_name); 04209 } 04210 } 04211 } |
|
? |
Definition at line 4214 of file cmt_parser.cxx. References Bat, cmt_string::c_str(), CmtSystem::compare_and_update_files(), Csh, dos_script_prefix(), get_setup_strategy(), m_cmt_root, m_current_path, PrintMode, SetupCleanup, SetupCleanupMask, and Sh. Referenced by do_config(). 04215 { 04216 #ifdef WIN32 04217 static const int modes = 1; 04218 static const cmt_string suffix[1] = {"bat"}; 04219 static const PrintMode mode[1] = {Bat}; 04220 #else 04221 static const int modes = 2; 04222 static const cmt_string suffix[2] = {"csh", "sh"}; 04223 static const PrintMode mode[2] = {Csh, Sh}; 04224 #endif 04225 04226 cout << "Creating setup scripts." << endl; 04227 04228 cmt_string no_cleanup_opt; 04229 04230 if ((get_setup_strategy () & SetupCleanupMask) != SetupCleanup) 04231 { 04232 no_cleanup_opt = " -no_cleanup"; 04233 } 04234 04235 cmt_string temp; 04236 int i; 04237 04238 for (i = 0; i < modes; i++) 04239 { 04240 cmt_string file_name = "setup"; 04241 file_name += "."; 04242 file_name += suffix[i]; 04243 file_name += "."; 04244 file_name += "new"; 04245 04246 FILE* f = fopen (file_name.c_str (), "wb"); 04247 if (f != NULL) 04248 { 04249 if (mode[i] == Csh) 04250 { 04251 fprintf (f, "# echo \"Setting standalone package\"\n"); 04252 fprintf (f, "\n"); 04253 04254 fprintf (f, "if ( $?CMTROOT == 0 ) then\n"); 04255 fprintf (f, " setenv CMTROOT %s\n", m_cmt_root.c_str ()); 04256 fprintf (f, "endif\n"); 04257 fprintf (f, "source ${CMTROOT}/mgr/setup.csh\n"); 04258 fprintf (f, "set tempfile=`${CMTROOT}/mgr/cmt -quiet build temporary_name`\n"); 04259 fprintf (f, "if $status != 0 then\n set tempfile=/tmp/cmt.$$\nendif\n"); 04260 fprintf (f, "${CMTROOT}/mgr/cmt setup -%s -pack=cmt_standalone -path=%s %s $* >${tempfile}; " 04261 "source ${tempfile}\n", 04262 suffix[i].c_str (), 04263 m_current_path.c_str (), 04264 no_cleanup_opt.c_str ()); 04265 fprintf (f, "/bin/rm -f ${tempfile}\n"); 04266 } 04267 else if (mode[i] == Sh) 04268 { 04269 fprintf (f, "# echo \"Setting standalone package\"\n"); 04270 fprintf (f, "\n"); 04271 04272 fprintf (f, "if test \"${CMTROOT}\" = \"\"; then\n"); 04273 fprintf (f, " CMTROOT=%s; export CMTROOT\n", m_cmt_root.c_str ()); 04274 fprintf (f, "fi\n"); 04275 fprintf (f, ". ${CMTROOT}/mgr/setup.sh\n"); 04276 fprintf (f, "\n"); 04277 fprintf (f, "tempfile=`${CMTROOT}/mgr/cmt -quiet build temporary_name`\n"); 04278 fprintf (f, "if test ! $? = 0 ; then tempfile=/tmp/cmt.$$; fi\n"); 04279 fprintf (f, "${CMTROOT}/mgr/cmt setup -%s -pack=cmt_standalone -path=%s %s $* >${tempfile}; " 04280 ". ${tempfile}\n", 04281 suffix[i].c_str (), 04282 m_current_path.c_str (), 04283 no_cleanup_opt.c_str ()); 04284 fprintf (f, "/bin/rm -f ${tempfile}\n"); 04285 } 04286 else 04287 { 04288 fprintf (f, "rem Setting standalone package\n"); 04289 dos_script_prefix (f, m_cmt_root, 04290 "cmt_standalone", "", m_current_path, 04291 "setup", no_cleanup_opt); 04292 } 04293 04294 fprintf (f, "\n"); 04295 04296 fclose (f); 04297 04298 cmt_string old_file_name = "setup"; 04299 old_file_name += "."; 04300 old_file_name += suffix[i]; 04301 04302 CmtSystem::compare_and_update_files (file_name, old_file_name); 04303 } 04304 } 04305 } |
|
? |
load is only called from the Windows GUI which pretends to access directly the internal data model. This is considered to be rather unsafe, and should be replaced by query functions. Definition at line 4312 of file cmt_parser.cxx. References action_load, Tag::add(), Pattern::apply_all_globals(), CmtSystem::basename(), build_config(), build_prefix(), cmt_string::c_str(), CmtSystem::cd(), clear(), cmt_style, configure(), configure_current_dir(), configure_hosttype_tag(), configure_site_tag(), configure_uname_tag(), configure_version_tag(), Use::current(), DeveloperMode, CmtSystem::dirname(), Use::done, CmtSystem::file_separator(), CmtError::has_pending_error(), m_action, m_cmt_config, m_current_access, m_current_config, m_current_dir, m_current_package, m_current_path, m_current_prefix, m_current_style, m_current_tag, m_current_version, m_default_path, m_quiet, m_recursive, Tag::mark(), mgr_style, no_version_style, none_style, CmtError::package_not_found, SyntaxParser::parse_requirements(), Use::path, Use::prefix, PriorityConfig, PriorityTag, CmtSystem::pwd(), Tag::restore_tree(), CmtError::set(), Use::set_package_name(), Use::style, CmtSystem::test_directory(), Tag::unmark_all(), use_cmt(), UserMode, and Use::version. 04316 { 04317 clear (); 04318 configure (); 04319 04320 m_action = action_load; 04321 m_recursive = true; 04322 04323 if (((package != "") && (version != "")) || (m_current_package == "")) 04324 { 04325 // 04326 // Here we want to connect to a new package, or to the current package 04327 // but with another tag. 04328 // 04329 // the 'package' argument may include a directory offset. Thus 'path' 04330 // is only expected to hold the base directory. 04331 // 04332 cmt_string offset; 04333 cmt_string package_name; 04334 04335 CmtSystem::dirname (package, offset); 04336 CmtSystem::basename (package, package_name); 04337 04338 if (offset != "") 04339 { 04340 m_current_path = path; 04341 m_current_path += CmtSystem::file_separator (); 04342 m_current_path += offset; 04343 } 04344 else 04345 { 04346 m_current_path = path; 04347 } 04348 04349 m_current_package = package_name; 04350 m_current_version = version; 04351 } 04352 04353 if (tag_name != "") 04354 { 04355 Tag* tag; 04356 04357 Tag::unmark_all (); 04358 configure_version_tag (); 04359 configure_site_tag (0); 04360 configure_uname_tag (); 04361 configure_hosttype_tag (); 04362 04363 m_current_tag = tag_name; 04364 04365 //if (!m_quiet) cerr << "load1> current_tag=" << m_current_tag << endl; 04366 04367 tag = Tag::add (tag_name, PriorityTag, "load", 0); 04368 tag->mark (); 04369 } 04370 04371 /* 04372 Set to developer mode if positioned into the package 04373 (which is detected since we were able to retreive the 04374 Version, Package and Path) 04375 */ 04376 04377 if ((m_current_path == "") || 04378 (m_current_package == "") || 04379 (m_current_version == "")) 04380 { 04381 m_current_access = UserMode; 04382 } 04383 else 04384 { 04385 m_current_access = DeveloperMode; 04386 } 04387 04388 use_cmt (); 04389 04390 cmt_string dir; 04391 04392 /* 04393 Try to access the package. 04394 */ 04395 04396 if (m_current_path != "") 04397 { 04398 dir = m_current_path; 04399 } 04400 else 04401 { 04402 dir = m_default_path; 04403 } 04404 04405 if (!CmtSystem::cd (m_current_path)) 04406 { 04407 if (!m_quiet) 04408 { 04409 cerr << "#CMT> Cannot reach the directory " << 04410 m_current_path << endl; 04411 } 04412 CmtError::set (CmtError::package_not_found, "Load> Cannot reach the path directory"); 04413 CmtSystem::cd (m_current_dir); 04414 04415 return (false); 04416 } 04417 04418 dir += CmtSystem::file_separator (); 04419 dir += m_current_package; 04420 04421 if (!CmtSystem::cd (m_current_package)) 04422 { 04423 if (!m_quiet) 04424 { 04425 cerr << "#CMT::load> Cannot reach the package " << 04426 m_current_package << endl; 04427 } 04428 CmtError::set (CmtError::package_not_found, "Load> Cannot reach the package directory"); 04429 CmtSystem::cd (m_current_dir); 04430 04431 return (false); 04432 } 04433 04434 dir += CmtSystem::file_separator (); 04435 dir += m_current_version; 04436 04437 m_current_style = none_style; 04438 04439 if (!CmtSystem::cd (m_current_version)) 04440 { 04441 if (!CmtSystem::test_directory ("cmt")) 04442 { 04443 if (!m_quiet) 04444 { 04445 cerr << "#CMT> Cannot reach the version " << 04446 m_current_version << endl; 04447 } 04448 CmtError::set (CmtError::package_not_found, "Load> Cannot reach the version directory"); 04449 CmtSystem::cd (m_current_dir); 04450 04451 return (false); 04452 } 04453 else 04454 { 04455 m_current_style = no_version_style; 04456 } 04457 } 04458 04459 if (CmtSystem::cd ("cmt")) 04460 { 04461 dir += CmtSystem::file_separator (); 04462 dir += "cmt"; 04463 if (m_current_style == none_style) m_current_style = cmt_style; 04464 } 04465 else 04466 { 04467 /* 04468 if (!m_quiet) 04469 { 04470 cerr << "Cannot reach the cmt branch" << endl; 04471 } 04472 */ 04473 04474 if (CmtSystem::cd ("mgr")) 04475 { 04476 dir += CmtSystem::file_separator (); 04477 dir += "mgr"; 04478 if (m_current_style == none_style) m_current_style = mgr_style; 04479 } 04480 else 04481 { 04482 if (!m_quiet) 04483 { 04484 cerr << "#CMT> Cannot reach the mgr branch" << endl; 04485 } 04486 04487 CmtError::set (CmtError::package_not_found, 04488 "Load> Cannot reach the mgr/cmt directory"); 04489 CmtSystem::cd (m_current_dir); 04490 04491 return (false); 04492 } 04493 } 04494 04495 /* 04496 Check Tag is always set up 04497 */ 04498 04499 if (m_current_tag == "") 04500 { 04501 char* env; 04502 04503 env = getenv (m_current_config.c_str ()); 04504 if (env != 0) 04505 { 04506 Tag* tag; 04507 04508 tag = Tag::add (env, PriorityConfig, "load", 0); 04509 tag->mark (); 04510 m_current_tag = env; 04511 04512 //if (!m_quiet) cerr << "load2> current_tag=" << m_current_tag << endl; 04513 04514 } 04515 else 04516 { 04517 m_current_tag = m_cmt_config; 04518 04519 //if (!m_quiet) cerr << "load3> current_tag=" << m_current_tag << endl; 04520 04521 } 04522 } 04523 04524 if (m_debug) 04525 { 04526 cout << "pwd = " << CmtSystem::pwd () << endl; 04527 } 04528 04529 configure_current_dir (); 04530 build_prefix (m_current_package, m_current_prefix); 04531 build_config (m_current_prefix, m_current_config); 04532 04533 Use* use = &(Use::current()); 04534 use->path = m_current_path; 04535 use->set_package_name (m_current_package); 04536 use->version = m_current_version; 04537 use->prefix = m_current_prefix; 04538 use->done = false; 04539 use->style = m_current_style; 04540 04541 /* 04542 Work on the requirements file. 04543 */ 04544 04545 dir += CmtSystem::file_separator (); 04546 dir += "requirements"; 04547 SyntaxParser::parse_requirements (dir, use); 04548 04549 if (CmtError::has_pending_error ()) return (false); 04550 04554 Pattern::apply_all_globals (); 04555 04556 /* 04557 Select all possible tags 04558 */ 04559 04560 Tag::restore_tree (); 04561 04562 return (true); 04563 } |
|
? |
See reach_current_package for an explanation of this call. Definition at line 4566 of file cmt_parser.cxx. References get_build_strategy(), Prototypes, and PrototypesMask. Referenced by Constituent::add(). 04567 { 04568 if ((get_build_strategy () & PrototypesMask) == Prototypes) return (true); 04569 else return (false); 04570 } |
|
? |
Definition at line 4573 of file cmt_parser.cxx. References action_awk, action_broadcast, action_build, action_build_CMT_pacman, action_build_constituent_makefile, action_build_constituents_makefile, action_build_dependencies, action_build_library_links, action_build_make_setup, action_build_msdev, action_build_os9_makefile, action_build_prototype, action_build_readme, action_build_tag_makefile, action_build_temporary_name, action_build_triggers, action_build_vsnet, action_build_windefs, action_check, action_check_configuration, action_check_files, action_check_version, action_checkout, action_cleanup, action_config, action_create, action_create_project, action_cvsbranches, action_cvssubpackages, action_cvstags, action_do, action_expand_model, action_filter, action_help, action_lock, action_none, action_remove, action_remove_library_links, action_run, action_run_sequence, action_set_version, action_set_versions, action_setup, action_show, action_show_action, action_show_action_names, action_show_action_value, action_show_actions, action_show_all_tags, action_show_applied_patterns, action_show_author, action_show_branches, action_show_clients, action_show_cmtpath_patterns, action_show_constituent, action_show_constituent_names, action_show_constituents, action_show_cycles, action_show_fragment, action_show_fragments, action_show_groups, action_show_include_dirs, action_show_language, action_show_languages, action_show_macro, action_show_macro_names, action_show_macro_value, action_show_macros, action_show_manager, action_show_packages, action_show_path, action_show_pattern, action_show_pattern_names, action_show_patterns, action_show_projects, action_show_pwd, action_show_set, action_show_set_names, action_show_set_value, action_show_sets, action_show_setup, action_show_strategies, action_show_tags, action_show_use_paths, action_show_uses, action_show_version, action_show_versions, action_system, action_unlock, action_version, Tag::add(), cmt_vector< cmt_string >::add(), CmtSystem::add_cmt_path(), Bat, block_private_uses, cmt_vector< cmt_string >::clear(), Tag::clear_all(), configure_config_tag(), configure_home(), configure_hosttype_tag(), configure_site_tag(), configure_uname_tag(), configure_version_tag(), Csh, Use::current(), default_filtering_mode, cmt_string::erase(), cmt_string::find(), CmtSystem::get_cmt_config(), ProjectFactory::instance(), m_action, m_build_nmake, m_cmt_home, m_cmt_user_context, m_current_access, m_current_package, m_current_path, m_current_setup_strategy, m_current_structuring_style, m_current_tag, m_current_target, m_current_version, m_default_path, m_extra_tags, m_help_action, m_quiet, m_scope_filtering_mode, m_simulation, Tag::mark(), cmt_string::npos, PrintMode, PriorityArgument, PriorityTag, PriorityUserTag, reach_private_uses, restore_all_tags(), set_scope_filtering_mode(), SetupNoCleanup, Sh, cmt_vector< cmt_string >::size(), cmt_string::size(), CmtSystem::split(), cmt_string::substr(), Tag::tags(), CmtSystem::test_directory(), CmtSystem::testenv(), Tag::unmark_all(), UserMode, with_version_directory, and without_version_directory. Referenced by parser(). 04578 { 04579 /* 04580 Decoding arguments. 04581 04582 While decoding all arguments, no requirements analysis should 04583 occur. Every new option, or parameter should be saved and 04584 used later at actual analysis time. 04585 */ 04586 04587 cmt_string arg; 04588 04589 m_action = action_none; 04590 m_help_action = action_none; 04591 04592 arguments.clear (); 04593 extra_line.erase (0); 04594 extra_file.erase (0); 04595 mode = Csh; 04596 04597 /* 04598 Tag management. 04599 --------------- 04600 04601 Tag settings may come from : 04602 04603 - existing environment variables: 04604 04605 1) CMTCONFIG 04606 04607 2) CMTEXTRATAGS for addons 04608 04609 - arguments: 04610 04611 -tag= |
|
? |
Definition at line 6617 of file cmt_parser.cxx. References action_awk, action_broadcast, action_build_CMT_pacman, action_build_constituent_makefile, action_build_constituents_makefile, action_build_dependencies, action_build_library_links, action_build_make_setup, action_build_msdev, action_build_os9_makefile, action_build_prototype, action_build_readme, action_build_tag_makefile, action_build_temporary_name, action_build_triggers, action_build_vsnet, action_build_windefs, action_check_configuration, action_check_files, action_check_version, action_checkout, action_cleanup, action_config, action_create, action_create_project, action_cvsbranches, action_cvssubpackages, action_cvstags, action_do, action_expand_model, action_filter, action_help, action_load, action_lock, action_none, action_remove, action_remove_library_links, action_run, action_run_sequence, action_set_version, action_set_versions, action_setup, action_show_action, action_show_action_names, action_show_action_value, action_show_actions, action_show_all_tags, action_show_applied_patterns, action_show_author, action_show_branches, action_show_clients, action_show_cmtpath_patterns, action_show_constituent, action_show_constituent_names, action_show_constituents, action_show_cycles, action_show_fragment, action_show_fragments, action_show_groups, action_show_include_dirs, action_show_language, action_show_languages, action_show_macro, action_show_macro_names, action_show_macro_value, action_show_macros, action_show_manager, action_show_packages, action_show_path, action_show_pattern, action_show_pattern_names, action_show_patterns, action_show_projects, action_show_pwd, action_show_set, action_show_set_names, action_show_set_value, action_show_sets, action_show_setup, action_show_strategies, action_show_tags, action_show_use_paths, action_show_uses, action_show_version, action_show_versions, action_system, action_unlock, action_version, cmt_string::c_str(), CmtError::clear(), clear(), configure(), Csh, DeveloperMode, do_awk(), do_broadcast(), do_build_CMT_pacman(), do_build_constituent_makefile(), do_build_constituents_makefile(), do_build_dependencies(), do_build_library_links(), do_build_make_setup(), do_build_msdev(), do_build_os9_makefile(), do_build_prototype(), do_build_readme(), do_build_tag_makefile(), do_build_temporary_name(), do_build_triggers(), do_build_vsnet(), do_build_windefs(), do_check_configuration(), do_check_files(), do_check_version(), do_checkout(), do_cleanup(), do_config(), do_create(), do_create_project(), do_cvsbranches(), do_cvssubpackages(), do_cvstags(), do_do(), do_expand_model(), do_filter(), do_help(), do_lock(), do_remove(), do_remove_library_links(), do_run(), do_run_sequence(), do_set_version(), do_set_versions(), do_setup(), do_show_action(), do_show_action_names(), do_show_action_value(), do_show_actions(), do_show_all_tags(), do_show_applied_patterns(), do_show_author(), do_show_branches(), do_show_clients(), do_show_cmtpath_patterns(), do_show_constituent(), do_show_constituent_names(), do_show_constituents(), do_show_cycles(), do_show_fragment(), do_show_fragments(), do_show_groups(), do_show_include_dirs(), do_show_language(), do_show_languages(), do_show_macro(), do_show_macro_names(), do_show_macro_value(), do_show_macros(), do_show_manager(), do_show_packages(), do_show_path(), do_show_pattern(), do_show_pattern_names(), do_show_patterns(), do_show_projects(), do_show_pwd(), do_show_set(), do_show_set_names(), do_show_set_value(), do_show_sets(), do_show_setup(), do_show_strategies(), do_show_system(), do_show_tags(), do_show_use_paths(), do_show_uses(), do_show_version(), do_show_versions(), do_unlock(), do_version(), CmtError::get_last_error_code(), CmtError::has_pending_error(), m_action, m_configure_error, m_current_access, m_current_package, m_current_path, m_current_tag, m_current_version, m_help_action, m_quiet, m_recursive, parse_arguments(), SyntaxParser::parse_requirements(), SyntaxParser::parse_requirements_line(), CmtError::print(), PrintMode, CmtSystem::pwd(), reach_current_package(), CmtError::set(), cmt_string::size(), CmtError::syntax_error, use_cmt(), use_home_requirements(), use_user_context_requirements(), and UserMode. 06618 { 06619 PrintMode mode = Csh; 06620 CmtSystem::cmt_string_vector arguments; 06621 cmt_string extra_line; 06622 cmt_string extra_file; 06623 06624 if (argc <= 1) 06625 { 06626 do_help (); 06627 exit (0); 06628 } 06629 06630 clear (); 06631 configure (); 06632 06633 CmtError::clear (); 06634 06635 /* 06636 Set private if positioned inside the package 06637 (which is detected since we were able to retreive the 06638 Version, Package and Path) 06639 */ 06640 06641 if ((m_current_path.size () == 0) || 06642 (m_current_package.size () == 0) || 06643 (m_current_version.size () == 0)) 06644 { 06645 m_current_access = UserMode; 06646 } 06647 else 06648 { 06649 m_current_access = DeveloperMode; 06650 } 06651 06652 parse_arguments (argc, argv, arguments, 06653 extra_line, extra_file, mode); 06654 06655 if (m_configure_error != "") 06656 { 06657 if (!m_quiet) cerr << "#CMT> Error: " << m_configure_error << endl; 06658 return (CmtError::execution_error); 06659 } 06660 06661 if (CmtError::has_pending_error ()) 06662 { 06663 int code = CmtError::get_last_error_code (); 06664 if (!m_quiet) CmtError::print (); 06665 clear (); 06666 06667 return (code); 06668 } 06669 06670 if (m_debug) 06671 { 06672 cout << "After parse_argument> pack=" << m_current_package 06673 << " m_current_tag=" << m_current_tag 06674 << " cwd=" << CmtSystem::pwd () 06675 << endl; 06676 } 06677 06678 /* 06679 Now actual requirements analysis can take place. 06680 06681 Extra lines or files are analysed first. 06682 */ 06683 06684 if (strlen (extra_file.c_str ()) > 0) SyntaxParser::parse_requirements (extra_file, (Use*) 0); 06685 if (strlen (extra_line.c_str ()) > 0) SyntaxParser::parse_requirements_line (extra_line, (Use*) 0); 06686 06687 // 06688 // For some of the actions, the CMT package must be automatically 06689 // included 06690 // 06691 06692 if (m_debug) cout << "parser1> current_tag=" << m_current_tag << endl; 06693 06694 if (m_help_action == action_help) 06695 { 06696 do_help (m_action); 06697 return (0); 06698 } 06699 06700 switch (m_action) 06701 { 06702 // case action_none : 06703 case action_awk : 06704 case action_broadcast : 06705 case action_build_constituent_makefile : 06706 case action_build_constituents_makefile : 06707 case action_build_dependencies : 06708 case action_build_library_links : 06709 case action_build_make_setup : 06710 case action_build_msdev : 06711 case action_build_CMT_pacman : 06712 case action_build_vsnet : 06713 case action_build_os9_makefile : 06714 // case action_build_prototype : 06715 case action_build_readme : 06716 case action_build_tag_makefile : 06717 // case action_build_temporary_name : 06718 case action_build_triggers : 06719 case action_build_windefs : 06720 case action_check_configuration : 06721 // case action_check_files : 06722 // case action_check_version : 06723 case action_checkout : 06724 case action_cleanup : 06725 case action_config : 06726 case action_create : 06727 // case action_create_project : 06728 // case action_cvsbranches : 06729 // case action_cvssubpackages : 06730 // case action_cvstags : 06731 case action_do : 06732 case action_expand_model : 06733 case action_filter : 06734 // case action_help : 06735 case action_load : 06736 case action_lock : 06737 case action_remove : 06738 case action_remove_library_links : 06739 case action_run : 06740 case action_run_sequence : 06741 case action_set_version : 06742 case action_set_versions : 06743 case action_setup : 06744 case action_show_action : 06745 case action_show_action_names : 06746 case action_show_action_value : 06747 case action_show_actions : 06748 case action_show_all_tags : 06749 case action_show_applied_patterns : 06750 // case action_show_author : 06751 // case action_show_branches : 06752 // case action_show_clients : 06753 case action_show_cmtpath_patterns : 06754 // case action_show_constituent : 06755 // case action_show_constituent_names : 06756 // case action_show_constituents : 06757 case action_show_cycles : 06758 case action_show_fragment : 06759 case action_show_fragments : 06760 case action_show_groups : 06761 case action_show_include_dirs : 06762 case action_show_language : 06763 case action_show_languages : 06764 case action_show_macro : 06765 case action_show_macro_names : 06766 case action_show_macro_value : 06767 case action_show_macros : 06768 // case action_show_manager : 06769 // case action_show_packages : 06770 case action_show_path : 06771 case action_show_pattern : 06772 case action_show_pattern_names : 06773 case action_show_patterns : 06774 case action_show_projects : 06775 // case action_show_pwd : 06776 case action_show_setup : 06777 case action_show_set : 06778 case action_show_set_names : 06779 case action_show_set_value : 06780 case action_show_sets : 06781 case action_show_strategies : 06782 case action_show_tags : 06783 case action_show_use_paths : 06784 case action_show_uses : 06785 case action_show_version : 06786 // case action_show_versions : 06787 // case action_system : 06788 case action_unlock : 06789 case action_version : 06790 use_cmt (); 06791 // 06792 // Now parse the requirements file stored in ${CMTHOME} 06793 // 06794 06795 use_home_requirements (); 06796 06797 break; 06798 default: 06799 break; 06800 } 06801 06802 if (m_debug) cout << "parser2> current_tag=" << m_current_tag << endl; 06803 06804 // 06805 // Setting up recursive actions 06806 // 06807 06808 switch (m_action) 06809 { 06810 // case action_none : 06811 case action_awk : 06812 case action_broadcast : 06813 case action_build_constituent_makefile : 06814 case action_build_constituents_makefile : 06815 case action_build_dependencies : 06816 case action_build_library_links : 06817 case action_build_make_setup : 06818 case action_build_msdev : 06819 case action_build_CMT_pacman : 06820 case action_build_vsnet : 06821 case action_build_os9_makefile : 06822 // case action_build_prototype : 06823 case action_build_readme : 06824 case action_build_tag_makefile : 06825 // case action_build_temporary_name : 06826 case action_build_triggers : 06827 case action_build_windefs : 06828 case action_check_configuration : 06829 // case action_check_files : 06830 // case action_check_version : 06831 // case action_checkout : 06832 case action_cleanup : 06833 case action_config : 06834 // case action_create : 06835 // case action_create_project : 06836 // case action_cvsbranches : 06837 // case action_cvssubpackages : 06838 // case action_cvstags : 06839 case action_do : 06840 case action_expand_model : 06841 case action_filter : 06842 // case action_help : 06843 case action_load : 06844 // case action_lock : 06845 // case action_remove : 06846 case action_remove_library_links : 06847 case action_run : 06848 case action_run_sequence : 06849 // case action_set_version : 06850 case action_set_versions : 06851 case action_setup : 06852 case action_show_action : 06853 case action_show_action_names : 06854 case action_show_action_value : 06855 case action_show_actions : 06856 case action_show_all_tags : 06857 case action_show_applied_patterns : 06858 // case action_show_author : 06859 // case action_show_branches : 06860 // case action_show_clients : 06861 case action_show_cmtpath_patterns : 06862 case action_show_constituent : 06863 case action_show_constituent_names : 06864 case action_show_constituents : 06865 case action_show_cycles : 06866 case action_show_fragment : 06867 case action_show_fragments : 06868 case action_show_groups : 06869 case action_show_include_dirs : 06870 case action_show_language : 06871 case action_show_languages : 06872 case action_show_macro : 06873 case action_show_macro_names : 06874 case action_show_macro_value : 06875 case action_show_macros : 06876 // case action_show_manager : 06877 // case action_show_packages : 06878 case action_show_path : 06879 case action_show_pattern : 06880 case action_show_pattern_names : 06881 case action_show_patterns : 06882 case action_show_projects : 06883 // case action_show_pwd : 06884 case action_show_setup : 06885 case action_show_set : 06886 case action_show_set_names : 06887 case action_show_set_value : 06888 case action_show_sets : 06889 case action_show_strategies : 06890 case action_show_tags : 06891 case action_show_use_paths : 06892 case action_show_uses : 06893 // case action_show_version : 06894 // case action_show_versions : 06895 // case action_system : 06896 // case action_unlock : 06897 // case action_version : 06898 m_recursive = true; 06899 break; 06900 default: 06901 m_recursive = false; 06902 break; 06903 } 06904 06905 // 06906 // Actions for which the context of the package is checked, 06907 // and the requirements file is analysed. 06908 // 06909 06910 switch (m_action) 06911 { 06912 case action_none : 06913 case action_awk : 06914 case action_broadcast : 06915 case action_build_constituent_makefile : 06916 case action_build_constituents_makefile : 06917 case action_build_dependencies : 06918 case action_build_library_links : 06919 case action_build_make_setup : 06920 case action_build_msdev : 06921 case action_build_CMT_pacman : 06922 case action_build_vsnet : 06923 case action_build_os9_makefile : 06924 // case action_build_prototype : 06925 case action_build_readme : 06926 case action_build_tag_makefile : 06927 // case action_build_temporary_name : 06928 case action_build_triggers : 06929 case action_build_windefs : 06930 case action_check_configuration : 06931 // case action_check_files : 06932 // case action_check_version : 06933 // case action_checkout : 06934 case action_cleanup : 06935 case action_config : 06936 // case action_create : 06937 // case action_create_project : 06938 // case action_cvsbranches : 06939 // case action_cvssubpackages : 06940 // case action_cvstags : 06941 case action_do : 06942 case action_expand_model : 06943 case action_filter : 06944 // case action_help : 06945 case action_load : 06946 case action_lock : 06947 // case action_remove : 06948 case action_remove_library_links : 06949 case action_run : 06950 // case action_run_sequence : 06951 // case action_set_version : 06952 case action_set_versions : 06953 case action_setup : 06954 case action_show_action : 06955 case action_show_action_names : 06956 case action_show_action_value : 06957 case action_show_actions : 06958 case action_show_all_tags : 06959 case action_show_applied_patterns : 06960 case action_show_author : 06961 case action_show_branches : 06962 // case action_show_clients : 06963 case action_show_cmtpath_patterns : 06964 case action_show_constituent : 06965 case action_show_constituent_names : 06966 case action_show_constituents : 06967 case action_show_cycles : 06968 case action_show_fragment : 06969 case action_show_fragments : 06970 case action_show_groups : 06971 case action_show_include_dirs : 06972 case action_show_language : 06973 case action_show_languages : 06974 case action_show_macro : 06975 case action_show_macro_names : 06976 case action_show_macro_value : 06977 case action_show_macros : 06978 case action_show_manager : 06979 // case action_show_packages : 06980 case action_show_path : 06981 case action_show_pattern : 06982 case action_show_pattern_names : 06983 case action_show_patterns : 06984 case action_show_projects : 06985 case action_show_pwd : 06986 case action_show_setup : 06987 case action_show_set : 06988 case action_show_set_names : 06989 case action_show_set_value : 06990 case action_show_sets : 06991 case action_show_strategies : 06992 case action_show_tags : 06993 case action_show_use_paths : 06994 case action_show_uses : 06995 case action_show_version : 06996 // case action_show_versions : 06997 // case action_system : 06998 case action_unlock : 06999 // case action_version : 07000 reach_current_package (); 07001 use_user_context_requirements (); 07002 break; 07003 default: 07004 break; 07005 } 07006 07007 if (m_debug) cout << "parser3> current_tag=" << m_current_tag << endl; 07008 07009 // 07010 // Perform some actions even if there is an error 07011 // 07012 07013 if (CmtError::has_pending_error ()) 07014 { 07015 int code = CmtError::get_last_error_code (); 07016 if (!m_quiet) CmtError::print (); 07017 07018 switch (m_action) 07019 { 07020 // case action_none : 07021 // case action_awk : 07022 // case action_broadcast : 07023 case action_build_constituent_makefile : 07024 case action_build_constituents_makefile : 07025 case action_build_dependencies : 07026 case action_build_library_links : 07027 case action_build_make_setup : 07028 case action_build_msdev : 07029 case action_build_CMT_pacman : 07030 case action_build_vsnet : 07031 case action_build_os9_makefile : 07032 case action_build_prototype : 07033 case action_build_readme : 07034 case action_build_tag_makefile : 07035 // case action_build_temporary_name : 07036 case action_build_triggers : 07037 case action_build_windefs : 07038 case action_check_configuration : 07039 // case action_check_files : 07040 // case action_check_version : 07041 // case action_checkout : 07042 case action_cleanup : 07043 // case action_config : 07044 // case action_create : 07045 // case action_create_project : 07046 // case action_cvsbranches : 07047 // case action_cvssubpackages : 07048 // case action_cvstags : 07049 // case action_do : 07050 // case action_expand_model : 07051 // case action_filter : 07052 // case action_help : 07053 case action_load : 07054 case action_lock : 07055 case action_remove : 07056 case action_remove_library_links : 07057 // case action_run : 07058 case action_run_sequence : 07059 // case action_set_version : 07060 // case action_set_versions : 07061 case action_setup : 07062 // case action_show_action : 07063 // case action_show_action_names : 07064 // case action_show_action_value : 07065 // case action_show_actions : 07066 // case action_show_all_tags : 07067 // case action_show_applied_patterns : 07068 // case action_show_author : 07069 // case action_show_branches : 07070 // case action_show_clients : 07071 // case action_show_cmtpath_patterns : 07072 // case action_show_constituent : 07073 // case action_show_constituent_names : 07074 // case action_show_constituents : 07075 // case action_show_cycles : 07076 // case action_show_fragment : 07077 // case action_show_fragments : 07078 // case action_show_groups : 07079 // case action_show_include_dirs : 07080 // case action_show_language : 07081 // case action_show_languages : 07082 // case action_show_macro : 07083 // case action_show_macro_names : 07084 // case action_show_macro_value : 07085 // case action_show_macros : 07086 // case action_show_manager : 07087 // case action_show_packages : 07088 // case action_show_path : 07089 // case action_show_pattern : 07090 // case action_show_pattern_names : 07091 // case action_show_patterns : 07092 // case action_show_projects : 07093 // case action_show_pwd : 07094 // case action_show_setup : 07095 // case action_show_set : 07096 // case action_show_set_names : 07097 // case action_show_set_value : 07098 // case action_show_sets : 07099 // case action_show_strategies : 07100 // case action_show_tags : 07101 // case action_show_use_paths : 07102 // case action_show_uses : 07103 // case action_show_version : 07104 // case action_show_versions : 07105 // case action_system : 07106 case action_unlock : 07107 // case action_version : 07108 clear (); 07109 return (code); 07110 default: 07111 CmtError::clear (); 07112 break; 07113 } 07114 } 07115 07116 // 07117 // Perform actions 07118 // 07119 07120 switch (m_action) 07121 { 07122 case action_none : 07123 //CmtError::set (CmtError::syntax_error, "ParseArguments> "); 07124 break; 07125 case action_awk : 07126 do_awk (arguments); 07127 break; 07128 case action_broadcast : 07129 do_broadcast (arguments, argc, argv); 07130 break; 07131 case action_build_constituent_makefile : 07132 do_build_constituent_makefile (arguments, argc, argv); 07133 break; 07134 case action_build_constituents_makefile : 07135 do_build_constituents_makefile (arguments, argc, argv); 07136 break; 07137 case action_build_dependencies : 07138 do_build_dependencies (arguments, argc, argv); 07139 break; 07140 case action_build_library_links : 07141 do_build_library_links (); 07142 break; 07143 case action_build_make_setup : 07144 do_build_make_setup (); 07145 break; 07146 case action_build_msdev : 07147 do_build_msdev (arguments); 07148 break; 07149 case action_build_CMT_pacman : 07150 do_build_CMT_pacman (); 07151 break; 07152 case action_build_vsnet : 07153 do_build_vsnet (arguments); 07154 break; 07155 case action_build_os9_makefile : 07156 do_build_os9_makefile (arguments); 07157 break; 07158 case action_build_prototype : 07159 do_build_prototype (arguments); 07160 break; 07161 case action_build_readme : 07162 do_build_readme (arguments); 07163 break; 07164 case action_build_tag_makefile : 07165 do_build_tag_makefile (); 07166 break; 07167 case action_build_temporary_name : 07168 do_build_temporary_name (); 07169 break; 07170 case action_build_triggers : 07171 do_build_triggers (arguments); 07172 break; 07173 case action_build_windefs : 07174 do_build_windefs (arguments); 07175 break; 07176 case action_check_configuration : 07177 do_check_configuration (); 07178 break; 07179 case action_check_files : 07180 do_check_files (arguments); 07181 break; 07182 case action_check_version : 07183 do_check_version (arguments); 07184 break; 07185 case action_checkout : 07186 do_checkout (arguments); 07187 break; 07188 case action_cleanup : 07189 do_cleanup (mode); 07190 break; 07191 case action_config : 07192 do_config (); 07193 break; 07194 case action_create : 07195 do_create (arguments); 07196 break; 07197 case action_create_project : 07198 do_create_project (arguments); 07199 break; 07200 case action_cvsbranches : 07201 do_cvsbranches (arguments); 07202 break; 07203 case action_cvssubpackages : 07204 do_cvssubpackages (arguments); 07205 break; 07206 case action_cvstags : 07207 do_cvstags (arguments); 07208 break; 07209 case action_do : 07210 do_do (arguments); 07211 break; 07212 case action_expand_model : 07213 do_expand_model (arguments); 07214 break; 07215 case action_filter : 07216 do_filter (arguments); 07217 break; 07218 case action_help : 07219 do_help (m_help_action); 07220 break; 07221 case action_load : 07222 cerr << "#CMT> action not implemented" << endl; 07223 break; 07224 case action_lock : 07225 do_lock (m_current_package, m_current_version, m_current_path); 07226 break; 07227 case action_remove : 07228 do_remove (m_current_package, m_current_version, m_current_path); 07229 break; 07230 case action_remove_library_links : 07231 do_remove_library_links (); 07232 break; 07233 case action_run : 07234 do_run (arguments); 07235 break; 07236 case action_run_sequence : 07237 do_run_sequence (arguments); 07238 break; 07239 case action_set_version : 07240 do_set_version (arguments); 07241 break; 07242 case action_set_versions : 07243 do_set_versions (arguments); 07244 break; 07245 case action_setup : 07246 do_setup (mode); 07247 break; 07248 case action_show_action : 07249 do_show_action (arguments, mode); 07250 break; 07251 case action_show_action_names : 07252 do_show_action_names (arguments, mode); 07253 break; 07254 case action_show_action_value : 07255 do_show_action_value (arguments, mode); 07256 break; 07257 case action_show_actions : 07258 do_show_actions (arguments, mode); 07259 break; 07260 case action_show_all_tags : 07261 do_show_all_tags (); 07262 break; 07263 case action_show_applied_patterns : 07264 do_show_applied_patterns (); 07265 break; 07266 case action_show_author : 07267 do_show_author (); 07268 break; 07269 case action_show_branches : 07270 do_show_branches (mode); 07271 break; 07272 case action_show_clients : 07273 do_show_clients (arguments); 07274 break; 07275 case action_show_cmtpath_patterns : 07276 do_show_cmtpath_patterns (); 07277 break; 07278 case action_show_constituent : 07279 do_show_constituent (arguments); 07280 break; 07281 case action_show_constituent_names : 07282 do_show_constituent_names (); 07283 break; 07284 case action_show_constituents : 07285 do_show_constituents (); 07286 break; 07287 case action_show_cycles : 07288 do_show_cycles (); 07289 break; 07290 case action_show_fragment : 07291 do_show_fragment (arguments); 07292 break; 07293 case action_show_fragments : 07294 do_show_fragments (); 07295 break; 07296 case action_show_groups : 07297 do_show_groups (); 07298 break; 07299 case action_show_include_dirs : 07300 do_show_include_dirs (); 07301 break; 07302 case action_show_language : 07303 do_show_language (arguments); 07304 break; 07305 case action_show_languages : 07306 do_show_languages (); 07307 break; 07308 case action_show_macro : 07309 do_show_macro (arguments, mode); 07310 break; 07311 case action_show_macro_names : 07312 do_show_macro_names (arguments, mode); 07313 break; 07314 case action_show_macro_value : 07315 do_show_macro_value (arguments, mode); 07316 break; 07317 case action_show_macros : 07318 do_show_macros (arguments, mode); 07319 break; 07320 case action_show_manager : 07321 do_show_manager (); 07322 break; 07323 case action_show_packages : 07324 do_show_packages (arguments); 07325 break; 07326 case action_show_path : 07327 do_show_path (); 07328 break; 07329 case action_show_pattern : 07330 do_show_pattern (arguments); 07331 break; 07332 case action_show_pattern_names : 07333 do_show_pattern_names (); 07334 break; 07335 case action_show_patterns : 07336 do_show_patterns (); 07337 break; 07338 case action_show_projects : 07339 do_show_projects (); 07340 break; 07341 case action_show_pwd : 07342 do_show_pwd (); 07343 break; 07344 case action_show_setup : 07345 do_show_setup (); 07346 break; 07347 case action_show_set : 07348 do_show_set (arguments, mode); 07349 break; 07350 case action_show_set_names : 07351 do_show_set_names (arguments, mode); 07352 break; 07353 case action_show_set_value : 07354 do_show_set_value (arguments, mode); 07355 break; 07356 case action_show_sets : 07357 do_show_sets (arguments, mode); 07358 break; 07359 case action_show_strategies : 07360 do_show_strategies (); 07361 break; 07362 case action_show_tags : 07363 do_show_tags (); 07364 break; 07365 case action_show_use_paths : 07366 do_show_use_paths (arguments); 07367 break; 07368 case action_show_uses : 07369 do_show_uses (); 07370 break; 07371 case action_show_version : 07372 do_show_version (); 07373 break; 07374 case action_show_versions : 07375 do_show_versions (arguments); 07376 break; 07377 case action_system : 07378 do_show_system (); 07379 break; 07380 case action_unlock : 07381 do_unlock (m_current_package, m_current_version, m_current_path); 07382 break; 07383 case action_version : 07384 do_version (); 07385 break; 07386 default: 07387 CmtError::set (CmtError::syntax_error, "ParseArguments>"); 07388 break; 07389 } 07390 07391 if (CmtError::has_pending_error ()) 07392 { 07393 int code = CmtError::get_last_error_code (); 07394 if (!m_quiet) CmtError::print (); 07395 clear (); 07396 return (code); 07397 } 07398 else 07399 { 07400 clear (); 07401 return (0); 07402 } 07403 } |
|
? |
Definition at line 6592 of file cmt_parser.cxx. References cmt_vector< cmt_string >::size(), and CmtSystem::split(). Referenced by do_broadcast(), and main(). 06593 { 06594 CmtSystem::cmt_string_vector v; 06595 06596 CmtSystem::split (command_line, " \t", v); 06597 06598 int argc = v.size (); 06599 06600 char** argv = (char**) malloc ((argc + 1) * sizeof (char*)); 06601 06602 int i; 06603 for (i = 0; i < argc; i++) 06604 { 06605 argv[i] = (char*) v[i].c_str (); 06606 } 06607 argv[argc] = 0; 06608 06609 int status = parser (argc, argv); 06610 06611 free (argv); 06612 06613 return (status); 06614 } |
|
? |
Format as one single line a set of 'setenv' statements joined with semi-colons to form one shell command. Definition at line 7410 of file cmt_parser.cxx. References Symbol::all_print(), Bat, Use::current(), Use::discarded, Tag::find(), Use::get_ordered_uses(), Tag::is_selected(), m_current_tag, m_extra_tags, print_context(), PrintMode, set_standard_macros(), cmt_vector< Use * >::size(), cmt_vector< cmt_string >::size(), and CmtSystem::split(). Referenced by do_setup(). 07411 { 07412 Use::UsePtrVector& Uses = Use::get_ordered_uses (); 07413 Use& current_use = Use::current (); 07414 07415 cmt_string tag; 07416 07417 set_standard_macros (); 07418 07419 //cerr << "# current_tag=" << m_current_tag << endl; 07420 //cerr << "# current_config=" << m_current_config << endl; 07421 07422 if (m_current_tag == "") 07423 { 07424 if (mode == Bat) tag = "%CMTCONFIG%"; 07425 else tag = "${CMTCONFIG}"; 07426 } 07427 else 07428 { 07429 tag = m_current_tag; 07430 } 07431 07432 // 07433 // Now check if all extra tags are still valid. Some of them 07434 // may be discarded du to some conflict with highest priority 07435 // tags, or with exclude statements 07436 // 07437 07438 { 07439 CmtSystem::cmt_string_vector words; 07440 07441 cmt_string tags; 07442 07443 tags = Cmt::m_extra_tags; 07444 07445 CmtSystem::split (tags, " \t,", words); 07446 07447 Cmt::m_extra_tags = ","; 07448 07449 for (int i = 0; i < words.size (); i++) 07450 { 07451 Tag* tag; 07452 const cmt_string& a = words[i]; 07453 07454 tag = Tag::find (a); 07455 07456 if ((tag != 0) && (tag->is_selected ())) 07457 { 07458 Cmt::m_extra_tags += a; 07459 Cmt::m_extra_tags += ","; 07460 } 07461 } 07462 } 07463 07464 if (m_debug) 07465 { 07466 cout << "Before all print contexts" << endl; 07467 } 07468 07469 if (Uses.size () > 0) 07470 { 07471 int number; 07472 07473 for (number = 0; number < Uses.size (); number++) 07474 { 07475 Use& use = *(Uses[number]); 07476 07477 if (use.discarded) continue; 07478 07479 print_context (use, mode, tag); 07480 } 07481 } 07482 07483 print_context (Use::current (), mode, tag); 07484 07485 if (m_debug) 07486 { 07487 cout << "After all print contexts" << endl; 07488 } 07489 07490 Symbol::all_print (mode); 07491 // Script::all_print (mode); 07492 07493 if (m_debug) 07494 { 07495 cout << "After all print" << endl; 07496 } 07497 07498 cout << endl; 07499 } |
|
? |
Format as one single line a set of 'unsetenv' statements joined with semi-colons to form one shell command. Definition at line 7506 of file cmt_parser.cxx. References Symbol::all_print_clean(), Script::all_print_clean(), Bat, Csh, Use::discarded, Use::get_ordered_uses(), Use::get_package(), Package::is_cmt(), m_current_package, m_current_prefix, Use::prefix, PrintMode, set_standard_macros(), Sh, and cmt_vector< Use * >::size(). Referenced by do_cleanup(). 07507 { 07508 Use::UsePtrVector& Uses = Use::get_ordered_uses (); 07509 07510 set_standard_macros (); 07511 07512 Script::all_print_clean (mode); 07513 Symbol::all_print_clean (mode); 07514 07515 switch (mode) 07516 { 07517 case Csh : 07518 if (m_current_package != "CMT") 07519 { 07520 cout << "unsetenv " << m_current_prefix << "ROOT" << endl; 07521 cout << "unsetenv " << m_current_prefix << "CONFIG" << endl; 07522 } 07523 break; 07524 case Sh : 07525 if (m_current_package != "CMT") 07526 { 07527 cout << "unset " << m_current_prefix << "ROOT" << endl; 07528 cout << "unset " << m_current_prefix << "CONFIG" << endl; 07529 } 07530 break; 07531 case Bat : 07532 if (m_current_package != "CMT") 07533 { 07534 cout << "set " << m_current_prefix << "ROOT=" << endl; 07535 cout << "set " << m_current_prefix << "CONFIG=" << endl; 07536 } 07537 break; 07538 } 07539 07540 if (Uses.size () > 0) 07541 { 07542 int number; 07543 07544 for (number = 0; number < Uses.size (); number++) 07545 { 07546 Use* use = Uses[number]; 07547 07548 if (use->discarded) continue; 07549 07550 Package* p = use->get_package (); 07551 if (p->is_cmt ()) continue; 07552 07553 switch (mode) 07554 { 07555 case Csh : 07556 cout << "unsetenv " << use->prefix << "ROOT" << endl; 07557 cout << "unsetenv " << use->prefix << "CONFIG" << endl; 07558 break; 07559 case Sh : 07560 cout << "unset " << use->prefix << "ROOT" << endl; 07561 cout << "unset " << use->prefix << "CONFIG" << endl; 07562 break; 07563 case Bat : 07564 cout << "set " << use->prefix << "ROOT=" << endl; 07565 cout << "set " << use->prefix << "CONFIG" << endl; 07566 break; 07567 } 07568 } 07569 } 07570 07571 switch (mode) 07572 { 07573 case Csh : 07574 cout << "unsetenv CMTEXTRATAGS" << endl; 07575 break; 07576 case Sh : 07577 cout << "unset CMTEXTRATAGS" << endl; 07578 break; 07579 case Bat : 07580 cout << "set CMTEXTRATAGS=" << endl; 07581 break; 07582 } 07583 07584 cout << endl; 07585 } |
|
? |
Definition at line 7588 of file cmt_parser.cxx. References Bat, Csh, do_config(), CmtSystem::file_separator(), CmtSystem::get_cmt_config(), Project::get_current(), Use::get_full_path(), Use::get_package_name(), get_setup_strategy(), Use::prefix, PrintMode, Use::real_path, cmt_string::replace_all(), SetupConfig, SetupConfigMask, SetupRoot, SetupRootMask, and Sh. Referenced by print(). 07589 { 07590 if (use.get_package_name () == "cmt_standalone") return; 07591 07592 cmt_string fs = CmtSystem::file_separator (); 07593 07594 use.real_path.replace_all (CmtSystem::file_separator (), fs); 07595 07596 cmt_string system = CmtSystem::get_cmt_config (); 07597 07598 Project* p = Project::get_current (); 07599 int strategy = 0; 07600 07601 strategy = get_setup_strategy (); 07602 07603 bool do_config = ((strategy & SetupConfigMask) == SetupConfig); 07604 bool do_root = ((strategy & SetupRootMask) == SetupRoot); 07605 07606 switch (mode) 07607 { 07608 case Csh : 07609 if (do_root) 07610 { 07611 cout << "setenv " << use.prefix << "ROOT \"" << 07612 use.get_full_path () << "\"" << endl; 07613 } 07614 07615 if (use.get_package_name () == "CMT") 07616 { 07617 cout << "setenv CMTCONFIG " << system << endl; 07618 } 07619 else 07620 { 07621 if (do_config) 07622 { 07623 cout << "setenv " << use.prefix << "CONFIG \"" << tag << "\"" << endl; 07624 } 07625 } 07626 07627 break; 07628 case Sh : 07629 if (do_root) 07630 { 07631 cout << use.prefix << "ROOT=\"" << 07632 use.get_full_path () << "\"; export " << 07633 use.prefix << "ROOT" << endl; 07634 } 07635 07636 if (use.get_package_name () == "CMT") 07637 { 07638 cout << "CMTCONFIG=" << system << "; export CMTCONFIG" << endl; 07639 } 07640 else 07641 { 07642 if (do_config) 07643 { 07644 cout << use.prefix << "CONFIG=\"" << 07645 tag << "\"; export " << 07646 use.prefix << "CONFIG" << endl; 07647 } 07648 } 07649 07650 break; 07651 case Bat : 07652 if (do_root) 07653 { 07654 cout << "set " << use.prefix << "ROOT=" << 07655 use.get_full_path () << endl; 07656 } 07657 07658 if (use.get_package_name () == "CMT") 07659 { 07660 cout << "set CMTCONFIG=" << system << endl; 07661 } 07662 else 07663 { 07664 if (do_config) 07665 { 07666 cout << "set " << use.prefix << "CONFIG=" << tag << endl; 07667 } 07668 } 07669 07670 break; 07671 } 07672 } |
|
? |
Format a set of make macro definitions (one per line) Each macro value is provided enclosed in single quotes. Take the macro values from the macro statements found in recursively read requirements files. Definition at line 7731 of file cmt_parser.cxx. References action_build_tag_makefile, action_show_actions, action_show_macros, action_show_sets, m_action, cmt_regexp::match(), Symbol::name, PrintMode, set_standard_macros(), Symbol::show_macro(), cmt_vector< SymbolValueList >::size(), Symbol::symbol(), Symbol::symbol_number(), Symbol::SymbolAction, Symbol::SymbolAlias, Symbol::SymbolCleanupScript, Symbol::SymbolMacro, Symbol::SymbolPath, Symbol::SymbolSet, Symbol::SymbolSetupScript, Symbol::type, and Symbol::value_lists. Referenced by do_build_tag_makefile(), do_show_actions(), do_show_macros(), and do_show_sets(). 07732 { 07733 int number; 07734 07735 set_standard_macros (); 07736 07737 cmt_regexp expression (pattern); 07738 07739 bool has_pattern = (pattern != ""); 07740 07741 for (number = 0; number < Symbol::symbol_number (); number++) 07742 { 07743 Symbol& symbol = Symbol::symbol (number); 07744 07745 if (has_pattern) 07746 { 07747 if (!expression.match (symbol.name)) continue; 07748 } 07749 07750 if (m_action == action_show_macros) 07751 { 07752 // Only keep macros. 07753 if ((symbol.type == Symbol::SymbolSet) || 07754 (symbol.type == Symbol::SymbolAlias) || 07755 (symbol.type == Symbol::SymbolPath) || 07756 (symbol.type == Symbol::SymbolAction)) continue; 07757 } 07758 else if (m_action == action_show_sets) 07759 { 07760 // Exclude macros. 07761 if ((symbol.type == Symbol::SymbolMacro) || 07762 (symbol.type == Symbol::SymbolAction)) continue; 07763 } 07764 else if (m_action == action_build_tag_makefile) 07765 { 07766 // Exclude scripts and actions 07767 if ((symbol.type == Symbol::SymbolSetupScript) || 07768 (symbol.type == Symbol::SymbolCleanupScript) || 07769 (symbol.type == Symbol::SymbolAction)) continue; 07770 } 07771 else if (m_action == action_show_actions) 07772 { 07773 if (symbol.type != Symbol::SymbolAction) continue; 07774 } 07775 07776 if (symbol.value_lists.size () < 1) continue; 07777 07778 symbol.show_macro (mode); 07779 } 07780 } |
|
? |
Format a set of make macro definitions (one per line) Each macro value is provided enclosed in single quotes. Take the macro values from the macro statements found in recursively read requirements files. Definition at line 7681 of file cmt_parser.cxx. References action_show_action_names, action_show_macro_names, action_show_set_names, m_action, cmt_regexp::match(), Symbol::name, PrintMode, set_standard_macros(), Symbol::symbol(), Symbol::symbol_number(), Symbol::SymbolAction, Symbol::SymbolAlias, Symbol::SymbolMacro, Symbol::SymbolPath, Symbol::SymbolSet, and Symbol::type. Referenced by do_show_action_names(), do_show_macro_names(), and do_show_set_names(). 07682 { 07683 int number; 07684 07685 set_standard_macros (); 07686 07687 cmt_regexp expression (pattern); 07688 07689 bool has_pattern = (pattern != ""); 07690 07691 for (number = 0; number < Symbol::symbol_number (); number++) 07692 { 07693 Symbol& symbol = Symbol::symbol (number); 07694 07695 if (has_pattern) 07696 { 07697 if (!expression.match (symbol.name)) continue; 07698 } 07699 07700 if (m_action == action_show_macro_names) 07701 { 07702 // Only keep macros. 07703 if ((symbol.type == Symbol::SymbolSet) || 07704 (symbol.type == Symbol::SymbolAlias) || 07705 (symbol.type == Symbol::SymbolPath) || 07706 (symbol.type == Symbol::SymbolAction)) continue; 07707 } 07708 else if (m_action == action_show_set_names) 07709 { 07710 // Exclude macros. 07711 if ((symbol.type == Symbol::SymbolMacro) || 07712 (symbol.type == Symbol::SymbolAction)) continue; 07713 } 07714 else if (m_action == action_show_action_names) 07715 { 07716 // Exclude macros. 07717 if (symbol.type != Symbol::SymbolAction) continue; 07718 } 07719 07720 cout << symbol.name << endl; 07721 } 07722 } |
|
? |
Definition at line 7783 of file cmt_parser.cxx. 07784 { 07785 while (tabs > 0) 07786 { 07787 cout << " "; 07788 tabs--; 07789 } 07790 } |
|
? |
Definition at line 7793 of file cmt_parser.cxx. References Tag::add(), Pattern::apply_all_globals(), CmtSystem::basename(), build_config(), build_prefix(), CmtSystem::cd(), cmt_style, configure_current_dir(), Use::current(), CmtSystem::dirname(), CmtSystem::file_separator(), CmtSystem::getenv(), CmtSystem::is_version_directory(), m_current_config, m_current_package, m_current_path, m_current_prefix, m_current_style, m_current_tag, m_current_version, m_quiet, Tag::mark(), mgr_style, Use::move_to(), no_version_style, CmtError::package_not_found, SyntaxParser::parse_requirements(), Use::path, PriorityConfig, CmtSystem::pwd(), Use::real_path, Tag::restore_tree(), CmtError::set(), Use::set_package_name(), Use::style, CmtSystem::test_file(), and Use::version. Referenced by do_config(), and parser(). 07794 { 07795 Use& use = Use::current (); 07796 cmt_string dir; 07797 07798 if (m_debug) 07799 { 07800 cout << "Cmt::reach_current_package> pwd = " 07801 << CmtSystem::pwd () 07802 << " path=" << m_current_path 07803 << " package=" << m_current_package 07804 << endl; 07805 } 07806 07807 /* 07808 Try to access the package. 07809 */ 07810 07811 if (m_current_package == "cmt_standalone") 07812 { 07813 if ((m_current_path != "") && (m_current_path != CmtSystem::pwd ())) 07814 { 07815 if (!CmtSystem::cd (m_current_path)) 07816 { 07817 CmtError::set (CmtError::package_not_found, 07818 "ReachCurrentPackage> Cannot reach the path directory"); 07819 return (0); 07820 } 07821 } 07822 07823 if (!CmtSystem::test_file ("requirements")) 07824 { 07825 /* 07826 if (!m_quiet) 07827 { 07828 cout << "#CMT> Cannot reach the requirements file" << endl; 07829 } 07830 07831 CmtError::set (CmtError::package_not_found, 07832 "ReachCurrentPackage> Cannot reach the requirements file"); 07833 */ 07834 return (0); 07835 } 07836 } 07837 else if (m_current_package != "") 07838 { 07839 if (!use.move_to ()) 07840 { 07841 CmtError::set (CmtError::package_not_found, 07842 "ReachCurrentPackage> Cannot reach the path directory"); 07843 return (0); 07844 } 07845 07846 m_current_path = use.real_path; 07847 } 07848 else 07849 { 07850 // 07851 // The cmt command has been given without explicit search for 07852 // a package. Thus it is expected that we are in the context of a 07853 // true package. 07854 // 07855 // This means that there should be a requirements file visible. 07856 // 07857 // If this is not true, we'll make a try into ../cmt and then 07858 // a last try into ../mgr 07859 // 07860 07861 if (!CmtSystem::test_file ("requirements")) 07862 { 07863 if (CmtSystem::cd ("../cmt") && 07864 CmtSystem::test_file ("requirements")) 07865 { 07866 m_current_style = cmt_style; 07867 } 07868 else if (CmtSystem::cd ("../mgr") && 07869 CmtSystem::test_file ("requirements")) 07870 { 07871 m_current_style = mgr_style; 07872 } 07873 else 07874 { 07875 if (!m_quiet) 07876 { 07877 cerr << "#CMT> Cannot reach the mgr branch" << endl; 07878 } 07879 07880 CmtError::set (CmtError::package_not_found, 07881 "ReachCurrentPackage> Cannot reach the mgr/cmt directory"); 07882 return (0); 07883 } 07884 } 07885 07886 dir = CmtSystem::pwd (); 07887 07888 CmtSystem::dirname (dir, m_current_path); 07889 CmtSystem::basename (m_current_path, m_current_version); 07890 07891 if (CmtSystem::is_version_directory (m_current_version)) 07892 { 07893 CmtSystem::dirname (m_current_path, m_current_path); 07894 CmtSystem::basename (m_current_path, m_current_package); 07895 CmtSystem::dirname (m_current_path, m_current_path); 07896 } 07897 else 07898 { 07899 m_current_package = m_current_version; 07900 m_current_version = ""; 07901 CmtSystem::dirname (m_current_path, m_current_path); 07902 07903 m_current_style = no_version_style; 07904 } 07905 07906 use.set_package_name (m_current_package); 07907 use.version = m_current_version; 07908 use.path = m_current_path; 07909 use.style = m_current_style; 07910 } 07911 07912 configure_current_dir (); 07913 build_prefix (m_current_package, m_current_prefix); 07914 build_config (m_current_prefix, m_current_config); 07915 07916 /* 07917 Check Tag is always set up 07918 */ 07919 07920 if (m_debug) cout << "reach_current_package0> current_tag=" << m_current_tag << endl; 07921 07922 if (m_current_tag == "") 07923 { 07924 cmt_string env; 07925 07926 env = CmtSystem::getenv (m_current_config); 07927 if (env != "") 07928 { 07929 Tag* tag; 07930 07931 tag = Tag::add (env, PriorityConfig, "reach current package", 0); 07932 tag->mark (); 07933 //m_current_tag = env; 07934 07935 //if (!m_quiet) cerr << "reach_current_package1> current_tag=" << m_current_tag << endl; 07936 07937 } 07938 } 07939 07940 if (m_debug) 07941 { 07942 cout << "pwd = " << CmtSystem::pwd () << endl; 07943 } 07944 07945 /* 07946 Work on the requirements file. 07947 */ 07948 07949 if (dir != "") dir += CmtSystem::file_separator (); 07950 dir += "requirements"; 07951 SyntaxParser::parse_requirements (dir, &use); 07952 07953 if (m_debug) cout << "reach_current_package2> current_tag=" << m_current_tag << endl; 07954 07976 Pattern::apply_all_globals (); 07977 07978 /* 07979 Select all possible tags 07980 */ 07981 07982 Tag::restore_tree (); 07983 07984 return (1); 07985 } |
|
? |
Definition at line 1068 of file cmt_parser.cxx. References Tag::add(), configure_tags(), CmtSystem::getenv(), m_extra_tags, Tag::mark(), PriorityUserTag, cmt_vector< cmt_string >::size(), CmtSystem::split(), and CmtSystem::testenv(). Referenced by parse_arguments(). 01069 { 01070 //cerr << "restore_all_tags" << endl; 01071 01072 Cmt::configure_tags (use); 01073 01074 /* 01075 Then get existing extra tags 01076 */ 01077 01078 if (CmtSystem::testenv ("CMTEXTRATAGS")) 01079 { 01080 cmt_string s = "CMTEXTRATAGS"; 01081 01082 if (use != 0) 01083 { 01084 s += " in "; 01085 } 01086 01087 Tag* tag; 01088 CmtSystem::cmt_string_vector words; 01089 01090 cmt_string tags = CmtSystem::getenv ("CMTEXTRATAGS"); 01091 01092 CmtSystem::split (tags, " \t,", words); 01093 01094 Cmt::m_extra_tags = ","; 01095 01096 for (int i = 0; i < words.size (); i++) 01097 { 01098 const cmt_string& a = words[i]; 01099 01100 Cmt::m_extra_tags += a; 01101 Cmt::m_extra_tags += ","; 01102 01103 tag = Tag::add (a, PriorityUserTag, s, use); 01104 01105 tag->mark (); 01106 } 01107 } 01108 } |
|
? |
Definition at line 9051 of file cmt_parser.cxx. References AccessMode, and m_current_access. Referenced by SyntaxParser::parse_requirements(), and SyntaxParser::parse_requirements_text(). 09052 { 09053 m_current_access = mode; 09054 } |
|
? |
Definition at line 9057 of file cmt_parser.cxx. References m_current_build_strategy. Referenced by KwdBuildStrategy::action(). 09058 { 09059 m_current_build_strategy = strategy; 09060 } |
|
? |
Definition at line 9063 of file cmt_parser.cxx. References m_current_setup_strategy. Referenced by KwdSetupStrategy::action(). 09064 { 09065 m_current_setup_strategy = strategy; 09066 } |
|
? |
Definition at line 9069 of file cmt_parser.cxx. References CmtScopeFilteringMode, and m_scope_filtering_mode. Referenced by parse_arguments(). 09070 { 09071 m_scope_filtering_mode = mode; 09072 } |
|
? |
Definition at line 9075 of file cmt_parser.cxx. References CmtPathPattern::apply_all(), CmtSystem::basename(), Symbol::build_macro_value(), cmt_style, Constituent::constituents(), Use::current(), CmtSystem::dirname(), CmtSystem::file_separator(), StandardMacroBuilder::fill_for_all_constituents(), StandardMacroBuilder::fill_for_branches(), StandardMacroBuilder::fill_for_current_package(), StandardMacroBuilder::fill_for_fincludes(), StandardMacroBuilder::fill_for_includes(), StandardMacroBuilder::fill_for_project(), StandardMacroBuilder::fill_for_use_cflags(), StandardMacroBuilder::fill_for_use_cppflags(), StandardMacroBuilder::fill_for_use_fflags(), StandardMacroBuilder::fill_for_use_fincludes(), StandardMacroBuilder::fill_for_use_includes(), StandardMacroBuilder::fill_for_use_libraries(), StandardMacroBuilder::fill_for_use_linkopts(), StandardMacroBuilder::fill_for_use_pp_cflags(), StandardMacroBuilder::fill_for_use_pp_cppflags(), StandardMacroBuilder::fill_for_use_pp_fflags(), StandardMacroBuilder::fill_for_use_requirements(), StandardMacroBuilder::fill_for_use_stamps(), Symbol::find(), get_build_strategy(), Use::get_ordered_uses(), Use::get_package_name(), CmtSystem::getenv(), Constituent::group, Group::groups(), InstallAreaMask, CmtInstallAreaMgr::instance(), Symbol::is_selected(), CmtSystem::is_version_directory(), m_current_dir, m_current_package, m_current_prefix, m_current_style, m_current_tag, m_current_version, m_standard_macros_done, mgr_style, Group::name(), Constituent::name, no_version_style, none_style, SyntaxParser::parse_requirements_line(), CmtSystem::pwd(), CmtInstallAreaMgr::setup(), CmtInstallAreaMgr::setup_current_installarea(), cmt_vector< Group >::size(), cmt_vector< Constituent >::size(), CmtSystem::split(), CmtSystem::test_file(), CmtSystem::testenv(), and WithInstallArea. Referenced by build_msdev_file(), build_vsnet_file(), do_build_constituent_makefile(), do_build_constituents_makefile(), do_build_dependencies(), do_build_library_links(), do_build_make_setup(), do_build_msdev(), do_build_os9_makefile(), do_build_prototype(), do_build_readme(), do_build_triggers(), do_build_vsnet(), do_build_windefs(), do_do(), do_expand_model(), do_filter(), do_lock(), do_remove_library_links(), do_run(), do_show_action(), do_show_all_tags(), do_show_cmtpath_patterns(), do_show_constituent(), do_show_constituent_names(), do_show_constituents(), do_show_cycles(), do_show_include_dirs(), do_show_language(), do_show_languages(), do_show_macro(), do_show_tags(), do_unlock(), print(), print_clean(), print_macros(), and print_symbol_names(). 09076 { 09077 if (m_standard_macros_done) return; 09078 09079 m_standard_macros_done = true; 09080 09081 int number; 09082 cmt_string temp; 09083 Use::UsePtrVector& Uses = Use::get_ordered_uses (); 09084 Use& current_use = Use::current (); 09085 09086 cmt_string fs = CmtSystem::file_separator (); 09087 09088 cmt_string pwd = CmtSystem::pwd (); 09089 09090 if (CmtSystem::test_file ("../cmt/requirements")) m_current_style = cmt_style; 09091 else if (CmtSystem::test_file ("../mgr/requirements")) m_current_style = mgr_style; 09092 else m_current_style = none_style; 09093 09094 { 09095 cmt_string v; 09096 CmtSystem::dirname (pwd, v); 09097 CmtSystem::basename (v, v); 09098 if (!CmtSystem::is_version_directory (v)) 09099 { 09100 m_current_style = no_version_style; 09101 } 09102 } 09103 09104 // Prepare computation of the best form for relative path from current directory 09105 // to package directories. 09106 CmtSystem::cmt_string_vector vb; 09107 CmtSystem::split (pwd, fs, vb); 09108 09109 09114 bool tag_debug = CmtSystem::testenv ("TAGDEBUG"); 09115 09116 if (tag_debug) cerr << "set_standard_macro0> current_tag=" << m_current_tag << endl; 09117 09118 if (m_current_tag != "") 09119 { 09120 // this is when some -tag= argument was used. 09121 if (tag_debug) cerr << "set_standard_macro0.1> current_tag=" << m_current_tag << endl; 09122 } 09123 else if (Symbol::is_selected ("CMTCONFIG")) 09124 { 09125 // This is when CMTCONFIG has been set from some requirements file 09126 Symbol* macro = Symbol::find ("CMTCONFIG"); 09127 if (macro != 0) 09128 { 09129 m_current_tag = macro->build_macro_value (); 09130 if (tag_debug) cerr << "set_standard_macro1> current_tag=" << m_current_tag << endl; 09131 } 09132 } 09133 else 09134 { 09135 // this is when no -tag= argument was used. 09136 if (tag_debug) cerr << "set_standard_macro(before2)> current_tag=" << m_current_tag << endl; 09137 if (current_use.get_package_name () == "CMT") 09138 { 09139 m_current_tag = CmtSystem::getenv ("CMTBIN"); 09140 } 09141 else 09142 { 09143 m_current_tag = CmtSystem::getenv ("CMTCONFIG"); 09144 } 09145 09146 if (tag_debug) cerr << "set_standard_macro2> current_tag=" << m_current_tag << endl; 09147 } 09148 09149 if (m_debug) 09150 { 09151 cout << "set_standard_macro3>" << endl; 09152 } 09153 09154 StandardMacroBuilder builder (m_current_tag, 09155 m_current_package, 09156 m_current_version, 09157 m_current_prefix, 09158 m_current_style); 09159 09160 09161 // 09162 // Definitions for installation area mechanisms 09163 // 09164 if ((get_build_strategy () & InstallAreaMask) == WithInstallArea) 09165 { 09166 CmtInstallAreaMgr& ia_mgr = CmtInstallAreaMgr::instance (); 09167 09168 //cout << "#IA6>" << endl; 09169 09170 ia_mgr.setup_current_installarea (); 09171 } 09172 09173 builder.fill_for_current_package (m_current_dir); 09174 09175 builder.fill_for_branches (); 09176 builder.fill_for_project (); 09177 builder.fill_for_use_requirements (); 09178 builder.fill_for_use_includes (); 09179 builder.fill_for_use_fincludes (); 09180 builder.fill_for_use_stamps (); 09181 builder.fill_for_use_cflags (); 09182 builder.fill_for_use_pp_cflags (); 09183 builder.fill_for_use_cppflags (); 09184 builder.fill_for_use_pp_cppflags (); 09185 builder.fill_for_use_fflags (); 09186 builder.fill_for_use_pp_fflags (); 09187 builder.fill_for_use_linkopts (); 09188 builder.fill_for_use_libraries (); 09189 builder.fill_for_includes (); 09190 builder.fill_for_fincludes (); 09191 builder.fill_for_all_constituents (); 09192 09197 const Constituent::ConstituentVector& constituents = 09198 Constituent::constituents (); 09199 09200 if (!Symbol::is_selected ("constituents")) 09201 { 09202 temp = "macro_append constituents \" "; 09203 09204 for (number = 0; number < constituents.size (); number++) 09205 { 09206 const Constituent& constituent = constituents[number]; 09207 09208 if (constituent.group == 0) 09209 { 09210 temp += constituent.name; 09211 temp += " "; 09212 } 09213 } 09214 09215 temp += "\""; 09216 09217 SyntaxParser::parse_requirements_line (temp, ¤t_use); 09218 } 09219 09220 SyntaxParser::parse_requirements_line ("macro_append all_constituents \" $(constituents)\"", 09221 ¤t_use); 09222 09223 if (!Symbol::is_selected ("constituentsclean")) 09224 { 09225 temp = "macro_append constituentsclean \" "; 09226 09227 for (number = constituents.size () - 1; number >= 0 ; number--) 09228 { 09229 const Constituent& constituent = constituents[number]; 09230 09231 if (constituent.group == 0) 09232 { 09233 temp += constituent.name; 09234 temp += "clean "; 09235 } 09236 } 09237 09238 temp += "\""; 09239 09240 SyntaxParser::parse_requirements_line (temp, ¤t_use); 09241 } 09242 09243 SyntaxParser::parse_requirements_line ("macro_append all_constituentsclean \" $(constituentsclean)\"", 09244 ¤t_use); 09245 09246 const Group::GroupVector& groups = Group::groups (); 09247 09248 for (number = 0; number < groups.size (); number++) 09249 { 09250 const Group& group = groups[number]; 09251 09252 temp = "macro_append "; 09253 temp += group.name (); 09254 temp += "_constituents \" "; 09255 09256 int i; 09257 09258 for (i = 0; i < constituents.size (); i++) 09259 { 09260 const Constituent& constituent = constituents[i]; 09261 09262 if ((constituent.group != 0) && 09263 (group.name () == constituent.group->name ())) 09264 { 09265 temp += constituent.name; 09266 temp += " "; 09267 } 09268 } 09269 09270 temp += "\""; 09271 09272 SyntaxParser::parse_requirements_line (temp, ¤t_use); 09273 09274 temp = "macro_append "; 09275 temp += group.name (); 09276 temp += "_constituentsclean \" "; 09277 09278 for (i = constituents.size () - 1; i >= 0 ; i--) 09279 { 09280 const Constituent& constituent = constituents[i]; 09281 09282 if ((constituent.group != 0) && 09283 (group.name () == constituent.group->name ())) 09284 { 09285 temp += constituent.name; 09286 temp += "clean "; 09287 } 09288 } 09289 09290 temp += "\""; 09291 09292 SyntaxParser::parse_requirements_line (temp, ¤t_use); 09293 } 09294 09295 // 09296 // Definitions for installation area mechanisms. Apply all cmtpath patterns 09297 // 09298 if ((get_build_strategy () & InstallAreaMask) == WithInstallArea) 09299 { 09300 CmtInstallAreaMgr& ia_mgr = CmtInstallAreaMgr::instance (); 09301 09302 //cout << "#IA7>" << endl; 09303 09304 ia_mgr.setup (); 09305 } 09306 09307 CmtPathPattern::apply_all (); 09308 } |
|
? |
Macros implied or required to manage constituents. Definition at line 9311 of file cmt_parser.cxx. References Use::add(), m_cmt_version, m_current_package, m_debug, m_default_path, m_recursive, and cmt_string::size(). Referenced by load(), and parser(). 09312 { 09313 UseRef use; 09314 bool recursive_copy = m_recursive; 09315 bool debug_copy = m_debug; 09316 09317 if (m_default_path.size () <= 0) return; 09318 if (m_current_package == "CMT") return; 09319 09320 m_recursive = true; 09321 m_debug = false; 09322 use = Use::add (m_default_path, "CMT", m_cmt_version, "", "", 0); 09323 m_recursive = recursive_copy; 09324 m_debug = debug_copy; 09325 } |
|
? |
Definition at line 9328 of file cmt_parser.cxx. References CmtSystem::get_home_package(), m_cmt_home, and use_special_requirements(). Referenced by parser(). 09329 { 09330 use_special_requirements (m_cmt_home, 09331 CmtSystem::get_home_package (), 09332 "requirements"); 09333 } |
|
? |
Definition at line 9344 of file cmt_parser.cxx. References Use::add(), CmtSystem::file_separator(), m_cmt_user_context, m_current_package, m_default_path, m_recursive, SyntaxParser::parse_requirements(), and cmt_string::size(). Referenced by use_home_requirements(), and use_user_context_requirements(). 09347 { 09348 if (path == "") 09349 { 09350 return; 09351 } 09352 09353 UseRef use; 09354 bool recursive_copy = m_recursive; 09355 09356 if (m_default_path.size () <= 0) return; 09357 if (m_current_package == "CMT") return; 09358 09359 m_recursive = true; 09360 09361 use = Use::add (path, name, "v0", "", "", 0); 09362 09363 cmt_string f = m_cmt_user_context; 09364 f += CmtSystem::file_separator (); 09365 f += file_name; 09366 SyntaxParser::parse_requirements (f, use); 09367 09368 m_recursive = recursive_copy; 09369 } |
|
? |
Definition at line 9336 of file cmt_parser.cxx. References CmtSystem::get_user_context_package(), m_cmt_user_context, and use_special_requirements(). Referenced by parser(). 09337 { 09338 use_special_requirements (m_cmt_user_context, 09339 CmtSystem::get_user_context_package (), 09340 "requirements"); 09341 } |
|
? |
Definition at line 9372 of file cmt_parser.cxx. References cmt_string::erase(), and cmt_vector< cmt_string >::size(). 09375 { 09376 result.erase (0); 09377 09378 for (int i = 0; i < v.size (); i++) 09379 { 09380 const cmt_string& s = v[i]; 09381 if (s == "") continue; 09382 09383 if (i > 0) result += separator; 09384 result += v[i]; 09385 } 09386 } |
|
? |
Definition at line 9389 of file cmt_parser.cxx. Referenced by PathBuilder::build(), and PathBuilder::clean(). 09390 { 09391 cmt_string result; 09392 09393 vector_to_string (v, " ", result); 09394 09395 return (result); 09396 } |
|
? |
All Attributes are private. Definition at line 42 of file cmt_parser.cxx. Referenced by clear(), configure_cmt_path(), configure_tags(), do_set_versions(), do_show_action(), do_show_macro(), load(), parse_arguments(), parser(), print_macros(), and print_symbol_names(). |
|
? |
Definition at line 44 of file cmt_parser.cxx. Referenced by clear(), and parse_arguments(). |
|
? |
Definition at line 45 of file cmt_parser.cxx. Referenced by clear(), configure_config_tag(), do_config(), and load(). |
|
? |
Definition at line 47 of file cmt_parser.cxx. Referenced by configure_cmt_path(), configure_home(), parse_arguments(), and use_home_requirements(). |
|
? |
Definition at line 46 of file cmt_parser.cxx. Referenced by clear(), configure_default_path(), do_build_CMT_pacman(), install_cleanup_scripts(), install_setup_scripts(), install_test_cleanup_scripts(), and install_test_setup_scripts(). |
|
? |
Definition at line 49 of file cmt_parser.cxx. Referenced by configure_site_tag(). |
|
? |
Definition at line 48 of file cmt_parser.cxx. Referenced by configure_cmt_path(), configure_user_context(), parse_arguments(), use_special_requirements(), and use_user_context_requirements(). |
|
? |
Definition at line 50 of file cmt_parser.cxx. Referenced by clear(), configure(), configure_current_dir(), configure_default_path(), do_config(), and use_cmt(). |
|
? |
Definition at line 72 of file cmt_parser.cxx. Referenced by configure(), and parser(). |
|
? |
Definition at line 62 of file cmt_parser.cxx. Referenced by clear(), load(), parse_arguments(), parser(), and set_current_access(). |
|
? |
Definition at line 51 of file cmt_parser.cxx. Referenced by clear(), do_show_strategies(), and set_current_build_strategy(). |
|
? |
Definition at line 59 of file cmt_parser.cxx. Referenced by clear(), configure(), and configure_current_cmtpath(). |
|
? |
Definition at line 56 of file cmt_parser.cxx. Referenced by clear(), configure(), configure_current_package(), load(), and reach_current_package(). |
|
? |
Definition at line 54 of file cmt_parser.cxx. Referenced by clear(), configure(), configure_current_dir(), configure_current_package(), do_config(), do_show_pwd(), load(), and set_standard_macros(). |
|
? |
Definition at line 60 of file cmt_parser.cxx. Referenced by clear(), configure(), and configure_current_cmtpath(). |
|
? |
Definition at line 55 of file cmt_parser.cxx. Referenced by clear(), configure(), configure_current_package(), do_build_constituents_makefile(), do_build_make_setup(), do_config(), do_remove(), install_cleanup_scripts(), install_setup_scripts(), load(), parse_arguments(), parser(), print_clean(), reach_current_package(), set_standard_macros(), use_cmt(), and use_special_requirements(). |
|
? |
Definition at line 57 of file cmt_parser.cxx. Referenced by clear(), configure(), configure_current_package(), do_config(), install_cleanup_scripts(), install_setup_scripts(), install_test_cleanup_scripts(), install_test_setup_scripts(), load(), parse_arguments(), parser(), and reach_current_package(). |
|
? |
Definition at line 58 of file cmt_parser.cxx. Referenced by clear(), configure(), configure_current_package(), load(), print_clean(), reach_current_package(), and set_standard_macros(). |
|
? |
Definition at line 52 of file cmt_parser.cxx. Referenced by clear(), parse_arguments(), and set_current_setup_strategy(). |
|
? |
Definition at line 64 of file cmt_parser.cxx. Referenced by configure_current_structuring_style(), and parse_arguments(). |
|
? |
Definition at line 63 of file cmt_parser.cxx. Referenced by configure(), configure_current_package(), do_config(), load(), reach_current_package(), and set_standard_macros(). |
|
? |
Definition at line 66 of file cmt_parser.cxx. Referenced by clear(), configure(), configure_tags(), load(), parse_arguments(), parser(), print(), reach_current_package(), and set_standard_macros(). |
|
? |
Definition at line 67 of file cmt_parser.cxx. Referenced by clear(), and parse_arguments(). |
|
? |
Definition at line 68 of file cmt_parser.cxx. Referenced by clear(), configure(), configure_current_package(), do_config(), do_show_version(), install_cleanup_scripts(), install_setup_scripts(), install_test_cleanup_scripts(), load(), parse_arguments(), parser(), reach_current_package(), and set_standard_macros(). |
|
? |
Definition at line 74 of file cmt_parser.cxx. Referenced by configure(), and use_cmt(). |
|
? |
Definition at line 76 of file cmt_parser.cxx. Referenced by clear(), configure(), configure_current_dir(), configure_default_path(), do_config(), load(), parse_arguments(), use_cmt(), and use_special_requirements(). |
|
? |
Definition at line 70 of file cmt_parser.cxx. Referenced by parse_arguments(), print(), and restore_all_tags(). |
|
? |
Definition at line 43 of file cmt_parser.cxx. Referenced by clear(), parse_arguments(), and parser(). |
|
? |
Definition at line 77 of file cmt_parser.cxx. Referenced by clear(), do_broadcast(), do_config(), do_remove_library_links(), do_show_tags(), load(), parse_arguments(), parser(), and reach_current_package(). |
|
? |
Definition at line 78 of file cmt_parser.cxx. Referenced by clear(), load(), parser(), use_cmt(), and use_special_requirements(). |
|
? |
Definition at line 79 of file cmt_parser.cxx. Referenced by clear(), get_scope_filtering_mode(), parse_arguments(), and set_scope_filtering_mode(). |
|
? |
Definition at line 80 of file cmt_parser.cxx. Referenced by build_makefile(), build_msdev_file(), build_vsnet_file(), clear(), and parse_arguments(). |
|
? |
Definition at line 81 of file cmt_parser.cxx. Referenced by clear(), and set_standard_macros(). |