Index: CMT/HEAD/ChangeLog
===================================================================
--- CMT/HEAD/ChangeLog	(revision 626)
+++ CMT/HEAD/ChangeLog	(revision 627)
@@ -1,2 +1,24 @@
+2013-01-03    <rybkin@lal.in2p3.fr> 498
+
+	* source/cmt_constituent.cxx: In class constituents_action_iterator,
+	set constituent attribute need_check to true, if specified, for applications
+	only
+	* source/cmt_generator.h: In class CmtGenerator, introduce member
+	m_ISCHECKGROUP
+	* source/cmt_generator.cxx: idem
+	* source/cmt_generators.cxx: In class ConstituentsMakefileGenerator
+	function build, depending on whether constituent belongs to check group,
+	set m_ISCHECKGROUP appropriately and fill check_application_header
+	makefiles fragments with value
+	* mgr/fragments/check_application_header: For applications belonging to
+	check group, ensure that application is built before running check
+	* mgr/fragments/nmake/check_application_header: idem
+	* mgr/fragments/check_application: In application Makefile, remove
+	check target dependency on application, handled in constituents Makefile,
+	improve control of Make verbosity
+	* mgr/fragments/check_java: idem
+	* mgr/fragments/nmake/check_application: idem
+	* mgr/fragments/nmake/check_java: idem
+	
 2012-11-23    <rybkin@lal.in2p3.fr> 497
 
Index: CMT/HEAD/mgr/fragments/check_application
===================================================================
--- CMT/HEAD/mgr/fragments/check_application	(revision 626)
+++ CMT/HEAD/mgr/fragments/check_application	(revision 627)
@@ -3,8 +3,9 @@
 check :: ${CONSTITUENT}check ;
 
-${CONSTITUENT}check :: ${CONSTITUENT}
-	$(${CONSTITUENT}_pre_check)
-	$(bin)${CONSTITUENT}${application_suffix} $(${CONSTITUENT}_check_args)
-	$(${CONSTITUENT}_post_check)
+#${CONSTITUENT}check :: ${CONSTITUENT}
+${CONSTITUENT}check ::
+	$(silent) $(${CONSTITUENT}_pre_check)
+	$(silent) $(bin)${CONSTITUENT}${application_suffix} $(${CONSTITUENT}_check_args)
+	$(silent) $(${CONSTITUENT}_post_check)
 
 #-- end of check_application ------
Index: CMT/HEAD/mgr/fragments/check_application_header
===================================================================
--- CMT/HEAD/mgr/fragments/check_application_header	(revision 626)
+++ CMT/HEAD/mgr/fragments/check_application_header	(revision 627)
@@ -1,3 +1,7 @@
 #-- start of check_application_header ------
+
+cmt_${CONSTITUENT}_${ISCHECKGROUP} = 1
+
+#--------------------------------------
 
 check :: ${CONSTITUENT}check
@@ -7,5 +11,9 @@
 #${CONSTITUENT}check : ${CONSTITUENT} $(cmt_local_${CONSTITUENT}_makefile)
 #${CONSTITUENT}check : $(cmt_local_${CONSTITUENT}_makefile)
+ifdef cmt_${CONSTITUENT}_is_check_group
+${CONSTITUENT}check : ${CONSTITUENT}
+else
 ${CONSTITUENT}check :
+endif
 	@if test ! -f $(cmt_local_${CONSTITUENT}_makefile); then \
 	  $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build constituent_makefile -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}; \
Index: CMT/HEAD/mgr/fragments/check_java
===================================================================
--- CMT/HEAD/mgr/fragments/check_java	(revision 626)
+++ CMT/HEAD/mgr/fragments/check_java	(revision 627)
@@ -1,9 +1,11 @@
 #-- start of check_java ------
 
-check :: ${CONSTITUENT}check
+check :: ${CONSTITUENT}check ;
 
-${CONSTITUENT}check :: ${CONSTITUENT}
-	cd $(bin); $(${CONSTITUENT}_pre_check)
-	cd $(bin); java $(java_run_options) $(${CONSTITUENT}_run_options) ${CONSTITUENT} $(${CONSTITUENT}_check_args)
-	cd $(bin); $(${CONSTITUENT}_post_check)
+#${CONSTITUENT}check :: ${CONSTITUENT}
+${CONSTITUENT}check ::
+	$(silent) cd $(bin); $(${CONSTITUENT}_pre_check)
+	$(silent) cd $(bin); java $(java_run_options) $(${CONSTITUENT}_run_options) ${CONSTITUENT} $(${CONSTITUENT}_check_args)
+	$(silent) cd $(bin); $(${CONSTITUENT}_post_check)
+
 #-- end of check_java ------
Index: CMT/HEAD/mgr/fragments/nmake/check_application
===================================================================
--- CMT/HEAD/mgr/fragments/nmake/check_application	(revision 626)
+++ CMT/HEAD/mgr/fragments/nmake/check_application	(revision 627)
@@ -1,7 +1,11 @@
+#-- start of check_application ------
 
-check :: ${CONSTITUENT}check
+check :: ${CONSTITUENT}check ;
 
-${CONSTITUENT}check :: ${CONSTITUENT}
-	$(${CONSTITUENT}_pre_check)
-	$(bin)${CONSTITUENT}$(application_suffix) $(${CONSTITUENT}_check_args)
-	$(${CONSTITUENT}_post_check)
+#${CONSTITUENT}check :: ${CONSTITUENT}
+${CONSTITUENT}check ::
+	$(silent) $(${CONSTITUENT}_pre_check)
+	$(silent) $(bin)${CONSTITUENT}$(application_suffix) $(${CONSTITUENT}_check_args)
+	$(silent) $(${CONSTITUENT}_post_check)
+
+#-- end of check_application ------
Index: CMT/HEAD/mgr/fragments/nmake/check_application_header
===================================================================
--- CMT/HEAD/mgr/fragments/nmake/check_application_header	(revision 626)
+++ CMT/HEAD/mgr/fragments/nmake/check_application_header	(revision 627)
@@ -1,3 +1,7 @@
 #-- start of check_application_header ------
+
+cmt_${CONSTITUENT}_${ISCHECKGROUP} = 1
+
+#--------------------------------------
 
 check :: ${CONSTITUENT}check
@@ -7,5 +11,9 @@
 #${CONSTITUENT}check : ${CONSTITUENT} $(cmt_local_${CONSTITUENT}_makefile)
 #${CONSTITUENT}check : $(cmt_local_${CONSTITUENT}_makefile)
+!if defined (cmt_${CONSTITUENT}_is_check_group)
+${CONSTITUENT}check : ${CONSTITUENT}
+!else
 ${CONSTITUENT}check :
+!endif
 	@if not exist $(cmt_local_${CONSTITUENT}_makefile) $(cmtexe) -tag=$(tags) $(${CONSTITUENT}_extratags) build -nmake constituent_makefile -out=$(cmt_local_${CONSTITUENT}_makefile) ${CONSTITUENT}
 	$(echo) "(constituents.nmake) Starting $@"
Index: CMT/HEAD/mgr/fragments/nmake/check_java
===================================================================
--- CMT/HEAD/mgr/fragments/nmake/check_java	(revision 626)
+++ CMT/HEAD/mgr/fragments/nmake/check_java	(revision 627)
@@ -1,7 +1,11 @@
+#-- start of check_java ------
 
-check :: ${CONSTITUENT}check
+check :: ${CONSTITUENT}check ;
 
-${CONSTITUENT}check :: ${CONSTITUENT}
-	$(${CONSTITUENT}_pre_check)
-	java ${CONSTITUENT} $(${CONSTITUENT}_check_args)
-	$(${CONSTITUENT}_post_check)
+#${CONSTITUENT}check :: ${CONSTITUENT}
+${CONSTITUENT}check ::
+	$(silent) $(${CONSTITUENT}_pre_check)
+	$(silent) java ${CONSTITUENT} $(${CONSTITUENT}_check_args)
+	$(silent) $(${CONSTITUENT}_post_check)
+
+#-- end of check_java ------
Index: CMT/HEAD/source/cmt_constituent.cxx
===================================================================
--- CMT/HEAD/source/cmt_constituent.cxx	(revision 626)
+++ CMT/HEAD/source/cmt_constituent.cxx	(revision 627)
@@ -176,5 +176,8 @@
     else if (w == "-check")
       {
-        m_constituent.need_check = true;
+        if (m_constituent.type == Application)
+          {
+	    m_constituent.need_check = true;
+          }
       }
     else if (w == "-triggers")
Index: CMT/HEAD/source/cmt_generator.cxx
===================================================================
--- CMT/HEAD/source/cmt_generator.cxx	(revision 626)
+++ CMT/HEAD/source/cmt_generator.cxx	(revision 627)
@@ -86,4 +86,5 @@
   m_HASTARGETTAG.set ("HASTARGETTAG");
   m_HASDEPENDENCIES.set ("HASDEPENDENCIES");
+  m_ISCHECKGROUP.set ("ISCHECKGROUP");
 }
 
@@ -125,4 +126,5 @@
   m_HASTARGETTAG = "";
   m_HASDEPENDENCIES = "";
+  m_ISCHECKGROUP = "";
   m_PACKINCLUDES = "";
   m_PACKOS9      = false;
Index: CMT/HEAD/source/cmt_generator.h
===================================================================
--- CMT/HEAD/source/cmt_generator.h	(revision 626)
+++ CMT/HEAD/source/cmt_generator.h	(revision 627)
@@ -133,4 +133,5 @@
   Variable m_HASTARGETTAG;
   Variable m_HASDEPENDENCIES;
+  Variable m_ISCHECKGROUP;
 };
 
Index: CMT/HEAD/source/cmt_generators.cxx
===================================================================
--- CMT/HEAD/source/cmt_generators.cxx	(revision 626)
+++ CMT/HEAD/source/cmt_generators.cxx	(revision 627)
@@ -2773,9 +2773,16 @@
           if (constituent.need_check)
             {
+	      if (constituent.group != 0 && 
+		  constituent.group->name () == "check")
+		m_ISCHECKGROUP = "is_check_group";
+	      else
+		m_ISCHECKGROUP = "is_not_check_group";
+
               check_application_header_fragment.copy (m_output_file, 
-						      constituent.variables, 3,
+						      constituent.variables, 4,
 						      &m_PACKAGE,
 						      &m_CONSTITUENT,
-                                                      &m_CONSTITUENTSUFFIX);
+                                                      &m_CONSTITUENTSUFFIX,
+						      &m_ISCHECKGROUP);
             }
         }
