00206 {
00207 if (argc < 3) return (1);
00208
00209 cmt_string p;
00210 p = argv[1];
00211 cmt_string v;
00212 v = argv[2];
00213 cmt_string pp;
00214 if (argc >= 3) pp = argv[3];
00215
00216 Package& top_package = Package::create (p, v, pp);
00217 tree_node top_node (0, &top_package);
00218
00219 cmt_string cmt_version;
00220 CmtSystem::get_cmt_version (cmt_version);
00221 Package::create ("CMT", cmt_version, "");
00222
00226 FileScanner scanner;
00227 PackageViewer viewer;
00228
00229 CmtSystem::cmt_string_vector paths;
00230 CmtSystem::cmt_string_vector path_pwds;
00231 CmtSystem::cmt_string_vector path_sources;
00232
00233 CmtSystem::get_cmt_paths (paths, path_pwds, path_sources);
00234
00235 for (int path_index = 0; path_index < paths.size (); path_index++)
00236 {
00237 const cmt_string& path = paths[path_index];
00238 viewer.set_path (path);
00239 scanner.scan_path (path, viewer);
00240 }
00241
00246 top_package.collect_clients (top_node);
00247
00251 DotGenerator generator;
00252
00253 generator.run (top_node, "back");
00254
00255 return (0);
00256 }