Ignore:
Timestamp:
Mar 2, 2005, 5:39:59 PM (19 years ago)
Author:
arnault
Message:

Various improvements - Introduction of CMTPROJECTPATH - see CL251

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CMT/v1r19/source/cmt_parser.cxx

    r2 r3  
    19611961void Cmt::do_check_configuration (const ArgParser& ap)
    19621962{
     1963  cmt_string env;
     1964  Tag* tag;
     1965
     1966  static CmtSystem::cmt_string_vector tags;
     1967
     1968  CmtSystem::split (Me.m_extra_tags, " \t,", tags);
     1969
     1970  for (int i = 0; i < tags.size (); i++)
     1971    {
     1972      const cmt_string& t = tags[i];
     1973
     1974      tag = Tag::find (t);
     1975      if (tag == 0) continue;
     1976
     1977      if (!Tag::check_tag_used (tag) && !Symbol::check_tag_used (tag))
     1978        {
     1979          cerr << "#CMT> The tag " << t << " is not used in any tag expression. Please check spelling" << endl;
     1980        }
     1981    }
     1982
     1983  env = CmtSystem::getenv ("CMTSITE");
     1984  if (env == "")
     1985    {
     1986      return;
     1987    }
     1988
     1989  tag = Tag::find (env);
     1990  if (tag == 0)
     1991    {
     1992      return;
     1993    }
     1994
     1995  if (!Tag::check_tag_used (tag) && !Symbol::check_tag_used (tag))
     1996    {
     1997      cerr << "#CMT> The CMTSITE value " << env << " is not used in any tag expression. Please check spelling" << endl;
     1998    }
     1999
     2000  env = CmtSystem::getenv ("CMTCONFIG");
     2001  if (env == "")
     2002    {
     2003      return;
     2004    }
     2005
     2006  tag = Tag::find (env);
     2007  if (tag == 0)
     2008    {
     2009      return;
     2010    }
     2011
     2012  if (!Tag::check_tag_used (tag) && !Symbol::check_tag_used (tag))
     2013    {
     2014      cerr << "#CMT> The CMTCONFIG value " << env << " is not used in any tag expression. Please check spelling" << endl;
     2015    }
    19632016}
    19642017
     
    24542507        {
    24552508          Me.m_action = action_show_action_names;
     2509          /*
    24562510          if (!Me.m_quiet)
    24572511            {
     
    24592513              print_symbol_names (ap.mode);
    24602514            }
    2461           CmtError::set (CmtError::symbol_not_found, ap.arguments[0]);
     2515          */
     2516          CmtError::set (CmtError::unknown_command, ap.arguments[0]);
    24622517          return;
    24632518        }
     
    29863041void Cmt::do_setup (const ArgParser& ap)
    29873042{
     3043
     3044  do_check_configuration (ap);
     3045
    29883046  print (ap.mode);
    29893047
     
    38663924            {
    38673925              //this directory should become the first entry of the CMTPATH
     3926
     3927              IProjectFactory& factory = ProjectFactory::instance ();
     3928              factory.create_project (pwd, "CurrentProject");
     3929
     3930              /*
    38683931              cmt_string temp = "path_prepend CMTPATH \"";
    38693932              temp += pwd;
     
    38733936
    38743937              SyntaxParser::parse_requirements_line (temp, &use);
    3875              
     3938              */
     3939
    38763940              break;
    38773941            }
     
    38903954      CmtSystem::cd (Me.m_current_dir);
    38913955    }
     3956
     3957  cmt_string buffer = "path CMTPATH \n";
     3958  Project::set_cmtpaths (buffer);
     3959  //cerr << "buffer = " << buffer << endl;
     3960  Use& use = Use::current();
     3961  SyntaxParser::parse_requirements_text (buffer, "", &use);
    38923962}
    38933963
Note: See TracChangeset for help on using the changeset viewer.