Changeset 330


Ignore:
Timestamp:
Nov 20, 2006, 4:25:18 PM (18 years ago)
Author:
garonne
Message:

add extra line from project.cmt to every packages belonging to the project

Location:
CMT/v1r20b1/source
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • CMT/v1r20b1/source/cmt_project.cxx

    r328 r330  
    581581                                      project->get_name()+"_project_policy",
    582582                                      project->get_release (), "", "");                                                         
    583       project_use->done      = false;//true;
     583      project_use->done      = true; //false;
    584584      project_use->discarded = false;
    585585      project_use->selected  = true;
  • CMT/v1r20b1/source/cmt_project.h

    r295 r330  
    192192  void  set_use (Use* use); 
    193193 
     194  cmt_vector <cmt_string> m_extra_lines;
     195 
    194196private:
    195197
  • CMT/v1r20b1/source/cmt_syntax.cxx

    r329 r330  
    247247               int line_number)
    248248  {
     249     
    249250      // action (words, project->get_use(), file_name, line_number);
    250       //cout<<project->get_use()->get_strategy("InstallArea")<<endl;   
    251      
     251      // cout<<project->get_use()->get_strategy("InstallArea")<<endl;   
     252 
     253           
    252254      for (int i = 1; i < words.size (); i++)
    253255      {
    254         const cmt_string& w = words[i];
    255 
    256         cmt_string strategy;
    257         cmt_string value;
     256               const cmt_string& w = words[i];
     257
     258               cmt_string strategy;
     259               cmt_string value;
    258260
    259261        bool in_error = false;
     
    265267               // project->set_strategy (strategy, value, project->get_use()->get_package_name ());
    266268               project->set_strategy (strategy, value, "");
     269               cmt_string s  = "build_strategy ";
     270           s             += words[i];
     271           s             += "\n";           
     272               bool no_found = true;                     
     273           int size =  project->m_extra_lines.size ();
     274           for (int n = 0; n < size; n++)
     275           {
     276            if (s==project->m_extra_lines[n])
     277                no_found = false;
     278           }
     279           if (no_found)         
     280           { 
     281              cmt_string & buffer = project->m_extra_lines.add();           
     282              buffer = s;
     283           }
    267284            } 
    268285          }
     
    10801097          {
    10811098            if (project != 0) project->set_strategy (strategy, value, "");
     1099        cmt_string s  = "setup_strategy ";
     1100        s             += words[i];
     1101        s             += "\n";           
     1102        bool no_found = true;                   
     1103        int size =  project->m_extra_lines.size ();
     1104        for (int n = 0; n < size; n++)
     1105        {
     1106        if (s==project->m_extra_lines[n])
     1107            no_found = false;
     1108        }
     1109        if (no_found)         
     1110        { 
     1111              cmt_string & buffer = project->m_extra_lines.add();           
     1112              buffer = s;
     1113        }           
    10821114          }
    10831115        else
     
    11681200          {
    11691201            if (project != 0) project->set_strategy (strategy, value, "");
     1202            cmt_string s  = "structure_strategy ";
     1203        s             += words[i];
     1204        s             += "\n";           
     1205        bool no_found = true;                   
     1206        int size =  project->m_extra_lines.size ();
     1207        for (int n = 0; n < size; n++)
     1208        {
     1209        if (s==project->m_extra_lines[n])
     1210            no_found = false;
     1211        }
     1212        if (no_found)         
     1213        { 
     1214              cmt_string & buffer = project->m_extra_lines.add();           
     1215              buffer = s;
     1216        }           
     1217
    11701218          }
    11711219        else
     
    13311379  me.do_parse_requirements (file_name, use);
    13321380
     1381
    13331382  if (use != 0)
    13341383  {
    13351384        //
     1385         
    13361386        Project* p = use->get_project ();
    13371387        if (p != 0)
     
    13501400              //}
    13511401             
    1352               use->add_sub_use (p_use);   
     1402              // add the dependency
     1403              use->add_sub_use (p_use);
    13531404             
     1405              // add the right extra statements
     1406              {
     1407                int size =  p->m_extra_lines.size ();
     1408                for (int n = 0; n < size; n++)
     1409                {
     1410                    cmt_string& s = p->m_extra_lines[n];
     1411                    SyntaxParser::parse_requirements_line (s, use);
     1412                } 
     1413              }
     1414             
     1415              // Fill other values               
    13541416              use->sub_use_scopes.push_back (use->get_current_scope ());
    13551417              use->sub_use_auto_imports.push_back (p_use->auto_imports);
Note: See TracChangeset for help on using the changeset viewer.