Changeset 523 for CMT/HEAD/source


Ignore:
Timestamp:
Oct 15, 2009, 12:46:33 PM (15 years ago)
Author:
rybkin
Message:

See C.L. 410

Location:
CMT/HEAD/source
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • CMT/HEAD/source/cmt_parser.cxx

    r521 r523  
    43024302    }
    43034303
     4304  if (current_use.get_strategy ("SetupScripts"))
     4305    {
     4306      cout << " scripts";
     4307    }
     4308  else
     4309    {
     4310      cout << " no_scripts";
     4311    }
     4312
    43044313  cout << endl;
    43054314 
     
    47484757  static const PrintMode  mode[2]     = {Csh, Sh};
    47494758#endif
     4759
     4760  Use& current_use = Use::current ();
     4761
     4762  if (!current_use.get_strategy ("SetupScripts"))
     4763    {
     4764      for (int i = 0; i < modes; i++)
     4765        {
     4766          cmt_string old_file_name = "cleanup";
     4767          old_file_name += ".";
     4768          old_file_name += suffix[i];
     4769          if (CmtSystem::test_file (old_file_name))
     4770            {
     4771              if (CmtMessage::active (Error))
     4772                cerr << "Removing cleanup script " + old_file_name << endl;
     4773              CmtSystem::remove_file (old_file_name);
     4774            }
     4775        }
     4776      return;
     4777    }
    47504778
    47514779  if (CmtMessage::active (Error))
     
    48364864#endif
    48374865
     4866  Use& current_use = Use::current ();
     4867
     4868  if (!current_use.get_strategy ("SetupScripts"))
     4869    {
     4870      for (int i = 0; i < modes; i++)
     4871        {
     4872          cmt_string old_file_name = "setup";
     4873          old_file_name += ".";
     4874          old_file_name += suffix[i];
     4875          if (CmtSystem::test_file (old_file_name))
     4876            {
     4877              if (CmtMessage::active (Error))
     4878                cerr << "Removing setup script " + old_file_name << endl;
     4879              CmtSystem::remove_file (old_file_name);
     4880            }
     4881        }
     4882      return;
     4883    }
     4884
    48384885  if (CmtMessage::active (Error))
    48394886    cerr << "Creating setup scripts." << endl;
    4840 
    4841   Use& current_use = Use::current ();
    48424887 
    48434888  cmt_string no_cleanup_opt;
     
    49504995  static const PrintMode  mode[2]     = {Csh, Sh};
    49514996#endif
     4997
     4998  Use& current_use = Use::current ();
     4999
     5000  if (!current_use.get_strategy ("SetupScripts"))
     5001    {
     5002      for (int i = 0; i < modes; i++)
     5003        {
     5004          cmt_string old_file_name = "cleanup";
     5005          old_file_name += ".";
     5006          old_file_name += suffix[i];
     5007          if (CmtSystem::test_file (old_file_name))
     5008            {
     5009              if (CmtMessage::active (Error))
     5010                cerr << "Removing cleanup script " + old_file_name << endl;
     5011              CmtSystem::remove_file (old_file_name);
     5012            }
     5013        }
     5014      return;
     5015    }
    49525016
    49535017  if (CmtMessage::active (Error))
     
    50605124#endif
    50615125
     5126  Use& current_use = Use::current ();
     5127
     5128  if (!current_use.get_strategy ("SetupScripts"))
     5129    {
     5130      for (int i = 0; i < modes; i++)
     5131        {
     5132          cmt_string old_file_name = "setup";
     5133          old_file_name += ".";
     5134          old_file_name += suffix[i];
     5135          if (CmtSystem::test_file (old_file_name))
     5136            {
     5137              if (CmtMessage::active (Error))
     5138                cerr << "Removing setup script " + old_file_name << endl;
     5139              CmtSystem::remove_file (old_file_name);
     5140            }
     5141        }
     5142      return;
     5143    }
     5144
    50625145  if (CmtMessage::active (Error))
    50635146    cerr << "Creating setup scripts." << endl;
    5064 
    5065   Use& current_use = Use::current ();
    50665147
    50675148  cmt_string no_cleanup_opt;
  • CMT/HEAD/source/cmt_project.cxx

    r519 r523  
    19451945  set_default_strategy ("SetupRoot");
    19461946  set_default_strategy ("SetupCleanup");
     1947  set_default_strategy ("SetupScripts");
    19471948  set_default_strategy ("BuildPrototypes");
    19481949  set_default_strategy ("InstallArea");
     
    27232724
    27242725  s = new StrategyDef;
     2726  s->m_keyword = "setup";
     2727  s->m_name = "SetupScripts";
     2728  s->m_on_value = "scripts";
     2729  s->m_off_value = "no_scripts";
     2730  s->m_default_value = true;
     2731  s->m_priority_value = false;
     2732
     2733  m_defs.push_back (s);
     2734
     2735  s = new StrategyDef;
    27252736  s->m_keyword = "structure";
    27262737  s->m_name = "VersionDirectory";
     
    28572868  m_off_tag = Tag::find (to_untag_name);
    28582869
    2859   if (m_on_tag == 0)
     2870  if (m_on_tag == 0 || m_off_tag == 0)
    28602871    {
    28612872      m_on_tag = Tag::add (to_tag_name, PriorityConfig, "PROJECT", 0);
  • CMT/HEAD/source/cmt_syntax.cxx

    r459 r523  
    10371037      {
    10381038        strategy = "SetupCleanup";
     1039      }
     1040    else if (value == "scripts")
     1041      {
     1042        strategy = "SetupScripts";
     1043      }
     1044    else if (value == "no_scripts")
     1045      {
     1046        strategy = "SetupScripts";
    10391047      }
    10401048    else
Note: See TracChangeset for help on using the changeset viewer.