#include
Collaboration diagram for Cmt:
Static Public Methods |
|
void? | build_config (const cmt_string& prefix, cmt_string& config) |
? |
Append "CONFIG" to the prefix. More... |
void? | build_makefile (const cmt_string& target) |
void? | build_msdev_file (const cmt_string& target) |
void? | build_vsnet_file (const cmt_string& target) |
? |
Visual Studio.net Support. More... |
bool? | build_nmake () |
void? | build_OS9_makefile (const cmt_string& target) |
void? | build_prefix (const cmt_string& package, cmt_string& prefix) |
? |
Convert a package name to its upper case copy. More... |
void? | clear () |
void? | configure () |
void? | configure_cmt_path (Use* use) |
void? | configure_config_tag () |
void? | configure_current_cmtpath () |
void? | configure_current_dir () |
void? | configure_current_package () |
void? | configure_current_structuring_style () |
void? | configure_default_path () |
void? | configure_home (Use* use) |
void? | configure_user_context (Use* use) |
void? | configure_hosttype_tag () |
void? | configure_site_tag (Use* use) |
void? | configure_tags (Use* use) |
void? | configure_uname_tag () |
void? | configure_version_tag () |
void? | do_awk (const CmtSystem::cmt_string_vector& arguments) |
void? | do_broadcast (const CmtSystem::cmt_string_vector& arguments, int argc, char* argv[]) |
void? | do_build_constituent_makefile (const CmtSystem::cmt_string_vector& arguments, int argc, char* argv[]) |
void? | do_build_constituents_makefile (const CmtSystem::cmt_string_vector& arguments, int argc, char* argv[]) |
void? | do_build_dependencies (const CmtSystem::cmt_string_vector& arguments, int argc, char* argv[]) |
void? | do_build_library_links () |
void? | do_build_make_setup () |
? |
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. More... |
void? | do_build_msdev (const CmtSystem::cmt_string_vector& arguments) |
void? | do_build_vsnet (const CmtSystem::cmt_string_vector& arguments) |
void? | do_build_os9_makefile (const CmtSystem::cmt_string_vector& arguments) |
void? | do_build_prototype (const CmtSystem::cmt_string_vector& arguments) |
void? | do_build_readme (const CmtSystem::cmt_string_vector& arguments) |
void? | do_build_tag_makefile () |
void? | do_build_temporary_name () |
void? | do_build_triggers (const CmtSystem::cmt_string_vector& arguments) |
void? | do_build_windefs (const CmtSystem::cmt_string_vector& arguments) |
void? | do_check_configuration () |
void? | do_check_files (const CmtSystem::cmt_string_vector& arguments) |
void? | do_check_version (const CmtSystem::cmt_string_vector& arguments) |
void? | do_checkout (const CmtSystem::cmt_string_vector& arguments) |
void? | do_cleanup (PrintMode& mode) |
void? | do_config () |
void? | do_create (const CmtSystem::cmt_string_vector& arguments) |
void? | do_cvsbranches (const CmtSystem::cmt_string_vector& arguments) |
void? | do_cvssubpackages (const CmtSystem::cmt_string_vector& arguments) |
void? | do_cvstags (const CmtSystem::cmt_string_vector& arguments) |
void? | do_expand_model (const CmtSystem::cmt_string_vector& arguments) |
void? | do_filter (const CmtSystem::cmt_string_vector& arguments) |
? |
Handle free filtering of text files containing or ${xxx} patterns. More... |
void? | do_help (ActionType help_action = action_none) |
void? | do_lock (const cmt_string& package, const cmt_string& version, const cmt_string& path) |
void? | do_remove (const cmt_string& package, const cmt_string& version, const cmt_string& path) |
void? | do_remove_library_links () |
void? | do_run (const CmtSystem::cmt_string_vector& arguments) |
? |
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. More... |
void? | do_run_sequence (const CmtSystem::cmt_string_vector& arguments) |
void? | do_set_version (const CmtSystem::cmt_string_vector& arguments) |
void? | do_set_versions (const CmtSystem::cmt_string_vector& arguments) |
void? | do_setup (PrintMode& mode) |
void? | do_show_all_tags () |
void? | do_show_applied_patterns () |
void? | do_show_author () |
void? | do_show_branches (PrintMode& mode) |
void? | do_show_clients (const CmtSystem::cmt_string_vector& arguments) |
void? | do_show_cmtpath_patterns () |
void? | do_show_constituent (const CmtSystem::cmt_string_vector& arguments) |
void? | do_show_constituent_names () |
void? | do_show_constituents () |
void? | do_show_cycles () |
void? | do_show_fragment (const CmtSystem::cmt_string_vector& arguments) |
void? | do_show_fragments () |
void? | do_show_groups () |
void? | do_show_include_dirs () |
void? | do_show_language (const CmtSystem::cmt_string_vector& arguments) |
void? | do_show_languages () |
void? | do_show_macro (const CmtSystem::cmt_string_vector& arguments, PrintMode& mode) |
void? | do_show_macro_names (const CmtSystem::cmt_string_vector& arguments, PrintMode& mode) |
void? | do_show_macro_value (const CmtSystem::cmt_string_vector& arguments, PrintMode& mode) |
void? | do_show_macros (const CmtSystem::cmt_string_vector& arguments, PrintMode& mode) |
void? | do_show_manager () |
void? | do_show_packages (const CmtSystem::cmt_string_vector& arguments) |
void? | do_show_path () |
void? | do_show_pattern (const CmtSystem::cmt_string_vector& arguments) |
void? | do_show_pattern_names () |
void? | do_show_patterns () |
void? | do_show_projects () |
void? | do_show_pwd () |
void? | do_show_setup () |
void? | do_show_set (const CmtSystem::cmt_string_vector& arguments, PrintMode& mode) |
void? | do_show_set_names (const CmtSystem::cmt_string_vector& arguments, PrintMode& mode) |
void? | do_show_set_value (const CmtSystem::cmt_string_vector& arguments, PrintMode& mode) |
void? | do_show_sets (const CmtSystem::cmt_string_vector& arguments, PrintMode& mode) |
void? | do_show_strategies () |
void? | do_show_tags () |
void? | do_show_use_paths (const CmtSystem::cmt_string_vector& arguments) |
void? | do_show_uses () |
void? | do_show_version () |
void? | do_show_versions (const CmtSystem::cmt_string_vector& arguments) |
void? | do_show_system () |
void? | do_unlock (const cmt_string& package, const cmt_string& version, const cmt_string& path) |
void? | do_version () |
const cmt_string&? | filter_dir (const cmt_string& dir) |
ActionType? | get_action () |
const CmtSystem::cmt_string_vector&? | get_cmt_path () |
const CmtSystem::cmt_string_vector&? | get_cmt_path_sources () |
const cmt_string&? | get_cmt_home () |
const cmt_string&? | get_cmt_user_context () |
const cmt_string&? | get_current_dir () |
const cmt_string&? | get_current_package () |
const cmt_string&? | get_current_cmtpath () |
const cmt_string&? | get_current_offset () |
AccessMode? | get_current_access () |
int? | get_current_build_strategy () |
int? | get_current_setup_strategy () |
VersionStrategy? | get_current_strategy () |
CmtStructuringStyle? | get_current_structuring_style () |
const cmt_string&? | get_current_version () |
const cmt_string&? | get_current_target () |
bool? | get_debug () |
bool? | get_quiet () |
bool? | get_recursive () |
ScopeType? | get_scope () |
CmtScopeFilteringMode? | get_scope_filtering_mode () |
void? | install_cleanup_scripts () |
void? | install_setup_scripts () |
void? | install_test_cleanup_scripts () |
void? | install_test_setup_scripts () |
bool? | load (const cmt_string& path, const cmt_string& package, const cmt_string& version, const cmt_string& tag_name = "") |
? |
load is only called from the Windows GUI which pretends to access directly the internal data model. More... |
bool? | need_prototypes () |
? |
See reach_current_package for an explanation of this call. More... |
void? | parse_arguments (int argc, char* argv[], CmtSystem::cmt_string_vector& arguments, cmt_string& extra_line, cmt_string& extra_file, PrintMode& mode) |
int? | parser (const cmt_string& command_line) |
int? | parser (int argc, char* argv[]) |
void? | print (PrintMode mode) |
? |
Format as one single line a set of 'setenv' statements joined with semi-colons to form one shell command. More... |
void? | print_clean (PrintMode mode) |
? |
Format as one single line a set of 'unsetenv' statements joined with semi-colons to form one shell command. More... |
void? | print_context (Use& use, PrintMode mode, const cmt_string& tag) |
void? | print_macros (PrintMode mode, const cmt_string& pattern = "") |
? |
Format a set of make macro definitions (one per line) Each macro value is provided enclosed in single quotes. More... |
void? | print_symbol_names (PrintMode mode, const cmt_string& pattern = "") |
? |
Format a set of make macro definitions (one per line) Each macro value is provided enclosed in single quotes. More... |
void? | print_tabs (int tabs) |
int? | reach_current_package () |
void? | restore_all_tags (Use* use) |
void? | set_current_access (AccessMode mode) |
void? | set_current_build_strategy (int strategy) |
void? | set_current_setup_strategy (int strategy) |
void? | set_current_strategy (VersionStrategy strategy) |
void? | set_scope (ScopeType scope) |
void? | set_scope_filtering_mode (CmtScopeFilteringMode mode) |
void? | set_standard_macros () |
void? | use_cmt () |
? |
Macros implied or required to manage constituents. More... |
void? | use_home_requirements () |
void? | use_user_context_requirements () |
cmt_string? | vector_to_string (const CmtSystem::cmt_string_vector& v) |
void? | vector_to_string (const CmtSystem::cmt_string_vector& v, const cmt_string& separator, cmt_string& result) |
Static Private Attributes |
|
ActionType? | m_action |
? |
All Attributes are private. More... |
ActionType? | m_help_action |
bool? | m_build_nmake |
cmt_string? | m_cmt_config |
CmtSystem::cmt_string_vector? | m_cmt_path |
CmtSystem::cmt_string_vector? | m_cmt_path_pwds |
CmtSystem::cmt_string_vector? | m_cmt_path_sources |
cmt_string? | m_cmt_root |
cmt_string? | m_cmt_home |
cmt_string? | m_cmt_user_context |
cmt_string? | m_cmt_site |
cmt_string? | m_cmt_version |
int? | m_current_build_strategy = DefaultBuildStrategy |
int? | m_current_setup_strategy = DefaultSetupStrategy |
cmt_string? | m_current_dir |
cmt_string? | m_current_package |
cmt_string? | m_current_config |
cmt_string? | m_current_path |
cmt_string? | m_current_prefix |
cmt_string? | m_current_cmtpath |
cmt_string? | m_current_offset |
AccessMode? | m_current_access = UserMode |
VersionStrategy? | m_current_strategy = BestFit |
CmtDirStyle? | m_current_style = cmt_style |
CmtStructuringStyle? | m_current_structuring_style = with_version_directory |
cmt_string? | m_current_tag |
cmt_string? | m_current_target |
cmt_string? | m_current_version |
cmt_string? | m_extra_tags |
cmt_string? | m_configure_error |
bool? | m_debug |
cmt_string? | m_default_path |
bool? | m_quiet |
bool? | m_recursive |
ScopeType? | m_scope |
CmtScopeFilteringMode? | m_scope_filtering_mode |
bool? | m_simulation |
bool? | m_standard_macros_done |
|
? |
Definition at line 807 of file cmt_parser.cxx. Referenced by do_build_os9_makefile(). 00808 { 00809 build_makefile (target); 00810 } |
|
? |
Append "CONFIG" to the prefix. Definition at line 708 of file cmt_parser.cxx. Referenced by configure_current_package(), and load(). 00710 { 00711 /* 00712 Building the config from |
|
? |
Definition at line 720 of file cmt_parser.cxx. Referenced by build_OS9_makefile(). 00721 { 00722 Constituent* constituent = 0; 00723 00724 if (target.size () > 0) 00725 { 00726 /* 00727 Do genmake for one specific target. 00728 */ 00729 constituent = Constituent::find (target); 00730 if (constituent != 0) 00731 { 00732 constituent->build_makefile (m_simulation); 00733 } 00734 } 00735 else 00736 { 00737 /* 00738 Do genmake for all possible targets. 00739 */ 00740 Constituent::build_all_makefiles (m_simulation); 00741 } 00742 } |
|
? |
Definition at line 745 of file cmt_parser.cxx. Referenced by do_build_msdev(). 00746 { 00747 Constituent* constituent = 0; 00748 00749 set_standard_macros (); 00750 00751 if (target != "") 00752 { 00753 /* 00754 Do genmsdev for one specific target. 00755 */ 00756 constituent = Constituent::find (target); 00757 if (constituent != 0) 00758 { 00759 constituent->build_msdev_file (m_simulation); 00760 } 00761 } 00762 else 00763 { 00764 /* 00765 Do genmsdev for all possible targets. 00766 */ 00767 Constituent::build_all_msdev_files (m_simulation); 00768 } 00769 } |
|
? |
Definition at line 801 of file cmt_parser.cxx. Referenced by LibraryGenerator::analyze_file(), DependencyGenerator::build(), ConstituentsMakefileGenerator::build(), MakeSetupGenerator::build(), Fragment::locate(), and CmtGenerator::prepare_output(). 00802 { 00803 return (m_build_nmake); 00804 } |
|
? |
Convert a package name to its upper case copy. Definition at line 815 of file cmt_parser.cxx. Referenced by configure_current_package(), load(), and Use::set(). 00816 { 00817 int pos; 00818 char c; 00819 00820 /* 00821 Building the prefix from |
|
? |
Visual Studio.net Support. Definition at line 774 of file cmt_parser.cxx. Referenced by do_build_vsnet(). 00775 { 00776 Constituent* constituent = 0; 00777 00778 set_standard_macros (); 00779 00780 if (target != "") 00781 { 00782 /* 00783 Do genvsnet for one specific target. 00784 */ 00785 constituent = Constituent::find (target); 00786 if (constituent != 0) 00787 { 00788 constituent->build_vsnet_file (m_simulation); 00789 } 00790 } 00791 else 00792 { 00793 /* 00794 Do genvsnet for all possible targets. 00795 */ 00796 Constituent::build_all_vsnet_files (m_simulation); 00797 } 00798 } |
|
? |
Definition at line 834 of file cmt_parser.cxx. Referenced by do_show_clients(), load(), and parser(). 00835 { 00836 m_action = action_none; 00837 m_help_action = action_none; 00838 m_build_nmake = false; 00839 m_cmt_config = ""; 00840 m_cmt_path.clear (); 00841 m_cmt_path_pwds.clear (); 00842 m_cmt_path_sources.clear (); 00843 m_cmt_root = ""; 00844 m_cmt_version = ""; 00845 m_current_build_strategy = DefaultBuildStrategy; 00846 m_current_setup_strategy = DefaultSetupStrategy; 00847 m_current_dir = ""; 00848 m_current_package = ""; 00849 m_current_config = ""; 00850 m_current_path = ""; 00851 m_current_prefix = ""; 00852 m_current_cmtpath = ""; 00853 m_current_offset = ""; 00854 00855 m_current_access = DeveloperMode; 00856 m_current_strategy = BestFit; 00857 00858 m_current_tag = ""; 00859 m_current_target = ""; 00860 m_current_version = ""; 00861 m_default_path = ""; 00862 m_quiet = false; 00863 m_recursive = false; 00864 00865 m_scope = ScopePublic; 00866 m_scope_filtering_mode = default_filtering_mode; 00867 m_simulation = false; 00868 00869 m_standard_macros_done = false; 00870 00871 Database::clear (); 00872 Include::clear_all (); 00873 Script::clear_all (); 00874 CmtError::clear (); 00875 } |
|
? |
Definition at line 878 of file cmt_parser.cxx. Referenced by do_show_clients(), load(), and parser(). 00879 { 00880 static bool configured = false; 00881 00882 if (configured) return; 00883 00884 m_cmt_version = ""; 00885 m_current_dir = ""; 00886 m_current_package = ""; 00887 m_current_prefix = ""; 00888 m_current_config = ""; 00889 m_current_path = ""; 00890 m_current_cmtpath = ""; 00891 m_current_offset = ""; 00892 00893 m_current_tag = ""; 00894 m_current_version = ""; 00895 00896 m_configure_error = ""; 00897 00898 m_debug = false; 00899 if (getenv ("CMTDEBUG") != 0) m_debug = true; 00900 00901 m_default_path = ""; 00902 00903 configure_default_path (); 00904 configure_version_tag (); 00905 configure_uname_tag (); 00906 configure_hosttype_tag (); 00907 configure_config_tag (); 00908 configure_site_tag (0); 00909 configure_cmt_path (0); 00910 configure_current_dir (); 00911 configure_current_package (); 00912 configure_current_structuring_style (); 00913 configure_home (0); 00914 configure_user_context (0); 00915 00916 Use& use = Use::current(); 00917 00918 use.set (m_current_package, 00919 m_current_version, 00920 m_current_path, 00921 "", 00922 ""); 00923 00924 use.style = m_current_style; 00925 00926 use.change_path (m_current_path); 00927 00928 if (CmtError::has_pending_error ()) 00929 { 00930 m_configure_error = CmtError::get_last_error (); 00931 } 00932 } |
|
? |
Definition at line 935 of file cmt_parser.cxx. Referenced by Symbol::action(), and configure(). 00936 { 00937 cmt_string s; 00938 00939 Symbol* symbol = Symbol::find ("CMTPATH"); 00940 if (symbol != 0) 00941 { 00942 bool show_set_hidden = false; 00943 00944 if (Cmt::m_action == action_show_set) 00945 { 00946 show_set_hidden = true; 00947 Cmt::m_action = action_none; 00948 } 00949 00950 s = symbol->build_macro_value (); 00951 Symbol::expand (s); 00952 00953 if (show_set_hidden) 00954 { 00955 show_set_hidden = false; 00956 Cmt::m_action = action_show_set; 00957 } 00958 } 00959 00960 CmtSystem::get_cmt_paths (m_cmt_path, 00961 m_cmt_path_pwds, 00962 m_cmt_path_sources, s); 00963 } |
|
? |
Definition at line 966 of file cmt_parser.cxx. Referenced by configure(), and parse_arguments(). 00967 { 00968 m_cmt_config = CmtSystem::get_cmt_config (); 00969 if (m_cmt_config != "") 00970 { 00971 Tag* tag; 00972 00973 tag = Tag::add (m_cmt_config, PriorityConfig, "CMTCONFIG", 0); 00974 tag->mark (); 00975 } 00976 } |
|
? |
Definition at line 979 of file cmt_parser.cxx. Referenced by StandardMacroBuilder::fill_for_branches(). 00980 { 00981 const CmtSystem::cmt_string_vector& cp = Cmt::get_cmt_path (); 00982 00983 Use& current_use = Use::current (); 00984 00985 m_current_cmtpath = ""; 00986 m_current_offset = ""; 00987 00988 int i; 00989 00990 for (i = 0; i < cp.size (); ++i) 00991 { 00992 const cmt_string& p = cp[i]; 00993 00994 if (current_use.path.find (p) == 0) 00995 { 00996 m_current_cmtpath = p; 00997 00998 static const cmt_string empty_string; 00999 static const cmt_string fs = CmtSystem::file_separator (); 01000 01001 m_current_offset = current_use.path; 01002 m_current_offset.replace (p, empty_string); 01003 if (m_current_offset[0] == CmtSystem::file_separator ()) 01004 { 01005 m_current_offset.replace (fs, empty_string); 01006 } 01007 01008 break; 01009 } 01010 } 01011 } |
|
? |
Definition at line 1014 of file cmt_parser.cxx. Referenced by configure(), load(), and reach_current_package(). 01015 { 01016 cmt_string file_name; 01017 01018 /* 01019 Building current_dir : 01020 01021 o we first get the physical value (using getwd) 01022 o then this value is possibly filtered using the 01023 cmt_mount_filter file. 01024 */ 01025 01026 m_current_dir.erase (0); 01027 01028 file_name = m_default_path; 01029 if (file_name != "") 01030 { 01031 file_name += CmtSystem::file_separator (); 01032 file_name += "CMT"; 01033 file_name += CmtSystem::file_separator (); 01034 file_name += m_cmt_version; 01035 file_name += CmtSystem::file_separator (); 01036 file_name += "mgr"; 01037 file_name += CmtSystem::file_separator (); 01038 } 01039 01040 file_name += "cmt_mount_filter"; 01041 01042 m_current_dir = CmtSystem::pwd (); 01043 01044 { 01045 cmt_string text; 01046 cmt_string line; 01047 CmtSystem::cmt_string_vector words; 01048 01049 text.read (file_name); 01050 01051 int pos = 0; 01052 int max_pos = text.size (); 01053 01054 for (pos = 0; pos < max_pos; ) 01055 { 01056 int cr = text.find (pos, "\r\n"); 01057 int nl = text.find (pos, '\n'); 01058 int first = nl; 01059 int length = 1; 01060 01061 if (cr != cmt_string::npos) 01062 { 01063 if (nl == cmt_string::npos) 01064 { 01065 first = cr; 01066 length = 2; 01067 } 01068 else 01069 { 01070 first = (nl < cr) ? nl : cr; 01071 length = (nl < cr) ? 1 : 2; 01072 } 01073 } 01074 01075 if (first == cmt_string::npos) 01076 { 01077 text.substr (pos, line); 01078 pos = max_pos; 01079 } 01080 else if (first > pos) 01081 { 01082 text.substr (pos, first - pos, line); 01083 pos = first + length; 01084 } 01085 else 01086 { 01087 line.erase (0); 01088 pos += length; 01089 } 01090 01091 CmtSystem::split (line, " \t", words); 01092 01093 if (words.size () >= 2) 01094 { 01095 cmt_string& path_name = words[0]; 01096 cmt_string& replacement = words[1]; 01097 01098 if (m_current_dir.find (path_name) != cmt_string::npos) 01099 { 01100 m_current_dir.replace (path_name, replacement); 01101 break; 01102 } 01103 } 01104 } 01105 } 01106 } |
|
? |
Definition at line 1109 of file cmt_parser.cxx. Referenced by configure(), and do_config(). 01110 { 01111 /* 01112 Build current_package and current_prefix. 01113 01114 This is only possible if we are within the cmt/mgr branch of a 01115 standard directory tree (i.e. |
|
? |
Definition at line 1241 of file cmt_parser.cxx. Referenced by configure(). 01242 { 01243 cmt_string s; 01244 01245 s = CmtSystem::getenv ("CMTSTRUCTURINGSTYLE"); 01246 if (s == "without_version_directory") 01247 { 01248 m_current_structuring_style = without_version_directory; 01249 } 01250 } |
|
? |
Definition at line 1253 of file cmt_parser.cxx. Referenced by configure(). 01254 { 01255 m_default_path = CmtSystem::get_cmt_root (); 01256 CmtSystem::get_cmt_version (m_cmt_version); 01257 m_cmt_root = m_default_path; 01258 m_cmt_root += CmtSystem::file_separator (); 01259 m_cmt_root += "CMT"; 01260 m_cmt_root += CmtSystem::file_separator (); 01261 m_cmt_root += m_cmt_version; 01262 } |
|
? |
Definition at line 1265 of file cmt_parser.cxx. Referenced by Symbol::action(), and configure(). 01266 { 01267 m_cmt_home = ""; 01268 01269 Symbol* symbol = Symbol::find ("CMTHOME"); 01270 if (symbol != 0) 01271 { 01272 m_cmt_home = symbol->build_macro_value (); 01273 } 01274 else if (CmtSystem::testenv ("CMTHOME")) 01275 { 01276 m_cmt_home = CmtSystem::getenv ("CMTHOME"); 01277 } 01278 01279 if ((m_cmt_home != "") && !CmtSystem::test_directory (m_cmt_home)) 01280 { 01281 m_cmt_home = ""; 01282 } 01283 } |
|
? |
Definition at line 1307 of file cmt_parser.cxx. Referenced by configure(), load(), and parse_arguments(). 01308 { 01309 cmt_string hosttype; 01310 01311 CmtSystem::get_hosttype (hosttype); 01312 01313 if (hosttype != "") 01314 { 01315 Tag* tag; 01316 01317 tag = Tag::add (hosttype, PriorityUname, "HOSTTYPE", 0); 01318 tag->mark (); 01319 } 01320 } |
|
? |
Definition at line 1323 of file cmt_parser.cxx. Referenced by Symbol::action(), configure(), load(), and parse_arguments(). 01324 { 01325 Symbol* symbol = Symbol::find ("CMTSITE"); 01326 if (symbol != 0) 01327 { 01328 m_cmt_site = symbol->build_macro_value (); 01329 } 01330 else 01331 { 01332 m_cmt_site = CmtSystem::get_cmt_site (); 01333 } 01334 01335 if (m_cmt_site != "") 01336 { 01337 cmt_string s = "CMTSITE"; 01338 01339 if (use != 0) 01340 { 01341 s += " in "; 01342 } 01343 01344 Tag* tag; 01345 01346 tag = Tag::add (m_cmt_site, PrioritySite, s, use); 01347 tag->mark (); 01348 } 01349 } |
|
? |
Definition at line 1395 of file cmt_parser.cxx. Referenced by Symbol::action(), and restore_all_tags(). 01396 { 01397 cmt_string config_tag; 01398 01399 if (m_debug) cout << "configure_tags0> current_tag=" << m_current_tag << endl; 01400 01401 Symbol* symbol = Symbol::find ("CMTCONFIG"); 01402 if (symbol != 0) 01403 { 01404 bool show_set_hidden = false; 01405 01406 if (Cmt::m_action == action_show_set) 01407 { 01408 show_set_hidden = true; 01409 Cmt::m_action = action_none; 01410 } 01411 01412 config_tag = symbol->build_macro_value (); 01413 01414 if (show_set_hidden) 01415 { 01416 show_set_hidden = false; 01417 Cmt::m_action = action_show_set; 01418 } 01419 } 01420 else if (CmtSystem::testenv ("CMTCONFIG")) 01421 { 01422 config_tag = CmtSystem::getenv ("CMTCONFIG"); 01423 } 01424 else if (CmtSystem::testenv ("CMTBIN")) 01425 { 01426 config_tag = CmtSystem::getenv ("CMTBIN"); 01427 } 01428 01429 if (config_tag == "") 01430 { 01431 CmtSystem::get_uname (config_tag); 01432 } 01433 01434 if (m_debug) cout << "configure_tags> current_tag=" << m_current_tag << endl; 01435 01436 cmt_string s = "CMTCONFIG"; 01437 01438 if (use != 0) 01439 { 01440 s += " in "; 01441 } 01442 01443 Tag* tag; 01444 01445 tag = Tag::add (config_tag, PriorityConfig, s, use); 01446 tag->mark (); 01447 01448 //m_current_tag = config_tag; 01449 } |
|
? |
Definition at line 1452 of file cmt_parser.cxx. Referenced by configure(), load(), and parse_arguments(). 01453 { 01454 cmt_string uname; 01455 01456 CmtSystem::get_uname (uname); 01457 01458 if (uname != "") 01459 { 01460 Tag* tag; 01461 01462 tag = Tag::add (uname, PriorityUname, "uname", 0); 01463 tag->mark (); 01464 } 01465 } |
|
? |
Definition at line 1286 of file cmt_parser.cxx. Referenced by Symbol::action(), and configure(). 01287 { 01288 m_cmt_user_context = ""; 01289 01290 Symbol* symbol = Symbol::find ("CMTUSERCONTEXT"); 01291 if (symbol != 0) 01292 { 01293 m_cmt_user_context = symbol->build_macro_value (); 01294 } 01295 else if (CmtSystem::testenv ("CMTUSERCONTEXT")) 01296 { 01297 m_cmt_user_context = CmtSystem::getenv ("CMTUSERCONTEXT"); 01298 } 01299 01300 if ((m_cmt_user_context != "") && !CmtSystem::test_directory (m_cmt_user_context)) 01301 { 01302 m_cmt_user_context = ""; 01303 } 01304 } |
|
? |
Definition at line 1468 of file cmt_parser.cxx. Referenced by configure(), load(), and parse_arguments(). 01469 { 01470 int v = 0; 01471 int r = 0; 01472 int p = 0; 01473 01474 CmtSystem::is_version_directory (CMTVERSION, v, r, p); 01475 01476 Tag* tag; 01477 01478 static char temp[80]; 01479 01480 sprintf (temp, "CMTv%d", v); 01481 01482 tag = Tag::add (temp, PriorityVersion, "CMTVERSION", 0); 01483 tag->mark (); 01484 01485 sprintf (temp, "CMTr%d", r); 01486 01487 tag = Tag::add (temp, PriorityVersion, "CMTVERSION", 0); 01488 tag->mark (); 01489 01490 sprintf (temp, "CMTp%d", p); 01491 01492 tag = Tag::add (temp, PriorityVersion, "CMTVERSION", 0); 01493 tag->mark (); 01494 01495 } |
|
? |
Definition at line 1514 of file cmt_parser.cxx. Referenced by parser(). 01515 { 01516 if (arguments.size () < 1) 01517 { 01518 cout << "> cmt broadcast |
|
? |
Definition at line 1536 of file cmt_parser.cxx. Referenced by do_set_versions(), and parser(). 01539 { 01540 Use::UsePtrVector& Uses = Use::get_ordered_uses (); 01541 01542 CmtSystem::cmt_string_vector uses; 01543 CmtSystem::cmt_string_vector packages; 01544 CmtSystem::cmt_string_vector versions; 01545 CmtSystem::cmt_string_vector path_selections; 01546 CmtSystem::cmt_string_vector selections; 01547 CmtSystem::cmt_string_vector exclusions; 01548 cmt_string begin; 01549 cmt_string command; 01550 bool is_cmt = false; 01551 int first = 0; 01552 int i; 01553 bool ignore_errors = false; 01554 bool all_packages = false; 01555 01556 bool local = true; 01557 01558 for (i = 0; i < arguments.size (); i++) 01559 { 01560 const cmt_string& w = arguments[i]; 01561 01562 if (command == "") 01563 { 01564 if (w.substr (0, 13) == "-all_packages") 01565 { 01566 local = false; 01567 all_packages = true; 01568 } 01569 else if (w.substr (0, 7) == "-depth=") 01570 { 01571 local = false; 01572 01573 cmt_string depth_str; 01574 int depth_value = 0; 01575 01576 w.substr (7, depth_str); 01577 if ((sscanf (depth_str.c_str (), "%d", &depth_value) < 1) || 01578 (depth_value < 1)) 01579 { 01580 // Syntax error 01581 // We shall restrict to packages found within 01582 // the |
|
? |
Definition at line 2011 of file cmt_parser.cxx. Referenced by parser(). 02014 { 02015 if (CmtLock::check () == CmtLock::locked_by_another_user) 02016 { 02017 CmtError::set (CmtError::conflicting_lock, "build_constituent_makefile>"); 02018 return; 02019 } 02020 if (arguments.size () > 0) 02021 { 02022 set_standard_macros (); 02023 Generator::build_constituent_makefile (arguments[0]); 02024 } 02025 } |
|
? |
Definition at line 2028 of file cmt_parser.cxx. Referenced by parser(). 02031 { 02032 if (CmtLock::check () == CmtLock::locked_by_another_user) 02033 { 02034 CmtError::set (CmtError::conflicting_lock, "build_constituents_makefile>"); 02035 return; 02036 } 02037 set_standard_macros (); 02038 Generator::build_constituents_makefile (m_current_package); 02039 } |
|
? |
Definition at line 2042 of file cmt_parser.cxx. Referenced by parser(). 02045 { 02046 if (CmtLock::check () == CmtLock::locked_by_another_user) 02047 { 02048 CmtError::set (CmtError::conflicting_lock, "build_dependencies>"); 02049 return; 02050 } 02051 if (arguments.size () > 0) 02052 { 02053 set_standard_macros (); 02054 02055 while (argc > 0) 02056 { 02057 if (strcmp (argv[0], "dependencies") != 0) 02058 { 02059 argc--; 02060 argv++; 02061 } 02062 else 02063 { 02064 argc--; 02065 argv++; 02066 argc--; 02067 argv++; 02068 02069 Generator::build_dependencies (arguments[0], argc, argv); 02070 02071 break; 02072 } 02073 } 02074 } 02075 } |
|
? |
Definition at line 2078 of file cmt_parser.cxx. Referenced by parser(). 02079 { 02080 if (CmtLock::check () == CmtLock::locked_by_another_user) 02081 { 02082 CmtError::set (CmtError::conflicting_lock, "build_library_links>"); 02083 return; 02084 } 02085 02086 set_standard_macros (); 02087 02088 Use::UsePtrVector& Uses = Use::get_ordered_uses (); 02089 Use& current_use = Use::current (); 02090 int i; 02091 cmt_string shlibsuffix; 02092 cmt_string bin; 02093 cmt_string symlinkcmd; 02094 02095 { 02096 Symbol* macro = Symbol::find ("shlibsuffix"); 02097 if (macro == 0) return; 02098 shlibsuffix = macro->build_macro_value (); 02099 } 02100 02101 { 02102 Symbol* macro = Symbol::find ("cmt_symlink_command"); 02103 if (macro != 0) 02104 { 02105 symlinkcmd = macro->build_macro_value (); 02106 } 02107 } 02108 02109 if ((get_current_build_strategy () & InstallAreaMask) == WithInstallArea) 02110 { 02111 const CmtInstallAreaMgr& ia_mgr = CmtInstallAreaMgr::instance (); 02112 02113 cmt_string s1 = ia_mgr.get_install_area (); 02114 02115 { 02116 Symbol* symbol = Symbol::find ("CMTINSTALLAREA"); 02117 if (symbol != 0) 02118 { 02119 s1 = symbol->build_macro_value (); 02120 } 02121 } 02122 02123 cmt_string s2; 02124 02125 { 02126 Symbol* macro = Symbol::find ("tag"); 02127 if (macro != 0) 02128 { 02129 s2 = macro->build_macro_value (); 02130 } 02131 } 02132 02133 cmt_string s = s1; 02134 s += CmtSystem::file_separator (); 02135 s += s2; 02136 s += CmtSystem::file_separator (); 02137 s += "lib"; 02138 02139 CmtSystem::mkdir (s); 02140 } 02141 02142 for (i = 0; i < Uses.size (); i++) 02143 { 02144 Use* use = Uses[i]; 02145 02146 if (use->discarded) continue; 02147 02148 if (!use->located ()) 02149 { 02150 if (!m_quiet) 02151 { 02152 cout << "# package " << use->get_package_name () << 02153 " " << use->version << " " << use->path << 02154 " not found" << 02155 endl; 02156 } 02157 } 02158 else 02159 { 02160 if (use->get_package_name () == "CMT") continue; 02161 if (use->get_package_name () == current_use.get_package_name ()) continue; 02162 02163 cmt_string s; 02164 02165 s = use->get_package_name (); 02166 s += "_libraries"; 02167 02168 Symbol* libraries_macro = Symbol::find (s); 02169 02170 if (libraries_macro == 0) continue; 02171 02172 cmt_string libraries = libraries_macro->build_macro_value (); 02173 static CmtSystem::cmt_string_vector values; 02174 02175 CmtSystem::split (libraries, " \t", values); 02176 02177 for (int j = 0; j < values.size (); j++) 02178 { 02179 const cmt_string& library = values[j]; 02180 02181 static cmt_string libname; 02182 static cmt_string name; 02183 02184 // Is it a simple name or a complete path? 02185 02186 libname = library; 02187 Symbol::expand (libname); 02188 02189 if (CmtSystem::absolute_path (libname)) 02190 { 02196 cmt_string suffix; 02197 CmtSystem::basename (library, name); 02198 } 02199 else 02200 { 02207 libname = "${"; 02208 libname += use->prefix; 02209 libname += "ROOT}/${"; 02210 libname += use->get_package_name (); 02211 libname += "_tag}/lib"; 02212 libname += library; 02213 libname += "."; 02214 libname += shlibsuffix; 02215 02216 name = "lib"; 02217 name += library; 02218 name += "."; 02219 name += shlibsuffix; 02220 } 02221 02222 Symbol::expand (libname); 02223 02224 if ((get_current_build_strategy () & InstallAreaMask) == WithInstallArea) 02225 { 02226 const CmtInstallAreaMgr& ia_mgr = CmtInstallAreaMgr::instance (); 02227 02228 cmt_string s1 = ia_mgr.get_install_area (); 02229 02230 { 02231 Symbol* symbol = Symbol::find ("CMTINSTALLAREA"); 02232 if (symbol != 0) 02233 { 02234 s1 = symbol->build_macro_value (); 02235 } 02236 } 02237 02238 cmt_string s2; 02239 02240 { 02241 Symbol* macro = Symbol::find ("tag"); 02242 if (macro != 0) 02243 { 02244 s2 = macro->build_macro_value (); 02245 } 02246 } 02247 02248 s = s1; 02249 s += CmtSystem::file_separator (); 02250 s += s2; 02251 s += CmtSystem::file_separator (); 02252 s += "lib"; 02253 s += CmtSystem::file_separator (); 02254 s += name; 02255 02256 // Now creating the reference file 02257 02258 cmt_string ref_file = s; 02259 ref_file += ".cmtref"; 02260 02261 cmt_string text = libname; 02262 text += "\n"; 02263 02264 Symbol::expand (ref_file); 02265 Symbol::expand (text); 02266 02267 text.write (ref_file); 02268 if (!m_quiet) cout << " Creating the reference file " << ref_file << endl; 02269 } 02270 else 02271 { 02272 s = "../$("; 02273 s += current_use.get_package_name (); 02274 s += "_tag)/"; 02275 s += name; 02276 } 02277 02278 Symbol::expand (s); 02279 02280 if (!m_quiet) cout << " Symlinking " << libname << " to " << s << endl; 02281 02282 if (symlinkcmd == "") 02283 { 02284 if (!CmtSystem::create_symlink (libname, s)) 02285 { 02286 cout << "Cannot create a symbolic link to " << libname << endl; 02287 break; 02288 } 02289 } 02290 else 02291 { 02292 cmt_string cmd = symlinkcmd; 02293 cmd += " "; 02294 cmd += libname; 02295 cmd += " "; 02296 cmd += s; 02297 02298 int status = CmtSystem::execute (cmd); 02299 02300 if (status != 0) 02301 { 02302 cout << "Cannot create a symbolic link to " << libname << endl; 02303 break; 02304 } 02305 } 02306 } 02307 } 02308 } 02309 } |
|
? |
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 2312 of file cmt_parser.cxx. Referenced by parser(). 02313 { 02314 if (CmtLock::check () == CmtLock::locked_by_another_user) 02315 { 02316 CmtError::set (CmtError::conflicting_lock, "build_make_setup>"); 02317 return; 02318 } 02319 set_standard_macros (); 02320 Generator::build_make_setup (m_current_package); 02321 } |
|
? |
Definition at line 2324 of file cmt_parser.cxx. Referenced by parser(). 02325 { 02326 if (CmtLock::check () == CmtLock::locked_by_another_user) 02327 { 02328 CmtError::set (CmtError::conflicting_lock, "build_msdev>"); 02329 return; 02330 } 02331 02332 if (true) 02333 { 02334 set_standard_macros (); 02335 if (arguments.size () > 0) build_msdev_file (arguments[0]); 02336 else build_msdev_file (""); 02337 } 02338 } |
|
? |
Definition at line 2359 of file cmt_parser.cxx. Referenced by parser(). 02360 { 02361 if (CmtLock::check () == CmtLock::locked_by_another_user) 02362 { 02363 CmtError::set (CmtError::conflicting_lock, "build_os9_makefile>"); 02364 return; 02365 } 02366 02367 if (arguments.size () > 0) 02368 { 02369 set_standard_macros (); 02370 build_OS9_makefile (arguments[0]); 02371 } 02372 } |
|
? |
Definition at line 2375 of file cmt_parser.cxx. Referenced by parser(). 02376 { 02377 if (CmtLock::check () == CmtLock::locked_by_another_user) 02378 { 02379 CmtError::set (CmtError::conflicting_lock, "build_prototype>"); 02380 return; 02381 } 02382 02383 if (arguments.size () > 0) 02384 { 02385 set_standard_macros (); 02386 Generator::build_prototype (arguments[0]); 02387 } 02388 } |
|
? |
Definition at line 2391 of file cmt_parser.cxx. Referenced by parser(). 02392 { 02393 if (CmtLock::check () == CmtLock::locked_by_another_user) 02394 { 02395 CmtError::set (CmtError::conflicting_lock, "build_readme>"); 02396 return; 02397 } 02398 02399 set_standard_macros (); 02400 Generator::build_readme (arguments); 02401 } |
|
? |
Definition at line 2404 of file cmt_parser.cxx. Referenced by parser(). 02405 { 02406 if (CmtLock::check () == CmtLock::locked_by_another_user) 02407 { 02408 CmtError::set (CmtError::conflicting_lock, "build_tag_makefile>"); 02409 return; 02410 } 02411 02412 print_macros (Make); 02413 } |
|
? |
Definition at line 2416 of file cmt_parser.cxx. Referenced by parser(). 02417 { 02418 cmt_string name = CmtSystem::get_temporary_name (); 02419 cout << name << endl; 02420 } |
|
? |
Definition at line 2423 of file cmt_parser.cxx. Referenced by parser(). 02424 { 02425 if (CmtLock::check () == CmtLock::locked_by_another_user) 02426 { 02427 CmtError::set (CmtError::conflicting_lock, "build_tag_makefile>"); 02428 return; 02429 } 02430 02431 if (arguments.size () > 0) 02432 { 02433 set_standard_macros (); 02434 TriggerGenerator::run (arguments[0]); 02435 } 02436 } |
|
? |
Definition at line 2342 of file cmt_parser.cxx. Referenced by parser(). 02343 { 02344 if (CmtLock::check () == CmtLock::locked_by_another_user) 02345 { 02346 CmtError::set (CmtError::conflicting_lock, "build_vsnet>"); 02347 return; 02348 } 02349 02350 if (true) 02351 { 02352 set_standard_macros (); 02353 if (arguments.size () > 0) build_vsnet_file (arguments[0]); 02354 else build_vsnet_file (""); 02355 } 02356 } |
|
? |
Definition at line 2439 of file cmt_parser.cxx. Referenced by parser(). 02440 { 02441 if (CmtLock::check () == CmtLock::locked_by_another_user) 02442 { 02443 CmtError::set (CmtError::conflicting_lock, "build_windefs>"); 02444 return; 02445 } 02446 02447 if (arguments.size () > 0) 02448 { 02449 set_standard_macros (); 02450 Generator::build_windefs (arguments[0]); 02451 } 02452 } |
|
? |
Definition at line 2455 of file cmt_parser.cxx. Referenced by parser(). 02456 { 02457 } |
|
? |
Definition at line 2460 of file cmt_parser.cxx. Referenced by parser(). 02461 { 02462 if (arguments.size () >= 2) 02463 { 02464 cmt_string first_file = arguments[0]; 02465 cmt_string second_file = arguments[1]; 02466 02467 if (first_file == "") return; 02468 if (second_file == "") return; 02469 02470 CmtSystem::compare_and_update_files (first_file, second_file); 02471 } 02472 } |
|
? |
Definition at line 2475 of file cmt_parser.cxx. Referenced by parser(). 02476 { 02477 if (arguments.size () > 0) 02478 { 02479 cmt_string name = arguments[0]; 02480 02481 if (name == "") return; 02482 int v = 0; 02483 int r = 0; 02484 int p = 0; 02485 02486 bool ok = CmtSystem::is_version_directory (name, v, r, p); 02487 02488 if (ok) 02489 { 02490 cout << "# " << name << " is version " << v << " release " << r << " patch " << p << endl; 02491 } 02492 else 02493 { 02494 cout << "# " << name << " is not a version tag" << endl; 02495 } 02496 } 02497 } |
|
? |
Definition at line 2500 of file cmt_parser.cxx. Referenced by parser(). 02501 { 02502 Cvs::checkout (arguments); 02503 } |
|
? |
Definition at line 2506 of file cmt_parser.cxx. Referenced by parser(). 02507 { 02508 print_clean (mode); 02509 } |
|
? |
Definition at line 2512 of file cmt_parser.cxx. Referenced by do_create(), and parser(). 02513 { 02514 if (CmtLock::check () == CmtLock::locked_by_another_user) 02515 { 02516 CmtError::set (CmtError::conflicting_lock, "config>"); 02517 return; 02518 } 02519 02520 //Use::UsePtrVector& Uses = Use::get_ordered_uses (); 02521 02522 if (m_debug) 02523 { 02524 cout << "Cmt::do_config> " << endl; 02525 cout << "pwd " << CmtSystem::pwd () << endl; 02526 cout << "current_dir " << m_current_dir << endl; 02527 cout << "default_path " << m_default_path << endl; 02528 cout << "cmt config " << 02529 m_current_package << " " << 02530 m_current_version << " " << 02531 m_current_path << endl; 02532 } 02533 02534 if (m_current_package == "CMT") return; 02535 if (m_current_package == "methods") return; 02536 02537 cmt_string branch; 02538 02539 CmtSystem::basename (m_current_dir, branch); 02540 02541 if ((branch != "mgr") && (branch != "cmt")) 02542 { 02543 02544 // 02545 // Here we are in a standalone package (ie completely unstructured) 02546 // 02547 02548 if (CmtSystem::test_file ("requirements")) 02549 { 02550 cout << "------------------------------------------" << endl; 02551 cout << "Configuring environment for standalone package." << endl; 02552 cout << "CMT version " << m_cmt_version << "." << endl; 02553 cout << "System is " << m_cmt_config << endl; 02554 cout << "------------------------------------------" << endl; 02555 02556 install_test_setup_scripts (); 02557 install_test_cleanup_scripts (); 02558 02559 Generator::build_default_makefile (); 02560 } 02561 else 02562 { 02563 cout << "==============================================" << endl; 02564 cout << "cmt config must be operated either upon " 02565 "an existing package" << endl; 02566 cout << " (ie. when a requirements file already exists)" << endl; 02567 cout << " > cd ..." << endl; 02568 cout << " > cmt config" << endl; 02569 cout << "or to create a new package" << endl; 02570 cout << " > cmt config |
|
? |
Definition at line 2682 of file cmt_parser.cxx. Referenced by parser(). 02683 { 02684 if (arguments.size () < 2) return; 02685 02686 const cmt_string& package = arguments[0]; 02687 const cmt_string& version = arguments[1]; 02688 cmt_string offset; 02689 if (arguments.size () >= 3) offset = arguments[2]; 02690 02691 if (m_debug) 02692 { 02693 cout << "do_create>m_current_package=" << m_current_package << endl; 02694 cout << "do_create>package=" << package << endl; 02695 } 02696 02697 //if (m_current_package == "CMT") return; 02698 //if (m_current_package == "methods") return; 02699 02700 cmt_string the_path; 02701 02702 the_path = CmtSystem::pwd (); 02703 02704 if (offset != "") 02705 { 02706 if (!CmtSystem::absolute_path (offset)) 02707 { 02708 // offset is really a relative offset 02709 the_path += CmtSystem::file_separator (); 02710 the_path += offset; 02711 } 02712 else // absolute path 02713 { 02714 the_path = offset; 02715 } 02716 } 02717 02718 CmtSystem::compress_path (the_path); 02719 02720 // Now 'the_path' contains the complete path where the package will be created 02721 02722 cout << "------------------------------------------" << endl; 02723 cout << "Configuring environment for package " << package << 02724 " version " << version << "." << endl; 02725 cout << "CMT version " << m_cmt_version << "." << endl; 02726 cout << "Root set to " << the_path << "." << endl; 02727 cout << "System is " << m_cmt_config << endl; 02728 cout << "------------------------------------------" << endl; 02729 02730 if (!CmtSystem::test_directory (the_path)) 02731 { 02732 if (!CmtSystem::mkdir (the_path)) 02733 { 02734 cout << "Cannot create the path directory" << endl; 02735 return; 02736 } 02737 else 02738 { 02739 cout << "Installing the path directory" << endl; 02740 } 02741 } 02742 02743 CmtSystem::cd (the_path); 02744 02745 if (!CmtSystem::test_directory (package)) 02746 { 02747 if (!CmtSystem::mkdir (package)) 02748 { 02749 cout << "Cannot create the package directory" << endl; 02750 return; 02751 } 02752 else 02753 { 02754 cout << "Installing the package directory" << endl; 02755 } 02756 } 02757 else 02758 { 02759 cout << "Package directory already installed" << endl; 02760 } 02761 02762 CmtSystem::cd (package); 02763 02764 if (m_current_structuring_style == with_version_directory) 02765 { 02766 if (!CmtSystem::test_directory (version)) 02767 { 02768 if (!CmtSystem::mkdir (version)) 02769 { 02770 cout << "Cannot create the version directory" << endl; 02771 return; 02772 } 02773 else 02774 { 02775 cout << "Installing the version directory" << endl; 02776 } 02777 } 02778 else 02779 { 02780 cout << "Version directory already installed" << endl; 02781 } 02782 02783 CmtSystem::cd (version); 02784 } 02785 else 02786 { 02787 cout << "Version directory will not be created due to structuring style" << endl; 02788 } 02789 02790 if (!CmtSystem::test_directory ("cmt")) 02791 { 02792 if (!CmtSystem::test_directory ("mgr")) 02793 { 02794 if (!CmtSystem::mkdir ("cmt")) 02795 { 02796 cout << "Cannot create the cmt directory" << endl; 02797 return; 02798 } 02799 else 02800 { 02801 if (m_current_structuring_style == with_version_directory) 02802 { 02803 m_current_style = cmt_style; 02804 } 02805 else 02806 { 02807 m_current_style = no_version_style; 02808 } 02809 02810 cout << "Installing the cmt directory" << endl; 02811 } 02812 } 02813 else 02814 { 02815 if (m_current_structuring_style == with_version_directory) 02816 { 02817 m_current_style = mgr_style; 02818 } 02819 else 02820 { 02821 m_current_style = no_version_style; 02822 } 02823 02824 cout << "Mgr directory already installed" << endl; 02825 } 02826 } 02827 else 02828 { 02829 if (m_current_structuring_style == with_version_directory) 02830 { 02831 m_current_style = cmt_style; 02832 } 02833 else 02834 { 02835 m_current_style = no_version_style; 02836 } 02837 02838 cout << "Cmt directory already installed" << endl; 02839 } 02840 02841 if (!CmtSystem::test_directory ("src")) 02842 { 02843 if (!CmtSystem::mkdir ("src")) 02844 { 02845 cout << "Cannot create the src directory" << endl; 02846 return; 02847 } 02848 else 02849 { 02850 cout << "Installing the src directory" << endl; 02851 } 02852 } 02853 else 02854 { 02855 cout << "src directory already installed" << endl; 02856 } 02857 02858 switch (m_current_style) 02859 { 02860 case cmt_style: 02861 case no_version_style: 02862 CmtSystem::cd ("cmt"); 02863 break; 02864 case mgr_style: 02865 CmtSystem::cd ("mgr"); 02866 break; 02867 } 02868 02869 Generator::build_default_makefile (); 02870 02871 if (!CmtSystem::test_file ("requirements")) 02872 { 02873 // create an empty requirement file. 02874 ofstream f ("requirements"); 02875 if (f) 02876 { 02877 f << "package " << package << endl; 02878 f << endl; 02879 f.close (); 02880 } 02881 } 02882 02883 if (m_current_structuring_style == without_version_directory) 02884 { 02885 ofstream f ("version.cmt"); 02886 if (f) 02887 { 02888 f << version << endl; 02889 f.close (); 02890 } 02891 } 02892 02893 m_current_package = package; 02894 m_current_version = version; 02895 m_current_path = the_path; 02896 m_current_dir = CmtSystem::pwd (); 02897 02898 do_config (); 02899 } |
|
? |
Definition at line 2902 of file cmt_parser.cxx. Referenced by parser(). 02903 { 02904 Cvs::branches (arguments[0]); 02905 } |
|
? |
Definition at line 2908 of file cmt_parser.cxx. Referenced by parser(). 02909 { 02910 Cvs::subpackages (arguments[0]); 02911 } |
|
? |
Definition at line 2914 of file cmt_parser.cxx. Referenced by parser(). 02915 { 02916 Cvs::tags (arguments); 02917 } |
|
? |
Definition at line 2920 of file cmt_parser.cxx. Referenced by parser(). 02921 { 02922 set_standard_macros (); 02923 CmtModel::expand (arguments[0]); 02924 } |
|
? |
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 2936 of file cmt_parser.cxx. Referenced by parser(). 02937 { 02938 if (arguments.size () < 2) return; 02939 02940 cmt_string& input = arguments[0]; 02941 cmt_string& output = arguments[1]; 02942 02943 if (!CmtSystem::test_file (input)) 02944 { 02945 cout << "#CMT> File " << input << " not found" << endl; 02946 return; 02947 } 02948 02949 cmt_string text; 02950 02951 text.read (input); 02952 02953 set_standard_macros (); 02954 02955 Symbol::expand (text); 02956 02957 FILE* file = fopen (output, "wb"); 02958 if (file == NULL) 02959 { 02960 cout << "#CMT> Cannot write filtered file " << output << endl; 02961 } 02962 else 02963 { 02964 text.write (file); 02965 fclose (file); 02966 } 02967 } |
|
? |
Definition at line 2970 of file cmt_parser.cxx. Referenced by parser(). 02971 { 02972 if (help_action == action_none) 02973 { 02974 CommandParser::show_all (); 02975 } 02976 else 02977 { 02978 CommandParser::show (help_action); 02979 } 02980 } |
|
? |
Definition at line 2983 of file cmt_parser.cxx. Referenced by parser(). 02986 { 02987 //(unsused) Use& use = Use::current(); 02988 02989 cout << "try to lock package " << package << " in " << CmtSystem::pwd () << endl; 02990 02991 set_standard_macros (); 02992 02993 CmtLock::status status = CmtLock::lock (); 02994 } |
|
? |
Definition at line 2997 of file cmt_parser.cxx. Referenced by parser(). 03000 { 03001 //Use::UsePtrVector& Uses = Use::get_ordered_uses (); 03002 03003 if (m_current_package == "CMT") return; 03004 if (m_current_package == "methods") return; 03005 03006 cmt_string the_path; 03007 03008 //the_path = m_default_path; 03009 the_path = CmtSystem::pwd (); 03010 03011 if (path != "") 03012 { 03013 if (!CmtSystem::absolute_path (path)) 03014 { 03015 // path is just a suffix 03016 the_path += CmtSystem::file_separator (); 03017 the_path += path; 03018 } 03019 else // absolute path 03020 { 03021 the_path = path; 03022 } 03023 } 03024 03025 CmtSystem::compress_path (the_path); 03026 03027 cout << "------------------------------------------" << endl; 03028 cout << "Removing package " << package << 03029 " version " << version << "." << endl; 03030 cout << "CMT version " << m_cmt_version << "." << endl; 03031 cout << "Root set to " << the_path << "." << endl; 03032 cout << "System is " << m_cmt_config << endl; 03033 cout << "------------------------------------------" << endl; 03034 03035 the_path += CmtSystem::file_separator (); 03036 the_path += package; 03037 03038 if (!CmtSystem::cd (the_path)) 03039 { 03040 cout << "Path " << the_path << " not reachable" << endl; 03041 return; 03042 } 03043 03044 if (CmtSystem::test_directory (version)) 03045 { 03046 if (CmtSystem::remove_directory (version)) 03047 { 03048 cout << "Version " << version << " has been removed from " << the_path << endl; 03049 CmtSystem::cmt_string_vector contents; 03050 CmtSystem::scan_dir (".", contents); 03051 if (contents.size () == 0) 03052 { 03053 CmtSystem::cd (".."); 03054 if (CmtSystem::remove_directory (package)) 03055 { 03056 cout << "Package " << package << " has no more versions. Thus it has been removed."<< endl; 03057 } 03058 } 03059 } 03060 else 03061 { 03062 cout << "Impossible to remove version " << version << " from " << the_path << endl; 03063 } 03064 } 03065 else if (CmtSystem::test_directory ("cmt")) 03066 { 03067 CmtSystem::cd ("cmt"); 03068 03069 cmt_string v; 03070 03071 v.read ("version.cmt"); 03072 if (v == version) 03073 { 03074 CmtSystem::cd (".."); 03075 if (!CmtSystem::remove_directory ("cmt")) 03076 { 03077 cout << "Unstructured version " << version 03078 << " has been removed from " << the_path << endl; 03079 } 03080 else 03081 { 03082 cout << "Impossible to remove unstructured version " << version 03083 << " from " << the_path << endl; 03084 } 03085 } 03086 else 03087 { 03088 cout << "Version " << version << " not found" << endl; 03089 } 03090 } 03091 else 03092 { 03093 cout << "Version " << version << " not found" << endl; 03094 } 03095 } |
|
? |
Definition at line 3098 of file cmt_parser.cxx. Referenced by parser(). 03099 { 03100 if (CmtLock::check () == CmtLock::locked_by_another_user) 03101 { 03102 CmtError::set (CmtError::conflicting_lock, "remove_library_links>"); 03103 return; 03104 } 03105 03106 set_standard_macros (); 03107 03108 Use::UsePtrVector& Uses = Use::get_ordered_uses (); 03109 Use& current_use = Use::current (); 03110 int i; 03111 cmt_string shlibsuffix; 03112 cmt_string symunlink; 03113 03114 { 03115 Symbol* macro = Symbol::find ("shlibsuffix"); 03116 if (macro == 0) return; 03117 shlibsuffix = macro->build_macro_value (); 03118 } 03119 03120 { 03121 Symbol* macro = Symbol::find ("symunlink"); 03122 if (macro == 0) return; 03123 symunlink = macro->build_macro_value (); 03124 } 03125 03126 for (i = 0; i < Uses.size (); i++) 03127 { 03128 Use* use = Uses[i]; 03129 03130 if (use->discarded) continue; 03131 03132 if (!use->located ()) 03133 { 03134 if (!m_quiet) 03135 { 03136 cout << "# package " << use->get_package_name () << 03137 " " << use->version << " " << use->path << 03138 " not found" << 03139 endl; 03140 } 03141 } 03142 else 03143 { 03144 if (use->get_package_name () == "CMT") continue; 03145 if (use->get_package_name () == current_use.get_package_name ()) continue; 03146 03147 cmt_string s; 03148 03149 s = use->get_package_name (); 03150 s += "_libraries"; 03151 03152 Symbol* libraries_macro = Symbol::find (s); 03153 03154 if (libraries_macro == 0) continue; 03155 03156 cmt_string libraries = libraries_macro->build_macro_value (); 03157 static CmtSystem::cmt_string_vector values; 03158 03159 CmtSystem::split (libraries, " \t", values); 03160 03161 for (int j = 0; j < values.size (); j++) 03162 { 03163 const cmt_string& library = values[j]; 03164 03165 static cmt_string libname; 03166 static cmt_string name; 03167 03168 // Is it a simple name or a complete path? 03169 03170 libname = library; 03171 Symbol::expand (libname); 03172 03173 if (CmtSystem::absolute_path (libname)) 03174 { 03180 cmt_string suffix; 03181 CmtSystem::basename (library, name); 03182 } 03183 else 03184 { 03192 name = "lib"; 03193 name += libname; 03194 name += "."; 03195 name += shlibsuffix; 03196 } 03197 03198 Symbol::expand (libname); 03199 03200 if ((get_current_build_strategy () & InstallAreaMask) == WithInstallArea) 03201 { 03202 const CmtInstallAreaMgr& ia_mgr = CmtInstallAreaMgr::instance (); 03203 03204 cmt_string s1 = ia_mgr.get_install_area (); 03205 03206 { 03207 Symbol* symbol = Symbol::find ("CMTINSTALLAREA"); 03208 if (symbol != 0) 03209 { 03210 s1 = symbol->build_macro_value (); 03211 } 03212 } 03213 03214 cmt_string s2; 03215 03216 { 03217 Symbol* macro = Symbol::find ("tag"); 03218 if (macro != 0) 03219 { 03220 s2 = macro->build_macro_value (); 03221 } 03222 } 03223 03224 // Now deleting the reference file 03225 03226 s = symunlink; 03227 s += " "; 03228 s += s1; 03229 s += CmtSystem::file_separator (); 03230 s += s2; 03231 s += CmtSystem::file_separator (); 03232 s += "lib"; 03233 s += CmtSystem::file_separator (); 03234 s += name; 03235 s += ".cmtref"; 03236 s += " "; 03237 s += s1; 03238 s += CmtSystem::file_separator (); 03239 s += s2; 03240 s += CmtSystem::file_separator (); 03241 s += "lib"; 03242 s += CmtSystem::file_separator (); 03243 s += name; 03244 } 03245 else 03246 { 03247 s = symunlink; 03248 s += " ../$("; 03249 s += current_use.get_package_name (); 03250 s += "_tag)/"; 03251 s += name; 03252 } 03253 03254 Symbol::expand (s); 03255 03256 if (!m_quiet) cout << s << endl; 03257 int status = CmtSystem::execute (s); 03258 03259 if (status != 0) 03260 { 03261 if (status != 2) CmtError::set (CmtError::execution_error, s); 03262 03263 cout << "Cannot remove the symbolic link " << s << endl; 03264 03265 break; 03266 } 03267 } 03268 } 03269 } 03270 } |
|
? |
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 3273 of file cmt_parser.cxx. Referenced by parser(). 03274 { 03275 if (arguments.size () > 0) 03276 { 03277 set_standard_macros (); 03278 Symbol::all_set (); 03279 CmtSystem::execute (arguments[0]); 03280 } 03281 } |
|
? |
Definition at line 3284 of file cmt_parser.cxx. Referenced by parser(). 03285 { 03286 if (arguments.size () == 0) cout << "# cmt run_sequence: no sequence specified" << endl; 03287 03288 SequenceRunner runner; 03289 03290 cout << "# cmt run_sequence: sequence " << arguments[0] << endl; 03291 03292 runner.run (arguments[0]); 03293 } |
|
? |
Definition at line 3296 of file cmt_parser.cxx. Referenced by parser(). 03297 { 03298 if (arguments.size () == 0) cout << "# cmt set version: no version specified" << endl; 03299 03300 const cmt_string& version = arguments[0]; 03301 03302 int v, r, p; 03303 03304 if (!CmtSystem::is_version_directory (version, v, r, p)) 03305 { 03306 cout << "# cmt set version " << version << " is not a correct version syntax" << endl; 03307 return; 03308 } 03309 03310 if ((v == -1) || (r == -1) || (p == -1)) 03311 { 03312 cout << "# cmt set version " << version 03313 << " You cannot use wild card to set a version" << endl; 03314 return; 03315 } 03316 03317 // We want to install the version.cmt file 03318 03319 // We first check we are in a cmt branch 03320 cmt_string h = CmtSystem::pwd (); 03321 cmt_string branch; 03322 CmtSystem::basename (h, branch); 03323 03324 if (branch != "cmt") 03325 { 03326 cout << "# cmt set version " << version << " must be applied in a cmt directory" 03327 << endl; 03328 return; 03329 } 03330 03331 CmtSystem::dirname (h, h); 03332 CmtSystem::basename (h, branch); 03333 03334 if (branch == version) 03335 { 03336 cout << "# cmt set version " << version << " is already available as a version directory" 03337 << endl; 03338 return; 03339 } 03340 03341 cout << "Writing version file : " << version << endl; 03342 03343 version.write ("version.cmt"); 03344 } |
|
? |
Definition at line 3347 of file cmt_parser.cxx. Referenced by parser(). 03348 { 03349 CmtSystem::cmt_string_vector args; 03350 03351 args = arguments; 03352 { 03353 cmt_string& s = args.add (); 03354 s = "cmt"; 03355 } 03356 { 03357 cmt_string& s = args.add (); 03358 s = "set"; 03359 } 03360 { 03361 cmt_string& s = args.add (); 03362 s = "version"; 03363 } 03364 { 03365 cmt_string& s = args.add (); 03366 s = " |
|
? |
Definition at line 3375 of file cmt_parser.cxx. Referenced by parser(). 03376 { 03377 print (mode); 03378 03379 // 03380 // Try a cleanup of the installation area 03381 // 03382 if ((get_current_build_strategy () & InstallAreaMask) == WithInstallArea) 03383 { 03384 CmtInstallAreaMgr& ia_mgr = CmtInstallAreaMgr::instance (); 03385 03386 if ((get_current_setup_strategy () & SetupCleanupMask) == SetupCleanup) 03387 { 03388 const cmt_string& installarea = ia_mgr.get_install_area (); 03389 03390 if (installarea != "") 03391 { 03392 cmt_string q; 03393 03394 switch (mode) 03395 { 03396 case Sh : 03397 case Csh : 03398 q = "\'"; 03399 break; 03400 default : 03401 break; 03402 } 03403 03404 if (!m_quiet) 03405 { 03406 cout << "echo " << q 03407 << "# Doing cleanup in the installation area " << installarea 03408 << q << endl; 03409 } 03410 } 03411 03412 ia_mgr.config (); 03413 } 03414 } 03415 } |
|
? |
Definition at line 3418 of file cmt_parser.cxx. Referenced by parser(). 03419 { 03420 Tag::TagPtrVector tags = Tag::tags (); 03421 int index; 03422 03423 set_standard_macros (); 03424 03425 for (index = 0; index < tags.size (); index++) 03426 { 03427 const Tag* tag = tags[index]; 03428 if (tag != 0) 03429 { 03430 tag->show_definition (true); 03431 } 03432 } 03433 } |
|
? |
Definition at line 3436 of file cmt_parser.cxx. Referenced by parser(). 03437 { 03438 Pattern::show_all_applied_patterns (); 03439 } |
|
? |
Definition at line 3442 of file cmt_parser.cxx. Referenced by parser(). 03443 { 03444 Use& use = Use::current(); 03445 03446 cout << use.author << endl; 03447 } |
|
? |
Definition at line 3450 of file cmt_parser.cxx. Referenced by parser(). 03451 { 03452 Branch::print_all (mode); 03453 } |
|
? |
Definition at line 3456 of file cmt_parser.cxx. Referenced by parser(). 03457 { 03458 cmt_string package; 03459 cmt_string version; 03460 cmt_string path_name; 03461 03462 if (arguments.size () >= 1) package = arguments[0]; 03463 if (arguments.size () >= 2) version = arguments[1]; 03464 if (arguments.size () >= 3) path_name = arguments[2]; 03465 03466 FileScanner scanner; 03467 PackageCollector collector (package, version); 03468 03469 clear (); 03470 configure (); 03471 03472 cout << "# ----------- Clients of " << package << 03473 " " << version << 03474 " " << path_name << 03475 endl; 03476 03477 if (path_name == "") 03478 { 03479 int path_index; 03480 03481 for (path_index = 0; path_index < m_cmt_path.size (); path_index++) 03482 { 03483 const cmt_string& path = m_cmt_path[path_index]; 03484 03485 scanner.scan_path (path, collector); 03486 } 03487 } 03488 else 03489 { 03490 scanner.scan_path (path_name, collector); 03491 } 03492 cout << "# ----------- " << collector.count () << " clients found." << endl; 03493 } |
|
? |
Definition at line 3496 of file cmt_parser.cxx. Referenced by parser(). 03497 { 03498 set_standard_macros (); 03499 CmtPathPattern::show_all (); 03500 } |
|
? |
Definition at line 3503 of file cmt_parser.cxx. Referenced by parser(). 03504 { 03505 if (arguments.size () > 0) 03506 { 03507 set_standard_macros (); 03508 Constituent::show (arguments[0]); 03509 } 03510 } |
|
? |
Definition at line 3513 of file cmt_parser.cxx. Referenced by parser(). 03514 { 03515 set_standard_macros (); 03516 Constituent::show_names (); 03517 } |
|
? |
Definition at line 3520 of file cmt_parser.cxx. Referenced by parser(). 03521 { 03522 set_standard_macros (); 03523 Constituent::show_all (); 03524 } |
|
? |
Definition at line 3527 of file cmt_parser.cxx. Referenced by parser(). 03528 { 03529 set_standard_macros (); 03530 Use& use = Use::current(); 03531 03532 use.show_cycles (); 03533 } |
|
? |
Definition at line 3536 of file cmt_parser.cxx. Referenced by parser(). 03537 { 03538 if (arguments.size () > 0) Fragment::show (arguments[0]); 03539 } |
|
? |
Definition at line 3542 of file cmt_parser.cxx. Referenced by parser(). 03543 { 03544 Fragment::show_all (); 03545 } |
|
? |
Definition at line 3548 of file cmt_parser.cxx. Referenced by parser(). 03549 { 03550 Group::show_all (); 03551 } |
|
? |
Definition at line 3554 of file cmt_parser.cxx. Referenced by parser(). 03555 { 03556 cmt_string temp; 03557 03558 Use& use = Use::current(); 03559 03560 set_standard_macros (); 03561 03562 if (use.include_path == "") 03563 { 03564 temp += "$(src) "; 03565 } 03566 else if (use.include_path != "none") 03567 { 03568 temp += use.include_path; 03569 temp += " "; 03570 } 03571 03572 for (int include_number = 0; 03573 include_number < use.includes.size (); 03574 include_number++) 03575 { 03576 Include& incl = use.includes[include_number]; 03577 03578 temp += incl.name; 03579 temp += " "; 03580 } 03581 03582 cout << temp << endl; 03583 } |
|
? |
Definition at line 3586 of file cmt_parser.cxx. Referenced by parser(). 03587 { 03588 if (arguments.size () > 0) 03589 { 03590 set_standard_macros (); 03591 Language::show (arguments[0]); 03592 } 03593 } |
|
? |
Definition at line 3596 of file cmt_parser.cxx. Referenced by parser(). 03597 { 03598 set_standard_macros (); 03599 Language::show_all (); 03600 } |
|
? |
Definition at line 3603 of file cmt_parser.cxx. Referenced by do_show_macro_value(), do_show_set(), do_show_set_value(), and parser(). 03605 { 03606 cmt_string target; 03607 03608 if (arguments.size () > 0) target = arguments[0]; 03609 03610 Symbol* symbol; 03611 03612 set_standard_macros (); 03613 03614 symbol = Symbol::find (target); 03615 03616 if (symbol == 0) 03617 { 03618 cmt_string t = " "; 03619 t += target; 03620 t += " is not defined "; 03621 03622 CmtError::set (CmtError::symbol_not_found, t); 03623 03624 return; 03625 } 03626 else 03627 { 03628 cmt_string t = target; 03629 t += " is a "; 03630 03631 if ((m_action == action_show_macro) || 03632 (m_action == action_show_macro_value)) 03633 { 03634 if ((symbol->command != CommandMacro) && 03635 (symbol->command != CommandMacroAppend) && 03636 (symbol->command != CommandMacroPrepend) && 03637 (symbol->command != CommandMacroRemove) && 03638 (symbol->command != CommandMacroRemoveAll)) 03639 { 03640 t += "set"; 03641 03642 CmtError::set (CmtError::warning, t); 03643 } 03644 } 03645 else if ((m_action == action_show_set) || 03646 (m_action == action_show_set_value)) 03647 { 03648 if ((symbol->command != CommandSet) && 03649 (symbol->command != CommandSetAppend) && 03650 (symbol->command != CommandSetPrepend) && 03651 (symbol->command != CommandSetRemove) && 03652 (symbol->command != CommandPath) && 03653 (symbol->command != CommandPathAppend) && 03654 (symbol->command != CommandPathPrepend) && 03655 (symbol->command != CommandPathRemove)) 03656 { 03657 t += "macro"; 03658 03659 CmtError::set (CmtError::warning, t); 03660 } 03661 } 03662 } 03663 03664 if (symbol->value_lists.size () < 1) return; 03665 03666 symbol->show_macro (mode); 03667 } |
|
? |
Definition at line 3670 of file cmt_parser.cxx. Referenced by parser(). 03672 { 03673 if (arguments.size () > 0) 03674 { 03675 const cmt_string& pattern = arguments[0]; 03676 print_symbol_names (mode, pattern); 03677 } 03678 else 03679 { 03680 print_symbol_names (mode); 03681 } 03682 } |
|
? |
Definition at line 3685 of file cmt_parser.cxx. Referenced by parser(). 03687 { 03688 do_show_macro (arguments, mode); 03689 } |
|
? |
Definition at line 3692 of file cmt_parser.cxx. Referenced by parser(). 03694 { 03695 if (arguments.size () > 0) 03696 { 03697 const cmt_string& pattern = arguments[0]; 03698 print_macros (mode, pattern); 03699 } 03700 else 03701 { 03702 print_macros (mode); 03703 } 03704 } |
|
? |
Definition at line 3707 of file cmt_parser.cxx. Referenced by parser(). 03708 { 03709 Use& use = Use::current(); 03710 03711 cout << use.manager << endl; 03712 } |
|
? |
Definition at line 3715 of file cmt_parser.cxx. Referenced by parser(). 03716 { 03717 cmt_string path_name; 03718 03719 if (arguments.size () > 0) path_name = arguments[0]; 03720 03721 FileScanner scanner; 03722 PackageViewer viewer; 03723 03724 if (path_name == "") 03725 { 03726 int path_index; 03727 03728 for (path_index = 0; path_index < m_cmt_path.size (); path_index++) 03729 { 03730 const cmt_string& path = m_cmt_path[path_index]; 03731 03732 scanner.scan_path (path, viewer); 03733 } 03734 } 03735 else 03736 { 03737 scanner.scan_path (path_name, viewer); 03738 } 03739 } |
|
? |
Definition at line 3742 of file cmt_parser.cxx. Referenced by do_show_setup(), and parser(). 03743 { 03744 int path_index; 03745 03746 if (!m_quiet) 03747 { 03748 for (path_index = 0; path_index < m_cmt_path.size (); path_index++) 03749 { 03750 const cmt_string& path = m_cmt_path[path_index]; 03751 const cmt_string& source = m_cmt_path_sources[path_index]; 03752 03753 cout << "# Add path " << path << " from " << source << endl; 03754 } 03755 03756 cout << "#" << endl; 03757 } 03758 03759 for (path_index = 0; path_index < m_cmt_path.size (); path_index++) 03760 { 03761 const cmt_string& path = m_cmt_path[path_index]; 03762 const cmt_string& source = m_cmt_path_sources[path_index]; 03763 03764 if (path_index > 0) cout << CmtSystem::path_separator (); 03765 03766 cout << path; 03767 } 03768 03769 cout << endl; 03770 } |
|
? |
Definition at line 3773 of file cmt_parser.cxx. Referenced by parser(). 03774 { 03775 cmt_string name; 03776 if (arguments.size () > 0) name = arguments[0]; 03777 Pattern::show (name); 03778 } |
|
? |
Definition at line 3781 of file cmt_parser.cxx. Referenced by parser(). 03782 { 03783 Pattern::show_all_names (); 03784 } |
|
? |
Definition at line 3787 of file cmt_parser.cxx. Referenced by parser(). 03788 { 03789 Pattern::show_all (); 03790 } |
|
? |
Definition at line 3793 of file cmt_parser.cxx. Referenced by parser(). 03794 { 03795 Project::show_all (); 03796 } |
|
? |
Definition at line 3799 of file cmt_parser.cxx. Referenced by parser(). 03800 { 03801 cout << m_current_dir << endl; 03802 } |
|
? |
Definition at line 3818 of file cmt_parser.cxx. Referenced by parser(). 03820 { 03821 do_show_macro (arguments, mode); 03822 } |
|
? |
Definition at line 3825 of file cmt_parser.cxx. Referenced by parser(). 03827 { 03828 if (arguments.size () > 0) 03829 { 03830 const cmt_string& pattern = arguments[0]; 03831 print_symbol_names (mode, pattern); 03832 } 03833 else 03834 { 03835 print_symbol_names (mode); 03836 } 03837 } |
|
? |
Definition at line 3840 of file cmt_parser.cxx. Referenced by parser(). 03842 { 03843 do_show_macro (arguments, mode); 03844 } |
|
? |
Definition at line 3847 of file cmt_parser.cxx. Referenced by parser(). 03849 { 03850 if (arguments.size () > 0) 03851 { 03852 const cmt_string& pattern = arguments[0]; 03853 print_macros (mode, pattern); 03854 } 03855 else 03856 { 03857 print_macros (mode); 03858 } 03859 } |
|
? |
Definition at line 3805 of file cmt_parser.cxx. Referenced by parser(). 03806 { 03807 cout << "----------> uses" << endl; 03808 do_show_uses (); 03809 03810 cout << "----------> tags" << endl; 03811 do_show_tags (); 03812 03813 cout << "----------> CMTPATH" << endl; 03814 do_show_path (); 03815 } |
|
? |
Definition at line 3862 of file cmt_parser.cxx. Referenced by parser(). 03863 { 03864 cout << "Structuring style : "; 03865 03866 switch (m_current_structuring_style) 03867 { 03868 case without_version_directory: 03869 cout << "without_version_directory"; 03870 break; 03871 case with_version_directory: 03872 cout << "with_version_directory"; 03873 break; 03874 } 03875 03876 cout << endl; 03877 03878 cout << "Version strategy : "; 03879 03880 switch (m_current_strategy) 03881 { 03882 case BestFit : 03883 cout << "BestFit"; 03884 break; 03885 case BestFitNoCheck : 03886 cout << "BestFitNoCheck"; 03887 break; 03888 case FirstChoice : 03889 cout << "FirstChoice"; 03890 break; 03891 case LastChoice : 03892 cout << "LastChoice"; 03893 break; 03894 case KeepAll : 03895 cout << "KeepAll"; 03896 break; 03897 default : 03898 cout << "BestFit"; 03899 break; 03900 } 03901 03902 cout << endl; 03903 03904 cout << "Build strategy : "; 03905 03906 if ((m_current_build_strategy & PrototypesMask) == Prototypes) 03907 { 03908 cout << "prototypes"; 03909 } 03910 else 03911 { 03912 cout << "no_prototypes"; 03913 } 03914 03915 if ((m_current_build_strategy & KeepMakefilesMask) == KeepMakefiles) 03916 { 03917 cout << " keep_makefiles"; 03918 } 03919 else 03920 { 03921 cout << " rebuild_makefiles"; 03922 } 03923 03924 if ((m_current_build_strategy & InstallAreaMask) == WithInstallArea) 03925 { 03926 cout << " with_install_area"; 03927 } 03928 else 03929 { 03930 cout << " without_install_area"; 03931 } 03932 03933 cout << endl; 03934 03935 cout << "Setup strategy : "; 03936 03937 if ((m_current_setup_strategy & SetupConfigMask) == SetupConfig) 03938 { 03939 cout << "config"; 03940 } 03941 else 03942 { 03943 cout << "no_config"; 03944 } 03945 03946 if ((m_current_setup_strategy & SetupRootMask) == SetupRoot) 03947 { 03948 cout << " root"; 03949 } 03950 else 03951 { 03952 cout << " no_root"; 03953 } 03954 03955 if ((m_current_setup_strategy & SetupCleanupMask) == SetupCleanup) 03956 { 03957 cout << " cleanup"; 03958 } 03959 else 03960 { 03961 cout << " no_cleanup"; 03962 } 03963 03964 cout << endl; 03965 } |
|
? |
Definition at line 4027 of file cmt_parser.cxx. Referenced by parser(). 04028 { 04029 cout << CmtSystem::get_cmt_config () << endl; 04030 } |
|
? |
Definition at line 3968 of file cmt_parser.cxx. Referenced by do_show_setup(), and parser(). 03969 { 03970 Tag::TagPtrVector tags = Tag::tags (); 03971 int index; 03972 03973 set_standard_macros (); 03974 03975 for (index = 0; index < tags.size (); index++) 03976 { 03977 const Tag* tag = tags[index]; 03978 if (tag != 0) 03979 { 03980 tag->show (m_quiet); 03981 } 03982 } 03983 } |
|
? |
Definition at line 3986 of file cmt_parser.cxx. Referenced by parser(). 03987 { 03988 const cmt_string& to_name = arguments[0]; 03989 03990 Use* current = &(Use::current()); 03991 03992 current->get_all_clients (to_name); 03993 } |
|
? |
Definition at line 3996 of file cmt_parser.cxx. Referenced by do_show_setup(), and parser(). 03997 { 03998 Use::show_all (); 03999 } |
|
? |
Definition at line 4002 of file cmt_parser.cxx. Referenced by parser(). 04003 { 04004 cout << m_current_version << endl; 04005 } |
|
? |
Definition at line 4008 of file cmt_parser.cxx. Referenced by parser(). 04009 { 04010 cmt_string package_name; 04011 04012 if (arguments.size () > 0) package_name = arguments[0]; 04013 04014 FileScanner scanner; 04015 04016 int path_index; 04017 04018 for (path_index = 0; path_index < m_cmt_path.size (); path_index++) 04019 { 04020 const cmt_string& path = m_cmt_path[path_index]; 04021 04022 scanner.scan_package (path, package_name); 04023 } 04024 } |
|
? |
Definition at line 4033 of file cmt_parser.cxx. Referenced by parser(). 04036 { 04037 // (unused??) Use& use = Use::current(); 04038 04039 cout << "try to unlock package " << package << " in " << CmtSystem::pwd () << endl; 04040 04041 set_standard_macros (); 04042 04043 CmtLock::status status = CmtLock::unlock (); 04044 } |
|
? |
Definition at line 4047 of file cmt_parser.cxx. Referenced by parser(). 04048 { 04049 cout << CMTVERSION << endl; 04050 } |
|
? |
Definition at line 4168 of file cmt_parser.cxx. Referenced by Include::print_filters(). 04169 { 04170 static cmt_string newdir; 04171 04172 CmtSystem::compress_path (dir, newdir); 04173 04174 return (newdir); 04175 } |
|
? |
Definition at line 4055 of file cmt_parser.cxx. Referenced by KwdVersionStrategy::action(), KwdSetupStrategy::action(), KwdBuildStrategy::action(), MacroBuilder::build(), PathBuilder::build(), SetBuilder::build(), Symbol::create(), SyntaxParser::do_parse_requirements_text(), use_action_iterator::get_use(), Use::need_new(), SymbolValueList::show(), and Symbol::show_macro(). 04056 { 04057 return (m_action); 04058 } |
|
? |
Definition at line 4070 of file cmt_parser.cxx. Referenced by Use::show_all(). 04071 { 04072 return (m_cmt_home); 04073 } |
|
? |
Definition at line 4060 of file cmt_parser.cxx. Referenced by CmtPathPattern::apply(), CmtInstallAreaMgr::build_current_install_area(), configure_current_cmtpath(), do_broadcast(), and Use::move_to(). 04061 { 04062 return (m_cmt_path); 04063 } |
|
? |
Definition at line 4065 of file cmt_parser.cxx. Referenced by CmtPathPattern::apply(), and CmtInstallAreaMgr::build_current_install_area(). 04066 { 04067 return (m_cmt_path_sources); 04068 } |
|
? |
Definition at line 4075 of file cmt_parser.cxx. Referenced by Use::show_all(). 04076 { 04077 return (m_cmt_user_context); 04078 } |
|
? |
Definition at line 4100 of file cmt_parser.cxx. Referenced by Symbol::action(), Fragment::action(), and SyntaxParser::parse_requirements_text(). 04101 { 04102 return (m_current_access); 04103 } |
|
? |
Definition at line 4105 of file cmt_parser.cxx. Referenced by do_build_library_links(), do_config(), do_remove_library_links(), do_setup(), and set_standard_macros(). 04106 { 04107 return (m_current_build_strategy); 04108 } |
|
? |
Definition at line 4090 of file cmt_parser.cxx. Referenced by StandardMacroBuilder::fill_for_branches(). 04091 { 04092 return (m_current_cmtpath); 04093 } |
|
? |
Definition at line 4080 of file cmt_parser.cxx. 04081 { 04082 return (m_current_dir); 04083 } |
|
? |
Definition at line 4095 of file cmt_parser.cxx. Referenced by StandardMacroBuilder::fill_for_branches(). 04096 { 04097 return (m_current_offset); 04098 } |
|
? |
Definition at line 4085 of file cmt_parser.cxx. Referenced by ReadmeGenerator::build(), Generator::build_constituent_makefile(), VSNETGenerator::build_project(), MSDEVGenerator::build_project(), VSNETGenerator::build_workspace(), and MSDEVGenerator::build_workspace(). 04086 { 04087 return (m_current_package); 04088 } |
|
? |
Definition at line 4110 of file cmt_parser.cxx. Referenced by do_config(), and do_setup(). 04111 { 04112 return (m_current_setup_strategy); 04113 } |
|
? |
Definition at line 4115 of file cmt_parser.cxx. Referenced by VersionSelector::instance(). 04116 { 04117 return (m_current_strategy); 04118 } |
|
? |
Definition at line 4120 of file cmt_parser.cxx. Referenced by CvsImplementation::build_version_directory(), dos_script_prefix(), and CvsImplementation::really_checkout_package(). 04121 { 04122 return (m_current_structuring_style); 04123 } |
|
? |
Definition at line 4130 of file cmt_parser.cxx. Referenced by MacroBuilder::build(), PathBuilder::build(), and SetBuilder::build(). 04131 { 04132 return (m_current_target); 04133 } |
|
? |
Definition at line 4125 of file cmt_parser.cxx. Referenced by ReadmeGenerator::build(). 04126 { 04127 return (m_current_version); 04128 } |
|
? |
Definition at line 4135 of file cmt_parser.cxx. Referenced by Package::Package(), CmtPathPattern::action(), Package::add(), Use::add(), Symbol::all_set(), LibraryGenerator::analyze_file(), Pattern::apply(), CmtPathPattern::apply(), DefaultMakefileGenerator::build(), build_deps(), build_deps_stream(), CmtInstallAreaMgr::config(), SyntaxParser::do_parse_requirements_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_action_iterator::get_use(), Use::move_to(), Use::need_new(), Use::reach_package(), Package::remove_use(), Use::reorder(), resolve_value(), resolve_value_for_macros(), Use::select_alternate(), Use::set_auto_imports(), Use::set_auto_imports_state(), Use::show_all(), Symbol::show_macro(), and suppress_OS_delimiters(). 04136 { 04137 return (m_debug); 04138 } |
|
? |
Definition at line 4140 of file cmt_parser.cxx. Referenced by KwdDefault::action(), KwdVersionStrategy::action(), KwdSetupStrategy::action(), KwdBuildStrategy::action(), Use::add(), MacroBuilder::build(), PathBuilder::build(), SetBuilder::build(), CmtInstallAreaMgr::config(), Symbol::create(), SyntaxParser::do_parse(), DependencyAnalyzer::filter(), TriggerAnalyzer::filter(), Use::need_new(), BestFitNoCheckSelector::operate(), Use::show_all(), and Symbol::show_macro(). 04141 { 04142 return (m_quiet); 04143 } |
|
? |
Definition at line 4145 of file cmt_parser.cxx. Referenced by Use::add(). 04146 { 04147 return (m_recursive); 04148 } |
|
? |
Definition at line 4150 of file cmt_parser.cxx. Referenced by Symbol::action(), Fragment::action(), Use::add(), Use::clear(), use_action_iterator::get_use(), SyntaxParser::parse_requirements_text(), Use::set(), and Symbol::valid(). 04151 { 04152 return (m_scope); 04153 } |
|
? |
Definition at line 4155 of file cmt_parser.cxx. Referenced by use_action_iterator::get_use(). 04156 { 04157 if (m_scope_filtering_mode == default_filtering_mode) 04158 { 04159 return (block_private_uses); 04160 } 04161 else 04162 { 04163 return (m_scope_filtering_mode); 04164 } 04165 } |
|
? |
Definition at line 4222 of file cmt_parser.cxx. Referenced by do_config(). 04223 { 04224 #ifdef WIN32 04225 static const int modes = 1; 04226 static const cmt_string suffix[1] = {"bat"}; 04227 static const PrintMode mode[1] = {Bat}; 04228 #else 04229 static const int modes = 2; 04230 static const cmt_string suffix[2] = {"csh", "sh"}; 04231 static const PrintMode mode[2] = {Csh, Sh}; 04232 #endif 04233 04234 cout << "Creating cleanup scripts." << endl; 04235 04236 cmt_string temp; 04237 int i; 04238 04239 cmt_string version = m_current_version; 04240 if (version == "v*") version = ""; 04241 04242 for (i = 0; i < modes; i++) 04243 { 04244 cmt_string file_name = "cleanup"; 04245 file_name += "."; 04246 file_name += suffix[i]; 04247 file_name += "."; 04248 file_name += "new"; 04249 04250 FILE* f = fopen (file_name.c_str (), "wb"); 04251 if (f != NULL) 04252 { 04253 if (mode[i] == Csh) 04254 { 04255 fprintf (f, "if ( $?CMTROOT == 0 ) then\n"); 04256 fprintf (f, " setenv CMTROOT %s\n", m_cmt_root.c_str ()); 04257 fprintf (f, "endif\n"); 04258 fprintf (f, "source ${CMTROOT}/mgr/setup.csh\n"); 04259 fprintf (f, "set tempfile=`${CMTROOT}/mgr/cmt build temporary_name -quiet`\n"); 04260 fprintf (f, "if $status != 0 then\n set tempfile=/tmp/cmt.$$\nendif\n"); 04261 fprintf (f, "${CMTROOT}/mgr/cmt -quiet cleanup -%s " 04262 "-pack=%s -version=%s -path=%s $* >${tempfile}; " 04263 "source ${tempfile}\n", 04264 suffix[i].c_str (), 04265 m_current_package.c_str (), 04266 version.c_str (), 04267 m_current_path.c_str ()); 04268 fprintf (f, "/bin/rm -f ${tempfile}\n"); 04269 } 04270 else if (mode[i] == Sh) 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, "tempfile=`${CMTROOT}/mgr/cmt build temporary_name -quiet`\n"); 04277 fprintf (f, "if test ! $? = 0 ; then tempfile=/tmp/cmt.$$; fi\n"); 04278 fprintf (f, "${CMTROOT}/mgr/cmt -quiet cleanup -%s " 04279 "-pack=%s -version=%s -path=%s $* >${tempfile}; " 04280 ". ${tempfile}\n", 04281 suffix[i].c_str (), 04282 m_current_package.c_str (), 04283 version.c_str (), 04284 m_current_path.c_str ()); 04285 fprintf (f, "/bin/rm -f ${tempfile}\n"); 04286 } 04287 else if (mode[i] == Bat) 04288 { 04289 dos_script_prefix (f, m_cmt_root, 04290 m_current_package, version, m_current_path, 04291 "cleanup"); 04292 } 04293 04294 fprintf (f, "\n"); 04295 04296 fclose (f); 04297 04298 cmt_string old_file_name = "cleanup"; 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 } |
|
? |
Definition at line 4308 of file cmt_parser.cxx. Referenced by do_config(). 04309 { 04310 #ifdef WIN32 04311 static const int modes = 1; 04312 static const cmt_string suffix[1] = {"bat"}; 04313 static const PrintMode mode[1] = {Bat}; 04314 #else 04315 static const int modes = 2; 04316 static const cmt_string suffix[2] = {"csh", "sh"}; 04317 static const PrintMode mode[2] = {Csh, Sh}; 04318 #endif 04319 04320 cout << "Creating setup scripts." << endl; 04321 04322 04323 cmt_string no_cleanup_opt; 04324 04325 if ((m_current_setup_strategy & SetupCleanupMask) != SetupCleanup) 04326 { 04327 no_cleanup_opt = " -no_cleanup"; 04328 } 04329 04330 cmt_string temp; 04331 int i; 04332 04333 cmt_string version = m_current_version; 04334 if (version == "v*") version = ""; 04335 04336 for (i = 0; i < modes; i++) 04337 { 04338 cmt_string file_name = "setup"; 04339 file_name += "."; 04340 file_name += suffix[i]; 04341 file_name += "."; 04342 file_name += "new"; 04343 04344 FILE* f = fopen (file_name.c_str (), "wb"); 04345 if (f != NULL) 04346 { 04347 if (mode[i] == Csh) 04348 { 04349 fprintf (f, "# echo \"Setting %s %s in %s\"\n", 04350 m_current_package.c_str (), 04351 version.c_str (), 04352 m_current_path.c_str ()); 04353 fprintf (f, "\n"); 04354 04355 fprintf (f, "if ( $?CMTROOT == 0 ) then\n"); 04356 fprintf (f, " setenv CMTROOT %s\n", m_cmt_root.c_str ()); 04357 fprintf (f, "endif\n"); 04358 fprintf (f, "source ${CMTROOT}/mgr/setup.csh\n"); 04359 fprintf (f, "\n"); 04360 fprintf (f, "set tempfile=`${CMTROOT}/mgr/cmt build temporary_name -quiet`\n"); 04361 fprintf (f, "if $status != 0 then\n set tempfile=/tmp/cmt.$$\nendif\n"); 04362 fprintf (f, "${CMTROOT}/mgr/cmt -quiet setup -%s " 04363 "-pack=%s -version=%s -path=%s %s $* >${tempfile}; " 04364 "source ${tempfile}\n", 04365 suffix[i].c_str (), 04366 m_current_package.c_str (), 04367 version.c_str (), 04368 m_current_path.c_str (), 04369 no_cleanup_opt.c_str ()); 04370 fprintf (f, "/bin/rm -f ${tempfile}\n"); 04371 } 04372 else if (mode[i] == Sh) 04373 { 04374 fprintf (f, "# echo \"Setting %s %s in %s\"\n", 04375 m_current_package.c_str (), 04376 version.c_str (), 04377 m_current_path.c_str ()); 04378 fprintf (f, "\n"); 04379 04380 fprintf (f, "if test \"${CMTROOT}\" = \"\"; then\n"); 04381 fprintf (f, " CMTROOT=%s; export CMTROOT\n", m_cmt_root.c_str ()); 04382 fprintf (f, "fi\n"); 04383 fprintf (f, ". ${CMTROOT}/mgr/setup.sh\n"); 04384 fprintf (f, "\n"); 04385 fprintf (f, "tempfile=`${CMTROOT}/mgr/cmt build temporary_name -quiet`\n"); 04386 fprintf (f, "if test ! $? = 0 ; then tempfile=/tmp/cmt.$$; fi\n"); 04387 fprintf (f, "${CMTROOT}/mgr/cmt -quiet setup -%s " 04388 "-pack=%s -version=%s -path=%s %s $* >${tempfile}; " 04389 ". ${tempfile}\n", 04390 suffix[i].c_str (), 04391 m_current_package.c_str (), 04392 version.c_str (), 04393 m_current_path.c_str (), 04394 no_cleanup_opt.c_str ()); 04395 fprintf (f, "/bin/rm -f ${tempfile}\n"); 04396 } 04397 else if (mode[i] == Bat) 04398 { 04399 fprintf (f, "rem Setting %s %s in %%~d0%%~p0\n", 04400 m_current_package.c_str (), 04401 version.c_str ()); 04402 dos_script_prefix (f, m_cmt_root, 04403 m_current_package, version, m_current_path, 04404 "setup", no_cleanup_opt); 04405 } 04406 04407 fprintf (f, "\n"); 04408 04409 fclose (f); 04410 04411 cmt_string old_file_name = "setup"; 04412 old_file_name += "."; 04413 old_file_name += suffix[i]; 04414 04415 CmtSystem::compare_and_update_files (file_name, old_file_name); 04416 } 04417 } 04418 } |
|
? |
Definition at line 4421 of file cmt_parser.cxx. Referenced by do_config(). 04422 { 04423 #ifdef WIN32 04424 static const int modes = 1; 04425 static const cmt_string suffix[1] = {"bat"}; 04426 static const PrintMode mode[1] = {Bat}; 04427 #else 04428 static const int modes = 2; 04429 static const cmt_string suffix[2] = {"csh", "sh"}; 04430 static const PrintMode mode[2] = {Csh, Sh}; 04431 #endif 04432 04433 cout << "Creating cleanup scripts." << endl; 04434 04435 cmt_string temp; 04436 int i; 04437 04438 cmt_string version = m_current_version; 04439 if (version == "v*") version = ""; 04440 04441 for (i = 0; i < modes; i++) 04442 { 04443 cmt_string file_name = "cleanup"; 04444 file_name += "."; 04445 file_name += suffix[i]; 04446 file_name += "."; 04447 file_name += "new"; 04448 04449 FILE* f = fopen (file_name.c_str (), "wb"); 04450 if (f != NULL) 04451 { 04452 if (mode[i] == Csh) 04453 { 04454 fprintf (f, "if ( $?CMTROOT == 0 ) then\n"); 04455 fprintf (f, " setenv CMTROOT %s\n", m_cmt_root.c_str ()); 04456 fprintf (f, "endif\n"); 04457 fprintf (f, "source ${CMTROOT}/mgr/setup.csh\n"); 04458 fprintf (f, "set tempfile=`${CMTROOT}/mgr/cmt build temporary_name -quiet`\n"); 04459 fprintf (f, "if $status != 0 then\n set tempfile=/tmp/cmt.$$\nendif\n"); 04460 fprintf (f, "${CMTROOT}/mgr/cmt -quiet cleanup -%s -pack=cmt_standalone -path=%s $* >${tempfile}; " 04461 "source ${tempfile}\n", 04462 suffix[i].c_str (), 04463 m_current_path.c_str ()); 04464 fprintf (f, "/bin/rm -f ${tempfile}\n"); 04465 } 04466 else if (mode[i] == Sh) 04467 { 04468 fprintf (f, "if test \"${CMTROOT}\" = \"\"; then\n"); 04469 fprintf (f, " CMTROOT=%s; export CMTROOT\n", m_cmt_root.c_str ()); 04470 fprintf (f, "fi\n"); 04471 fprintf (f, ". ${CMTROOT}/mgr/setup.sh\n"); 04472 fprintf (f, "tempfile=`${CMTROOT}/mgr/cmt build temporary_name -quiet`\n"); 04473 fprintf (f, "if test ! $? = 0 ; then tempfile=/tmp/cmt.$$; fi\n"); 04474 fprintf (f, "${CMTROOT}/mgr/cmt -quiet cleanup -%s -pack=cmt_standalone -path=%s $* >${tempfile}; " 04475 ". ${tempfile}\n", 04476 suffix[i].c_str (), 04477 m_current_path.c_str ()); 04478 fprintf (f, "/bin/rm -f ${tempfile}\n"); 04479 } 04480 else 04481 { 04482 dos_script_prefix (f, m_cmt_root, 04483 "cmt_standalone", "", m_current_path, 04484 "cleanup"); 04485 } 04486 04487 fprintf (f, "\n"); 04488 04489 fclose (f); 04490 04491 cmt_string old_file_name = "cleanup"; 04492 old_file_name += "."; 04493 old_file_name += suffix[i]; 04494 04495 CmtSystem::compare_and_update_files (file_name, old_file_name); 04496 } 04497 } 04498 } |
|
? |
Definition at line 4501 of file cmt_parser.cxx. Referenced by do_config(). 04502 { 04503 #ifdef WIN32 04504 static const int modes = 1; 04505 static const cmt_string suffix[1] = {"bat"}; 04506 static const PrintMode mode[1] = {Bat}; 04507 #else 04508 static const int modes = 2; 04509 static const cmt_string suffix[2] = {"csh", "sh"}; 04510 static const PrintMode mode[2] = {Csh, Sh}; 04511 #endif 04512 04513 cout << "Creating setup scripts." << endl; 04514 04515 cmt_string no_cleanup_opt; 04516 04517 if ((m_current_setup_strategy & SetupCleanupMask) != SetupCleanup) 04518 { 04519 no_cleanup_opt = " -no_cleanup"; 04520 } 04521 04522 cmt_string temp; 04523 int i; 04524 04525 for (i = 0; i < modes; i++) 04526 { 04527 cmt_string file_name = "setup"; 04528 file_name += "."; 04529 file_name += suffix[i]; 04530 file_name += "."; 04531 file_name += "new"; 04532 04533 FILE* f = fopen (file_name.c_str (), "wb"); 04534 if (f != NULL) 04535 { 04536 if (mode[i] == Csh) 04537 { 04538 fprintf (f, "# echo \"Setting standalone package\"\n"); 04539 fprintf (f, "\n"); 04540 04541 fprintf (f, "if ( $?CMTROOT == 0 ) then\n"); 04542 fprintf (f, " setenv CMTROOT %s\n", m_cmt_root.c_str ()); 04543 fprintf (f, "endif\n"); 04544 fprintf (f, "source ${CMTROOT}/mgr/setup.csh\n"); 04545 fprintf (f, "set tempfile=`${CMTROOT}/mgr/cmt build temporary_name -quiet`\n"); 04546 fprintf (f, "if $status != 0 then\n set tempfile=/tmp/cmt.$$\nendif\n"); 04547 fprintf (f, "${CMTROOT}/mgr/cmt -quiet setup -%s -pack=cmt_standalone -path=%s %s $* >${tempfile}; " 04548 "source ${tempfile}\n", 04549 suffix[i].c_str (), 04550 m_current_path.c_str (), 04551 no_cleanup_opt.c_str ()); 04552 fprintf (f, "/bin/rm -f ${tempfile}\n"); 04553 } 04554 else if (mode[i] == Sh) 04555 { 04556 fprintf (f, "# echo \"Setting standalone package\"\n"); 04557 fprintf (f, "\n"); 04558 04559 fprintf (f, "if test \"${CMTROOT}\" = \"\"; then\n"); 04560 fprintf (f, " CMTROOT=%s; export CMTROOT\n", m_cmt_root.c_str ()); 04561 fprintf (f, "fi\n"); 04562 fprintf (f, ". ${CMTROOT}/mgr/setup.sh\n"); 04563 fprintf (f, "\n"); 04564 fprintf (f, "tempfile=`${CMTROOT}/mgr/cmt build temporary_name -quiet`\n"); 04565 fprintf (f, "if test ! $? = 0 ; then tempfile=/tmp/cmt.$$; fi\n"); 04566 fprintf (f, "${CMTROOT}/mgr/cmt -quiet setup -%s -pack=cmt_standalone -path=%s %s $* >${tempfile}; " 04567 ". ${tempfile}\n", 04568 suffix[i].c_str (), 04569 m_current_path.c_str (), 04570 no_cleanup_opt.c_str ()); 04571 fprintf (f, "/bin/rm -f ${tempfile}\n"); 04572 } 04573 else 04574 { 04575 fprintf (f, "rem Setting standalone package\n"); 04576 dos_script_prefix (f, m_cmt_root, 04577 "cmt_standalone", "", m_current_path, 04578 "setup", no_cleanup_opt); 04579 } 04580 04581 fprintf (f, "\n"); 04582 04583 fclose (f); 04584 04585 cmt_string old_file_name = "setup"; 04586 old_file_name += "."; 04587 old_file_name += suffix[i]; 04588 04589 CmtSystem::compare_and_update_files (file_name, old_file_name); 04590 } 04591 } 04592 } |
|
? |
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 4599 of file cmt_parser.cxx. 04603 { 04604 clear (); 04605 configure (); 04606 04607 m_action = action_load; 04608 m_recursive = true; 04609 04610 if (((package != "") && (version != "")) || (m_current_package == "")) 04611 { 04612 // 04613 // Here we want to connect to a new package, or to the current package 04614 // but with another tag. 04615 // 04616 // the 'package' argument may include a directory offset. Thus 'path' 04617 // is only expected to hold the base directory. 04618 // 04619 cmt_string offset; 04620 cmt_string package_name; 04621 04622 CmtSystem::dirname (package, offset); 04623 CmtSystem::basename (package, package_name); 04624 04625 if (offset != "") 04626 { 04627 m_current_path = path; 04628 m_current_path += CmtSystem::file_separator (); 04629 m_current_path += offset; 04630 } 04631 else 04632 { 04633 m_current_path = path; 04634 } 04635 04636 m_current_package = package_name; 04637 m_current_version = version; 04638 } 04639 04640 if (tag_name != "") 04641 { 04642 Tag* tag; 04643 04644 Tag::unmark_all (); 04645 configure_version_tag (); 04646 configure_site_tag (0); 04647 configure_uname_tag (); 04648 configure_hosttype_tag (); 04649 04650 m_current_tag = tag_name; 04651 04652 //if (!m_quiet) cerr << "load1> current_tag=" << m_current_tag << endl; 04653 04654 tag = Tag::add (tag_name, PriorityTag, "load", 0); 04655 tag->mark (); 04656 } 04657 04658 /* 04659 Set to developer mode if positioned into the package 04660 (which is detected since we were able to retreive the 04661 Version, Package and Path) 04662 */ 04663 04664 if ((m_current_path == "") || 04665 (m_current_package == "") || 04666 (m_current_version == "")) 04667 { 04668 m_current_access = UserMode; 04669 } 04670 else 04671 { 04672 m_current_access = DeveloperMode; 04673 } 04674 04675 use_cmt (); 04676 04677 cmt_string dir; 04678 04679 /* 04680 Try to access the package. 04681 */ 04682 04683 if (m_current_path != "") 04684 { 04685 dir = m_current_path; 04686 } 04687 else 04688 { 04689 dir = m_default_path; 04690 } 04691 04692 if (!CmtSystem::cd (m_current_path)) 04693 { 04694 if (!m_quiet) 04695 { 04696 cout << "#CMT> Cannot reach the directory " << 04697 m_current_path << endl; 04698 } 04699 CmtError::set (CmtError::package_not_found, "Load> Cannot reach the path directory"); 04700 CmtSystem::cd (m_current_dir); 04701 04702 return (false); 04703 } 04704 04705 dir += CmtSystem::file_separator (); 04706 dir += m_current_package; 04707 04708 if (!CmtSystem::cd (m_current_package)) 04709 { 04710 if (!m_quiet) 04711 { 04712 cout << "#CMT::load> Cannot reach the package " << 04713 m_current_package << endl; 04714 } 04715 CmtError::set (CmtError::package_not_found, "Load> Cannot reach the package directory"); 04716 CmtSystem::cd (m_current_dir); 04717 04718 return (false); 04719 } 04720 04721 dir += CmtSystem::file_separator (); 04722 dir += m_current_version; 04723 04724 m_current_style = none_style; 04725 04726 if (!CmtSystem::cd (m_current_version)) 04727 { 04728 if (!CmtSystem::test_directory ("cmt")) 04729 { 04730 if (!m_quiet) 04731 { 04732 cout << "#CMT> Cannot reach the version " << 04733 m_current_version << endl; 04734 } 04735 CmtError::set (CmtError::package_not_found, "Load> Cannot reach the version directory"); 04736 CmtSystem::cd (m_current_dir); 04737 04738 return (false); 04739 } 04740 else 04741 { 04742 m_current_style = no_version_style; 04743 } 04744 } 04745 04746 if (CmtSystem::cd ("cmt")) 04747 { 04748 dir += CmtSystem::file_separator (); 04749 dir += "cmt"; 04750 if (m_current_style == none_style) m_current_style = cmt_style; 04751 } 04752 else 04753 { 04754 /* 04755 if (!m_quiet) 04756 { 04757 cout << "Cannot reach the cmt branch" << endl; 04758 } 04759 */ 04760 04761 if (CmtSystem::cd ("mgr")) 04762 { 04763 dir += CmtSystem::file_separator (); 04764 dir += "mgr"; 04765 if (m_current_style == none_style) m_current_style = mgr_style; 04766 } 04767 else 04768 { 04769 if (!m_quiet) 04770 { 04771 cout << "#CMT> Cannot reach the mgr branch" << endl; 04772 } 04773 04774 CmtError::set (CmtError::package_not_found, 04775 "Load> Cannot reach the mgr/cmt directory"); 04776 CmtSystem::cd (m_current_dir); 04777 04778 return (false); 04779 } 04780 } 04781 04782 /* 04783 Check Tag is always set up 04784 */ 04785 04786 if (m_current_tag == "") 04787 { 04788 char* env; 04789 04790 env = getenv (m_current_config.c_str ()); 04791 if (env != 0) 04792 { 04793 Tag* tag; 04794 04795 tag = Tag::add (env, PriorityConfig, "load", 0); 04796 tag->mark (); 04797 m_current_tag = env; 04798 04799 //if (!m_quiet) cerr << "load2> current_tag=" << m_current_tag << endl; 04800 04801 } 04802 else 04803 { 04804 m_current_tag = m_cmt_config; 04805 04806 //if (!m_quiet) cerr << "load3> current_tag=" << m_current_tag << endl; 04807 04808 } 04809 } 04810 04811 if (m_debug) 04812 { 04813 cout << "pwd = " << CmtSystem::pwd () << endl; 04814 } 04815 04816 configure_current_dir (); 04817 build_prefix (m_current_package, m_current_prefix); 04818 build_config (m_current_prefix, m_current_config); 04819 04820 Use* use = &(Use::current()); 04821 use->path = m_current_path; 04822 use->set_package_name (m_current_package); 04823 use->version = m_current_version; 04824 use->prefix = m_current_prefix; 04825 use->done = false; 04826 use->style = m_current_style; 04827 04828 /* 04829 Work on the requirements file. 04830 */ 04831 04832 dir += CmtSystem::file_separator (); 04833 dir += "requirements"; 04834 SyntaxParser::parse_requirements (dir, use); 04835 04836 if (CmtError::has_pending_error ()) return (false); 04837 04841 Pattern::apply_all_globals (); 04842 04843 /* 04844 Select all possible tags 04845 */ 04846 04847 Tag::restore_tree (); 04848 04849 return (true); 04850 } |
|
? |
See reach_current_package for an explanation of this call. Definition at line 4853 of file cmt_parser.cxx. Referenced by Constituent::add(). 04854 { 04855 if ((m_current_build_strategy & PrototypesMask) == Prototypes) return (true); 04856 else return (false); 04857 } |
|
? |
Definition at line 4860 of file cmt_parser.cxx. Referenced by parser(). 04865 { 04866 /* 04867 Decoding arguments. 04868 04869 While decoding all arguments, no requirements analysis should 04870 occur. Every new option, or parameter should be saved and 04871 used later at actual analysis time. 04872 */ 04873 04874 cmt_string arg; 04875 04876 m_action = action_none; 04877 m_help_action = action_none; 04878 04879 arguments.clear (); 04880 extra_line.erase (0); 04881 extra_file.erase (0); 04882 mode = Csh; 04883 04884 /* 04885 Tag management. 04886 --------------- 04887 04888 Tag settings may come from : 04889 04890 - existing environment variables: 04891 04892 1) CMTCONFIG 04893 04894 2) CMTEXTRATAGS for addons 04895 04896 - arguments: 04897 04898 -tag= |
|
? |
Definition at line 6760 of file cmt_parser.cxx. 06761 { 06762 PrintMode mode = Csh; 06763 CmtSystem::cmt_string_vector arguments; 06764 cmt_string extra_line; 06765 cmt_string extra_file; 06766 06767 if (argc <= 1) 06768 { 06769 do_help (); 06770 exit (0); 06771 } 06772 06773 clear (); 06774 configure (); 06775 06776 CmtError::clear (); 06777 06778 /* 06779 Set private if positioned inside the package 06780 (which is detected since we were able to retreive the 06781 Version, Package and Path) 06782 */ 06783 06784 if ((m_current_path.size () == 0) || 06785 (m_current_package.size () == 0) || 06786 (m_current_version.size () == 0)) 06787 { 06788 m_current_access = UserMode; 06789 } 06790 else 06791 { 06792 m_current_access = DeveloperMode; 06793 } 06794 06795 parse_arguments (argc, argv, arguments, 06796 extra_line, extra_file, mode); 06797 06798 if (m_configure_error != "") 06799 { 06800 if (!m_quiet) cout << "# CMT>" << m_configure_error << endl; 06801 } 06802 06803 if (CmtError::has_pending_error ()) 06804 { 06805 int code = CmtError::get_last_error_code (); 06806 if (!m_quiet) CmtError::print (); 06807 clear (); 06808 06809 return (code); 06810 } 06811 06812 if (m_debug) 06813 { 06814 cout << "After parse_argument> pack=" << m_current_package 06815 << " m_current_tag=" << m_current_tag 06816 << " cwd=" << CmtSystem::pwd () 06817 << endl; 06818 } 06819 06820 /* 06821 Now actual requirements analysis can take place. 06822 06823 Extra lines or files are analysed first. 06824 */ 06825 06826 if (strlen (extra_file.c_str ()) > 0) SyntaxParser::parse_requirements (extra_file, 0); 06827 if (strlen (extra_line.c_str ()) > 0) SyntaxParser::parse_requirements_line (extra_line, 0); 06828 06829 // 06830 // For some of the actions, the CMT package must be automatically 06831 // included 06832 // 06833 06834 if (m_debug) cout << "parser1> current_tag=" << m_current_tag << endl; 06835 06836 if (m_help_action == action_help) 06837 { 06838 do_help (m_action); 06839 return (0); 06840 } 06841 06842 switch (m_action) 06843 { 06844 // case action_none : 06845 case action_awk : 06846 case action_broadcast : 06847 case action_build_constituent_makefile : 06848 case action_build_constituents_makefile : 06849 case action_build_dependencies : 06850 case action_build_library_links : 06851 case action_build_make_setup : 06852 case action_build_msdev : 06853 case action_build_vsnet : 06854 case action_build_os9_makefile : 06855 // case action_build_prototype : 06856 case action_build_readme : 06857 case action_build_tag_makefile : 06858 // case action_build_temporary_name : 06859 case action_build_triggers : 06860 case action_build_windefs : 06861 case action_check_configuration : 06862 // case action_check_files : 06863 // case action_check_version : 06864 case action_checkout : 06865 case action_cleanup : 06866 case action_config : 06867 case action_create : 06868 // case action_cvsbranches : 06869 // case action_cvssubpackages : 06870 // case action_cvstags : 06871 case action_expand_model : 06872 case action_filter : 06873 // case action_help : 06874 case action_load : 06875 case action_lock : 06876 case action_remove : 06877 case action_remove_library_links : 06878 case action_run : 06879 case action_run_sequence : 06880 case action_set_version : 06881 case action_set_versions : 06882 case action_setup : 06883 case action_show_all_tags : 06884 case action_show_applied_patterns : 06885 // case action_show_author : 06886 // case action_show_branches : 06887 // case action_show_clients : 06888 case action_show_cmtpath_patterns : 06889 // case action_show_constituent : 06890 // case action_show_constituent_names : 06891 // case action_show_constituents : 06892 case action_show_cycles : 06893 case action_show_fragment : 06894 case action_show_fragments : 06895 case action_show_groups : 06896 case action_show_include_dirs : 06897 case action_show_language : 06898 case action_show_languages : 06899 case action_show_macro : 06900 case action_show_macro_names : 06901 case action_show_macro_value : 06902 case action_show_macros : 06903 // case action_show_manager : 06904 // case action_show_packages : 06905 case action_show_path : 06906 case action_show_pattern : 06907 case action_show_pattern_names : 06908 case action_show_patterns : 06909 case action_show_projects : 06910 // case action_show_pwd : 06911 case action_show_setup : 06912 case action_show_set : 06913 case action_show_set_names : 06914 case action_show_set_value : 06915 case action_show_sets : 06916 case action_show_strategies : 06917 case action_show_tags : 06918 case action_show_use_paths : 06919 case action_show_uses : 06920 case action_show_version : 06921 // case action_show_versions : 06922 // case action_system : 06923 case action_unlock : 06924 case action_version : 06925 use_cmt (); 06926 // 06927 // Now parse the requirements file stored in ${CMTHOME} 06928 // 06929 06930 use_home_requirements (); 06931 06932 break; 06933 default: 06934 break; 06935 } 06936 06937 if (m_debug) cout << "parser2> current_tag=" << m_current_tag << endl; 06938 06939 // 06940 // Setting up recursive actions 06941 // 06942 06943 switch (m_action) 06944 { 06945 // case action_none : 06946 case action_awk : 06947 case action_broadcast : 06948 case action_build_constituent_makefile : 06949 case action_build_constituents_makefile : 06950 case action_build_dependencies : 06951 case action_build_library_links : 06952 case action_build_make_setup : 06953 case action_build_msdev : 06954 case action_build_vsnet : 06955 case action_build_os9_makefile : 06956 // case action_build_prototype : 06957 case action_build_readme : 06958 case action_build_tag_makefile : 06959 // case action_build_temporary_name : 06960 case action_build_triggers : 06961 case action_build_windefs : 06962 case action_check_configuration : 06963 // case action_check_files : 06964 // case action_check_version : 06965 // case action_checkout : 06966 case action_cleanup : 06967 case action_config : 06968 // case action_create : 06969 // case action_cvsbranches : 06970 // case action_cvssubpackages : 06971 // case action_cvstags : 06972 case action_expand_model : 06973 case action_filter : 06974 // case action_help : 06975 case action_load : 06976 // case action_lock : 06977 // case action_remove : 06978 case action_remove_library_links : 06979 case action_run : 06980 case action_run_sequence : 06981 // case action_set_version : 06982 case action_set_versions : 06983 case action_setup : 06984 case action_show_all_tags : 06985 case action_show_applied_patterns : 06986 // case action_show_author : 06987 // case action_show_branches : 06988 // case action_show_clients : 06989 case action_show_cmtpath_patterns : 06990 case action_show_constituent : 06991 case action_show_constituent_names : 06992 case action_show_constituents : 06993 case action_show_cycles : 06994 case action_show_fragment : 06995 case action_show_fragments : 06996 case action_show_groups : 06997 case action_show_include_dirs : 06998 case action_show_language : 06999 case action_show_languages : 07000 case action_show_macro : 07001 case action_show_macro_names : 07002 case action_show_macro_value : 07003 case action_show_macros : 07004 // case action_show_manager : 07005 // case action_show_packages : 07006 case action_show_path : 07007 case action_show_pattern : 07008 case action_show_pattern_names : 07009 case action_show_patterns : 07010 case action_show_projects : 07011 // case action_show_pwd : 07012 case action_show_setup : 07013 case action_show_set : 07014 case action_show_set_names : 07015 case action_show_set_value : 07016 case action_show_sets : 07017 case action_show_strategies : 07018 case action_show_tags : 07019 case action_show_use_paths : 07020 case action_show_uses : 07021 // case action_show_version : 07022 // case action_show_versions : 07023 // case action_system : 07024 // case action_unlock : 07025 // case action_version : 07026 m_recursive = true; 07027 break; 07028 default: 07029 m_recursive = false; 07030 break; 07031 } 07032 07033 // 07034 // Actions for which the context of the package is checked, 07035 // and the requirements file is analysed. 07036 // 07037 07038 switch (m_action) 07039 { 07040 case action_none : 07041 case action_awk : 07042 case action_broadcast : 07043 case action_build_constituent_makefile : 07044 case action_build_constituents_makefile : 07045 case action_build_dependencies : 07046 case action_build_library_links : 07047 case action_build_make_setup : 07048 case action_build_msdev : 07049 case action_build_vsnet : 07050 case action_build_os9_makefile : 07051 // case action_build_prototype : 07052 case action_build_readme : 07053 case action_build_tag_makefile : 07054 // case action_build_temporary_name : 07055 case action_build_triggers : 07056 case action_build_windefs : 07057 case action_check_configuration : 07058 // case action_check_files : 07059 // case action_check_version : 07060 // case action_checkout : 07061 case action_cleanup : 07062 case action_config : 07063 // case action_create : 07064 // case action_cvsbranches : 07065 // case action_cvssubpackages : 07066 // case action_cvstags : 07067 case action_expand_model : 07068 case action_filter : 07069 // case action_help : 07070 case action_load : 07071 case action_lock : 07072 // case action_remove : 07073 case action_remove_library_links : 07074 case action_run : 07075 // case action_run_sequence : 07076 // case action_set_version : 07077 case action_set_versions : 07078 case action_setup : 07079 case action_show_all_tags : 07080 case action_show_applied_patterns : 07081 case action_show_author : 07082 case action_show_branches : 07083 // case action_show_clients : 07084 case action_show_cmtpath_patterns : 07085 case action_show_constituent : 07086 case action_show_constituent_names : 07087 case action_show_constituents : 07088 case action_show_cycles : 07089 case action_show_fragment : 07090 case action_show_fragments : 07091 case action_show_groups : 07092 case action_show_include_dirs : 07093 case action_show_language : 07094 case action_show_languages : 07095 case action_show_macro : 07096 case action_show_macro_names : 07097 case action_show_macro_value : 07098 case action_show_macros : 07099 case action_show_manager : 07100 // case action_show_packages : 07101 case action_show_path : 07102 case action_show_pattern : 07103 case action_show_pattern_names : 07104 case action_show_patterns : 07105 case action_show_projects : 07106 case action_show_pwd : 07107 case action_show_setup : 07108 case action_show_set : 07109 case action_show_set_names : 07110 case action_show_set_value : 07111 case action_show_sets : 07112 case action_show_strategies : 07113 case action_show_tags : 07114 case action_show_use_paths : 07115 case action_show_uses : 07116 case action_show_version : 07117 // case action_show_versions : 07118 // case action_system : 07119 case action_unlock : 07120 // case action_version : 07121 reach_current_package (); 07122 use_user_context_requirements (); 07123 break; 07124 default: 07125 break; 07126 } 07127 07128 if (m_debug) cout << "parser3> current_tag=" << m_current_tag << endl; 07129 07130 // 07131 // Perform some actions even if there is an error 07132 // 07133 07134 if (CmtError::has_pending_error ()) 07135 { 07136 int code = CmtError::get_last_error_code (); 07137 if (!m_quiet) CmtError::print (); 07138 07139 switch (m_action) 07140 { 07141 // case action_none : 07142 // case action_awk : 07143 // case action_broadcast : 07144 case action_build_constituent_makefile : 07145 case action_build_constituents_makefile : 07146 case action_build_dependencies : 07147 case action_build_library_links : 07148 case action_build_make_setup : 07149 case action_build_msdev : 07150 case action_build_vsnet : 07151 case action_build_os9_makefile : 07152 case action_build_prototype : 07153 case action_build_readme : 07154 case action_build_tag_makefile : 07155 // case action_build_temporary_name : 07156 case action_build_triggers : 07157 case action_build_windefs : 07158 case action_check_configuration : 07159 // case action_check_files : 07160 // case action_check_version : 07161 // case action_checkout : 07162 case action_cleanup : 07163 // case action_config : 07164 // case action_create : 07165 // case action_cvsbranches : 07166 // case action_cvssubpackages : 07167 // case action_cvstags : 07168 // case action_expand_model : 07169 // case action_filter : 07170 // case action_help : 07171 case action_load : 07172 case action_lock : 07173 case action_remove : 07174 case action_remove_library_links : 07175 // case action_run : 07176 case action_run_sequence : 07177 // case action_set_version : 07178 // case action_set_versions : 07179 case action_setup : 07180 // case action_show_all_tags : 07181 // case action_show_applied_patterns : 07182 // case action_show_author : 07183 // case action_show_branches : 07184 // case action_show_clients : 07185 // case action_show_cmtpath_patterns : 07186 // case action_show_constituent : 07187 // case action_show_constituent_names : 07188 // case action_show_constituents : 07189 // case action_show_cycles : 07190 // case action_show_fragment : 07191 // case action_show_fragments : 07192 // case action_show_groups : 07193 // case action_show_include_dirs : 07194 // case action_show_language : 07195 // case action_show_languages : 07196 // case action_show_macro : 07197 // case action_show_macro_names : 07198 // case action_show_macro_value : 07199 // case action_show_macros : 07200 // case action_show_manager : 07201 // case action_show_packages : 07202 // case action_show_path : 07203 // case action_show_pattern : 07204 // case action_show_pattern_names : 07205 // case action_show_patterns : 07206 // case action_show_projects : 07207 // case action_show_pwd : 07208 // case action_show_setup : 07209 // case action_show_set : 07210 // case action_show_set_names : 07211 // case action_show_set_value : 07212 // case action_show_sets : 07213 // case action_show_strategies : 07214 // case action_show_tags : 07215 // case action_show_use_paths : 07216 // case action_show_uses : 07217 // case action_show_version : 07218 // case action_show_versions : 07219 // case action_system : 07220 case action_unlock : 07221 // case action_version : 07222 clear (); 07223 return (code); 07224 default: 07225 CmtError::clear (); 07226 break; 07227 } 07228 } 07229 07230 // 07231 // Perform actions 07232 // 07233 07234 switch (m_action) 07235 { 07236 case action_none : 07237 //CmtError::set (CmtError::syntax_error, "ParseArguments> "); 07238 break; 07239 case action_awk : 07240 do_awk (arguments); 07241 break; 07242 case action_broadcast : 07243 do_broadcast (arguments, argc, argv); 07244 break; 07245 case action_build_constituent_makefile : 07246 do_build_constituent_makefile (arguments, argc, argv); 07247 break; 07248 case action_build_constituents_makefile : 07249 do_build_constituents_makefile (arguments, argc, argv); 07250 break; 07251 case action_build_dependencies : 07252 do_build_dependencies (arguments, argc, argv); 07253 break; 07254 case action_build_library_links : 07255 do_build_library_links (); 07256 break; 07257 case action_build_make_setup : 07258 do_build_make_setup (); 07259 break; 07260 case action_build_msdev : 07261 do_build_msdev (arguments); 07262 break; 07263 case action_build_vsnet : 07264 do_build_vsnet (arguments); 07265 break; 07266 case action_build_os9_makefile : 07267 do_build_os9_makefile (arguments); 07268 break; 07269 case action_build_prototype : 07270 do_build_prototype (arguments); 07271 break; 07272 case action_build_readme : 07273 do_build_readme (arguments); 07274 break; 07275 case action_build_tag_makefile : 07276 do_build_tag_makefile (); 07277 break; 07278 case action_build_temporary_name : 07279 do_build_temporary_name (); 07280 break; 07281 case action_build_triggers : 07282 do_build_triggers (arguments); 07283 break; 07284 case action_build_windefs : 07285 do_build_windefs (arguments); 07286 break; 07287 case action_check_configuration : 07288 do_check_configuration (); 07289 break; 07290 case action_check_files : 07291 do_check_files (arguments); 07292 break; 07293 case action_check_version : 07294 do_check_version (arguments); 07295 break; 07296 case action_checkout : 07297 do_checkout (arguments); 07298 break; 07299 case action_cleanup : 07300 do_cleanup (mode); 07301 break; 07302 case action_config : 07303 do_config (); 07304 break; 07305 case action_create : 07306 do_create (arguments); 07307 break; 07308 case action_cvsbranches : 07309 do_cvsbranches (arguments); 07310 break; 07311 case action_cvssubpackages : 07312 do_cvssubpackages (arguments); 07313 break; 07314 case action_cvstags : 07315 do_cvstags (arguments); 07316 break; 07317 case action_expand_model : 07318 do_expand_model (arguments); 07319 break; 07320 case action_filter : 07321 do_filter (arguments); 07322 break; 07323 case action_help : 07324 do_help (m_help_action); 07325 break; 07326 case action_load : 07327 cout << "#CMT> action not implemented" << endl; 07328 break; 07329 case action_lock : 07330 do_lock (m_current_package, m_current_version, m_current_path); 07331 break; 07332 case action_remove : 07333 do_remove (m_current_package, m_current_version, m_current_path); 07334 break; 07335 case action_remove_library_links : 07336 do_remove_library_links (); 07337 break; 07338 case action_run : 07339 do_run (arguments); 07340 break; 07341 case action_run_sequence : 07342 do_run_sequence (arguments); 07343 break; 07344 case action_set_version : 07345 do_set_version (arguments); 07346 break; 07347 case action_set_versions : 07348 do_set_versions (arguments); 07349 break; 07350 case action_setup : 07351 do_setup (mode); 07352 break; 07353 case action_show_all_tags : 07354 do_show_all_tags (); 07355 break; 07356 case action_show_applied_patterns : 07357 do_show_applied_patterns (); 07358 break; 07359 case action_show_author : 07360 do_show_author (); 07361 break; 07362 case action_show_branches : 07363 do_show_branches (mode); 07364 break; 07365 case action_show_clients : 07366 do_show_clients (arguments); 07367 break; 07368 case action_show_cmtpath_patterns : 07369 do_show_cmtpath_patterns (); 07370 break; 07371 case action_show_constituent : 07372 do_show_constituent (arguments); 07373 break; 07374 case action_show_constituent_names : 07375 do_show_constituent_names (); 07376 break; 07377 case action_show_constituents : 07378 do_show_constituents (); 07379 break; 07380 case action_show_cycles : 07381 do_show_cycles (); 07382 break; 07383 case action_show_fragment : 07384 do_show_fragment (arguments); 07385 break; 07386 case action_show_fragments : 07387 do_show_fragments (); 07388 break; 07389 case action_show_groups : 07390 do_show_groups (); 07391 break; 07392 case action_show_include_dirs : 07393 do_show_include_dirs (); 07394 break; 07395 case action_show_language : 07396 do_show_language (arguments); 07397 break; 07398 case action_show_languages : 07399 do_show_languages (); 07400 break; 07401 case action_show_macro : 07402 do_show_macro (arguments, mode); 07403 break; 07404 case action_show_macro_names : 07405 do_show_macro_names (arguments, mode); 07406 break; 07407 case action_show_macro_value : 07408 do_show_macro_value (arguments, mode); 07409 break; 07410 case action_show_macros : 07411 do_show_macros (arguments, mode); 07412 break; 07413 case action_show_manager : 07414 do_show_manager (); 07415 break; 07416 case action_show_packages : 07417 do_show_packages (arguments); 07418 break; 07419 case action_show_path : 07420 do_show_path (); 07421 break; 07422 case action_show_pattern : 07423 do_show_pattern (arguments); 07424 break; 07425 case action_show_pattern_names : 07426 do_show_pattern_names (); 07427 break; 07428 case action_show_patterns : 07429 do_show_patterns (); 07430 break; 07431 case action_show_projects : 07432 do_show_projects (); 07433 break; 07434 case action_show_pwd : 07435 do_show_pwd (); 07436 break; 07437 case action_show_setup : 07438 do_show_setup (); 07439 break; 07440 case action_show_set : 07441 do_show_set (arguments, mode); 07442 break; 07443 case action_show_set_names : 07444 do_show_set_names (arguments, mode); 07445 break; 07446 case action_show_set_value : 07447 do_show_set_value (arguments, mode); 07448 break; 07449 case action_show_sets : 07450 do_show_sets (arguments, mode); 07451 break; 07452 case action_show_strategies : 07453 do_show_strategies (); 07454 break; 07455 case action_show_tags : 07456 do_show_tags (); 07457 break; 07458 case action_show_use_paths : 07459 do_show_use_paths (arguments); 07460 break; 07461 case action_show_uses : 07462 do_show_uses (); 07463 break; 07464 case action_show_version : 07465 do_show_version (); 07466 break; 07467 case action_show_versions : 07468 do_show_versions (arguments); 07469 break; 07470 case action_system : 07471 do_show_system (); 07472 break; 07473 case action_unlock : 07474 do_unlock (m_current_package, m_current_version, m_current_path); 07475 break; 07476 case action_version : 07477 do_version (); 07478 break; 07479 default: 07480 CmtError::set (CmtError::syntax_error, "ParseArguments>"); 07481 break; 07482 } 07483 07484 if (CmtError::has_pending_error ()) 07485 { 07486 int code = CmtError::get_last_error_code (); 07487 if (!m_quiet) CmtError::print (); 07488 clear (); 07489 return (code); 07490 } 07491 else 07492 { 07493 clear (); 07494 return (0); 07495 } 07496 } |
|
? |
Definition at line 6735 of file cmt_parser.cxx. Referenced by do_broadcast(), and main(). 06736 { 06737 CmtSystem::cmt_string_vector v; 06738 06739 CmtSystem::split (command_line, " \t", v); 06740 06741 int argc = v.size (); 06742 06743 char** argv = (char**) malloc ((argc + 1) * sizeof (char*)); 06744 06745 int i; 06746 for (i = 0; i < argc; i++) 06747 { 06748 argv[i] = (char*) v[i].c_str (); 06749 } 06750 argv[argc] = 0; 06751 06752 int status = parser (argc, argv); 06753 06754 free (argv); 06755 06756 return (status); 06757 } |
|
? |
Format as one single line a set of 'setenv' statements joined with semi-colons to form one shell command. Definition at line 7503 of file cmt_parser.cxx. Referenced by do_setup(). 07504 { 07505 Use::UsePtrVector& Uses = Use::get_ordered_uses (); 07506 Use& current_use = Use::current (); 07507 07508 cmt_string tag; 07509 07510 set_standard_macros (); 07511 07512 //cerr << "# current_tag=" << m_current_tag << endl; 07513 //cerr << "# current_config=" << m_current_config << endl; 07514 07515 if (m_current_tag == "") 07516 { 07517 if (mode == Bat) tag = "%CMTCONFIG%"; 07518 else tag = "${CMTCONFIG}"; 07519 } 07520 else 07521 { 07522 tag = m_current_tag; 07523 } 07524 07525 if (m_current_access == DeveloperMode) 07526 { 07527 m_scope = ScopePrivate; 07528 } 07529 else 07530 { 07531 m_scope = ScopePublic; 07532 } 07533 07534 // 07535 // Now check if all extra tags are still valid. Some of them 07536 // may be discarded du to some conflict with highest priority 07537 // tags, or with exclude statements 07538 // 07539 07540 { 07541 CmtSystem::cmt_string_vector words; 07542 07543 cmt_string tags; 07544 07545 tags = Cmt::m_extra_tags; 07546 07547 CmtSystem::split (tags, " \t,", words); 07548 07549 Cmt::m_extra_tags = ","; 07550 07551 for (int i = 0; i < words.size (); i++) 07552 { 07553 Tag* tag; 07554 const cmt_string& a = words[i]; 07555 07556 tag = Tag::find (a); 07557 07558 if ((tag != 0) && (tag->is_selected ())) 07559 { 07560 Cmt::m_extra_tags += a; 07561 Cmt::m_extra_tags += ","; 07562 } 07563 } 07564 } 07565 07566 if (m_debug) 07567 { 07568 cout << "Before all print contexts" << endl; 07569 } 07570 07571 if (Uses.size () > 0) 07572 { 07573 int number; 07574 07575 for (number = 0; number < Uses.size (); number++) 07576 { 07577 Use& use = *(Uses[number]); 07578 07579 if (use.discarded) continue; 07580 07581 print_context (use, mode, tag); 07582 } 07583 } 07584 07585 print_context (Use::current (), mode, tag); 07586 07587 if (m_debug) 07588 { 07589 cout << "After all print contexts" << endl; 07590 } 07591 07592 Symbol::all_print (mode); 07593 // Script::all_print (mode); 07594 07595 if (m_debug) 07596 { 07597 cout << "After all print" << endl; 07598 } 07599 07600 cout << endl; 07601 } |
|
? |
Format as one single line a set of 'unsetenv' statements joined with semi-colons to form one shell command. Definition at line 7608 of file cmt_parser.cxx. Referenced by do_cleanup(). 07609 { 07610 Use::UsePtrVector& Uses = Use::get_ordered_uses (); 07611 07612 set_standard_macros (); 07613 07614 Script::all_print_clean (mode); 07615 Symbol::all_print_clean (mode); 07616 07617 switch (mode) 07618 { 07619 case Csh : 07620 if (m_current_package != "CMT") 07621 { 07622 cout << "unsetenv " << m_current_prefix << "ROOT" << endl; 07623 cout << "unsetenv " << m_current_prefix << "CONFIG" << endl; 07624 } 07625 break; 07626 case Sh : 07627 if (m_current_package != "CMT") 07628 { 07629 cout << "unset " << m_current_prefix << "ROOT" << endl; 07630 cout << "unset " << m_current_prefix << "CONFIG" << endl; 07631 } 07632 break; 07633 case Bat : 07634 if (m_current_package != "CMT") 07635 { 07636 cout << "set " << m_current_prefix << "ROOT=" << endl; 07637 cout << "set " << m_current_prefix << "CONFIG=" << endl; 07638 } 07639 break; 07640 } 07641 07642 if (Uses.size () > 0) 07643 { 07644 int number; 07645 07646 for (number = 0; number < Uses.size (); number++) 07647 { 07648 Use* use = Uses[number]; 07649 07650 if (use->discarded) continue; 07651 07652 Package* p = use->get_package (); 07653 if (p->is_cmt ()) continue; 07654 07655 switch (mode) 07656 { 07657 case Csh : 07658 cout << "unsetenv " << use->prefix << "ROOT" << endl; 07659 cout << "unsetenv " << use->prefix << "CONFIG" << endl; 07660 break; 07661 case Sh : 07662 cout << "unset " << use->prefix << "ROOT" << endl; 07663 cout << "unset " << use->prefix << "CONFIG" << endl; 07664 break; 07665 case Bat : 07666 cout << "set " << use->prefix << "ROOT=" << endl; 07667 cout << "set " << use->prefix << "CONFIG" << endl; 07668 break; 07669 } 07670 } 07671 } 07672 07673 switch (mode) 07674 { 07675 case Csh : 07676 cout << "unsetenv CMTEXTRATAGS" << endl; 07677 break; 07678 case Sh : 07679 cout << "unset CMTEXTRATAGS" << endl; 07680 break; 07681 case Bat : 07682 cout << "set CMTEXTRATAGS=" << endl; 07683 break; 07684 } 07685 07686 cout << endl; 07687 } |
|
? |
Definition at line 7690 of file cmt_parser.cxx. Referenced by print(). 07691 { 07692 if (use.get_package_name () == "cmt_standalone") return; 07693 07694 cmt_string fs = CmtSystem::file_separator (); 07695 07696 use.real_path.replace_all (CmtSystem::file_separator (), fs); 07697 07698 cmt_string system = CmtSystem::get_cmt_config (); 07699 07700 bool do_config = ((m_current_setup_strategy & SetupConfigMask) == SetupConfig); 07701 bool do_root = ((m_current_setup_strategy & SetupRootMask) == SetupRoot); 07702 07703 switch (mode) 07704 { 07705 case Csh : 07706 if (do_root) 07707 { 07708 cout << "setenv " << use.prefix << "ROOT \"" << 07709 use.get_full_path () << "\"" << endl; 07710 } 07711 07712 if (use.get_package_name () == "CMT") 07713 { 07714 cout << "setenv CMTCONFIG " << system << endl; 07715 } 07716 else 07717 { 07718 if (do_config) 07719 { 07720 cout << "setenv " << use.prefix << "CONFIG \"" << tag << "\"" << endl; 07721 } 07722 } 07723 07724 break; 07725 case Sh : 07726 if (do_root) 07727 { 07728 cout << use.prefix << "ROOT=\"" << 07729 use.get_full_path () << "\"; export " << 07730 use.prefix << "ROOT" << endl; 07731 } 07732 07733 if (use.get_package_name () == "CMT") 07734 { 07735 cout << "CMTCONFIG=" << system << "; export CMTCONFIG" << endl; 07736 } 07737 else 07738 { 07739 if (do_config) 07740 { 07741 cout << use.prefix << "CONFIG=\"" << 07742 tag << "\"; export " << 07743 use.prefix << "CONFIG" << endl; 07744 } 07745 } 07746 07747 break; 07748 case Bat : 07749 if (do_root) 07750 { 07751 cout << "set " << use.prefix << "ROOT=" << 07752 use.get_full_path () << endl; 07753 } 07754 07755 if (use.get_package_name () == "CMT") 07756 { 07757 cout << "set CMTCONFIG=" << system << endl; 07758 } 07759 else 07760 { 07761 if (do_config) 07762 { 07763 cout << "set " << use.prefix << "CONFIG=" << tag << endl; 07764 } 07765 } 07766 07767 break; 07768 } 07769 } |
|
? |
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 7831 of file cmt_parser.cxx. Referenced by do_build_tag_makefile(), do_show_macros(), and do_show_sets(). 07832 { 07833 int number; 07834 07835 set_standard_macros (); 07836 07837 cmt_regexp expression (pattern); 07838 07839 bool has_pattern = (pattern != ""); 07840 07841 for (number = 0; number < Symbol::symbol_number (); number++) 07842 { 07843 Symbol& symbol = Symbol::symbol (number); 07844 07845 if (has_pattern) 07846 { 07847 if (!expression.match (symbol.name)) continue; 07848 } 07849 07850 if (m_action == action_show_macros) 07851 { 07852 // Only keep macros. 07853 if ((symbol.command == CommandSet) || 07854 (symbol.command == CommandSetAppend) || 07855 (symbol.command == CommandSetPrepend) || 07856 (symbol.command == CommandSetRemove) || 07857 (symbol.command == CommandAlias) || 07858 (symbol.command == CommandPath) || 07859 (symbol.command == CommandPathAppend) || 07860 (symbol.command == CommandPathPrepend) || 07861 (symbol.command == CommandPathRemove)) continue; 07862 } 07863 else if (m_action == action_show_sets) 07864 { 07865 // Exclude macros. 07866 if ((symbol.command == CommandMacro) || 07867 (symbol.command == CommandMacroAppend) || 07868 (symbol.command == CommandMacroPrepend) || 07869 (symbol.command == CommandMacroRemove) || 07870 (symbol.command == CommandMacroRemoveAll)) continue; 07871 } 07872 else if (m_action == action_build_tag_makefile) 07873 { 07874 // Exclude scripts. 07875 if ((symbol.command == CommandSetupScript) || 07876 (symbol.command == CommandCleanupScript)) continue; 07877 } 07878 07879 if (symbol.value_lists.size () < 1) continue; 07880 07881 symbol.show_macro (mode); 07882 } 07883 } |
|
? |
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 7778 of file cmt_parser.cxx. Referenced by do_show_macro_names(), and do_show_set_names(). 07779 { 07780 int number; 07781 07782 set_standard_macros (); 07783 07784 cmt_regexp expression (pattern); 07785 07786 bool has_pattern = (pattern != ""); 07787 07788 for (number = 0; number < Symbol::symbol_number (); number++) 07789 { 07790 Symbol& symbol = Symbol::symbol (number); 07791 07792 if (has_pattern) 07793 { 07794 if (!expression.match (symbol.name)) continue; 07795 } 07796 07797 if (m_action == action_show_macro_names) 07798 { 07799 // Only keep macros. 07800 if ((symbol.command == CommandSet) || 07801 (symbol.command == CommandSetAppend) || 07802 (symbol.command == CommandSetPrepend) || 07803 (symbol.command == CommandSetRemove) || 07804 (symbol.command == CommandAlias) || 07805 (symbol.command == CommandPath) || 07806 (symbol.command == CommandPathAppend) || 07807 (symbol.command == CommandPathPrepend) || 07808 (symbol.command == CommandPathRemove)) continue; 07809 } 07810 else if (m_action == action_show_set_names) 07811 { 07812 // Exclude macros. 07813 if ((symbol.command == CommandMacro) || 07814 (symbol.command == CommandMacroAppend) || 07815 (symbol.command == CommandMacroPrepend) || 07816 (symbol.command == CommandMacroRemove) || 07817 (symbol.command == CommandMacroRemoveAll)) continue; 07818 } 07819 07820 cout << symbol.name << endl; 07821 } 07822 } |
|
? |
Definition at line 7886 of file cmt_parser.cxx. 07887 { 07888 while (tabs > 0) 07889 { 07890 cout << " "; 07891 tabs--; 07892 } 07893 } |
|
? |
Definition at line 7896 of file cmt_parser.cxx. Referenced by do_config(), and parser(). 07897 { 07898 Use& use = Use::current (); 07899 cmt_string dir; 07900 07901 if (m_debug) 07902 { 07903 cout << "Cmt::reach_current_package> pwd = " 07904 << CmtSystem::pwd () 07905 << " path=" << m_current_path 07906 << " package=" << m_current_package 07907 << endl; 07908 } 07909 07910 /* 07911 Try to access the package. 07912 */ 07913 07914 if (m_current_package == "cmt_standalone") 07915 { 07916 if ((m_current_path != "") && (m_current_path != CmtSystem::pwd ())) 07917 { 07918 if (!CmtSystem::cd (m_current_path)) 07919 { 07920 CmtError::set (CmtError::package_not_found, 07921 "ReachCurrentPackage> Cannot reach the path directory"); 07922 return (0); 07923 } 07924 } 07925 07926 if (!CmtSystem::test_file ("requirements")) 07927 { 07928 /* 07929 if (!m_quiet) 07930 { 07931 cout << "#CMT> Cannot reach the requirements file" << endl; 07932 } 07933 07934 CmtError::set (CmtError::package_not_found, 07935 "ReachCurrentPackage> Cannot reach the requirements file"); 07936 */ 07937 return (0); 07938 } 07939 } 07940 else if (m_current_package != "") 07941 { 07942 if (!use.move_to ()) 07943 { 07944 CmtError::set (CmtError::package_not_found, 07945 "ReachCurrentPackage> Cannot reach the path directory"); 07946 return (0); 07947 } 07948 07949 m_current_path = use.real_path; 07950 07951 cmt_string parent = m_current_path; 07952 cmt_string d = m_current_path; 07953 07954 // 07955 // This section is for adding the current package location 07956 // into the CMTPATH list. We try to guess the highest possible 07957 // directory level which is NOT part of another upper package. 07958 // 07959 // However this is somewhat dangerous. Therefore we might consider 07960 // getting rid of this feature. 07961 // 07962 for (;;) 07963 { 07964 d += "/../"; 07965 if (!CmtSystem::is_package_directory (d)) 07966 { 07967 CmtSystem::add_cmt_path (parent, "current package", 07968 m_cmt_path, 07969 m_cmt_path_pwds, 07970 m_cmt_path_sources); 07971 break; 07972 } 07973 parent = d; 07974 } 07975 } 07976 else 07977 { 07978 // 07979 // The cmt command has been given without explicit search for 07980 // a package. Thus it is expected that we are in the context of a 07981 // true package. 07982 // 07983 // This means that there should be a requirements file visible. 07984 // 07985 // If this is not true, we'll make a try into ../cmt and then 07986 // a last try into ../mgr 07987 // 07988 07989 if (!CmtSystem::test_file ("requirements")) 07990 { 07991 if (CmtSystem::cd ("../cmt") && 07992 CmtSystem::test_file ("requirements")) 07993 { 07994 m_current_style = cmt_style; 07995 } 07996 else if (CmtSystem::cd ("../mgr") && 07997 CmtSystem::test_file ("requirements")) 07998 { 07999 m_current_style = mgr_style; 08000 } 08001 else 08002 { 08003 if (!m_quiet) 08004 { 08005 cout << "#CMT> Cannot reach the mgr branch" << endl; 08006 } 08007 08008 CmtError::set (CmtError::package_not_found, 08009 "ReachCurrentPackage> Cannot reach the mgr/cmt directory"); 08010 return (0); 08011 } 08012 } 08013 08014 dir = CmtSystem::pwd (); 08015 08016 CmtSystem::dirname (dir, m_current_path); 08017 CmtSystem::basename (m_current_path, m_current_version); 08018 08019 if (CmtSystem::is_version_directory (m_current_version)) 08020 { 08021 CmtSystem::dirname (m_current_path, m_current_path); 08022 CmtSystem::basename (m_current_path, m_current_package); 08023 CmtSystem::dirname (m_current_path, m_current_path); 08024 } 08025 else 08026 { 08027 m_current_package = m_current_version; 08028 m_current_version = ""; 08029 CmtSystem::dirname (m_current_path, m_current_path); 08030 08031 m_current_style = no_version_style; 08032 } 08033 08034 Use& use = Use::current (); 08035 08036 use.set_package_name (m_current_package); 08037 use.version = m_current_version; 08038 use.path = m_current_path; 08039 use.style = m_current_style; 08040 } 08041 08042 configure_current_dir (); 08043 08044 /* 08045 Check Tag is always set up 08046 */ 08047 08048 if (m_debug) cout << "reach_current_package0> current_tag=" << m_current_tag << endl; 08049 08050 if (m_current_tag == "") 08051 { 08052 cmt_string env; 08053 08054 env = CmtSystem::getenv (m_current_config); 08055 if (env != "") 08056 { 08057 Tag* tag; 08058 08059 tag = Tag::add (env, PriorityConfig, "reach current package", 0); 08060 tag->mark (); 08061 //m_current_tag = env; 08062 08063 //if (!m_quiet) cerr << "reach_current_package1> current_tag=" << m_current_tag << endl; 08064 08065 } 08066 } 08067 08068 if (m_debug) 08069 { 08070 cout << "pwd = " << CmtSystem::pwd () << endl; 08071 } 08072 08073 /* 08074 Work on the requirements file. 08075 */ 08076 08077 if (dir != "") dir += CmtSystem::file_separator (); 08078 dir += "requirements"; 08079 SyntaxParser::parse_requirements (dir, 0); 08080 08081 if (m_debug) cout << "reach_current_package2> current_tag=" << m_current_tag << endl; 08082 08104 Pattern::apply_all_globals (); 08105 08106 /* 08107 Select all possible tags 08108 */ 08109 08110 Tag::restore_tree (); 08111 08112 return (1); 08113 } |
|
? |
Definition at line 1352 of file cmt_parser.cxx. Referenced by parse_arguments(). 01353 { 01354 //cerr << "restore_all_tags" << endl; 01355 01356 Cmt::configure_tags (use); 01357 01358 /* 01359 Then get existing extra tags 01360 */ 01361 01362 if (CmtSystem::testenv ("CMTEXTRATAGS")) 01363 { 01364 cmt_string s = "CMTEXTRATAGS"; 01365 01366 if (use != 0) 01367 { 01368 s += " in "; 01369 } 01370 01371 Tag* tag; 01372 CmtSystem::cmt_string_vector words; 01373 01374 cmt_string tags = CmtSystem::getenv ("CMTEXTRATAGS"); 01375 01376 CmtSystem::split (tags, " \t,", words); 01377 01378 Cmt::m_extra_tags = ","; 01379 01380 for (int i = 0; i < words.size (); i++) 01381 { 01382 const cmt_string& a = words[i]; 01383 01384 Cmt::m_extra_tags += a; 01385 Cmt::m_extra_tags += ","; 01386 01387 tag = Tag::add (a, PriorityUserTag, s, use); 01388 01389 tag->mark (); 01390 } 01391 } 01392 } |
|
? |
Definition at line 9350 of file cmt_parser.cxx. Referenced by SyntaxParser::parse_requirements_text(). 09351 { 09352 m_current_access = mode; 09353 } |
|
? |
Definition at line 9356 of file cmt_parser.cxx. Referenced by KwdBuildStrategy::action(). 09357 { 09358 m_current_build_strategy = strategy; 09359 } |
|
? |
Definition at line 9362 of file cmt_parser.cxx. Referenced by KwdSetupStrategy::action(). 09363 { 09364 m_current_setup_strategy = strategy; 09365 } |
|
? |
Definition at line 9368 of file cmt_parser.cxx. Referenced by KwdVersionStrategy::action(). 09369 { 09370 m_current_strategy = strategy; 09371 } |
|
? |
Definition at line 9374 of file cmt_parser.cxx. Referenced by KwdPublic::action(), KwdPrivate::action(), and SyntaxParser::parse_requirements_text(). 09375 { 09376 m_scope = scope; 09377 } |
|
? |
Definition at line 9380 of file cmt_parser.cxx. Referenced by parse_arguments(). 09381 { 09382 m_scope_filtering_mode = mode; 09383 } |
|
? |
Definition at line 9386 of file cmt_parser.cxx. 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_expand_model(), do_filter(), do_lock(), do_remove_library_links(), do_run(), 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(). 09387 { 09388 if (m_standard_macros_done) return; 09389 09390 m_standard_macros_done = true; 09391 09392 int number; 09393 cmt_string temp; 09394 Use::UsePtrVector& Uses = Use::get_ordered_uses (); 09395 Use& current_use = Use::current (); 09396 09397 cmt_string fs = CmtSystem::file_separator (); 09398 09399 cmt_string pwd = CmtSystem::pwd (); 09400 09401 if (CmtSystem::test_file ("../cmt/requirements")) m_current_style = cmt_style; 09402 else if (CmtSystem::test_file ("../mgr/requirements")) m_current_style = mgr_style; 09403 else m_current_style = none_style; 09404 09405 { 09406 cmt_string v; 09407 CmtSystem::dirname (pwd, v); 09408 CmtSystem::basename (v, v); 09409 if (!CmtSystem::is_version_directory (v)) 09410 { 09411 m_current_style = no_version_style; 09412 } 09413 } 09414 09415 // Prepare computation of the best form for relative path from current directory 09416 // to package directories. 09417 CmtSystem::cmt_string_vector vb; 09418 CmtSystem::split (pwd, fs, vb); 09419 09420 09425 bool tag_debug = CmtSystem::testenv ("TAGDEBUG"); 09426 09427 if (tag_debug) cerr << "set_standard_macro0> current_tag=" << m_current_tag << endl; 09428 09429 if (m_current_tag != "") 09430 { 09431 // this is when some -tag= argument was used. 09432 if (tag_debug) cerr << "set_standard_macro0.1> current_tag=" << m_current_tag << endl; 09433 } 09434 else if (Symbol::is_selected ("CMTCONFIG")) 09435 { 09436 // This is when CMTCONFIG has been set from some requirements file 09437 Symbol* macro = Symbol::find ("CMTCONFIG"); 09438 if (macro != 0) 09439 { 09440 m_current_tag = macro->build_macro_value (); 09441 if (tag_debug) cerr << "set_standard_macro1> current_tag=" << m_current_tag << endl; 09442 } 09443 } 09444 else 09445 { 09446 // this is when no -tag= argument was used. 09447 if (tag_debug) cerr << "set_standard_macro(before2)> current_tag=" << m_current_tag << endl; 09448 if (current_use.get_package_name () == "CMT") 09449 { 09450 m_current_tag = CmtSystem::getenv ("CMTBIN"); 09451 } 09452 else 09453 { 09454 m_current_tag = CmtSystem::getenv ("CMTCONFIG"); 09455 } 09456 09457 if (tag_debug) cerr << "set_standard_macro2> current_tag=" << m_current_tag << endl; 09458 } 09459 09460 if (m_debug) 09461 { 09462 cout << "set_standard_macro3>" << endl; 09463 } 09464 09465 StandardMacroBuilder builder (m_current_tag, 09466 m_current_package, 09467 m_current_version, 09468 m_current_prefix, 09469 m_current_style); 09470 09471 builder.fill_for_tag (); 09472 builder.fill_for_package_tag (); 09473 builder.fill_for_package (m_current_dir); 09474 builder.fill_for_branches (); 09475 builder.fill_for_uses (); 09476 builder.fill_for_use_requirements (); 09477 builder.fill_for_use_includes (); 09478 builder.fill_for_use_fincludes (); 09479 builder.fill_for_use_stamps (); 09480 builder.fill_for_use_cflags (); 09481 builder.fill_for_use_pp_cflags (); 09482 builder.fill_for_use_cppflags (); 09483 builder.fill_for_use_pp_cppflags (); 09484 builder.fill_for_use_fflags (); 09485 builder.fill_for_use_pp_fflags (); 09486 builder.fill_for_use_linkopts (); 09487 builder.fill_for_use_libraries (); 09488 builder.fill_for_includes (); 09489 builder.fill_for_fincludes (); 09490 builder.fill_for_all_constituents (); 09491 09496 const Constituent::ConstituentVector& constituents = 09497 Constituent::constituents (); 09498 09499 if (!Symbol::is_selected ("constituents")) 09500 { 09501 temp = "macro_append constituents \" "; 09502 09503 for (number = 0; number < constituents.size (); number++) 09504 { 09505 const Constituent& constituent = constituents[number]; 09506 09507 if (constituent.group == 0) 09508 { 09509 temp += constituent.name; 09510 temp += " "; 09511 } 09512 } 09513 09514 temp += "\""; 09515 09516 SyntaxParser::parse_requirements_line (temp, ¤t_use); 09517 } 09518 09519 SyntaxParser::parse_requirements_line ("macro_append all_constituents \" $(constituents)\"", 09520 ¤t_use); 09521 09522 if (!Symbol::is_selected ("constituentsclean")) 09523 { 09524 temp = "macro_append constituentsclean \" "; 09525 09526 for (number = constituents.size () - 1; number >= 0 ; number--) 09527 { 09528 const Constituent& constituent = constituents[number]; 09529 09530 if (constituent.group == 0) 09531 { 09532 temp += constituent.name; 09533 temp += "clean "; 09534 } 09535 } 09536 09537 temp += "\""; 09538 09539 SyntaxParser::parse_requirements_line (temp, ¤t_use); 09540 } 09541 09542 SyntaxParser::parse_requirements_line ("macro_append all_constituentsclean \" $(constituentsclean)\"", 09543 ¤t_use); 09544 09545 const Group::GroupVector& groups = Group::groups (); 09546 09547 for (number = 0; number < groups.size (); number++) 09548 { 09549 const Group& group = groups[number]; 09550 09551 temp = "macro_append "; 09552 temp += group.name (); 09553 temp += "_constituents \" "; 09554 09555 int i; 09556 09557 for (i = 0; i < constituents.size (); i++) 09558 { 09559 const Constituent& constituent = constituents[i]; 09560 09561 if ((constituent.group != 0) && 09562 (group.name () == constituent.group->name ())) 09563 { 09564 temp += constituent.name; 09565 temp += " "; 09566 } 09567 } 09568 09569 temp += "\""; 09570 09571 SyntaxParser::parse_requirements_line (temp, ¤t_use); 09572 09573 temp = "macro_append "; 09574 temp += group.name (); 09575 temp += "_constituentsclean \" "; 09576 09577 for (i = constituents.size () - 1; i >= 0 ; i--) 09578 { 09579 const Constituent& constituent = constituents[i]; 09580 09581 if ((constituent.group != 0) && 09582 (group.name () == constituent.group->name ())) 09583 { 09584 temp += constituent.name; 09585 temp += "clean "; 09586 } 09587 } 09588 09589 temp += "\""; 09590 09591 SyntaxParser::parse_requirements_line (temp, ¤t_use); 09592 } 09593 09594 // 09595 // Definitions for installation area mechanisms 09596 // 09597 if ((get_current_build_strategy () & InstallAreaMask) == WithInstallArea) 09598 { 09599 CmtInstallAreaMgr& ia_mgr = CmtInstallAreaMgr::instance (); 09600 09601 ia_mgr.setup (); 09602 } 09603 } |
|
? |
Macros implied or required to manage constituents. Definition at line 9606 of file cmt_parser.cxx. Referenced by load(), and parser(). 09607 { 09608 UseRef use; 09609 bool recursive_copy = m_recursive; 09610 bool debug_copy = m_debug; 09611 09612 if (m_default_path.size () <= 0) return; 09613 if (m_current_package == "CMT") return; 09614 09615 m_recursive = true; 09616 m_debug = false; 09617 use = Use::add (m_default_path, "CMT", m_cmt_version, "", "", 0); 09618 m_recursive = recursive_copy; 09619 m_debug = debug_copy; 09620 } |
|
? |
Definition at line 9623 of file cmt_parser.cxx. Referenced by parser(). 09624 { 09625 cmt_string f = m_cmt_home; 09626 09627 if (f == "") 09628 { 09629 //if (!m_quiet) cerr << "No CMTHOME" << endl; 09630 return; 09631 } 09632 09633 //if (!m_quiet) cerr << "Using CMTHOME in " << f << endl; 09634 09635 UseRef use; 09636 bool recursive_copy = m_recursive; 09637 09638 if (m_default_path.size () <= 0) return; 09639 if (m_current_package == "CMT") return; 09640 09641 m_recursive = true; 09642 09643 cmt_string name = CmtSystem::get_home_package (); 09644 09645 use = Use::add (f, name, "", "", "", 0); 09646 09647 f += CmtSystem::file_separator (); 09648 f += "requirements"; 09649 SyntaxParser::parse_requirements (f, use); 09650 09651 m_recursive = recursive_copy; 09652 } |
|
? |
Definition at line 9655 of file cmt_parser.cxx. Referenced by parser(). 09656 { 09657 cmt_string f = m_cmt_user_context; 09658 09659 if (f == "") 09660 { 09661 //if (!m_quiet) cerr << "No CMTUSERCONTEXT" << endl; 09662 return; 09663 } 09664 09665 //if (!m_quiet) cerr << "Using CMTUSERCONTEXT in " << f << endl; 09666 09667 UseRef use; 09668 bool recursive_copy = m_recursive; 09669 09670 if (m_default_path.size () <= 0) return; 09671 if (m_current_package == "CMT") return; 09672 09673 m_recursive = true; 09674 09675 cmt_string name = CmtSystem::get_user_context_package (); 09676 09677 use = Use::add (f, name, "", "", "", 0); 09678 09679 f += CmtSystem::file_separator (); 09680 f += "requirements"; 09681 SyntaxParser::parse_requirements (f, use); 09682 09683 m_recursive = recursive_copy; 09684 } |
|
? |
Definition at line 9687 of file cmt_parser.cxx. 09690 { 09691 result.erase (0); 09692 09693 for (int i = 0; i < v.size (); i++) 09694 { 09695 const cmt_string& s = v[i]; 09696 if (s == "") continue; 09697 09698 if (i > 0) result += separator; 09699 result += v[i]; 09700 } 09701 } |
|
? |
Definition at line 9704 of file cmt_parser.cxx. Referenced by PathBuilder::build(), and PathBuilder::clean(). 09705 { 09706 cmt_string result; 09707 09708 vector_to_string (v, " ", result); 09709 09710 return (result); 09711 } |
|
? |
All Attributes are private. Definition at line 35 of file cmt_parser.cxx. |
|
? |
Definition at line 37 of file cmt_parser.cxx. |
|
? |
Definition at line 38 of file cmt_parser.cxx. |
|
? |
Definition at line 43 of file cmt_parser.cxx. |
|
? |
Definition at line 39 of file cmt_parser.cxx. |
|
? |
Definition at line 40 of file cmt_parser.cxx. |
|
? |
Definition at line 41 of file cmt_parser.cxx. |
|
? |
Definition at line 42 of file cmt_parser.cxx. |
|
? |
Definition at line 45 of file cmt_parser.cxx. |
|
? |
Definition at line 44 of file cmt_parser.cxx. |
|
? |
Definition at line 46 of file cmt_parser.cxx. |
|
? |
Definition at line 69 of file cmt_parser.cxx. |
|
? |
Definition at line 58 of file cmt_parser.cxx. |
|
? |
Definition at line 47 of file cmt_parser.cxx. |
|
? |
Definition at line 55 of file cmt_parser.cxx. |
|
? |
Definition at line 52 of file cmt_parser.cxx. |
|
? |
Definition at line 50 of file cmt_parser.cxx. |
|
? |
Definition at line 56 of file cmt_parser.cxx. |
|
? |
Definition at line 51 of file cmt_parser.cxx. |
|
? |
Definition at line 53 of file cmt_parser.cxx. |
|
? |
Definition at line 54 of file cmt_parser.cxx. |
|
? |
Definition at line 48 of file cmt_parser.cxx. |
|
? |
Definition at line 59 of file cmt_parser.cxx. |
|
? |
Definition at line 61 of file cmt_parser.cxx. |
|
? |
Definition at line 60 of file cmt_parser.cxx. |
|
? |
Definition at line 63 of file cmt_parser.cxx. |
|
? |
Definition at line 64 of file cmt_parser.cxx. |
|
? |
Definition at line 65 of file cmt_parser.cxx. |
|
? |
Definition at line 71 of file cmt_parser.cxx. |
|
? |
Definition at line 73 of file cmt_parser.cxx. |
|
? |
Definition at line 67 of file cmt_parser.cxx. |
|
? |
Definition at line 36 of file cmt_parser.cxx. |
|
? |
Definition at line 74 of file cmt_parser.cxx. |
|
? |
Definition at line 75 of file cmt_parser.cxx. |
|
? |
Definition at line 76 of file cmt_parser.cxx. |
|
? |
Definition at line 77 of file cmt_parser.cxx. |
|
? |
Definition at line 78 of file cmt_parser.cxx. |
|
? |
Definition at line 79 of file cmt_parser.cxx. |