- Timestamp:
- Nov 22, 2006, 6:49:05 PM (18 years ago)
- Location:
- CMT/v1r20b1/source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
CMT/v1r20b1/source/cmt_parser.cxx
r333 r334 1757 1757 if (use == 0) continue; 1758 1758 if (use->discarded) continue; 1759 if (use->m_hidden) continue; 1759 1760 1760 1761 if (use->get_package_name () == "CMT") continue; … … 2968 2969 2969 2970 if (use->discarded) continue; 2971 if (use->m_hidden) continue; 2970 2972 2971 2973 if (!use->located ()) … … 5917 5919 5918 5920 if (use->discarded) continue; 5921 if (use->m_hidden) continue; 5919 5922 5920 5923 Package* p = use->get_package (); … … 6737 6740 6738 6741 if (use->discarded) continue; 6742 if (use->m_hidden) continue; 6739 6743 6740 6744 if (use->located ()) … … 6779 6783 6780 6784 if (use->discarded) continue; 6785 if (use->m_hidden) continue; 6781 6786 6782 6787 Package* p = use->get_package (); … … 6838 6843 6839 6844 if (use->discarded) continue; 6845 if (use->m_hidden) continue; 6840 6846 6841 6847 Package* p = use->get_package (); … … 6981 6987 6982 6988 if (use->discarded) continue; 6989 if (use->m_hidden) continue; 6983 6990 6984 6991 Package* p = use->get_package (); -
CMT/v1r20b1/source/cmt_project.cxx
r333 r334 586 586 project_use->selected = true; 587 587 project_use->m_located = true; 588 project_use->set_auto_imports(O n);588 project_use->set_auto_imports(Off); 589 589 project_use->initial_scope = ScopePublic; 590 590 project->set_use(project_use); -
CMT/v1r20b1/source/cmt_use.cxx
r333 r334 1432 1432 cout << "Use::reach_package> (" << get_package_name () << " " 1433 1433 << version << ")from " << from_path << endl; 1434 cout << "Use::reach_package> native_version required "<<n_version<<endl; 1434 1435 } 1435 1436 … … 1584 1585 // There are alternate possibilities when it contains wild cards 1585 1586 // 1586 if ((version == "") || 1587 (version.find ("*") != cmt_string::npos)) 1587 if ((version == "") || (version.find ("*") != cmt_string::npos)) 1588 1588 { 1589 1589 static CmtSystem::cmt_string_vector versions; … … 1598 1598 if (n_version != "") 1599 1599 { 1600 staticCmtSystem::cmt_string_vector native_versions;1600 CmtSystem::cmt_string_vector native_versions; 1601 1601 for (int i = 0; i < versions.size (); i++) 1602 1602 { … … 1621 1621 int pos = nv.find ('\n'); 1622 1622 if (pos != cmt_string::npos) nv.erase (pos); 1623 pos = nv.find ('\r');1623 pos = nv.find ('\r'); 1624 1624 if (pos != cmt_string::npos) nv.erase (pos); 1625 1625 if (nv == n_version) 1626 1626 { 1627 1627 cmt_string& name_entry = native_versions.add (); 1628 name_entry += versions[i]; 1628 // We have found at least one 1629 // cout <<"native_version :"<<n_version<<" ,version: "<< versions[i]<<endl; 1630 this->native_version = n_version; 1631 name_entry += versions[i]; 1629 1632 } 1630 1633 } … … 1749 1752 public: 1750 1753 UseProjectAction (Use* use, cmt_string n_version="") : m_use (use), m_found (false), native_version(n_version) 1751 1752 1754 { 1753 1755 } … … 1766 1768 1767 1769 if (m_use->reach_package (path, this->native_version)) 1768 1770 { 1769 1771 if (Cmt::get_debug ()) 1770 1772 { … … 1888 1890 // Second try is among the CMTPATHs 1889 1891 // 1890 1891 1892 UseProjectAction pa (this, native_version); 1892 1893 … … 1997 1998 const cmt_string& package, 1998 1999 const cmt_string& version, 2000 const cmt_string& n_version, 1999 2001 Use** old_use, 2000 Use* context_use)2002 Use* context_use) 2001 2003 { 2002 2004 bool new_request = add_request (path, package, version); 2003 2005 2004 2006 Use& current_use = Use::current (); 2005 2007 … … 2086 2088 (path == use.specified_path)) 2087 2089 { 2090 2088 2091 if (Cmt::get_debug ()) 2089 { 2090 cout << " ... exactly same version and path!" << endl; 2091 } 2092 2092 { 2093 cout << " ... exactly same version and path!" << endl; 2094 } 2093 2095 do_need_new = false; // We don't need a new one 2094 } 2096 if (n_version != use.native_version) 2097 { 2098 if (Cmt::get_debug ()) 2099 cout << " ... but native_version differs (" <<n_version<<"!="<<use.native_version<<") !" <<endl; 2100 do_need_new = true; 2101 } 2102 } 2095 2103 else if (version != use.specified_version) 2096 2104 { … … 2211 2219 2212 2220 do_need_new = false; // We don't need a new one 2221 if (n_version != use.native_version) 2222 { 2223 if (Cmt::get_debug ()) 2224 cout << " ... but native_version differs (" <<n_version<<"!="<<use.native_version<<") !" <<endl; 2225 do_need_new = true; 2226 } 2227 2213 2228 } 2214 2229 else if (version != use.specified_version) … … 2310 2325 const cmt_string& version, 2311 2326 const cmt_string& version_alias, 2312 const cmt_string& path_alias) 2327 const cmt_string& path_alias, 2328 const cmt_string& n_version) 2313 2329 { 2314 2330 Package* p = 0; … … 2324 2340 2325 2341 if ((use->specified_version == version) && 2326 (use->specified_path == path) ) return (use);2342 (use->specified_path == path) && use->native_version==n_version) return (use); 2327 2343 } 2328 2344 … … 2359 2375 Use* use = 0; 2360 2376 2361 do_need_new = need_new (path, package_name, version, &old_use, context_use); 2362 //cout <<"native_version: "<<native_version<<" "<<version<<endl; 2363 2377 do_need_new = need_new (path, package_name, version, native_version, &old_use, context_use); 2364 2378 2365 2379 if (Cmt::get_debug ()) 2366 2380 { 2367 if (old_use != 0 )2381 if (old_use != 0 && !do_need_new) 2368 2382 { 2369 2383 cout << "add> old_use " << old_use->get_package_name () << … … 2376 2390 if (do_need_new) 2377 2391 { 2378 use = create (path, package_name, version, version_alias, path_alias );2392 use = create (path, package_name, version, version_alias, path_alias, native_version); 2379 2393 } 2380 2394 else … … 2503 2517 if (Cmt::get_debug ()) 2504 2518 { 2505 cout << "select? [" << use << "] vs old_use[" << old_use << "] "2519 cout << "select? [" << use << "] "<< use->version <<" vs old_use[" << old_use << "] " 2506 2520 << old_use->get_package_name () 2507 2521 << " " << old_use->version … … 2528 2542 // 2529 2543 static BestFitSelector selector; 2530 2544 Use* selected_use = selector.operate (old_use, use); 2531 2545 2532 2546 if (Cmt::get_debug ()) … … 2544 2558 if (use != selected_use) 2545 2559 { 2546 use = use->set_selected_version (selected_use);2560 use = use->set_selected_version (selected_use); 2547 2561 } 2548 2562 … … 3545 3559 3546 3560 if (use->discarded) continue; 3561 if (use->m_hidden) continue; 3547 3562 3548 3563 if (!use->located ()) continue; … … 4235 4250 4236 4251 4237 4238 4239 4240 4241 4252 Package* Package::find (const cmt_string& name) 4242 4253 { -
CMT/v1r20b1/source/cmt_use.h
r331 r334 64 64 const cmt_string& version, 65 65 const cmt_string& version_alias, 66 const cmt_string& path_alias); 66 const cmt_string& path_alias, 67 const cmt_string& n_version=""); 67 68 68 69 void add_sub_use(Use* use) … … 189 190 const cmt_string& package, 190 191 const cmt_string& version, 192 const cmt_string& n_version, 191 193 Use** old_use, 192 194 Use* context_use);
Note: See TracChangeset
for help on using the changeset viewer.