Index: /CMT/HEAD/ChangeLog
===================================================================
--- /CMT/HEAD/ChangeLog	(revision 614)
+++ /CMT/HEAD/ChangeLog	(revision 615)
@@ -1,2 +1,15 @@
+2012-05-07    <rybkin@lal.in2p3.fr> 490
+
+	* mgr/fragments/cpp: Implement enhanced mechanism of source file
+	dependencies generation at compilation time making use of -MMD preprocessor
+	option
+	* mgr/fragments/cpp_library: idem
+	* mgr/fragments/c: idem
+	* mgr/fragments/c_library: idem
+	* mgr/requirements: Define cdepflags, cppdepflag macros for Linix, Darwin
+	tags to enable enhanced mechanism of source file dependencies generation
+	at compilation time when tag c_native_dependencies or
+	cpp_native_dependencies is activated
+	
 2012-04-30    <rybkin@lal.in2p3.fr> 489
 
Index: /CMT/HEAD/mgr/fragments/c
===================================================================
--- /CMT/HEAD/mgr/fragments/c	(revision 614)
+++ /CMT/HEAD/mgr/fragments/c	(revision 615)
@@ -7,14 +7,14 @@
 -include $(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.d
 
-$(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.d : $(use_requirements) $(cmt_final_setup_${CONSTITUENT})
+$(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.d :
 
-$(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.d : ${FULLNAME}
-	$(dep_echo) $@
-	$(c_silent) $(ccomp) ${DEPENDENCIESOPTS} -o $(@D)/${NAME}${CONSTITUENTSUFFIX}.dep $(use_pp_cflags) $(${CONSTITUENT}_pp_cflags) $(app_${CONSTITUENT}_pp_cflags) $(${NAME}_pp_cflags) $(use_cflags) $(${CONSTITUENT}_cflags) $(app_${CONSTITUENT}_cflags) $(${NAME}_cflags) $(${NAME}_${FILESUFFIX}_cflags) ${ADDINCLUDE} ${FULLNAME}
-	$(c_silent) $(format_dependencies) $@ $(@D)/${NAME}${CONSTITUENTSUFFIX}.o ${FULLNAME} $(@D)/${NAME}${CONSTITUENTSUFFIX}.dep
+$(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.o : $(cmt_final_setup_${CONSTITUENT})
+
+$(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.o : ${FULLNAME}
+	$(c_echo) ${FULLNAME}
+	$(c_silent) $(ccomp) ${DEPENDENCIESOPTS} -o $@ $(use_pp_cflags) $(${CONSTITUENT}_pp_cflags) $(app_${CONSTITUENT}_pp_cflags) $(${NAME}_pp_cflags) $(use_cflags) $(${CONSTITUENT}_cflags) $(app_${CONSTITUENT}_cflags) $(${NAME}_cflags) $(${NAME}_${FILESUFFIX}_cflags) ${ADDINCLUDE} ${FULLNAME}
 endif
 endif
 
-$(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.o : ${FULLNAME}
 else
 $(bin)${CONSTITUENT}_dependencies.make : $(${NAME}_${FILESUFFIX}_dependencies)
@@ -23,7 +23,8 @@
 
 $(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.o : $(${NAME}_${FILESUFFIX}_dependencies)
-endif
 	$(c_echo) ${FULLNAME}
 	$(c_silent) $(ccomp) -o $@ $(use_pp_cflags) $(${CONSTITUENT}_pp_cflags) $(app_${CONSTITUENT}_pp_cflags) $(${NAME}_pp_cflags) $(use_cflags) $(${CONSTITUENT}_cflags) $(app_${CONSTITUENT}_cflags) $(${NAME}_cflags) $(${NAME}_${FILESUFFIX}_cflags) ${ADDINCLUDE} ${FULLNAME}
 
+endif
+
 #-- end of c ------
Index: /CMT/HEAD/mgr/fragments/c_library
===================================================================
--- /CMT/HEAD/mgr/fragments/c_library	(revision 614)
+++ /CMT/HEAD/mgr/fragments/c_library	(revision 615)
@@ -7,14 +7,14 @@
 -include $(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.d
 
-$(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.d : $(use_requirements) $(cmt_final_setup_${CONSTITUENT})
+$(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.d :
 
-$(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.d : ${FULLNAME}
-	$(dep_echo) $@
-	$(c_silent) $(ccomp) ${DEPENDENCIESOPTS} -o $(@D)/${NAME}${CONSTITUENTSUFFIX}.dep $(use_pp_cflags) $(${CONSTITUENT}_pp_cflags) $(lib_${CONSTITUENT}_pp_cflags) $(${NAME}_pp_cflags) $(use_cflags) $(${CONSTITUENT}_cflags) $(lib_${CONSTITUENT}_cflags) $(${NAME}_cflags) $(${NAME}_${FILESUFFIX}_cflags) ${ADDINCLUDE} ${FULLNAME}
-	$(c_silent) $(format_dependencies) $@ $(@D)/${NAME}${CONSTITUENTSUFFIX}.o ${FULLNAME} $(@D)/${NAME}${CONSTITUENTSUFFIX}.dep
+$(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.o : $(cmt_final_setup_${CONSTITUENT})
+
+$(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.o : ${FULLNAME}
+	$(c_echo) ${FULLNAME}
+	$(c_silent) $(ccomp) ${DEPENDENCIESOPTS} -o $@ $(use_pp_cflags) $(${CONSTITUENT}_pp_cflags) $(lib_${CONSTITUENT}_pp_cflags) $(${NAME}_pp_cflags) $(use_cflags) $(${CONSTITUENT}_cflags) $(lib_${CONSTITUENT}_cflags) $(${NAME}_cflags) $(${NAME}_${FILESUFFIX}_cflags) ${ADDINCLUDE} ${FULLNAME}
 endif
 endif
 
-$(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.o : ${FULLNAME}
 else
 $(bin)${CONSTITUENT}_dependencies.make : $(${NAME}_${FILESUFFIX}_dependencies)
@@ -23,7 +23,8 @@
 
 $(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.o : $(${NAME}_${FILESUFFIX}_dependencies)
-endif
 	$(c_echo) ${FULLNAME}
 	$(c_silent) $(ccomp) -o $@ $(use_pp_cflags) $(${CONSTITUENT}_pp_cflags) $(lib_${CONSTITUENT}_pp_cflags) $(${NAME}_pp_cflags) $(use_cflags) $(${CONSTITUENT}_cflags) $(lib_${CONSTITUENT}_cflags) $(${NAME}_cflags) $(${NAME}_${FILESUFFIX}_cflags) ${ADDINCLUDE} ${FULLNAME}
 
+endif
+
 #-- end of c_library ------
Index: /CMT/HEAD/mgr/fragments/cpp
===================================================================
--- /CMT/HEAD/mgr/fragments/cpp	(revision 614)
+++ /CMT/HEAD/mgr/fragments/cpp	(revision 615)
@@ -7,14 +7,14 @@
 -include $(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.d
 
-$(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.d : $(use_requirements) $(cmt_final_setup_${CONSTITUENT})
+$(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.d :
 
-$(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.d : ${FULLNAME}
-	$(dep_echo) $@
-	$(cpp_silent) $(cppcomp) ${DEPENDENCIESOPTS} -o $(@D)/${NAME}${CONSTITUENTSUFFIX}.dep $(use_pp_cppflags) $(${CONSTITUENT}_pp_cppflags) $(app_${CONSTITUENT}_pp_cppflags) $(${NAME}_pp_cppflags) $(use_cppflags) $(${CONSTITUENT}_cppflags) $(app_${CONSTITUENT}_cppflags) $(${NAME}_cppflags) $(${NAME}_${FILESUFFIX}_cppflags) ${ADDINCLUDE} ${FULLNAME}
-	$(cpp_silent) $(format_dependencies) $@ $(@D)/${NAME}${CONSTITUENTSUFFIX}.o ${FULLNAME} $(@D)/${NAME}${CONSTITUENTSUFFIX}.dep
+$(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.o : $(cmt_final_setup_${CONSTITUENT})
+
+$(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.o : ${FULLNAME}
+	$(cpp_echo) ${FULLNAME}
+	$(cpp_silent) $(cppcomp) ${DEPENDENCIESOPTS} -o $@ $(use_pp_cppflags) $(${CONSTITUENT}_pp_cppflags) $(app_${CONSTITUENT}_pp_cppflags) $(${NAME}_pp_cppflags) $(use_cppflags) $(${CONSTITUENT}_cppflags) $(app_${CONSTITUENT}_cppflags) $(${NAME}_cppflags) $(${NAME}_${FILESUFFIX}_cppflags) ${ADDINCLUDE} ${FULLNAME}
 endif
 endif
 
-$(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.o : ${FULLNAME}
 else
 $(bin)${CONSTITUENT}_dependencies.make : $(${NAME}_${FILESUFFIX}_dependencies)
@@ -23,7 +23,8 @@
 
 $(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.o : $(${NAME}_${FILESUFFIX}_dependencies)
-endif
 	$(cpp_echo) ${FULLNAME}
 	$(cpp_silent) $(cppcomp) -o $@ $(use_pp_cppflags) $(${CONSTITUENT}_pp_cppflags) $(app_${CONSTITUENT}_pp_cppflags) $(${NAME}_pp_cppflags) $(use_cppflags) $(${CONSTITUENT}_cppflags) $(app_${CONSTITUENT}_cppflags) $(${NAME}_cppflags) $(${NAME}_${FILESUFFIX}_cppflags) ${ADDINCLUDE} ${FULLNAME}
 
+endif
+
 #-- end of cpp ------
Index: /CMT/HEAD/mgr/fragments/cpp_library
===================================================================
--- /CMT/HEAD/mgr/fragments/cpp_library	(revision 614)
+++ /CMT/HEAD/mgr/fragments/cpp_library	(revision 615)
@@ -7,14 +7,14 @@
 -include $(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.d
 
-$(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.d : $(use_requirements) $(cmt_final_setup_${CONSTITUENT})
+$(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.d :
 
-$(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.d : ${FULLNAME}
-	$(dep_echo) $@
-	$(cpp_silent) $(cppcomp) ${DEPENDENCIESOPTS} -o $(@D)/${NAME}${CONSTITUENTSUFFIX}.dep $(use_pp_cppflags) $(${CONSTITUENT}_pp_cppflags) $(lib_${CONSTITUENT}_pp_cppflags) $(${NAME}_pp_cppflags) $(use_cppflags) $(${CONSTITUENT}_cppflags) $(lib_${CONSTITUENT}_cppflags) $(${NAME}_cppflags) $(${NAME}_${FILESUFFIX}_cppflags) ${ADDINCLUDE} ${FULLNAME}
-	$(cpp_silent) $(format_dependencies) $@ $(@D)/${NAME}${CONSTITUENTSUFFIX}.o ${FULLNAME} $(@D)/${NAME}${CONSTITUENTSUFFIX}.dep
+$(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.o : $(cmt_final_setup_${CONSTITUENT})
+
+$(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.o : ${FULLNAME}
+	$(cpp_echo) ${FULLNAME}
+	$(cpp_silent) $(cppcomp) ${DEPENDENCIESOPTS} -o $@ $(use_pp_cppflags) $(${CONSTITUENT}_pp_cppflags) $(lib_${CONSTITUENT}_pp_cppflags) $(${NAME}_pp_cppflags) $(use_cppflags) $(${CONSTITUENT}_cppflags) $(lib_${CONSTITUENT}_cppflags) $(${NAME}_cppflags) $(${NAME}_${FILESUFFIX}_cppflags) ${ADDINCLUDE} ${FULLNAME}
 endif
 endif
 
-$(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.o : ${FULLNAME}
 else
 $(bin)${CONSTITUENT}_dependencies.make : $(${NAME}_${FILESUFFIX}_dependencies)
@@ -23,7 +23,8 @@
 
 $(bin)$(binobj)${NAME}${CONSTITUENTSUFFIX}.o : $(${NAME}_${FILESUFFIX}_dependencies)
-endif
 	$(cpp_echo) ${FULLNAME}
 	$(cpp_silent) $(cppcomp) -o $@ $(use_pp_cppflags) $(${CONSTITUENT}_pp_cppflags) $(lib_${CONSTITUENT}_pp_cppflags) $(${NAME}_pp_cppflags) $(use_cppflags) $(${CONSTITUENT}_cppflags) $(lib_${CONSTITUENT}_cppflags) $(${NAME}_cppflags) $(${NAME}_${FILESUFFIX}_cppflags) ${ADDINCLUDE} ${FULLNAME}
 
+endif
+
 #-- end of cpp_library ------------------
Index: /CMT/HEAD/mgr/requirements
===================================================================
--- /CMT/HEAD/mgr/requirements	(revision 614)
+++ /CMT/HEAD/mgr/requirements	(revision 615)
@@ -182,6 +182,6 @@
 
 macro cdepflags "" \
-      c_native_dependencies&Linux       "-MM" \
-      c_native_dependencies&Darwin      "-MM" \
+      c_native_dependencies&Linux       "-MMD -MP" \
+      c_native_dependencies&Darwin      "-MMD -MP" \
       c_native_dependencies&VisualC     "/showIncludes /E"
 
@@ -274,6 +274,6 @@
 
 macro cppdepflags "" \
-      cpp_native_dependencies&Linux       "-MM" \
-      cpp_native_dependencies&Darwin      "-MM" \
+      cpp_native_dependencies&Linux       "-MMD -MP" \
+      cpp_native_dependencies&Darwin      "-MMD -MP" \
       cpp_native_dependencies&VisualC     "/showIncludes /E"
 
