Changeset 637 for CMT


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:
15 edited

Legend:

Unmodified
Added
Removed
  • CMT/v1r25-branch

  • CMT/v1r25-branch/ChangeLog

    r618 r637  
     12013-01-03    <rybkin@lal.in2p3.fr> 498
     2
     3        * source/cmt_constituent.cxx: In class constituents_action_iterator,
     4        set constituent attribute need_check to true, if specified, for applications
     5        only
     6        * source/cmt_generator.h: In class CmtGenerator, introduce member
     7        m_ISCHECKGROUP
     8        * source/cmt_generator.cxx: idem
     9        * source/cmt_generators.cxx: In class ConstituentsMakefileGenerator
     10        function build, depending on whether constituent belongs to check group,
     11        set m_ISCHECKGROUP appropriately and fill check_application_header
     12        makefiles fragments with value
     13        * mgr/fragments/check_application_header: For applications belonging to
     14        check group, ensure that application is built before running check
     15        * mgr/fragments/nmake/check_application_header: idem
     16        * mgr/fragments/check_application: In application Makefile, remove
     17        check target dependency on application, handled in constituents Makefile,
     18        improve control of Make verbosity
     19        * mgr/fragments/check_java: idem
     20        * mgr/fragments/nmake/check_application: idem
     21        * mgr/fragments/nmake/check_java: idem
     22       
     232012-11-23    <rybkin@lal.in2p3.fr> 497
     24
     25        * source/cmt_generators.cxx: In class DocumentGenerator function build,
     26        add template LINE for fragments document's header, trailer, add template
     27        OUTPUTNAME for fragments dependency, document's fragment
     28       
     292012-11-07    <rybkin@lal.in2p3.fr> 496
     30
     31        * source/cmt_symbol.cxx: Introduce helper function process_cmd_output to
     32        process command output similar to `shell' function of GNU Make. Make use of
     33        this function in functions resolve_value, resolve_value_for_macros,
     34        suppress_OS_delimiters in order to allow for possibly multi-line output of
     35        commands in command substitution (introduced with backquotes)
     36       
     372012-09-21    <rybkin@lal.in2p3.fr> 495
     38
     39        * source/cmt_std.h: Replace macro linux with __linux__, latter being
     40        predefined by gcc with or without -ansi option
     41       
     422012-08-04    <rybkin@lal.in2p3.fr> 494
     43
     44        * source/cmt_parser.cxx: In class StandardMacroBuilder, in function
     45        fill_for_all_constituents, parse includes acquired via include_dirs
     46        statement for all imported uses (were otherwise left unparsed)
     47       
    1482012-05-15    <rybkin@lal.in2p3.fr> 493
    249
     
    106153        parse comment lines
    107154        * source/cmt_string.h: In class cmt_string, introduce constructor from
    108         character array with
     155        character array with n elements
    109156        * source/cmt_string.cxx: In class cmt_string, implement constructor from
    110         character array with
     157        character array with n elements
    111158        * source/cmt_parser.cxx: In class Cmt function vector_to_string, make sure
    112159        separator is not prepended at beginning
  • CMT/v1r25-branch/mgr/fragments/check_application

    r593 r637  
    33check :: ${CONSTITUENT}check ;
    44
    5 ${CONSTITUENT}check :: ${CONSTITUENT}
    6         $(${CONSTITUENT}_pre_check)
    7         $(bin)${CONSTITUENT}${application_suffix} $(${CONSTITUENT}_check_args)
    8         $(${CONSTITUENT}_post_check)
     5#${CONSTITUENT}check :: ${CONSTITUENT}
     6${CONSTITUENT}check ::
     7        $(silent) $(${CONSTITUENT}_pre_check)
     8        $(silent) $(bin)${CONSTITUENT}${application_suffix} $(${CONSTITUENT}_check_args)
     9        $(silent) $(${CONSTITUENT}_post_check)
    910
    1011#-- end of check_application ------
  • CMT/v1r25-branch/mgr/fragments/check_application_header

    r492 r637  
    11#-- start of check_application_header ------
     2
     3cmt_${CONSTITUENT}_${ISCHECKGROUP} = 1
     4
     5#--------------------------------------
    26
    37check :: ${CONSTITUENT}check
     
    711#${CONSTITUENT}check : ${CONSTITUENT} $(cmt_local_${CONSTITUENT}_makefile)
    812#${CONSTITUENT}check : $(cmt_local_${CONSTITUENT}_makefile)
     13ifdef cmt_${CONSTITUENT}_is_check_group
     14${CONSTITUENT}check : ${CONSTITUENT}
     15else
    916${CONSTITUENT}check :
     17endif
    1018        @if test ! -f $(cmt_local_${CONSTITUENT}_makefile); then \
    1119          $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build constituent_makefile -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}; \
  • CMT/v1r25-branch/mgr/fragments/check_java

    r11 r637  
    11#-- start of check_java ------
    22
    3 check :: ${CONSTITUENT}check
     3check :: ${CONSTITUENT}check ;
    44
    5 ${CONSTITUENT}check :: ${CONSTITUENT}
    6         cd $(bin); $(${CONSTITUENT}_pre_check)
    7         cd $(bin); java $(java_run_options) $(${CONSTITUENT}_run_options) ${CONSTITUENT} $(${CONSTITUENT}_check_args)
    8         cd $(bin); $(${CONSTITUENT}_post_check)
     5#${CONSTITUENT}check :: ${CONSTITUENT}
     6${CONSTITUENT}check ::
     7        $(silent) cd $(bin); $(${CONSTITUENT}_pre_check)
     8        $(silent) cd $(bin); java $(java_run_options) $(${CONSTITUENT}_run_options) ${CONSTITUENT} $(${CONSTITUENT}_check_args)
     9        $(silent) cd $(bin); $(${CONSTITUENT}_post_check)
     10
    911#-- end of check_java ------
  • CMT/v1r25-branch/mgr/fragments/nmake/check_application

    r11 r637  
     1#-- start of check_application ------
    12
    2 check :: ${CONSTITUENT}check
     3check :: ${CONSTITUENT}check ;
    34
    4 ${CONSTITUENT}check :: ${CONSTITUENT}
    5         $(${CONSTITUENT}_pre_check)
    6         $(bin)${CONSTITUENT}$(application_suffix) $(${CONSTITUENT}_check_args)
    7         $(${CONSTITUENT}_post_check)
     5#${CONSTITUENT}check :: ${CONSTITUENT}
     6${CONSTITUENT}check ::
     7        $(silent) $(${CONSTITUENT}_pre_check)
     8        $(silent) $(bin)${CONSTITUENT}$(application_suffix) $(${CONSTITUENT}_check_args)
     9        $(silent) $(${CONSTITUENT}_post_check)
     10
     11#-- end of check_application ------
  • CMT/v1r25-branch/mgr/fragments/nmake/check_application_header

    r492 r637  
    11#-- start of check_application_header ------
     2
     3cmt_${CONSTITUENT}_${ISCHECKGROUP} = 1
     4
     5#--------------------------------------
    26
    37check :: ${CONSTITUENT}check
     
    711#${CONSTITUENT}check : ${CONSTITUENT} $(cmt_local_${CONSTITUENT}_makefile)
    812#${CONSTITUENT}check : $(cmt_local_${CONSTITUENT}_makefile)
     13!if defined (cmt_${CONSTITUENT}_is_check_group)
     14${CONSTITUENT}check : ${CONSTITUENT}
     15!else
    916${CONSTITUENT}check :
     17!endif
    1018        @if not exist $(cmt_local_${CONSTITUENT}_makefile) $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_makefile -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}
    1119        $(echo) "(constituents.nmake) Starting $@"
  • CMT/v1r25-branch/mgr/fragments/nmake/check_java

    r11 r637  
     1#-- start of check_java ------
    12
    2 check :: ${CONSTITUENT}check
     3check :: ${CONSTITUENT}check ;
    34
    4 ${CONSTITUENT}check :: ${CONSTITUENT}
    5         $(${CONSTITUENT}_pre_check)
    6         java ${CONSTITUENT} $(${CONSTITUENT}_check_args)
    7         $(${CONSTITUENT}_post_check)
     5#${CONSTITUENT}check :: ${CONSTITUENT}
     6${CONSTITUENT}check ::
     7        $(silent) $(${CONSTITUENT}_pre_check)
     8        $(silent) java ${CONSTITUENT} $(${CONSTITUENT}_check_args)
     9        $(silent) $(${CONSTITUENT}_post_check)
     10
     11#-- end of check_java ------
  • 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.