Changeset 590 for CMT/HEAD


Ignore:
Timestamp:
Nov 28, 2011, 4:29:23 PM (12 years ago)
Author:
rybkin
Message:

See C.L. 467

Location:
CMT/HEAD
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • CMT/HEAD/ChangeLog

    r589 r590  
     12011-11-28    <rybkin@lal.in2p3.fr> 467
     2
     3        * source/cmt_generators.cxx: In class DependencyGenerator, function build,
     4        make constituent name optional for command cmt build dependencies
     5        * source/cmt_commands.cxx: Update command help info, in class CommandHelp,
     6        functions show, show_all, print help info on stdout (rather than stderr)
     7        * mgr/fragments/dependencies: Specify constituent name via option value
     8        * source/cmt_vcs.cxx: In class Vcs, function help, print help info on
     9        stdout (rather than stderr)
     10       
    1112011-11-28    <rybkin@lal.in2p3.fr> 466
    212
  • CMT/HEAD/mgr/fragments/dependencies

    r588 r590  
    55$(bin)${CONSTITUENT}_dependencies.make : $(use_requirements) $(cmt_final_setup_${CONSTITUENT})
    66        $(echo) "(${CONSTITUENT}.make) Rebuilding $@"; \
    7           $(build_dependencies) -out=$@ -start_all ${LINE} -end_all $(includes) $(app_${CONSTITUENT}_cppflags) $(lib_${CONSTITUENT}_cppflags) ${CONSTITUENT} $? -f=$(cmt_dependencies_in_${CONSTITUENT}) -without_cmt
     7          $(build_dependencies) -out=$@ -start_all ${LINE} -end_all $(includes) $(app_${CONSTITUENT}_cppflags) $(lib_${CONSTITUENT}_cppflags) -name=${CONSTITUENT} $? -f=$(cmt_dependencies_in_${CONSTITUENT}) -without_cmt
    88
    99-include $(bin)${CONSTITUENT}_dependencies.make
  • CMT/HEAD/source/cmt_commands.cxx

    r588 r590  
    23272327  static HelpTexts& help_texts = get_help_texts ();
    23282328
    2329   cerr << "#> cmt command [option...]" << endl;
    2330   cerr << "# command :" << endl;
     2329  cout << "#> cmt command [option...]" << endl;
     2330  cout << "# command :" << endl;
    23312331
    23322332  int i;
     
    23362336      const cmt_string& s = help_texts[i];
    23372337      if (s == "") break;
    2338       cerr << "#   " << s << endl;
    2339     }
    2340 
    2341   cerr << "# global options :" << endl;
    2342 
    2343   cerr << "#   -disable_warnings       : don't print warnings" << endl;
    2344   cerr << "#   -quiet                  : don't print errors" << endl;
    2345   cerr << "#   -use=<p>:<v>:<path>     : set package version path" << endl;
    2346   cerr << "#   -pack=<package>         : set package" << endl;
    2347   cerr << "#   -version=<version>      : set version" << endl;
    2348   cerr << "#   -path=<path>            : set root path" << endl;
    2349   cerr << "#   -f=<requirements-file>  : set input file" << endl;
    2350   cerr << "#   -e=<statement>          : add a one line statement" << endl;
    2351   cerr << "#   -tag=<tag-list>         : select a new tag-set" << endl;
    2352   cerr << "#   -tag_add=<tag-list>     : add specific comma-separated tag(s)" << endl;
    2353   cerr << "#   -tag_remove=<tag-list>  : remove specific comma-separated tag(s)" << endl;
    2354   cerr << "#   -warnings               : display various warnings" << endl;
    2355   cerr << "#   -with_version_directory : reset to default structuring style" << endl;
    2356   cerr << "#   -without_version_directory : switch structuring style" << endl;
    2357   cerr << "#   -cleanup                : activate install area cleanup" << endl;
    2358   cerr << "#   -no_cleanup             : inhibit install area cleanup" << endl;
    2359   cerr << "#   -xml                    : output in XML format (cmt setup, cmt show projects, cmt show uses)" << endl;
     2338      cout << "#   " << s << endl;
     2339    }
     2340
     2341  cout << "# global options :" << endl;
     2342
     2343  cout << "#   -disable_warnings       : don't print warnings" << endl;
     2344  cout << "#   -quiet                  : don't print errors" << endl;
     2345  cout << "#   -use=<p>:<v>:<path>     : set package version path" << endl;
     2346  cout << "#   -pack=<package>         : set package" << endl;
     2347  cout << "#   -version=<version>      : set version" << endl;
     2348  cout << "#   -path=<path>            : set root path" << endl;
     2349  cout << "#   -f=<requirements-file>  : set input file" << endl;
     2350  cout << "#   -e=<statement>          : add a one line statement" << endl;
     2351  cout << "#   -tag=<tag-list>         : select a new tag-set" << endl;
     2352  cout << "#   -tag_add=<tag-list>     : add specific comma-separated tag(s)" << endl;
     2353  cout << "#   -tag_remove=<tag-list>  : remove specific comma-separated tag(s)" << endl;
     2354  cout << "#   -warnings               : display various warnings" << endl;
     2355  cout << "#   -with_version_directory : reset to default structuring style" << endl;
     2356  cout << "#   -without_version_directory : switch structuring style" << endl;
     2357  cout << "#   -cleanup                : activate install area cleanup" << endl;
     2358  cout << "#   -no_cleanup             : inhibit install area cleanup" << endl;
     2359  cout << "#   -xml                    : output in XML format (cmt setup, cmt show projects, cmt show uses)" << endl;
    23602360}
    23612361
     
    23692369    {
    23702370      const cmt_string& s = get_help_text (action);
    2371       cerr << "# " << s << endl;
     2371      cout << "# " << s << endl;
    23722372      int i;
    23732373
     
    23752375        {
    23762376          const cmt_string& s = help_texts[i];
    2377           cerr << "#   " << s << endl;
     2377          cout << "#   " << s << endl;
    23782378        }
    23792379    }
     
    23852385        {
    23862386          const cmt_string& s = help_texts[i];
    2387           cerr << "#   " << s << endl;
     2387          cout << "#   " << s << endl;
    23882388        }
    23892389    }
     
    23952395        {
    23962396          const cmt_string& s = help_texts[i];
    2397           cerr << "#   " << s << endl;
     2397          cout << "#   " << s << endl;
    23982398        }
    23992399    }
     
    24012401    {
    24022402      const cmt_string& s = get_help_text (action);
    2403       cerr << "# " << s << endl;
     2403      cout << "# " << s << endl;
    24042404    }
    24052405}
     
    24292429  help_texts.add () =  "build constituents_config [-out=<path>] [-with_cmt] [-without_cmt] : generate constituents Makefile, tag specific Makefile, and setup definitions file, also input requirements file for constituent(s) without associated tag";
    24302430  help_texts.add () =  "build broadcast_config [-out=<path>] : generate broadcast Makefile, and broadcast specific macros Makefile";
    2431   help_texts.add () =  "build dependencies [-out=<path>] [-all_sources] [-no_stamps] [-I<directory>]... [-start_all FILE... -end_all] NAME FILE... : generate dependencies for FILEs of constituent NAME";
     2431  help_texts.add () =  "build dependencies [-out=<path>] [-name=<constituent>] [-all_sources] [-no_stamps] [-I<directory>]... [-start_all FILE... -end_all] FILE... : generate dependencies for FILEs [of constituent <constituent>]";
    24322432  help_texts.add () =  "build library_links     : build symbolic links towards all imported libraries";
    24332433  help_texts.add () =  "build make_setup        : build a compiled version of setup scripts";
  • CMT/HEAD/source/cmt_generators.cxx

    r588 r590  
    30733073  m_deps_builder.clear ();
    30743074  m_stamps = true;
    3075   m_name = "";
     3075  m_name = "unnamed";
    30763076}
    30773077
     
    32943294          m_output_file_name = file_name;
    32953295        }
     3296      else if (file_name.substr (0, 6) == "-name=" ||
     3297               file_name.substr (0, 6) == "-name:" ||
     3298               file_name.substr (0, 6) == "/name:" ||
     3299               file_name.substr (0, 6) == "/name=")
     3300        {
     3301          file_name.erase (0, 6);
     3302          m_name = file_name;
     3303        }
    32963304      else if (file_name == "-all_sources" ||
    32973305               file_name == "/all_sources")
     
    33603368          all.push_back (file_name);
    33613369        }
    3362       else if (m_name.size () != 0)
     3370      else
    33633371        {
    33643372          cli_input.push_back (file_name);
    3365         }
    3366       else
    3367         {
    3368           if (file_name.size () != 0)
    3369             m_name = file_name;
    33703373        }
    33713374    }
     
    33773380
    33783381  //cerr << "m_name: " << m_name << endl;
     3382  /*
    33793383  if (m_name.size () == 0)
    33803384    {
     
    33833387      return;
    33843388    }
    3385 
     3389  */
    33863390  //cerr << "config_files: " << config_files << endl;
    33873391
    3388   m_constituent = Constituent::find (m_name);
     3392  if (0 != m_name.size ())
     3393    m_constituent = Constituent::find (m_name);
    33893394
    33903395  if (!config_files && 0 == cli_input.size () &&
     
    34823487      //   or
    34833488      // o m_constituent sources
    3484       set_source_files (all);
    3485       if (0 == validate (cli_input))
    3486         {
    3487           // cli_input contains source files ONLY
    3488           // calculate dependencies for them ONLY
    3489           if (CmtSystem::test_file (m_output_file_name))
     3489      if (int n = set_source_files (all))
     3490        {
     3491          if (0 == validate (cli_input))
    34903492            {
    3491               if (!dependencies.read (m_output_file_name))
     3493              // cli_input contains source files ONLY
     3494              // calculate dependencies for them ONLY
     3495              if (CmtSystem::test_file (m_output_file_name))
    34923496                {
    3493                   CmtError::set (CmtError::file_access_error, m_output_file_name);
    3494                   return;
     3497                  if (!dependencies.read (m_output_file_name))
     3498                    {
     3499                      CmtError::set (CmtError::file_access_error, m_output_file_name);
     3500                      return;
     3501                    }
    34953502                }
     3503              fill_dependencies (dependencies, cli_input);
    34963504            }
     3505          else
     3506            {
     3507              all_sources = true;
     3508              // calculate dependencies for
     3509              // all cli sources
     3510              // or
     3511              // m_constituent sources
     3512              fill_dependencies (dependencies);
     3513            }
     3514        }
     3515      else
     3516        {
     3517          // calculate dependencies for all we have
    34973518          fill_dependencies (dependencies, cli_input);
    3498         }
    3499       else
    3500         {
    3501           all_sources = true;
    3502           // calculate dependencies for
    3503           // all cli sources
    3504           // or
    3505           // m_constituent sources
    3506           fill_dependencies (dependencies);
    35073519        }
    35083520      /*
     
    39773989//--------------------------------------------------
    39783990/**
    3979  *  Returns 0, if each file in files is found in m_source_files,
     3991 *  Returns 0, if each file in @files is found in m_source_files,
    39803992 *  otherwise returns 1
    39813993 */
  • CMT/HEAD/source/cmt_vcs.cxx

    r540 r590  
    36933693void Vcs::help ()
    36943694{
    3695   cerr << "Usage:" << endl;
    3696   cerr << "> cd <some work area>" << endl;
    3697   cerr << "> cmt co | checkout [modifier]... <package|project>..." << endl;
    3698   cerr << "" << endl;
    3699   cerr << "   modifier :" << endl;
    3700   cerr << "   -l          Do not process used packages (default)." << endl;
    3701   cerr << "   -R          Process used products recursively." << endl;
    3702   cerr << "   -r rev      Check out version tag rev (may be HEAD)." << endl;
    3703   cerr << "   -C          Determine version tag and/or package container from context." << endl;
    3704   cerr << "   -i          Do not check out, show package(s) information only." << endl;
    3705   cerr << "   -vd dir     Use this version directory instead of version tag." << endl;
    3706   cerr << "   -d dir      Check out into dir instead of module name." << endl;
    3707   cerr << "   -o offset   Offset in the repository" << endl;
    3708   cerr << "   -requirements <requirements file path>  Check out packages referenced in this requirements file" << endl;
     3695  cout << "Usage:" << endl;
     3696  cout << "> cd <some work area>" << endl;
     3697  cout << "> cmt co | checkout [modifier]... <package|project>..." << endl;
     3698  cout << "" << endl;
     3699  cout << "   modifier :" << endl;
     3700  cout << "   -l          Do not process used packages (default)." << endl;
     3701  cout << "   -R          Process used products recursively." << endl;
     3702  cout << "   -r rev      Check out version tag rev (may be HEAD)." << endl;
     3703  cout << "   -C          Determine version tag and/or package container from context." << endl;
     3704  cout << "   -i          Do not check out, show package(s) information only." << endl;
     3705  cout << "   -vd dir     Use this version directory instead of version tag." << endl;
     3706  cout << "   -d dir      Check out into dir instead of module name." << endl;
     3707  cout << "   -o offset   Offset in the repository" << endl;
     3708  cout << "   -requirements <requirements file path>  Check out packages referenced in this requirements file" << endl;
    37093709  //cerr << "   -t        Change file timestamps to the date of checkout" << endl;
    37103710  //cerr << "   -n        simulation mode on" << endl;
    3711   cerr << "   -no_config  Disable config step after checkout" << endl;   
     3711  cout << "   -no_config  Disable config step after checkout" << endl;   
    37123712  //cerr << "   -v        verbose mode on" << endl;
    3713   cerr << "   -rs suffix  Same as -r <packagename|projectname>suffix" << endl;
    3714   cerr << "   --help      Print this help" << endl;
    3715   cerr << "" << endl;
    3716   cerr << "(Modifiers are recognised anywhere on the command line.)" << endl;
     3713  cout << "   -rs suffix  Same as -r <packagename|projectname>suffix" << endl;
     3714  cout << "   --help      Print this help" << endl;
     3715  cout << "" << endl;
     3716  cout << "(Modifiers are recognised anywhere on the command line.)" << endl;
    37173717//   cerr << "" << endl;
    37183718//   cerr << "> cmt cvstags <package|project>" << endl;
    37193719//   cerr << "> cmt cvssubpackages <directory>" << endl;
    37203720//   cerr << "> cmt cvssubprojects <directory>" << endl;
    3721   cerr << "" << endl;
     3721  cout << "" << endl;
    37223722}
    37233723
Note: See TracChangeset for help on using the changeset viewer.