Ignore:
Timestamp:
Jun 6, 2013, 2:43:50 PM (11 years ago)
Author:
rybkin
Message:

merge -r 618:627 HEAD

Location:
CMT/v1r25-branch
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • CMT/v1r25-branch

  • CMT/v1r25-branch/source/cmt_constituent.cxx

    r609 r637  
    176176    else if (w == "-check")
    177177      {
    178         m_constituent.need_check = true;
     178        if (m_constituent.type == Application)
     179          {
     180            m_constituent.need_check = true;
     181          }
    179182      }
    180183    else if (w == "-triggers")
  • CMT/v1r25-branch/source/cmt_generator.cxx

    r595 r637  
    8686  m_HASTARGETTAG.set ("HASTARGETTAG");
    8787  m_HASDEPENDENCIES.set ("HASDEPENDENCIES");
     88  m_ISCHECKGROUP.set ("ISCHECKGROUP");
    8889}
    8990
     
    125126  m_HASTARGETTAG = "";
    126127  m_HASDEPENDENCIES = "";
     128  m_ISCHECKGROUP = "";
    127129  m_PACKINCLUDES = "";
    128130  m_PACKOS9      = false;
  • CMT/v1r25-branch/source/cmt_generator.h

    r595 r637  
    133133  Variable m_HASTARGETTAG;
    134134  Variable m_HASDEPENDENCIES;
     135  Variable m_ISCHECKGROUP;
    135136};
    136137
  • CMT/v1r25-branch/source/cmt_generators.cxx

    r613 r637  
    11141114    {
    11151115      FragmentHandle header_fragment (header);
    1116       header_fragment.copy (m_output_file, constituent.variables, 3,
     1116      header_fragment.copy (m_output_file, constituent.variables, 4,
    11171117                            &m_CONSTITUENT,
    11181118                            &m_CONSTITUENTSUFFIX,
    1119                             &m_OBJS);
     1119                            &m_OBJS,
     1120                            &m_LINE);
    11201121    }
    11211122  else
     
    11831184      SourceFile& file = m_source_files[i];
    11841185      const cmt_string& file_name = file.name ();
     1186      m_OUTPUTNAME = file.output ();
    11851187      m_FULLNAME = file_name;
    11861188      CmtSystem::get_dot_suffix (file_name, suffix);
     
    11931195      m_FILESUFFIX.value = suffix;
    11941196      //CmtSystem::get_dot_suffix (m_FILENAME.value, m_FILESUFFIX.value);
    1195       CmtSystem::get_suffix (m_FILENAME.value, m_FILEEXTENSION .value);
     1197      CmtSystem::get_suffix (m_FILENAME.value, m_FILEEXTENSION.value);
    11961198      /*
    11971199      if (!CmtSystem::test_file (file_name) && !CmtSystem::test_directory (file_name))
     
    12061208          // ensure that ${CONSTITUENT}_dependencies.make gets rebuilt
    12071209          // whenever source file OR its dependencies change
    1208           if (!dependency_fragment.copy (m_output_file, constituent.variables, 9,
     1210          if (!dependency_fragment.copy (m_output_file, constituent.variables, 10,
    12091211                                         &m_FILEPATH,
    12101212                                         &m_SUFFIX,
     1213                                         &m_OUTPUTNAME,
    12111214                                         &m_CONSTITUENT,
    12121215                                         &m_CONSTITUENTSUFFIX,
     
    12181221        }
    12191222     
    1220       fragment.copy (m_output_file, constituent.variables, 9,
     1223      fragment.copy (m_output_file, constituent.variables, 10,
    12211224                     &m_FILEPATH,
    12221225                     &m_SUFFIX,
     1226                     &m_OUTPUTNAME,
    12231227                     &m_CONSTITUENT,
    12241228                     &m_CONSTITUENTSUFFIX,
     
    12341238    {
    12351239      FragmentHandle trailer_fragment (trailer);
    1236       trailer_fragment.copy (m_output_file, constituent.variables, 3,
     1240      trailer_fragment.copy (m_output_file, constituent.variables, 4,
    12371241                             &m_CONSTITUENT,
    12381242                             &m_CONSTITUENTSUFFIX,
    1239                              &m_OBJS);
     1243                             &m_OBJS,
     1244                             &m_LINE);
    12401245    }
    12411246
     
    27682773          if (constituent.need_check)
    27692774            {
     2775              if (constituent.group != 0 &&
     2776                  constituent.group->name () == "check")
     2777                m_ISCHECKGROUP = "is_check_group";
     2778              else
     2779                m_ISCHECKGROUP = "is_not_check_group";
     2780
    27702781              check_application_header_fragment.copy (m_output_file,
    2771                                                       constituent.variables, 3,
     2782                                                      constituent.variables, 4,
    27722783                                                      &m_PACKAGE,
    27732784                                                      &m_CONSTITUENT,
    2774                                                       &m_CONSTITUENTSUFFIX);
     2785                                                      &m_CONSTITUENTSUFFIX,
     2786                                                      &m_ISCHECKGROUP);
    27752787            }
    27762788        }
  • CMT/v1r25-branch/source/cmt_parser.cxx

    r612 r637  
    93999399            Use* u = imports[i];
    94009400           
     9401            Include::parse_all (u);
     9402
    94019403            u->fill_includes_macro (buffer);
    94029404            u->fill_macro (buffer, "cflags");
  • CMT/v1r25-branch/source/cmt_std.h

    r547 r637  
    1010
    1111#ifndef WIN32
    12 #ifndef linux
     12#ifndef __linux__
    1313#ifndef __CYGWIN__
    1414#ifndef __APPLE__
  • CMT/v1r25-branch/source/cmt_symbol.cxx

    r612 r637  
    223223#endif
    224224}
     225/**
     226 * similar to processing
     227 * `shell' function of GNU Make does
     228 *  on command output
     229 */
     230static void process_cmd_output (cmt_string& text)
     231{
     232  //cerr << "process_cmd_output (begin): [" << text << "]" << endl;
     233  // remove trailing (carriage-return and) newline(s)
     234  int nl = text.size ();
     235  while (nl > 0 && text[nl - 1] == '\n')
     236    {
     237      nl--;
     238      if (nl > 0 && text[nl - 1] == '\r')
     239        nl--;
     240    }
     241  if (nl != text.size ())
     242    text.erase (nl);
     243
     244  // convert each newline (or carriage-return / newline pair) to a single space
     245  text.replace_all ("\r\n", " ");
     246  text.replace_all ("\n", " ");
     247  //cerr << "process_cmd_output (end): [" << text << "]" << endl;
     248}
    225249
    226250/**
     
    318342          CmtSystem::execute (command, result);
    319343         
     344          /*
    320345          int pos;
    321346          pos = result.find ('\n');
     
    323348          pos = result.find ('\r');
    324349          if (pos != cmt_string::npos) result.erase (pos);
    325          
     350          */         
     351          process_cmd_output (result);
     352
    326353          if (Cmt::get_debug ())
    327354            {
    328               cout << "  Executing [" << command << "] to expand a symbol value =>["
     355              cout << "resolve_value: Executing [" << command << "] to expand a symbol value =>["
    329356                   << result << "]" << endl;
    330357            }
     
    462489          CmtSystem::execute (command, result);
    463490         
     491          /*
    464492          int pos;
    465493          pos = result.find ('\n');
     
    467495          pos = result.find ('\r');
    468496          if (pos != cmt_string::npos) result.erase (pos);
     497          */
     498          process_cmd_output (result);
    469499         
    470500          if (Cmt::get_debug ())
     
    596626          CmtSystem::execute (command, result);
    597627         
     628          /*
    598629          int pos;
    599630          pos = result.find ('\n');
     
    601632          pos = result.find ('\r');
    602633          if (pos != cmt_string::npos) result.erase (pos);
     634          */         
     635          process_cmd_output (result);
    603636         
    604637          if (Cmt::get_debug ())
Note: See TracChangeset for help on using the changeset viewer.