Changeset 628 for CMT


Ignore:
Timestamp:
Jan 11, 2013, 11:23:19 AM (11 years ago)
Author:
rybkin
Message:

See C.L. 499

Location:
CMT/HEAD
Files:
1 added
17 edited

Legend:

Unmodified
Added
Removed
  • CMT/HEAD/ChangeLog

    r627 r628  
     12013-01-11    <rybkin@lal.in2p3.fr> 499
     2
     3        * source/cmt_generators.cxx: In class LibraryGenerator function build,
     4        depending on constituent attribute need_prototypes, set m_HASPROTOTYPES
     5        accordingly and fill jar_header, java_header, library_header,
     6        application_header makefiles fragments with value, in class
     7        ConstituentsMakefileGenerator constructor, in function reset, handle
     8        introduced fragment constituent_app_lib, in function build, set
     9        m_HASPROTOTYPES according to constituent attribute need_prototypes, fill
     10        introduced fragment constituent_app_lib with value
     11        * source/cmt_generators.h: In class ConstituentsMakefileGenerator,
     12        introduce member for fragment constituent_app_lib
     13        * source/cmt_generator.h: In class CmtGenerator, introduce member m_HASPROTOTYPES
     14        * source/cmt_generator.cxx: In class CmtGenerator constructor, in function
     15        reset, handle introduced member m_HASPROTOTYPES
     16        * source/cmt_parser.cxx: In class StandardMacroBuilder function
     17        fill_for_constituent_macros, define macros <constituent>compile_dependencies,
     18        <constituent>prototype_dependencies for applications, libraries
     19        * mgr/fragments/constituent_app_lib: Introduce makefiles fragment for
     20        applications, libraries in order to compile dependent constituents in
     21        parallel
     22        * mgr/fragments/constituent: Remove unused code, add empty command for
     23        double-colon rules without one (so that implicit rule is not searched for)
     24        * mgr/fragments/constituent_lock: idem
     25        * mgr/fragments/application_header: Add rules for ${CONSTITUENT}compile,
     26        ${CONSTITUENT}prototype targets
     27        * mgr/fragments/java_header: idem
     28        * mgr/fragments/library_header: idem
     29        * mgr/fragments/jar_header: idem
     30        * mgr/fragments/library: Create shared library stamp in same rule as library
     31        * mgr/fragments/library_no_static: Create library stamps in same rule as
     32        library
     33        * mgr/fragments/jar: Add empty command for double-colon rules without one (so that implicit rule is not searched for)
     34        * mgr/fragments/java: Create necessary directory in compilation rule to
     35        avoid race condition
     36        * mgr/requirements: Declare makefiles fragment constituent_app_lib
     37
    1382013-01-03    <rybkin@lal.in2p3.fr> 498
    239
  • CMT/HEAD/mgr/fragments/application_header

    r441 r628  
    44        $(echo) "${CONSTITUENT} ok"
    55
     6cmt_${CONSTITUENT}_${HASPROTOTYPES} = 1
     7
     8#--------------------------------------
     9
     10ifdef cmt_${CONSTITUENT}_has_prototypes
     11
     12${CONSTITUENT}prototype : ${PROTOTARGET} ;
     13
     14endif
     15
     16${CONSTITUENT}compile : ${OBJS} ;
     17
    618#-- end of application_header
  • CMT/HEAD/mgr/fragments/constituent

    r588 r628  
    33cmt_${CONSTITUENT}_${HASTARGETTAG} = 1
    44
    5 #--------------------------------------------------------
     5#--------------------------------------
    66
    77ifdef cmt_${CONSTITUENT}_has_target_tag
    88
    9 #cmt_local_tagfile_${CONSTITUENT} = $(${PACKAGE}_tag)_${CONSTITUENT}.make
    109cmt_local_tagfile_${CONSTITUENT} = $(bin)$(${PACKAGE}_tag)_${CONSTITUENT}.make
    11 cmt_local_setup_${CONSTITUENT} = $(bin)setup_${CONSTITUENT}$$$$.make
    1210cmt_final_setup_${CONSTITUENT} = $(bin)setup_${CONSTITUENT}.make
    13 #cmt_final_setup_${CONSTITUENT} = $(bin)${PACKAGE}_${CONSTITUENT}setup.make
    1411cmt_local_${CONSTITUENT}_makefile = $(bin)${CONSTITUENT}.make
    1512
    1613${CONSTITUENT}_extratags = -tag_add=target_${CONSTITUENT}
    1714
    18 #$(cmt_local_tagfile_${CONSTITUENT}) : $(cmt_lock_setup)
    19 ifndef QUICK
    20 $(cmt_local_tagfile_${CONSTITUENT}) ::
    21 else
    22 $(cmt_local_tagfile_${CONSTITUENT}) :
    23 endif
    24         $(echo) "(constituents.make) Rebuilding $@"; \
    25           if test -f $(cmt_local_tagfile_${CONSTITUENT}); then /bin/rm -f $(cmt_local_tagfile_${CONSTITUENT}); fi ; \
    26           $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build tag_makefile >>$(cmt_local_tagfile_${CONSTITUENT})
    27         $(echo) "(constituents.make) Rebuilding $(cmt_final_setup_${CONSTITUENT})"; \
    28           test ! -f $(cmt_local_setup_${CONSTITUENT}) || \rm -f $(cmt_local_setup_${CONSTITUENT}); \
    29           trap '\rm -f $(cmt_local_setup_${CONSTITUENT})' 0 1 2 15; \
    30           $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) show setup >$(cmt_local_setup_${CONSTITUENT}) && \
    31           if [ -f $(cmt_final_setup_${CONSTITUENT}) ] && \
    32             \cmp -s $(cmt_final_setup_${CONSTITUENT}) $(cmt_local_setup_${CONSTITUENT}); then \
    33             \rm $(cmt_local_setup_${CONSTITUENT}); else \
    34             \mv -f $(cmt_local_setup_${CONSTITUENT}) $(cmt_final_setup_${CONSTITUENT}); fi
    35 
    3615else
    3716
    38 #cmt_local_tagfile_${CONSTITUENT} = $(${PACKAGE}_tag).make
    3917cmt_local_tagfile_${CONSTITUENT} = $(bin)$(${PACKAGE}_tag).make
    4018cmt_final_setup_${CONSTITUENT} = $(bin)setup.make
    41 #cmt_final_setup_${CONSTITUENT} = $(bin)${PACKAGE}setup.make
    4219cmt_local_${CONSTITUENT}_makefile = $(bin)${CONSTITUENT}.make
    4320
     
    5330${CONSTITUENT}dirs : ;
    5431endif
    55 
    56 #ifndef QUICK
    57 #ifdef STRUCTURED_OUTPUT
    58 # ${CONSTITUENT}dirs ::
    59 #       @if test ! -d $(bin)${CONSTITUENT}; then $(mkdir) -p $(bin)${CONSTITUENT}; fi
    60 #       $(echo) "STRUCTURED_OUTPUT="$(bin)${CONSTITUENT}
    61 #
    62 #$(cmt_local_${CONSTITUENT}_makefile) :: $(${CONSTITUENT}_dependencies) $(cmt_local_tagfile_${CONSTITUENT}) build_library_links dirs ${CONSTITUENT}dirs
    63 #else
    64 #$(cmt_local_${CONSTITUENT}_makefile) :: $(${CONSTITUENT}_dependencies) $(cmt_local_tagfile_${CONSTITUENT}) build_library_links dirs
    65 #endif
    66 #else
    67 #$(cmt_local_${CONSTITUENT}_makefile) :: $(cmt_local_tagfile_${CONSTITUENT})
    68 #endif
    6932
    7033ifdef cmt_${CONSTITUENT}_has_target_tag
     
    11477        $(echo) "(constituents.make) ${CONSTITUENT} done"
    11578
    116 clean :: ${CONSTITUENT}clean
     79clean :: ${CONSTITUENT}clean ;
    11780
    11881${CONSTITUENT}clean :: $(${CONSTITUENT}clean_dependencies) ##$(cmt_local_${CONSTITUENT}_makefile)
     
    12689##        /bin/rm -f $(cmt_local_${CONSTITUENT}_makefile) $(bin)${CONSTITUENT}_dependencies.make
    12790
    128 install :: ${CONSTITUENT}install
     91install :: ${CONSTITUENT}install ;
    12992
    13093${CONSTITUENT}install :: $(${CONSTITUENT}_dependencies) $(cmt_local_${CONSTITUENT}_makefile)
     
    145108        $(echo) "(constituents.make) uninstall ${CONSTITUENT} done"
    146109
    147 remove_library_links :: ${CONSTITUENT}uninstall
     110remove_library_links :: ${CONSTITUENT}uninstall ;
    148111
    149112ifndef PEDANTIC
  • CMT/HEAD/mgr/fragments/constituent_lock

    r588 r628  
    77ifdef cmt_${CONSTITUENT}_has_target_tag
    88
    9 #cmt_local_tagfile_${CONSTITUENT} = $(${PACKAGE}_tag)_${CONSTITUENT}.make
    109cmt_local_tagfile_${CONSTITUENT} = $(bin)$(${PACKAGE}_tag)_${CONSTITUENT}.make
    11 cmt_local_setup_${CONSTITUENT} = $(bin)setup_${CONSTITUENT}$$$$.make
    1210cmt_final_setup_${CONSTITUENT} = $(bin)setup_${CONSTITUENT}.make
    13 #cmt_final_setup_${CONSTITUENT} = $(bin)${PACKAGE}_${CONSTITUENT}setup.make
    1411cmt_local_${CONSTITUENT}_makefile = $(bin)${CONSTITUENT}.make
    1512
    1613${CONSTITUENT}_extratags = -tag_add=target_${CONSTITUENT}
    1714
    18 #$(cmt_local_tagfile_${CONSTITUENT}) : $(cmt_lock_setup)
    19 ifndef QUICK
    20 $(cmt_local_tagfile_${CONSTITUENT}) ::
    21 else
    22 $(cmt_local_tagfile_${CONSTITUENT}) :
    23 endif
    24         $(echo) "(constituents.make) Rebuilding $@"; \
    25           if test -f $(cmt_local_tagfile_${CONSTITUENT}); then /bin/rm -f $(cmt_local_tagfile_${CONSTITUENT}); fi ; \
    26           $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build tag_makefile >>$(cmt_local_tagfile_${CONSTITUENT})
    27         $(echo) "(constituents.make) Rebuilding $(cmt_final_setup_${CONSTITUENT})"; \
    28           test ! -f $(cmt_local_setup_${CONSTITUENT}) || \rm -f $(cmt_local_setup_${CONSTITUENT}); \
    29           trap '\rm -f $(cmt_local_setup_${CONSTITUENT})' 0 1 2 15; \
    30           $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) show setup >$(cmt_local_setup_${CONSTITUENT}) && \
    31           if [ -f $(cmt_final_setup_${CONSTITUENT}) ] && \
    32             \cmp -s $(cmt_final_setup_${CONSTITUENT}) $(cmt_local_setup_${CONSTITUENT}); then \
    33             \rm $(cmt_local_setup_${CONSTITUENT}); else \
    34             \mv -f $(cmt_local_setup_${CONSTITUENT}) $(cmt_final_setup_${CONSTITUENT}); fi
    35 
    3615else
    3716
    38 #cmt_local_tagfile_${CONSTITUENT} = $(${PACKAGE}_tag).make
    3917cmt_local_tagfile_${CONSTITUENT} = $(bin)$(${PACKAGE}_tag).make
    4018cmt_final_setup_${CONSTITUENT} = $(bin)setup.make
    41 #cmt_final_setup_${CONSTITUENT} = $(bin)${PACKAGE}setup.make
    4219cmt_local_${CONSTITUENT}_makefile = $(bin)${CONSTITUENT}.make
    4320
     
    5330${CONSTITUENT}dirs : ;
    5431endif
    55 
    56 #ifndef QUICK
    57 #ifdef STRUCTURED_OUTPUT
    58 # ${CONSTITUENT}dirs ::
    59 #       @if test ! -d $(bin)${CONSTITUENT}; then $(mkdir) -p $(bin)${CONSTITUENT}; fi
    60 #       $(echo) "STRUCTURED_OUTPUT="$(bin)${CONSTITUENT}
    61 #
    62 #$(cmt_local_${CONSTITUENT}_makefile) :: $(${CONSTITUENT}_dependencies) $(cmt_local_tagfile_${CONSTITUENT}) build_library_links dirs ${CONSTITUENT}dirs
    63 #else
    64 #$(cmt_local_${CONSTITUENT}_makefile) :: $(${CONSTITUENT}_dependencies) $(cmt_local_tagfile_${CONSTITUENT}) build_library_links dirs
    65 #endif
    66 #else
    67 #$(cmt_local_${CONSTITUENT}_makefile) :: $(cmt_local_tagfile_${CONSTITUENT})
    68 #endif
    6932
    7033ifdef cmt_${CONSTITUENT}_has_target_tag
     
    12992##        /bin/rm -f $(cmt_local_${CONSTITUENT}_makefile) $(bin)${CONSTITUENT}_dependencies.make
    13093
    131 install :: ${CONSTITUENT}install
     94install :: ${CONSTITUENT}install ;
    13295
    13396${CONSTITUENT}install :: $(${CONSTITUENT}_dependencies) $(cmt_local_${CONSTITUENT}_makefile)
     
    148111        $(echo) "(constituents.make) uninstall ${CONSTITUENT} done"
    149112
    150 remove_library_links :: ${CONSTITUENT}uninstall
     113remove_library_links :: ${CONSTITUENT}uninstall ;
    151114
    152115ifndef PEDANTIC
  • CMT/HEAD/mgr/fragments/jar

    r441 r628  
    88${CONSTITUENT}installname = ${CONSTITUENT}.jar
    99
    10 ${CONSTITUENT} :: ${CONSTITUENT}install
     10${CONSTITUENT} :: ${CONSTITUENT}install ;
    1111
    12 install :: ${CONSTITUENT}install
     12install :: ${CONSTITUENT}install ;
    1313
    1414${CONSTITUENT}install :: $(install_dir)/$(${CONSTITUENT}installname)
     
    2929##${CONSTITUENT}clean :: ${CONSTITUENT}uninstall
    3030
    31 uninstall :: ${CONSTITUENT}uninstall
     31uninstall :: ${CONSTITUENT}uninstall ;
    3232
    3333${CONSTITUENT}uninstall ::
     
    4141
    4242${CONSTITUENT}clean ::
    43         $(cleanup_silent) /bin/rm -rf $(javabin)/${CONSTITUENT}
    44         $(cleanup_silent) /bin/rm -f $(javabin)/${CONSTITUENT}.jar
     43        $(cleanup_silent) /bin/rm -rf $(javabin)${CONSTITUENT}
     44        $(cleanup_silent) /bin/rm -f $(javabin)${CONSTITUENT}.jar
    4545
    4646#-- end of jar ------
  • CMT/HEAD/mgr/fragments/jar_header

    r445 r628  
    22
    33${CONSTITUENT}javadirs ::
    4         $(silent) if test ! -d $(javabin)/${CONSTITUENT} ; then $(mkdir) -p $(javabin)${CONSTITUENT} ; fi
     4        $(silent) if test ! -d $(javabin)${CONSTITUENT} ; then $(mkdir) -p $(javabin)${CONSTITUENT} ; fi
    55
    66${CONSTITUENT} :: ${CONSTITUENT}javadirs $(javabin)${CONSTITUENT}.jar
    77        $(echo) "${CONSTITUENT} ok"
    88
     9cmt_${CONSTITUENT}_${HASPROTOTYPES} = 1
     10
     11#--------------------------------------
     12
     13ifdef cmt_${CONSTITUENT}_has_prototypes
     14
     15${CONSTITUENT}prototype : ${PROTOTARGET} ;
     16
     17endif
     18
     19${CONSTITUENT}compile : ${OBJS} ;
     20
    921#-- end of jar_header ------
  • CMT/HEAD/mgr/fragments/java

    r11 r628  
    33${OUTPUTNAME} : ${FULLNAME}
    44        $(java_echo) $@
    5         $(java_silent)cd $(src); $(javacomp) -d $(javabin)/${CONSTITUENT} $(use_javaflags) $(${CONSTITUENT}_javaflags) $(${NAME}_javaflags) ${FULLNAME}
     5        $(java_silent) [ -d $(javabin)${CONSTITUENT} ] || $(mkdir) -p $(javabin)${CONSTITUENT}
     6        $(java_silent)cd $(src); $(javacomp) -d $(javabin)${CONSTITUENT} $(use_javaflags) $(${CONSTITUENT}_javaflags) $(${NAME}_javaflags) ${FULLNAME}
    67
    78#-- end of java ------
  • CMT/HEAD/mgr/fragments/java_header

    r441 r628  
    22
    33${CONSTITUENT}javadirs ::
    4         $(silent) if test ! -d $(javabin)/${CONSTITUENT} ; then $(mkdir) -p $(javabin)${CONSTITUENT} ; fi
     4        $(silent) if test ! -d $(javabin)${CONSTITUENT} ; then $(mkdir) -p $(javabin)${CONSTITUENT} ; fi
    55
    66${CONSTITUENT} :: ${CONSTITUENT}javadirs $(javabin)${CONSTITUENT}.jar
    77        $(echo) "${CONSTITUENT} ok"
     8
     9cmt_${CONSTITUENT}_${HASPROTOTYPES} = 1
     10
     11#--------------------------------------
     12
     13ifdef cmt_${CONSTITUENT}_has_prototypes
     14
     15${CONSTITUENT}prototype : ${PROTOTARGET} ;
     16
     17endif
     18
     19${CONSTITUENT}compile : ${OBJS} ;
    820
    921$(javabin)${CONSTITUENT}.jar :: ${OBJS}
     
    1628${CONSTITUENT}installname = ${CONSTITUENT}.jar
    1729
    18 ${CONSTITUENT} :: ${CONSTITUENT}install
     30${CONSTITUENT} :: ${CONSTITUENT}install ;
    1931
    20 install :: ${CONSTITUENT}install
     32install :: ${CONSTITUENT}install ;
    2133
    2234${CONSTITUENT}install :: $(install_dir)/$(${CONSTITUENT}installname)
     
    3749##${CONSTITUENT}clean :: ${CONSTITUENT}uninstall
    3850
    39 uninstall :: ${CONSTITUENT}uninstall
     51uninstall :: ${CONSTITUENT}uninstall ;
    4052
    4153${CONSTITUENT}uninstall ::
  • CMT/HEAD/mgr/fragments/library

    r593 r628  
    3030        $(lib_echo) "shared library $@"
    3131        $(lib_silent) if test "$(makecmd)"; then QUIET=; else QUIET=1; fi; QUIET=$${QUIET} bin="$(bin)" ld="$(shlibbuilder)" ldflags="$(shlibflags)" suffix=$(shlibsuffix) libprefix=$(library_prefix) libsuffix=$(library_suffix) $(make_shlib) "$(tags)" ${CONSTITUENT} $(${CONSTITUENT}_shlibflags)
     32        $(lib_silent) cat /dev/null >$(${CONSTITUENT}shstamp)
    3233
    3334$(${CONSTITUENT}shstamp) :: $(${CONSTITUENT}libname).$(shlibsuffix)
  • CMT/HEAD/mgr/fragments/library_header

    r441 r628  
    99        $(echo) "${CONSTITUENT} ok"
    1010
     11cmt_${CONSTITUENT}_${HASPROTOTYPES} = 1
     12
     13#--------------------------------------
     14
     15ifdef cmt_${CONSTITUENT}_has_prototypes
     16
     17${CONSTITUENT}prototype : ${PROTOTARGET} ;
     18
     19endif
     20
     21${CONSTITUENT}compile : ${OBJS} ;
     22
    1123#-- end of libary_header ----------------
  • CMT/HEAD/mgr/fragments/library_no_static

    r593 r628  
    3131        $(lib_echo) "shared library $@"
    3232        $(lib_silent) $(shlibbuilder) $(shlibflags) -o $@ ${OBJS} $(${CONSTITUENT}_shlibflags)
     33        $(lib_silent) cat /dev/null >$(${CONSTITUENT}stamp) && \
     34          cat /dev/null >$(${CONSTITUENT}shstamp)
    3335
    3436$(${CONSTITUENT}shstamp) :: $(${CONSTITUENT}libname).$(shlibsuffix)
  • CMT/HEAD/mgr/requirements

    r618 r628  
    586586make_fragment constituent
    587587make_fragment constituent_lock
     588make_fragment constituent_app_lib
    588589make_fragment constituents_trailer
    589590
  • CMT/HEAD/source/cmt_generator.cxx

    r627 r628  
    8686  m_HASTARGETTAG.set ("HASTARGETTAG");
    8787  m_HASDEPENDENCIES.set ("HASDEPENDENCIES");
     88  m_HASPROTOTYPES.set ("HASPROTOTYPES");
    8889  m_ISCHECKGROUP.set ("ISCHECKGROUP");
    8990}
     
    126127  m_HASTARGETTAG = "";
    127128  m_HASDEPENDENCIES = "";
     129  m_HASPROTOTYPES = "";
    128130  m_ISCHECKGROUP = "";
    129131  m_PACKINCLUDES = "";
  • CMT/HEAD/source/cmt_generator.h

    r627 r628  
    133133  Variable m_HASTARGETTAG;
    134134  Variable m_HASDEPENDENCIES;
     135  Variable m_HASPROTOTYPES;
    135136  Variable m_ISCHECKGROUP;
    136137};
  • CMT/HEAD/source/cmt_generators.cxx

    r627 r628  
    468468                              const cmt_string& file_name)
    469469{
    470   static cmt_string lib;
     470  //static cmt_string lib;
    471471  static cmt_string allsources;
    472472  static cmt_string file;
     
    499499  need_prototypes = constituent.need_prototypes;
    500500
     501  if (constituent.need_prototypes)
     502    {
     503      m_HASPROTOTYPES = "has_prototypes";
     504    }
     505  else
     506    {
     507      m_HASPROTOTYPES = "has_no_prototypes";
     508    }
     509
    501510  //  cout << m_TITLE << " " << m_CONSTITUENT << endl;
    502511  CmtMessage::info (m_TITLE + " " + m_CONSTITUENT);
    503512
     513  /*
    504514  lib  = "$(";
    505515  lib += m_CONSTITUENT;
    506516  lib += "lib)";
    507 
     517  */
    508518  //
    509519  // Prepare the include paths
     
    639649      if (is_library)
    640650        {
    641           jar_header_fragment.copy (m_output_file, constituent.variables, 3,
     651          jar_header_fragment.copy (m_output_file, constituent.variables, 5,
    642652                                    &m_CONSTITUENT,
    643653                                    &m_CONSTITUENTSUFFIX,
    644                                     &m_OBJS);
     654                                    &m_OBJS,
     655                                    &m_PROTOTARGET,
     656                                    &m_HASPROTOTYPES);
    645657        }
    646658      else
    647659        {
    648           java_header_fragment.copy (m_output_file, constituent.variables, 3,
     660          java_header_fragment.copy (m_output_file, constituent.variables, 5,
    649661                                     &m_CONSTITUENT,
    650662                                     &m_CONSTITUENTSUFFIX,
    651                                      &m_OBJS);
     663                                     &m_OBJS,
     664                                     &m_PROTOTARGET,
     665                                     &m_HASPROTOTYPES);
    652666        }
    653667    }
     
    656670      if (is_library)
    657671        {
    658           library_header_fragment.copy (m_output_file, constituent.variables, 3,
     672          library_header_fragment.copy (m_output_file, constituent.variables, 5,
    659673                                        &m_CONSTITUENT,
    660674                                        &m_CONSTITUENTSUFFIX,
    661                                         &m_PROTOTARGET);
     675                                        &m_OBJS,
     676                                        &m_PROTOTARGET,
     677                                        &m_HASPROTOTYPES);
    662678        }
    663679      else
    664680        {
    665           application_header_fragment.copy (m_output_file, constituent.variables, 3,
    666                                             &m_CONSTITUENT,
    667                                             &m_CONSTITUENTSUFFIX,
    668                                             &m_PROTOTARGET);
     681          application_header_fragment.copy (m_output_file, constituent.variables, 5,
     682                                            &m_CONSTITUENT,
     683                                            &m_CONSTITUENTSUFFIX,
     684                                            &m_OBJS,
     685                                            &m_PROTOTARGET,
     686                                            &m_HASPROTOTYPES);
    669687        }
    670688    }
     
    806824      if (need_dependencies)
    807825        {
    808       dependencies_fragment.copy (m_output_file,
    809                                   constituent.variables, 3,
    810                                   &m_CONSTITUENT,
    811                                   &m_CONSTITUENTSUFFIX,
    812                                   &m_LINE);
     826          dependencies_fragment.copy (m_output_file,
     827                                      constituent.variables, 3,
     828                                      &m_CONSTITUENT,
     829                                      &m_CONSTITUENTSUFFIX,
     830                                      &m_LINE);
    813831        }
    814832    }
     
    26012619  constituent_fragment.set ("constituent");
    26022620  constituent_lock_fragment.set ("constituent_lock");
     2621  constituent_app_lib_fragment.set ("constituent_app_lib");
    26032622  check_application_header_fragment.set ("check_application_header");
    26042623}
     
    26122631  constituent_fragment.reset ();
    26132632  constituent_lock_fragment.reset ();
     2633  constituent_app_lib_fragment.reset ();
    26142634  check_application_header_fragment.reset ();
    26152635}
     
    27382758            {
    27392759            case Application:
    2740               m_HASDEPENDENCIES = "has_dependencies";
    2741               break;
    27422760            case Library:
    27432761              m_HASDEPENDENCIES = "has_dependencies";
     2762              m_HASPROTOTYPES = constituent.need_prototypes ? "has_prototypes" : "has_no_prototypes" ;
    27442763              break;
    27452764            case Document:
     
    27582777                                              &m_HASDEPENDENCIES,
    27592778                                              &m_HASTARGETTAG);
     2779            }
     2780          else if (constituent.type == Application ||
     2781                   constituent.type == Library)
     2782            {
     2783              constituent_app_lib_fragment.copy (m_output_file, constituent.variables,
     2784                                                 7,
     2785                                                 &m_PACKAGE,
     2786                                                 &m_CONSTITUENT,
     2787                                                 &m_CONSTITUENTSUFFIX,
     2788                                                 &m_LINE,
     2789                                                 &m_HASDEPENDENCIES,
     2790                                                 &m_HASTARGETTAG,
     2791                                                 &m_HASPROTOTYPES);
    27602792            }
    27612793          else
  • CMT/HEAD/source/cmt_generators.h

    r588 r628  
    220220  FragmentHandle constituent_fragment;
    221221  FragmentHandle constituent_lock_fragment;
     222  FragmentHandle constituent_app_lib_fragment;
    222223  FragmentHandle check_application_header_fragment;
    223224};
  • CMT/HEAD/source/cmt_parser.cxx

    r621 r628  
    96209620        SyntaxParser::parse_requirements_line (temp, current_use);
    96219621      }
     9622
     9623    for (int i = 0; i < constituents.size (); i++)
     9624      {
     9625        const Constituent& constituent = constituents[i];
     9626        if (constituent.type == Document) continue;
     9627        const cmt_string macro_name = constituent.name + "compile_dependencies";
     9628        if (!Symbol::is_selected (macro_name))
     9629          {
     9630            temp = "macro_append ";
     9631            temp += macro_name;
     9632            temp += " \"";
     9633
     9634            const Symbol* deps_macro = Symbol::find (constituent.name + "_dependencies");
     9635            if (deps_macro != 0)
     9636              {
     9637                const cmt_string deps_value (deps_macro->resolve_macro_value ());
     9638                CmtSystem::cmt_string_vector words;
     9639                CmtSystem::split (deps_value, " \t", words);
     9640                for (int i = 0; i < words.size (); i++)
     9641                  {
     9642                    const cmt_string& word = words[i];
     9643                    const Constituent* dep = Constituent::find (word);
     9644                    if (dep == 0)
     9645                      {
     9646                        if (CmtMessage::active (Verbose))
     9647                          CmtMessage::warning
     9648                            (CmtError::get_error_name (CmtError::configuration_error)
     9649                             + ": " + word + ": non-constituent name in macro "
     9650                             + constituent.name + "_dependencies value");
     9651                        continue;
     9652                      }
     9653                    switch (dep->type)
     9654                      {
     9655                      case Application:
     9656                      case Library:
     9657                        if (dep->need_prototypes)
     9658                          temp += " " + word + "prototype";
     9659                        break;
     9660                      case Document:
     9661                        temp += " " + word;
     9662                        break;
     9663                      }
     9664                  }
     9665              }
     9666
     9667            temp += "\"";
     9668           
     9669            SyntaxParser::parse_requirements_line (temp, current_use);
     9670          }
     9671        if (constituent.need_prototypes)
     9672          {
     9673            const cmt_string macro_name = constituent.name + "prototype_dependencies";
     9674            if (!Symbol::is_selected (macro_name))
     9675              {
     9676                temp = "macro_append ";
     9677                temp += macro_name;
     9678                temp += " \" $(";
     9679                temp += constituent.name + "compile_dependencies)\"";
     9680           
     9681                SyntaxParser::parse_requirements_line (temp, current_use);
     9682              }
     9683          }
     9684      }
    96229685  }
    96239686
Note: See TracChangeset for help on using the changeset viewer.