Ignore:
Timestamp:
Oct 31, 2007, 4:48:32 PM (17 years ago)
Author:
rybkin
Message:

See C.L. 334

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CMT/HEAD/source/cmt_generator.cxx

    r400 r428  
    219219//--------------------------------------------------
    220220bool CmtGenerator::prepare_output (const cmt_string& package,
    221                                    const Constituent& constituent)
     221                                   const Constituent& constituent,
     222                                   const cmt_string& file)
    222223{
    223224  m_PACKAGE = package;
     
    238239    }
    239240 
     241  if (file != "") m_output_file_name = file;
     242
    240243  m_output_file_name += "new";
    241244
     
    692695
    693696//--------------------------------------------------
    694 int Generator::build_constituent_makefile (const Constituent& constituent)
     697int Generator::build_constituent_makefile (const Constituent& constituent,
     698                                           const cmt_string& file)
    695699{
    696700  const cmt_string& package = Cmt::get_current_package ();
     
    699703    {
    700704    case Application:
    701       ApplicationContext.build (package, constituent);
     705      ApplicationContext.build (package, constituent, file);
    702706      break;
    703707    case Library:
    704       LibraryContext.build (package, constituent);
     708      LibraryContext.build (package, constituent, file);
    705709      break;
    706710    case Document:
    707       DocumentContext.build (package, constituent);
     711      DocumentContext.build (package, constituent, file);
    708712      break;
    709713    }
     
    713717
    714718//--------------------------------------------------
    715 void Generator::build_constituent_makefile (const cmt_string& name)
    716 {
     719void Generator::build_constituent_makefile (const CmtSystem::cmt_string_vector& arguments)
     720{
     721  cmt_string name;
     722  cmt_string file;
     723
     724  if (arguments.size () == 1)
     725    {
     726      file = "";
     727      name = arguments[0];
     728    }
     729  else if (arguments.size () == 2) // arguments[0].substr (0, 5) == "-out="
     730    {
     731      cmt_string arg = arguments[0];
     732      arg.erase (0, 5);
     733      file = arg;
     734      name = arguments[1];
     735    }
     736  else
     737    {
     738      cerr << "#CMT> build constituent_makefile : wrong arguments" << endl;
     739      return;
     740    }
     741
    717742  const Constituent* constituent = Constituent::find (name);
    718   if (constituent != 0) build_constituent_makefile (*constituent);
     743  if (constituent != 0) build_constituent_makefile (*constituent, file);
    719744}
    720745
Note: See TracChangeset for help on using the changeset viewer.