Merge in resource performance improvements #2 fix
authortimothy.murphy@nokia.com
Mon, 10 May 2010 13:58:23 +0100
branchfix
changeset 541 33be37141e47
parent 527 9e83d2225bfb (diff)
parent 540 3ce13bc3e630 (current diff)
child 542 80c21f026f0a
Merge in resource performance improvements #2
sbsv2/raptor/RELEASE-NOTES.html
--- a/sbsv2/raptor/RELEASE-NOTES.html	Mon May 10 13:54:15 2010 +0100
+++ b/sbsv2/raptor/RELEASE-NOTES.html	Mon May 10 13:58:23 2010 +0100
@@ -8,16 +8,29 @@
 
 <h2>next version</h2>
 
+<h3>New Features</h3>
+<ul>
+<li><a href="notes/tcomsupport.txt">           Support new Trace Compiler commandline interface, autogen header location   </a></li>
+</ul>
+
 <h3>Defect Fixes</h3>
 <ul>
 
+<li><a href="http://developer.symbian.org/bugs/show_bug.cgi?id=2605"> SF Bug 2605 </a> - [Raptor] ROMFILE creation using Raptor is not clean </li>
+<li><a href="http://developer.symbian.org/bugs/show_bug.cgi?id=2495"> SF Bug 2495 </a> - [Raptor] KDLL TARGETTYPEs do not support .def file freezing </li>
+<li><a href="http://developer.symbian.org/bugs/show_bug.cgi?id=2420"> SF Bug 2420 </a> - [Raptor] Output from recipes is mis-recognised as "what" output </li>
 <li><a href="http://developer.symbian.org/bugs/show_bug.cgi?id=2297"> SF Bug 2297 </a> Python exception in raptor_meta.py when processing bld.inf file </li>
+<li><a href="http://developer.symbian.org/bugs/show_bug.cgi?id=2174"> SF Bug 2174 </a> - [Raptor] -- layer option shows errors when bld.inf missing in another layer </li>
+<li><a href="notes/tcomsupport.txt">Fix: ensure trace paths exist before build starts to avoid clashes during the build with some make engines    </a></li>
+<li><a href="notes/tcomsupport.txt">Fix: permit traces header directory to be specified in systemincludes - helps Qt    </a></li>
 <li><a href="notes/localresourcecopying.txt">Fix: (performance in cluster builds) do resource copying on local host.</a></li>
 <li>Fix: don't generate multiple copies of the same resource just because there are several target paths. Generate it once and copy that to the different target paths. Helps when winscw is built after an arm build.</li>
 <li>Fix: (performance) remove unnecessary copying of rpp files into epoc32\localisation as they are not used.</li>
 <li>Fix: (performance) remove -C option when preprocessing rpp files - causes comments to be stripped from the rpp resulting in smaller files that improves performance.</li>
+
 </ul>
 
+
 <h2>version 2.13.0</h2>
 
 <h3>New Features</h3>
--- a/sbsv2/raptor/lib/flm/e32abiv2.flm	Mon May 10 13:54:15 2010 +0100
+++ b/sbsv2/raptor/lib/flm/e32abiv2.flm	Mon May 10 13:58:23 2010 +0100
@@ -53,6 +53,8 @@
 # Strip switch-type parameters
 #
 POSTLINKTARGETTYPE:=$(strip $(POSTLINKTARGETTYPE))
+TARGETEXT:=$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE))
+
 UID1:=$(strip $(UID1))
 UID2:=$(strip $(UID2))
 UID3:=$(strip $(UID3))
@@ -128,9 +130,9 @@
 
 # Postlinkable targets need to be linked and elf2e32'd
 ifneq ($(DOPOSTLINK),)
-    E32TARGET:=$(RELEASABLEPATH)/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE))
-    LINK_TARGET:=$(RELEASABLEPATH)/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE)).sym
-    MAPFILE:=$(RELEASABLEPATH)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE)).map
+    E32TARGET:=$(RELEASABLEPATH)/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(TARGETEXT)
+    LINK_TARGET:=$(RELEASABLEPATH)/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(TARGETEXT).sym
+    MAPFILE:=$(RELEASABLEPATH)/$(TARGET).$(TARGETEXT).map
 else
   E32TARGET:=
   LINK_TARGET:=
@@ -187,7 +189,7 @@
 # put the hex version number in the right place
 ifeq ($(LINKAS),)
   LINKASNAME=$(TARGET)
-  LINKASTYPE=$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE))
+  LINKASTYPE=$(TARGETEXT)
 else
   SPLIT_LINKAS=$(subst ., ,$(LINKAS))
   LINKASNAME=$(word 1,$(SPLIT_LINKAS))
@@ -712,6 +714,7 @@
 # USE_TRACE_COMPILER defaults to blank in Raptor config.
 # Users can turn TC on by setting it to 1 in user config.
 ifneq ($(USE_TRACE_COMPILER),)
+  # TARGETEXT is already set
   include $(FLMHOME)/tracecompiler.mk
   WHATRELEASE:=$(WHATRELEASE) $(TRACE_DICTIONARY) $(AUTOGEN_HEADER)
 endif
@@ -864,7 +867,7 @@
 define e32abiv2_listing
 # $1 is the sourcefile
 
-$(eval LISTINGTARGET:=$(strip $(call extractandmap,$(CPPFILEEXTENSIONS) $(CFILEEXTENSIONS),.$(subst _,.,$(call sanitise,$(FULLVARIANTPATH))).$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE)).lst,$1)))
+$(eval LISTINGTARGET:=$(strip $(call extractandmap,$(CPPFILEEXTENSIONS) $(CFILEEXTENSIONS),.$(subst _,.,$(call sanitise,$(FULLVARIANTPATH))).$(TARGET).$(TARGETEXT).lst,$1)))
 $(eval DEPENDFILENAME:=$(call map2listfile,$1).d)
 $(eval DEPENDFILE:=$(wildcard $(DEPENDFILENAME)))
 
@@ -920,7 +923,7 @@
 # separate arguments are interpreted as a single argument when passed to bash
 FIVESPACES=$(BLANK)     $(BLANK)
 
-FREEZEGUARD:=TARGET_$(TARGET)_$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE))_$(IMPORTLIBPATH)_EFREEZE
+FREEZEGUARD:=TARGET_$(TARGET)_$(TARGETEXT)_$(IMPORTLIBPATH)_EFREEZE
 
 define e32freeze
 
@@ -1117,6 +1120,7 @@
         endif
 
 
+        DATATEXT:=
         ifeq ($(TESTCODE),TRUE)
         	# Add 'TEST' to the .iby filename
         	ROMTEST:=test
@@ -1127,8 +1131,6 @@
                     DATATEXT:="data=/epoc32/data/z/test/$(MODULE)/$(VARIANTPLATFORM).$(TEST_OPTION).bat test/$(MODULE).$(TEST_OPTION).bat"
                 endif
             endif
-        else
-        	DATATEXT:=
         endif
 
         # ROMTARGET
--- a/sbsv2/raptor/lib/flm/e32abiv2kdll.flm	Mon May 10 13:54:15 2010 +0100
+++ b/sbsv2/raptor/lib/flm/e32abiv2kdll.flm	Mon May 10 13:58:23 2010 +0100
@@ -1,4 +1,4 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -48,6 +48,7 @@
 IMPORTLIBRARYREQUIRED:=1
 endif
 POSTLINKDEFFILE:=$(DEFFILE)
+SUPPORT_FREEZE:=1
 
 # No exception support for kernel code?
 EXCEPTIONS:=$(NO_EXCEPTIONS)
--- a/sbsv2/raptor/lib/flm/tracecompiler.mk	Mon May 10 13:54:15 2010 +0100
+++ b/sbsv2/raptor/lib/flm/tracecompiler.mk	Mon May 10 13:58:23 2010 +0100
@@ -13,49 +13,64 @@
 # Description:
 # Run Trace Compiler on source files to generate trace headers and decode files
 
+# Expected inputs:
+# TARGETEXT
+
 # Set project name as <mmp_name>
 TRACE_PRJNAME:=$(basename $(notdir $(PROJECT_META)))
+OLDTC_TRACE_PRJNAME:=$(TRACE_PRJNAME)
+TRACE_RELEASABLE_ID:=$(TARGET)_$(TARGETEXT)
 
-TARGETEXT:=$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE))
+define get_trace_path
+$(firstword $(filter %$1, $(USERINCLUDE) $(SYSTEMINCLUDE)))
+endef
+
+$(if $(FLMDEBUG),$(info <debug>INCLUDES=$(USERINCLUDE) $(SYSTEMINCLUDE)</debug>))
+$(if $(FLMDEBUG),$(info <debug>TARGET=$(TARGET) TARGETEXT=$(TARGETEXT)</debug>))
 
-# Find out TRACE_PATH
-# first look for .*/traces/traces_<target_name>_<target_extension>
-TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces/traces_$(TARGET)_$(TARGETEXT),$(DIR))))
-
+# Find out TRACE_PATH  by looking for the trace folder in SYSTEMINCLUDE and USERINCLUDES
+# traces/traces_<target_name>_<target_extension>
+TRACE_PATH:=$(call get_trace_path,/traces/traces_$(TRACE_RELEASABLE_ID))
 ifneq ($(TRACE_PATH),)
-# set project name as <target_name>_<target_extension> instead of <mmp_name>
-TRACE_PRJNAME:=$(TARGET)_$(TARGETEXT)
+  TRACE_PRJNAME:=$(TRACE_RELEASABLE_ID)
+else # obsolete forms for compatibility
+  # traces_<target_name>_<target_ext>
+  TRACE_PATH:=$(call get_trace_path,/traces_$(TARGET)_$(TARGETEXT))
+  ifneq ($(TRACE_PATH),)
+    # set project name as <target_name>_<target_ext> instead of <mmp_name>
+    # to trick old TCom into finding the path.
+    OLDTC_TRACE_PRJNAME:=$(TARGET)_$(TARGETEXT)
+  else
+    # traces_<target_name>_<target_type>
+    TRACE_PATH:=$(call get_trace_path,/traces_$(TARGET)_$(TARGETTYPE))
+    ifneq ($(TRACE_PATH),)
+      # set project name as <target_name>_<target_type> instead of <mmp_name>
+      # to trick old TCom into finding the path.
+      OLDTC_TRACE_PRJNAME:=$(TARGET)_$(TARGETTYPE)
+    else
+      # traces_<mmp_name>
+      TRACE_PATH:=$(call get_trace_path,/traces_$(TRACE_PRJNAME))
+   
+      # traces
+      ifeq ($(TRACE_PATH),)
+       TRACE_PATH:=$(call get_trace_path,/traces)
+      endif
+    endif
+  endif
 endif
 
-# if not found look for .*/traces_<mmp_name>
-ifeq ($(TRACE_PATH),)
-TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces_$(TRACE_PRJNAME),$(DIR))))
-endif
-
-# if not found look for .*/traces
-ifeq ($(TRACE_PATH),)
-TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces,$(DIR))))
-endif
-
-# if not found look for .*/traces_<target_name>_<target_type>
-ifeq ($(TRACE_PATH),)
-TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces_$(TARGET)_$(TARGETTYPE),$(DIR))))
-# set project name as <target_name>_<target_type> instead of <mmp_name>
-TRACE_PRJNAME:=$(TARGET)_$(TARGETTYPE)
-endif
 
 # initialise (so what output will be correct if we don't actually run the TC)
 TRACE_DICTIONARY:=
 AUTOGEN_HEADER:=
-
-$(if $(FLMDEBUG),$(info <debug>TRACE_PATH = $(TRACE_PATH)</debug>))
+$(if $(FLMDEBUG),$(info <debug>TRACE_PATH='$(TRACE_PATH)'   TRACE_RELEASABLE_ID='$(TRACE_RELEASABLE_ID)'</debug>))
 
 # Run trace compiler only if TRACE_PATH exists
 ifneq ($(TRACE_PATH),)
-TRACE_MARKER:=$(TRACE_MARKER_PATH)/tracecompile_$(TRACE_PRJNAME)_$(UID_TC).done
+TRACE_MARKER:=$(TRACE_MARKER_PATH)/tracecompile_$(TRACE_RELEASABLE_ID)_$(UID_TC).done
 TRACE_HEADERS:=
 
-TRACE_SOURCE_LIST:=$(TRACE_MARKER_PATH)/tracecompile_$(TRACE_PRJNAME)_$(UID_TC).sourcelist
+TRACE_SOURCE_LIST:=$(TRACE_MARKER_PATH)/tracecompile_$(TRACE_RELEASABLE_ID)_$(UID_TC).sourcelist
 
 # 1. Append to or create the list of source files for trace compiler to process
 # 2. Check if the hash in trace marker remain unchanged. If not, remove marker so trace compiler will run again. 
@@ -72,25 +87,57 @@
 ifeq ($(GUARD_$(call sanitise,$(TRACE_MARKER))),)
 GUARD_$(call sanitise,$(TRACE_MARKER)):=1
 
+$(if $(FLMDEBUG),$(info <debug>PAST MARKER='$(TRACE_RELEASABLE_ID)'</debug>))
 # The trace compiler likes to change . into _ so we must do the same in the case of mmps with a name like
 # fred.prd.mmp we want fred_prd
 TRACE_PRJNAME_SANITISED:=$(subst .,_,$(TRACE_PRJNAME))
+OLDTC_TRACE_PRJNAME_SANITISED:=$(subst .,_,$(OLDTC_TRACE_PRJNAME))
 
-TRACE_DICTIONARY:=$(EPOCROOT)/epoc32/ost_dictionaries/$(TRACE_PRJNAME_SANITISED)_0x$(UID_TC)_Dictionary.xml
-AUTOGEN_HEADER:=$(EPOCROOT)/epoc32/include/internal/SymbianTraces/autogen/$(TRACE_PRJNAME_SANITISED)_0x$(UID_TC)_TraceDefinitions.h
 
 JAVA_COMMAND:=$(SBS_JAVATC)
 TRACE_COMPILER_PATH:=$(EPOCROOT)/epoc32/tools
-TRACE_COMPILER_START:=-classpath $(TRACE_COMPILER_PATH)/tracecompiler com.nokia.tracecompiler.TraceCompiler
+
+# declare the trace_compile macro but only do it once in the build
+ifeq ($(trace_compile),)
+
+# Find out which macro to declare - the one supporting the new CLI 
+# or the old one.  First try to find TraceCompilerMain.class 
+# If it is there then it might be the new posix-like interface
+TRACE_VER:=
+TRACE_VSTR:=
 
+TCClass:=$(wildcard  $(TRACE_COMPILER_PATH)/tracecompiler/com/nokia/tracecompiler/TraceCompilerMain.class)
+ifneq ($(TCClass),) 
+# Get the version string from the TC (assume it's the new one)
+TRACE_COMPILER_START:=-classpath $(TRACE_COMPILER_PATH)/tracecompiler com.nokia.tracecompiler.TraceCompilerMain
+TRACE_VSTR:=$(firstword $(subst TraceCompiler version ,,$(shell $(JAVA_COMMAND) $(TRACE_COMPILER_START) --version)))
+# check if it looks like a version that supports the new cli interface: supporting up to verion 9 in the future.
+TRACE_VER:=$(findstring new,$(foreach version,2 3 4 5 6 7 8 9,$(patsubst $(version).%,new,$(TRACE_VSTR))))
+endif
+$(if $(FLMDEBUG),$(info <debug>TRACE_VSTR=$(TRACE_VSTR) TRACE_VER=$(TRACE_VER)</debug>))
 
+ifeq ($(TRACE_VER),new)
+define trace_compile
+$(TRACE_MARKER) : $(PROJECT_META)
+	$(call startrule,tracecompile) \
+	( $(GNUCAT) $(TRACE_SOURCE_LIST); \
+	  echo -en "*ENDOFSOURCEFILES*\n" ) | \
+	$(JAVA_COMMAND) $(TRACE_COMPILER_START) $(if $(FLMDEBUG),-d,) --uid=$(UID_TC) --project=$(TRACE_PRJNAME) --mmp=$(PROJECT_META) --traces=$(TRACE_PATH) &&  \
+	$(GNUMD5SUM) $(TRACE_SOURCE_LIST) > $(TRACE_MARKER) && \
+	{ $(GNUTOUCH) $(TRACE_DICTIONARY) $(AUTOGEN_HEADER); \
+	 $(GNUCAT) $(TRACE_SOURCE_LIST) ; true ; } \
+	$(call endrule,tracecompile)
+endef
+
+else # Old inteface
+TRACE_COMPILER_START:=-classpath $(TRACE_COMPILER_PATH)/tracecompiler com.nokia.tracecompiler.TraceCompiler
 # 1. Use pipe to send inputs to trace compiler to process
 # 2. Create a hash regarding to source names and put it in marker.
 # 3. Show source names that are processed by trace compiler
 define trace_compile
 $(TRACE_MARKER) : $(PROJECT_META)
 	$(call startrule,tracecompile) \
-	( echo -en "$(TRACE_PRJNAME)\n$(PROJECT_META)\n"; \
+	( echo -en "$(OLDTC_TRACE_PRJNAME)\n$(PROJECT_META)\n"; \
 	  $(GNUCAT) $(TRACE_SOURCE_LIST); \
 	  echo -en "*ENDOFSOURCEFILES*\n" ) | \
 	$(JAVA_COMMAND) $(TRACE_COMPILER_START) $(UID_TC) &&  \
@@ -100,15 +147,31 @@
 	$(call endrule,tracecompile)
 endef
 
+# End - new/old trace compiler
+endif
+
+# End - tracecompile is defined
+endif
+
+ifeq ($(TRACE_VER),new)
+TRACE_DICTIONARY:=$(EPOCROOT)/epoc32/ost_dictionaries/$(TRACE_PRJNAME_SANITISED)_0x$(UID_TC)_Dictionary.xml
+AUTOGEN_HEADER:=$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/$(TRACE_PRJNAME_SANITISED)_0x$(UID_TC)_TraceDefinitions.h
+else
+TRACE_DICTIONARY:=$(EPOCROOT)/epoc32/ost_dictionaries/$(OLDTC_TRACE_PRJNAME_SANITISED)_0x$(UID_TC)_Dictionary.xml
+AUTOGEN_HEADER:=$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/$(OLDTC_TRACE_PRJNAME_SANITISED)_0x$(UID_TC)_TraceDefinitions.h
+endif
+
 $(eval $(trace_compile))
 
 $(eval $(call GenerateStandardCleanTarget, $(TRACE_PATH)/tracebuilder.cache $(TRACE_MARKER) $(TRACE_SOURCE_LIST),,))
 
-# End sanity guard
+$(call makepath,$(TRACE_PATH) $(dir $(TRACE_DICTIONARY) $(AUTOGEN_HEADER)))
+# End  - guard that prevents repeated calls to TCom
 endif
 
 $(eval $(call GenerateStandardCleanTarget,$(TRACE_HEADERS),,))
 
+# End - Nothing to trace (not trace path in include)
 else
 # Indicate to following parts of the FLM that we actually won't run
 # trace compiler so they can set dependencies accordingly.
--- a/sbsv2/raptor/lib/flm/win32.flm	Mon May 10 13:54:15 2010 +0100
+++ b/sbsv2/raptor/lib/flm/win32.flm	Mon May 10 13:58:23 2010 +0100
@@ -199,7 +199,8 @@
 endif
 
 
-BINTARGET:=$(BINDIR)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
+TARGETEXT:=$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
+BINTARGET:=$(BINDIR)/$(TARGET).$(TARGETEXT)
 
 
 # Run trace compiler #####################################
@@ -217,7 +218,8 @@
 
 # USE_TRACE_COMPILER defaults to blank in Raptor config.
 # Users can turn TC on by setting it to 1 in user config.
-ifneq ($(USE_TRACE_COMPILER),) 
+ifneq ($(USE_TRACE_COMPILER),)
+  # TARGETEXT must be set before here
   include $(FLMHOME)/tracecompiler.mk
   TC_RELEASABLES:=$(TRACE_DICTIONARY) $(AUTOGEN_HEADER)
 endif
@@ -227,7 +229,7 @@
 ## IMPORT LIBRARY ##
 ####################
 
-IMPORTLIBLINKAS:=$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
+IMPORTLIBLINKAS:=$(TARGET).$(TARGETEXT)
 # LINKAS, if supplied, only applies to IMPLIB TARGETTYPEs
 ifeq ($(BASE_TYPE),importlib)
   ifneq ($(LINKAS),)
@@ -295,7 +297,7 @@
   #############
 
   ifeq ($(COPY_FOR_STATIC_LINKAGE),1)
-    BINTARGETSTATICLINK:=$(BINDIRSTATICLINK)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
+    BINTARGETSTATICLINK:=$(BINDIRSTATICLINK)/$(TARGET).$(TARGETEXT)
   endif
 
   RELEASABLES:=$(RELEASABLES) $(BINTARGET) $(BINTARGETSTATICLINK)
@@ -535,7 +537,7 @@
     TMP_IMPLIB:=$(BLDDIR)/$(TARGET).lib
     TMP_INFFILE:=$(BLDDIR)/$(TARGET).inf
     TMP_SYMFILE:=$(if $(OPEN_ENVIRONMENT),$(BLDDIR)/$(TARGET).sym,)
-    TMP_TARGET:=$(BLDDIR)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
+    TMP_TARGET:=$(BLDDIR)/$(TARGET).$(TARGETEXT)
     TMP_DEFFILE:=$(BLDDIR)/$(TARGET).def
 
     CLEANTARGETS:=$(CLEANTARGETS) $(TMP_IMPLIB) $(TMP_INFFILE) $(TMP_TARGET) $(TMP_DEFFILE) $(TMP_SYMFILE)
@@ -576,7 +578,7 @@
 		$(call groupin10,$(notdir $(OBJECTFILES))) ;
 	    $(call startrule,win32stageonelink) \
 	    $(if $(SUPPORTS_STDCPP_NEWLIB),$(if $(STATICLIBFILES),$(CHECKLIB) $(CHECKLIB_TYPE) $(OPT.CHECKLIB.WIN32) $(STATICLIBFILES) &&,),) \
-	    MWSym2LibraryFiles="$(MWSym2LibraryFiles)" $(LD) $(LFLAGS) $(OPT.MENTRYPOINT)$(ENTRYSYMBOL) $(OPT.EXPORT)$(EXPORT_TYPE) $(OPT.NOCOMPACTIMPORTLIB) $(OPT.ADDCOMMAND) "out:$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))" $(OPT.WARNINGS) off $(OPT.IMPLIB)"$(TMP_IMPLIB)" $(OPT.OUT)"$(TMP_TARGET)" $(LINKER_FIRSTSTATLIBFILE) $(NEWLIBFILE) $(WIN32_LIBRARIES) $(STATICLIBFILES) $(LINKLIBFILES) $(OPT.LIBPATH)$(BLDDIR) $(OPT.SEARCH) @$(OBJECTFILES_LRF) \
+	    MWSym2LibraryFiles="$(MWSym2LibraryFiles)" $(LD) $(LFLAGS) $(OPT.MENTRYPOINT)$(ENTRYSYMBOL) $(OPT.EXPORT)$(EXPORT_TYPE) $(OPT.NOCOMPACTIMPORTLIB) $(OPT.ADDCOMMAND) "out:$(TARGET).$(TARGETEXT)" $(OPT.WARNINGS) off $(OPT.IMPLIB)"$(TMP_IMPLIB)" $(OPT.OUT)"$(TMP_TARGET)" $(LINKER_FIRSTSTATLIBFILE) $(NEWLIBFILE) $(WIN32_LIBRARIES) $(STATICLIBFILES) $(LINKLIBFILES) $(OPT.LIBPATH)$(BLDDIR) $(OPT.SEARCH) @$(OBJECTFILES_LRF) \
 	    $(call endrule,win32stageonelink)
     endef
     $(eval $(win32stageonelink))
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/notes/tcomsupport.txt	Mon May 10 13:58:23 2010 +0100
@@ -0,0 +1,42 @@
+New Trace Compiler
+-------------------
+
+Raptor supports an updated version of the Trace Compiler which has
+an improved command-line interface that allows Raptor to specify the
+directory in which trace data should be written.  This allows MMPs to
+implement a new convention for where trace files are stored.
+
+The new convention prevents clashes where building the same
+source file for different MMPs would previously have resulted in two
+build tasks trying to create the same trace file (header/dictionary).
+This caused build slowdowns and also made the trace data inaccurate.
+
+The standard for this directory is that the last two elements of the
+path should be
+
+   traces/traces_<targetname>_<ext>
+
+e.g.
+
+   traces/traces_euser_dll
+
+The new trace compiler also creates "autogen" headers in a new location
+under epoc32/include/platform rather than epoc32/include/internal.
+
+Trace Headers Directory can now also be in SYSTEMINCLUDEs
+----------------------------------------------------------
+
+Some teams were having trouble getting qmake to generate MMPs with
+USERINCLUDEs set.  So they were specifying the trace header directory in
+their SYTEMINCLUDEs.  This change causes Raptor to look for the traces
+directory in bot SYSTEMINCLUDES and USERINCLUDES.
+
+
+Create Trace Directories During Makefile Parse
+-----------------------------------------------
+
+Some build engines consider it a "clash" when two jobs attempt to make the
+same directory.  This change causes some important trace output directories
+to be created during makefile parsing which removes the (small) possibility
+that they would clash during the build part.
+
--- a/sbsv2/raptor/python/plugins/filter_what.py	Mon May 10 13:54:15 2010 +0100
+++ b/sbsv2/raptor/python/plugins/filter_what.py	Mon May 10 13:58:23 2010 +0100
@@ -90,13 +90,7 @@
 		
 		# repetitions is for tracking repeated lines in the output log
 		# when --check and --what are called
-		self.repetitions = {}
-		
-		"Regex for old what output"
-		if "win" in self.buildparameters.platform:
-			self.regex = re.compile("^[a-zA-Z]:\S+$")
-		else:
-			self.regex = re.compile("^/\S+$")
+		self.repetitions = {}	
 		
 		"Regex for targets"
 		self.target_regex = re.compile("^<(build|stringtable|resource|bitmap)>.*")
@@ -136,10 +130,6 @@
 				self.repetitions[line] = 0
 				
 			if self.repetitions[line] == 0:
-				
-				if self.regex.match(line) and (self.what or self.check):
-					"Print the whole line"
-					self.print_file(line, (-1), len(line))
 					
 				if self.target_regex.match(line):
 					"Grab the filename between <build> and </build>" 
--- a/sbsv2/raptor/python/raptor_xml.py	Mon May 10 13:54:15 2010 +0100
+++ b/sbsv2/raptor/python/raptor_xml.py	Mon May 10 13:58:23 2010 +0100
@@ -11,7 +11,7 @@
 #
 # Contributors:
 #
-# Description: 
+# Description:
 # raptor_xml module
 #
 
@@ -67,15 +67,15 @@
 	objects = []
 
 	fileVersion = build.getAttribute("xsi:schemaLocation")
-	
+
 	# ignore the file it matches the "invalid" schema
 	if fileVersion.endswith(xsdIgnore):
 		return objects
-		
+
 	# check that the file matches the expected schema
 	if not fileVersion.endswith(xsdVersion):
 		Raptor.Warn("file '%s' uses schema '%s' which does not end with the expected version '%s'", filename, fileVersion, xsdVersion)
-		
+
 	# create a Data Model object from each sub-element
 	for child in build.childNodes:
 		if child.namespaceURI == namespace \
@@ -147,21 +147,21 @@
 	def __init__(self, aBldInfFile, aLayerName, aContainerNames, aSystemDefinitionFile, aSystemDefinitionBase, aSystemDefinitionVersion):
 		generic_path.Path.__init__(self, aBldInfFile.Absolute().path)
 		self.__ContainerNames = aContainerNames
-		self.__LayerName = aLayerName
+		self.__LayerName = aLayerName
 		self.__SystemDefinitionFile = aSystemDefinitionFile
-		self.__SystemDefinitionBase = aSystemDefinitionBase
-		self.__SystemDefinitionVersion = aSystemDefinitionVersion
+		self.__SystemDefinitionBase = aSystemDefinitionBase
+		self.__SystemDefinitionVersion = aSystemDefinitionVersion
 
 	def GetSystemDefinitionFile(self):
 		return self.__SystemDefinitionFile
 
 	def GetSystemDefinitionBase(self):
 		return self.__SystemDefinitionBase
-
-	def GetSystemDefinitionVersion(self):
-		return self.__SystemDefinitionVersion
-
-	def GetLayerName(self):
+
+	def GetSystemDefinitionVersion(self):
+		return self.__SystemDefinitionVersion
+
+	def GetLayerName(self):
 		return self.__LayerName
 
 	def GetContainerName(self, aContainerType):
@@ -177,12 +177,13 @@
 		self.__Logger = aLogger
 		self.__SystemDefinitionFile = aSystemDefinitionFile.GetLocalString()
 		self.__SystemDefinitionBase = aSystemDefinitionBase.GetLocalString()
-		self.__Version = {'MAJOR':0,'MID':0,'MINOR':0}
-		self.__IdAttribute = "name"
+		self.__Version = {'MAJOR':0,'MID':0,'MINOR':0}
+		self.__IdAttribute = "name"
 		self.__ComponentRoot = ""
 		self.__TotalComponents = 0
 		self.__LayerList = []
 		self.__LayerDetails = {}
+		self.__MissingBldInfs = {}
 
 		self.__DOM = None
 		self.__SystemDefinitionElement = None
@@ -208,10 +209,16 @@
 		return self.__LayerDetails[aLayer]
 
 	def IsLayerBuildable(self, aLayer):
+		if aLayer in self.__MissingBldInfs:
+			for missingbldinf in self.__MissingBldInfs[aLayer]:
+				self.__Logger.Error("System Definition layer \"%s\" from system definition file \"%s\" " + \
+								    "refers to non existent bld.inf file %s", aLayer, self.__SystemDefinitionFile, missingbldinf)
+
 		if len(self.GetLayerComponents(aLayer)):
 			return True
 		return False
 
+
 	def GetAllComponents(self):
 		components = []
 
@@ -268,33 +275,33 @@
 
 		if self.__Version['MAJOR'] == 1 and self.__Version['MID'] > 2:
 			self.__ComponentRoot = self.__SystemDefinitionBase
-		elif self.__Version['MAJOR'] == 2 or self.__Version['MAJOR'] == 3:
-			# 2.0.x and 3.0.0 formats support SOURCEROOT or SRCROOT as an environment specified base - we respect this, unless
-			# explicitly overridden on the command line
-			if os.environ.has_key('SRCROOT'):
-				self.__ComponentRoot = generic_path.Path(os.environ['SRCROOT'])
-			elif os.environ.has_key('SOURCEROOT'):
+		elif self.__Version['MAJOR'] == 2 or self.__Version['MAJOR'] == 3:
+			# 2.0.x and 3.0.0 formats support SOURCEROOT or SRCROOT as an environment specified base - we respect this, unless
+			# explicitly overridden on the command line
+			if os.environ.has_key('SRCROOT'):
+				self.__ComponentRoot = generic_path.Path(os.environ['SRCROOT'])
+			elif os.environ.has_key('SOURCEROOT'):
 				self.__ComponentRoot = generic_path.Path(os.environ['SOURCEROOT'])
-				
-			if self.__SystemDefinitionBase and self.__SystemDefinitionBase != ".":
-				self.__ComponentRoot = self.__SystemDefinitionBase
-				if os.environ.has_key('SRCROOT'):
-					self.__Logger.Info("Command line specified System Definition file base \'%s\' overriding environment SRCROOT \'%s\'", self.__SystemDefinitionBase, os.environ['SRCROOT'])
-				elif os.environ.has_key('SOURCEROOT'):
-					self.__Logger.Info("Command line specified System Definition file base \'%s\' overriding environment SOURCEROOT \'%s\'", self.__SystemDefinitionBase, os.environ['SOURCEROOT'])
+
+			if self.__SystemDefinitionBase and self.__SystemDefinitionBase != ".":
+				self.__ComponentRoot = self.__SystemDefinitionBase
+				if os.environ.has_key('SRCROOT'):
+					self.__Logger.Info("Command line specified System Definition file base \'%s\' overriding environment SRCROOT \'%s\'", self.__SystemDefinitionBase, os.environ['SRCROOT'])
+				elif os.environ.has_key('SOURCEROOT'):
+					self.__Logger.Info("Command line specified System Definition file base \'%s\' overriding environment SOURCEROOT \'%s\'", self.__SystemDefinitionBase, os.environ['SOURCEROOT'])
 		else:
 			self.__Logger.Error("Cannot process schema version %s of file %s", version.string, self.__SystemDefinitionFile)
 			return False
-
-		if self.__Version['MAJOR'] >= 3:
-			# id is the unique identifier for 3.0 and later schema
-			self.__IdAttribute = "id"
+
+		if self.__Version['MAJOR'] >= 3:
+			# id is the unique identifier for 3.0 and later schema
+			self.__IdAttribute = "id"
 
 		return True
 
 	def __Parse(self):
 		# For 2.0 and earlier: find the <systemModel> element (there can be 0 or 1) and search any <layer> elements for <unit> elements with "bldFile" attributes
-		# the <layer> context of captured "bldFile" attributes is recorded as we go
+		# the <layer> context of captured "bldFile" attributes is recorded as we go
 		# For 3.0 and later, process any architectural topmost element, use the topmost element with an id as the "layer"
 		for child in self.__SystemDefinitionElement.childNodes:
 			if child.localName in ["systemModel", "layer", "package", "collection", "component"]:
@@ -303,20 +310,20 @@
 	def __CreateComponent(self, aBldInfFile, aUnitElement):
 		# take a resolved bld.inf file and associated <unit/> element and returns a populated Component object
 		containers = {}
-		self.__GetElementContainers(aUnitElement, containers)
+		self.__GetElementContainers(aUnitElement, containers)
 		layer = self.__GetEffectiveLayer(aUnitElement)
 		component = SystemModelComponent(aBldInfFile, layer, containers, self.__SystemDefinitionFile, self.__SystemDefinitionBase, self.__Version)
 
 		return component
-
-	def __GetEffectiveLayer(self, aElement):
-		#' return the ID of the topmost item which has an ID. For 1.x and 2.x, this will always be layer, for 3.x, it will be the topmost ID'd element in the file
-		# never call this on the root element
-		if aElement.parentNode.hasAttribute(self.__IdAttribute):
-			return self.__GetEffectiveLayer(aElement.parentNode)
-		elif aElement.hasAttribute(self.__IdAttribute):
-			return aElement.getAttribute(self.__IdAttribute)
-		return ""
+
+	def __GetEffectiveLayer(self, aElement):
+		#' return the ID of the topmost item which has an ID. For 1.x and 2.x, this will always be layer, for 3.x, it will be the topmost ID'd element in the file
+		# never call this on the root element
+		if aElement.parentNode.hasAttribute(self.__IdAttribute):
+			return self.__GetEffectiveLayer(aElement.parentNode)
+		elif aElement.hasAttribute(self.__IdAttribute):
+			return aElement.getAttribute(self.__IdAttribute)
+		return ""
 
 	def __GetElementContainers(self, aElement, aContainers):
 		# take a <unit/> element and creates a type->name dictionary of all of its parent containers
@@ -333,7 +340,7 @@
 	def __ProcessSystemModelElement(self, aElement):
 		"""Search for XML <unit/> elements with 'bldFile' attributes and resolve concrete bld.inf locations
 		with an appreciation of different schema versions."""
-
+
 		# The effective "layer" is the item whose parent does not have an id (or name in 2.x and earlier)
 		if not aElement.parentNode.hasAttribute(self.__IdAttribute) :
 			currentLayer = aElement.getAttribute(self.__IdAttribute)
@@ -368,19 +375,26 @@
 
 				group = generic_path.Path(bldFileValue)
 
-				if self.__Version['MAJOR'] < 3:
-					# absolute paths are not changed by root var in 1.x and 2.x
+				if self.__Version['MAJOR'] < 3:
+					# absolute paths are not changed by root var in 1.x and 2.x
 					if not group.isAbsolute() and bldInfRoot:
-						group = generic_path.Join(bldInfRoot, group)
-				else:
-					# only absolute paths are changed by root var in 3.x
-					if group.isAbsolute() and bldInfRoot:
-						group = generic_path.Join(bldInfRoot, group)
+						group = generic_path.Join(bldInfRoot, group)
+				else:
+					# only absolute paths are changed by root var in 3.x
+					if group.isAbsolute() and bldInfRoot:
+						group = generic_path.Join(bldInfRoot, group)
 
 				bldinf = generic_path.Join(group, "bld.inf").FindCaseless()
 
 				if bldinf == None:
-					self.__Logger.Error("No bld.inf found at %s in %s", group.GetLocalString(), self.__SystemDefinitionFile)
+					# recording layers containing non existent bld.infs
+					bldinfname = group.GetLocalString()
+					bldinfname = bldinfname + 'bld.inf'
+					layer = self.__GetEffectiveLayer(aElement)
+					if not layer in self.__MissingBldInfs:
+						self.__MissingBldInfs[layer]=[]
+					self.__MissingBldInfs[layer].append(bldinfname)
+
 				else:
 					component = self.__CreateComponent(bldinf, aElement)
 					layer = component.GetLayerName()
--- a/sbsv2/raptor/test/common/raptor_tests.py	Mon May 10 13:54:15 2010 +0100
+++ b/sbsv2/raptor/test/common/raptor_tests.py	Mon May 10 13:58:23 2010 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -603,9 +603,14 @@
 		# paths in --what output are tailored to the host OS, hence slashes are converted appropriately
 		# .whatlog output is used verbatim from the build/TEM/EM output
 		self.hostossensitive = True
+		
+		# Indicate whether output is expected to appear only once. If so, set it to True
+		self.output_expected_only_once = False 
 	
 	def posttest(self):
 		outlines = self.output.splitlines()
+		if self.output_expected_only_once:
+			outlines_left = list(outlines) 
 		
 		ok = True
 		seen = []
@@ -620,6 +625,8 @@
 				
 			if line in outlines:
 				seen.append(line)
+				if self.output_expected_only_once:
+					outlines_left.remove(line) 
 			else:
 				print "OUTPUT NOT FOUND:", line
 				ok = False
@@ -631,6 +638,13 @@
 			if not line in seen:
 				print "UNEXPECTED OUTPUT:", line
 				ok = False
+		
+		# and check for lines that we expected to see only once
+		if self.output_expected_only_once:
+			for line in outlines_left:
+				print "OUTPUT MORE THAN ONCE:", line
+				ok = False
+
 			
 		# do the base class things too
 		return (SmokeTest.posttest(self) and ok)	
--- a/sbsv2/raptor/test/metadata/system/system_definition_multi_layers.xml	Mon May 10 13:54:15 2010 +0100
+++ b/sbsv2/raptor/test/metadata/system/system_definition_multi_layers.xml	Mon May 10 13:58:23 2010 +0100
@@ -34,5 +34,14 @@
 		</layer>
 	    <layer name="Fifth Layer">
 		</layer>
+		<!--layer name="Sixth layer" deliberately omitted -->
+	    <layer name="Seventh Layer">
+			<component name="simple_stringtable">
+				<unit bldFile="test/smoke_suite/test_resources/simple_plugin" root="SBS_HOME" mrp="simple_plugin/test.mrp"/>
+			</component>
+			<component name="does_not_exist">
+				<unit bldFile="test/smoke_suite/test_resources/does_not_exist" root="SBS_HOME" mrp="does_not_exist/test.mrp"/>
+			</component>
+		</layer>
 	</systemModel>
 </SystemDefinition>
--- a/sbsv2/raptor/test/smoke_suite/gnumakefile_what.py	Mon May 10 13:54:15 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/gnumakefile_what.py	Mon May 10 13:58:23 2010 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -23,7 +23,8 @@
 	t.name = "gnumakefile_what"
 	t.command = "sbs -b smoke_suite/test_resources/gnumakefile/bld.inf --what"
 	componentpath = re.sub(r'\\','/',os.path.abspath("smoke_suite/test_resources/gnumakefile"))
-
+	
+	t.output_expected_only_once = True
 	t.stdout = [
 	# Generated txt files by the gnumakefile
 		componentpath+"/master_bld_ARMV5_UDEB.txt",
--- a/sbsv2/raptor/test/smoke_suite/temtest.py	Mon May 10 13:54:15 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/temtest.py	Mon May 10 13:58:23 2010 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -98,6 +98,7 @@
 	t.id = "0018f"
 	t.name = "temwhat"
 	t.command = "sbs -b smoke_suite/test_resources/simple_extension/bld.inf --what"
+	t.output_expected_only_once = True	
 	t.stdout = [
 		# exports
 		'$(EPOCROOT)/epoc32/tools/makefile_templates/sbsv2test/clean.mk',
--- a/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/child1.mmp	Mon May 10 13:54:15 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/child1.mmp	Mon May 10 13:58:23 2010 +0100
@@ -11,5 +11,5 @@
 SOURCE			child1.cpp
 SOURCE			common.cpp
 
-USERINCLUDE		../traces_child1_exe
+USERINCLUDE		../traces/traces_child1_exe
 
--- a/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/child2.mmp	Mon May 10 13:54:15 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/child2.mmp	Mon May 10 13:58:23 2010 +0100
@@ -11,5 +11,5 @@
 SOURCE			child2.cpp
 SOURCE			common.cpp
 
-USERINCLUDE		../traces_child2_exe
+USERINCLUDE		../traces/traces_child2_exe
 
--- a/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/child3.mmp	Mon May 10 13:54:15 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/child3.mmp	Mon May 10 13:58:23 2010 +0100
@@ -10,5 +10,5 @@
 SOURCE			child3.cpp
 SOURCE			common.cpp
 
-USERINCLUDE		../traces_child3_exe
+USERINCLUDE		../traces/traces_child3_exe
 
--- a/sbsv2/raptor/test/smoke_suite/tracecompiler_general.py	Mon May 10 13:54:15 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/tracecompiler_general.py	Mon May 10 13:58:23 2010 +0100
@@ -40,7 +40,7 @@
 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitpermparserTraces.h",	
 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/fixed_id.definitions",
 		"$(EPOCROOT)/epoc32/ost_dictionaries/testTC_0x1000008d_Dictionary.xml",
-		"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/testTC_0x1000008d_TraceDefinitions.h"
+		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/testTC_0x1000008d_TraceDefinitions.h"
 		]
 	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/testTC/group/bld.inf', [
 		"testtc_dll/armv5/udeb/wlanhwinit.o",
@@ -59,7 +59,7 @@
 		"testtc_dll/armv5/urel/wlanhwinitpermparser.o.d",	
 		"testtc_dll/armv5/urel/testTC_urel_objects.via",
 		"testtc_dll/armv5/urel/testTC{000a0000}.def",
-		"testtc_dll/tracecompile_testTC_1000008d.done"
+		"testtc_dll/tracecompile_testTC_dll_1000008d.done"
 	])
 	t.run()
 	
@@ -74,7 +74,7 @@
 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitpermparserTraces.h"
 		]
 	t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [
-		"testtc_dll/tracecompile_testTC_1000008d.done"
+		"testtc_dll/tracecompile_testTC_dll_1000008d.done"
 	])
 	t.run()
 			
@@ -90,7 +90,7 @@
 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/TC_featurevariant/traces/HelloWorldTraces.h",
 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/TC_featurevariant/traces/fixed_id.definitions",
 		"$(EPOCROOT)/epoc32/ost_dictionaries/HelloWorld_0xe78a5aa3_Dictionary.xml",
-		"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/HelloWorld_0xe78a5aa3_TraceDefinitions.h"
+		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/HelloWorld_0xe78a5aa3_TraceDefinitions.h"
 		]
 	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/TC_featurevariant/group/bld.inf', [
 		"helloworld_exe/armv5/udeb/HelloWorld.o",
@@ -99,7 +99,7 @@
 		"helloworld_exe/armv5/urel/HelloWorld.o",
 		"helloworld_exe/armv5/urel/HelloWorld.o.d",
 		"helloworld_exe/armv5/urel/HelloWorld_urel_objects.via",
-		"helloworld_exe/tracecompile_HelloWorld_e78a5aa3.done"
+		"helloworld_exe/tracecompile_HelloWorld_exe_e78a5aa3.done"
 	])
 	t.run()
 
@@ -120,7 +120,7 @@
 	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [
 		"test_/armv5/udeb/test.o",
 		"test_/armv5/urel/test.o",
-		"test_/tracecompile_autorun1_00000001.done"
+		"test_/tracecompile_test_exe_00000001.done"
 	])
 	t.run()
 	
@@ -141,7 +141,7 @@
 		"test_/armv5/urel/test.o",
 	])
 	t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [
-		"test_/tracecompile_autorun2_00000001.done"
+		"test_/tracecompile_test_exe_00000001.done"
 	])
 	t.run()
 
@@ -162,7 +162,7 @@
 		"test_/armv5/urel/test.o",
 	])
 	t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [
-		"test_/tracecompile_autorun3_00000001.done"
+		"test_/tracecompile_test_exe_00000001.done"
 	])
 	t.run()
 
@@ -183,7 +183,7 @@
 		"test_/armv5/urel/test.o"
 	])
 	t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [
-		"test_/tracecompile_autorun1_00000001.done"
+		"test_/tracecompile_test_exe_00000001.done"
 	])
 	t.run()
 
--- a/sbsv2/raptor/test/smoke_suite/tracecompiler_variants.py	Mon May 10 13:54:15 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/tracecompiler_variants.py	Mon May 10 13:58:23 2010 +0100
@@ -42,8 +42,8 @@
 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/fixed_id.definitions",
 		"$(EPOCROOT)/epoc32/ost_dictionaries/invariant_source_0x10000002_Dictionary.xml",
 		"$(EPOCROOT)/epoc32/ost_dictionaries/variant_source_0x10000003_Dictionary.xml",
-		"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/invariant_source_0x10000002_TraceDefinitions.h",
-		"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/variant_source_0x10000003_TraceDefinitions.h"
+		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/invariant_source_0x10000002_TraceDefinitions.h",
+		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/variant_source_0x10000003_TraceDefinitions.h"
 		]
 	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/variant_source/group/bld.inf', [
 		"invariant_source_/armv5/udeb/inv_source.o",
@@ -54,7 +54,7 @@
 		"invariant_source_/winscw/udeb/inv_source.o.d",
 		"invariant_source_/winscw/urel/inv_source.o",
 		"invariant_source_/winscw/urel/inv_source.o.d",
-		"invariant_source_/tracecompile_invariant_source_10000002.done",
+		"invariant_source_/tracecompile_invariant_source_exe_10000002.done",
 		"variant_source_/armv5/udeb/var_source1.o",
 		"variant_source_/armv5/udeb/var_source1.o.d",
 		"variant_source_/armv5/udeb/var_source2.o",
@@ -71,7 +71,7 @@
 		"variant_source_/winscw/urel/var_source1.o.d",
 		"variant_source_/winscw/urel/var_source2.o",
 		"variant_source_/winscw/urel/var_source2.o.d",
-		"variant_source_/tracecompile_variant_source_10000003.done"
+		"variant_source_/tracecompile_variant_source_exe_10000003.done"
 	])
 	t.antitargets = [
 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/var_source3Traces.h"
@@ -105,8 +105,8 @@
 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/var_source3Traces.h",
 		"$(EPOCROOT)/epoc32/ost_dictionaries/invariant_source_0x10000002_Dictionary.xml",
 		"$(EPOCROOT)/epoc32/ost_dictionaries/variant_source_0x10000003_Dictionary.xml",
-		"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/invariant_source_0x10000002_TraceDefinitions.h",
-		"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/variant_source_0x10000003_TraceDefinitions.h"
+		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/invariant_source_0x10000002_TraceDefinitions.h",
+		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/variant_source_0x10000003_TraceDefinitions.h"
 		]
 	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/variant_source/group/bld.inf', [
 		"invariant_source_/armv5/udeb/inv_source.o",
@@ -117,7 +117,7 @@
 		"invariant_source_/winscw/udeb/inv_source.o.d",
 		"invariant_source_/winscw/urel/inv_source.o",
 		"invariant_source_/winscw/urel/inv_source.o.d",
-		"invariant_source_/tracecompile_invariant_source_10000002.done",
+		"invariant_source_/tracecompile_invariant_source_exe_10000002.done",
 		"variant_source_/armv5/udeb/var_source1.o",
 		"variant_source_/armv5/udeb/var_source1.o.d",
 		"variant_source_/armv5/udeb/var_source3.o",
@@ -134,7 +134,7 @@
 		"variant_source_/winscw/urel/var_source1.o.d",
 		"variant_source_/winscw/urel/var_source3.o",
 		"variant_source_/winscw/urel/var_source3.o.d",
-		"variant_source_/tracecompile_variant_source_10000003.done"
+		"variant_source_/tracecompile_variant_source_exe_10000003.done"
 	])
 	t.run()
 
@@ -159,7 +159,7 @@
 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/multiple_variants/traces/tc_bTraces.h",
 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/multiple_variants/traces/tc_cTraces.h",
 		"$(EPOCROOT)/epoc32/ost_dictionaries/tc_variants_0x10000004_Dictionary.xml",
-		"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/tc_variants_0x10000004_TraceDefinitions.h"
+		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/tc_variants_0x10000004_TraceDefinitions.h"
 		]
 	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/multiple_variants/group/bld.inf', [
 		"tc_variants_/armv5.phone1/udeb/tc_main.o",
@@ -174,7 +174,7 @@
 		"tc_variants_/armv5.phone3/udeb/tc_c.o",
 		"tc_variants_/armv5.phone3/urel/tc_main.o",
 		"tc_variants_/armv5.phone3/urel/tc_c.o",
-		"tc_variants_/tracecompile_tc_variants_10000004.done"
+		"tc_variants_/tracecompile_tc_variants_exe_10000004.done"
 	])	
 	t.run()
 
@@ -195,18 +195,18 @@
 		"$(EPOCROOT)/epoc32/release/armv5/urel/child2.exe",
 		"$(EPOCROOT)/epoc32/release/armv5/udeb/child3.exe",
 		"$(EPOCROOT)/epoc32/release/armv5/urel/child3.exe",
-		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child1_exe/child1Traces.h",
-		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child1_exe/commonTraces.h",
-		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child2_exe/child2Traces.h",
-		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child2_exe/commonTraces.h",
-		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child3_exe/child3Traces.h",
-		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child3_exe/commonTraces.h",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/traces_child1_exe/child1Traces.h",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/traces_child1_exe/commonTraces.h",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/traces_child2_exe/child2Traces.h",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/traces_child2_exe/commonTraces.h",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/traces_child3_exe/child3Traces.h",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/traces_child3_exe/commonTraces.h",
 		"$(EPOCROOT)/epoc32/ost_dictionaries/child1_exe_0x11100001_Dictionary.xml",
 		"$(EPOCROOT)/epoc32/ost_dictionaries/child2_exe_0x11100002_Dictionary.xml",
 		"$(EPOCROOT)/epoc32/ost_dictionaries/child3_exe_0x11100002_Dictionary.xml",
-		"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/child1_exe_0x11100001_TraceDefinitions.h",
-		"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/child2_exe_0x11100002_TraceDefinitions.h",
-		"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/child3_exe_0x11100002_TraceDefinitions.h"
+		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/child1_exe_0x11100001_TraceDefinitions.h",
+		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/child2_exe_0x11100002_TraceDefinitions.h",
+		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/child3_exe_0x11100002_TraceDefinitions.h"
 		]
 	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/bld.inf', [
 		"child1_/armv5/udeb/child1.o",
@@ -231,7 +231,7 @@
 	# Clean mmp A then build mmp B and C. As common.cpp is shared by A B and C, commonTraces.h would be 
 	# cleaned when cleaning mmp A. But as B and C aren't cleaned, Raptor wouldn't run trace compiler on
 	# B and C, thus commonTraces.h wouldn't be generated again, so be missing for mmp B and C.
-	# The solution is to use new trace path "traces_<TARGET>_<TARGETTYPE>" instead of "traces" so shared 
+	# The solution is to use new trace path "traces/traces_<TARGET>_<TARGETTYPE>" instead of "traces" so shared 
 	# source has different copy of trace headers for different projects.
 	t = SmokeTest()
 	t.id = "102e"
@@ -247,14 +247,14 @@
 		"$(EPOCROOT)/epoc32/release/armv5/urel/child2.exe",
 		"$(EPOCROOT)/epoc32/release/armv5/udeb/child3.exe",
 		"$(EPOCROOT)/epoc32/release/armv5/urel/child3.exe",
-		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child2_exe/child2Traces.h",
-		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child2_exe/commonTraces.h",
-		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child3_exe/child3Traces.h",
-		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child3_exe/commonTraces.h",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/traces_child2_exe/child2Traces.h",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/traces_child2_exe/commonTraces.h",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/traces_child3_exe/child3Traces.h",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/traces_child3_exe/commonTraces.h",
 		"$(EPOCROOT)/epoc32/ost_dictionaries/child2_exe_0x11100002_Dictionary.xml",
 		"$(EPOCROOT)/epoc32/ost_dictionaries/child3_exe_0x11100002_Dictionary.xml",
-		"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/child2_exe_0x11100002_TraceDefinitions.h",
-		"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/child3_exe_0x11100002_TraceDefinitions.h"
+		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/child2_exe_0x11100002_TraceDefinitions.h",
+		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/child3_exe_0x11100002_TraceDefinitions.h"
 		]
 	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/bld.inf', [
 		"child2_/armv5/udeb/child2.o",
--- a/sbsv2/raptor/test/smoke_suite/tracecompiler_whatlog.py	Mon May 10 13:54:15 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/tracecompiler_whatlog.py	Mon May 10 13:58:23 2010 +0100
@@ -46,7 +46,7 @@
 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitpermparserTraces.h",	
 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/fixed_id.definitions",
 		"$(EPOCROOT)/epoc32/ost_dictionaries/test_TC_0x1000008d_Dictionary.xml",
-		"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/test_TC_0x1000008d_TraceDefinitions.h"
+		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/test_TC_0x1000008d_TraceDefinitions.h"
 		]
 	t.stdout = [
 		"<whatlog bldinf='$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/group/bld2.inf' mmp='$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/group/test.TC.mmp' config='armv5_urel.tracecompiler'>",
@@ -58,9 +58,19 @@
 		"<build>$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll</build>",
 		"<build>$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll.map</build>",
 		"<build>$(EPOCROOT)/epoc32/ost_dictionaries/test_TC_0x1000008d_Dictionary.xml</build>",
-		"<build>$(EPOCROOT)/epoc32/include/internal/SymbianTraces/autogen/test_TC_0x1000008d_TraceDefinitions.h</build>"
+		"<build>$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/test_TC_0x1000008d_TraceDefinitions.h</build>"
 		]		
-	t.run()
+	t.run("linux")
+	if t.result == CheckWhatSmokeTest.SKIP:
+		t.targets.extend([
+			'$(EPOCROOT)/epoc32/release/armv5/lib/testTC.lib',
+			'$(EPOCROOT)/epoc32/release/armv5/lib/testTC{000a0000}.lib'
+		])
+		t.stdout.extend([
+			'<build>$(EPOCROOT)/epoc32/release/armv5/lib/testTC.lib</build>',
+			'<build>$(EPOCROOT)/epoc32/release/armv5/lib/testTC{000a0000}.lib</build>'
+		])
+		t.run("windows")
 
 	t.id = "112"
 
--- a/sbsv2/raptor/test/unit_suite/raptor_xml_unit.py	Mon May 10 13:54:15 2010 +0100
+++ b/sbsv2/raptor/test/unit_suite/raptor_xml_unit.py	Mon May 10 13:58:23 2010 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -17,15 +17,34 @@
 #
 
 import os
+import generic_path
 import raptor
-import generic_path
 import raptor_xml
 import unittest
 
 class TestRaptorXML(unittest.TestCase):
+		
+	class Logger(object):
+		# Basic custom logger class to store errors (and only errors) for test checks
+
+		def __init__(self):	
+			self.errors = []
+					
+		def Error(self, format, *extras, **attributes):
+			self.errors.append(format % extras)
+
+		def Info(self, format, *extras, **attributes):
+			return
+			
+		def InfoDiscovery(self, object_type, count):
+			return
+		
+		def Clear(self):
+			del self.errors[:]
+			
 	
 	def setUp(self):
-		self.__logger = raptor.Raptor()
+		self.__logger = TestRaptorXML.Logger()
 		self.__nullSysDefRoot = generic_path.Path("smoke_suite/test_resources")
 		self.__sysDefRoot = generic_path.Join(os.environ[raptor.env],"test/smoke_suite/test_resources")
 		self.__sysDefFileRoot = generic_path.Join(os.environ[raptor.env], "test/metadata/system")
@@ -64,8 +83,11 @@
 		systemModel = raptor_xml.SystemModel(self.__logger, generic_path.Join(self.__sysDefFileRoot, "system_definition_3.0.0.xml"), self.__sysDefRoot)
 		self.__compareFileLists([], systemModel.GetAllComponents())
 				
-		
+		self.__logger.Clear()
 		systemModel = raptor_xml.SystemModel(self.__logger, generic_path.Join(self.__sysDefFileRoot, "system_definition_multi_layers.xml"), self.__sysDefRoot)
+		self.assertTrue(len(self.__logger.errors) == 0)
+
+		# Confirm components returned from layers are correct
 
 		expectedBldInfs = [ generic_path.Join(self.__sysDefRoot, "simple/bld.inf"),\
 							generic_path.Join(self.__sysDefRoot, "simple_dll/bld.inf"),\
@@ -74,7 +96,8 @@
 						    generic_path.Join(self.__sysDefRoot, "simple_implib/bld.inf"),\
 						    generic_path.Join(self.__sysDefRoot, "simple_lib/bld.inf"),\
 						    generic_path.Join(self.__sysDefRoot, "simple_stringtable/bld.inf"),\
-						    generic_path.Join(self.__sysDefRoot, "simple_test/bld.inf")]
+						    generic_path.Join(self.__sysDefRoot, "simple_test/bld.inf"),\
+						    generic_path.Join(self.__sysDefRoot, "simple_plugin/bld.inf")]
 		self.__compareFileLists(expectedBldInfs, systemModel.GetAllComponents())
 	
 		expectedBldInfs = [ generic_path.Join(self.__sysDefRoot, "simple_export/bld.inf"),\
@@ -85,6 +108,23 @@
 				
 		self.__compareFileLists([], systemModel.GetLayerComponents("Sixth Layer"))
 		
+		# Check that the overall "buildability" of layers is returned correctly
+		# Note that a layer is still buildable if some bld.infs in it are missing as long as at least 1 exists
+		# However, errors should always be generated for missing bld.infs when a layer is checked
+		
+		self.assertTrue(systemModel.IsLayerBuildable("First Layer"))		
+		self.assertFalse(systemModel.IsLayerBuildable("Sixth Layer"))
+		
+		self.__logger.Clear()
+		self.assertTrue(systemModel.IsLayerBuildable("Seventh Layer"))
+		self.assertTrue(len(self.__logger.errors) == 1)
+		sbsHome = os.environ["SBS_HOME"]
+		sysDefPath = sbsHome + "/test/metadata/system/system_definition_multi_layers.xml"
+		sysDefPath = sysDefPath.replace("\\","/")
+		bldInfPath = sbsHome + "/test/smoke_suite/test_resources/does_not_existbld.inf"
+		bldInfPath = bldInfPath.replace("\\","/")
+		self.assertEquals(self.__logger.errors[0],
+		  ("System Definition layer \"Seventh Layer\" from system definition file \"%s\" refers to non existent bld.inf file %s" % (sysDefPath, bldInfPath)))
 				
 		# Probably redundant, but return local environment (at least its dictionary) to pre-test state
 		os.environ["SOURCEROOT"] = sourceroot