Public Methods |
|
| bool? | decode (const cmt_string &w, int &mask, int &strategy) |
| void? | action (const CmtSystem::cmt_string_vector &words, Use *use, const cmt_string &file_name, int line_number) |
| void? | action (const CmtSystem::cmt_string_vector &words, Project *project, const cmt_string &file_name, int line_number) |
|
||||||||||||||||||||
| ? |
Reimplemented from Kwd. Definition at line 210 of file cmt_syntax.cxx. References action_show_strategies, decode(), Cmt::get_action(), Project::get_name(), Cmt::get_quiet(), CmtError::set(), Project::set_build_strategy(), Cmt::set_current_build_strategy(), cmt_vector< cmt_string >::size(), and CmtError::syntax_error. 00214 {
00215 for (int i = 1; i < words.size (); i++)
00216 {
00217 const cmt_string& w = words[i];
00218
00219 int mask = 0;
00220 int strategy = 0;
00221
00222 bool in_error = false;
00223
00224 if (!decode (w, mask, strategy))
00225 {
00226 in_error = true;
00227
00228 CmtError::set (CmtError::syntax_error, "ParseRequirements> bad strategy keyword");
00229 }
00230
00231 if (mask != 0)
00232 {
00233 if (project == 0) Cmt::set_current_build_strategy (strategy);
00234 else project->set_build_strategy (mask, strategy);
00235 }
00236
00237 if ((Cmt::get_action () == action_show_strategies) && !Cmt::get_quiet ())
00238 {
00239 if (!in_error)
00240 {
00241 cout << "# Project " << project->get_name ()
00242 << " adds " << w << " to build strategy" << endl;
00243 }
00244 else
00245 {
00246 cout << "# Error: Project " << project->get_name ()
00247 << " uses unknown " << w << " keyword to build strategy" << endl;
00248 }
00249 }
00250 }
00251 }
|
|
||||||||||||||||||||
| ? |
Implements Kwd. Definition at line 160 of file cmt_syntax.cxx. References action_show_strategies, decode(), Project::find_by_cmtpath(), Cmt::get_action(), Use::get_cmtpath_and_offset(), Use::get_package_name(), Cmt::get_quiet(), CmtError::set(), Project::set_build_strategy(), Cmt::set_current_build_strategy(), cmt_vector< cmt_string >::size(), and CmtError::syntax_error. 00164 {
00165 cmt_string cmtpath;
00166 cmt_string offset;
00167
00168 use->get_cmtpath_and_offset (cmtpath, offset);
00169
00170 Project* p = Project::find_by_cmtpath (cmtpath);
00171
00172 for (int i = 1; i < words.size (); i++)
00173 {
00174 const cmt_string& w = words[i];
00175
00176 int mask = 0;
00177 int strategy = 0;
00178
00179 bool in_error = false;
00180
00181 if (!decode (w, mask, strategy))
00182 {
00183 in_error = true;
00184
00185 CmtError::set (CmtError::syntax_error, "ParseRequirements> bad strategy keyword");
00186 }
00187
00188 if (mask != 0)
00189 {
00190 if (p == 0) Cmt::set_current_build_strategy (strategy);
00191 else p->set_build_strategy (mask, strategy);
00192 }
00193
00194 if ((Cmt::get_action () == action_show_strategies) && !Cmt::get_quiet ())
00195 {
00196 if (!in_error)
00197 {
00198 cout << "# Package " << use->get_package_name ()
00199 << " adds " << w << " to build strategy" << endl;
00200 }
00201 else
00202 {
00203 cout << "# Error: Package " << use->get_package_name ()
00204 << " uses unknown " << w << " keyword to build strategy" << endl;
00205 }
00206 }
00207 }
00208 }
|
|
||||||||||||||||
| ? |
Definition at line 116 of file cmt_syntax.cxx. References InstallAreaMask, KeepMakefiles, KeepMakefilesMask, NoPrototypes, Prototypes, PrototypesMask, RebuildMakefiles, WithInstallArea, and WithoutInstallArea. Referenced by action(). 00119 {
00120 bool result = true;
00121
00122 if (w == "prototypes")
00123 {
00124 mask = PrototypesMask;
00125 strategy = Prototypes;
00126 }
00127 else if (w == "no_prototypes")
00128 {
00129 mask = PrototypesMask;
00130 strategy = NoPrototypes;
00131 }
00132 else if (w == "keep_makefiles")
00133 {
00134 mask = KeepMakefilesMask;
00135 strategy = KeepMakefiles;
00136 }
00137 else if (w == "rebuild_makefiles")
00138 {
00139 mask = KeepMakefilesMask;
00140 strategy = RebuildMakefiles;
00141 }
00142 else if ((w == "with_installarea") || (w == "with_install_area"))
00143 {
00144 mask = InstallAreaMask;
00145 strategy = WithInstallArea;
00146 }
00147 else if ((w == "without_installarea") || (w == "without_install_area"))
00148 {
00149 mask = InstallAreaMask;
00150 strategy = WithoutInstallArea;
00151 }
00152 else
00153 {
00154 result = false;
00155 }
00156
00157 return (result);
00158 }
|