Changeset 80 for CMT/HEAD


Ignore:
Timestamp:
Sep 1, 2005, 8:49:02 AM (19 years ago)
Author:
arnault
Message:

Bug fixes - see CL#276

Location:
CMT/HEAD
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • CMT/HEAD/ChangeLog

    r79 r80  
     12005-09-01  Christian Arnault  <arnault@lal.in2p3.fr> 276
     2
     3        * source/cmt_symbol.cxx (all_set): Generate all XXXROOT and XXXCONFIG evs accroding
     4        to the strategies.
     5
     6        * source/cmt_parser.cxx (get_strategy): Make the use argument of the function a required argument
     7        ie suppress the default arg to Use::current ()
     8        Prepare to migrate this function as a member function of Use
     9
    1102005-08-31  Christian Arnault  <arnault@lal.in2p3.fr> 275
     11
     12        * source/cmt.h (class Cmt): Making the get_strategy function a member function
     13        rather than a private local one
    214
    315        * mgr/fragments/constituent (uninstall): Protect against missing un/install targets
  • CMT/HEAD/mgr/cmt.nmake

    r79 r80  
    33#  Application cmt
    44#
    5 #   Generated Wed Aug 31 14:53:11 2005  by carnault
     5#   Generated Wed Aug 31 17:37:50 2005  by carnault
    66#
    77#====================================
  • CMT/HEAD/source/cmt.h

    r42 r80  
    211211  static CmtScopeFilteringMode get_scope_filtering_mode ();
    212212  static bool get_all_sets_done ();
     213  static bool get_strategy (const cmt_string& name, Use& use);
    213214
    214215  /// If a project file exists above the current directory we don't need CMTPATH
  • CMT/HEAD/source/cmt_parser.cxx

    r79 r80  
    153153
    154154//----------------------------------------------------------
    155 static bool get_strategy (const cmt_string& name, Use& use = Use::current())
     155bool Cmt::get_strategy (const cmt_string& name, Use& use)
    156156{
    157157  static cmt_string cmtpath;
     
    17411741  }
    17421742
    1743   if (get_strategy ("InstallArea"))
     1743  if (get_strategy ("InstallArea", current_use))
    17441744    {
    17451745      const CmtInstallAreaMgr& ia_mgr = CmtInstallAreaMgr::instance ();
     
    20662066    //Use::UsePtrVector& Uses = Use::get_ordered_uses ();
    20672067
     2068  Use& current_use = Use::current ();
     2069
    20682070  if (Me.m_debug)
    20692071    {
     
    21632165    //  Try a cleanup of the installation area
    21642166    //
    2165   if (get_strategy ("InstallArea"))
     2167  if (get_strategy ("InstallArea", current_use))
    21662168    {
    21672169      CmtInstallAreaMgr& ia_mgr = CmtInstallAreaMgr::instance ();
     
    21692171      //cout << "#IA3>" << endl;
    21702172
    2171       if (get_strategy ("SetupCleanup"))
     2173      if (get_strategy ("SetupCleanup", Use::current ()))
    21722174        {
    21732175          ia_mgr.config ();
     
    29012903              Symbol::expand (libname);
    29022904
    2903               if (get_strategy ("InstallArea"))
     2905              if (get_strategy ("InstallArea", current_use))
    29042906                {
    29052907                  const CmtInstallAreaMgr& ia_mgr = CmtInstallAreaMgr::instance ();
     
    30923094void Cmt::do_setup (const ArgParser& ap)
    30933095{
     3096  Use& current_use = Use::current ();
    30943097
    30953098  do_check_configuration (ap);
     
    31003103    //  Try a cleanup of the installation area
    31013104    //
    3102   if (get_strategy ("InstallArea"))
     3105  if (get_strategy ("InstallArea", current_use))
    31033106    {
    31043107      CmtInstallAreaMgr& ia_mgr = CmtInstallAreaMgr::instance ();
     
    31093112
    31103113      /*
    3111       if (get_strategy ("SetupCleanup"))
     3114      if (get_strategy ("SetupCleanup", current_use))
    31123115        {
    31133116          const cmt_string& installarea = ia_mgr.get_installarea ();
     
    36493652void Cmt::do_show_strategies (const ArgParser& /*ap*/)
    36503653{
     3654  Use& current_use = Use::current ();
     3655
    36513656  Project::show_specified_strategies_for_all ();
    36523657
     
    36743679  cout << "Build strategy    : ";
    36753680
    3676   if (get_strategy ("BuildPrototypes"))
     3681  if (get_strategy ("BuildPrototypes", current_use))
    36773682    {
    36783683      cout << "prototypes";
     
    36833688    }
    36843689 
    3685   if (get_strategy ("InstallArea"))
     3690  if (get_strategy ("InstallArea", current_use))
    36863691    {
    36873692      cout << " with_installarea";
     
    36963701  cout << "Setup strategy    : ";
    36973702 
    3698   if (get_strategy ("SetupConfig"))
     3703  if (get_strategy ("SetupConfig", current_use))
    36993704    {
    37003705      cout << "config";
     
    37053710    }
    37063711 
    3707   if (get_strategy ("SetupRoot"))
     3712  if (get_strategy ("SetupRoot", current_use))
    37083713    {
    37093714      cout << " root";
     
    37143719    }
    37153720 
    3716   if (get_strategy ("SetupCleanup"))
     3721  if (get_strategy ("SetupCleanup", current_use))
    37173722    {
    37183723      cout << " cleanup";
     
    41714176  cout << "Creating setup scripts." << endl;
    41724177
     4178  Use& current_use = Use::current ();
    41734179 
    41744180  cmt_string no_cleanup_opt;
    41754181
    4176   if (get_strategy ("SetupCleanup"))
     4182  if (get_strategy ("SetupCleanup", current_use))
    41774183    {
    41784184      no_cleanup_opt = " -no_cleanup";
     
    43644370  cout << "Creating setup scripts." << endl;
    43654371
     4372  Use& current_use = Use::current ();
     4373
    43664374  cmt_string no_cleanup_opt;
    43674375
    4368   if (get_strategy ("SetupCleanup"))
     4376  if (get_strategy ("SetupCleanup", current_use))
    43694377    {
    43704378      no_cleanup_opt = " -no_cleanup";
     
    47044712bool Cmt::need_prototypes ()
    47054713{
    4706   if (get_strategy ("BuildPrototypes")) return (true);
     4714  Use& current_use = Use::current ();
     4715  if (get_strategy ("BuildPrototypes", current_use)) return (true);
    47074716  else return (false);
    47084717}
     
    57475756  cmt_string system = CmtSystem::get_cmt_config ();
    57485757
    5749   bool do_config = get_strategy ("SetupConfig");
    5750   bool do_root = get_strategy ("SetupRoot");
     5758  bool do_config = get_strategy ("SetupConfig", use);
     5759  bool do_root = get_strategy ("SetupRoot", use);
    57515760
    57525761  switch (mode)
     
    72957304    CmtPathPattern::apply_all ();
    72967305
    7297     if (get_strategy ("InstallArea"))
     7306    if (Cmt::get_strategy ("InstallArea", Use::current ()))
    72987307      {
    72997308        CmtInstallAreaMgr& ia_mgr = CmtInstallAreaMgr::instance ();
     
    74297438    //
    74307439  /*
    7431   if (get_strategy ("InstallArea"))
     7440  if (get_strategy ("InstallArea", Use::current ()))
    74327441    {
    74337442      CmtInstallAreaMgr& ia_mgr = CmtInstallAreaMgr::instance ();
  • CMT/HEAD/source/cmt_symbol.cxx

    r78 r80  
    12471247
    12481248  static SymbolVector& Symbols = symbols ();
     1249  Use::UsePtrVector& Uses = Use::get_ordered_uses ();
    12491250
    12501251  static CmtSystem::cmt_string_vector envs;
     
    12781279        }
    12791280    }
     1281
     1282  cmt_string cmtconfig = CmtSystem::get_cmt_config ();
     1283
     1284  if (Uses.size () > 0)
     1285    {
     1286      int number;
     1287
     1288      for (number = 0; number < Uses.size (); number++)
     1289        {
     1290          Use& use = *(Uses[number]);
     1291
     1292          if (use.discarded) continue;
     1293
     1294          if (use.get_package_name () == "cmt_standalone") continue;
     1295
     1296          if (Cmt::get_strategy ("SetupConfig", use))
     1297            {
     1298              cmt_string& temp = envs.add ();
     1299
     1300              temp = use.prefix;
     1301              temp += "CONFIG=";
     1302              temp += cmtconfig;
     1303            }
     1304
     1305          if (Cmt::get_strategy ("SetupRoot", use))
     1306            {
     1307              cmt_string& temp = envs.add ();
     1308
     1309              temp = use.prefix;
     1310              temp += "ROOT=";
     1311              temp += use.get_full_path ();
     1312            }
     1313        }
     1314    }
     1315
     1316  {
     1317    Use& use = Use::current ();
     1318
     1319    if (use.get_package_name () != "cmt_standalone")
     1320      {
     1321        if (Cmt::get_strategy ("SetupConfig", use))
     1322          {
     1323            cmt_string& temp = envs.add ();
     1324           
     1325            temp = use.prefix;
     1326            temp += "CONFIG=";
     1327            temp += cmtconfig;
     1328          }
     1329       
     1330        if (Cmt::get_strategy ("SetupRoot", use))
     1331          {
     1332            cmt_string& temp = envs.add ();
     1333           
     1334            temp = use.prefix;
     1335            temp += "ROOT=";
     1336            temp += use.get_full_path ();
     1337          }
     1338      }
     1339  }
    12801340
    12811341  for (number = 0; number < Symbol::symbol_number (); number++)
Note: See TracChangeset for help on using the changeset viewer.