Changeset 295


Ignore:
Timestamp:
Nov 1, 2006, 10:46:57 AM (18 years ago)
Author:
garonne
Message:

beta development 1

Location:
CMT/v1rbeta20p20061025
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • CMT/v1rbeta20p20061025/mgr/cmt_dependencies.make

    r144 r295  
    2424cmt_regexp_cxx_dependencies =  ../source/cmt_regexp.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_regexp.h   ../source/cmt_vector.h   ../source/cmt_system.h
    2525cmt_model_cxx_dependencies =  ../source/cmt_model.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt_model.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_fragment.h   ../source/cmt_map.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_tag.h   ../source/cmt_symbol.h
    26 cmt_project_cxx_dependencies =  ../source/cmt_project.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_branch.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_language.h   ../source/cmt_map.h   ../source/cmt_pattern.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_tag.h   ../source/cmt_symbol.h   ../source/cmt_cmtpath_pattern.h   ../source/cmt_database.h   ../source/cmt_syntax.h   ../source/cmt_error.h
     26cmt_project_cxx_dependencies =  ../source/cmt_project.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_map.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_branch.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_language.h   ../source/cmt_tag.h   ../source/cmt_symbol.h   ../source/cmt_cmtpath_pattern.h   ../source/cmt_database.h   ../source/cmt_syntax.h   ../source/cmt_error.h
    2727cmt_syntax_cxx_dependencies =  ../source/cmt_syntax.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_map.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt.h   ../source/cmt_parser.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_syntax.h   ../source/cmt_tag.h   ../source/cmt_symbol.h   ../source/cmt_fragment.h   ../source/cmt_group.h   ../source/cmt_constituent.h   ../source/cmt_error.h   ../source/cmt_branch.h   ../source/cmt_language.h   ../source/cmt_cmtpath_pattern.h
    2828cmt_install_area_cxx_dependencies =  ../source/cmt_install_area.cxx   ../source/cmt_std.h   ../source/cmt_string.h   ../source/cmt_vector.h   ../source/cmt_regexp.h   ../source/cmt_system.h   ../source/cmt_parser.h   ../source/cmt.h   ../source/cmt_install_area.h   ../source/cmt_map.h   ../source/cmt_include.h   ../source/cmt_script.h   ../source/cmt_pattern.h   ../source/cmt_scope_section.h   ../source/cmt_use.h   ../source/cmt_awk.h   ../source/cmt_project.h   ../source/cmt_syntax.h   ../source/cmt_tag.h   ../source/cmt_symbol.h   ../source/cmt_cmtpath_pattern.h
  • CMT/v1rbeta20p20061025/source/cmt_cvs.cxx

    r208 r295  
    184184    m_verbose    = false;
    185185    m_simulation = false;
     186    no_config    = false;
    186187
    187188    m_home_dir     = "";
     
    218219    m_verbose    = other.m_verbose;
    219220    m_simulation = other.m_simulation;
     221    no_config    = other.no_config;
    220222
    221223    m_home_dir       = other.m_home_dir;
     
    18831885            if (did_recurse)
    18841886              {
    1885                 execute ("cmt -quiet broadcast cmt -quiet config");
     1887                  if (no_config==false)           
     1888                        execute ("cmt -quiet broadcast cmt -quiet config");
     1889             
    18861890              }
    18871891            else
    18881892              {
    1889                 execute ("cmt -quiet config");
     1893                  if (no_config==false)
     1894                        execute ("cmt -quiet config");
    18901895              }
    18911896          }
    18921897        else
    18931898          {
    1894             execute ("cmt -quiet config");
     1899            if (no_config==false)
     1900            execute ("cmt -quiet config");
    18951901          }
    18961902      }
     
    20812087        if (!m_recursive)
    20822088          {
    2083             execute ("cmt -quiet config");
     2089              if (no_config==false)
     2090                execute ("cmt -quiet config");
    20842091          }
    20852092      }
     
    21012108    cout << "   -t  Change file timestamps to the date of checkout" << endl;
    21022109    cout << "   -n        simulation mode on" << endl;
     2110    cout << "   -no_config  Disable config step after checkout" << endl;   
    21032111    cout << "   -v        verbose mode on" << endl;
    21042112    cout << "   --help    print this help" << endl;
     
    22712279    m_recursive      = false;
    22722280    need_touch_files = false;
     2281    no_config        = false;
    22732282   
    22742283    bool need_version_tag = false;
     
    23652374                m_simulation = true;
    23662375              }
     2376            else if (option == "-no_config")
     2377              {
     2378                    no_config = true;
     2379              }       
    23672380            else if (option == "-v")
    23682381              {
     
    24022415  bool m_verbose;
    24032416  bool m_simulation;
     2417  bool no_config;
    24042418
    24052419  cmt_string m_home_dir;
  • CMT/v1rbeta20p20061025/source/cmt_project.cxx

    r283 r295  
    262262  cmt_string release;
    263263
    264 
    265264  //
    266265  // Figure out if this is the current project
     
    566565    }
    567566
     567
     568
    568569  if (text != "")
    569570    {
     
    574575          cout << "About to parse project file [" << text << "]" << endl;
    575576        }
     577
     578      // First create the Project.m_use for the policy
     579          //cout << "About to add project policy package file [" <<  project->get_name()+"_project_policy" << "]" << endl;     
     580      Use* project_use = Use::create (project->get_cmtpath(),
     581                                 project->get_name()+"_project_policy",
     582                                 project->get_release (), "", "");                       
     583                                 
     584      project_use->done      = false;
     585      project_use->discarded = false;
     586      project_use->selected  = false;
     587      project->set_use(project_use);
    576588
    577589      SyntaxParser::parse_project_file_text (text,
     
    579591                                             project);
    580592    }
     593
     594
    581595
    582596  CmtSystem::cd (here);
     
    12791293void Project::clear ()
    12801294{
    1281   m_name = "";
     1295  m_name    = "";
    12821296  m_release = "";
    12831297  m_cmtpath = "";
    1284   m_cmtpath_pwd = "";
     1298  m_cmtpath_pwd    = "";
    12851299  m_cmtpath_source = "";
     1300  m_use            = 0;
    12861301
    12871302  m_parents.clear ();
     
    23282343}
    23292344//-----------------------------------------------------------
     2345Use*  Project::get_use () const
     2346{
     2347    return m_use;   
     2348
     2349//-----------------------------------------------------------
     2350void  Project::set_use (Use* use)
     2351
     2352    this->m_use = use;
     2353}
     2354//-----------------------------------------------------------
  • CMT/v1rbeta20p20061025/source/cmt_project.h

    r273 r295  
    1111#include "cmt_parser.h"
    1212#include "cmt_system.h"
     13#include "cmt_use.h"
    1314#include "cmt_awk.h"
    1415
     
    185186  // bool get_author (const cmt_string& name) const;
    186187 
    187   void visit (IProjectVisitor& visitor);
     188  void   visit (IProjectVisitor& visitor);
     189 
     190  // Use
     191  Use*  get_use () const; 
     192  void  set_use (Use* use); 
    188193 
    189194private:
     
    209214
    210215  cmt_vector <Strategy> m_strategies;
     216 
     217  Use* m_use;
    211218};
    212219
  • CMT/v1rbeta20p20061025/source/cmt_syntax.cxx

    r284 r295  
    109109                  const cmt_string& file_name,
    110110                  int line_number)
    111   {}
     111  {
     112                    action (words, project->get_use(), file_name, line_number);   
     113      }
    112114
    113115};
     
    163165  bool decode (const cmt_string& w, cmt_string& strategy, cmt_string& value)
    164166  {
    165     bool result = true;
    166 
    167     value = w;
    168 
    169     if (w == "prototypes")
     167    bool result = true;   
     168     
     169    value =  w;
     170    Symbol::expand(value);
     171    cout <<"# strategy: "<<value<<endl;           
     172
     173    if (value == "prototypes")
    170174      {
    171175        strategy = "BuildPrototypes";
    172176      }
    173     else if (w == "no_prototypes")
     177    else if (value == "no_prototypes")
    174178      {
    175179        strategy = "BuildPrototypes";
    176180      }
    177     else if ((w == "with_installarea") || (w == "with_install_area"))
     181    else if ((value == "with_installarea") || (value == "with_install_area"))
    178182      {
    179183        value = "with_installarea";
    180184        strategy = "InstallArea";
    181185      }
    182     else if ((w == "without_installarea") || (w == "without_install_area"))
     186    else if ((value == "without_installarea") || (value == "without_install_area"))
    183187      {
    184188        value = "without_installarea";
     
    232236               int line_number)
    233237  {
    234     for (int i = 1; i < words.size (); i++)
     238      for (int i = 1; i < words.size (); i++)
    235239      {
    236240        const cmt_string& w = words[i];
     
    244248          {
    245249            if (project != 0) project->set_strategy (strategy, value, "");
     250            //(project->get_use())->get_package_name ());
    246251          }
    247252        else
     
    498503                  const cmt_string& file_name,
    499504                  int line_number)
    500   {}
     505  {
     506        action (words, project->get_use(), file_name, line_number);   
     507  }
    501508};
    502509
     
    515522                  const cmt_string& file_name,
    516523                  int line_number)
    517   {}
     524  {
     525            action (words, project->get_use(), file_name, line_number);
     526      }
    518527};
    519528
     
    532541                  const cmt_string& file_name,
    533542                  int line_number)
    534   {}
     543  {
     544            action (words, project->get_use(), file_name, line_number);
     545      }
    535546};
    536547
     
    549560                  const cmt_string& file_name,
    550561                  int line_number)
    551   {}
     562  {
     563            action (words, project->get_use(), file_name, line_number);
     564      }
    552565};
    553566
     
    566579                  const cmt_string& file_name,
    567580                  int line_number)
    568   {}
     581 
     582  {
     583            action (words, project->get_use(), file_name, line_number);
     584      }
    569585};
    570586
     
    583599                  const cmt_string& file_name,
    584600                  int line_number)
    585   {}
     601  {
     602            action (words, project->get_use(), file_name, line_number);
     603      }
    586604};
    587605
     
    600618                  const cmt_string& file_name,
    601619                  int line_number)
    602   {}
     620  {
     621            action (words, project->get_use(), file_name, line_number);
     622      }
    603623};
    604624
     
    11531173                  const cmt_string& file_name,
    11541174                  int line_number)
    1155   {} 
     1175  {
     1176              action (words, project->get_use(), file_name, line_number);   
     1177      } 
    11561178};
    11571179
     
    11701192                  const cmt_string& file_name,
    11711193                  int line_number)
    1172   {} 
     1194  {
     1195              action (words, project->get_use(), file_name, line_number);   
     1196      } 
    11731197};
    11741198
     
    12831307      me.do_parse_text (buffer, "", package_context, use, 0);
    12841308      Cmt::set_current_access (saved_current_access);
     1309    }
     1310
     1311      //
     1312    Project* p = use->get_project ();
     1313    if (p != 0)
     1314    {     
     1315           Use* p_use =  p->get_use();
     1316           if (p_use != 0)
     1317           {
     1318               //cout << "About to add dependency on project policy package file [" <<  p_use->get_package_name() << "]" << endl;     
     1319               p_use->add_sub_use (p_use);
     1320           }
    12851321    }
    12861322
     
    14371473
    14381474  m_project_keywords.add ("author", new KwdAuthor());
     1475  m_project_keywords.add ("apply_tag", new KwdApplyTag ());
    14391476  m_project_keywords.add ("build_strategy", new KwdBuildStrategy ());
    14401477  m_project_keywords.add ("container", new KwdContainer ());
     1478  m_project_keywords.add ("macro", new KwdMacro ());
     1479  m_project_keywords.add ("macro+", new KwdMacroAppend ());
     1480  m_project_keywords.add ("macro_prepend", new KwdMacroPrepend ());
     1481  m_project_keywords.add ("macro_append", new KwdMacroAppend ());
     1482  m_project_keywords.add ("macro_remove", new KwdMacroRemove ());
     1483  m_project_keywords.add ("macro_remove_regexp", new KwdMacroRemoveRegexp ());
     1484  m_project_keywords.add ("macro_remove_all", new KwdMacroRemoveAll ());
     1485  m_project_keywords.add ("macro_remove_all_regexp", new KwdMacroRemoveAllRegexp ());
     1486
    14411487  m_project_keywords.add ("project", new KwdProject ());
    14421488  m_project_keywords.add ("setup_strategy", new KwdSetupStrategy ());
     1489 
     1490  m_project_keywords.add ("tag", new KwdTag ());
     1491  m_project_keywords.add ("tag_exclude", new KwdTagExclude ());
     1492
     1493 
    14431494  m_project_keywords.add ("structure_strategy", new KwdStructureStrategy ());
    14441495  m_project_keywords.add ("use", new KwdUse ());
  • CMT/v1rbeta20p20061025/source/cmt_use.cxx

    r280 r295  
    43704370}
    43714371
     4372Project* Use::get_project ()
     4373{   
     4374    Project* p;
     4375    cmt_string cmtpath = "";
     4376    cmt_string offset  = "";   
     4377    get_cmtpath_and_offset (cmtpath, offset);
     4378    p = Project::find_by_cmtpath (cmtpath);
     4379    return p;   
     4380}
  • CMT/v1rbeta20p20061025/source/cmt_use.h

    r283 r295  
    6060  static void fill_macro_all (cmt_string& buffer, const cmt_string& suffix);
    6161
    62 // Private class methods
    63 private:
    6462  static Use* create (const cmt_string& path,
    6563                      const cmt_string& package,
     
    6765                      const cmt_string& version_alias,
    6866                      const cmt_string& path_alias);
     67
     68  void add_sub_use(Use* use)
     69  {
     70      this->sub_uses.push_back (use);
     71  }
     72
     73// Private class methods
     74private:
    6975
    7076// Public instance methods
     
    126132  ScopeType get_current_scope () const;
    127133
     134  Project* get_project ();
    128135// Public attributes
    129136public:
Note: See TracChangeset for help on using the changeset viewer.