Index: /CMT/v1rbeta20p20061025/source/cmt_project.cxx
===================================================================
--- /CMT/v1rbeta20p20061025/source/cmt_project.cxx	(revision 296)
+++ /CMT/v1rbeta20p20061025/source/cmt_project.cxx	(revision 297)
@@ -571,23 +571,62 @@
       // Last step is to parse the project file
 
-      if (Cmt::get_debug ())
-	{
-	  cout << "About to parse project file [" << text << "]" << endl;
-	}
 
       // First create the Project.m_use for the policy
 	  //cout << "About to add project policy package file [" <<  project->get_name()+"_project_policy" << "]" << endl;      
-      Use* project_use = Use::create (project->get_cmtpath(), 
+	  
+	  if (project->get_use() == 0)
+
+      if (Cmt::get_debug ())
+	{
+	  cout << "About to parse project file [" << text << "]" << endl;
+	}
+
+
+      {
+          
+     Use* project_use = Use::create (project->get_cmtpath(), 
                                  project->get_name()+"_project_policy", 
                                  project->get_release (), "", "");                        
                                  
-      project_use->done      = false;
+      project_use->done      = true;
       project_use->discarded = false;
       project_use->selected  = false;
-      project->set_use(project_use);
+      project_use->m_located = true;
+      project_use->set_auto_imports(On);
+
+    // add at the uses level
+    static Use::UsePtrVector& uses = Use::get_ordered_uses ();
+     bool found = false;
+     int  size  = uses.size ();
+     //cerr << "\n size:"<<size<< ":" << endl;  
+     for (int n = 0; n < size; n++)
+     {
+          Use* tuse = uses[n];
+          //cerr << "\tpackage file [" << tuse->get_package_name() << "]" <<project_use->get_package_name()<< endl;            
+          if (tuse->get_package_name()==project_use->get_package_name())
+                    found=true;
+
+     }
+     
+     project->set_use(project_use);     
+     
+     if (not found)
+    {
+         uses.push_back (project_use);
+         project_use->m_index = uses.size () - 1;
+
+    }
+    
+    //             Use::UsePtrVector& uses = use->get_package()->get_uses ();
+    //             uses.push_back (p_use);
+    //             use->m_index = uses.size () - 1;
+
+
 
       SyntaxParser::parse_project_file_text (text, 
 					     Project::get_project_file_name (),
 					     project);
+      //project_use->done      = true; 
+      }
     }
 
Index: /CMT/v1rbeta20p20061025/source/cmt_syntax.cxx
===================================================================
--- /CMT/v1rbeta20p20061025/source/cmt_syntax.cxx	(revision 296)
+++ /CMT/v1rbeta20p20061025/source/cmt_syntax.cxx	(revision 297)
@@ -166,9 +166,8 @@
   {
     bool result = true;    
-     
     value =  w; 
     Symbol::expand(value);
-    cout <<"# strategy: "<<value<<endl;           
-
+    cerr <<"#value: "<<value<<" for w: "<<w<<endl;           
+    
     if (value == "prototypes")
       {
@@ -181,11 +180,11 @@
     else if ((value == "with_installarea") || (value == "with_install_area"))
       {
-	value = "with_installarea";
-	strategy = "InstallArea";
+	    value = "with_installarea";
+	    strategy = "InstallArea";
       }
     else if ((value == "without_installarea") || (value == "without_install_area"))
       {
-	value = "without_installarea";
-	strategy = "InstallArea";
+	    value = "without_installarea";
+	    strategy = "InstallArea";
       }
     else
@@ -236,5 +235,6 @@
 	       int line_number)
   {
-      for (int i = 1; i < words.size (); i++)
+      action (words, project->get_use(), file_name, line_number);    
+/*      for (int i = 1; i < words.size (); i++)
       {
 	const cmt_string& w = words[i];
@@ -257,5 +257,7 @@
 	  }
       }
-  }
+      */
+  }
+ 
 };
 
@@ -1309,5 +1311,6 @@
     }
 
-      //
+
+    // Add dependency on the virtual project policy package
     Project* p = use->get_project ();
     if (p != 0)
@@ -1315,11 +1318,28 @@
            Use* p_use =  p->get_use();
            if (p_use != 0)
-           {
-               //cout << "About to add dependency on project policy package file [" <<  p_use->get_package_name() << "]" << endl;      
-               p_use->add_sub_use (p_use);
+           {                              
+               //cerr <<use->get_package_name()<<": About to add dependency on project policy package file [" <<  p_use->get_package_name() << "]" << endl;      
+               //p_use->add_sub_use (p_use);
+               bool found=false;
+               int  size = p_use->sub_uses.size ();
+               //cerr << "\ndependency on project policy package file [" << use->get_package_name()<<", size:"<<size<< "]:" << endl;  
+               for (int n = 0; n < size; n++)
+                {
+                  Use* tuse = p_use->sub_uses[n];
+                  //cerr << "\tpackage file [" << tuse->get_package_name() << "]" << endl;  
+                  if (tuse->get_package_name()==p_use->get_package_name())
+                    found= true;
+                }
+               if (not found)                   
+               {
+                   use->sub_uses.push_back (p_use);                
+                   use->sub_use_scopes.push_back (use->get_current_scope ());
+                   use->sub_use_auto_imports.push_back (Off);
+
+               }
            }
     }
 
-  me.do_parse_requirements (file_name, use);
+    me.do_parse_requirements (file_name, use); 
 
   if (use != 0)
Index: /CMT/v1rbeta20p20061025/source/cmt_use.cxx
===================================================================
--- /CMT/v1rbeta20p20061025/source/cmt_use.cxx	(revision 296)
+++ /CMT/v1rbeta20p20061025/source/cmt_use.cxx	(revision 297)
@@ -459,8 +459,8 @@
       
       for (i = 0; i < uses.size (); i++)
-	{
-	  Use* u = uses[i];
-	  cout << u->get_package_name () << "[" << u->get_index () << "]" << " ";
-	}
+	    {
+	      Use* u = uses[i];
+	      cout << u->get_package_name () << "[" << u->get_index () << "]" << " ";
+	    }
       
       cout << endl;
@@ -503,4 +503,5 @@
                       endl;
                 }
+             
               CmtError::set (CmtError::package_not_found, use->get_package_name ());
             }
@@ -2650,5 +2651,5 @@
 		   << " v=" << u->version
 		   << " discarded=" << u->discarded
-		   << " selected=" << u->selected 
+		   << " selected=" << u->selected
 		   << " done=" << u->done
 		   << " index=" << u->m_index
@@ -3798,4 +3799,5 @@
 
   level++;
+
   for (n = 0; n < sub_uses.size (); n++)
     {
@@ -4195,8 +4197,4 @@
 
 
-
-
-
-
 Package* Package::find (const cmt_string& name)
 {
@@ -4347,12 +4345,12 @@
       Use::UsePtrVector& uses = p.get_uses ();
       for (j = 0; j < uses.size (); j++)
-	{
-	  Use* u = uses[j];
-	  cout << u << ",";
-	}
+	    {
+	      Use* u = uses[j];
+	      cout << u << ",";
+	    }
 
       cout << "] ";
     }
-  cout << endl;
+      cout << endl;
 
   {
Index: /CMT/v1rbeta20p20061025/source/cmt_use.h
===================================================================
--- /CMT/v1rbeta20p20061025/source/cmt_use.h	(revision 296)
+++ /CMT/v1rbeta20p20061025/source/cmt_use.h	(revision 297)
@@ -135,4 +135,5 @@
 // Public attributes
 public:
+  UsePtrVector sub_uses;
 
   cmt_string specified_version;  /* idem                            */
@@ -162,4 +163,10 @@
   ApplyPattern::ApplyPatternVector apply_patterns;
   IgnorePattern::IgnorePatternVector ignore_patterns;
+
+  // public in waiting
+  int m_index;  // Position within the ordered list of uses
+  bool m_located;
+  cmt_vector<ScopeType> sub_use_scopes;
+  cmt_vector<State> sub_use_auto_imports;
 
 // Private methods
@@ -194,10 +201,7 @@
   //cmt_string m_package_name; /* directly read from requirements */
 
-  bool m_located;
   bool m_has_native_version;
 
-  UsePtrVector sub_uses;
-  cmt_vector<ScopeType> sub_use_scopes;
-  cmt_vector<State> sub_use_auto_imports;
+
 
   ScopeType initial_scope;
@@ -209,5 +213,4 @@
   CmtSystem::cmt_string_vector requests;
 
-  int m_index;  // Position within the ordered list of uses
 
   friend class UseProjectAction;
