Added useful diagnostics that explain why raptor is redefining commands for a target (when processing things through the mifconv.flm). default
authorSimon Howkins <simonh@symbian.org>
Wed, 10 Nov 2010 00:18:53 +0000
changeset 45 ed860f0ee3bf
parent 38 e4c67a3cf114
Added useful diagnostics that explain why raptor is redefining commands for a target (when processing things through the mifconv.flm). This should make it much easier to pinpoint how the system model should be adjusted to avoid the warnings in future. Also simplified the existing redefinition guards.
gfxconversion/mifconv/makefile_templates/mifconv_step3.make
--- a/gfxconversion/mifconv/makefile_templates/mifconv_step3.make	Mon Oct 18 16:15:38 2010 +0300
+++ b/gfxconversion/mifconv/makefile_templates/mifconv_step3.make	Wed Nov 10 00:18:53 2010 +0000
@@ -118,33 +118,45 @@
 
 # Copy SVG files in reverse order of priority to enabele overriding SVG files with lesser priority
 
+ifeq ($(INIT_CFG),$(PLATFORM)$(CFG))
+define test_for_redefinition
+
+STEP3_GUARD=TARGET_$(call sanitise,$(1))
+
+ifeq ($$($$(STEP3_GUARD)),)
+$$(STEP3_GUARD)=$(COMPONENT_META)
+else
+$$(warning warning: commands for $(1) redefined via $(COMPONENT_META) - originally via $$($$(STEP3_GUARD)))
+endif
+
+endef
+
+MIF_INTERMEDIATES=$(SYSTEMINTERMEDIATESVGFILES_OEM) $(SYSTEMINTERMEDIATESVGFILES_NOKIA) $(SYSTEMINTERMEDIATESVGFILES_NSS) $(SYSTEMINTERMEDIATESVGFILES)
+
+CODE_TO_TEST_FOR_REDEFINITION=$(foreach MIF_INTERMEDIATE,$(MIF_INTERMEDIATES),$(call test_for_redefinition,$(MIF_INTERMEDIATE)))
+
+$(eval $(CODE_TO_TEST_FOR_REDEFINITION))
+
 # Define the copy rules for VECTORSOURCESUBDIRs
-ifeq ($(INIT_CFG),$(PLATFORM)$(CFG))
 $(SYSTEMINTERMEDIATESVGFILES_OEM) : $(VECTORINTERMEDIATEDIR)% : $(VECTORSOURCESUBDIR_OEM)% 
 	$(TOOLCOPY) $< $@	
 ifeq ($(OSTYPE),cygwin)
 	$(GNUCHMOD) a+rw "$@"
 endif
-endif
 
-ifeq ($(INIT_CFG),$(PLATFORM)$(CFG))
 $(SYSTEMINTERMEDIATESVGFILES_NOKIA) : $(VECTORINTERMEDIATEDIR)% : $(VECTORSOURCESUBDIR_NOKIA)% 
 	$(TOOLCOPY) $< $@	
 ifeq ($(OSTYPE),cygwin)
 	$(GNUCHMOD) a+rw "$@"
 endif
-endif
 
-ifeq ($(INIT_CFG),$(PLATFORM)$(CFG))
 $(SYSTEMINTERMEDIATESVGFILES_NSS) : $(VECTORINTERMEDIATEDIR)% : $(VECTORSOURCESUBDIR_NSS)% 
 	$(TOOLCOPY) $< $@	
 ifeq ($(OSTYPE),cygwin)
 	$(GNUCHMOD) a+rw "$@"
 endif
-endif
 
 # Define the copy rule for VECTORSOURCEDIR
-ifeq ($(INIT_CFG),$(PLATFORM)$(CFG))
 $(SYSTEMINTERMEDIATESVGFILES) : $(VECTORINTERMEDIATEDIR)% : $(VECTORSOURCEDIR)% 
 	$(TOOLCOPY) $< $@	
 ifeq ($(OSTYPE),cygwin)