Changeset 482 for CMT


Ignore:
Timestamp:
Nov 29, 2008, 5:20:44 PM (16 years ago)
Author:
rybkin
Message:

See C.L. 377

Location:
CMT/HEAD
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • CMT/HEAD/ChangeLog

    r481 r482  
     12008-11-29    <rybkin@lal.in2p3.fr> 377
     2       
     3        * source/cmt_project.cxx: In function show_paths, introduce and implement
     4        the -d option of the "cmt show path" command to show how the the package
     5        search paths list is formed (default: the original succinct one line per
     6        path output)
     7        * source/cmt_project.h: idem
     8        * source/cmt_parser.cxx: idem
     9        * source/cmt_commands.cxx: idem. Add help text for the introduced option.
     10       
    1112008-11-28    <rybkin@lal.in2p3.fr> 376
    212       
    313        * source/cmt_parser.cxx: In function fill_for_all_constituents, ensure that
    414        the <constituent>_use_linkopts macro is set in case the constituent
    5         -import=<package> options constituent effectively import nothing
     15        -import=<package> options effectively import nothing
    616
    7172008-11-18    <rybkin@lal.in2p3.fr> 375
  • CMT/HEAD/source/cmt_commands.cxx

    r466 r482  
    14231423      else if (arg == "path")
    14241424        {
    1425           cmt.m_action = action_show_path;
     1425          if (argc == 0)
     1426            {
     1427              cmt.m_action = action_show_path;
     1428            }
     1429          else if (argc == 1 && cmt_string (argv[0]) == "-d")
     1430            {
     1431              fill_one_argument ();
     1432              cmt.m_action = action_show_path;
     1433            }
     1434          else
     1435            {
     1436              cmt.m_action = action_show_path;
     1437              help_action = action_help;
     1438            }
    14261439        }
    14271440      else if (arg == "pattern")
     
    22402253  help_texts.add () =  "show  manager           :  package manager";
    22412254  help_texts.add () =  "show  packages          :  packages reachable from the current context";
    2242   help_texts.add () =  "show  path              :  the package search list";
     2255  help_texts.add () =  "show  path [-d]         :  the package search paths list [in detail]";
    22432256  help_texts.add () =  "show  pattern <name>    :  the pattern definition and usages";
    22442257  help_texts.add () =  "show  pattern_names     :  pattern names";
  • CMT/HEAD/source/cmt_parser.cxx

    r481 r482  
    40764076
    40774077//----------------------------------------------------------
    4078 void Cmt::do_show_path (const ArgParser& /*ap*/)
    4079 {
    4080   Project::show_paths ();
     4078void Cmt::do_show_path (const ArgParser& ap)
     4079{
     4080  Project::show_paths (ap.arguments);
    40814081}
    40824082
  • CMT/HEAD/source/cmt_project.cxx

    r471 r482  
    10571057
    10581058/*----------------------------------------------------------*/
    1059 void Project::show_paths ()
    1060 {
    1061   VisitorForShowPaths visitor;
    1062 
    1063   start_visit (visitor);
     1059void Project::show_paths (const CmtSystem::cmt_string_vector& arguments)
     1060//void Project::show_paths ()
     1061{
     1062  if (arguments.size () == 0)
     1063    {
     1064      const ProjectPtrVector Ordered = Project::ordered_projects ();
     1065      for (int i = 0; i < Ordered.size (); i++)
     1066        {
     1067          const Project* p = Ordered[i];
     1068          const cmt_string& w = p->get_cmtpath_pwd ();
     1069          const cmt_string& s = p->get_cmtpath_source ();
     1070         
     1071          if (s == "default path") continue;
     1072         
     1073          if (CmtSystem::test_directory (w))
     1074            {
     1075              cout << "# Add path " << w << " from " << s << endl;
     1076            }
     1077        }
     1078    }
     1079  else if (arguments.size () == 1 && cmt_string (arguments[0]) == "-d")
     1080    {
     1081      VisitorForShowPaths visitor;
     1082      start_visit (visitor);
     1083    }
     1084  else
     1085    CmtMessage::error ("show_paths: unexpected argument(s)");
    10641086}
    10651087
  • CMT/HEAD/source/cmt_project.h

    r471 r482  
    113113  static void show_all ();
    114114  static void show_specified_strategies_for_all ();
    115   static void show_paths ();
     115  static void show_paths (const CmtSystem::cmt_string_vector& arguments);
     116  //  static void show_paths ();
    116117  static const cmt_string& get_project_file_name ();
    117118
Note: See TracChangeset for help on using the changeset viewer.