Changeset 588 for CMT/HEAD/source/cmt_constituent.cxx
- Timestamp:
- Nov 27, 2011, 4:36:15 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CMT/HEAD/source/cmt_constituent.cxx
r561 r588 47 47 if (symbol.type != Symbol::SymbolAction) continue; 48 48 49 /* 49 50 if (symbol.value_lists.size () < 1) continue; 50 51 … … 55 56 add_for_action (symbol.name); 56 57 } 58 */ 59 add_for_action (symbol); 57 60 } 58 61 … … 368 371 //cerr << "Constituent " << name << " Analyzing module " << ew << endl; 369 372 370 if (ew.substr (0, 13) == "action_value=")371 {372 it.set (ew);373 }374 else375 {373 // if (ew.substr (0, 13) == "action_value=") 374 // { 375 // it.set (ew); 376 // } 377 // else 378 // { 376 379 CmtSystem::split (ew, " \t", ws); 377 380 … … 383 386 it.set (w); 384 387 } 385 }388 // } 386 389 } 387 390 … … 417 420 418 421 //---------------------------------------------------------- 419 Constituent* Constituent::add_for_action (const cmt_string& name) 420 { 421 Constituent* constituent; 422 423 constituent = add (Document, name, "cmt_action_runner"); 422 Constituent* Constituent::add_for_action (const Symbol& symbol) 423 //Constituent* Constituent::add_for_action (const cmt_string& name) 424 { 425 Constituent* constituent (0); 426 if (symbol.value_lists.size () < 1) return constituent; 427 428 const Tag* tag = Tag::find ("target_" + symbol.name); 429 const bool target_tag_used 430 (Tag::check_tag_used (tag) || Symbol::check_tag_used (tag)); 431 432 cmt_string value = symbol.build_macro_value (); 433 if ( "" == value && !target_tag_used) return constituent; 434 435 constituent = add (Document, symbol.name, "cmt_action_runner"); 424 436 425 437 constituent->group = Group::add ("cmt_actions"); 426 constituent->has_target_tag = true; 438 439 // Do NOT assign target_<name> by default 440 // but only if this tag is used somewhere 441 if (target_tag_used) 442 constituent->has_target_tag = true; 427 443 428 444 cmt_string& p1 = constituent->parameters.add (); 429 445 p1 = "action_value="; 430 p1 += "$("; 431 p1 += name; 432 p1 += ")"; 446 Symbol::expand (value); 447 // quote since split will later be applied 448 // - in parse 449 p1 += CmtSystem::quote (value, " \t"); 450 // p1 += "$("; 451 // p1 += symbol.name; 452 // p1 += ")"; 433 453 434 454 return (constituent); … … 549 569 if (!simulation) 550 570 { 551 Generator::build_constituent_makefile (*this); 571 bool dependencies (false); 572 Generator::build_constituent_makefile (*this, dependencies); 552 573 } 553 574 }
Note: See TracChangeset
for help on using the changeset viewer.