1 | #ifndef __cmt_h__ |
---|
2 | #define __cmt_h__ |
---|
3 | |
---|
4 | #include "cmt_parser.h" |
---|
5 | #include "cmt_system.h" |
---|
6 | |
---|
7 | class Symbol; |
---|
8 | class Tag; |
---|
9 | |
---|
10 | class Cmt |
---|
11 | { |
---|
12 | public: |
---|
13 | static void build_config (const cmt_string& prefix, cmt_string& config); |
---|
14 | static void build_makefile (const cmt_string& target); |
---|
15 | static void build_msdev_file (const cmt_string& target); |
---|
16 | static void build_OS9_makefile (const cmt_string& target); |
---|
17 | static void build_prefix (const cmt_string& package, cmt_string& prefix); |
---|
18 | static void clear (); |
---|
19 | |
---|
20 | static void configure (); |
---|
21 | static void configure_cmt_path (Use* use); |
---|
22 | static void configure_config_tag (); |
---|
23 | static void configure_current_dir (); |
---|
24 | static void configure_current_package (); |
---|
25 | static void configure_default_path (); |
---|
26 | static void configure_home (Use* use); |
---|
27 | static void configure_user_context (Use* use); |
---|
28 | static void configure_hosttype_tag (); |
---|
29 | static void configure_site_tag (Use* use); |
---|
30 | static void configure_tags (Use* use); |
---|
31 | static void configure_uname_tag (); |
---|
32 | |
---|
33 | static void do_broadcast (const CmtSystem::cmt_string_vector& arguments, |
---|
34 | int argc, |
---|
35 | char* argv[]); |
---|
36 | static void do_build_constituent_makefile (const CmtSystem::cmt_string_vector& arguments, |
---|
37 | int argc, |
---|
38 | char* argv[]); |
---|
39 | static void do_build_constituents_makefile (const CmtSystem::cmt_string_vector& arguments, |
---|
40 | int argc, |
---|
41 | char* argv[]); |
---|
42 | static void do_build_dependencies (const CmtSystem::cmt_string_vector& arguments, |
---|
43 | int argc, |
---|
44 | char* argv[]); |
---|
45 | static void do_build_library_links (); |
---|
46 | static void do_build_make_setup (); |
---|
47 | static void do_build_msdev (const CmtSystem::cmt_string_vector& arguments); |
---|
48 | static void do_build_os9_makefile (const CmtSystem::cmt_string_vector& arguments); |
---|
49 | static void do_build_prototype (const CmtSystem::cmt_string_vector& arguments); |
---|
50 | static void do_build_readme (const CmtSystem::cmt_string_vector& arguments); |
---|
51 | static void do_build_tag_makefile (); |
---|
52 | static void do_build_temporary_name (); |
---|
53 | static void do_build_triggers (const CmtSystem::cmt_string_vector& arguments); |
---|
54 | static void do_build_windefs (const CmtSystem::cmt_string_vector& arguments); |
---|
55 | static void do_check_configuration (); |
---|
56 | static void do_check_files (const CmtSystem::cmt_string_vector& arguments); |
---|
57 | static void do_check_version (const CmtSystem::cmt_string_vector& arguments); |
---|
58 | static void do_checkout (const CmtSystem::cmt_string_vector& arguments); |
---|
59 | static void do_cleanup (PrintMode& mode); |
---|
60 | static void do_config (); |
---|
61 | static void do_create (const cmt_string& package, |
---|
62 | const cmt_string& version, |
---|
63 | const cmt_string& path); |
---|
64 | static void do_cvsbranches (const CmtSystem::cmt_string_vector& arguments); |
---|
65 | static void do_cvssubpackages (const CmtSystem::cmt_string_vector& arguments); |
---|
66 | static void do_cvstags (const CmtSystem::cmt_string_vector& arguments); |
---|
67 | static void do_expand_model (const CmtSystem::cmt_string_vector& arguments); |
---|
68 | static void do_filter (const CmtSystem::cmt_string_vector& arguments); |
---|
69 | static void do_help (); |
---|
70 | static void do_lock (const cmt_string& package, |
---|
71 | const cmt_string& version, |
---|
72 | const cmt_string& path); |
---|
73 | static void do_remove (const cmt_string& package, |
---|
74 | const cmt_string& version, |
---|
75 | const cmt_string& path); |
---|
76 | static void do_remove_library_links (); |
---|
77 | static void do_run (const CmtSystem::cmt_string_vector& arguments); |
---|
78 | static void do_setup (PrintMode& mode); |
---|
79 | static void do_show_author (); |
---|
80 | static void do_show_branches (PrintMode& mode); |
---|
81 | static void do_show_clients (const CmtSystem::cmt_string_vector& arguments); |
---|
82 | static void do_show_constituent (const CmtSystem::cmt_string_vector& arguments); |
---|
83 | static void do_show_constituent_names (); |
---|
84 | static void do_show_constituents (); |
---|
85 | static void do_show_fragment (const CmtSystem::cmt_string_vector& arguments); |
---|
86 | static void do_show_fragments (); |
---|
87 | static void do_show_groups (); |
---|
88 | static void do_show_include_dirs (); |
---|
89 | static void do_show_language (const CmtSystem::cmt_string_vector& arguments); |
---|
90 | static void do_show_languages (); |
---|
91 | static void do_show_macro (const CmtSystem::cmt_string_vector& arguments, |
---|
92 | PrintMode& mode); |
---|
93 | static void do_show_macro_value (const CmtSystem::cmt_string_vector& arguments, |
---|
94 | PrintMode& mode); |
---|
95 | static void do_show_macros (PrintMode& mode); |
---|
96 | static void do_show_manager (); |
---|
97 | static void do_show_packages (const CmtSystem::cmt_string_vector& arguments); |
---|
98 | static void do_show_path (); |
---|
99 | static void do_show_pattern (const CmtSystem::cmt_string_vector& arguments); |
---|
100 | static void do_show_pattern_names (); |
---|
101 | static void do_show_patterns (); |
---|
102 | static void do_show_pwd (); |
---|
103 | static void do_show_set (const CmtSystem::cmt_string_vector& arguments, |
---|
104 | PrintMode& mode); |
---|
105 | static void do_show_set_value (const CmtSystem::cmt_string_vector& arguments, |
---|
106 | PrintMode& mode); |
---|
107 | static void do_show_sets (PrintMode& mode); |
---|
108 | static void do_show_strategies (); |
---|
109 | static void do_show_tags (); |
---|
110 | static void do_show_uses (); |
---|
111 | static void do_show_version (); |
---|
112 | static void do_show_versions (const CmtSystem::cmt_string_vector& arguments); |
---|
113 | static void do_show_system (); |
---|
114 | static void do_unlock (const cmt_string& package, |
---|
115 | const cmt_string& version, |
---|
116 | const cmt_string& path); |
---|
117 | static void do_version (); |
---|
118 | |
---|
119 | |
---|
120 | static const cmt_string& filter_dir (const cmt_string& dir); |
---|
121 | static void install_cleanup_scripts (); |
---|
122 | static void install_setup_scripts (); |
---|
123 | static void install_test_cleanup_scripts (); |
---|
124 | static void install_test_setup_scripts (); |
---|
125 | static bool load (const cmt_string& path, |
---|
126 | const cmt_string& package, |
---|
127 | const cmt_string& version, |
---|
128 | const cmt_string& tag_name = ""); |
---|
129 | static bool need_prototypes (); |
---|
130 | static void parse_arguments (int argc, char* argv[], |
---|
131 | CmtSystem::cmt_string_vector& arguments, |
---|
132 | cmt_string& extra_line, |
---|
133 | cmt_string& extra_file, |
---|
134 | PrintMode& mode); |
---|
135 | static void parse_requirements (const cmt_string& file_name, Use* use); |
---|
136 | static void parse_requirements_line (const cmt_string& line, |
---|
137 | Use* use, |
---|
138 | const cmt_string& file_name = "", |
---|
139 | int line_number = 0); |
---|
140 | static void parse_requirements_text (const cmt_string& text, |
---|
141 | const cmt_string& file_name, |
---|
142 | Use* use); |
---|
143 | static int parser (const cmt_string& command_line); |
---|
144 | static int parser (int argc, char* argv[]); |
---|
145 | static void print (PrintMode mode); |
---|
146 | static void print_clean (PrintMode mode); |
---|
147 | static void print_context (Use& use, PrintMode mode, const cmt_string& tag); |
---|
148 | static void print_macros (PrintMode mode); |
---|
149 | static void print_tabs (int tabs); |
---|
150 | static int reach_current_package (); |
---|
151 | static void restore_all_tags (Use* use); |
---|
152 | static void select (const CmtSystem::cmt_string_vector& words, Use* use, |
---|
153 | const cmt_string& file_name, |
---|
154 | int line_number); |
---|
155 | static void set_standard_macros (); |
---|
156 | static void use_cmt (); |
---|
157 | static void use_home_requirements (); |
---|
158 | static void use_user_context_requirements (); |
---|
159 | static cmt_string vector_to_string (const CmtSystem::cmt_string_vector& v); |
---|
160 | static void vector_to_string (const CmtSystem::cmt_string_vector& v, |
---|
161 | const cmt_string& separator, |
---|
162 | cmt_string& result); |
---|
163 | |
---|
164 | static ActionType action; |
---|
165 | static bool build_nmake; |
---|
166 | static cmt_string cmt_config; |
---|
167 | static CmtSystem::cmt_string_vector cmt_path; |
---|
168 | static CmtSystem::cmt_string_vector cmt_path_pwds; |
---|
169 | static CmtSystem::cmt_string_vector cmt_path_sources; |
---|
170 | static cmt_string cmt_root; |
---|
171 | static cmt_string cmt_home; |
---|
172 | static cmt_string cmt_user_context; |
---|
173 | static cmt_string cmt_site; |
---|
174 | static cmt_string cmt_version; |
---|
175 | static int current_build_strategy; |
---|
176 | static cmt_string current_config; |
---|
177 | static cmt_string current_dir; |
---|
178 | static cmt_string current_package; |
---|
179 | static cmt_string current_path; |
---|
180 | static cmt_string current_prefix; |
---|
181 | static AccessMode current_access; |
---|
182 | static VersionStrategy current_strategy; |
---|
183 | static CmtDirStyle current_style; |
---|
184 | static cmt_string extra_tags; |
---|
185 | static cmt_string current_tag; |
---|
186 | static cmt_string current_target; |
---|
187 | static cmt_string current_version; |
---|
188 | static cmt_string configure_error; |
---|
189 | static bool debug; |
---|
190 | static cmt_string default_path; |
---|
191 | static int depth; |
---|
192 | static cmt_string filtered_text; |
---|
193 | static bool quiet; |
---|
194 | static bool recursive; |
---|
195 | static ScopeType scope; |
---|
196 | static bool simulation; |
---|
197 | static bool standard_macros_done; |
---|
198 | }; |
---|
199 | |
---|
200 | #endif |
---|