Changeset 629 for CMT


Ignore:
Timestamp:
Jan 28, 2013, 2:41:55 PM (11 years ago)
Author:
rybkin
Message:

See C.L. 500

Location:
CMT/HEAD
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • CMT/HEAD/ChangeLog

    r628 r629  
     12013-01-25    <rybkin@lal.in2p3.fr> 500
     2
     3        * source/cmt_constituent.cxx: In class constituents_action_iterator
     4        function set, assign constituent member has_modules according to passed
     5        option -modules or -no_modules, print diagnostic message about bad option
     6        if Verbose level is activated only, in class Constituent function clear,
     7        set has_modules to false, in function show, add printout for options
     8        -modules and -no_modules
     9        * source/cmt_constituent.h: In class Constituent, introduce member
     10        has_modules for applications and libraries in languages with modules (like
     11        Fortran 90 and later)
     12        * source/cmt_project.cxx: In class Project functions set_strategy and
     13        update_strategy, update strategy for project(s) without parent and children
     14        * source/cmt_parser.cxx: In class StandardMacroBuilder function
     15        fill_for_constituent_macros, for applications, libraries add to macros
     16        <constituent>compile_dependencies macros <dependency>compile for
     17        dependencies that have modules so that dependencies modules, generated at
     18        compile time, are available before constituent compilation
     19        * mgr/fragments/dependencies: Do not (re)build
     20        ${CONSTITUENT}_dependencies.make at prototype build stage as some header
     21        files may not be available yet
     22        * mgr/fragments/constituent_app_lib: In target ${CONSTITUENT}install rule
     23        command, check whether makefile exists to allow for use of -n (no-op) Make
     24        option, in target ${CONSTITUENT}uninstall rule command, ignore errors,
     25        similar to target ${CONSTITUENT}clean rule command
     26
    1272013-01-11    <rybkin@lal.in2p3.fr> 499
    228
  • CMT/HEAD/mgr/fragments/constituent_app_lib

    r628 r629  
    101101
    102102${CONSTITUENT}clean :: $(${CONSTITUENT}clean_dependencies) ##$(cmt_local_${CONSTITUENT}_makefile)
    103         $(echo) "(constituents.make) Starting ${CONSTITUENT}clean"
     103        $(echo) "(constituents.make) Starting $@"
    104104        @-if test -f $(cmt_local_${CONSTITUENT}_makefile); then \
    105           $(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}clean; \
     105          $(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) $@; \
    106106        fi
    107         $(echo) "(constituents.make) ${CONSTITUENT}clean done"
     107        $(echo) "(constituents.make) $@ done"
    108108#       @-$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}clean
    109109
     
    113113
    114114${CONSTITUENT}install :: ${CONSTITUENT}compile $(${CONSTITUENT}_dependencies) $(cmt_local_${CONSTITUENT}_makefile)
    115         $(echo) "(constituents.make) Starting install ${CONSTITUENT}"
    116         @-$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) $@
    117         $(echo) "(constituents.make) install ${CONSTITUENT} done"
     115        $(echo) "(constituents.make) Starting $@"
     116        @if test -f $(cmt_local_${CONSTITUENT}_makefile); then \
     117          $(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) $@; \
     118          fi
     119#       @$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) $@
     120        $(echo) "(constituents.make) $@ done"
    118121
    119122uninstall : ${CONSTITUENT}uninstall
     
    122125
    123126${CONSTITUENT}uninstall : $(${CONSTITUENT}uninstall_dependencies) ##$(cmt_local_${CONSTITUENT}_makefile)
    124         $(echo) "(constituents.make) Starting uninstall ${CONSTITUENT}"
    125         @if test -f $(cmt_local_${CONSTITUENT}_makefile); then \
     127        $(echo) "(constituents.make) Starting $@"
     128        @-if test -f $(cmt_local_${CONSTITUENT}_makefile); then \
    126129          $(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) uninstall; \
    127130          fi
    128131#       @$(MAKE) -f $(cmt_local_${CONSTITUENT}_makefile) uninstall
    129         $(echo) "(constituents.make) uninstall ${CONSTITUENT} done"
     132        $(echo) "(constituents.make) $@ done"
    130133
    131134remove_library_links :: ${CONSTITUENT}uninstall ;
  • CMT/HEAD/mgr/fragments/dependencies

    r592 r629  
    22ifneq ($(MAKECMDGOALS),${CONSTITUENT}clean)
    33ifneq ($(MAKECMDGOALS),uninstall)
     4ifneq ($(MAKECMDGOALS),${CONSTITUENT}prototype)
    45
    56$(bin)${CONSTITUENT}_dependencies.make : $(use_requirements) $(cmt_final_setup_${CONSTITUENT})
     
    1112endif
    1213endif
     14endif
    1315
    1416${CONSTITUENT}clean ::
  • CMT/HEAD/source/cmt_constituent.cxx

    r627 r629  
    1616#include "cmt_database.h"
    1717#include "cmt_log.h"
     18#include "cmt_error.h"
    1819
    1920/*----------------------------------------------------------*/
     
    174175        m_constituent.need_prototypes = false;
    175176      }
     177    else if (w == "-modules")
     178      {
     179        if (m_constituent.type == Application ||
     180            m_constituent.type == Library)
     181          {
     182            m_constituent.has_modules = true;
     183          }
     184      }
     185    else if (w == "-no_modules")
     186      {
     187        if (m_constituent.type == Application ||
     188            m_constituent.type == Library)
     189          {
     190            m_constituent.has_modules = false;
     191          }
     192      }
    176193    else if (w == "-check")
    177194      {
     
    253270    else if (w.substr (0, 1) == "-")
    254271      {
    255         //if (!Cmt::get_quiet ())
    256         //{
    257         CmtMessage::warning ("bad option " + w + " in constituent " +
    258                              m_constituent.name);
    259         //      cerr << "#CMT> Warning: bad option "
    260         //           << w << " in constituent " << m_constituent.name << endl;
    261         //CmtError::set (CmtError::execution_error, cmd);
    262         //}
     272        if (CmtMessage::active (Verbose))
     273          CmtMessage::warning
     274            (CmtError::get_error_name (CmtError::syntax_error)
     275             + ": bad option " + w + " in constituent " + m_constituent.name);
    263276      }
    264277    else if ((equal = w.find ("=")) != cmt_string::npos)
     
    522535  no_share        = false;
    523536  need_prototypes = false;
     537  has_modules     = false;
    524538  need_check      = false;
    525539  build_triggers  = false;
     
    672686    }
    673687 
     688  if (type == Application || type == Library)
     689    {
     690      if (has_modules)
     691        out << " -modules";
     692      else
     693        out << " -no_modules";
     694    }
     695 
    674696  if (has_target_tag)
    675697    {
  • CMT/HEAD/source/cmt_constituent.h

    r588 r629  
    5858  bool no_share;
    5959  bool need_prototypes;
     60  bool has_modules;
    6061  bool need_check;
    6162  bool build_triggers;
  • CMT/HEAD/source/cmt_parser.cxx

    r628 r629  
    96579657                        if (dep->need_prototypes)
    96589658                          temp += " " + word + "prototype";
     9659                        if (dep->has_modules)
     9660                          temp += " " + word + "compile";
    96599661                        break;
    96609662                      case Document:
  • CMT/HEAD/source/cmt_project.cxx

    r610 r629  
    29582958      project->update_strategy (definition, b_value);
    29592959    }
     2960
     2961  const ProjectPtrVector& OrderedProjects = Project::ordered_projects ();
     2962  for (int i = OrderedProjects.size () - 2; i >= 0; i--)
     2963    {
     2964      if (this != OrderedProjects[i + 1]) continue;
     2965      if (!OrderedProjects[i]->has_parents () &&
     2966          OrderedProjects[i]->get_children_size () == 0)
     2967        {
     2968          OrderedProjects[i]->update_strategy (definition, b_value);
     2969        }
     2970      break;
     2971    }
    29602972}
    29612973
     
    30113023
    30123024          project->update_strategy (definition, b_value);
     3025        }
     3026
     3027      const ProjectPtrVector& OrderedProjects = Project::ordered_projects ();
     3028      for (int i = OrderedProjects.size () - 2; i >= 0; i--)
     3029        {
     3030          if (this != OrderedProjects[i + 1]) continue;
     3031          if (!OrderedProjects[i]->has_parents () &&
     3032              OrderedProjects[i]->get_children_size () == 0)
     3033            {
     3034              OrderedProjects[i]->update_strategy (definition, b_value);
     3035            }
     3036          break;
    30133037        }
    30143038    }
Note: See TracChangeset for help on using the changeset viewer.