catch up to 2.11.1 from default fix
authorRichard Taylor <richard.i.taylor@nokia.com>
Mon, 07 Dec 2009 12:50:33 +0000
branchfix
changeset 39 164b0547f8a5
parent 6 29df63210f13 (current diff)
parent 38 8a1eeb1a78cb (diff)
child 40 afaf81347e0a
catch up to 2.11.1 from default
sbsv2/raptor/lib/flm/e32postlink.mk
sbsv2/raptor/test/smoke_suite/metadep.py
sbsv2/raptor/test/smoke_suite/mmp_newlib_keyword.py
sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_featurevariant/traces/HelloWorldTraces.h
sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_featurevariant/traces/fixed_id.definitions
--- a/sbsv2/raptor/RELEASE-NOTES.txt	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/RELEASE-NOTES.txt	Mon Dec 07 12:50:33 2009 +0000
@@ -1,6 +1,35 @@
 
 Release Notes for Symbian Build System v2
 
+version 2.11.1
+
+Other Changes:
+GCCE 4.4.1 variant added
+Restored python 2.4 compatibility
+Minor TOOLS2 --what corrections
+Retain Linux execute permissions on unpacked :zip archives
+Prototype of extended timing API added
+Option --noexport added for parallel parsing
+Made --noexport and --export-only mutually exclusive
+SBS_PYTHONPATH insulates sbs from the global PYTHONPATH
+Removed spurious bracket in e32abiv2textnotifier2
+More robust to multiple import library definitions
+
+
+version 2.11.0
+
+New Features:
+Parallel parsing of meta-data
+New keyword APPLY for MMP files
+SAX filter plugin base-class
+
+Defect Fixes:
+DPDEF142895 Raptor does the wrong thing with the ARMFPU keyword
+DPDEF143020 The savespace variant overrides elf2e32's return code
+DPDEF143046 BYTEPAIRCOMPRESSTARGET and INFLATECOMPRESSTARGET not in FLM interface
+Improved error reporting for --check and --what
+
+
 version 2.10.2
 
 Defect Fixes:
--- a/sbsv2/raptor/bin/sbs	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/bin/sbs	Mon Dec 07 12:50:33 2009 +0000
@@ -68,6 +68,7 @@
 	__MINGW__=${SBS_MINGW:-$SBS_HOME/$HOSTPLATFORM_DIR/mingw}
 	__CYGWIN__=${SBS_CYGWIN:-$SBS_HOME/$HOSTPLATFORM_DIR/cygwin}
 	__PYTHON__=${SBS_PYTHON:-$SBS_HOME/$HOSTPLATFORM_DIR/python252/python.exe}
+	export PYTHONPATH=${SBS_PYTHONPATH:-$SBS_HOME/$HOSTPLATFORM_DIR/python252}
 
     # Command for unifying path strings. For example, "c:\some\path" and
     # "/cygdrive/c/some/path" will both be converted into "c:/some/path".
@@ -87,6 +88,7 @@
 	export CYGWIN='nontsec nosmbntsec'
 
 else
+	export PYTHONPATH=${SBS_PYTHONPATH:-$SBS_HOME/$HOSTPLATFORM_DIR/python262/lib}
 	PATH=$SBS_HOME/$HOSTPLATFORM_DIR/python262/bin:$SBS_HOME/$HOSTPLATFORM_DIR/bin:$PATH
 	LD_LIBRARY_PATH=$SBS_HOME/$HOSTPLATFORM_DIR/python262/lib:$SBS_HOME/$HOSTPLATFORM_DIR/bv/lib:$LD_LIBRARY_PATH
 
--- a/sbsv2/raptor/bin/sbs.bat	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/bin/sbs.bat	Mon Dec 07 12:50:33 2009 +0000
@@ -31,6 +31,8 @@
 @REM Use the python set by the environment if possible
 @SET __PYTHON__=%SBS_PYTHON%
 @IF "%__PYTHON__%"=="" SET __PYTHON__=%SBS_HOME%\win32\python252\python.exe
+@SET PYTHONPATH=%SBS_PYTHONPATH%
+@IF "%PYTHONPATH%"=="" SET PYTHONPATH=%SBS_HOME%\win32\python252
 
 @REM Use the mingw set by the environment if possible
 @SET __MINGW__=%SBS_MINGW%
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/bin/sbs_check_exports.py	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,101 @@
+#!/usr/bin/python
+
+# Copyright (c) 2009 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 "Symbian Foundation License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+import re
+import sys
+
+# there are no options, so print help if any are passed
+if len(sys.argv) > 1:
+	print "usage:", sys.argv[0], "(The log data is read from stdin)"
+	sys.exit(0)
+
+whatlogRE = re.compile("<whatlog.*bldinf='([^']*)'")
+exportRE = re.compile("<export destination='(.*)' source='(.*)'")
+
+bldinf = "unknown"
+sources = {}		# lookup from source to destination
+destinations = {}	# lookup from destination to source
+
+chains = 0
+repeats = 0
+conflicts = []
+
+# read stdin a line at a time and soak up all the exports
+line = " "
+while line:
+	line = sys.stdin.readline()
+
+	whatlogMatch = whatlogRE.search(line)
+	if whatlogMatch:
+		bldinf = whatlogMatch.group(1).lower()
+		continue
+
+	exportMatch = exportRE.search(line)
+	if exportMatch:
+		destination = exportMatch.group(1).lower()
+		source = exportMatch.group(2).lower()
+
+		if destination in destinations:
+			(otherSource, otherBldinf) = destinations[destination]
+			
+			# same source and destination but different bld.inf => repeat	
+			if source == otherSource and bldinf != otherBldinf:
+				# only interested in the number for now
+				repeats += 1
+				
+			# different source but same destination => conflict
+			if source != otherSource:
+				conflict = (source, destination, bldinf, otherSource, otherBldinf)
+				tcilfnoc = (otherSource, destination, otherBldinf, source, bldinf)
+				
+				if conflict in conflicts or tcilfnoc in conflicts:
+					# seen this conflict before
+					pass
+				else:
+					print "CONFLICT:", destination, \
+						"FROM", source, \
+						"IN", bldinf, \
+						"AND FROM", otherSource, \
+						"IN", otherBldinf
+					conflicts.append(conflict)
+		else:
+			sources[source] = [destination, bldinf]
+			destinations[destination] = [source, bldinf]
+
+# now check for destinations which were also sources => chains
+for destination in destinations:
+	if destination in sources:
+		(nextDestination, inf2) = sources[destination]
+		(source, inf1) = destinations[destination]
+		print "CHAIN:", source, \
+			"TO", destination, \
+			"IN", inf1, \
+			"THEN TO", nextDestination, \
+			"IN", inf2
+		chains += 1
+		
+# print a summary
+print "Total exports = ", len(destinations.keys())
+print "Chained exports = ", chains
+print "Repeated exports = ", repeats
+print "Conflicting exports = ", len(conflicts)
+
+# return the error code
+if conflicts:
+	sys.exit(1)
+sys.exit(0)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/bin/sbs_filter.py	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,83 @@
+#!/usr/bin/python
+
+# Copyright (c) 2009 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 "Symbian Foundation License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+import os
+import sys
+import traceback
+
+# intercept the -h option
+if "-h" in sys.argv or "--help" in sys.argv:
+	print "usage:", sys.argv[0], "[sbs options]"
+	print "  The log data is read from stdin."
+	print "  Type 'sbs -h' for a list of sbs options."
+	sys.exit(0)
+	
+# get the absolute path to this script
+script = os.path.abspath(sys.argv[0])
+
+# add the Raptor python directory to the PYTHONPATH
+sys.path.append(os.path.join(os.path.dirname(script), "..", "python"))
+
+# now we should be able to find the raptor modules
+import raptor
+import pluginbox
+
+# make sure that HOSTPLATFORM is set
+if not "HOSTPLATFORM" in os.environ:
+	sys.stderr.write("HOSTPLATFORM is not set ... try running gethost.sh\n")
+	sys.exit(1)
+	
+if not "HOSTPLATFORM_DIR" in os.environ:
+	sys.stderr.write("HOSTPLATFORM_DIR is not set ... try running gethost.sh\n")
+	sys.exit(1)
+
+# construct a Raptor object from our command-line (less the name of this script)
+the_raptor = raptor.Raptor.CreateCommandlineBuild(sys.argv[1:])
+
+# from Raptor.OpenLog()
+try:
+	# Find all the raptor plugins and put them into a pluginbox.
+	if not the_raptor.systemPlugins.isAbsolute():
+		the_raptor.systemPlugins = the_raptor.home.Append(the_raptor.systemPlugins)
+		
+	pbox = pluginbox.PluginBox(str(the_raptor.systemPlugins))
+	raptor_params = raptor.BuildStats(the_raptor)
+
+	# Open the requested plugins using the pluginbox
+	the_raptor.out.open(raptor_params, the_raptor.filterList.split(','), pbox)
+	
+except Exception, e:
+	sys.stderr.write("filter exception: %s\n" % str(e))
+	traceback.print_ex()
+	sys.exit(1)
+		
+# read stdin a line at a time and pass it to the Raptor object
+line = " "
+while line:
+	line = sys.stdin.readline()
+	the_raptor.out.write(line)
+
+# from Raptor.CloseLog()
+if not the_raptor.out.summary():
+	the_raptor.errorCode = 1
+	
+if not the_raptor.out.close():
+	the_raptor.errorCode = 1
+	
+# return the error code
+sys.exit(the_raptor.errorCode)
+
--- a/sbsv2/raptor/lib/config/arm.xml	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/config/arm.xml	Mon Dec 07 12:50:33 2009 +0000
@@ -65,6 +65,7 @@
 		<set name="PLATMACROS.CONFIG" value=""/>
 		<set name="PLATMACROS.VAR" value=""/>
 		<set name="PLATMACROS.TOOLCHAIN" value=""/>
+		<set name="POSTLINKER_COMPRESSION_DEFAULT" value="inflate"/>		
 	</var>
 	<var name="v5">
 		<set name="TRADITIONAL_PLATFORM" value="ARMV5"/>
@@ -72,7 +73,8 @@
 		<set name="DEBUG_FORMAT" value="$(CC.DWARF2)"/>
 		<set name="TARGET_ARCH_OPTION" value="$(CC.ARMV5)"/>
 		<set name="LINKER_ARCH_OPTION" value="$(LD.ARMV5)"/>
-		<set name="ARMFPU" value="$(CC.SOFTVFP_MAYBE_VFPV2)"/>
+		<set name="COMPILER_FPU_DEFAULT" value="$(CC.SOFTVFP_MAYBE_VFPV2)"/>
+		<set name="POSTLINKER_FPU_DEFAULT" value="$(PL.SOFTVFP_MAYBE_VFPV2)"/>
 		<set name="GENERATE_ABIV1_IMPLIBS" value="$(SUPPORTS_ABIV1_IMPLIBS)"/>
 	</var>
 	<var name="v6">
@@ -84,7 +86,8 @@
 		<set name="TARGET_ARCH_OPTION" value="$(CC.ARMV6)"/>
 		<set name="LINKER_ARCH_OPTION" value="$(LD.ARMV6)"/>
 		<set name="STATIC_RUNTIME_DIR" value="$(EPOCROOT)/epoc32/release/armv5/$(VARIANTTYPE)"/>
-		<set name="ARMFPU" value="$(CC.SOFTVFP_MAYBE_VFPV2)"/>
+		<set name="COMPILER_FPU_DEFAULT" value="$(CC.SOFTVFP_MAYBE_VFPV2)"/>
+		<set name="POSTLINKER_FPU_DEFAULT" value="$(PL.SOFTVFP_MAYBE_VFPV2)"/>
 	</var>
 	<var name="v7">
 		<set name="TRADITIONAL_PLATFORM" value="ARMV7"/>
@@ -94,7 +97,8 @@
 		<set name="DEBUG_FORMAT" value="$(CC.DWARF3)"/>
 		<set name="TARGET_ARCH_OPTION" value="$(CC.ARMV7)"/>
 		<set name="LINKER_ARCH_OPTION" value="$(LD.ARMV7)"/>
-		<set name="ARMFPU" value="$(CC.SOFTVFP_MAYBE_VFPV3)"/>
+		<set name="COMPILER_FPU_DEFAULT" value="$(CC.SOFTVFP_MAYBE_VFPV3)"/>
+		<set name="POSTLINKER_FPU_DEFAULT" value="$(PL.SOFTVFP_MAYBE_VFPV3)"/>
 	</var>
 	<var name="9e" extends="v5">
 		<set name="VARIANTPLATFORM" value="arm9e"/>
@@ -119,6 +123,9 @@
 	<!-- GCCE 4.3.3 aliases -->
 	<alias name="armv5_urel_gcce4_3_3" meaning="arm.v5.urel.gcce4_3_3"/>
 	<alias name="armv5_udeb_gcce4_3_3" meaning="arm.v5.udeb.gcce4_3_3"/>
+
+	<alias name="armv5_urel_gcce4_4_1" meaning="arm.v5.urel.gcce4_4_1"/>
+	<alias name="armv5_udeb_gcce4_4_1" meaning="arm.v5.udeb.gcce4_4_1"/>
 	
 	<alias name="armv6_urel" meaning="arm.v6.urel.rvct2_2"/>
 	<alias name="armv6_udeb" meaning="arm.v6.udeb.rvct2_2"/>
--- a/sbsv2/raptor/lib/config/gcce.xml	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/config/gcce.xml	Mon Dec 07 12:50:33 2009 +0000
@@ -10,7 +10,7 @@
 		<set name="ASM" value="$(GCCEASM)"/>
 		<set name="AR" value="$(GCCEAR)"/>		
 		<set name="GCCECC" value="$(GCCEBIN)/arm-none-symbianelf-g++$(DOTEXE)"/>
-		<set name="GCCELD" value="$(GCCEBIN)/arm-none-symbianelf-ld$(DOTEXE)"/>
+		<set name="GCCELD" value="$(GCCEBIN)/arm-none-symbianelf-g++$(DOTEXE)"/>
 		<set name="GCCEASM" value="$(GCCEBIN)/arm-none-symbianelf-as$(DOTEXE)"/>
 		<set name="GCCEAR" value="$(GCCEBIN)/arm-none-symbianelf-ar$(DOTEXE)"/>
 		<set name="FROMELF" value="$(GCCEBIN)/arm-none-symbianelf-readelf$(DOTEXE)"/>
@@ -33,16 +33,17 @@
 		<set name="EXTRA_LD_OPTION" value=""/>
 		<set name="FPMODE_OPTION" value=""/>
 		<set name="LD_ERRORS_CONTROL_OPTION" value=""/>
-		<set name="LD_WARNINGS_CONTROL_OPTION" value="--no-undefined"/>
+		<set name="LD_WARNINGS_CONTROL_OPTION" value="-Wl,--no-undefined"/>
 		<set name="LISTING_OPTION" value="-S"/>
 		<set name="EXCEPTIONS" value="-fexceptions"/>
 		<set name="NO_EXCEPTIONS" value="-fno-exceptions"/>
 		<set name="PREINCLUDE_OPTION" value="-include"/>
 		<set name="PREPROCESSOR_OPTION" value="-E"/>
 		<set name="REL_OPTIMISATION" value="-O2"/>
-		<set name="STDLIB_OPTION" value="-nostdlib"/>
+		<set name="STDLIB_OPTION" value="-nodefaultlibs"/>
 		<set name="RUNTIME_SYMBOL_VISIBILITY_OPTION" value=""/>
-		<set name="RW_BASE_OPTION" value="-Tdata"/>
+		<set name="RW_BASE_OPTION" value="-Wl,-Tdata,"/>
+		<set name="RW_BASE" value="$(RW_BASE_OPTION)0x400000"/>
 		<set name="CODE_SEGMENT_START" value="-Ttext"/>
 		<set name="PREINCLUDE" value="$(EPOCINCLUDE)/gcce/gcce.h"/>
 		<!-- From the GCC manual: "With this option, GCC uses features of DWARF version 3 when they are useful; ..." -->
@@ -57,8 +58,8 @@
 		<append name="CDEFS" value='__SUPPORT_CPP_EXCEPTIONS__ _UNICODE __SYMBIAN32__ __GCCE__ __EPOC32__ __MARM__ __EABI__ __PRODUCT_INCLUDE__="$(PRODUCT_INCLUDE)" $(MMPDEFS) $(ARMMACROS)'/>
 		<!-- Note that the intention of ABLD for CIA compilation seems to be "-S -Wa,-adln", although this doesn't work -->
 		<set name="COMPILER_CIA_FLAGS" value="-marm"/>
-		<set name="COMPILER_DEFINES" value="-D__GCCE__"/>
-		<set name="COMPILER_FPU_FLAGS" value="$(CC.OPT.SOFTVFP_MAYBE_VFPV2)$(CC.VAL.SOFTVFP_MAYBE_VFPV2)"/>		
+		<set name="COMPILER_DEFINES" value="-D__GCCE__"/>		
+		<set name="COMPILER_FPU_OPTION" value="-mfloat-abi="/>		
 		<set name="COMPILER_INTERWORK_DEFINES" value="__MARM_INTERWORK__"/>
 		<set name="COMPILER_SYSTEM_INCLUDE_OPTION" value="-I"/>
 		<set name="COMPILER_THUMB_DEFINES" value="__MARM_THUMB__"/>
@@ -72,24 +73,24 @@
 		<set name="LINKER_DEBUG_OPTION" value=""/>
 		<!-- Clearly the linker libs stuff following isn't right - need to use ARMLIBS (or reinvent this a bit) -->
 		<set name="LINKER_DEFAULT_LIBS" value="-lsupc++ -lgcc"/>
-		<set name="LINKER_DEFAULT_LIB_PATHS" value="-L $(GCCEBIN)/../lib/gcc/arm-none-symbianelf/$(TOOLCHAINVERSION) -L $(GCCEBIN)/../lib/gcc/arm-none-symbianelf/$(TOOLCHAINVERSION)/../../../../arm-none-symbianelf/lib"/>
-		<set name="LINKER_ENTRY_OPTION" value="--entry"/>
+		<set name="LINKER_DEFAULT_LIB_PATHS" value=""/>
+		<set name="LINKER_ENTRY_OPTION" value="-Wl,--entry"/>
 		<set name="LINKER_GROUP_START_OPTION" value="--start-group"/>
 		<set name="LINKER_GROUP_END_OPTION" value="--end-group"/>
-		<set name="LINKER_MISC_FLAGS" value="$(CODE_SEGMENT_START) 0x8000"/>
-		<set name="LINKER_NODEBUG_OPTION" value = "--strip-debug"/>
+		<set name="LINKER_MISC_FLAGS" value="-Wl,$(CODE_SEGMENT_START),0x8000"/>
+		<set name="LINKER_NODEBUG_OPTION" value = "-Wl,--strip-debug"/>
 		<set name="LINKER_SCRIPT_FILE_OPTION" value="-T"/>
-		<set name="LINKER_SYMBOLS_OPTION" value="-Map"/>
-		<set name="LINKER_SYMBOLS_FILE_OPTION" value=""/>
-		<set name="SHARED_OBJECT_OPTION" value="-shared"/>
+		<set name="LINKER_SYMBOLS_OPTION" value=""/>
+		<set name="LINKER_SYMBOLS_FILE_OPTION" value="-Wl,-Map"/>
+		<set name="SHARED_OBJECT_OPTION" value="-Wl,-shared"/>
 		<set name="SID" value=""/>
-		<set name="SO_NAME_OPTION" value="-soname"/>
+		<set name="SO_NAME_OPTION" value="-Wl,-soname"/>
 		<set name="STATIC_LIBS_PATH" value="" />
 		<set name="STDCPP_INCLUDE" value="$(EPOCINCLUDE)/stdapis"/>
 		<set name="SUPPORTS_ABIV1_IMPLIBS" value=""/>	
 		<set name="SYMBIAN_LD_MESSAGE_OPTION" value="$(LD_WARNINGS_CONTROL_OPTION) $(LD_ERRORS_CONTROL_OPTION)"/>
 		<set name="TARGET_RELOCATION_OPTION" value="--target1-rel" />
-		<set name="SYMVER_OPTION" value="--default-symver"/>
+		<set name="SYMVER_OPTION" value="-Wl,--default-symver"/>
 		<set name="TEMP_FILES_OPTION" value="-pipe"/>
 		<set name="THUMB_INSTRUCTION_SET" value="-mthumb"/>
 		<set name="TRANSFORM_CIA" value=""/>		
--- a/sbsv2/raptor/lib/config/locations.xml	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/config/locations.xml	Mon Dec 07 12:50:33 2009 +0000
@@ -77,6 +77,7 @@
 
 	<var name="default.locations" extends="hostplatform.locations">
 		<env name='EPOCROOT' default='' type='path'/>
+		<env name='SBS_HOME' default='' type='path'/>
 		<!-- Place where intermediate files are built -->
 		<env name='SBS_BUILD_DIR' default='$(EPOCROOT)/epoc32/build' type='path'/>
 
--- a/sbsv2/raptor/lib/config/rvct.xml	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/config/rvct.xml	Mon Dec 07 12:50:33 2009 +0000
@@ -42,7 +42,8 @@
 		<set name="REL_OPTIMISATION" value="-O2"/>
 		<set name="STDLIB_OPTION" value="--no_scanlib"/>
 		<set name="RUNTIME_SYMBOL_VISIBILITY_OPTION" value="--dllimport_runtime"/>
-		<set name="RW_BASE_OPTION" value="--rw-base"/>
+		<set name="RW_BASE_OPTION" value="--rw-base" /> 
+		<set name="RW_BASE" value="$(RW_BASE_OPTION) 0x400000"/>
 		<set name="CODE_SEGMENT_START" value=""/>
 		<set name="PREINCLUDE" value="$(RVCT_PRE_INCLUDE)"/>
 		<set name="CC.DWARF2" value="--dwarf2"/>
@@ -54,7 +55,7 @@
 		<set name="CIADEFS" value="__CIA__"/>
 		<append name="CDEFS" value='__SUPPORT_CPP_EXCEPTIONS__ _UNICODE __SYMBIAN32__ __ARMCC__ __EPOC32__ __MARM__ __EABI__ __PRODUCT_INCLUDE__="$(PRODUCT_INCLUDE)" $(MMPDEFS) $(ARMMACROS)'/>
 		<set name="COMPILER_CIA_FLAGS" value=""/>
-		<set name="COMPILER_FPU_FLAGS" value="--fpu $(ARMFPU)"/>	
+		<set name="COMPILER_FPU_OPTION" value="--fpu "/>
 		<set name="COMPILER_DEFINES" value=""/>
 		<set name="COMPILER_INTERWORK_DEFINES" value="__MARM_INTERWORK__"/>
 		<set name="COMPILER_SYSTEM_INCLUDE_OPTION" value="-J"/>
@@ -75,7 +76,7 @@
 		<set name="LINKER_MISC_FLAGS" value="$(LICENSERETRY_OPTION)"/>
 		<set name="LINKER_NODEBUG_OPTION" value=""/>
 		<set name="LINKER_SCRIPT_FILE_OPTION" value=""/>
-		<set name="LINKER_SYMBOLS_OPTION" value="--symbols"/>
+		<set name="LINKER_SYMBOLS_OPTION" value="--symbols"/> 
 		<set name="LINKER_SYMBOLS_FILE_OPTION" value="--list"/>
 		<set name="SHARED_OBJECT_OPTION" value="--dll"/>
 		<set name="SID" value=""/>
--- a/sbsv2/raptor/lib/config/variants.xml	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/config/variants.xml	Mon Dec 07 12:50:33 2009 +0000
@@ -10,6 +10,7 @@
 	<var name="debug_info">
 		<set name='DEBUG_INFO' value='1'/>
 	</var>
+	
 	<!-- Run this variant to turn on trace compiler -->
 	<var name="tracecompiler">
 		<set name='USE_TRACE_COMPILER' value='1'/>
@@ -17,11 +18,12 @@
 		<env name='SBS_JAVATC' default='$(JAVA_HOME)/bin/java.exe' type='tool' versionCommand='$(SBS_JAVATC) -version' versionResult='version \"1\.[5-9]' host='win*' />
 		<env name='SBS_JAVATC' default='$(JAVA_HOME)/bin/java' type='tool' versionCommand='$(SBS_JAVATC) -version' versionResult='version \"1\.[5-9]' host='lin*' />
 	</var>
+	
+	<!-- Overrides the default debugging format for the ARM targets. -->
+	<var name="dwarf3">
+		<set name="DEBUG_FORMAT" value="$(CC.DWARF3)"/>
+	</var>
 
-    <!-- Overrides the default debugging format for the ARM targets. -->
-    <var name="dwarf3">
-        <set name="DEBUG_FORMAT" value="$(CC.DWARF3)"/>
-    </var>
 	<var name="techview">
 	</var>
 
@@ -33,33 +35,33 @@
 		<set name='SAVESPACE' value='TRUE'/>
 	</var>
 
-  <var name="generate_linkerfeedback">
-   <set name='GENERATELINKERFEEDBACK' value='TRUE'/>
-   </var>
+	<var name="generate_linkerfeedback">
+		<set name='GENERATELINKERFEEDBACK' value='TRUE'/>
+	</var>
 
-   <var name="use_linkerfeedback">
-    <set name='GENERATELINKERFEEDBACK' value='TRUE'/>
-   <set name='LINKERFEEDBACK_STAGE2' value='TRUE'/>
-   </var>
+	<var name="use_linkerfeedback">
+		<set name='GENERATELINKERFEEDBACK' value='TRUE'/>
+		<set name='LINKERFEEDBACK_STAGE2' value='TRUE'/>
+	</var>
 
-   <var name="profilerfeedback">
-	   <set name='USE_PROFILER_FEEDBACK' value='TRUE'/>
-	   <env name='ARM_PROFILER_FILE' default='' type='path'/>
-   </var>
+	<var name="profilerfeedback">
+		<set name='USE_PROFILER_FEEDBACK' value='TRUE'/>
+		<env name='ARM_PROFILER_FILE' default='' type='path'/>
+	</var>
 
-   <var name="ltcg">
-	   <set name='LTCG' value='TRUE'/>
-	   <set name='LTCG_OPTION' value='--ltcg'/>
-   </var>
+	<var name="ltcg">
+		<set name='LTCG' value='TRUE'/>
+		<set name='LTCG_OPTION' value='--ltcg'/>
+	</var>
 
-   <var name="multifile">
-    <set name='MULTIFILE_ENABLED' value='TRUE'/>
-   </var>
+	<var name="multifile">
+		<set name='MULTIFILE_ENABLED' value='TRUE'/>
+	</var>
 
-  <!-- build from clean can skip some processing -->
-  <var name="bfc">
-    <set name='DEPEND_SKIP' value='TRUE'/>
-  </var>
+	<!-- build from clean can skip some processing -->
+	<var name="bfc">
+		<set name='DEPEND_SKIP' value='TRUE'/>
+	</var>
 
 	<!-- SMP variant for Kernel Code -->
 	<var name="smp">
@@ -77,20 +79,22 @@
 	</var>
 
 	<var name="gcce4_3_2" extends="gcce_base">
-		<env name="GCCEBIN" type="path" />
-		<env name="GCCEVERSION" default="$(TOOLCHAINVERSION)" />
-		<set name="TOOLCHAINVERSION" value="4.3.2" />
+		<env name="SBS_GCCE432BIN" type="path" />
+		<set name="GCCEBIN" value="$(SBS_GCCE432BIN)" />
 		<set name="OWN_LIBRARY_OPTION" value=""/>
 		<set name="STATIC_LIBS_LIST" value=""/>
 		<set name="RUNTIME_LIBS_LIST" value="drtaeabi.dso dfpaeabi.dso dfprvct3_1.dso drtrvct3_1.dso"/>
 		<set name="ARMLIBS" value=""/>
-		<set name="CC.OPT.SOFTVFP_MAYBE_VFPV2" value="-m"/>
-		<set name="CC.VAL.SOFTVFP_MAYBE_VFPV2" value="soft-float"/>
+		<set name="CC.SOFTVFP_MAYBE_VFPV2" value="soft"/>
+		<set name="PL.SOFTVFP_MAYBE_VFPV2" value="softvfp"/>
+		<set name="CC.SOFTVFP_MAYBE_VFPV3" value="soft"/>
+		<set name="PL.SOFTVFP_MAYBE_VFPV3" value="softvfp"/>
 		<set name="CC.ARMV5" value="-march=armv5t"/>
+		<set name="CC.ARMV6" value="-march=armv6t2"/>
+		<set name="CC.ARMV7" value="-march=armv7"/>
 		<set name="RELOCATABLE_IMAGE_OPTION" value=""/>
 		<set name="RVCTLIB" value=""/>
 		<set name="CC.NO_UNALIGNED_ACCESS" value=""/>
-		<set name="CC.SOFTVFP_MAYBE_VFPV2" value=""/>
 		<set name="SPLIT_OPTION" value=""/>
 		<set name="NEED_ENTRYPOINT_LIBRARY" value=""/>
 		<set name="RVCTBIN" value="" />
@@ -98,32 +102,23 @@
 		<set name="USER_STATIC_RUNTIME_LIB" value="usrt3_1.lib"/>
 		<set name="KERNEL_STATIC_RUNTIME_LIB" value="ksrt3_1.lib"/>
 		<set name="NEED_ENTRYPOINT_LIBRARY" value="" />
+		<set name="PLATMACROS.VAR" value="GCCE_4 GCCE_4_3"/>
+		<set name="ARMMACROS.VAR" value="__GCCE_4__ __GCCE_4_3__"/>
 	</var>
 
-	<var name="gcce4_3_3" extends="gcce_base">
-		<env name="GCCEBIN" type="path" />
-		<env name="GCCEVERSION" default="$(TOOLCHAINVERSION)" />
-		<set name="TOOLCHAINVERSION" value="4.3.3" />
-		<set name="OWN_LIBRARY_OPTION" value=""/>
-		<set name="STATIC_LIBS_LIST" value=""/>
-		<set name="RUNTIME_LIBS_LIST" value="drtaeabi.dso dfpaeabi.dso dfprvct3_1.dso drtrvct3_1.dso"/>
-		<set name="ARMLIBS" value=""/>
-		<set name="CC.OPT.SOFTVFP_MAYBE_VFPV2" value="-m"/>
-		<set name="CC.VAL.SOFTVFP_MAYBE_VFPV2" value="soft-float"/>
-		<set name="CC.ARMV5" value="-march=armv5t"/>
-		<set name="RELOCATABLE_IMAGE_OPTION" value=""/>
-		<set name="RVCTLIB" value=""/>
-		<set name="CC.NO_UNALIGNED_ACCESS" value=""/>
-		<set name="CC.SOFTVFP_MAYBE_VFPV2" value=""/>
-		<set name="SPLIT_OPTION" value=""/>
-		<set name="NEED_ENTRYPOINT_LIBRARY" value=""/>
-		<set name="RVCTBIN" value="" />
-		<set name="RVCTINC" value="" />
-		<set name="USER_STATIC_RUNTIME_LIB" value="usrt3_1.lib"/>
-		<set name="KERNEL_STATIC_RUNTIME_LIB" value="ksrt3_1.lib"/>
-		<set name="NEED_ENTRYPOINT_LIBRARY" value="" />
+	<var name="gcce4_3_3" extends="gcce4_3_2">
+		<env name="SBS_GCCE433BIN" type="path" />
+		<set name="GCCEBIN" value="$(SBS_GCCE433BIN)" />
 	</var>
-
+	
+	<var name="gcce4_4_1" extends="gcce4_3_3">
+		<env name="SBS_GCCE441BIN" type="path" />
+		<set name="GCCEBIN" value="$(SBS_GCCE441BIN)" />
+		<set name="RUNTIME_LIBS_LIST" value="drtaeabi.dso dfpaeabi.dso"/>
+		<set name="PLATMACROS.VAR" value="GCCE_4 GCCE_4_4"/>
+		<set name="ARMMACROS.VAR" value="__GCCE_4__ __GCCE_4_4__"/>
+	</var>
+	
 	<var name="rvct2_2" extends="rvct">
 		<env name="RVCT22BIN" type="path"/>
 		<env name="RVCT22INC" type="path"/>
@@ -146,6 +141,7 @@
 		<set name="NEED_ENTRYPOINT_LIBRARY" value="False"/>
 		<set name="CC.NO_UNALIGNED_ACCESS" value="--memaccess -UL41"/>
 		<set name="CC.SOFTVFP_MAYBE_VFPV2" value="softvfp"/>
+		<set name="PL.SOFTVFP_MAYBE_VFPV2" value="softvfp"/>
 		<set name="CC.ARMV5" value="--cpu 5T"/>
 		<set name="CC.ARMV6" value="--cpu 6"/>
 	</var>
@@ -172,7 +168,9 @@
 		<set name="NEED_ENTRYPOINT_LIBRARY" value="True"/>
 		<set name="CC.NO_UNALIGNED_ACCESS" value="--no_unaligned_access"/>
 		<set name="CC.SOFTVFP_MAYBE_VFPV2" value="softvfp"/>
+		<set name="PL.SOFTVFP_MAYBE_VFPV2" value="softvfp"/>
 		<set name="CC.SOFTVFP_MAYBE_VFPV3" value="softvfp"/>
+		<set name="PL.SOFTVFP_MAYBE_VFPV3" value="softvfp"/>
 		<set name="CC.ARMV5" value="--cpu 5TE"/>
 		<set name="CC.ARMV6" value="--cpu 6"/>
 		<set name="CC.ARMV7" value="--cpu 7-A"/>
@@ -201,7 +199,10 @@
 		<set name="NEED_ENTRYPOINT_LIBRARY" value="True"/>
 		<set name="CC.NO_UNALIGNED_ACCESS" value="--no_unaligned_access"/>
 		<set name="CC.SOFTVFP_MAYBE_VFPV2" value="softvfp+vfpv2"/>
+		<set name="PL.SOFTVFP_MAYBE_VFPV2" value="vfpv2"/>
 		<set name="CC.SOFTVFP_MAYBE_VFPV3" value="softvfp+vfpv3"/>
+		<!-- Not supported yet : <set name="PL.SOFTVFP_MAYBE_VFPV3" value="vfpv3"/> -->
+		<set name="PL.SOFTVFP_MAYBE_VFPV3" value="vfpv2"/>
 		<set name="CC.ARMV5" value="--cpu 5TE"/>
 		<set name="CC.ARMV6" value="--cpu 6"/>
 		<set name="CC.ARMV7" value="--cpu 7-A"/>
@@ -252,5 +253,18 @@
 	<var name="mwccinc">
 		<set name='OPTION_CW' value='-cwd include'/>
 	</var>
-
+	
+	<!-- Variant to allow GCCE-built binaries to be created in epoc32/release/gcce, 
+	     epoc32/release/gccev6 and epoc32/release/gccev7 -->
+	<var name="release_gcce">
+		<set name="VARIANTPLATFORM" value="gcce" />
+		<set name="STATIC_RUNTIME_DIR" value="$(EPOCROOT)/epoc32/release/armv5/$(VARIANTTYPE)"/>
+		<set name="STATIC_LIBRARY_DIR" value="$(EPOCROOT)/epoc32/release/armv5/$(VARIANTTYPE)"/>
+	</var>
+	<var name="release_gccev6" extends="release_gcce" >
+		<set name="VARIANTPLATFORM" value="gccev6" />
+	</var>
+	<var name="release_gccev7" extends="release_gcce" >
+		<set name="VARIANTPLATFORM" value="gccev7" />
+	</var>
 </build>
--- a/sbsv2/raptor/lib/flm/bitmap.flm	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/bitmap.flm	Mon Dec 07 12:50:33 2009 +0000
@@ -60,7 +60,7 @@
 
 BMCONVCMDFILE:=$(OUTPUTPATH)/$(BMTARGET)_bmconvcommands
 RELEASEABLES:=$(BITMAPHEADER) $(BITMAPFILE)
-CLEANTARGETS:=$(BITMAPHEADER) $(BITMAPFILE) $(BMCONVCMDFILE)
+CLEANTARGETS:=$(BMCONVCMDFILE)
 
 # The groupbmpin10 macro allows us to construct a command file, 10 
 # bitmap objects at a time to avoid limits on argument lengths and 
@@ -107,7 +107,6 @@
 	$(GNUCP) $$< $$@ \
 	$(call endrule,bitmapcopy)
 
-CLEANTARGETS:=$(CLEANTARGETS) $(MBMCOPYFILES)
 endef
 
 
@@ -140,8 +139,7 @@
 	$(call startrule,bmpfilecopy,FORCESUCCESS) \
 	$(GNUCP) $(1) $(2) && $(GNUCHMOD) +rw $(2) \
 	$(call endrule,bmpfilecopy)
-
-CLEANTARGETS:=$$(CLEANTARGETS) $(2)
+	
 endif
 
 BMPCOPYFILES:=$$(BMPCOPYFILES) $(2)
@@ -163,8 +161,6 @@
 	@if [ ! -d $(EPOCROOT)/epoc32/localisation/group ]; then $(GNUMKDIR) -p $(EPOCROOT)/epoc32/localisation/group; fi
 	@if [ ! -f $$@ ]; then echo "DATADIR: /$(BMBASENAME)" > $$@ ; fi
 	@echo -e "\n/z$(TARGETPATH)/$(BMTARGET) : $(DEPTHBMP)" >> $$@
-
-CLEANTARGETS:=$$(CLEANTARGETS) $(INFOFILE)
 endef
 
 $(eval $(call bmpInfo))
@@ -172,11 +168,11 @@
 # end of localisation #########################################################
 
 ## Clean up
-$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS) ,$(CREATABLEPATHS)))
+$(call raptor_clean,$(CLEANTARGETS))
 $(call makepath,$(CREATABLEPATHS))
 $(call makepathfor,$(BITMAPHEADER))
 
 # for the abld -what target
 BMPRELEASEABLES:=$(RELEASEABLES) $(MBMCOPYFILES) $(BMPCOPYFILES) $(INFOFILE)
-$(eval $(call whatmacro,$(BMPRELEASEABLES),WHATBITMAP))
+$(call raptor_release,$(BMPRELEASEABLES),BITMAP)
 
--- a/sbsv2/raptor/lib/flm/build.flm	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/build.flm	Mon Dec 07 12:50:33 2009 +0000
@@ -24,36 +24,31 @@
 
 .PHONY:: PP_EXPORTS
 
+ifneq ($(filter win,$(HOSTPLATFORM)),)
+SBS:=$(subst \,/,$(SBS_HOME)/bin/sbs.bat)
+else
+SBS:=$(SBS_HOME)/bin/sbs
+endif
 
-SBS := $(subst \,/,$(SBS_HOME)/bin/sbs)
 
 define doexports
 PP_EXPORTS::
 	$(call startrule,makefile_generation_exports) \
-	export TALON_DESCRAMBLE=0; \
-	$(SBS) --export-only $(component_list) $(config_list) -f- -m $(SBS_BUILD_DIR)/makefiles_export.mk $(cli_options)  --mo=DESCRAMBLE:=  --mo=TALON_DESCRAMBLE:=0 | $(GNUSED) 's#]I*]>#XXX#' \
+	$(SBS) --toolcheck=off --export-only $(component_list) $(config_list) -f- -m $(MAKEFILE_PATH).exports $(CLI_OPTIONS)  \
 	$(call endrule,makefile_generation_exports)
 
-CLEANTARGETS:=$$(CLEANTARGETS) $(SBS_BUILD_DIR)/makefiles_export.mk
+CLEANTARGETS:=$$(CLEANTARGETS) $(MAKEFILE_PATH).exports 
 endef
 
 # Generate makefiles for particular bldinf
 # $(1) = source target source target......
 define generate_makefiles
 
-$$(info XXX component_list=$(COMPONENT_PATHS) makefile=$(MAKEFILE_PATH))
+ALL:: $(MAKEFILE_PATH)
 
-ifeq ($(NO_BUILD),1)
-ALL:: $(MAKEFILE_PATH)
-else
-include $(MAKEFILE_PATH)
-endif
-
-$(MAKEFILE_PATH): $(COMPONENT_PATHS) | PP_EXPORTS 
+$(MAKEFILE_PATH): $(COMPONENT_PATHS) $(if $(DOEXPORT),| PP_EXPORTS )
 	$(call startrule,makefile_generation) \
-	export TALON_DESCRAMBLE=0; \
-	$(SBS) --toolcheck=off -n $(CLI_OPTIONS) $(component_list) $(config_list) -m $$@ -f- --mo=DESCRAMBLE:= --mo=TALON_DESCRAMBLE:=0  | $(GNUSED) 's#\]\][>]#XXX#' && \
-	$(MAKE) -j 8 -f $$@.resource_deps \
+	$(SBS) --noexport --toolcheck=off -n $(CLI_OPTIONS) $(component_list) $(config_list) -m $$@ -f- \
 	$(call endrule,makefile_generation)
 
 CLEANTARGETS:=$$(CLEANTARGETS) $(MAKEFILE_PATH) 
@@ -63,13 +58,19 @@
 # Create config list for commands
 config_list:=$(addprefix -c ,$(CONFIGS))
 component_list:=$(addprefix -b ,$(COMPONENT_PATHS))
-$(info COMFIG_LIST: $(config_list))
+
+$(if $(FLMDEBUG),$(info <debug>build.flm: configlist: $(config_list)</debug>))
 
-$(eval $(doexports))
+# Do exports only if asked. This doesn't work brilliantly in emake
+# since exports are often duplicated in some components - leads to conflicts 
+# and rebuilds.  Better to export before trying to do parallel parsing at all.
+$(if $(DOEXPORT),$(eval $(doexports)),$(if $(FLMDEBUG),$(info <debug>build.flm: Exports off </debug>)))
 
 # Create the Makefiles
 $(eval $(call generate_makefiles))
 
+CREATABLEPATHS:=$(CREATABLEPATHS) $(dir $(MAKEFILE_PATH))
+
 $(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS),$(CREATABLEPATHS),))
 $(call makepath,$(CREATABLEPATHS))
 
--- a/sbsv2/raptor/lib/flm/build.xml	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/build.xml	Mon Dec 07 12:50:33 2009 +0000
@@ -9,6 +9,7 @@
 		<param name='CONFIGS' default=''/>
 		<param name='CLI_OPTIONS' default=''/>
 		<param name='NO_BUILD' default='' />
+		<param name='DOEXPORT' default='1' />
 	</interface>
 
 </build>
--- a/sbsv2/raptor/lib/flm/e32abiv2.flm	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2.flm	Mon Dec 07 12:50:33 2009 +0000
@@ -141,7 +141,6 @@
   ifeq ($($(BUILDMARKER_IMPORTLIBTARGET_DSO)),)
     IMPORTLIBTARGET_DSO:=$(TMP_IMPORTLIBTARGET_ROOT).dso
     IMPORTLIBTARGETVERSIONED_DSO:=$(VER_E32IMPORTLIBBASE).dso
-    $(eval $(BUILDMARKER_IMPORTLIBTARGET_DSO):=1)
   endif
 
   # ABIv1 .lib (for specific builds, toolchains and host OS platforms only)
@@ -156,7 +155,6 @@
     ifeq ($($(BUILDMARKER_IMPORTLIBTARGET_LIB)),)
       IMPORTLIBTARGET_LIB:=$(TMP_IMPORTLIBTARGET_ROOT).lib
       IMPORTLIBTARGETVERSIONED_LIB:=$(VER_E32IMPORTLIBBASE).lib
-      $(eval $(BUILDMARKER_IMPORTLIBTARGET_LIB):=1)
     endif
   endif
   endif
@@ -251,6 +249,10 @@
 # ABIv2 .dso
 ifneq ($(IMPORTLIBTARGET_DSO),) # check that we haven't tried to specify this target already
 
+  # By Now we're committed to producing a target for this DSO so it's safe to
+  # set the marker that will prevent any further targets from being made.
+  $(eval $(BUILDMARKER_IMPORTLIBTARGET_DSO):=1)
+
   ifneq ($(EXPLICITVERSION),)
     TARGETS:=$(strip $(TARGETS) $(IMPORTLIBTARGETVERSIONED_DSO))
 
@@ -279,9 +281,6 @@
 		$(call startrule,importlibtarget_unfrozen,FORCESUCCESS) \
 		$(GNUCP) $$(call dblquote,$$<) $$(call dblquote,$$@) \
 		$(call endrule,importlibtarget_unfrozen)
-
-       CLEANTARGETS:=$$(CLEANTARGETS) $(IMPORTLIBTARGET_DSO)
-
     endef
 
     define importlibtarget_unfrozen_ver
@@ -289,8 +288,6 @@
 		$(call startrule,importlibversioned_unfrozen,FORCESUCCESS) \
 		$(GNUCP) "$(GENERATED_DSO)" "$$@" \
 		$(call endrule,importlibversioned_unfrozen)
-
-      CLEANTARGETS:=$$(CLEANTARGETS) $(IMPORTLIBTARGET_DSO)
     endef
 
     ifeq ($(EXPLICITVERSION),)
@@ -307,8 +304,6 @@
 	   $(call startrule,importlibtarget,FORCESUCCESS) \
 	   $(GNUCP) "$$<" "$$@" \
 	   $(call endrule,importlibtarget)
-
-          CLEANTARGETS:=$$(CLEANTARGETS) $(IMPORTLIBTARGET_DSO)
       endef
 
       ifeq ($(EXPLICITVERSION),)
@@ -325,8 +320,6 @@
 	 	  --dso=$$(call dblquote,$$@) 				   \
 	 	  --linkas=$(call dblquote,$(LINKASVERSIONED)) \
 	      $(call endrule,importlibversioned)
-
-              CLEANTARGETS:=$$(CLEANTARGETS) $(IMPORTLIBTARGETVERSIONED_DSO)
       endef
       $(eval $(importlibtargetversioned_func))
     endif #  ifneq ($(DEFFILE),)
@@ -335,7 +328,10 @@
 
 # ABIv1 .lib
 ifneq ($(IMPORTLIBTARGETVERSIONED_LIB),) # check that we haven't tried to specify this target already
-  CLEANTARGETS:=$(CLEANTARGETS) $(IMPORTLIBTARGETVERSIONED_LIB) $(IMPORTLIBTARGET_LIB)
+
+  # By Now we're committed to producing a target for this DSO so it's safe to
+  # set the marker that will prevent any further targets from being made.
+  $(eval $(BUILDMARKER_IMPORTLIBTARGET_LIB):=1)
 
   define abiv1_generatelib
 
@@ -534,7 +530,7 @@
 endef
 $(eval $(artarget_func))
 
-CLEANTARGETS:=$(CLEANTARGETS) $(VIAFILE) $(ARTARGET) $(if $(DUMPBCINFO),$(ARTARGET).elfdump,)
+CLEANTARGETS:=$(CLEANTARGETS) $(VIAFILE) $(if $(DUMPBCINFO),$(ARTARGET).elfdump,)
 endif
 
 
@@ -605,14 +601,13 @@
 	$(LD) $(LINKER_MISC_FLAGS) $(LINKER_DEFAULT_LIB_PATHS) $(SYMBIAN_LINK_FLAGS) $(if $(DEBUG_INFO),$(LINKER_DEBUG_OPTION),$(LINKER_NODEBUG_OPTION)) \
 	  $(if $(ARMLIBS),$(LD_WARNINGS_SUPPRESSION_ARMLIBS),) \
 	  $(SHARED_OBJECT_OPTION) $(SPLIT_OPTION) \
-	  $(RW_BASE_OPTION) 0x400000 \
+	  $(RW_BASE) \
 	  $(LINKER_ARCH_OPTION) \
-	  $(SYMVER_OPTION) $(SO_NAME_OPTION) $(call dblquote,$(LINKASVERSIONED)) \
+	  $(SYMVER_OPTION) $(SO_NAME_OPTION)=$(call dblquote,$(LINKASVERSIONED)) \
 	  $(LINKER_ENTRYPOINT_SETTING) \
 	  -o $$(call dblquote,$$@) \
 	  $(if $(LTCG),$(LTCG_OPTION),) \
-	  $(LINKER_SYMBOLS_OPTION) $(LINKER_SYMBOLS_FILE_OPTION) \
-	  $(call dblquote,$(MAPFILE)) \
+	  $(LINKER_SYMBOLS_OPTION) $(LINKER_SYMBOLS_FILE_OPTION)=$(call dblquote,$(MAPFILE)) \
   	  $(LINKEROPTION) \
 	  $(if $(MULTIFILE_ENABLED),$(call dblquote,$(MULTIFILEOBJECT) $(CIAFILES_LINKOBJECTS)),$(COMMANDFILE_OPTION)$(call dblquote,$(VIAFILE))) \
           $(if $(GENERATELINKERFEEDBACK),$(FEEDBACK_OPTION)$(call dblquote,$(FEEDBACKFILE))) \
@@ -624,9 +619,7 @@
 endef
 $(eval $(linktarget_func))
 
-CLEANTARGETS:=$(CLEANTARGETS) $(LINK_TARGET) $(if $(GENERATELINKERFEEDBACK),$(FEEDBACKFILE)) $(if $(MULTIFILE_ENABLED),$(MULTIFILEOBJECT))
-CLEANTARGETS:=$(CLEANTARGETS) $(VIAFILE)
-CLEANTARGETS:=$(CLEANTARGETS) $(MAPFILE)
+CLEANTARGETS:=$(CLEANTARGETS) $(VIAFILE) $(if $(GENERATELINKERFEEDBACK),$(FEEDBACKFILE)) $(if $(MULTIFILE_ENABLED),$(MULTIFILEOBJECT))
 WHATRELEASE:=$(WHATRELEASE) $(MAPFILE)
 
 endif # if TARGETTYPE lib
@@ -656,7 +649,7 @@
   $(EXPORT_VTBL_OPTION) $(NO_UNALIGNED_ACCESS) $(VFE_OPTION) $(AAPCS_OPTION) \
   $(CPPONLYOPTION) $(INSTRUCTION_SET) \
   $(if $(ALWAYS_BUILD_AS_ARM),$(ARM_INSTRUCTION_SET),$(THUMB_INSTRUCTION_SET) $(call makemacrodef,-D,$(COMPILER_THUMB_DEFINES))) \
-  $(COMPILER_FPU_FLAGS)
+  $(COMPILER_FPU_OPTION)$(if $(ARMFPU),$(ARMFPU),$(COMPILER_FPU_DEFAULT))
 
 ## COMPILE CPP Files #################################################################
 
@@ -675,7 +668,7 @@
   $(EXPORT_VTBL_OPTION) $(NO_UNALIGNED_ACCESS) $(VFE_OPTION) $(AAPCS_OPTION) \
   $(COMPILE_ONLY_OPTION) $(INSTRUCTION_SET) \
   $(if $(ALWAYS_BUILD_AS_ARM),$(ARM_INSTRUCTION_SET),$(THUMB_INSTRUCTION_SET) $(call makemacrodef,-D,$(COMPILER_THUMB_DEFINES))) \
-  $(COMPILER_FPU_FLAGS)
+  $(COMPILER_FPU_OPTION)$(if $(ARMFPU),$(ARMFPU),$(COMPILER_FPU_DEFAULT))
 
 ifeq ($(STDCPP),1)
 SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$(call dblquote,$(STDCPP_INCLUDE)))
@@ -1132,7 +1125,6 @@
     PREVIOUSVARIANTTYPE:=$(VARIANTTYPE)
 
     WHATRELEASE:=$(WHATRELEASE) $(ROMFILENAME)
-    CLEANTARGETS:=$(CLEANTARGETS) $(ROMFILENAME)
 endif
 
 # Deal with test code batch files generation.
@@ -1143,7 +1135,6 @@
     BATCHFILE_CREATED_$(EPOCROOT)/epoc32/data/z/test/$(MODULE)/$(VARIANTPLATFORM).$(TESTPATH):=1
     TARGET_CREATED_$(EPOCROOT)/epoc32/data/z/test/$(MODULE)/$(VARIANTPLATFORM).$(TESTPATH)_$(TARGET):=1
     WHATRELEASE:=$(WHATRELEASE) $(EPOCROOT)/epoc32/data/z/test/$(MODULE)/$(VARIANTPLATFORM).$(TESTPATH)
-    CLEANTARGETS:=$(CLEANTARGETS) $(EPOCROOT)/epoc32/data/z/test/$(MODULE)/$(VARIANTPLATFORM).$(TESTPATH)
 endif
 
 ###################### End of Build ROMFILE target ######################
@@ -1183,10 +1174,10 @@
 $(call makepath,$(CREATABLEPATHS))
 
 ## Clean up
-$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS) ,$(CREATABLEPATHS),))
+$(call raptor_clean,$(CLEANTARGETS))
 
-# For the abld -what target
-$(eval $(call whatmacro,$(filter-out %.sym,$(WHATRELEASE)),WHATARMV5))
+# For the --what option and the log file
+$(call raptor_release,$(filter-out %.sym,$(WHATRELEASE)))
 
 endif # FEATUREVARIANTNAME=="" or FEATUREVARIANT==1
 
--- a/sbsv2/raptor/lib/flm/e32abiv2ani.flm	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2ani.flm	Mon Dec 07 12:50:33 2009 +0000
@@ -29,7 +29,7 @@
 
 # Determine what kind of entrypoint option to set
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/edll.lib
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Dll $(LINKER_ENTRYPOINT_DECORATION) $(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
 LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
--- a/sbsv2/raptor/lib/flm/e32abiv2defaults.mk	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2defaults.mk	Mon Dec 07 12:50:33 2009 +0000
@@ -40,13 +40,17 @@
 # Reset these variables as they change for every single target type
 # LINKER_ENTRYPOINT_ADORNMENT will be blank for GCCE; for RVCT it will look like "(uc_exe_.o)"
 # LINKER_ENTRYPOINT_DECORATION will be blank for RVCT; for GCCE it will look like "-u _E32Startup"
+# LINKER_SEPARATOR is a comma for GCCE as g++ is used for linking; for RVCT is should be a space, but
+# as make strips trailing spaces, we use the CHAR_SPACE variable.
 
 LINKER_ENTRYPOINT_ADORNMENT:=
 LINKER_ENTRYPOINT_DECORATION:=
+LINKER_SEPARATOR:=
 
 # For GCCE
 ifeq ($(TOOLCHAIN),GCCE)
-LINKER_ENTRYPOINT_DECORATION:=$(if $(call isoneof,$(TARGETTYPE),exexp exe),-u _E32Startup,-u _E32Dll)
+LINKER_ENTRYPOINT_DECORATION:=$(if $(call isoneof,$(TARGETTYPE),exexp exe),-Wl$(CHAR_COMMA)-u$(CHAR_COMMA)_E32Startup,-Wl$(CHAR_COMMA)-u$(CHAR_COMMA)_E32Dll)
+LINKER_SEPARATOR:=$(CHAR_COMMA)
 endif
 
 # For RVCT
@@ -74,6 +78,7 @@
   ifeq ($(TARGETTYPE),kdll)
 	LINKER_ENTRYPOINT_ADORNMENT:=(L_ENTRY_.o)
   endif
+LINKER_SEPARATOR:=$(CHAR_SPACE)
 endif
 
 # "OPTION" metadata from the front-end can potentially be supplied simultaneously for both GCCE and RVCT,
@@ -89,3 +94,9 @@
   OPTION_COMPILER:=$(OPTION_ARMCC)
   OPTION_REPLACE_COMPILER:=$(OPTION_REPLACE_ARMCC)
 endif
+
+# "ARMFPU" overrides for 'fpu-ness' in compiler and postlinker calls in .mmp files are currently only
+# supported for RVCT-based builds, GCCE builds always make use of the interface defined defaults.
+ifeq ($(TOOLCHAIN),GCCE)
+  ARMFPU:=
+endif
--- a/sbsv2/raptor/lib/flm/e32abiv2dll.flm	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2dll.flm	Mon Dec 07 12:50:33 2009 +0000
@@ -28,7 +28,7 @@
 
 # Default Linker settings for this target type
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/edll.lib
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Dll $(LINKER_ENTRYPOINT_DECORATION) $(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
 LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
--- a/sbsv2/raptor/lib/flm/e32abiv2exe.flm	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2exe.flm	Mon Dec 07 12:50:33 2009 +0000
@@ -28,7 +28,7 @@
 LINKER_STUB_LIBRARY:=
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/$(if $(FIRSTLIB),$(FIRSTLIB),eexe.lib)
 
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Startup $(LINKER_ENTRYPOINT_DECORATION) $(call dblquote,$(STATIC_RUNTIME_DIR)/$(if $(FIRSTLIB),$(FIRSTLIB),eexe.lib)$(LINKER_ENTRYPOINT_ADORNMENT)) 
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Startup $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/$(if $(FIRSTLIB),$(FIRSTLIB),eexe.lib)$(LINKER_ENTRYPOINT_ADORNMENT)) 
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
 LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
--- a/sbsv2/raptor/lib/flm/e32abiv2exexp.flm	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2exexp.flm	Mon Dec 07 12:50:33 2009 +0000
@@ -52,10 +52,10 @@
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/$(FIRSTLIB)
 
 ifeq ("$(TOOLCHAIN)","RVCT")
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Startup  $(call dblquote,$(STATIC_RUNTIME_DIR)/$(FIRSTLIB)($(FIRSTLIB_OBJECTFILE)))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Startup $(call dblquote,$(STATIC_RUNTIME_DIR)/$(FIRSTLIB)($(FIRSTLIB_OBJECTFILE)))
 else
 # GCCE
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Startup -u _E32Startup  $(call dblquote,$(STATIC_RUNTIME_DIR)/$(FIRSTLIB))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Startup -Wl,-u$(LINKER_SEPARATOR)_E32Startup$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/$(FIRSTLIB))
 endif
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
--- a/sbsv2/raptor/lib/flm/e32abiv2fsy.flm	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2fsy.flm	Mon Dec 07 12:50:33 2009 +0000
@@ -28,7 +28,7 @@
 # Determine what kind of entrypoint option to set
 AUTOEXPORTS:=CreateFileSystem,1;
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/edll.lib
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Dll $(LINKER_ENTRYPOINT_DECORATION) $(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
 LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
--- a/sbsv2/raptor/lib/flm/e32abiv2kdll.flm	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2kdll.flm	Mon Dec 07 12:50:33 2009 +0000
@@ -27,7 +27,7 @@
 
 # Determine what kind of entrypoint option to set
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/ekll.lib
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Dll $(LINKER_ENTRYPOINT_DECORATION) $(call dblquote,$(STATIC_RUNTIME_DIR)/ekll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/ekll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
 LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
--- a/sbsv2/raptor/lib/flm/e32abiv2kext.flm	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2kext.flm	Mon Dec 07 12:50:33 2009 +0000
@@ -34,7 +34,7 @@
 
 # Default Linker settings for this target type
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/eext.lib
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Dll $(LINKER_ENTRYPOINT_DECORATION) $(call dblquote,$(STATIC_RUNTIME_DIR)/eext.lib$(LINKER_ENTRYPOINT_ADORNMENT))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/eext.lib$(LINKER_ENTRYPOINT_ADORNMENT))
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
 LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
--- a/sbsv2/raptor/lib/flm/e32abiv2ldd.flm	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2ldd.flm	Mon Dec 07 12:50:33 2009 +0000
@@ -29,7 +29,7 @@
 
 # Determine what kind of entrypoint option to set
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/edev.lib
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Dll $(LINKER_ENTRYPOINT_DECORATION) $(call dblquote,$(STATIC_RUNTIME_DIR)/edev.lib$(LINKER_ENTRYPOINT_ADORNMENT))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edev.lib$(LINKER_ENTRYPOINT_ADORNMENT))
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
 LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
--- a/sbsv2/raptor/lib/flm/e32abiv2pdd.flm	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2pdd.flm	Mon Dec 07 12:50:33 2009 +0000
@@ -28,7 +28,7 @@
 
 # Determine what kind of entrypoint option to set
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/edev.lib
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Dll $(LINKER_ENTRYPOINT_DECORATION) $(call dblquote,$(STATIC_RUNTIME_DIR)/edev.lib$(LINKER_ENTRYPOINT_ADORNMENT))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edev.lib$(LINKER_ENTRYPOINT_ADORNMENT))
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
 LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
--- a/sbsv2/raptor/lib/flm/e32abiv2pdl.flm	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2pdl.flm	Mon Dec 07 12:50:33 2009 +0000
@@ -28,7 +28,7 @@
 
 # Determine what kind of entrypoint option to set
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/edll.lib
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Dll $(LINKER_ENTRYPOINT_DECORATION) $(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
 LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
--- a/sbsv2/raptor/lib/flm/e32abiv2plugin.flm	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2plugin.flm	Mon Dec 07 12:50:33 2009 +0000
@@ -31,7 +31,7 @@
 
 # Default Linker settings for this target type
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/edll.lib
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Dll $(LINKER_ENTRYPOINT_DECORATION) $(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
 LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
--- a/sbsv2/raptor/lib/flm/e32abiv2stddll.flm	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2stddll.flm	Mon Dec 07 12:50:33 2009 +0000
@@ -29,7 +29,7 @@
 
 # Default Linker settings for this target type
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/edll.lib
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Dll $(LINKER_ENTRYPOINT_DECORATION) $(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
 DEFAULT_NEWLIB:=$(DEFAULT_STDCPP_NEWLIB)
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
--- a/sbsv2/raptor/lib/flm/e32abiv2stdexe.flm	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2stdexe.flm	Mon Dec 07 12:50:33 2009 +0000
@@ -28,7 +28,7 @@
 # Determine what kind of entrypoint option to set
 LINKER_STUB_LIBRARY:=
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/eexe.lib
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Startup $(LINKER_ENTRYPOINT_DECORATION) $(call dblquote,$(STATIC_RUNTIME_DIR)/eexe.lib$(LINKER_ENTRYPOINT_ADORNMENT))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Startup $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/eexe.lib$(LINKER_ENTRYPOINT_ADORNMENT))
 DEFAULT_NEWLIB:=$(DEFAULT_STDCPP_NEWLIB)
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
--- a/sbsv2/raptor/lib/flm/e32abiv2textnotifier2.flm	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2textnotifier2.flm	Mon Dec 07 12:50:33 2009 +0000
@@ -28,7 +28,7 @@
 AUTOEXPORTS:=_Z13NotifierArrayv,1;
 # Determine what kind of entrypoint option to set
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/edll.lib
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Dll $(LINKER_ENTRYPOINT_DECORATION) $(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
 LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
--- a/sbsv2/raptor/lib/flm/e32abiv2var.flm	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2var.flm	Mon Dec 07 12:50:33 2009 +0000
@@ -29,7 +29,7 @@
 
 # Determine what kind of entrypoint option to set
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/evar.lib
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Dll $(LINKER_ENTRYPOINT_DECORATION) $(call dblquote,$(STATIC_RUNTIME_DIR)/evar.lib$(LINKER_ENTRYPOINT_ADORNMENT))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/evar.lib$(LINKER_ENTRYPOINT_ADORNMENT))
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
 LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
--- a/sbsv2/raptor/lib/flm/e32abiv2var2.flm	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2var2.flm	Mon Dec 07 12:50:33 2009 +0000
@@ -29,7 +29,7 @@
 
 # Determine what kind of entrypoint option to set
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/evar.lib
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Dll $(LINKER_ENTRYPOINT_DECORATION) $(call dblquote,$(STATIC_RUNTIME_DIR)/evar.lib$(LINKER_ENTRYPOINT_ADORNMENT))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/evar.lib$(LINKER_ENTRYPOINT_ADORNMENT))
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
 LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
--- a/sbsv2/raptor/lib/flm/e32postlink.mk	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32postlink.mk	Mon Dec 07 12:50:33 2009 +0000
@@ -20,9 +20,11 @@
 #
 #  Metadata supplied (or deduced from)
 #
-#   BYTEPAIRCOMPRESS
+#   ARMFPU
+#   BYTEPAIRCOMPRESSTARGET
 #   CAPABILITY
-#   DEBUGGABLE                     Can be "udeb" or "urel" or "udeb urel" or ""
+#   COMPRESSTARGET                    Not directly referenced, at least with the current approach to compression keywords
+#   DEBUGGABLE                        Can be "udeb" or "urel" or "udeb urel" or ""
 #   E32TARGET
 #   EPOCALLOWDLLDATA
 #   EPOCFIXEDPROCESS
@@ -31,8 +33,8 @@
 #   EPOCPROCESSPRIORITY
 #   EPOCSTACKSIZE
 #   EXPORTUNFROZEN
-#   INFLATECOMPRESS
-#   POSTLINKFPU
+#   INFLATECOMPRESSTARGET
+#   NOCOMPRESSTARGET
 #   POSTLINKTARGETTYPE
 #   SID
 #   SMPSAFE
@@ -44,12 +46,12 @@
 #  Other
 #
 #   ARMLIBS
-#   AUTOEXPORTS                    Symbols that must be assumed to exist for this TARGETTYPE in the format: export,ordinal;export,ordinal;..
-#   CANIGNORENONCALLABLE           If the TARGETTYPE allows it, disregard non-callable exports (v-tables, type information, etc.)
+#   AUTOEXPORTS                       Symbols that must be assumed to exist for this TARGETTYPE in the format: export,ordinal;export,ordinal;..
+#   CANIGNORENONCALLABLE              If the TARGETTYPE allows it, disregard non-callable exports (v-tables, type information, etc.)
 #   CANHAVEEXPORTS
 #   CLEANTARGETS
 #   ELF2E32
-#   EPOCDATALINKADDRESS            Redundant?
+#   EPOCDATALINKADDRESS               Redundant?
 #   EPOCROOT
 #   EXPTARGET
 #   GENERATED_DEFFILE
@@ -58,10 +60,12 @@
 #   IMPORTLIBRARYREQUIRED
 #   INTERMEDIATEPATH
 #   LINKASVERSIONED
-#   LINK_TARGET                    Postlinker elf input
+#   LINK_TARGET                       Postlinker elf input
 #   NAMEDSYMLKUP
 #   PAGEDCODE_OPTION
 #   POSTLINKDEFFILE
+#   POSTLINKER_COMPRESSION_DEFAULT    Default compression when either COMPRESSTARGET or no compression .mmp keyword is used
+#   POSTLINKER_FPU_DEFAULT
 #   POSTLINKER_SUPPORTS_WDP
 #   RUNTIME_LIBS_PATH
 #   SAVESPACE
@@ -93,7 +97,7 @@
 	  --version=$(VERSION) \
 	  --capability=$(FINAL_CAPABILITIES) \
 	  --linkas=$(call dblquote,$(LINKASVERSIONED)) \
-	  --fpu=$(POSTLINKFPU) \
+	  --fpu=$(if $(ARMFPU),$(ARMFPU),$(POSTLINKER_FPU_DEFAULT)) \
 	  --targettype=$(POSTLINKTARGETTYPE) \
 	  --output=$$(call dblquote,$$@) \
 	  --elfinput=$(call dblquote,$(LINK_TARGET)) \
@@ -121,9 +125,10 @@
 	  $(if $(POSTLINKER_SUPPORTS_WDP), \
 	    --codepaging=$(PAGEDCODE_OPTION) --datapaging=$(PAGEDDATA_OPTION), \
 	    $(POSTLINKER_PAGEDOPTION)) \
-	  $(if $(NOCOMPRESSTARGET), \
-	    --uncompressed, \
-	    $(if $(INFLATECOMPRESS),--compressionmethod inflate,$(if $(BYTEPAIRCOMPRESS),--compressionmethod bytepair,))) \
+	  $(if $(NOCOMPRESSTARGET),--uncompressed, \
+	    $(if $(INFLATECOMPRESSTARGET),--compressionmethod=inflate, \
+	      $(if $(BYTEPAIRCOMPRESSTARGET),--compressionmethod=bytepair, \
+	        --compressionmethod=$(POSTLINKER_COMPRESSION_DEFAULT)))) \
 	  --libpath="$(call concat,$(PATHSEP)$(CHAR_SEMIC),$(strip $(RUNTIME_LIBS_PATH) $(STATIC_LIBS_PATH)))" \
 	  $(if $(SAVESPACE),$(if $(EXPORTUNFROZEN),,&& { $(GNURM) -rf $(INTERMEDIATEPATH); true; })) \
 	$(call endrule,postlink)
--- a/sbsv2/raptor/lib/flm/gccxml.flm	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/gccxml.flm	Mon Dec 07 12:50:33 2009 +0000
@@ -92,7 +92,7 @@
 TEMPGXPARCHIVE:=$(VARIANTBLDPATH)/$(TARGET)$(BASE_TYPE).gxp
 GXPARCHIVE:=$(VARIANTRELEASEPATH)/$(TARGET)$(BASE_TYPE).gxp
 
-CLEANTARGETS:=$(CLEANTARGETS) $(MMPXMLFILE) $(SRCXMLFILES) $(DEPFILES) $(TEMPGXPARCHIVE) $(GXPARCHIVE)
+CLEANTARGETS:=$(CLEANTARGETS) $(MMPXMLFILE) $(SRCXMLFILES) $(DEPFILES) $(TEMPGXPARCHIVE)
 RELEASABLES:=$(RELEASABLES) $(GXPARCHIVE)
 
 # Deduce whether we should be performing a build with standard CPP characteristics
@@ -252,6 +252,6 @@
 TARGET:: $(RELEASABLES)
 
 # clean up
-$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS),$(CREATABLEPATHS),))
+$(call raptor_clean,$(CLEANTARGETS))
 $(call makepath, $(CREATABLEPATHS))
 
--- a/sbsv2/raptor/lib/flm/msvctools.flm	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/msvctools.flm	Mon Dec 07 12:50:33 2009 +0000
@@ -28,7 +28,6 @@
 $(call makepath,$(RELEASEPATH))
 $(call makepath,$(BUILDPATH))
 
-CLEANTARGETS:=$(CLEANTARGETS) $(RELEASETARGET)
 RELEASEABLES:=$(RELEASEABLES) $(RELEASETARGET)
 
 GENDEBUGINFO:=$(if $(findstring deb,$(VARIANTTYPE)),1,)
@@ -157,7 +156,6 @@
 
 ifneq ($(INSTALLPATH),)
   INSTALLTARGET:=$(INSTALLPATH)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
-  CLEANTARGETS:=$(CLEANTARGETS) $(INSTALLTARGET)
   RELEASEABLES:=$(RELEASEABLES) $(INSTALLTARGET)
 
   define msvctoolsinstall
@@ -180,7 +178,7 @@
 ifneq ($(GENDEBUGINFO),)
   BSCFILE:=$(RELEASEPATH)/$(TARGET).bsc
   BSCRESPONSEFILE:=$(BUILDPATH)/$(TARGET).brf
-  CLEANTARGETS:=$(CLEANTARGETS) $(BSCFILE) $(BSCRESPONSEFILE)
+  CLEANTARGETS:=$(CLEANTARGETS) $(BSCRESPONSEFILE)
   RELEASEABLES:=$(RELEASEABLES) $(BSCFILE)
 
   define msvctoolsgenbrowse  
@@ -207,6 +205,6 @@
 endif
 
 # clean up
-$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS),,))
-# for the abld -what target
-$(eval $(call whatmacro,$(INSTALLTARGET),WHATTOOLS))
+$(call raptor_clean,$(CLEANTARGETS))
+# for the --what option and the log file
+$(call raptor_release,$(INSTALLTARGET))
--- a/sbsv2/raptor/lib/flm/resource.flm	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/resource.flm	Mon Dec 07 12:50:33 2009 +0000
@@ -101,8 +101,6 @@
 	@if [ ! -f $$@ ]; then echo "DATADIR: /$(RSSBASENAME)" > $$@ ; fi
 	@echo -e "\n/z$(TARGETPATH)/$(TARGET_lower).rsc : $(RSSBASENAME).rpp" >> $$@
 
-CLEANTARGETS:=$$(CLEANTARGETS) $(DESTRPP) $(INFOFILE)
-
 endif
 endef
 
@@ -174,7 +172,6 @@
 
    ifeq ($(TARGET_$(call sanitise,$2)),)
            TARGET_$(call sanitise,$2):=1
-        CLEANTARGETS:=$$(CLEANTARGETS) $2
 
         RESOURCE:: $2
         ## perform additional copies of binaries
@@ -201,7 +198,6 @@
 
         ifeq ($(TARGET_$(call sanitise,$1)),)
                 TARGET_$(call sanitise,$1):=1
-            CLEANTARGETS:=$$(CLEANTARGETS) $(1)
 
             $(if $(FLMDEBUG),$(info generateresource: $(1) from $(2) LANG:$(3)),)
 
@@ -236,7 +232,6 @@
 
         ifeq ($(TARGET_$(call sanitise,$1)),)
                 TARGET_$(call sanitise,$1):=1
-                CLEANTARGETS:= $$(CLEANTARGETS) $(1)
                 $(if $(FLMDEBUG),$(info resourceheader: $(1) from $(2) LANG:$(3)))
 
                 RESOURCE:: $(1)
@@ -282,7 +277,6 @@
 ifneq ($(RFIFILE),)
   RESOURCE:: $(RFIFILE)
   RELEASABLES:=$(RELEASABLES) $(RFIFILE)
-  CLEANTARGETS:=$(CLEANTARGETS) $(RFIFILE)
   CREATABLEPATHS:=$(CREATABLEPATHS) $(dir $(RFIFILE))
 
   RPPFILES:=$(foreach L,$(LANGUAGES:SC=sc),$(INTERBASE)_$(L).rpp)
@@ -291,11 +285,11 @@
 
 
 ## Clean up
-$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS),$(CREATABLEPATHS),))
+$(call raptor_clean,$(CLEANTARGETS))
 # make the output directories while reading makefile - some build engines prefer this
 $(call makepath,$(CREATABLEPATHS))
 
-# for the abld -what target
+# for the --what option and the log file
 RELEASABLES:=$(RELEASABLES) $(DESTRPP) $(INFOFILE)
-$(eval $(call whatmacro,$(RELEASABLES),WHATRESOURCES))
+$(call raptor_release,$(RELEASABLES),RESOURCE)
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/lib/flm/run.mk	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,39 @@
+.PHONY:: ALL
+ALL:: # Default target
+
+HOSTPLATFORM:=win 32
+HOSTPLATFORM_DIR:=win32
+OSTYPE:=cygwin
+FLMHOME:=E:/wip2/lib/flm
+SHELL:=E:/wip2/win32/cygwin/bin/sh.exe
+
+
+USE_TALON:=
+
+
+
+include E:/wip2/lib/flm/globals.mk
+
+# dynamic default targets
+
+# call E:/wip2/lib/flm/config/default.flm
+SBS_SPECIFICATION:=Symbian.config.default
+SBS_CONFIGURATION:=armv5_urel
+
+EPOCROOT:=E:/wip2/test/epocroot
+ELF2E32:=E:/wip2/test/epocroot/epoc32/tools/elf2e32.exe
+WHATLOG:=
+include E:/wip2/lib/flm/config/default.flm
+
+
+component_paths:=$(SBS_HOME)/test/smoke_suite/test_resources/simple/bld.inf|c:/make_test/a.mk \
+$(SBS_HOME)/test/smoke_suite/test_resources/simple_dll/bld.inf|c:/make_test/b.mk \
+$(SBS_HOME)/test/smoke_suite/test_resources/simple/always_build_as_arm_bld.inf|c:/make_test/c.mk \
+$(SBS_HOME)/test/smoke_suite/test_resources/simple/debuggable_bld.inf|c:/make_test/d.mk \
+$(SBS_HOME)/test/smoke_suite/test_resources/simple_export/bld.inf|c:/make_test/e.mk
+
+configs:=armv5 armv7
+
+cli_options:=-d
+
+include build.flm
--- a/sbsv2/raptor/lib/flm/standard.xml	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/standard.xml	Mon Dec 07 12:50:33 2009 +0000
@@ -5,11 +5,12 @@
 		<param name='ALWAYS_BUILD_AS_ARM' default=''/>
 		<param name='SET_ARMINC' default=''/>
 		<param name='ARMLIBS' default=''/>
-		<param name='ARMFPU' default='softvfp'/>
-		<param name='POSTLINKFPU' default='softvfp'/>
+		<param name='ARMFPU' default=''/>
 		<param name='ARMRT' default=''/>
+		<param name='BYTEPAIRCOMPRESSTARGET' default=''/>
 		<param name='TESTPATH' default=''/>
 		<param name='CAPABILITY'/>
+		<param name='COMPRESSTARGET' default=''/>
 		<param name='CPPONLYOPTION' default='-E'/>
 		<param name='LIBRARY'/>
 		<param name='LIBRARY_DEBUG'/>
@@ -20,6 +21,7 @@
 		<param name='EXPORTUNFROZEN' default=''/>
 		<param name='FEEDBACK_OPTION' default='--feedback=' />
 		<param name='FIRSTLIB' default=''/>
+		<param name='INFLATECOMPRESSTARGET' default=''/>
 		<param name='LINKEROPTION_ARMCC' default=''/>
 		<param name='LISTING_OPTION' default='-S'/>
 		<param name='MMPDEFS' default=''/>
@@ -71,7 +73,6 @@
 		<param name='CC.VAL.SOFTVFP_MAYBE_VFPV2' default=''/>
 		<param name='CODE_SEGMENT_START' default=''/>
 		<param name='TOOLCHAIN' default=''/>
-		<param name='TOOLCHAINVERSION' default=''/>
 	</interface>
 	<interface name="Symbian.e32abiv2" extends="Symbian.mmp" flm="e32abiv2.flm">
 		<param name='SUPPORTS_STDCPP_NEWLIB' default='1'/>
@@ -91,8 +92,9 @@
 		<param name='CFLAGS'/>
 		<param name='COMMANDFILE_OPTION'/>
 		<param name='COMPILE_ONLY_OPTION'/>
+		<param name='COMPILER_FPU_DEFAULT'/>
+		<param name='COMPILER_FPU_OPTION'/>
 		<param name='COMPILER_CIA_FLAGS'/>
-		<param name='COMPILER_FPU_FLAGS'/>
 		<param name='COMPILER_INTERWORK_DEFINES'/>
 		<param name='COMPILER_SYSTEM_INCLUDE_OPTION'/>
 		<param name='COMPILER_THUMB_DEFINES'/>
@@ -144,6 +146,8 @@
 		<param name='PERL'/>
 		<param name='PERTURBSTARTTIME'/>
 		<param name='PERTURBMSECS' default='500'/>
+		<param name='POSTLINKER_COMPRESSION_DEFAULT'/>
+		<param name='POSTLINKER_FPU_DEFAULT'/>
 		<param name='PREPDEF'/>
 		<param name='PREINCLUDE'/>
 		<param name='PREINCLUDE_OPTION'/>
@@ -158,6 +162,7 @@
 		<param name='RVCTBIN'/>
 		<param name='RVCTINC'/>
 		<param name='RVCTLIB'/>
+		<param name='RW_BASE'/>
 		<param name='RW_BASE_OPTION'/>
 		<param name='SBSV1MAKE'/>
 		<param name='NMAKE'/>
--- a/sbsv2/raptor/lib/flm/stringtable.flm	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/stringtable.flm	Mon Dec 07 12:50:33 2009 +0000
@@ -33,9 +33,7 @@
 
 EXPORT::
 
-
 CLEANTARGETS:=
-CLEANEXPORTS:=
 RELEASEEXPORTS:=
 CREATABLEPATHS:=$(OUTPUTPATH) $(EXPORTPATH)
 
@@ -60,7 +58,6 @@
 	$(GNUCP) '$(STRINGTABLEHEADER)' '$$@'  \
 	$(call endrule,exportstringtableheader) 
 
-CLEANEXPORTS:=$(EXPORTEDSTRINGTABLEHEADER)
 RELEASEEXPORTS:=$(EXPORTEDSTRINGTABLEHEADER)
 endef
 
@@ -83,24 +80,9 @@
 $(eval $(genstringtable))
 
 
-## Clean up and log releasables (using eval to avoid target specific variables)
-$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS),$(CREATABLEPATHS),))
-$(eval $(call GenerateStandardCleanTarget,$(CLEANEXPORTS),,CLEANEXPORT))
+## Clean up and log releasables
+$(call raptor_clean,$(CLEANTARGETS))
 # make the output directories while reading makefile - some build engines prefer this
 $(call makepath,$(CREATABLEPATHS))
-$(eval $(call whatmacro,$(RELEASEEXPORTS),WHATSTRINGTABLE))
+$(call raptor_release,$(RELEASEEXPORTS),STRINGTABLE)
 
-########################
-# SBSv1 example:
-########################
-# GENERATED_FILES= \
-#         $(EPOCROOT)epoc32\build\generated\http\WspParamConstants.cpp \
-#         $(EPOCROOT)epoc32\include\WspParamConstants.h
-# 
-# $(EPOCROOT)epoc32\build\generated\http\WspParamConstants.cpp : ..\strings\WspParamConstants.st
-#         perl -S ecopyfile.pl ..\strings\WspParamConstants.st $(EPOCROOT)epoc32\build\generated\http\WspParamConstants.st
-#         perl $(EPOCROOT)epoc32\tools\stringtable.pl $(EPOCROOT)epoc32\build\generated\http\WspParamConstants.st
-# 
-# $(EPOCROOT)epoc32\include\WspParamConstants.h : $(EPOCROOT)epoc32\build\generated\http\WspParamConstants.cpp
-#         perl -S ecopyfile.pl $(EPOCROOT)epoc32\build\generated\http\WspParamConstants.h $(EPOCROOT)epoc32\include\WspParamConstants.h
-# 
--- a/sbsv2/raptor/lib/flm/tools2common.flm	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/tools2common.flm	Mon Dec 07 12:50:33 2009 +0000
@@ -99,9 +99,9 @@
 # make the output directories while reading makefile - some build engines prefer this
 $(call makepath,$(CREATABLEPATHS))
 
-## Clean up (using eval to avoid target specific variables)
-$(eval $(call GenerateStandardCleanTarget,$(TARGETS) $(OBJECTFILES),$(CREATABLEPATHS),))
-## WHAT target
-$(eval $(call whatmacro,$(RELEASEABLES),WHATTOOLS2))
+## Clean up
+$(call raptor_clean,$(CLEANTARGETS) $(OBJECTFILES))
+## for the --what option and the log file
+$(call raptor_release,$(RELEASABLES))
 
 ## The End
--- a/sbsv2/raptor/lib/flm/tools2exe.flm	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/tools2exe.flm	Mon Dec 07 12:50:33 2009 +0000
@@ -24,12 +24,13 @@
 
 EXETARGET:=$(RELEASEPATH)/$(TARGET)$(DOTEXE)
 
+INSTALLED:=
 ifneq ($(TOOLSPATH),)
 INSTALLED:=$(TOOLSPATH)/$(TARGET)$(DOTEXE)
 endif
 
 ## Target groups
-RELEASEABLES:=$(INSTALLED)
+RELEASABLES:=$(INSTALLED)
 TARGETS:=$(EXETARGET) $(INSTALLED)
 
 ## Common build steps (compiling and cleaning)
--- a/sbsv2/raptor/lib/flm/tools2lib.flm	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/tools2lib.flm	Mon Dec 07 12:50:33 2009 +0000
@@ -19,7 +19,7 @@
 LIBTARGET:=$(RELEASEPATH)/$(TARGET).a
 
 ## Target groups
-RELEASEABLES:=$(LIBTARGET)
+RELEASABLES:=$(LIBTARGET)
 TARGETS:=$(LIBTARGET)
 
 ## Common build steps (compiling)
--- a/sbsv2/raptor/lib/flm/win32.flm	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/lib/flm/win32.flm	Mon Dec 07 12:50:33 2009 +0000
@@ -243,7 +243,6 @@
 ifeq ($(SUPPORTS_IMPORT_LIBRARY),1)
   ifneq ($(NOEXPORTLIBRARY),1)
     ifneq ($(TARGET_$(call sanitise,$(IMPORTLIBTARGET))),1)
-      CLEANTARGETS:=$(CLEANTARGETS) $(if $(or $(EXPORTUNFROZEN),$(DEFFILE)),$(IMPORTLIBTARGET))
       RELEASABLES:=$(RELEASABLES) $(if $(or $(EXPORTUNFROZEN),$(DEFFILE)),$(IMPORTLIBTARGET))
 
       # import libraries are generated to the UDEB release directory
@@ -290,7 +289,6 @@
     BINTARGETSTATICLINK:=$(BINDIRSTATICLINK)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
   endif
 
-  CLEANTARGETS:=$(CLEANTARGETS) $(BINTARGET) $(BINTARGETSTATICLINK)
   RELEASABLES:=$(RELEASABLES) $(BINTARGET) $(BINTARGETSTATICLINK)
 
   # work on a local source files list
@@ -463,7 +461,6 @@
       # link map file (urel only)
       ifeq ($(VARIANTTYPE),urel)
         MAP:=$(OPT.MAP)$(BINTARGET).map
-        CLEANTARGETS:=$(CLEANTARGETS) $(BINTARGET).map
         RELEASABLES:=$(RELEASABLES) $(BINTARGET).map
       endif
     endif
@@ -677,12 +674,11 @@
   BATCHFILE_CREATED_$(BATCHDIR)$(MODULE)/$(VARIANTPLATFORM).$(TESTPATH):=1
   TARGET_CREATED_$(EPOCROOT)/epoc32/release/$(VARIANTPLATFORM)/$(VARIANTTYPE)/z/test/$(MODULE)/$(VARIANTPLATFORM).$(TESTPATH)_$(TARGET):=1
   RELEASABLES:=$(RELEASABLES) $(EPOCROOT)/epoc32/release/$(VARIANTPLATFORM)/$(VARIANTTYPE)/z/test/$(MODULE)/$(VARIANTPLATFORM).$(TESTPATH)
-  CLEANTARGETS:=$(CLEANTARGETS) $(EPOCROOT)/epoc32/release/$(VARIANTPLATFORM)/$(VARIANTTYPE)/z/test/$(MODULE)/$(VARIANTPLATFORM).$(TESTPATH)
 endif
 
 # clean up
-$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS),$(CREATABLEPATHS),))
+$(call raptor_clean,$(CLEANTARGETS))
 # make the output directories while reading makefile - some build engines prefer this
 $(call makepath,$(CREATABLEPATHS))
-# for the abld -what target
-$(eval $(call whatmacro,$(RELEASABLES),WHATWINSCW))
+# for the --what option and the log file
+$(call raptor_release,$(RELEASABLES))
--- a/sbsv2/raptor/python/filter_interface.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/python/filter_interface.py	Mon Dec 07 12:50:33 2009 +0000
@@ -18,7 +18,7 @@
 
 class Filter(object):
 	
-	def open(self, raptor):
+	def open(self, params):
 		return False
 	
 	def write(self, text):
@@ -32,3 +32,89 @@
 	
 	def formatError(self, message):
 		return "sbs: error: " + message + "\n"
+		
+	def formatWarning(self, message):
+		return "sbs: warning: " + message + "\n"	
+
+import sys
+import xml.sax
+
+class FilterSAX(Filter, xml.sax.handler.ContentHandler, xml.sax.handler.ErrorHandler):
+	"base class for filters using a SAX parser"
+	
+	# define these methods in your subclass
+	
+	def startDocument(self):
+		"called once before any elements are seen"
+		pass
+		
+	def startElement(self, name, attributes):
+		"called on the opening of any element"
+		pass
+	
+	def characters(self, char):
+		"called one or more times with body text from an element"
+		pass
+		
+	def endElement(self, name):
+		"called on the closing of any element"
+		pass
+	
+	def endDocument(self):
+		"called once when all elements are closed"
+		pass
+
+	def error(self, exception):
+		"the parse found an error which is (possibly) recoverable"
+		pass
+		
+	def fatalError(self, exception):
+		"the parser thinks an error occurred which should stop everything"
+		pass
+		
+	def warning(self, exception):
+		"the parser found something to complain about that might not matter"
+		pass
+		
+	# these methods are from the Filter base class
+	
+	def open(self, params):
+		"initialise"
+		
+		self.params = params
+		self.ok = True
+		try:
+			self.parser = xml.sax.make_parser(['xml.sax.expatreader'])
+			self.parser.setContentHandler(self)
+			self.parser.setErrorHandler(self)
+			
+		except Exception, ex:
+			sys.stderr.write(self.formatError(str(ex)))
+			self.ok = False
+		
+		return self.ok
+	
+		
+	def write(self, text):
+		"process some log text"
+		try:
+			self.parser.feed(text)
+		except Exception, ex:
+			sys.stderr.write(self.formatError(str(ex)))
+			self.ok = False
+				
+		return self.ok
+	
+
+	def close(self):
+		"finish off"
+		try:
+			self.parser.close()
+		except Exception, ex:
+			sys.stderr.write(self.formatError(str(ex)))
+			self.ok = False
+			
+		return self.ok
+	
+
+# the end
--- a/sbsv2/raptor/python/filter_utils.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/python/filter_utils.py	Mon Dec 07 12:50:33 2009 +0000
@@ -198,12 +198,16 @@
 	def isError(self, aLine):
 		"""Convenience matcher for basic errors.
 		Override in sub-classes to specialise."""
-		return True if Recipe.error.match(aLine) else False
+		if Recipe.error.match(aLine):
+			return True
+		return False
 	
 	def isWarning(self, aLine):
 		"""Convenience matcher for basic warnings.
 		Override in sub-classes to specialise."""
-		return True if Recipe.warning.match(aLine) else False
+		if Recipe.warning.match(aLine):
+			return True
+		return False
 	
 	def getOutput(self):
 		""""Return a list of all output that isn't an error or a warning.
@@ -234,16 +238,17 @@
 	
 	def isSuccess(self):
 		"Convenience method to get overall recipe status."
-		return True if self.getDetail(Recipe.exit) == "ok" else False
+		return (self.getDetail(Recipe.exit) == "ok")
 	
 	
 class Win32Recipe(Recipe):
 	"Win32 tailored recipe class."
 	def isError(self, aLine):
-		return True if mwError.match(aLine) else False
+		if mwError.match(aLine):
+			return True
+		return False
 	
 	def isWarning(self, aLine):
-		return True if mwWarning.match(aLine) else False
-
-
-	
+		if mwWarning.match(aLine):
+			return True
+		return False
--- a/sbsv2/raptor/python/mmpparser.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/python/mmpparser.py	Mon Dec 07 12:50:33 2009 +0000
@@ -71,6 +71,7 @@
 		self.assignment = \
 			( \
 			Line(CaselessKeyword('ARMFPU') + String()) ^ \
+			Line(CaselessKeyword('APPLY') + String()) ^ \
 			Line(CaselessKeyword('ASSPLIBRARY') + StringList()) ^ \
 			Line(CaselessKeyword('CAPABILITY') + StringList()) ^ \
 			Line(CaselessKeyword('DOCUMENT') + StringList()) ^ \
--- a/sbsv2/raptor/python/plugins/filter_carbide.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/python/plugins/filter_carbide.py	Mon Dec 07 12:50:33 2009 +0000
@@ -129,5 +129,4 @@
 		FilterCarbide.stdout.write("Overall Errors: %d\n" % self.__errors)
 		FilterCarbide.stdout.write("Overall Warnings: %d\n\n" % self.__warnings)
 
-		return True if self.__errors == 0 else False
-
+		return (self.__errors == 0)
--- a/sbsv2/raptor/python/plugins/filter_checksource.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/python/plugins/filter_checksource.py	Mon Dec 07 12:50:33 2009 +0000
@@ -224,11 +224,11 @@
 				
 				# Do the check for each file 	
 				for dep in deplistnodups:
-					dep = os.path.normpath(dep).replace('\\', '/')
+					dep = os.path.abspath(dep).replace('\\', '/')
 					self.checksource(dep)
 					
 			except Exception, e:
-				sys.stderr.write("sbs: could not access temporary file for FilterClean\n")
+				sys.stderr.write("sbs: FilterCheckSource failed: %s\n" % str(e))
 				
 			if self.errors == 0:
 				sys.stdout.write("No checksource errors found\n")
@@ -263,7 +263,7 @@
 		def checkcase(self, path):
 			"""Checks the path matches the file system"""
 			
-			path = os.path.normpath(path)
+			path = os.path.abspath(path)
 			path = path.replace('\\', '/')
 			
 			if not os.path.exists(path):
@@ -277,7 +277,7 @@
 			
 			for part in parts:
 				if not self.checkkeyignorecase(cacheItem, part):
-				
+
 					dirItems = os.listdir(dirBeingChecked)
 					
 					found = False
--- a/sbsv2/raptor/python/plugins/filter_clean.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/python/plugins/filter_clean.py	Mon Dec 07 12:50:33 2009 +0000
@@ -51,17 +51,23 @@
 		
 			if self.removeTargets:
 				if line.startswith("<file>"):
-					self.doFile(line)
-				elif line.startswith("<dir>"):
-					self.doDirectory(line)
+					self.doFile(line, "file")
+				elif line.startswith("<build>"):
+					self.doFile(line, "build")
+				elif line.startswith("<resource>"):
+					self.doFile(line, "resource")
+				elif line.startswith("<bitmap>"):
+					self.doFile(line, "bitmap")
+				elif line.startswith("<stringtable>"):
+					self.doFile(line, "stringtable")
 						
 			if self.removeExports:
 				if line.startswith("<export "):
 					self.doExport(line)
 				elif line.startswith("<member>"):
-					self.doMember(line)
+					self.doFile(line, "member")
 				elif line.startswith("<zipmarker>"):
-					self.doZipMarker(line)
+					self.doFile(line, "zipmarker")
 				
 		return self.ok
 	
@@ -81,13 +87,14 @@
 				
 				if os.path.isfile(path):
 					self.removeFile(path)
-					
-				elif os.path.isdir(path):
-					dirs.add(path)
+				
+				directory = os.path.dirname(path)
+				if os.path.isdir(directory):
+					dirs.add(directory)
 					
 			self.tmp.close()	# this also deletes the temporary file
-		except:
-			sys.stderr.write("sbs: could not access temporary file for FilterClean\n")
+		except Exception,e:
+			sys.stderr.write("sbs: problem reading temporary file for FilterClean: %s\n" % str(e))
 			self.ok = False
 		
 		# finally remove (empty) directories
@@ -123,47 +130,20 @@
 			self.ok = False
 	
 			
-	def doFile(self, line):
-		"remove filenames in <file> tags immediately (not .d or .dep)."
-		filename = line[6:-7]                # line is "<file>filename</file>
-		filename = filename.strip("\"\'")    # some names are quoted
+	def doFile(self, line, tagname):
+		"deal with <tagname>X</tagname>"
 		
-		# dependency files must be deleted at the end,
-		# everything else can be deleted straight away.
-		if filename.endswith(".d") or filename.endswith(".dep"):
-			self.saveItem(filename)
-		else:
-			if os.path.isfile(filename):
-				self.removeFile(filename)
-
+		first = len(tagname) + 2	# line is "<tagname>filename</tagname>
+		last = -(first + 1)
+		filename = line[first:last]                
+		filename = filename.strip("\"\'")    # some names are quoted
+		self.saveItem(filename)
+				
 
-	def doDirectory(self, line):
-		"save directories in <dir> tags for the end."
-		# assuming <dir>X</dir>
-		dirname = line[5:-6]
-		self.saveItem(dirname.strip("\"\'"))
-		
-		
 	def doExport(self, line):
-		"save exported files in <export> tags for the end."
-		# assuming <export destination='X' source='Y' />
+		"deal with <export destination='X' source='Y'/>"
 		filename = line[21:line.find("'", 21)]
 		self.saveItem(filename)
-		
-		
-	def doMember(self, line):
-		"save zip exports in <member> tags for the end."
-		# assuming <member>X</member>
-		filename = line[8:-9]
-		self.saveItem(filename)
-		
-		
-	def doZipMarker(self, line):
-		"Remove file in <zipmarker> tags"
-		# assuming <zipmarker>X</zipmarker>
-		filename = line[11:-12]
-		if os.path.isfile(filename):
-			self.removeFile(filename)
 
 
 # the end				
--- a/sbsv2/raptor/python/plugins/filter_logfile.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/python/plugins/filter_logfile.py	Mon Dec 07 12:50:33 2009 +0000
@@ -16,6 +16,7 @@
 # Will ultimately do everything that scanlog does
 #
 
+import errno
 import os
 import sys
 import raptor
@@ -38,7 +39,7 @@
 				if dirname and not os.path.isdir(dirname):
 					os.makedirs(dirname)
 			except os.error, e:
-				if e.errno != os.errno.EEXIST:
+				if e.errno != errno.EEXIST:
 					sys.stderr.write("%s : error: cannot create directory %s\n" % \
 						(str(raptor.name), dirname))
 					return False
--- a/sbsv2/raptor/python/plugins/filter_splitlog.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/python/plugins/filter_splitlog.py	Mon Dec 07 12:50:33 2009 +0000
@@ -16,6 +16,7 @@
 # Will ultimately do everything that scanlog does
 #
 
+import errno
 import os
 import sys
 import raptor
@@ -38,7 +39,7 @@
 				if dirname and not os.path.isdir(dirname):
 					os.makedirs(dirname)
 			except os.error, e:
-				if e.errno != os.errno.EEXIST:
+				if e.errno != errno.EEXIST:
 					sys.stderr.write("%s : error: cannot create directory " +
 							"%s\n" % (raptor.name, dirname))
 					return False
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/python/plugins/filter_tagcount.py	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,74 @@
+#
+# Copyright (c) 2008-2009 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"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# Example of a Filter class using the SAX parser base class
+#
+
+import filter_interface
+
+class FilterTagCounter(filter_interface.FilterSAX):
+	
+	def startDocument(self):
+		# for each element name count the number of occurences
+		# and the amount of body text contained.
+		self.names = []
+		self.count = {}
+		self.errors = 0
+		self.fatals = 0
+		self.warns = 0
+		
+	def startElement(self, name, attributes):
+		if name == "buildlog":
+			# print out the attributes of the "top" element
+			print "version:"
+			for a,v in attributes.items():
+				print a, "=", v
+		
+		# push name onto the stack of names and increment the count
+		self.names.append(name)
+		if name in self.count:
+			self.count[name][0] += 1
+		else:
+			self.count[name] = [1, 0]    # occurs, characters	
+	
+	def characters(self, char):
+		# these are for the current element
+		current = self.names[-1]
+		self.count[current][1] += len(char)
+		
+	def endElement(self, name):
+		# pop the name off the stack
+		self.names.pop()
+	
+	def endDocument(self):
+		# report
+		print "\nsummary:"
+		for name,nos in sorted(self.count.items()):
+			print name, nos[0], nos[1]
+			
+		print "\nparsing:"
+		print "errors =", self.errors
+		print "fatals =", self.fatals
+		print "warnings =", self.warns
+	
+	def error(self, exception):
+		self.errors += 1
+		
+	def fatalError(self, exception):
+		self.fatals += 1
+		
+	def warning(self, exception):
+		self.warns += 1
+	
+# the end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/python/plugins/filter_timing.py	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,121 @@
+#
+# Copyright (c) 2009 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"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# Base Class for defining filter classes
+# All filter classes that get defined should derive from this base class
+#
+
+import errno
+import filter_interface
+import os
+import raptor
+import raptor_timing
+import sys
+
+class FilterTiming(filter_interface.Filter):
+	"""
+		Writes a logfile containing the timings for each Raptor process
+	"""
+	
+	def open(self, raptor_instance):
+		"""
+			Open a log file with the same name as the Raptor log file, with
+					'.timings' appended. This will contain only 'progress'
+					timing tags from the Raptor output
+			Parameters:
+				raptor_instance - Raptor
+					Instance of Raptor. FilterList usually passes in a cut-down
+							version of Raptor containing only a few attributes
+		"""
+		self.raptor = raptor_instance
+		self.logFileName = self.raptor.logFileName
+		# insert the time into the log file name
+		if self.logFileName:
+			self.path = (self.logFileName.path.replace("%TIME",
+					self.raptor.timestring) + ".timings")
+	
+			try:
+				dirname = str(self.raptor.logFileName.Dir())
+				if dirname and not os.path.isdir(dirname):
+					os.makedirs(dirname)
+			except os.error, e:
+				if e.errno != errno.EEXIST:
+					sys.stderr.write("%s : error: cannot create directory " +
+							"%s\n" % (raptor.name, dirname))
+					return False
+			try:
+				self.out = open(str(self.path), "w")
+			except:
+				self.out = None
+				sys.stderr.write("%s : error: cannot write log %s\n" %\
+					(raptor.name, self.path))
+				return False
+		self.start_times = {}
+		self.all_durations = []
+		self.namespace_written = False
+		self.open_written = False
+		return True
+				
+				
+	def write(self, text):
+		"""
+			Write out any tags with a 'progress_' tagName
+		"""
+		if "<progress:discovery " in text:
+			self.out.write(text)
+		elif "<progress:start " in text:
+			attributes = raptor_timing.Timing.extract_values(source = text)
+			self.start_times[(attributes["object_type"] + attributes["task"] +
+					attributes["key"])] = attributes["time"]
+		elif "<progress:end " in text:
+			attributes = raptor_timing.Timing.extract_values(source = text)
+			duration = (float(attributes["time"]) -
+					float(self.start_times[(attributes["object_type"] +
+					attributes["task"] + attributes["key"])]))
+			self.out.write(raptor_timing.Timing.custom_string(tag = "duration",
+					object_type = attributes["object_type"],
+					task = attributes["task"], key = attributes["key"],
+					time = duration))
+			self.all_durations.append(duration)
+		elif text.startswith("<?xml ") and not self.namespace_written:
+			self.out.write(text)
+			self.namespace_written = True
+		elif text.startswith("<buildlog ") and not self.open_written:
+			self.out.write(text)
+			self.open_written = True
+		return True	
+
+			
+	def summary(self):
+		"""
+			Print out extra timing info
+		"""
+		total_time = 0.0
+		for duration in self.all_durations:
+			total_time += duration
+		self.out.write(raptor_timing.Timing.custom_string(tag = "duration",
+				object_type = "all", task = "all", key = "all",
+				time = total_time) + "</buildlog>\n")
+	
+	
+	def close(self):
+		"""
+			Close the logfile
+		"""
+		try:
+			self.out.close
+			return True
+		except:
+			self.out = None
+		return False
--- a/sbsv2/raptor/python/plugins/filter_what.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/python/plugins/filter_what.py	Mon Dec 07 12:50:33 2009 +0000
@@ -41,6 +41,8 @@
 		else:
 			self.outfile.write(filename+"\n")
 
+		self.prints += 1
+		
 
 	def open(self, build_parameters):
 		"initialise"
@@ -78,6 +80,7 @@
 		"Regex for zip exports"
 		self.zip_export_regex = re.compile("^<member>.*")
 		
+		self.prints = 0
 		self.ok = True		
 		return self.ok
 	
@@ -87,6 +90,17 @@
 		for line in text.splitlines():
 			line = line.rstrip()
 			
+			# we are normally the ONLY filter running so we have to pass on
+			# any errors and warnings that emerge
+			#
+			if line.startswith("<error"):
+				sys.stderr.write(self.formatError(line))
+				self.ok = False
+				continue
+			if line.startswith("<warning"):
+				sys.stderr.write(self.formatWarning(line))
+				continue
+				
 			if not line in self.repetitions:
 				self.repetitions[line] = 0
 				
@@ -120,6 +134,17 @@
 				
 		return self.ok
 	
+	def summary(self):
+		if self.prints == 0:
+			if self.what:
+				message = "no WHAT information found"
+			else:
+				message = "no CHECK information found"
+				
+			sys.stderr.write(self.formatError(message))
+			self.ok = False
+		return self.ok
+		
 	def close(self):
 		if self.outfile_close:
 			self.outfile.close()
--- a/sbsv2/raptor/python/raptor.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/python/raptor.py	Mon Dec 07 12:50:33 2009 +0000
@@ -32,7 +32,9 @@
 import raptor_cli
 import raptor_data
 import raptor_make
+import raptor_makefile
 import raptor_meta
+import raptor_timing
 import raptor_utilities
 import raptor_version
 import raptor_xml
@@ -54,8 +56,9 @@
 hostplatform_dir = os.environ["HOSTPLATFORM_DIR"]
 
 # defaults can use EPOCROOT
+
 if "EPOCROOT" in os.environ:
-	epocroot = os.environ["EPOCROOT"].replace("\\","/")
+        epocroot = os.environ["EPOCROOT"].replace("\\","/")
 else:
 	if 'linux' in hostplatform:
 		epocroot=os.environ['HOME'] + os.sep + "epocroot"
@@ -70,7 +73,6 @@
 	sbs_build_dir = (epocroot + "/epoc32/build").replace("//","/")
 
 
-
 # only use default XML from the epoc32 tree if it exists
 defaultSystemConfig = "lib/config"
 epoc32UserConfigDir = generic_path.Join(epocroot, "epoc32/sbs_config")
@@ -105,75 +107,74 @@
 		}
 
 
-class ComponentGroup(object):
-	""" 	Some components that should be built togther 
-		e.g. a Layer in the system definition. 
-	""" 
-	def __init__(self, name, componentlist=[]):
-		self.components = componentlist
-		self.name = name
+
+class ModelNode(object):
+	""" Represents any node in a a tree of build information
+	    e.g. a tree of bld.infs, mmps and finally things like resource blocks and string table blocks.
+	    This is before they are produced into "build" specs.
+	"""
+
+	def __init__(self, id, parent = None):
+		self.id = id
+		self.type = type
+		self.specs = []
+		self.deps = []
+		self.children = set() 
+		self.unfurled = False
+		self.parent = parent
+
+	# Allow one to make a set
+	def __hash__(self):
+		return hash(self.id)
+
+	def __cmp__(self,other):
+		return cmp(self.id, other)
 
 	def __iter__(self):
-		return iter(self.components)
+		return iter(self.children)
 
 	def __getitem__(self,x):
 		if isinstance(x, slice):
-			return self.components[x.start:x.stop]
-		return self.components[x]
+			return self.children[x.start:x.stop]
+		return self.children[x]
 
 	def __setitem__(self,k, v):
-		self.components[k] = v
+		self.children[k] = v
 
 	def __len__(self):
-		return len(self.components)
+		return len(self.children)
 
-	def extend(self, c):
-		self.components.extend(c)
-	
-	def append(self, c):
-		self.components.append(c)
+	def add(self, item):
+		return self.children.add(item)
+
+	def isunfurled(self, c):
+		return self.unfurled == False
 
-	def GenerateSpecs(self, genericspecs, configs):
-		"""Return a build spec hierarchy for a ComponentGroup. This involves parsing the component MetaData (bld.infs, mmps). 
-		Takes a raptor object as a parameter (build), together with a list of Configurations.
+	def unfurl(self, build):
+		"""Find any children of this node by processing it, produces specs"""
+		pass
 
-		Returns a tuple consisting of a list of specification objects and a list of dependency files
-		that relate to these specs.
-		"""
-
-		self.specs = []
-		self.specs.extend(genericspecs)
-		self.configs = configs
-		self.dependencies = set()
+	def unfurl_all(self, build):
+		"""Unfurl self and all children - preparatory e.g for realisation"""
+		if not self.unfurled:
+			self.unfurl(build)
 
-		metaReader = None
-		if len (self.components):
-			try:
-				# create a MetaReader that is aware of the list of
-				# configurations that we are trying to build.
-				metaReader = raptor_meta.MetaReader(build, configs)
+		self.realise_exports(build) # permit communication of dependencies between children
 
-				# convert the list of bld.inf files into a specification
-				# hierarchy suitable for all the configurations we are using.
-				self.specs.extend(metaReader.ReadBldInfFiles(self.components,build.doExportOnly))
-
-			except raptor_meta.MetaDataError, e:
-				log.Error(e.Text)
+		for c in self.children:
+			c.unfurl_all(build)
+		
 
-		log.Info("Buildable specification group '%s'", name)
-		build.AttachSpecs(self.specs)
-
-		# Get a unique list of the dependency files that were created
-		if metaReader:
-			for c in metaReader.BuildPlatforms:
-				self.dependencies.update(c["METADEPS"])
-
-
-	def CreateMakefile(self, makefilename_base, engine, named = False):
-		if len(self.specs) <= 0:
-			return None
-
-		if named:
+	def realise_exports(self, build):
+		"""Do the things that are needed such that we can fully unfurl all 
+		   sibling nodes.  i.e. this step is here to "take care" of the dependencies
+		   between siblings.  
+		"""
+		pass
+	
+	def realise_makefile(self, build, specs):
+		makefilename_base = build.topMakefile
+		if self.name is not None:
 			makefile = generic_path.Path(str(makefilename_base) + "_" + raptor_utilities.sanitise(self.name))
 		else:
 			makefile = generic_path.Path(str(makefilename_base))
@@ -181,15 +182,131 @@
 		# insert the start time into the Makefile name?
 		makefile.path = makefile.path.replace("%TIME", build.timestring)
 
-		engine.Write(makefile, self.specs, self.configs)
+		build.InfoDiscovery(object_type = "layers", count = 1)
+		build.InfoStartTime(object_type = "layer", task = "parse",
+				key = str(makefile.path))
+		makefileset = build.maker.Write(makefile, specs, build.buildUnitsToBuild)
+		build.InfoEndTime(object_type = "layer", task = "parse",
+				key = str(makefile.path))
+
+		return makefileset
+		
+
 
-		return makefile
+	def realise(self, build):
+		"""Give the spec trees to the make engine and actually 
+		"build" the product represented by this model node"""	
+		# Must ensure that all children are unfurled at this point
+		self.unfurl_all(build)
+
+		sp = self.specs	
+
+		build.AssertBuildOK()
+
+		m = self.realise_makefile(build, sp)
+
+		build.InfoStartTime(object_type = "layer", task = "build",
+				key = (str(m.directory) + "/" + str(m.filenamebase)))
+		result = build.Make(m)
+		build.InfoEndTime(object_type = "layer", task = "build",
+				key = (str(m.directory) + "/" + str(m.filenamebase)))
+		
+		
+		return result
+
 
 
-	def GenerateMetadataSpecs(self, configs):
+class Project(ModelNode):
+	"""A project or, in symbian-speak, an MMP
+	"""
+	def __init__(self, filename, parent = None):
+		super(Project,self).__init__(filename, parent = parent)
+		# Assume that components are specified in mmp files for now
+		# One day that tyranny might end.
+		self.mmp_name = str(generic_path.Path.Absolute(filename))
+		self.id = self.mmp_name
+		self.unfurled = False
+
+	def makefile(self, makefilename_base, engine, named = False):
+		"""Makefiles for individual mmps not feasible at the moment"""
+		pass # Cannot, currently, "unfurl an mmp" directly but do want 
+		     # to be able to simulate the overall recursive unfurling of a build.
+
+class Component(ModelNode):
+	"""A group of projects or, in symbian-speak, a bld.inf.
+	"""
+	def __init__(self, filename):
+		super(Component,self).__init__(filename)
+		# Assume that components are specified in bld.inf files for now
+		# One day that tyranny might end.
+		self.bldinf = None # Slot for a bldinf object if we spot one later
+		self.bldinf_filename = generic_path.Path.Absolute(filename)
+
+		self.id = str(self.bldinf_filename)
+		self.exportspecs = []
+		self.depfiles = []
+		self.unfurled = False # We can parse this
+
+	def AddMMP(self, filename):
+		self.children.add(Project(filename))
+
+
+class Layer(ModelNode):
+	""" 	Some components that should be built togther 
+		e.g. a Layer in the system definition. 
+	""" 
+	def __init__(self, name, componentlist=[]):
+		super(Layer,self).__init__(name)
+		self.name = name
+
+		for c in componentlist:
+			self.children.add(Component(c))
+
+	def unfurl(self, build):
+		"""Discover the children of this layer. This involves parsing the component MetaData (bld.infs, mmps). 
+		Takes a raptor object as a parameter (build), together with a list of Configurations.
+
+		We currently have parsers that work on collections of components/bld.infs and that cannot
+		parse at a "finer" level.  So one can't 'unfurl' an mmp at the moment.  
+
+		Returns True if the object was successfully unfurled.
+		"""
+
+		# setup all our components
+		for c in self.children:
+			c.specs = []
+
+		self.configs = build.buildUnitsToBuild
+
+
+		metaReader = None
+		if len (self.children):
+			try:
+				# create a MetaReader that is aware of the list of
+				# configurations that we are trying to build.
+				metaReader = raptor_meta.MetaReader(build, build.buildUnitsToBuild)
+
+				# convert the list of bld.inf files into a specification
+				# hierarchy suitable for all the configurations we are using.
+				self.specs = list(build.generic_specs)
+				self.specs.extend(metaReader.ReadBldInfFiles(self.children, doexport = build.doExport, dobuild = not build.doExportOnly))
+
+			except raptor_meta.MetaDataError, e:
+				build.Error(e.Text)
+
+		self.unfurled = True
+
+
+	def meta_realise(self, build):
+		"""Generate specs that can be used to "take care of" finding out more
+		about this metaunit - i.e. one doesn't want to parse it immediately
+		but to create a makefile that will parse it. 
+		In this case it allows bld.infs to be parsed in parallel by make."""
+
 		# insert the start time into the Makefile name?
 
-		self.configs = build.GetConfig("build").GenerateBuildUnits()
+		buildconfig = build.GetConfig("build").GenerateBuildUnits(build.cache)
+		self.configs = build.buildUnitsToBuild
 
 		# Pass certain CLI flags through to the makefile-generating sbs calls
 		cli_options = ""
@@ -205,29 +322,43 @@
 			
 		if build.quiet == True:
 			cli_options += " -q"
+			
+		if build.timing == True:
+			cli_options += " --timing"
 
 		
-		nc = len(self.components)
-		number_blocks = 16
+		nc = len(self.children)
+		number_blocks = build.jobs
 		block_size = (nc / number_blocks) + 1
 		component_blocks = []
 		spec_nodes = []
 		
 		b = 0
+		childlist = list(self.children)
 		while b < nc:
-			component_blocks.append(self.components[b:b+block_size])
+			component_blocks.append(childlist[b:b+block_size])
 			b += block_size
 			
-		if len(component_blocks[-1]) <= 0:
+		while len(component_blocks[-1]) <= 0:
 			component_blocks.pop()
-		
+			number_blocks -= 1
+	
+		build.Info("Parallel Parsing: bld.infs split into %d blocks\n", number_blocks)
+		# Cause the binding makefiles to have the toplevel makefile's 
+		# name.  The bindee's have __pp appended.	
+		tm = build.topMakefile.Absolute()
+		binding_makefiles = raptor_makefile.MakefileSet(str(tm.Dir()), build.maker.selectors, makefiles=None, filenamebase=str(tm.File()))		
+		build.topMakefile = generic_path.Path(str(build.topMakefile) + "_pp")
+
 		loop_number = 0
 		for block in component_blocks:
 			loop_number += 1
 			specNode = raptor_data.Specification("metadata_" + self.name)
 
-			componentList = " ".join([str(c) for c in block])
-			configList = " ".join([c.name for c in configs])
+			componentList = " ".join([str(c.bldinf_filename) for c in block])
+
+			
+			configList = " ".join([c.name for c in self.configs if c.name != "build" ])
 			
 			makefile_path = str(build.topMakefile) + "_" + str(loop_number)
 			try:
@@ -242,13 +373,19 @@
 			var.AddOperation(raptor_data.Set("MAKEFILE_PATH", makefile_path))
 			var.AddOperation(raptor_data.Set("CONFIGS", configList))
 			var.AddOperation(raptor_data.Set("CLI_OPTIONS", cli_options))
+
+
+			# Allow the flm to skip exports. Note: this parameter
+			doexport_str = '1'
+			if not build.doExport:
+				doexport_str = ''
+			var.AddOperation(raptor_data.Set("DOEXPORT", doexport_str ))
+
 			# Pass on '-n' (if specified) to the makefile-generating sbs calls
 			if build.noBuild:
 				var.AddOperation(raptor_data.Set("NO_BUILD", "1"))
 			specNode.AddVariant(var)
 	
-	
-	
 			try:
 				interface = build.cache.FindNamedInterface("build.makefiles")
 				specNode.SetInterface(interface)
@@ -256,15 +393,30 @@
 				build.Error("Can't find flm interface 'build.makefiles' ")
 				
 			spec_nodes.append(specNode)
-			
-			
+			binding_makefiles.addInclude(str(makefile_path)+"_all")
+
+		build.InfoDiscovery(object_type = "layers", count = 1)
+		build.InfoStartTime(object_type = "layer", task = "parse",
+				key = str(build.topMakefile))
+		m = self.realise_makefile(build, spec_nodes)
+		m.close()
+		gen_result = build.Make(m)
 
-		## possibly some error handling here?
-
-		self.specs = spec_nodes
+		build.InfoEndTime(object_type = "layer", task = "parse",
+				key = str(build.topMakefile))
+		build.InfoStartTime(object_type = "layer", task = "build",
+				key = str(build.topMakefile))
+		build.Debug("Binding Makefile base name is %s ", binding_makefiles.filenamebase)
+		binding_makefiles.close()
+		b = build.Make(binding_makefiles)
+		build.InfoEndTime(object_type = "layer", task = "build",
+				key = str(build.topMakefile))
+		return b
 
 
-class BuildCompleteException(Exception):
+
+
+class BuildCannotProgressException(Exception):
 	pass
 
 # raptor module classes
@@ -326,8 +478,8 @@
 		# things to initialise
 		self.args = []
 
-		self.componentGroups = []
-		self.orderComponentGroups = False
+		self.layers = []
+		self.orderLayers = False
 		self.commandlineComponents = []
 
 		self.systemModel = None
@@ -343,6 +495,7 @@
 		self.maker = None
 		self.debugOutput = False
 		self.doExportOnly = False
+		self.doExport = True
 		self.noBuild = False
 		self.noDependInclude = False
 		self.projects = set()
@@ -360,6 +513,7 @@
 		# what platform and filesystem are we running on?
 		self.filesystem = raptor_utilities.getOSFileSystem()
 
+		self.timing = False
 		self.toolset = None
 
 		self.starttime = time.time()
@@ -374,6 +528,9 @@
 		return True
 
 	def AddConfigName(self, name):
+		if name == "build":
+			traceback.print_stack((sys.stdout))
+			sys.exit(1)
 		self.configNames.append(name)
 		return True
 
@@ -439,6 +596,16 @@
 
 	def SetExportOnly(self, TrueOrFalse):
 		self.doExportOnly = TrueOrFalse
+		if not self.doExport:
+			self.Error("The --noexport and --export-only options are incompatible - won't to do anything useful")
+			return False
+		return True
+
+	def SetNoExport(self, TrueOrFalse):
+		self.doExport = not TrueOrFalse
+		if self.doExportOnly:
+			self.Error("The --noexport and --export-only options are incompatible - won't to do anything useful")
+			return False
 		return True
 
 	def SetNoBuild(self, TrueOrFalse):
@@ -502,11 +669,17 @@
 			return False
 
 		return True
+	
+	def SetTiming(self, TrueOrFalse):
+		self.timing = TrueOrFalse
+		return True
 
 	def SetParallelParsing(self, type):
 		type = type.lower()
 		if type == "on":
 			self.doParallelParsing = True
+		elif type == "slave":
+			self.isParallelParsingSlave = True
 		elif type == "off":
 			self.doParallelParsing = False
 		else:
@@ -529,7 +702,7 @@
 
 	def PrintVersion(self,dummy):
 		global name
-		print name, "version", raptor_version.Version()
+		print name, "version", raptor_version.fullversion()
 		self.mission = Raptor.M_VERSION
 		return False
 
@@ -538,7 +711,7 @@
 	def Introduction(self):
 		"""Print a header of useful information about Raptor"""
 
-		self.Info("%s: version %s\n", name, raptor_version.Version())
+		self.Info("%s: version %s\n", name, raptor_version.fullversion())
 
 		self.Info("%s %s", env, str(self.home))
 		self.Info("Set-up %s", str(self.raptorXML))
@@ -547,7 +720,7 @@
 		
 		# the inherited environment
 		for e, value in os.environ.items():
-			self.Info("Environment %s=%s", e, value)
+			self.Info("Environment %s=%s", e, value.replace("]]>", "]]&gt;"))
 
 		# and some general debug stuff
 		self.Debug("Platform %s", "-".join(hostplatform))
@@ -704,9 +877,11 @@
 
 
 		for c in set(configNames):
+			self.Debug("BuildUnit: %s", c)
 			try:		
 				x = self.GetConfig(c)
-				buildUnitsToBuild.update( x.GenerateBuildUnits() )
+				gb = x.GenerateBuildUnits(self.cache) 
+				buildUnitsToBuild.update( gb )
 			except Exception, e:
 				self.FatalError(str(e))
 
@@ -770,13 +945,13 @@
 				systemModel.DumpLayerInfo(layer)
 
 				if systemModel.IsLayerBuildable(layer):
-					layersToBuild.append(ComponentGroup(layer,
+					layersToBuild.append(Layer(layer,
 							systemModel.GetLayerComponents(layer)))
 
 		return layersToBuild
 
 
-	# Add bld.inf or system definition xml to command line componentGroups (depending on preference)
+	# Add bld.inf or system definition xml to command line layers (depending on preference)
 	def FindSysDefIn(self, aDir = None):
 		# Find a system definition file
 
@@ -808,15 +983,6 @@
 
 		return None
 
-	def AttachSpecs(self, groups):
-		# tell the specs which Raptor object they work for (so that they can
-		# access the cache and issue warnings and errors)
-		for spec in groups:
-			spec.SetOwner(self)
-			self.Info("Buildable specification '%s'", spec.name)
-			if self.debugOutput:
-				spec.DebugPrint()
-
 	def GenerateGenericSpecs(self, configsToBuild):
 		# if a Configuration has any config-wide interfaces
 		# then add a Specification node to call each of them.
@@ -832,7 +998,7 @@
 					filter.AddConfigCondition(c.name)
 				else:
 					# create a new node
-					filter = raptor_data.Filter("config_wide")
+					filter = raptor_data.Filter(name = "config_wide")
 					filter.AddConfigCondition(c.name)
 					for i in iface.split():
 						spec = raptor_data.Specification(i)
@@ -842,50 +1008,25 @@
 					configWide[iface] = filter
 					genericSpecs.append(filter)
 
-		self.AttachSpecs(genericSpecs)
-
 		return genericSpecs
 
 
-	def WriteMetadataDepsMakefile(self, component_group):
-		""" Takes a list of (filename, target) tuples that indicate where """
-		# Create a Makefile that includes all the dependency information for this spec group
-		build_metamakefile_name = \
-				os.path.abspath(sbs_build_dir).replace('\\','/').rstrip('/') + \
-				'/metadata_%s.mk' % component_group.name.lower()
-		bmkmf = open(build_metamakefile_name, "w+")
-		bmkmf.write("# Build Metamakefile - Dependencies for metadata during the 'previous' build\n\n")
-		bmkmf.write("PARSETARGET:=%s\n" % build_metamakefile_name)
-		bmkmf.write("%s:  \n" % build_metamakefile_name)
-		bmkmf.write("\t@echo -e \"\\nRE-RUNNING SBS with previous parameters\"\n")
-		bmkmf.write("\t@echo pretend-sbs %s\n" % " ".join(self.args))
-		try:
-			for m in component_group.dependencies:
-				filename, target = m
-				bmkmf.write("-include %s\n\n" % filename)
-		finally:
-			bmkmf.close()
-
-		return build_metamakefile_name
-
-
 	def GetEvaluator(self, specification, configuration, gathertools=False):
 		""" this will perform some caching later """
-		return raptor_data.Evaluator(self, specification, configuration, gathertools=gathertools)
-
-
-	def areMakefilesUptodate(self):
-		return False
+		return raptor_data.Evaluator(specification, configuration, gathertools=gathertools, cache = self.cache)
 
 
-	def Make(self, makefile):
+	def Make(self, makefileset):
+		if not self.noBuild and makefileset is not None:
+			if self.maker.Make(makefileset):
+				self.Info("The make-engine exited successfully.")
+				return True
+			else:
+				self.Error("The make-engine exited with errors.")
+				return False
+		else:
+			self.Info("No build performed")
 
-		if self.maker.Make(makefile):
-			self.Info("The make-engine exited successfully.")
-			return True
-		else:
-			self.Error("The make-engine exited with errors.")
-			return False
 
 
 	def Report(self):
@@ -898,10 +1039,10 @@
 		self.Info("Run time %s seconds" % self.runtime)
 
 	def AssertBuildOK(self):
-		"""Raise a BuildCompleteException if no further processing is required
+		"""Raise a BuildCannotProgressException if no further processing is required
 		"""
 		if self.Skip():
-			raise BuildCompleteException("")
+			raise BuildCannotProgressException("")
 
 		return True
 
@@ -934,17 +1075,17 @@
 			self.out.write("<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n")
 
 			namespace = "http://symbian.com/xml/build/log"
+			progress_namespace = "http://symbian.com/xml/build/log/progress"
 			schema = "http://symbian.com/xml/build/log/1_0.xsd"
 
-			self.out.write("<buildlog sbs_version=\"%s\" xmlns=\"%s\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"%s %s\">\n"
-						   % (raptor_version.Version(), namespace, namespace, schema))
+			self.out.write("<buildlog sbs_version=\"%s\" xmlns=\"%s\" xmlns:progress=\"%s\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"%s %s\">\n"
+						   % (raptor_version.fullversion(), namespace, progress_namespace, namespace, schema))
 			self.logOpen = True
 		except Exception,e:
 			self.out = sys.stdout # make sure that we can actually get errors out.
 			self.logOpen = False
 			self.FatalError("Unable to open the output logs: %s" % str(e))
 
-
 	def CloseLog(self):
 		if self.logOpen:
 			self.out.summary()
@@ -975,6 +1116,30 @@
 		"""
 		self.out.write("<info" + self.attributeString(attributes) + ">" +
 		               escape(format % extras) + "</info>\n")
+		
+	def InfoDiscovery(self, object_type, count):
+		if self.timing:
+			try:
+				self.out.write(raptor_timing.Timing.discovery_string(object_type = object_type,
+						count = count))
+			except Exception, exception:
+				Error(exception.Text, function = "InfoDiscoveryTime")
+		
+	def InfoStartTime(self, object_type, task, key):
+		if self.timing:
+			try:
+				self.out.write(raptor_timing.Timing.start_string(object_type = object_type,
+						task = task, key = key))
+			except Exception, exception:
+				Error(exception.Text, function = "InfoStartTime")
+		
+	def InfoEndTime(self, object_type, task, key):
+		if self.timing:
+			try:
+				self.out.write(raptor_timing.Timing.end_string(object_type = object_type,
+						task = task, key = key))
+			except Exception, exception:
+				Error(exception.Text, function = "InfoEndTime")
 
 	def Debug(self, format, *extras, **attributes):
 		"Send a debugging message to the configured channel"
@@ -1019,28 +1184,11 @@
 		if format:
 			self.out.write(format % extras)
 
-
-	def MakeComponentGroup(self, cg):
-		if not self.maker:
-			self.maker = raptor_make.MakeEngine(self)
-
-		if self.maker == None:
-			self.Error("No make engine present")
-			return None
-
-		makefile = cg.CreateMakefile(self.topMakefile, self.maker, self.systemDefinitionOrderLayers)
-		if (not self.noBuild and makefile is not None) \
-				or self.doParallelParsing:
-			# run the build for a single group of specs
-			self.Make(makefile)
-		else:
-			self.Info("No build performed for %s" % cg.name)
-
-	def GetComponentGroupsFromCLI(self):
-		"""Returns the list of componentGroups as specified by the
+	def GetLayersFromCLI(self):
+		"""Returns the list of layers as specified by the
 		   commandline interface to Raptor e.g. parameters
 		   or the current directory"""
-		componentGroups=[]
+		layers=[]
 		# Look for bld.infs or sysdefs in the current dir if none were specified
 		if self.systemDefinitionFile == None and len(self.commandlineComponents) == 0:
 			if not self.preferBuildInfoToSystemDefinition:
@@ -1049,38 +1197,39 @@
 				if self.systemDefinitionFile == None:
 					aComponent = self.FindComponentIn(cwd)
 					if aComponent:
-						componentGroups.append(ComponentGroup('default',[aComponent]))
+						layers.append(Layer('default',[aComponent]))
 			else:
 				aComponent = self.FindComponentIn(cwd)
 				if aComponent is None:
 					self.systemDefinitionFile = self.FindSysDefIn(cwd)
 				else:
-					componentGroups.append(ComponentGroup('default',[aComponent]))
+					layers.append(Layer('default',[aComponent]))
 
-			if len(componentGroups) <= 0 and  self.systemDefinitionFile == None:
+			if len(layers) <= 0 and  self.systemDefinitionFile == None:
 				self.Warn("No default bld.inf or system definition file found in current directory (%s)", cwd)
 
 		# If we now have a System Definition to parse then get the layers of components
 		if self.systemDefinitionFile != None:
 			systemModel = raptor_xml.SystemModel(self, self.systemDefinitionFile, self.systemDefinitionBase)
-			componentGroups = self.GatherSysModelLayers(systemModel, self.systemDefinitionRequestedLayers)
+			layers = self.GatherSysModelLayers(systemModel, self.systemDefinitionRequestedLayers)
 			
 		# Now get components specified on a commandline - build them after any
 		# layers in the system definition.
 		if len(self.commandlineComponents) > 0:
-			componentGroups.append(ComponentGroup('commandline',self.commandlineComponents))
+			layers.append(Layer('commandline',self.commandlineComponents))
 
 		# If we aren't building components in order then flatten down
 		# the groups
 		if not self.systemDefinitionOrderLayers:
 			# Flatten the layers into one group of components if
 			# we are not required to build them in order.
-			newcg = ComponentGroup("all")
-			for cg in componentGroups:
-				newcg.extend(cg)
-			componentGroups = [newcg]
+			newcg = Layer("all")
+			for cg in layers:
+				for c in cg:
+					newcg.add(c)
+			layers = [newcg]
 
-		return componentGroups
+		return layers
 
 	def Build(self):
 
@@ -1102,20 +1251,21 @@
 
 			# find out what configurations to build
 			self.AssertBuildOK()
-			buildUnitsToBuild = set()
 			buildUnitsToBuild = self.GetBuildUnitsToBuild(self.configNames)
 
+			self.buildUnitsToBuild = buildUnitsToBuild
+
 			# find out what components to build, and in what way
-			componentGroups = []
+			layers = []
 
 			self.AssertBuildOK()
 			if len(buildUnitsToBuild) >= 0:
-				componentGroups = self.GetComponentGroupsFromCLI()
+				layers = self.GetLayersFromCLI()
 
-			componentCount = reduce(lambda x,y : x + y, [len(cg) for cg in componentGroups])
+			componentCount = reduce(lambda x,y : x + y, [len(cg) for cg in layers])
 
 			if not componentCount > 0:
-				raise BuildCompleteException("No components to build.")
+				raise BuildCannotProgressException("No components to build.")
 
 			# check the configurations (tools versions)
 			self.AssertBuildOK()
@@ -1127,31 +1277,30 @@
 
 			self.AssertBuildOK()
 
+			# Setup a make engine.
+			if not self.maker:
+				self.maker = raptor_make.MakeEngine(self)
+				if self.maker == None:
+					self.Error("No make engine present")
 
-			# if self.doParallelParsing and not (len(componentGroups) == 1 and len(componentGroups[0]) == 1):
+			self.AssertBuildOK()
+
+			# if self.doParallelParsing and not (len(layers) == 1 and len(layers[0]) == 1):
 			if self.doParallelParsing:
 				# Create a Makefile to parse components in parallel and build them
-				for cg in componentGroups:
-					cg.GenerateMetadataSpecs(buildUnitsToBuild)
-					self.MakeComponentGroup(cg)
-				if self.noBuild:
-					self.Info("No build performed")
+				for l in layers:
+					l.meta_realise(self)
 			else:
 				# Parse components serially, creating one set of makefiles
 				# create non-component specs
-				self.AssertBuildOK()
-				generic_specs = self.GenerateGenericSpecs(buildUnitsToBuild)
+				self.generic_specs = self.GenerateGenericSpecs(buildUnitsToBuild)
 
 				self.AssertBuildOK()
-				for cg in componentGroups:
+				for l in layers:
 					# create specs for a specific group of components
-					cg.GenerateSpecs(generic_specs, buildUnitsToBuild)
-					self.WriteMetadataDepsMakefile(cg)	
+					l.realise(self)
 					
-					# generate the makefiles for one group of specs
-					self.MakeComponentGroup(cg)
-
-		except BuildCompleteException,b:
+		except BuildCannotProgressException,b:
 			if str(b) != "":
 				self.Info(str(b))
 
@@ -1212,17 +1361,7 @@
 	# object which represents a build
 	b = Raptor.CreateCommandlineBuild(argv)
 
-	# allow all objects to log to the
-	# build they're being used in
-	global build
-	global log
-	build = b
-	log = b
-
-
-	result = b.Build()
-
-	return result
+	return b.Build()
 
 
 def DisplayBanner():
@@ -1231,4 +1370,5 @@
 
 
 
+
 # end of the raptor module
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/python/raptor_buildplatform.py	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,158 @@
+#
+# Copyright (c) 2009 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"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# Classes, methods and regex available for use in log filters
+#
+
+# This particular file is preliminary and under development.
+
+class BuildPlatform(object):
+	""" A build platform is a set of configurations which share
+	the same metadata. In other words, a set of configurations
+	for which the bld.inf and MMP files pre-process to exactly
+	the same text."""
+
+	def __init__(self, build):
+		evaluator = build.GetEvaluator(None, buildConfig)
+		self.selfform= evaluator.CheckedGet("TRADITIONAL_PLATFORM")
+		epocroot = evaluator.CheckedGet("EPOCROOT")
+		self.epocroot = generic_path.Path(epocroot)
+
+		sbs_build_dir = evaluator.CheckedGet("SBS_BUILD_DIR")
+		self.sbs_build_dir = generic_path.Path(sbs_build_dir)
+		flm_export_dir = evaluator.CheckedGet("FLM_EXPORT_DIR")
+		self.flm_export_dir = generic_path.Path(flm_export_dir)
+		self.cacheid = flm_export_dir
+		if raptor_utilities.getOSPlatform().startswith("win"):
+			self.platmacros = evaluator.CheckedGet( "PLATMACROS.WINDOWS")
+		else:
+			self.platmacros = evaluator.CheckedGet( "PLATMACROS.LINUX")
+
+
+		# is this a feature variant config or an ordinary variant
+		fv = evaluator.Get("FEATUREVARIANTNAME")
+		if fv:
+			variantHdr = evaluator.CheckedGet("VARIANT_HRH")
+			variantHRH = generic_path.Path(variantHdr)
+			self.isfeaturevariant = True
+		else:
+			variantCfg = evaluator.CheckedGet("VARIANT_CFG")
+			variantCfg = generic_path.Path(variantCfg)
+			if not variantCfg in variantCfgs:
+				# get VARIANT_HRH from the variant.cfg file
+				varCfg = getVariantCfgDetail(self.epocroot, variantCfg)
+				variantCfgs[variantCfg] = varCfg['VARIANT_HRH']
+				# we expect to always build ABIv2
+				if not 'ENABLE_ABIV2_MODE' in varCfg:
+					build.Warn("missing flag ENABLE_ABIV2_MODE in %s file. ABIV1 builds are not supported.",
+										   str(variantCfg))
+			variantHRH = variantCfgs[variantCfg]
+			self.isfeaturevariant = False
+
+			self.variant_hrh = variantHRH
+			build.Info("'%s' uses variant hrh file '%s'", buildConfig.name, variantHRH)
+			self.systeminclude = evaluator.CheckedGet("SYSTEMINCLUDE")
+
+
+			# find all the interface names we need
+			ifaceTypes = evaluator.CheckedGet("INTERFACE_TYPES")
+			interfaces = ifaceTypes.split()
+
+			for iface in interfaces:
+				detail[iface] = evaluator.CheckedGet("INTERFACE." + iface)
+
+			# not test code unless positively specified
+			self.testcode = evaluator.CheckedGet("TESTCODE", "")
+
+			# make a key that identifies this platform uniquely
+			# - used to tell us whether we have done the pre-processing
+			# we need already using another platform with compatible values.
+
+			key = str(self.variant_hrh) \
+				+ str(self.epocroot) \
+			+ self.systeminclude \
+			+ self.platform
+
+			# Keep a short version of the key for use in filenames.
+			uniq = hashlib.md5()
+			uniq.update(key)
+
+			plat.key = key
+			plat.key_md5 = "p_" + uniq.hexdigest()
+			del uniq
+
+	def __hash__(self):
+		return hash(self.platform) + hash(self.epocroot) + hash(self.variant_hrh) + hash(self.systeminclude) + hash(self.testcode)
+
+	def __cmp__(self,other):
+		return cmp(self.hash(), other.hash())
+
+
+	@classmethod 
+	def fromConfigs(configsToBuild, build):
+		""" Group the list of configurations into "build platforms"."""
+		platforms = Set()
+		
+		for buildConfig in configsToBuild:
+			# get everything we need to know about the configuration
+			plat = BuildPlatform(build = build)
+
+			# compare this configuration to the ones we have already seen
+
+			# Is this an unseen export platform?
+			# concatenate all the values we care about in a fixed order
+			# and use that as a signature for the exports.
+			items = ['EPOCROOT', 'VARIANT_HRH', 'SYSTEMINCLUDE', 'TESTCODE', 'export']
+			export = ""
+			for i in  items:
+				if i in detail:
+					export += i + str(detail[i])
+
+			if export in exports:
+				# add this configuration to an existing export platform
+				index = exports[export]
+				self.ExportPlatforms[index]['configs'].append(buildConfig)
+			else:
+				# create a new export platform with this configuration
+				exports[export] = len(self.ExportPlatforms)
+				exp = copy.copy(detail)
+				exp['PLATFORM'] = 'EXPORT'
+				exp['configs']  = [buildConfig]
+				self.ExportPlatforms.append(exp)
+
+			# Is this an unseen build platform?
+			# concatenate all the values we care about in a fixed order
+			# and use that as a signature for the platform.
+			items = ['PLATFORM', 'EPOCROOT', 'VARIANT_HRH', 'SYSTEMINCLUDE', 'TESTCODE']
+			if raptor_utilities.getOSPlatform().startswith("win"):
+				items.append('PLATMACROS.WINDOWS')
+			else:
+				items.append('PLATMACROS.LINUX')
+
+			items.extend(interfaces)
+			platform = ""
+			for i in  items:
+				if i in detail:
+					platform += i + str(detail[i])
+
+			if platform in platforms:
+				# add this configuration to an existing build platform
+				index = platforms[platform]
+				BuildPlatforms[index]['configs'].append(buildConfig)
+			else:
+				# create a new build platform with this configuration
+				platforms[platform] = len(self.BuildPlatforms)
+				plat.configs = [buildConfig]
+				BuildPlatforms.append(detail)
+
--- a/sbsv2/raptor/python/raptor_cache.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/python/raptor_cache.py	Mon Dec 07 12:50:33 2009 +0000
@@ -143,7 +143,6 @@
 			self.WarnDuplicate("group", self.groups[obj.name], obj)
 			return
 
-		obj.SetOwner(self.raptor)
 		self.groups[obj.name] = obj
 
 	def FindNamedAlias(self, name):
@@ -154,7 +153,6 @@
 			self.WarnDuplicate("alias", self.aliases[obj.name], obj)
 			return
 
-		obj.SetOwner(self.raptor)
 		self.aliases[obj.name] = obj
 
 
@@ -176,7 +174,6 @@
 			self.WarnDuplicate("interface", self.interfaces[cacheID][obj.name], obj)
 			return
 
-		obj.SetOwner(self.raptor)
 		obj.cacheID = cacheID
 		self.interfaces[cacheID][obj.name] = obj
 
@@ -192,7 +189,6 @@
 				self.WarnDuplicate("variant", self.variants[obj.name], obj)
 				return
 
-			obj.SetOwner(self.raptor)
 			self.variants[obj.name] = obj
 
 
--- a/sbsv2/raptor/python/raptor_cli.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/python/raptor_cli.py	Mon Dec 07 12:50:33 2009 +0000
@@ -87,6 +87,9 @@
 parser.add_option("--export-only",action="store_true",dest="doExportOnly",
 				help="Generate exports only and do not create any make files.")
 
+parser.add_option("--noexport",action="store_true",dest="doExport",
+				help="Don't export any files - useful in some builds when you know exports have already been done.")
+
 parser.add_option("-f","--logfile",action="store",dest="logfile",
 				help="Name of the log file, or '-' for stdout.")
 
@@ -144,10 +147,15 @@
 
 				  "forced" -  Check all tool versions. Don't use cached results.
 			""")
+
+parser.add_option("--timing",action="store_true",dest="timing",
+			help="Show extra timing information for various processes in the build.")
+
 parser.add_option("--pp",action="store",dest="parallel_parsing",
 				help="""Controls how metadata (e.g. bld.infs) are parsed in Parallel.
 					Possible values are:
 					"on"  - Parse bld.infs in parallel (should be faster on clusters/multicore machines)
+					"slave" - used internally by Raptor 
 					"off" - Parse bld.infs serially 
 				     """)
 
@@ -260,6 +268,7 @@
 				 'quiet' : Raptor.RunQuietly,
 				 'debugoutput' : Raptor.SetDebugOutput,
 				 'doExportOnly' : Raptor.SetExportOnly,
+				 'doExport' : Raptor.SetNoExport,
 				 'keepgoing': Raptor.SetKeepGoing,
 				 'nobuild' : Raptor.SetNoBuild,
 				 'make_engine': Raptor.SetMakeEngine,
@@ -273,6 +282,7 @@
 				 'what' :  Raptor.SetWhat,
 				 'tries' : Raptor.SetTries,
 				 'toolcheck' : Raptor.SetToolCheck,
+				 'timing' : Raptor.SetTiming,
 				 'source_target' : Raptor.AddSourceTarget,
 				 'command_file' : CommandFile,
 				'parallel_parsing' : Raptor.SetParallelParsing,
--- a/sbsv2/raptor/python/raptor_data.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/python/raptor_data.py	Mon Dec 07 12:50:33 2009 +0000
@@ -27,8 +27,13 @@
 import subprocess
 from tempfile import gettempdir
 from time import time, clock
+import traceback
+import raptor_cache
 
 
+class MissingInterfaceError(Exception):
+	def __init__(self, s):
+		Exception.__init__(self,s)
 
 # What host platforms we recognise
 # This allows us to tie some variants to one host platform and some to another
@@ -68,16 +73,14 @@
 class Model(object):
 	"Base class for data-model objects"
 
+	__slots__ = ('host', 'source', 'cacheID')
+
 	def __init__(self):
-		self.owner = None	# Raptor object
 		self.source = None	# XML file
-		self.indent = " "	# for DebugPrint
 		self.host = None
 		self.cacheID = ""	# default set of cached objects
-
-
-	def SetOwner(self, aRaptor):
-		self.owner = aRaptor
+		# not using the cache parameter - there to make the 
+		# init for all Model objects "standard"
 
 
 	def SetSourceFile(self, filename):
@@ -92,10 +95,6 @@
 		raise InvalidChildError()
 
 
-	def DebugPrint(self, prefix = ""):
-		if self.owner:
-			self.owner.Debug("%s", prefix)
-
 	def Valid(self):
 		return False
 
@@ -139,8 +138,7 @@
 	def Resolve(self):
 		raise BadReferenceError()
 
-	def GetModifiers(self):
-		cache = self.owner.cache
+	def GetModifiers(self, cache):
 		return [ cache.FindNamedVariant(m) for m in self.modifiers ]
 
 	def Valid(self):
@@ -154,20 +152,13 @@
 		self.variants = []
 
 
-	def SetOwner(self, aRaptor):
-		Model.SetOwner(self, aRaptor)
-		for v in self.variants:
-			v.SetOwner(aRaptor)
-
-
-	def DebugPrint(self, prefix = ""):
-		for v in self.variants:
-			v.DebugPrint(prefix)
+	def __str__(self):
+		return "\n".join([str(v) for v in self.variants])
 
 
 	def AddVariant(self, variant):
 		if type(variant) is types.StringTypes:
-			variant = VariantRef(variant)
+			variant = VariantRef(ref = variant)
 
 
 		# Only add the variant if it's not in the list
@@ -175,15 +166,19 @@
 		if not variant in self.variants:
 			self.variants.append(variant)
 
-	def GetVariants(self):
+	def GetVariants(self, cache):
 		# resolve any VariantRef objects into Variant objects
+		missing_variants = []
 		for i,var in enumerate(self.variants):
 			if isinstance(var, Reference):
 				try:
-					self.variants[i] = var.Resolve()
+					self.variants[i] = var.Resolve(cache=cache)
 
 				except BadReferenceError:
-					self.owner.Error("Missing variant '%s'", var.ref)
+					missing_variants.append(var.ref)
+
+		if len(missing_variants) > 0:
+			raise MissingVariantException("Missing variants '%s'", " ".join(missing_variants))
 
 		return self.variants
 
@@ -199,27 +194,25 @@
 		self.params = []
 		self.paramgroups = []
 
-	def DebugPrint(self, prefix = ""):
-		self.owner.Debug("%s<interface name='%s'>", prefix, self.name)
-		self.owner.Debug("%s...", prefix)
-		self.owner.Debug("%s</interface>", prefix)
+	def __str__(self):
+		return "<interface name='%s'>" % self.name + "</interface>"
 
-	def FindParent(self):
+	def FindParent(self, cache):
 		try:
-			return self.owner.cache.FindNamedInterface(self.extends, self.cacheID)
+			return cache.FindNamedInterface(self.extends, self.cacheID)
 		except KeyError:
 			raise BadReferenceError("Cannot extend interface because it cannot be found: "+str(self.extends))
 
-	def GetParams(self):
+	def GetParams(self, cache):
 		if self.extends != None:
-			parent = self.FindParent()
+			parent = self.FindParent(cache)
 
 			# what parameter names do we have already?
 			names = set([x.name for x in self.params])
 
 			# pick up ones we don't have that are in our parent
 			pp = []
-			for p in parent.GetParams():
+			for p in parent.GetParams(cache):
 				if not p.name in names:
 					pp.append(p)
 
@@ -229,29 +222,29 @@
 
 		return self.params
 
-	def GetParamGroups(self):
+	def GetParamGroups(self, cache):
 		if self.extends != None:
-			parent = self.FindParent()
+			parent = self.FindParent(cache)
 
 			# what parameter names do we have already?
 			patterns = set([x.pattern for x in self.paramgroups])
 
 			# pick up ones we don't have that are in our parent
-			for g in parent.GetParamGroups():
+			for g in parent.GetParamGroups(cache):
 				if not g.pattern in patterns:
 					self.paramgroups.append(g)
 
 		return self.paramgroups
 
 
-	def GetFLMIncludePath(self):
+	def GetFLMIncludePath(self, cache):
 		"absolute path to the FLM"
 
 		if self.flm == None:
 			if self.extends != None:
-				parent = self.FindParent()
+				parent = self.FindParent(cache)
 
-				return parent.GetFLMIncludePath()
+				return parent.GetFLMIncludePath(cache)
 			else:
 				raise InvalidPropertyError()
 
@@ -295,12 +288,12 @@
 
 class InterfaceRef(Reference):
 
-	def DebugPrint(self, prefix = ""):
-		self.owner.Debug("%s<interfaceRef ref='%s'/>", prefix, self.ref)
+	def __str__(self):
+		return "<interfaceRef ref='%s'/>" % self.ref
 
-	def Resolve(self):
+	def Resolve(self, cache):
 		try:
-			return self.owner.cache.FindNamedInterface(self.ref, self.cacheID)
+			return cache.FindNamedInterface(self.ref, self.cacheID)
 		except KeyError:
 			raise BadReferenceError()
 
@@ -316,24 +309,13 @@
 		self.parentSpec = None
 
 
-	def DebugPrint(self, prefix = ""):
-		self.owner.Debug("%s<spec name='%s'>", prefix, self.name)
-		if self.interface:
-			self.interface.DebugPrint(prefix + self.indent)
-		VariantContainer.DebugPrint(self, prefix + self.indent)
+	def __str__(self):
+		s = "<spec name='%s'>" % str(self.name)
+		s += VariantContainer.__str__(self)
 		for c in self.childSpecs:
-			c.DebugPrint(prefix + self.indent)
-		self.owner.Debug("%s</spec>", prefix)
-
-
-	def SetOwner(self, aRaptor):
-		VariantContainer.SetOwner(self, aRaptor)
-
-		if self.interface != None:
-			self.interface.SetOwner(aRaptor)
-
-		for s in self.childSpecs:
-			s.SetOwner(aRaptor)
+			s += str(c) + '\n'
+		s += "</spec>"
+		return s
 
 
 	def SetProperty(self, name, value):
@@ -343,10 +325,10 @@
 			raise InvalidPropertyError()
 
 
-	def Configure(self, config):
+	def Configure(self, config, cache):
 		# configure all the children (some may be Filters or parents of)
 		for spec in self.GetChildSpecs():
-			spec.Configure(config)
+			spec.Configure(config, cache = cache)
 
 
 	def HasInterface(self):
@@ -358,10 +340,10 @@
 		or isinstance(interface, InterfaceRef):
 			self.interface = interface
 		else:
-			self.interface = InterfaceRef(interface)
+			self.interface = InterfaceRef(ref = interface)
 
 
-	def GetInterface(self):
+	def GetInterface(self, cache):
 		"""return the Interface (fetching from the cache if it was a ref)
 		may return None"""
 
@@ -371,13 +353,11 @@
 
 		if isinstance(self.interface, InterfaceRef):
 			try:
-				self.interface = self.interface.Resolve()
+				self.interface = self.interface.Resolve(cache=cache)
 				return self.interface
 
 			except BadReferenceError:
-				self.owner.Error("Missing interface %s", self.interface.ref)
-				return None
-
+				raise MissingInterfaceError("Missing interface %s" % self.interface.ref)
 
 	def AddChild(self, child):
 		if isinstance(child, Specification):
@@ -409,7 +389,7 @@
 		return True
 
 
-	def GetAllVariantsRecursively(self):
+	def GetAllVariantsRecursively(self, cache):
 		"""Returns all variants contained in this node and in its ancestors.
 
 		The returned value is a list, the structure of which is [variants-in-parent,
@@ -419,11 +399,11 @@
 		the variants themselves.
 		"""
 		if self.parentSpec:
-			variants = self.parentSpec.GetAllVariantsRecursively()
+			variants = self.parentSpec.GetAllVariantsRecursively(cache = cache)
 		else:
 			variants = []
 
-		variants.extend( self.GetVariants() )
+		variants.extend( self.GetVariants(cache = cache) )
 
 		return variants
 
@@ -438,22 +418,21 @@
 	If several Conditions are set, the test is an OR of all of them."""
 
 	def __init__(self, name = ""):
-		Specification.__init__(self, name)	# base class constructor
-		self.Else = Specification(name)     # same for Else part
+		Specification.__init__(self, name = name)	# base class constructor
+		self.Else = Specification(name = name)     # same for Else part
 		self.isTrue = True
 		self.configNames = set()            #
 		self.variableNames = set()          # TO DO: Condition class
 		self.variableValues = {}            #
 
-	def DebugPrint(self, prefix = ""):
-		self.owner.Debug("%s<filter name='%s'>", prefix, self.name)
-		self.owner.Debug("%s <if config='%s'>", prefix, " | ".join(self.configNames))
-		Specification.DebugPrint(self, prefix + self.indent)
-		self.owner.Debug("%s </if>", prefix)
-		self.owner.Debug("%s <else>", prefix)
-		self.Else.DebugPrint(prefix + self.indent)
-		self.owner.Debug("%s </else>", prefix)
-		self.owner.Debug("%s</filter>", prefix)
+	def __str__(self, prefix = ""):
+		s = "<filter name='%s'>\n"% self.name
+		s += "<if config='%s'>\n" % " | ".join(self.configNames)
+		s += Specification.__str__(self)
+		s += "</if>\n <else>\n"
+		s += str(self.Else)
+		s += " </else>\n</filter>\n"
+		return s
 
 
 	def SetConfigCondition(self, configName):
@@ -478,13 +457,14 @@
 			self.variableValues[variableName] = set([variableValues])
 
 
-	def Configure(self, buildUnit):
+	def Configure(self, buildUnit, cache):
 		self.isTrue = False
 
 		if buildUnit.name in self.configNames:
 			self.isTrue = True
 		elif self.variableNames:
-			evaluator = self.owner.GetEvaluator(self.parentSpec, buildUnit)
+
+			evaluator = Evaluator(self.parentSpec, buildUnit, cache=cache)
 
 			for variableName in self.variableNames:
 				variableValue = evaluator.Get(variableName)
@@ -495,14 +475,7 @@
 
 		# configure all the children too
 		for spec in self.GetChildSpecs():
-			spec.Configure(buildUnit)
-
-
-	def SetOwner(self, aRaptor):
-		# base class method
-		Specification.SetOwner(self, aRaptor)
-		# same for Else part
-		self.Else.SetOwner(aRaptor)
+			spec.Configure(buildUnit, cache=cache)
 
 
 	def HasInterface(self):
@@ -512,18 +485,18 @@
 			return self.Else.HasInterface()
 
 
-	def GetInterface(self):
+	def GetInterface(self, cache):
 		if self.isTrue:
-			return Specification.GetInterface(self)
+			return Specification.GetInterface(self, cache = cache)
 		else:
-			return self.Else.GetInterface()
+			return self.Else.GetInterface(cache = cache)
 
 
-	def GetVariants(self):
+	def GetVariants(self, cache):
 		if self.isTrue:
-			return Specification.GetVariants(self)
+			return Specification.GetVariants(self, cache = cache)
 		else:
-			return self.Else.GetVariants()
+			return self.Else.GetVariants(cache = cache)
 
 
 	def SetParentSpec(self, parent):
@@ -591,18 +564,17 @@
 
 class Operation(Model):
 	"Base class for variant operations"
+	__slots__ = 'type'
 	def __init__(self):
 		Model.__init__(self)	# base class constructor
 		self.type = None
 
-
 	def Apply(self, oldValue):
 		pass
 
 
 class Append(Operation):
-	__slots__ = ('name','value','separator','owner')
-
+	__slots__ = ('name', 'value', 'separator')
 	def __init__(self, name = None, value = None, separator = " "):
 		Operation.__init__(self)	# base class constructor
 		self.name = name
@@ -610,9 +582,9 @@
 		self.separator = separator
 
 
-	def DebugPrint(self, prefix = ""):
+	def __str__(self):
 		attributes = "name='" + self.name + "' value='" + self.value + "' separator='" + self.separator + "'"
-		self.owner.Debug("%s<append %s/>", prefix, attributes)
+		return "<append %s/>" % attributes
 
 
 	def Apply(self, oldValue):
@@ -641,6 +613,7 @@
 
 
 class Prepend(Operation):
+	__slots__ = ('name', 'value', 'separator')
 	def __init__(self, name = None, value = None, separator = " "):
 		Operation.__init__(self)	# base class constructor
 		self.name = name
@@ -648,9 +621,9 @@
 		self.separator = separator
 
 
-	def DebugPrint(self, prefix = ""):
+	def __str__(self, prefix = ""):
 		attributes = "name='" + self.name + "' value='" + self.value + "' separator='" + self.separator + "'"
-		self.owner.Debug("%s<prepend %s/>", prefix, attributes)
+		return "<prepend %s/>" % prefix
 
 
 	def Apply(self, oldValue):
@@ -679,8 +652,8 @@
 
 
 class Set(Operation):
+	__slots__ = ('name', 'value', 'type', 'versionCommand', 'versionResult')
 	"""implementation of <set> operation"""
-	__slots__ = ('name','value', 'type', 'versionCommand', 'versionResult', 'owner')
 
 	def __init__(self, name = None, value = "", type = ""):
 		Operation.__init__(self)	# base class constructor
@@ -691,12 +664,12 @@
 		self.versionResult = ""
 
 
-	def DebugPrint(self, prefix = ""):
+	def __str__(self):
 		attributes = "name='" + self.name + "' value='" + self.value + "' type='" + self.type + "'"
 		if type == "tool":
 			attributes += " versionCommand='" + self.versionCommand + "' versionResult='" + self.versionResult
 
-		self.owner.Debug("%s<set %s/>", prefix, attributes)
+		return "<set %s/>" % attributes
 
 
 	def Apply(self, oldValue):
@@ -724,6 +697,8 @@
 	def Valid(self):
 		return (self.name != None and self.value != None)
 
+class BadToolValue(Exception):
+	pass
 
 class Env(Set):
 	"""implementation of <env> operator"""
@@ -733,7 +708,7 @@
 		self.default = default
 
 
-	def DebugPrint(self, prefix = ""):
+	def __str__(self):
 		attributes = "name='" + self.name + "' type='" + self.type + "'"
 		if default != None:
 			attributes += " default='" + self.default + "'"
@@ -741,7 +716,7 @@
 		if type == "tool":
 			attributes += " versionCommand='" + self.versionCommand + "' versionResult='" + self.versionResult + "'"
 
-		self.owner.Debug("%s<env %s/>", prefix, attributes)
+		return "<env %s/>" % attributes
 
 
 	def Apply(self, oldValue):
@@ -755,14 +730,12 @@
 					path = generic_path.Path(value)
 					value = str(path.Absolute())
 				except ValueError,e:
-					self.owner.Error("the environment variable %s is incorrect: %s" % (self.name, str(e)))
-					return "NO_VALUE_FOR_" + self.name
+					raise BadToolValue("the environment variable %s is incorrect: %s" % (self.name, str(e)))
 		except KeyError:
 			if self.default != None:
 				value = self.default
 			else:
-				self.owner.Error("%s is not set in the environment and has no default", self.name)
-				return "NO_VALUE_FOR_" + self.name
+				raise BadToolValue("%s is not set in the environment and has no default" % self.name)
 
 		return value
 
@@ -791,7 +764,7 @@
 		self.operations = []
 		self.variantKey = ""
 
-	def GetOperations(self):
+	def GetOperations(self, cache):
 		"""Return all operations related to this BuildUnit.
 		
 		The result is cached, and so will only be computed once per BuildUnit.
@@ -800,7 +773,7 @@
 		if self.variantKey != key:
 			self.variantKey = key
 			for v in self.variants:
-				self.operations.extend( v.GetAllOperationsRecursively() )
+				self.operations.extend( v.GetAllOperationsRecursively(cache=cache) )
 
 		return self.operations
 
@@ -820,7 +793,7 @@
 	def ClearModifiers(self):
 		self.modifiers = []
 
-	def GenerateBuildUnits(self):
+	def GenerateBuildUnits(self,cache):
 		"""Returns a list of BuildUnits.
 
 		This function must be overridden by derived classes.
@@ -830,6 +803,8 @@
 
 class Variant(Model, Config):
 
+	__slots__ = ('cache','name','host','extends','ops','variantRefs','allOperations')
+
 	def __init__(self, name = ""):
 		Model.__init__(self)
 		Config.__init__(self)
@@ -868,20 +843,10 @@
 	def Valid(self):
 		return self.name
 
-	def SetOwner(self, aRaptor):
-
-		Model.SetOwner(self, aRaptor)
-
-		for r in self.variantRefs:
-			r.SetOwner(aRaptor)
-
-		for op in self.ops:
-			op.SetOwner(aRaptor)
-
 	def AddOperation(self, op):
 		self.ops.append(op)
 
-	def GetAllOperationsRecursively(self):
+	def GetAllOperationsRecursively(self, cache):
 		"""Returns a list of all operations in this variant.
 
 		The list elements are themselves lists; the overall structure of the
@@ -892,16 +857,16 @@
 
 		if not self.allOperations:
 			if self.extends:
-				parent = self.owner.cache.FindNamedVariant(self.extends)
-				self.allOperations.extend( parent.GetAllOperationsRecursively() )
+				parent = cache.FindNamedVariant(self.extends)
+				self.allOperations.extend( parent.GetAllOperationsRecursively(cache = cache) )
 			for r in self.variantRefs:
-				for v in [ r.Resolve() ] + r.GetModifiers():
-					self.allOperations.extend( v.GetAllOperationsRecursively() )
+				for v in [ r.Resolve(cache = cache) ] + r.GetModifiers(cache = cache):
+					self.allOperations.extend( v.GetAllOperationsRecursively(cache = cache) )
 			self.allOperations.append(self.ops)
 
 		return self.allOperations
 
-	def GenerateBuildUnits(self):
+	def GenerateBuildUnits(self,cache):
 
 		name = self.name
 		vars = [self]
@@ -909,32 +874,32 @@
 		for m in self.modifiers:
 			name = name + "." + m.name
 			vars.append(m)
-
-		return [ BuildUnit(name, vars) ]
-
-	def DebugPrint(self, prefix = ""):
+		return [ BuildUnit(name=name, variants=vars) ]
 
-		self.owner.Debug("%s<var name='%s' extends='%s'>", prefix, self.name, self.extends)
+	def __str__(self):
+		s = "<var name='%s' extends='%s'>\n" % (self.name, self.extends)
 		for op in self.ops:
-			op.DebugPrint(prefix + self.indent)
+			s +=  str(op) + '\n'
+		s += "</var>"
+		return s
 
-		self.owner.Debug("%s</var>", prefix)
-
-
+import traceback
 class VariantRef(Reference):
 
 	def __init__(self, ref=None):
-		Reference.__init__(self, ref)
+		Reference.__init__(self, ref = ref)
 
-	def DebugPrint(self, prefix = ""):
-		self.owner.Debug("%s<varRef ref='%s'/>", prefix, self.ref)
+	def __str__(self):
+		return "<varRef ref='%s'/>" % self.ref
 
-	def Resolve(self):
+	def Resolve(self, cache):
 		try:
-			return self.owner.cache.FindNamedVariant(self.ref)
-		except KeyError:
+			return cache.FindNamedVariant(self.ref)
+		except KeyError, e:
 			raise BadReferenceError(self.ref)
 
+class MissingVariantException(Exception):
+	pass
 
 class Alias(Model, Config):
 
@@ -946,8 +911,8 @@
 		self.varRefs = []
 		self.variants = []
 
-	def DebugPrint(self, prefix = ""):
-		self.owner.Debug("%s<alias name='%s' meaning='%s'/>", prefix, self.name, self.meaning)
+	def __str__(self):
+		return "<alias name='%s' meaning='%s'/>" % (self.name, self.meaning)
 
 	def SetProperty(self, key, val):
 		if key == "name":
@@ -956,32 +921,31 @@
 			self.meaning = val
 
 			for u in val.split("."):
-				self.varRefs.append( VariantRef(u) )
+				self.varRefs.append( VariantRef(ref = u) )
 		else:
 			raise InvalidPropertyError()
 
-	def SetOwner(self, raptor):
-		Model.SetOwner(self, raptor)
-		for r in self.varRefs:
-			r.SetOwner(raptor)
-
 	def Valid(self):
 		return self.name and self.meaning
 
-	def GenerateBuildUnits(self):
+	def GenerateBuildUnits(self, cache):
 		if not self.variants:
+			missing_variants = []
 			for r in self.varRefs:
 				try:
-					self.variants.append( r.Resolve() )
+					self.variants.append( r.Resolve(cache=cache) )
 				except BadReferenceError:
-					self.owner.Error("Missing variant '%s'", r.ref)
+					missing_variants.append(r.ref)
+				
+			if len(missing_variants) > 0:
+				raise MissingVariantException("Missing variants '%s'", " ".join(missing_variants))
 
 		name = self.name
 
 		for v in self.modifiers:
 			name = name + "." + v.name
 
-		return [ BuildUnit(name, self.variants + self.modifiers) ]
+		return [ BuildUnit(name=name, variants=self.variants + self.modifiers) ]
 
 
 class AliasRef(Reference):
@@ -989,12 +953,12 @@
 	def __init__(self, ref=None):
 		Reference.__init__(self, ref)
 
-	def DebugPrint(self, prefix = ""):
-		self.owner.Debug("%s<aliasRef ref='%s'/>", prefix, self.ref)
+	def __str__(self):
+		return "<aliasRef ref='%s'/>" % self.ref
 
-	def Resolve(self):
+	def Resolve(self, cache):
 		try:
-			return self.owner.cache.FindNamedAlias(self.ref)
+			return cache.FindNamedAlias(self.ref)
 		except KeyError:
 			raise BadReferenceError(self.ref)
 
@@ -1018,41 +982,37 @@
 		else:
 			raise InvalidChildError()
 
-	def SetOwner(self, raptor):
-		Model.SetOwner(self, raptor)
-		for r in self.childRefs:
-			r.SetOwner(raptor)
-
 	def Valid(self):
 		return self.name and self.childRefs
 
-	def DebugPrint(self, prefix = ""):
-
-		self.owner.Debug("<group name='%s'>", prefix, self.name)
-
+	def __str__(self):
+		s = "<group name='%s'>" % self.name
 		for r in self.childRefs:
-			r.DebugPrint(prefix + self.indent)
+			s += str(r)
+		s += "</group>"
+		return s
 
-		self.owner.Debug("%s</group>", prefix)
-
-	def GenerateBuildUnits(self):
-
+	def GenerateBuildUnits(self, cache):
 		units = []
 
+		missing_variants = []
 		for r in self.childRefs:
-			refMods = r.GetModifiers()
+			refMods = r.GetModifiers(cache)
 
 			try:
-				obj = r.Resolve()
+				obj = r.Resolve(cache=cache)
 			except BadReferenceError:
-				self.owner.Error("Missing variant '%s'", r.ref)
+				missing_variants.append(r.ref)
 			else:
 				obj.ClearModifiers()
 
 				for m in refMods + self.modifiers:
 					obj.AddModifier(m)
 
-				units.extend( obj.GenerateBuildUnits() )
+				units.extend( obj.GenerateBuildUnits(cache) )
+
+		if len(missing_variants) > 0:
+			raise MissingVariantException("Missing variants '%s'", " ".join(missing_variants))
 
 		return units
 
@@ -1062,19 +1022,27 @@
 	def __init__(self, ref=None):
 		Reference.__init__(self, ref)
 
-	def DebugPrint(self, prefix = ""):
-		mod = ".".join(self.modifiers)
-		self.owner.Debug("%s<groupRef ref='%s' mod='%s'/>", prefix, self.ref, mod)
+	def __str__(self):
+		return "<%s /><groupRef ref='%s' mod='%s'/>" % (prefix, self.ref, ".".join(self.modifiers))
 
-	def Resolve(self):
+	def Resolve(self, cache):
 		try:
-			return self.owner.cache.FindNamedGroup(self.ref)
+			return cache.FindNamedGroup(self.ref)
 		except KeyError:
 			raise BadReferenceError(self.ref)
 
+class ToolErrorException(Exception):
+	def __init__(self, s):
+		Exception.__init__(self,s)
+
 class Tool(object):
 	"""Represents a tool that might be used by raptor e.g. a compiler"""
 
+	# It's difficult and expensive to give each tool a log reference but a class one
+	# will facilitate debugging when that is needed without being a design flaw the
+	# rest of the time.
+	log = raptor_utilities.nulllog
+
 	# For use in dealing with tools that return non-ascii version strings.
 	nonascii = ""
 	identity_chartable = chr(0)
@@ -1084,7 +1052,7 @@
 		nonascii += chr(c)
 		identity_chartable += " "
 
-	def __init__(self, name, command, versioncommand, versionresult, id="", log = raptor_utilities.nulllog):
+	def __init__(self, name, command, versioncommand, versionresult, id=""):
 		self.name = name
 		self.command = command
 		self.versioncommand = versioncommand
@@ -1097,7 +1065,6 @@
 		# version until someone proves that it's OK
 		self.valid = False
 
-		self.log=log
 
 	def expand(self, toolset):
 		self.versioncommand = toolset.ExpandAll(self.versioncommand)
@@ -1117,7 +1084,7 @@
 				# If it really is not a simple command then we won't be able to get a date and
 				# we won't be able to tell if it is altered or updated - too bad!
 				testfile = generic_path.Where(self.command)
-				self.log.Debug("toolcheck: tool '%s' was found on the path at '%s' ", self.command, testfile)
+				#self.log.Debug("toolcheck: tool '%s' was found on the path at '%s' ", self.command, testfile)
 				if testfile is None:
 					raise Exception("Can't be found in path")
 
@@ -1127,18 +1094,20 @@
 			testfile_stat = os.stat(testfile)
 			self.date = testfile_stat.st_mtime
 		except Exception,e:
-			self.log.Debug("toolcheck: '%s=%s' cannot be dated - this is ok, but the toolcheck won't be able to tell when a new  of the tool is installed. (%s)", self.name, self.command, str(e))
+			# We really don't mind if the tool could not be dated - for any reason
+			Tool.log.Debug("toolcheck: '%s=%s' cannot be dated - this is ok, but the toolcheck won't be able to tell when a new version of the tool is installed. (%s)", self.name, self.command, str(e))
+			pass
 	
 			
-	def check(self, shell, evaluator):
+	def check(self, shell, evaluator, log = raptor_utilities.nulllog):
 
 		self.vre = re.compile(self.versionresult)
 
 		try:
 			self.log.Debug("Pre toolcheck: '%s' for version '%s'", self.name, self.versionresult)
 			p = subprocess.Popen(args=[shell, "-c", self.versioncommand], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+			log.Debug("Checking tool '%s' for version '%s'", self.name, self.versionresult)
 			versionoutput,err = p.communicate()
-			self.log.Debug("Checking tool '%s' for version '%s'", self.name, self.versionresult)
 		except Exception,e:
 			versionoutput=None
 
@@ -1148,12 +1117,11 @@
 		versionoutput_a = versionoutput.translate(Tool.identity_chartable,"")
 
 		if versionoutput_a and self.vre.search(versionoutput_a) != None:
-			self.log.Debug("tool '%s' returned an acceptable version '%s' at %s", self.name, versionoutput_a, str(self.date))
+			log.Debug("tool '%s' returned an acceptable version '%s'", self.name, versionoutput_a)
 			self.valid = True
 		else:
-			self.log.Error("tool '%s' from config '%s' did not return version '%s' as required.\nCommand '%s' returned:\n%s\nCheck your environment and configuration.\n", self.name, self.id, self.versionresult, self.versioncommand, versionoutput_a)
 			self.valid = False
-		return self.valid
+			raise ToolErrorException("tool '%s' from config '%s' did not return version '%s' as required.\nCommand '%s' returned:\n%s\nCheck your environment and configuration.\n" % (self.name, self.id, self.versionresult, self.versioncommand, versionoutput_a))
 
 def envhash(irrelevant_vars):
 	"""Determine something unique about this environment to identify it.
@@ -1175,16 +1143,19 @@
 	write() is used to flush the cache to disc.
 	"""
 	# The raptor shell - this is not mutable.
-	hostbinaries = os.path.join(os.environ['SBS_HOME'], 
-	                            os.environ['HOSTPLATFORM_DIR'])
+	if 'SBS_SHELL' in os.environ:
+		shell = os.environ['SBS_SHELL']
+	else:
+		hostbinaries = os.path.join(os.environ['SBS_HOME'], 
+	                                os.environ['HOSTPLATFORM_DIR'])
 	                            
-	if HostPlatform.IsHost('lin*'):
-		shell=os.path.join(hostbinaries, 'bin/bash')
-	else:
-		if 'SBS_CYGWIN' in os.environ:
-			shell=os.path.join(os.environ['SBS_CYGWIN'], 'bin\\bash.exe')
+		if HostPlatform.IsHost('lin*'):
+			shell=os.path.join(hostbinaries, 'bin/bash')
 		else:
-			shell=os.path.join(hostbinaries, 'cygwin\\bin\\bash.exe')
+			if 'SBS_CYGWIN' in os.environ:
+				shell=os.path.join(os.environ['SBS_CYGWIN'], 'bin\\bash.exe')
+			else:
+				shell=os.path.join(hostbinaries, 'cygwin\\bin\\bash.exe')
 
 
 	irrelevant_vars = ['PWD','OLDPWD','PID','PPID', 'SHLVL' ]
@@ -1255,7 +1226,6 @@
 							except Exception, e:
 								log.Info("Ignoring garbled toolcheck cache: %s (%s)\n", self.cachefilename, str(e))
 								self.__toolcheckcache = {}
-								
 									
 						else:
 							log.Info("Toolcheck cache %s ignored - environment changed\n", self.cachefilename)
@@ -1316,8 +1286,11 @@
 
 			self.log.Debug("toolcheck done: %s -key: %s" % (tool.name, tool.key))
 
-			if not tool.check(ToolSet.shell, evaluator):
+			try:
+				tool.check(ToolSet.shell, evaluator, log = self.log)
+			except ToolErrorException, e:
 				self.valid = False
+				self.log.Error("%s\n" % str(e))
 
 			# Tool failures are cached just like successes - don't want to repeat them
 			cache[tool.key] =  { "name" : tool.name, "valid" : tool.valid, "age" : 0 , "date" : tool.date }
@@ -1356,6 +1329,8 @@
 				self.log.Info("Could not write toolcheck cache: %s", str(e))
 		return self.valid
 
+class UninitialisedVariableException(Exception):
+	pass
 
 class Evaluator(object):
 	"""Determine the values of variables under different Configurations.
@@ -1364,11 +1339,11 @@
 
 	refRegex = re.compile("\$\((.+?)\)")
 
-	def __init__(self, Raptor, specification, buildUnit, gathertools = False):
-		self.raptor = Raptor
+	def __init__(self, specification, buildUnit, cache, gathertools = False):
 		self.dict = {}
 		self.tools = []
 		self.gathertools = gathertools
+		self.cache = cache
 
 		specName = "none"
 		configName = "none"
@@ -1377,14 +1352,18 @@
 		opsLists = []
 
 		if buildUnit:
-			opsLists.extend( buildUnit.GetOperations() )
+			ol = buildUnit.GetOperations(cache)
+			self.buildUnit = buildUnit
+			
+			opsLists.extend( ol )
 
 		if specification:
-			for v in specification.GetAllVariantsRecursively():
-				opsLists.extend( v.GetAllOperationsRecursively() )
+			for v in specification.GetAllVariantsRecursively(cache):
+				opsLists.extend( v.GetAllOperationsRecursively(cache) )
 
 		tools = {}
 
+		unfound_values = []
 		for opsList in opsLists:
 			for op in opsList:
 				# applying an Operation to a non-existent variable
@@ -1394,13 +1373,20 @@
 				except KeyError:
 					oldValue = ""
 
-				newValue = op.Apply(oldValue)
+				try:
+					newValue = op.Apply(oldValue)
+				except BadToolValue, e:
+					unfound_values.append(str(e))
+					newValue = "NO_VALUE_FOR_" + op.name
+					
 				self.dict[op.name] = newValue
 			
 				if self.gathertools:
 					if op.type == "tool" and op.versionCommand and op.versionResult:
-						tools[op.name] = Tool(op.name, newValue, op.versionCommand, op.versionResult, configName, log = self.raptor)
+						tools[op.name] = Tool(op.name, newValue, op.versionCommand, op.versionResult, configName)
 
+		if len(unfound_values) > 0:
+			raise UninitialisedVariableException("\n".join(unfound_values))
 
 		if self.gathertools:
 			self.tools = tools.values()
@@ -1417,8 +1403,8 @@
 			unresolved = False
 			for k, v in self.dict.items():
 				if v.find('$(' + k + ')') != -1:
-					self.raptor.Error("Recursion Detected in variable '%s' in configuration '%s' ",k,configName)
-					expanded = "RECURSIVE_INVALID_STRING"
+						raise RecursionException("Recursion Detected in variable '%s' in configuration '%s' " % (k,configName))
+						expanded = "RECURSIVE_INVALID_STRING"
 				else:
 					expanded = self.ExpandAll(v, specName, configName)
 
@@ -1466,20 +1452,24 @@
 
 		refs = Evaluator.refRegex.findall(value)
 
+		# store up all the unset variables before raising an exception
+		# to allow us to find them all
+		unset_variables = [] 
+
 		for r in set(refs):
 			expansion = None
 
-			if r in self.raptor.override:
-				expansion = self.raptor.override[r]
-			elif r in self.dict:
+			if r in self.dict:
 				expansion = self.dict[r]
 			else:
 				# no expansion for $(r)
-				self.raptor.Error("Unset variable '%s' used in spec '%s' with config '%s'",
-							  	  r, spec, config)
+				unset_variables.append("Unset variable '%s' used in spec '%s' with config '%s'" % (r, spec, config))
 			if expansion != None:
 				value = value.replace("$(" + r + ")", expansion)
 
+		if len(unset_variables) > 0: # raise them all
+			raise UninitialisedVariableException(". ".join(unset_variables))
+
 		return value
 
 
--- a/sbsv2/raptor/python/raptor_make.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/python/raptor_make.py	Mon Dec 07 12:50:33 2009 +0000
@@ -20,13 +20,16 @@
 import os
 import random
 import raptor
-import raptor_data
+import raptor_timing
 import raptor_utilities
 import raptor_version
+import raptor_data
 import re
 import subprocess
 import time
 from raptor_makefile import *
+import traceback
+import sys
 
 # raptor_make module classes
 
@@ -35,7 +38,6 @@
 	def __init__(self, Raptor):
 		self.raptor = Raptor
 		self.valid = True
-		self.makefileset = None
 		self.descrambler = None
 		self.descrambler_started = False
 
@@ -53,7 +55,7 @@
 					
 		# find the variant and extract the values
 		try:
-			units = avar.GenerateBuildUnits()
+			units = avar.GenerateBuildUnits(Raptor.cache)
 			evaluator = Raptor.GetEvaluator( None, units[0] , gathertools=True)
 
 			# shell
@@ -123,7 +125,7 @@
  component='$$COMPONENT_NAME'\
  bldinf='$$COMPONENT_META' mmp='$$PROJECT_META'\
  config='$$SBS_CONFIGURATION' platform='$$PLATFORM'\
- phase='$$MAKEFILE_GROUP' source='$$SOURCE
+ phase='$$MAKEFILE_GROUP' source='$$SOURCE'
 export TALON_RECIPEATTRIBUTES TALON_SHELL TALON_TIMEOUT
 USE_TALON:=%s
 
@@ -133,9 +135,23 @@
 USE_TALON:=
 
 """
-		
+
+
+		timing_start = "$(info " + \
+				raptor_timing.Timing.custom_string(tag = "start",
+				object_type = "makefile", task = "parse",
+				key = "$(THIS_FILENAME)",
+				time="$(shell date +%s.%N)").rstrip("\n") + ")"
+				
+		timing_end = "$(info " + \
+				raptor_timing.Timing.custom_string(tag = "end",
+				object_type = "makefile", task = "parse",
+				key = "$(THIS_FILENAME)",
+				time="$(shell date +%s.%N)").rstrip("\n") + ")"
+
 
 		self.makefile_prologue = """
+
 # generated by %s %s
 
 HOSTPLATFORM:=%s
@@ -143,12 +159,13 @@
 OSTYPE:=%s
 FLMHOME:=%s
 SHELL:=%s
+THIS_FILENAME:=$(firstword $(MAKEFILE_LIST))
 
 %s
 
 include %s
 
-""" 		% (  raptor.name, raptor_version.Version(),
+""" 		% (  raptor.name, raptor_version.fullversion(),
 			 " ".join(raptor.hostplatform),
 			 raptor.hostplatform_dir,
 			 self.raptor.filesystem,
@@ -157,8 +174,18 @@
 			 talon_settings,
 			 self.raptor.systemFLM.Append('globals.mk') )
 
+		# Only output timings if requested on CLI
+		if self.raptor.timing:
+			self.makefile_prologue += "\n# Print Start-time of Makefile parsing\n" \
+					+ timing_start + "\n\n"
+	
+	
+			self.makefile_epilogue = "\n\n# Print End-time of Makefile parsing\n" \
+				+ timing_end + "\n"
+		else:
+			self.makefile_epilogue = ""
 
-		self.makefile_epilogue = """
+		self.makefile_epilogue += """
 
 include %s
 
@@ -168,14 +195,17 @@
 		"""Generate a set of makefiles, or one big Makefile."""
 
 		if not self.valid:
-			return
+			return None
+
+		self.raptor.Debug("Writing Makefile '%s'" % (str(toplevel)))
 
 		self.toplevel = toplevel
 
 		# create the top-level makefiles
+		makefileset = None
 
 		try:
-			self.makefileset = MakefileSet(directory = str(toplevel.Dir()),
+			makefileset = MakefileSet(directory = str(toplevel.Dir()),
 										   selectors = self.selectors,
 										   filenamebase = str(toplevel.File()),
 										   prologue = self.makefile_prologue,
@@ -190,11 +220,10 @@
 			self.many = not self.raptor.writeSingleMakefile
 
 			# add a makefile for each spec under each config
-			config_makefileset = self.makefileset
-
+			config_makefileset = makefileset
 			for c in configs:
 				if self.many:
-					config_makefileset = self.makefileset.createChild(c.name)
+					config_makefileset = makefileset.createChild(c.name)
 
 				# make sure the config_wide spec item is put out first so that it
 				# can affect everything.
@@ -207,16 +236,22 @@
 						ordered_specs.append(s)
 
 				if config_wide_spec is not None:
-					config_wide_spec.Configure(c)
+					config_wide_spec.Configure(c, cache = self.raptor.cache)
 					self.WriteConfiguredSpec(config_makefileset, config_wide_spec, c, True)
 
 				for s in ordered_specs:
-					s.Configure(c)
+					s.Configure(c, cache = self.raptor.cache)
 					self.WriteConfiguredSpec(config_makefileset, s, c, False)
 
-			self.makefileset.close()
+			makefileset.close()
 		except Exception,e:
-			self.raptor.Error("Failed to write makefile '%s': %s" % (str(toplevel),str(e)))
+			tb = traceback.format_exc()
+			if not self.raptor.debugOutput:
+				tb=""
+			self.raptor.Error("Failed to write makefile '%s': %s : %s" % (str(toplevel),str(e),tb))
+			makefileset = None
+
+		return makefileset
 
 
 	def WriteConfiguredSpec(self, parentMakefileSet, spec, config, useAllInterfaces):
@@ -233,9 +268,10 @@
 		guard = None
 		if hasInterface:
 			# find the Interface (it may be a ref)
-			iface = spec.GetInterface()
+			try:
+				iface = spec.GetInterface(self.raptor.cache)
 
-			if iface == None:
+			except raptor_data.MissingInterfaceError, e:	
 				self.raptor.Error("No interface for '%s'", spec.name)
 				return
 
@@ -268,12 +304,12 @@
 				md5hash.update(value)
 
 			# parameters required by the interface
-			for p in iface.GetParams():
+			for p in iface.GetParams(self.raptor.cache):
 				val = evaluator.Resolve(p.name)
 				addparam(p.name,val,p.default)
 
 			# Use Patterns to fetch a group of parameters
-			for g in iface.GetParamGroups():
+			for g in iface.GetParamGroups(self.raptor.cache):
 				for k,v in evaluator.ResolveMatching(g.patternre):
 					addparam(k,v,g.default)
 
@@ -301,7 +337,7 @@
 
 		# generate the call to the FLM
 		if iface is not None:
-			makefileset.addCall(spec.name, config.name, iface.name, useAllInterfaces, iface.GetFLMIncludePath(), parameters, guard)
+			makefileset.addCall(spec.name, config.name, iface.name, useAllInterfaces, iface.GetFLMIncludePath(self.raptor.cache), parameters, guard)
 
 		# recursive includes
 
@@ -341,7 +377,7 @@
 				return False
 
 		# Save file names to a list, to allow the order to be reversed
-		fileName_list = list(self.makefileset.makefileNames())
+		fileName_list = list(makefileset.makefileNames())
 
 		# Iterate through args passed to raptor, searching for CLEAN or REALLYCLEAN
 		clean_flag = False
@@ -354,6 +390,9 @@
 		if clean_flag:
 			fileName_list.reverse()
 
+		# Report number of makefiles to be built
+		self.raptor.InfoDiscovery(object_type = "makefile", count = len(fileName_list))
+
 		# Process each file in turn
 		for makefile in fileName_list:
 			if not os.path.exists(makefile):
@@ -401,7 +440,7 @@
 
 			# targets go at the end, if the makefile supports them
 			addTargets = self.raptor.targets[:]
-			ignoreTargets = self.makefileset.ignoreTargets(makefile)
+			ignoreTargets = makefileset.ignoreTargets(makefile)
 			if addTargets and ignoreTargets:
 				for target in self.raptor.targets:
 					if re.match(ignoreTargets, target):
@@ -410,6 +449,9 @@
 			if addTargets:
 				command += " " + " ".join(addTargets)
 
+			# Substitute the makefile name for any occurrence of #MAKEFILE#
+			command = command.replace("#MAKEFILE#", str(makefile))
+
 			self.raptor.Info("Executing '%s'", command)
 
 			# execute the build.
@@ -417,6 +459,10 @@
 			# bufsize=1 means "line buffered"
 			#
 			try:
+				# Time the build
+				self.raptor.InfoStartTime(object_type = "makefile",
+						task = "build", key = str(makefile))
+				
 				makeenv=os.environ.copy()
 				if self.usetalon:
 					makeenv['TALON_RECIPEATTRIBUTES']="none"
@@ -444,6 +490,9 @@
 				# should be done now
 				returncode = p.wait()
 
+				# Report end-time of the build
+				self.raptor.InfoEndTime(object_type = "makefile",
+						task = "build", key = str(makefile))
 
 				if returncode != 0  and not self.raptor.keepGoing:
 					self.Tidy()
@@ -452,6 +501,9 @@
 			except Exception,e:
 				self.raptor.Error("Exception '%s' during '%s'", str(e), command)
 				self.Tidy()
+				# Still report end-time of the build
+				self.raptor.InfoEnd(object_type = "Building", task = "Makefile",
+						key = str(makefile))
 				return False
 
 		# run any shutdown script
@@ -496,7 +548,7 @@
 			looking = (os.system(command) != 0)
 			tries += 1
 		if looking:
-			self.raptor.Error("Failed to initilaise the talon shell for this build")
+			self.raptor.Error("Failed to initialise the talon shell for this build")
 			self.talonctl = ""
 			return False
 		
--- a/sbsv2/raptor/python/raptor_makefile.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/python/raptor_makefile.py	Mon Dec 07 12:50:33 2009 +0000
@@ -134,6 +134,15 @@
 
 		return True
 
+	def addInclude(self, makefilename):
+		"""
+		"""
+		# create the directory if it does not exist
+
+		self.open()
+		# now we can write the values into the makefile
+		self.file.write("include %s\n" % (makefilename+"."+self.selector.name))
+
 	def close(self):
 		if self.file is not None:
 			if self.epilogue != None:
@@ -191,6 +200,11 @@
 		for f in self.makefiles:
 			f.addCall(specname, configname, ifname, useAllInterfaces, flmpath, parameters, guard)
 
+	def addInclude(self, makefilename):
+		"""include a makefile from each of the makefiles in the set - has the selector name appended to it."""
+		for f in self.makefiles:
+			f.addInclude(makefilename)
+
 	def makefileNames(self):
 		for mf in self.makefiles:
 			yield str(mf.filename)
--- a/sbsv2/raptor/python/raptor_meta.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/python/raptor_meta.py	Mon Dec 07 12:50:33 2009 +0000
@@ -232,6 +232,19 @@
 	return commentDetail
 
 
+def getSpecName(aFileRoot, fullPath=False):
+	"""Returns a build spec name: this is the file root (full path
+	or simple file name) made safe for use as a file name."""
+
+	if fullPath:
+		specName = str(aFileRoot).replace("/","_")
+		specName = specName.replace(":","")
+	else:
+		specName = aFileRoot.File()
+
+	return specName.lower()
+
+
 # Classes
 
 class MetaDataError(Exception):
@@ -284,9 +297,8 @@
 	def call(self, aArgs, sourcefilename):
 		""" Override call so that we can do our own error handling."""
 		tool = self._ExternalTool__Tool
+		commandline = tool + " " + aArgs + " " + str(sourcefilename)
 		try:
-			commandline = tool + " " + aArgs + " " + str(sourcefilename)
-
 			# the actual call differs between Windows and Unix
 			if raptor_utilities.getOSFileSystem() == "unix":
 				p = subprocess.Popen(commandline, \
@@ -332,7 +344,7 @@
 				raise MetaDataError("Errors in %s" % str(sourcefilename))
 
 		except Exception,e:
-			raise MetaDataError("Preprocessor exception: %s" % str(e))
+			raise MetaDataError("Preprocessor exception: '%s' : in command : '%s'" % (str(e), commandline))
 
 		return 0	# all OK
 
@@ -398,11 +410,13 @@
 	on the selected build platform.  This class provides a generic means of wrapping
 	up the preprocessing of such files."""
 
-	def __init__(self, aFilename, gnucpp, aRootLocation=None, log=None):
+	def __init__(self, aFilename, gnucpp, depfiles, aRootLocation=None, log=None):
 		"""
 		@param aFilename	An MMP, bld.inf or other preprocessable build spec file
 		@param aDefaultPlatform  Default preprocessed version of this file
 		@param aCPP 		location of GNU CPP
+		@param depfiles     	list to add dependency file tuples to
+		@param aRootLocation    where the file is 
 		@param log 		A class with Debug(<string>), Info(<string>) and Error(<string>) methods
 		"""
 		self.filename = aFilename
@@ -410,6 +424,7 @@
 		# Dictionary with key of build platform and a text string of processed output as values
 		self.__PreProcessedContent = {}
 		self.log = log
+		self.depfiles = depfiles
 
 		self.__gnucpp = gnucpp
 		if gnucpp is None:
@@ -436,7 +451,7 @@
 			else:
 				metatarget = "'$(PARSETARGET)'"
 			generateDepsOptions = "-MD -MF%s -MT%s" % (adepfilename, metatarget)
-			aBuildPlatform['METADEPS'].append((adepfilename, metatarget))
+			self.depfiles.append((adepfilename, metatarget))
 			try:
 				os.makedirs(os.path.dirname(adepfilename))
 			except Exception, e:
@@ -515,15 +530,17 @@
 	on the selected build platform.  This class provides a generic means of wrapping
 	up the preprocessing of such files."""
 
-	def __init__(self, aFilename, gnucpp, bldinf, log=None):
+	def __init__(self, aFilename, gnucpp, bldinf, depfiles, log=None):
 		"""
 		@param aFilename	An MMP, bld.inf or other preprocessable build spec file
 		@param gnucpp 		location of GNU CPP
-		@param bldinf   	the bldinf file that this mmp comes from
-		@param log 			A class with Debug(<string>), Info(<string>) and Error(<string>) methods
+		@param bldinf		the bld.inf file this mmp was specified in
+		@param depfiles         list to fill with mmp dependency files
+		@param log 		A class with Debug(<string>), Info(<string>) and Error(<string>) methods
 		"""
-		super(MMPFile, self).__init__(aFilename, gnucpp, str(bldinf.filename.Dir()), log)
+		super(MMPFile, self).__init__(aFilename, gnucpp, depfiles, str(bldinf.filename.Dir()),  log)
 		self.__bldinf = bldinf
+		self.depfiles = depfiles
 
 		self.__gnucpp = gnucpp
 		if gnucpp is None:
@@ -878,8 +895,8 @@
 class BldInfFile(MetaDataFile):
 	"""Representation of a Symbian bld.inf file"""
 
-	def __init__(self, aFilename, gnucpp, log=None):
-		MetaDataFile.__init__(self, aFilename, gnucpp, None, log)
+	def __init__(self, aFilename, gnucpp, depfiles, log=None):
+		MetaDataFile.__init__(self, aFilename, gnucpp, depfiles, None, log)
 		self.__Raptor = log
 		self.testManual = 0
 		self.testAuto = 0
@@ -1194,7 +1211,9 @@
 		super(MMPRaptorBackend,self).__init__()
 		self.platformblock = None
 		self.__Raptor = aRaptor
-		self.BuildVariant = raptor_data.Variant()
+		self.__debug("-----+++++ %s " % aMmpfilename)
+		self.BuildVariant = raptor_data.Variant(name = "mmp")
+		self.ApplyVariants = []
 		self.ResourceVariants = []
 		self.BitmapVariants = []
 		self.StringTableVariants = []
@@ -1208,11 +1227,12 @@
 		self.__systeminclude = ""
 		self.__bitmapSourcepath = self.__sourcepath
 		self.__current_resource = ""
-		self.__capabilities = []
 		self.__resourceFiles = []
 		self.__pageConflict = []
 		self.__debuggable = ""
+		self.__compressionKeyword = ""
 		self.sources = []
+		self.capabilities = []
 
 		self.__TARGET = ""
 		self.__TARGETEXT = ""
@@ -1338,6 +1358,14 @@
 		elif varname == 'FEATUREVARIANT':
 			self.BuildVariant.AddOperation(raptor_data.Set(varname,"1"))
 			self.featureVariant = True
+		elif varname in ['COMPRESSTARGET', 'NOCOMPRESSTARGET', 'INFLATECOMPRESSTARGET', 'BYTEPAIRCOMPRESSTARGET']:
+			if self.__compressionKeyword:
+				self.__Raptor.Warn("%s keyword in %s overrides earlier use of %s" % (varname, self.__currentMmpFile, self.__compressionKeyword))
+				self.BuildVariant.AddOperation(raptor_data.Set(self.__compressionKeyword,""))
+				self.__debug( "Set switch " + varname + " OFF")
+			self.BuildVariant.AddOperation(raptor_data.Set(varname,"1"))
+			self.__debug( "Set switch " + varname + " ON")
+			self.__compressionKeyword = varname
 		else:
 			self.__debug( "Set switch "+toks[0]+" ON")
 			self.BuildVariant.AddOperation(raptor_data.Set(prefix+varname, "1"))
@@ -1423,9 +1451,8 @@
 
 		elif varname=='CAPABILITY':
 			for cap in toks[1]:
-				self.BuildVariant.AddOperation(raptor_data.Append(varname,cap," "))
 				self.__debug("Setting  "+toks[0]+": " + cap)
-				self.__capabilities.append(cap.lower())
+				self.capabilities.append(cap)
 		elif varname=='DEFFILE':
 			self.__defFileRoot = self.__currentMmpFile
 			self.deffile = toks[1]
@@ -1519,7 +1546,8 @@
 					toks1 = re.sub("[,'\[\]]", "", toks1).replace("//","/")
 				self.__debug("Set "+toks[0]+" to " + toks1)
 				self.BuildVariant.AddOperation(raptor_data.Set(varname,toks1))
-
+		elif varname=='APPLY':
+			self.ApplyVariants.append(toks[1])
 		else:
 			self.__debug("Set "+toks[0]+" to " + str(toks[1]))
 			self.BuildVariant.AddOperation(raptor_data.Set(varname,"".join(toks[1])))
@@ -1767,7 +1795,7 @@
 					replace = ""
 					if len(matches):
 						replace = matches.pop()
-					
+
 					searchReplacePairs.append('%s<->%s' % (search, replace))
 
 			# Replace spaces to maintain word-based grouping in downstream makefile lists
@@ -1886,7 +1914,7 @@
 		self.__currentLineNumber += 1
 		self.__debug("Start BITMAP "+toks[1])
 
-		self.__currentBitmapVariant = raptor_data.Variant(toks[1].replace('.','_'))
+		self.__currentBitmapVariant = raptor_data.Variant(name = toks[1].replace('.','_'))
 		# Use BMTARGET and BMTARGET_lower because that prevents
 		# confusion with the TARGET and TARGET_lower of our parent MMP
 		# when setting the OUTPUTPATH.  This in turn allows us to
@@ -1976,7 +2004,7 @@
 		self.__debug("stringtable: " + toks[1])
 		self.__debug("adjusted stringtable source=" + source)
 
-		self.__currentStringTableVariant = raptor_data.Variant(uniqname)
+		self.__currentStringTableVariant = raptor_data.Variant(name = uniqname)
 		self.__currentStringTableVariant.AddOperation(raptor_data.Set("SOURCE", source))
 		self.__currentStringTableVariant.AddOperation(raptor_data.Set("EXPORTPATH", ""))
 		self.__stringtableExported = False
@@ -2169,11 +2197,14 @@
 			self.ResourceVariants[i].AddOperation(raptor_data.Set("MAIN_TARGET_lower", self.__TARGET.lower()))
 			self.ResourceVariants[i].AddOperation(raptor_data.Set("MAIN_REQUESTEDTARGETEXT", self.__TARGETEXT.lower()))
 
+		# Create Capability variable in one SET operation (more efficient than multiple appends)
+		self.BuildVariant.AddOperation(raptor_data.Set("CAPABILITY"," ".join(self.capabilities)))
+
 		# Resolve combined capabilities as hex flags, for configurations that require them
 		capabilityFlag1 = 0
 		capabilityFlag2 = 0			# Always 0
 
-		for capability in self.__capabilities:
+		for capability in [c.lower() for c in self.capabilities]:
 			invert = 0
 
 			if capability.startswith('-'):
@@ -2285,6 +2316,32 @@
 		return resolvedDefFile
 
 
+def CheckedGet(self, key, default = None):
+	"""extract a value from an self and raise an exception if None.
+
+	An optional default can be set to replace a None value.
+
+	This function belongs in the Evaluator class logically. But
+	Evaluator doesn't know how to raise a Metadata error. Since
+	being able to raise a metadata error is the whole point of
+	the method, it makes sense to adapt the Evaluator class from
+	raptor_meta for the use of everything inside raptor_meta.
+
+	... so it will be added to the Evaluator class.
+	"""
+
+	value = self.Get(key)
+	if value == None:
+		if default == None:
+			raise MetaDataError("configuration " + self.buildUnit.name +
+							    " has no variable " + key)
+		else:
+			return default
+	return value
+
+raptor_data.Evaluator.CheckedGet = CheckedGet 
+
+
 class MetaReader(object):
 	"""Entry point class for Symbian metadata processing.
 
@@ -2301,10 +2358,10 @@
 		# Get the version of CPP that we are using
 		metadata = self.__Raptor.cache.FindNamedVariant("meta")
 		evaluator = self.__Raptor.GetEvaluator(None, raptor_data.BuildUnit(metadata.name, [metadata]) )
-		self.__gnucpp = self.CheckValue(evaluator, "GNUCPP")
-		self.__defaultplatforms = self.CheckValue(evaluator, "DEFAULT_PLATFORMS")
-		self.__basedefaultplatforms = self.CheckValue(evaluator, "BASE_DEFAULT_PLATFORMS")
-		self.__baseuserdefaultplatforms = self.CheckValue(evaluator, "BASE_USER_DEFAULT_PLATFORMS")
+		self.__gnucpp = evaluator.CheckedGet("GNUCPP")
+		self.__defaultplatforms = evaluator.CheckedGet("DEFAULT_PLATFORMS")
+		self.__basedefaultplatforms = evaluator.CheckedGet("BASE_DEFAULT_PLATFORMS")
+		self.__baseuserdefaultplatforms = evaluator.CheckedGet("BASE_USER_DEFAULT_PLATFORMS")
 
 		# Only read each variant.cfg once
 		variantCfgs = {}
@@ -2323,24 +2380,25 @@
 		# with the same "export platform".
 		exports = {}
 
+		self.__Raptor.Debug("MetaReader: configsToBuild:  %s", [b.name for b in configsToBuild])
 		for buildConfig in configsToBuild:
 			# get everything we need to know about the configuration
 			evaluator = self.__Raptor.GetEvaluator(None, buildConfig)
 
 			detail = {}
-			detail['PLATFORM'] = self.CheckValue(evaluator, "TRADITIONAL_PLATFORM")
-			epocroot = self.CheckValue(evaluator, "EPOCROOT")
+			detail['PLATFORM'] = evaluator.CheckedGet("TRADITIONAL_PLATFORM")
+			epocroot = evaluator.CheckedGet("EPOCROOT")
 			detail['EPOCROOT'] = generic_path.Path(epocroot)
 
-			sbs_build_dir = self.CheckValue(evaluator, "SBS_BUILD_DIR")
+			sbs_build_dir = evaluator.CheckedGet("SBS_BUILD_DIR")
 			detail['SBS_BUILD_DIR'] = generic_path.Path(sbs_build_dir)
-			flm_export_dir = self.CheckValue(evaluator, "FLM_EXPORT_DIR")
+			flm_export_dir = evaluator.CheckedGet("FLM_EXPORT_DIR")
 			detail['FLM_EXPORT_DIR'] = generic_path.Path(flm_export_dir)
 			detail['CACHEID'] = flm_export_dir
 			if raptor_utilities.getOSPlatform().startswith("win"):
-				detail['PLATMACROS'] = self.CheckValue(evaluator,"PLATMACROS.WINDOWS")
+				detail['PLATMACROS'] = evaluator.CheckedGet("PLATMACROS.WINDOWS")
 			else:
-				detail['PLATMACROS'] = self.CheckValue(evaluator,"PLATMACROS.LINUX")
+				detail['PLATMACROS'] = evaluator.CheckedGet("PLATMACROS.LINUX")
 
 			# Apply OS variant provided we are not ignoring this
 			if not self.__Raptor.ignoreOsDetection:
@@ -2352,11 +2410,11 @@
 			# is this a feature variant config or an ordinary variant
 			fv = evaluator.Get("FEATUREVARIANTNAME")
 			if fv:
-				variantHdr = self.CheckValue(evaluator, "VARIANT_HRH")
+				variantHdr = evaluator.CheckedGet("VARIANT_HRH")
 				variantHRH = generic_path.Path(variantHdr)
 				detail['ISFEATUREVARIANT'] = True
 			else:
-				variantCfg = self.CheckValue(evaluator, "VARIANT_CFG")
+				variantCfg = evaluator.CheckedGet("VARIANT_CFG")
 				variantCfg = generic_path.Path(variantCfg)
 				if not variantCfg in variantCfgs:
 					# get VARIANT_HRH from the variant.cfg file
@@ -2371,19 +2429,18 @@
 
 			detail['VARIANT_HRH'] = variantHRH
 			self.__Raptor.Info("'%s' uses variant hrh file '%s'", buildConfig.name, variantHRH)
-			detail['SYSTEMINCLUDE'] = self.CheckValue(evaluator, "SYSTEMINCLUDE")
-
-			detail['METADEPS'] = [] # Dependency targets for all metadata files in this platform
+			detail['SYSTEMINCLUDE'] = evaluator.CheckedGet("SYSTEMINCLUDE")
+
 
 			# find all the interface names we need
-			ifaceTypes = self.CheckValue(evaluator, "INTERFACE_TYPES")
+			ifaceTypes = evaluator.CheckedGet("INTERFACE_TYPES")
 			interfaces = ifaceTypes.split()
 
 			for iface in interfaces:
-				detail[iface] = self.CheckValue(evaluator, "INTERFACE." + iface)
+				detail[iface] = evaluator.CheckedGet("INTERFACE." + iface)
 
 			# not test code unless positively specified
-			detail['TESTCODE'] = self.CheckValue(evaluator, "TESTCODE", "")
+			detail['TESTCODE'] = evaluator.CheckedGet("TESTCODE", "")
 
 			# make a key that identifies this platform uniquely
 			# - used to tell us whether we have done the pre-processing
@@ -2454,20 +2511,8 @@
 		# that are supposedly platform independent (e.g. PRJ_PLATFORMS)
 		self.defaultPlatform = self.ExportPlatforms[0]
 
-	def CheckValue(self, evaluator, key, default = None):
-		"""extract a value from an evaluator and raise an exception if None.
-
-		An optional default can be set to replace a None value."""
-		value = evaluator.Get(key)
-		if value == None:
-			if default == None:
-				raise MetaDataError("configuration " + evaluator.config.name +
-								    " has no variable " + key)
-			else:
-				return default
-		return value
-
-	def ReadBldInfFiles(self, aFileList, doExportOnly):
+
+	def ReadBldInfFiles(self, aComponentList, doexport, dobuild = True):
 		"""Take a list of bld.inf files and return a list of build specs.
 
 		The returned specification nodes will be suitable for all the build
@@ -2477,7 +2522,7 @@
 		# we need a Filter node per export platform
 		exportNodes = []
 		for i,ep in enumerate(self.ExportPlatforms):
-			filter = raptor_data.Filter("export_" + str(i))
+			filter = raptor_data.Filter(name = "export_" + str(i))
 
 			# what configurations is this node active for?
 			for config in ep['configs']:
@@ -2488,7 +2533,7 @@
 		# we need a Filter node per build platform
 		platformNodes = []
 		for i,bp in enumerate(self.BuildPlatforms):
-			filter = raptor_data.Filter("build_" + str(i))
+			filter = raptor_data.Filter(name = "build_" + str(i))
 
 			# what configurations is this node active for?
 			for config in bp['configs']:
@@ -2504,18 +2549,18 @@
 
 		# check that each bld.inf exists and add a Specification node for it
 		# to the nodes of the export and build platforms that it supports.
-		for bif in aFileList:
-			if bif.isFile():
-				self.__Raptor.Info("Processing %s", str(bif))
+		for c in aComponentList:
+			if c.bldinf_filename.isFile():
+				self.__Raptor.Info("Processing %s", str(c.bldinf_filename))
 				try:
-					self.AddComponentNodes(bif, exportNodes, platformNodes)
+					self.AddComponentNodes(c, exportNodes, platformNodes)
 
 				except MetaDataError, e:
-					self.__Raptor.Error(e.Text, bldinf=str(bif))
+					self.__Raptor.Error(e.Text, bldinf=str(c.bldinf_filename))
 					if not self.__Raptor.keepGoing:
 						return []
 			else:
-				self.__Raptor.Error("build info file does not exist", bldinf=str(bif))
+				self.__Raptor.Error("build info file does not exist", bldinf=str(c.bldinf_filename))
 				if not self.__Raptor.keepGoing:
 					return []
 
@@ -2547,20 +2592,23 @@
 		# before we can do anything else (because raptor itself must do
 		# some exports before the MMP files that include them can be
 		# processed).
-		for i,p in enumerate(exportNodes):
-			exportPlatform = self.ExportPlatforms[i]
-			for s in p.GetChildSpecs():
-				try:
-					self.ProcessExports(s, exportPlatform)
-
-				except MetaDataError, e:
-					self.__Raptor.Error("%s",e.Text)
-					if not self.__Raptor.keepGoing:
-						return []
+		if doexport:
+			for i,p in enumerate(exportNodes):
+				exportPlatform = self.ExportPlatforms[i]
+				for s in p.GetChildSpecs():
+					try:
+						self.ProcessExports(s, exportPlatform)
+
+					except MetaDataError, e:
+						self.__Raptor.Error("%s",e.Text)
+						if not self.__Raptor.keepGoing:
+							return []
+		else:
+			self.__Raptor.Info("Not Processing Exports (--noexport enabled)")
 
 		# this is a switch to return the function at this point if export
 		# only option is specified in the run
-		if (self.__Raptor.doExportOnly):
+		if dobuild is not True:
 			self.__Raptor.Info("Processing Exports only")
 			return[]
 
@@ -2603,8 +2651,8 @@
 
 		def LeftPortionOf(pth,sep):
 			""" Internal function to return portion of str that is to the left of sep. 
-			The partition is case-insentive."""
-			length = len((pth.lower().partition(sep.lower()))[0])
+			The split is case-insensitive."""
+			length = len((pth.lower().split(sep.lower()))[0])
 			return pth[0:length]
 			
 		modulePath = LeftPortionOf(LeftPortionOf(os.path.dirname(aBldInfPath), "group"), "ongoing")
@@ -2617,74 +2665,78 @@
 		return moduleName
 
 
-	def AddComponentNodes(self, buildFile, exportNodes, platformNodes):
+	def AddComponentNodes(self, component, exportNodes, platformNodes):	
 		"""Add Specification nodes for a bld.inf to the appropriate platforms."""
-		bldInfFile = BldInfFile(buildFile, self.__gnucpp, self.__Raptor)
-
-		specName = self.getSpecName(buildFile, fullPath=True)
-
-		if isinstance(buildFile, raptor_xml.SystemModelComponent):
+		bldInfFile = BldInfFile(component.bldinf_filename, self.__gnucpp, component.depfiles, self.__Raptor)
+		component.bldinf = bldInfFile 
+
+		specName = getSpecName(component.bldinf_filename, fullPath=True)
+
+		if isinstance(component.bldinf, raptor_xml.SystemModelComponent):
 			# this component came from a system_definition.xml
-			layer = buildFile.GetContainerName("layer")
-			component = buildFile.GetContainerName("component")
+			layer = component.bldinf.GetContainerName("layer")
+			componentName = component.bldinf.GetContainerName("component")
 		else:
 			# this is a plain old bld.inf file from the command-line
 			layer = ""
-			component = ""
+			componentName = ""
 
 		# exports are independent of build platform
 		for i,ep in enumerate(self.ExportPlatforms):
-			specNode = raptor_data.Specification(specName)
+			specNode = raptor_data.Specification(name = specName)
 
 			# keep the BldInfFile object for later
-			specNode.bldinf = bldInfFile
+			specNode.component = component
 
 			# add some basic data in a component-wide variant
-			var = raptor_data.Variant()
-			var.AddOperation(raptor_data.Set("COMPONENT_META", str(buildFile)))
-			var.AddOperation(raptor_data.Set("COMPONENT_NAME", component))
+			var = raptor_data.Variant(name='component-wide')
+			var.AddOperation(raptor_data.Set("COMPONENT_META", str(component.bldinf_filename)))
+			var.AddOperation(raptor_data.Set("COMPONENT_NAME", componentName))
 			var.AddOperation(raptor_data.Set("COMPONENT_LAYER", layer))
 			specNode.AddVariant(var)
 
 			# add this bld.inf Specification to the export platform
 			exportNodes[i].AddChild(specNode)
+			component.exportspecs.append(specNode)
 
 		# get the relevant build platforms
 		listedPlatforms = bldInfFile.getBuildPlatforms(self.defaultPlatform)
 		platforms = getBuildableBldInfBuildPlatforms(listedPlatforms,
-													self.__defaultplatforms,
-													self.__basedefaultplatforms,
-													self.__baseuserdefaultplatforms)
-
-
-
-		outputDir = BldInfFile.outputPathFragment(buildFile)
+								self.__defaultplatforms,
+								self.__basedefaultplatforms,
+								self.__baseuserdefaultplatforms)
+
+
+		outputDir = BldInfFile.outputPathFragment(component.bldinf_filename)
 
 		# Calculate "module name"
-		modulename = self.ModuleName(str(buildFile))
+		modulename = self.ModuleName(str(component.bldinf_filename))
 
 		for i,bp in enumerate(self.BuildPlatforms):
+			plat = bp['PLATFORM']
 			if bp['PLATFORM'] in platforms:
-				specNode = raptor_data.Specification(specName)
-
-				# keep the BldInfFile object for later
-				specNode.bldinf = bldInfFile
+				specNode = raptor_data.Specification(name = specName)
+
+				# remember what component this spec node comes from for later
+				specNode.component = component
 
 				# add some basic data in a component-wide variant
-				var = raptor_data.Variant()
-				var.AddOperation(raptor_data.Set("COMPONENT_META",str(buildFile)))
-				var.AddOperation(raptor_data.Set("COMPONENT_NAME", component))
+				var = raptor_data.Variant(name='component-wide-settings-' + plat)
+				var.AddOperation(raptor_data.Set("COMPONENT_META",str(component.bldinf_filename)))
+				var.AddOperation(raptor_data.Set("COMPONENT_NAME", componentName))
 				var.AddOperation(raptor_data.Set("COMPONENT_LAYER", layer))
 				var.AddOperation(raptor_data.Set("MODULE", modulename))
 				var.AddOperation(raptor_data.Append("OUTPUTPATHOFFSET", outputDir, '/'))
 				var.AddOperation(raptor_data.Append("OUTPUTPATH", outputDir, '/'))
 				var.AddOperation(raptor_data.Append("BLDINF_OUTPUTPATH",outputDir, '/'))
 
-				var.AddOperation(raptor_data.Set("TEST_OPTION", specNode.bldinf.getRomTestType(bp)))
+				var.AddOperation(raptor_data.Set("TEST_OPTION", component.bldinf.getRomTestType(bp)))
 				specNode.AddVariant(var)
 
 				# add this bld.inf Specification to the build platform
 				platformNodes[i].AddChild(specNode)
+				# also attach it into the component
+				component.specs.append(specNode)
 
 	def ProcessExports(self, componentNode, exportPlatform):
 		"""Do the exports for a given platform and skeleton bld.inf node.
@@ -2696,18 +2748,18 @@
 		[some MMP files #include exported .mmh files]
 		"""
 		if exportPlatform["TESTCODE"]:
-			exports = componentNode.bldinf.getTestExports(exportPlatform)
+			exports = componentNode.component.bldinf.getTestExports(exportPlatform)
 		else:
-			exports = componentNode.bldinf.getExports(exportPlatform)
+			exports = componentNode.component.bldinf.getExports(exportPlatform)
 
 		self.__Raptor.Debug("%i exports for %s",
-							len(exports), str(componentNode.bldinf.filename))
+							len(exports), str(componentNode.component.bldinf.filename))
 		if exports:
 
 			# each export is either a 'copy' or 'unzip'
 			# maybe we should trap multiple exports to the same location here?
 			epocroot = str(exportPlatform["EPOCROOT"])
-			bldinf_filename = str(componentNode.bldinf.filename)
+			bldinf_filename = str(componentNode.component.bldinf.filename)
 			exportwhatlog="<whatlog bldinf='%s' mmp='' config=''>\n" % bldinf_filename
 			for export in exports:
 				expSrc = export.getSource()
@@ -2730,7 +2782,6 @@
 							# export the file
 							exportwhatlog += self.CopyExport(fromFile, toFile, bldinf_filename)
 						else:
-							# unzip the zip
 							exportwhatlog += ("<archive zipfile='" + str(fromFile) + "'>\n")
 							members = self.UnzipExport(fromFile, toFile,
 									str(exportPlatform['SBS_BUILD_DIR']),
@@ -2878,6 +2929,11 @@
 						expfile = open(expfilename, 'wb')
 						expfile.write(exportzip.read(file))
 						expfile.close()
+						
+						# Resurrect any file execution permissions present in the archived version
+						if (exportzip.getinfo(file).external_attr >> 16L) & 0100:
+							os.chmod(expfilename, stat.S_IMODE(os.stat(expfilename).st_mode) | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)						
+						
 						# Each file keeps its modified time the same as what it was before unzipping
 						accesstime = time.time()
 						datetime = exportzip.getinfo(file).date_time
@@ -2917,12 +2973,12 @@
 			return	# feature variation does not run extensions at all
 		
 		if buildPlatform["TESTCODE"]:
-			extensions = componentNode.bldinf.getTestExtensions(buildPlatform)
+			extensions = componentNode.component.bldinf.getTestExtensions(buildPlatform)
 		else:
-			extensions = componentNode.bldinf.getExtensions(buildPlatform)
+			extensions = componentNode.component.bldinf.getExtensions(buildPlatform)
 
 		self.__Raptor.Debug("%i template extension makefiles for %s",
-							len(extensions), str(componentNode.bldinf.filename))
+							len(extensions), str(componentNode.component.bldinf.filename))
 
 		for i,extension in enumerate(extensions):
 			if self.__Raptor.projects:
@@ -3001,14 +3057,20 @@
 		gnuList = []
 		makefileList = []
 
+
+		component = componentNode.component
+
+
 		if buildPlatform["TESTCODE"]:
-			MMPList = componentNode.bldinf.getTestMMPList(buildPlatform)
+			MMPList = component.bldinf.getTestMMPList(buildPlatform)
 		else:
-			MMPList = componentNode.bldinf.getMMPList(buildPlatform)
-
-		bldInfFile = componentNode.bldinf.filename
+			MMPList = component.bldinf.getMMPList(buildPlatform)
+
+		bldInfFile = component.bldinf.filename
 
 		for mmpFileEntry in MMPList['mmpFileList']:
+			component.AddMMP(mmpFileEntry.filename) # Tell the component another mmp is specified (for this platform)
+
 			projectname = mmpFileEntry.filename.File().lower()
 
 			if self.__Raptor.projects:
@@ -3026,7 +3088,8 @@
 
 			mmpFile = MMPFile(foundmmpfile,
 								   self.__gnucpp,
-								   bldinf = componentNode.bldinf,
+								   component.bldinf,
+								   component.depfiles,
 								   log = self.__Raptor)
 
 			mmpFilename = mmpFile.filename
@@ -3060,7 +3123,7 @@
 				continue
 			
 			# now build the specification tree
-			mmpSpec = raptor_data.Specification(self.getSpecName(mmpFilename))
+			mmpSpec = raptor_data.Specification(generic_path.Path(getSpecName(mmpFilename)))
 			var = backend.BuildVariant
 
 			var.AddOperation(raptor_data.Set("PROJECT_META", str(mmpFilename)))
@@ -3096,7 +3159,7 @@
 
 			# Although not part of the MMP, some MMP-based build specs additionally require knowledge of their
 			# container bld.inf exported headers
-			for export in componentNode.bldinf.getExports(buildPlatform):
+			for export in componentNode.component.bldinf.getExports(buildPlatform):
 				destination = export.getDestination()
 				if isinstance(destination, list):
 					exportfile = str(destination[0])
@@ -3109,6 +3172,16 @@
 			# now we have something worth adding to the component
 			mmpSpec.AddVariant(var)
 			componentNode.AddChild(mmpSpec)
+			
+			# if there are APPLY variants then add them to the mmpSpec too
+			for applyVar in backend.ApplyVariants:
+				try:
+					mmpSpec.AddVariant(self.__Raptor.cache.FindNamedVariant(applyVar))
+				except KeyError:
+					self.__Raptor.Error("APPLY unknown variant '%s' in %s",
+								        applyVar,
+								        str(mmpFileEntry.filename),
+								        bldinf=str(bldInfFile))
 
 			# resources, stringtables and bitmaps are sub-nodes of this project
 			# (do not add these for feature variant builds)
@@ -3152,7 +3225,7 @@
 					self.projectList.remove(projectname)
 
 			self.__Raptor.Debug("%i gnumakefile extension makefiles for %s",
-						len(gnuList), str(componentNode.bldinf.filename))
+						len(gnuList), str(componentNode.component.bldinf.filename))
 			var = raptor_data.Variant()
 			gnuSpec = raptor_data.Specification("gnumakefile " + str(g.getMakefileName()))
 			interface = buildPlatform["ext_makefile"]
@@ -3184,7 +3257,7 @@
 					projectList.remove(projectname)
 
 			self.__Raptor.Debug("%i makefile extension makefiles for %s",
-						len(makefileList), str(componentNode.bldinf.filename))
+						len(makefileList), str(componentNode.component.bldinf.filename))
 			var = raptor_data.Variant()
 			gnuSpec = raptor_data.Specification("makefile " + str(m.getMakefileName()))
 			interface = buildPlatform["ext_makefile"]
@@ -3205,17 +3278,6 @@
 			gnuSpec.AddVariant(var)
 			componentNode.AddChild(gnuSpec)
 
-	def getSpecName(self, aFileRoot, fullPath=False):
-		"""Returns a build spec name: this is the file root (full path
-		or simple file name) made safe for use as a file name."""
-
-		if fullPath:
-			specName = str(aFileRoot).replace("/","_")
-			specName = specName.replace(":","")
-		else:
-			specName = aFileRoot.File()
-
-		return specName.lower()
 
 	def ApplyOSVariant(self, aBuildUnit, aEpocroot):
 		# Form path to kif.xml and path to buildinfo.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/python/raptor_timing.py	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,168 @@
+#
+# Copyright (c) 2009 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"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# timings API
+# This API can be used to start and stop timings in order to measure performance
+#
+import time
+
+class Timing(object):
+	
+	@classmethod
+	def discovery_string(cls, object_type, count):
+		"""
+			Returns a tag that can be used to show what is about to be
+					"processed"
+			Parameters:
+				object_type - string
+					Type of object that is about to be "processed" in this task
+				count - int
+					Number of objects of input "object_type" are about to be
+							"processed"
+			Returns:
+				string
+					XML tag in the format that can be printed directly to a
+							Raptor log
+		"""
+		return "<progress:discovery object_type='" + str(object_type) + \
+				"' count='" + str(count) + "' />\n"
+				
+	
+	@classmethod
+	def start_string(cls, object_type, task, key):
+		"""
+			Returns a tag that can be used to show what is being "processed"
+					and the time it started
+			Parameters:
+				object_type - string
+					Type of object that is being "processed" in this task
+				task - string
+					What is being done with the object being "processed"
+				key - string
+					Unique identifier for the object being "processed"
+			Returns:
+				string
+					XML tag in the format that can be printed directly to a
+							Raptor log
+		"""
+		return "<progress:start object_type='" + str(object_type) + \
+				"' task='" + str(task) + "' key='" + str(key) + \
+				"' time='" + str(time.time()) + "' />\n"
+	
+	
+	@classmethod
+	def end_string(cls, object_type, task, key):
+		"""
+			Returns a tag that can be used to show what was being "processed"
+					and the time it finished
+			Parameters:
+				object_type - string
+					Type of object that was being "processed" in this task
+				task - string
+					What was being done with the object being "processed"
+				key - string
+					Unique identifier for the object that was "processed"
+			Returns:
+				string
+					XML tag in the format that can be printed directly to a
+							Raptor log
+		"""
+		return "<progress:end object_type='" + str(object_type) + \
+				"' task='" + str(task) + "' key='" + str(key) + \
+				"' time='" + str(time.time()) + "' />\n"
+	
+	
+	@classmethod
+	def custom_string(cls, tag = "duration", object_type = "all", task = "all",
+			key = "all", time = 0.0):
+		"""
+			Returns a custom tag in the 'progress' tag format
+			
+			Parameters:
+				tag - string
+					String to be used for the tag 
+				object_type - string
+					Type of object that was being "processed" in this task
+				task - string
+					What was being done with the object being "processed"
+				key - string
+					Unique identifier for the object that was "processed"
+				time - float
+					The time to be included in the tag
+			Returns:
+				string
+					XML tag in the format that can be printed directly to a
+							Raptor log
+		"""		
+		time_string = "time"
+		if tag == "duration":
+			time_string = "duration" 
+		return "<progress:" + str(tag) + " object_type='" + str(object_type) + \
+				"' task='" + str(task) + "' key='" + str(key) + \
+				"' " + time_string + "='" + str(time) + "' />\n"
+	
+	
+	@classmethod
+	def extract_values(cls, source):
+		"""
+			Takes, as input, a single tag of the format returned by one of the
+					above progress functions. Will extract the attributes and
+					return them as a dictionary. Returns an empty dictionary {}
+					if the tag name is not recognised or there is a parse error
+			Parameters:
+				source - string
+					The input string from which extracted attributes are
+							required
+			Returns:
+				dictionary
+					Dictionary containing the attributes extracted from the
+							input string. Returns an empty dictionary {} if the
+							tag name is not recognised or there is a parse error
+			NB: This function will not work correctly if the 'source' variable
+					contains multiple tags
+		"""
+		import re
+		
+		attributes = {}
+					
+		try:
+			match = re.match(re.compile(".*object_type='(?P<object_type>.*?)'"),
+					source)
+			attributes["object_type"] = match.group("object_type")
+		except AttributeError, e:
+			print e
+			attributes["object_type"] = ""
+		try:
+			match = re.match(re.compile(".*task='(?P<task>.*?)'"), source)
+			attributes["task"] = match.group("task")
+		except AttributeError, e:
+			print e
+			attributes["task"] = ""
+		try:
+			match = re.match(re.compile(".*key='(?P<key>.*?)'"), source)
+			attributes["key"] = match.group("key")
+		except AttributeError:
+			attributes["key"] = ""
+		try:
+			match = re.match(re.compile(".*time='(?P<time>.*?)'"), source)
+			attributes["time"] = match.group("time")
+		except AttributeError:
+			attributes["time"] = ""
+		try:
+			match = re.match(re.compile(".*count='(?P<count>.*?)'"), source)
+			attributes["count"] = match.group("count")
+		except AttributeError:
+			attributes["count"] = ""
+			
+		return attributes
--- a/sbsv2/raptor/python/raptor_version.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/python/raptor_version.py	Mon Dec 07 12:50:33 2009 +0000
@@ -15,6 +15,12 @@
 # raptor version information module
 #
 
-def Version():
+version=(2,11,1,"2009-12-16","symbian build system")
+
+def numericversion():
 	"""Raptor version string"""
-	return "2.10.2 [2009-11-12 sf release]"
+	return "%d.%d.%d" % version[:3]
+
+def fullversion():
+	"""Raptor version string"""
+	return "%d.%d.%d [%s %s]" % version
--- a/sbsv2/raptor/python/raptor_xml.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/python/raptor_xml.py	Mon Dec 07 12:50:33 2009 +0000
@@ -222,6 +222,10 @@
 	def DumpInfo(self):
 		self.__Logger.Info("Found %d bld.inf references in %s within %d layers:", len(self.GetAllComponents()), self.__SystemDefinitionFile, len(self.GetLayerNames()))
 		self.__Logger.Info("\t%s", ", ".join(self.GetLayerNames()))
+		self.__Logger.InfoDiscovery(object_type = "layers",
+				count = len(self.GetLayerNames()))
+		self.__Logger.InfoDiscovery(object_type = "bld.inf references",
+				count = len(self.GetAllComponents()))
 
 	def __Read(self):
 		if not os.path.exists(self.__SystemDefinitionFile):
--- a/sbsv2/raptor/test/common/raptor_tests.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/test/common/raptor_tests.py	Mon Dec 07 12:50:33 2009 +0000
@@ -100,8 +100,14 @@
 				except OSError, error:
 					pass
 	else:
-		(comIn, comOut) = os.popen4("which " + input_file)
-		output = comOut.read()
+		whichproc = subprocess.Popen(args=["which", input_file], 
+					stdout=subprocess.PIPE,
+					stderr=subprocess.STDOUT,
+					shell=False,
+					universal_newlines=True)
+		output = whichproc.stdout.readlines()
+		whichproc.wait()
+
 		if len(output) > 0:
 			locations.append(output[0:(len(output) - 1)])
 				
@@ -115,40 +121,41 @@
 	This method walks through epocroot and cleans every file and folder that is
 	not present in the manifest file
 	"""
+	epocroot = os.path.abspath(os.environ['EPOCROOT']).replace('\\','/')
+	print "Cleaning Epocroot: %s" % epocroot
 	all_files = {} # dictionary to hold all files
 	folders = [] # holds all unique folders in manifest
+	host_platform = os.environ["HOSTPLATFORM_DIR"]
 	try:
-		mani = "./epocroot/manifest"
+		mani = "$(EPOCROOT)/manifest"
 		manifest = open(ReplaceEnvs(mani), "r")
-		# This is a fast algorithm to read the manifest file
-		while 1:
-            # The file is close to 3000 lines.
-            # If this value changes, increment the number to include all lines
-			lines = manifest.readlines(3000)
-			if not lines:
-				break
-			for line in lines:
-				# Get rid of newline char and add to dictionary
-				all_files[line.rstrip("\n")] = True
-				# This bit makes a record of unique folders into a list
-				end = 0
-				while end != -1: # Look through the parent folders
-					end = line.rfind("/")
-					line = line[:end]
-					if line not in folders:
-						folders.append(line)
+		le = len(epocroot)
+		for line in manifest:
+			line = line.replace("$(HOSTPLATFORM_DIR)", host_platform)
+			line = line.replace("./", epocroot+"/").rstrip("\n")
+			all_files[line] = True
+			# This bit makes a record of unique folders into a list
+			pos = line.rfind("/", le)
+			while pos > le: # Look through the parent folders
+				f = line[:pos]
+				if f not in folders:
+					folders.append(f)
+				pos = line.rfind("/", le, pos)
+				
+
 		# This algorithm walks through epocroot and handles files and folders
-		walkpath = "./epocroot"
+		walkpath = "$(EPOCROOT)"
 		for (root, dirs, files) in os.walk(ReplaceEnvs(walkpath), topdown =
 				False):
+			if root.find(".hg") != -1:
+				continue
+
 			# This loop handles all files
 			for name in files:
 				name = os.path.join(root, name).replace("\\", "/")
-				name = name.replace("./epocroot/", "./")
 								
 				if name not in all_files:
 					try:
-						name = ReplaceEnvs(name.replace("./", "./epocroot/"))
 						os.remove(name)
 					except:
 						# chmod to rw and try again
@@ -163,12 +170,14 @@
 									
 			# This loop handles folders
 			for name in dirs:
+				if name.find(".hg") != -1:
+					continue
+				
 				name = os.path.join(root, name).replace("\\", "/")
-				name = name.replace("./epocroot/", "./")
 				if name not in all_files and name not in folders:
 					# Remove the folder fully with no errors if full
 					try:
-						rmtree(ReplaceEnvs(name.replace("./", "./epocroot/")))
+						rmtree(ReplaceEnvs(name))
 					except:
 						print "\nEPOCROOT-CLEAN ERROR:"
 						print (sys.exc_type.__name__ + ":"), \
@@ -176,9 +185,16 @@
 								traceback.print_tb(sys.exc_traceback)
 	except IOError,e:
 		print e
+	
+	print "Epocroot Cleaned"
 
 def fix_id(input_id):
 	return input_id.zfill(4)
+
+
+def grep(file, string):
+	return
+
 	
 # Test classes ################################################################
 
@@ -186,13 +202,15 @@
 	"""Base class for Smoke Test objects.
 	
 	Each test is defined (minimally) by,
-	1) a raptor command-line
-	2) a list of target files that should get built
+	1) an ID number as a string
+	2) a name
+	3) a raptor command-line
+	4) some parameters to check the command results against
 
 	The run() method will,
 	1) delete all the listed target files
 	2) execute the raptor command
-	3) check that the target files were created
+	3) check that the test results match the test parameters
 	4) count the warnings and errors reported
 	"""
 	
@@ -202,7 +220,7 @@
 
 	def __init__(self):
 		
-		self.id = 0
+		self.id = "0"
 		self.name = "smoketest"
 		self.description = ""
 		self.command = "sbs --do_what_i_want"
@@ -261,23 +279,24 @@
 			self.result = SmokeTest.FAIL
 		
 		# print the result of this run()
-		self.print_result(True)
+		self.print_result(internal = True)
 		
 		# if a previous run() failed then the overall result is a FAIL
 		if previousResult == SmokeTest.FAIL:
 			self.result = SmokeTest.FAIL
 	
-	def print_result(self, internal = False, value = ""):
+	def print_result(self, value = "", internal = False):
 		# the test passed :-)
 		
 		result = self.result
+			
+		string = ""
+		if not internal:
+			string += "\n" + self.name + ": "
 		
-		if value != "":
-			print value
+		if value:
+			print string + value
 		else:
-			string = ""
-			if not internal:
-				string += "\n" + self.name + ": "
 			if result == SmokeTest.PASS:
 				string += "PASSED"
 			elif result == SmokeTest.FAIL:
@@ -366,19 +385,27 @@
 		# Any environment settings specific to this test
 		shellenv = os.environ.copy()
 		for ev in self.environ:
-			shellenv[ev] = self.environ[ev]	
+			shellenv[ev] = self.environ[ev]
 
 		if self.usebash:
 			shellpath = shellenv['PATH']
+			
+			if 'SBS_SHELL' in os.environ:
+				BASH = os.environ['SBS_SHELL']
+			else:
+				if self.onWindows:
+					if 'SBS_CYGWIN' in shellenv:
+						BASH = ReplaceEnvs("$(SBS_CYGWIN)/bin/bash.exe")
+					else:
+						BASH = ReplaceEnvs("$(SBS_HOME)/win32/cygwin/bin/bash.exe")
+				else:
+					BASH = ReplaceEnvs("$(SBS_HOME)/$(HOSTPLATFORM_DIR)/bin/bash")
+				
 			if self.onWindows:
 				if 'SBS_CYGWIN' in shellenv:
 					shellpath = ReplaceEnvs("$(SBS_CYGWIN)/bin") + ";" + shellpath
-					BASH=ReplaceEnvs("$(SBS_CYGWIN)/bin/bash.exe")
 				else:
 					shellpath = ReplaceEnvs("$(SBS_HOME)/win32/cygwin/bin") + ";" + shellpath
-					BASH=ReplaceEnvs("$(SBS_HOME)/win32/cygwin/bin/bash.exe")
-			else:
-				BASH=ReplaceEnvs("$(SBS_HOME)/$(HOSTPLATFORM_DIR)/bin/bash")
 
 			shellenv['SBSMAKEFILE']=ReplaceEnvs(self.makefile())
 			shellenv['SBSLOGFILE']=ReplaceEnvs(self.logfile())
@@ -645,5 +672,6 @@
 			else:
 				self.antitargets.append(["$(EPOCROOT)/epoc32/build/"+fragment+"/"+x for x in t])
 		return
+
 	
 # the end
--- a/sbsv2/raptor/test/common/run_tests.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/test/common/run_tests.py	Mon Dec 07 12:50:33 2009 +0000
@@ -277,8 +277,18 @@
 			# Save start/end times and save in dictionary for TMS
 			start_time = datetime.datetime.now()
 			try:
-				print "\n\nTEST " + str(test_number) + "/" + \
-						str(test_total) + ":\n",
+				test_number_text = "\n\nTEST " + str(test_number) + "/" + \
+						str(test_total) + ":"
+				
+				if self.fail_total > 0:
+					test_number_text += "    So far " + str(self.fail_total) + \
+							" FAILED"
+				if self.exception_total > 0:
+					test_number_text += "    So far " + str(self.exception_total) + \
+							" ERRONEOUS"
+				
+				print test_number_text
+				
 				test_object = test.run()
 				
 				end_time = datetime.datetime.now()
@@ -330,6 +340,7 @@
 						traceback.print_tb(sys.exc_traceback)
 				self.exception_total += 1
 				self.error_tests.append(str(self.test_set[test_number - 1]))
+								
 				
 		if self.upload_location != None:
 			self.create_csv()
@@ -487,7 +498,7 @@
 		print "\n(Tests run using %s" %options_dir
 
 		# Summarise the entire test run
-		if self.suitepattern and (self.test_total < 1):
+		if self.suitepattern and (len(suites) < 1):
 			print "\nNo suites matched specification '" + self.suitepattern + \
 					"'\n"
 		else:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/config/apply_test_variants.xml	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<build xmlns="http://symbian.com/xml/build"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://symbian.com/xml/build build/2_0.xsd">
+
+  <!-- These variants are used to test the APPLY keyword -->
+
+  <var name="apply_test_append_cdefs">
+	<append name="CDEFS" value="APPLYTESTAPPENDCDEFS" />
+  </var>
+  
+</build>
--- a/sbsv2/raptor/test/config/arm.xml	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/test/config/arm.xml	Mon Dec 07 12:50:33 2009 +0000
@@ -7,6 +7,7 @@
   <!-- build configurations for ARM compilers -->
 
   <var name="ARMV5_BASE">
+    <env name='SBS_HOME' default='' type='path'/>
     <env name='EPOCROOT'/>
     <env name='ARMROOT'/>
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/retirement/metadep.py	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,50 @@
+#
+# Copyright (c) 2009 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"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+
+from raptor_tests import SmokeTest
+
+def run():
+	t = SmokeTest()
+	t.id = "71"
+	t.name = "metadep"
+	t.description =  """Tests metadata dependency generation.  Changes 
+			to bld.infs and mmps can be detected."""
+	t.usebash = True
+	t.command = """export SBSLOGFILE SBSMAKEFILE; bash smoke_suite/test_resources/metadep.sh 2>&1"""
+			
+	t.targets = [
+		]
+
+	t.mustmatch_multiline = [
+""".*Step 1 .*no warnings or errors.*
+sbs: build log in.*
+\+ sleep 1.*
+.*make -rf .*epoc32/build/metadata_all.mk.*
+.*make.*epoc32/build/metadata_all.mk. is up to date.*
+Step 2 .*
+.*RE-RUNNING SBS with previous parameters.*
+Step 3 .*
+.*RE-RUNNING SBS with previous parameters.*
+.*RE-RUNNING SBS with previous parameters.*"""
+	]
+	t.mustnotmatch_multiline = [
+"""RE-RUNNING SBS with previous parameters.*
+RE-RUNNING SBS with previous parameters.*
+RE-RUNNING SBS with previous parameters.*
+RE-RUNNING SBS with previous parameters.*"""
+	]
+	t.run()
+	return t
--- a/sbsv2/raptor/test/smoke_suite/bitmap.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/test/smoke_suite/bitmap.py	Mon Dec 07 12:50:33 2009 +0000
@@ -40,10 +40,10 @@
 		"testbitmap_dll/testbitmap.mBm_bmconvcommands"
 	])
 	t.mustmatch = [
-		".*Makefile.bitmap:MIFCONV_TEST:=1.*"
+		".*Makefile(_all)?.bitmap:MIFCONV_TEST:=1.*"
 	]
 	t.mustnotmatch = [
-		".*Makefile.default:MIFCONV_TEST.*"
+		".*Makefile(_all)?.default:MIFCONV_TEST.*"
 	]
 	t.run()
 	return t
--- a/sbsv2/raptor/test/smoke_suite/clean_readonly.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/test/smoke_suite/clean_readonly.py	Mon Dec 07 12:50:33 2009 +0000
@@ -19,26 +19,54 @@
 import stat
 
 def run():
-	# This particular file createstaticdll.dll is changed to be readonly to test
-	# 		if sbs CLEAN command actually gets rid of read only files
-	fileForClean = (os.environ['EPOCROOT'] + \
-			"/epoc32/release/armv5/urel/createstaticdll.dll")
-	if os.path.exists(fileForClean):
-		os.chmod(fileForClean, stat.S_IREAD)
+	
+	# build something; make it read-only; then try and clean it
 	
 	t = AntiTargetSmokeTest()
-	t.id = "10"
+	t.id = "10a"
 	t.name = "cleanreadonly" 
-	t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c armv5 CLEAN"
-	t.antitargets = [
+	t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c armv5"
+	t.targets = [
 		"$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll.sym",
-		"$(EPOCROOT)/epoc32/build/test/simple_dll/createstaticdll_dll/armv5/udeb/CreateStaticDLL.o",
 		"$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll.dll.sym",
-		"$(EPOCROOT)/epoc32/build/test/simple_dll/createstaticdll_dll/armv5/urel/CreateStaticDLL.o",
 		"$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll.dso",
 		"$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll{000a0000}.dso",
 		"$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll",
 		"$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll.dll"
 	]
+	t.addbuildtargets("smoke_suite/test_resources/simple_dll/bld.inf",
+	[
+	"createstaticdll_dll/armv5/udeb/CreateStaticDLL.o",
+	"createstaticdll_dll/armv5/urel/CreateStaticDLL.o"
+	])
 	t.run()
+	setupOK = (t.result != AntiTargetSmokeTest.FAIL)
+	
+	# This particular file createstaticdll.dll is changed to be readonly to test
+	# 		if sbs CLEAN command actually gets rid of read only files
+	fileForClean = os.environ['EPOCROOT'] + "/epoc32/release/armv5/urel/createstaticdll.dll"
+	if os.path.exists(fileForClean):
+		os.chmod(fileForClean, stat.S_IREAD)
+	
+	t.id = "10"
+	t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c armv5 CLEAN"
+	t.targets = []
+	t.antitargets = [
+		"$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll.sym",
+		"$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll.dll.sym",
+		"$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll.dso",
+		"$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll{000a0000}.dso",
+		"$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll",
+		"$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll.dll"
+	]
+	t.addbuildantitargets("smoke_suite/test_resources/simple_dll/bld.inf",
+	[
+	"createstaticdll_dll/armv5/udeb/CreateStaticDLL.o",
+	"createstaticdll_dll/armv5/urel/CreateStaticDLL.o"
+	])
+	t.run()
+	
+	if not setupOK:
+		t.result = AntiTargetSmokeTest.FAIL
+		
 	return t
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/commandline.py	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,21 @@
+# General commandline option handling tests which aren't appropriate as unit tests.
+
+from raptor_tests import SmokeTest
+
+def run():
+	t = SmokeTest()
+	t.id = "91a"
+	t.name = "commandline_nodefaults"
+	t.description = """Test that raptor complains if you run it without specifying any components and there is no default bld.inf or system definition in the current directory."""
+	t.usebash = True
+			
+	t.command = """
+		TMPDIR="build/commandline_testdefaults";
+		cd $(EPOCROOT)/epoc32 && rm -rf "$TMPDIR" 2>/dev/null; mkdir -p "$TMPDIR" && cd "$TMPDIR" &&
+		sbs ${SBSLOGFILE} -n ; rm -rf "$TMPDIR"
+m	""" 
+		
+	t.mustmatch = [".*warning: No default bld.inf or system definition.*found.* "]
+	t.warnings = 1
+	t.result = t.run()
+	return t
--- a/sbsv2/raptor/test/smoke_suite/dll_armv6.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/test/smoke_suite/dll_armv6.py	Mon Dec 07 12:50:33 2009 +0000
@@ -18,10 +18,9 @@
 
 def run():
 	t = AntiTargetSmokeTest()
-	t.id = "97"
-	t.name = "dll_armv6"
-	t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c armv6"
-	t.targets = [
+
+	rootcommand = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf"
+	targets = [
 		"$(EPOCROOT)/epoc32/release/armv6/udeb/createstaticdll.dll.sym",
 		"$(EPOCROOT)/epoc32/release/armv6/urel/createstaticdll.dll.sym",
 		"$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll.dso",
@@ -29,15 +28,41 @@
 		"$(EPOCROOT)/epoc32/release/armv6/udeb/createstaticdll.dll",
 		"$(EPOCROOT)/epoc32/release/armv6/urel/createstaticdll.dll"
 		]
-	t.antitargets = [
+	antitargets = [
 		"$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll.lib",
 		"$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll{000a0000}.lib"
 		]
-	t.addbuildtargets('smoke_suite/test_resources/simple_dll/bld.inf', [
+	buildtargets = [
 		"createstaticdll_dll/armv6/udeb/CreateStaticDLL.o",
 		"createstaticdll_dll/armv6/urel/CreateStaticDLL.o",
 		"createstaticdll_dll/armv6/udeb/armv6_specific.o",
 		"createstaticdll_dll/armv6/urel/armv6_specific.o"
-	])
+	]
+	
+	t.id = "0097a"
+	t.name = "dll_armv6_rvct"
+	t.command = rootcommand + " -c armv6"
+	t.targets = targets
+	t.antitargets = antitargets
+	t.addbuildtargets("smoke_suite/test_resources/simple_dll/bld.inf", buildtargets)
 	t.run()
+
+	t.id = "0097b"
+	t.name = "dll_armv6_clean"
+	t.command = rootcommand + " -c armv6 clean"
+	t.targets = []
+	t.antitargets = []
+	t.run()
+
+	t.id = "0097c"
+	t.name = "dll_armv6_gcce"
+	t.command = rootcommand + " -c arm.v6.udeb.gcce4_3_2 -c arm.v6.urel.gcce4_3_2"
+	t.targets = targets
+	t.antitargets = antitargets
+	t.addbuildtargets("smoke_suite/test_resources/simple_dll/bld.inf", buildtargets)
+	t.run()
+
+	t.id = "97"
+	t.name = "dll_armv6"
+	t.print_result()
 	return t
--- a/sbsv2/raptor/test/smoke_suite/dll_armv7.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/test/smoke_suite/dll_armv7.py	Mon Dec 07 12:50:33 2009 +0000
@@ -18,10 +18,9 @@
 
 def run():
 	t = SmokeTest()
-	t.id = "11"
-	t.name = "dll_armv7"
-	t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c armv7"
-	t.targets = [
+	
+	rootcommand = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf"
+	targets = [
 		"$(EPOCROOT)/epoc32/release/armv7/udeb/createstaticdll.dll.sym",
 		"$(EPOCROOT)/epoc32/release/armv7/urel/createstaticdll.dll.sym",
 		"$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll.dso",
@@ -29,11 +28,34 @@
 		"$(EPOCROOT)/epoc32/release/armv7/udeb/createstaticdll.dll",
 		"$(EPOCROOT)/epoc32/release/armv7/urel/createstaticdll.dll"
 		]
-	t.addbuildtargets('smoke_suite/test_resources/simple_dll/bld.inf', [
+	buildtargets = [
 		"createstaticdll_dll/armv7/udeb/CreateStaticDLL.o",
 		"createstaticdll_dll/armv7/urel/CreateStaticDLL.o",
 		"createstaticdll_dll/armv7/udeb/armv7_specific.o",
 		"createstaticdll_dll/armv7/urel/armv7_specific.o"		
-	])
+	]
+	
+	t.id = "0011a"
+	t.name = "dll_armv7_rvct"
+	t.command = rootcommand + " -c armv7"
+	t.targets = targets
+	t.addbuildtargets("smoke_suite/test_resources/simple_dll/bld.inf", buildtargets)
 	t.run()
+
+	t.id = "0011b"
+	t.name = "dll_armv7_clean"
+	t.command = rootcommand + " -c armv7 clean"
+	t.targets = []
+	t.run()
+
+	t.id = "0011c"
+	t.name = "dll_armv7_gcce"
+	t.command = rootcommand + " -c arm.v7.udeb.gcce4_3_2 -c arm.v7.urel.gcce4_3_2"
+	t.targets = targets
+	t.addbuildtargets("smoke_suite/test_resources/simple_dll/bld.inf", buildtargets)
+	t.run()
+
+	t.id = "11"
+	t.name = "dll_armv7"
+	t.print_result()
 	return t
--- a/sbsv2/raptor/test/smoke_suite/exe_armv5_winscw_check.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/test/smoke_suite/exe_armv5_winscw_check.py	Mon Dec 07 12:50:33 2009 +0000
@@ -15,6 +15,7 @@
 #
 
 from raptor_tests import CheckWhatSmokeTest
+import re
 
 def run():
 	t = CheckWhatSmokeTest()
@@ -44,4 +45,32 @@
 		"MISSING: $(EPOCROOT)/epoc32/release/winscw/urel/test.exe.map"
 	]
 	t.run()
+
+	t.id = "6a"
+	t.name = "exe_armv5_winscw_check_error"
+	t.command = "sbs -b no/such/bld.inf --check"
+	t.targets = []
+	t.missing = 0
+	t.errors = 2
+	t.returncode = 1
+	t.regexlinefilter = re.compile("^NEVER") # no literal stdout matching
+	t.stdout = []
+	t.mustmatch = [
+		"sbs: error:.*build info file does not exist",
+		"sbs: error: no CHECK information found",
+	]
+	t.run()
+
+	t.id = "6b"
+	t.name = "exe_armv5_winscw_what_error"
+	t.command = "sbs -b no/such/bld.inf --what"
+	t.mustmatch = [
+		"sbs: error:.*build info file does not exist",
+		"sbs: error: no WHAT information found",
+	]
+	t.run()
+
+	t.id = "6"
+	t.name = "exe_armv5_winscw_check"
+	t.print_result()
 	return t
--- a/sbsv2/raptor/test/smoke_suite/exe_checksource.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/test/smoke_suite/exe_checksource.py	Mon Dec 07 12:50:33 2009 +0000
@@ -14,6 +14,10 @@
 # Description: 
 #
 
+# NB - the checksource filter can find the same problem twice
+# So the count of 5 errors here is not actually accurate (AFAIK there are only 4)
+
+
 from raptor_tests import SmokeTest
 
 def run():
@@ -30,7 +34,7 @@
 	t.command = cmd1 + " && " + cmd2 + " && " + cmd3
 
 	t.mustmatch = [
-		".* 6 checksource errors found.*"
+		".* 5 checksource errors found.*"
 		]
 	t.returncode = 1
 	t.run("windows")
--- a/sbsv2/raptor/test/smoke_suite/export.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/test/smoke_suite/export.py	Mon Dec 07 12:50:33 2009 +0000
@@ -21,8 +21,9 @@
 	result = SmokeTest.PASS
 	
 	# This .inf file is created for clean_simple_export and
-	# reallyclean_simple_export tests to use, because of $$USER problem occuring
-	# at the front end.
+	# reallyclean_simple_export tests to use so that we can put the
+	# username into the output filenames - which helps a lot when
+	# several people run tests on the same computer (e.g. linux machines)
 	bld = open('smoke_suite/test_resources/simple_export/expbld.inf', 'w')
 	bld.write("PRJ_PLATFORMS\n"
 		"ARMV5 WINSCW\n\n"
@@ -69,7 +70,7 @@
 	t.id = "0023b"
 	t.name = "export_clean" 
 	t.command = "sbs -b smoke_suite/test_resources/simple_export/expbld.inf " \
-			+ "-c armv5 CLEAN"
+			+ "-c armv5 clean"
 	t.targets = [
 		"$(EPOCROOT)/epoc32/include/exported_1.h",
 		"$(EPOCROOT)/epoc32/include/exported_2.h",
@@ -89,7 +90,28 @@
 	t.id = "0023c"
 	t.name = "export_reallyclean" 
 	t.command = "sbs -b smoke_suite/test_resources/simple_export/expbld.inf " \
-			+ "-c armv5 REALLYCLEAN"
+			+ "-c armv5 reallyclean"
+	t.antitargets = [
+		'$(EPOCROOT)/epoc32/include/exported_1.h',
+		'$(EPOCROOT)/epoc32/include/exported_2.h',
+		'$(EPOCROOT)/epoc32/include/exported_3.h',
+		'$(EPOCROOT)/epoc32/include/exportedfilewithspacesremoved.doc',
+		'$(EPOCROOT)/epoc32/include/exported file with a space.doc',
+		'/tmp/$(USER)/simple_exp1.h',
+		'/tmp/$(USER)/simple_exp2.h',
+		'/tmp/$(USER)/simple_exp3.h',
+		'$(EPOCROOT)/epoc32/include/simple_exp4.h'
+	]
+	t.run()
+	if t.result == SmokeTest.FAIL:
+		result = SmokeTest.FAIL
+
+	# Check that the --noexport feature really does prevent exports from happening
+	t = AntiTargetSmokeTest()
+	t.id = "0023d"
+	t.name = "export_noexport" 
+	t.command = "sbs -b smoke_suite/test_resources/simple_export/expbld.inf " \
+			+ "-c armv5 --noexport -n"
 	t.antitargets = [
 		'$(EPOCROOT)/epoc32/include/exported_1.h',
 		'$(EPOCROOT)/epoc32/include/exported_2.h',
--- a/sbsv2/raptor/test/smoke_suite/featurevariants.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/test/smoke_suite/featurevariants.py	Mon Dec 07 12:50:33 2009 +0000
@@ -15,6 +15,7 @@
 #
 
 from raptor_tests import SmokeTest
+import os
 
 def run():
 	t = SmokeTest()
@@ -228,9 +229,13 @@
 	createvmap = "python $(SBS_HOME)/bin/createvmap.py"
 	vmapfile = "$(EPOCROOT)/epoc32/build/test.vmap"
 	vmap = " -o " + vmapfile
-	bvcpp = " -c $(SBS_HOME)/$(HOSTPLATFORM_DIR)/bv/bin/cpp"
-	if t.onWindows:
-		bvcpp += ".exe"
+	
+	if 'SBS_BVCPP' in os.environ:
+		bvcpp = " -c " + os.environ['SBS_BVCPP'].replace('\\','/')
+	else:
+		bvcpp = " -c $(SBS_HOME)/$(HOSTPLATFORM_DIR)/bv/bin/cpp"
+		if t.onWindows:
+			bvcpp += ".exe"
 
 	bvdata = "$(SBS_HOME)/test/smoke_suite/test_resources/bv"
 	
--- a/sbsv2/raptor/test/smoke_suite/gnumakefile.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/test/smoke_suite/gnumakefile.py	Mon Dec 07 12:50:33 2009 +0000
@@ -25,7 +25,7 @@
 		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_bld_ARMV5_UDEB.txt",
 		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_bld_ARMV5_UREL.txt",
 		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_bld_WINSCW_UDEB.txt",
-		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_bld_WINSCW_UREL.txt",
+	  	"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_bld_WINSCW_UREL.txt",
 		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_final_ARMV5_UDEB.txt",
 		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_final_ARMV5_UREL.txt",
 		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_final_WINSCW_UDEB.txt",
@@ -41,7 +41,27 @@
 		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_resource_ARMV5_UDEB.txt",
 		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_resource_ARMV5_UREL.txt",
 		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_resource_WINSCW_UDEB.txt",
-		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_resource_WINSCW_UREL.txt"
+		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/master_resource_WINSCW_UREL.txt",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_bld_ARMV5_UDEB.txt",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_bld_ARMV5_UREL.txt",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_bld_WINSCW_UDEB.txt",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_bld_WINSCW_UREL.txt",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_final_ARMV5_UDEB.txt",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_final_ARMV5_UREL.txt",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_final_WINSCW_UDEB.txt",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_final_WINSCW_UREL.txt",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_lib_ARMV5_UDEB.txt",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_lib_ARMV5_UREL.txt",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_lib_WINSCW_UDEB.txt",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_lib_WINSCW_UREL.txt",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_makmake_ARMV5_UDEB.txt",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_makmake_ARMV5_UREL.txt",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_makmake_WINSCW_UDEB.txt",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_makmake_WINSCW_UREL.txt",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_resource_ARMV5_UDEB.txt",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_resource_ARMV5_UREL.txt",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_resource_WINSCW_UDEB.txt",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/gnumakefile/slave_resource_WINSCW_UREL.txt"
 		]
 	t.run("windows") # we don't have make 3.79 on Linux
 	return t
--- a/sbsv2/raptor/test/smoke_suite/gnumakefile_what.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/test/smoke_suite/gnumakefile_what.py	Mon Dec 07 12:50:33 2009 +0000
@@ -45,7 +45,27 @@
 		componentpath+"/master_resource_ARMV5_UDEB.txt",
 		componentpath+"/master_resource_ARMV5_UREL.txt",
 		componentpath+"/master_resource_WINSCW_UDEB.txt",
-		componentpath+"/master_resource_WINSCW_UREL.txt"
+		componentpath+"/master_resource_WINSCW_UREL.txt",
+		componentpath+"/slave_bld_ARMV5_UDEB.txt",
+		componentpath+"/slave_bld_ARMV5_UREL.txt",
+		componentpath+"/slave_bld_WINSCW_UDEB.txt",
+		componentpath+"/slave_bld_WINSCW_UREL.txt",
+		componentpath+"/slave_final_ARMV5_UDEB.txt",
+		componentpath+"/slave_final_ARMV5_UREL.txt",
+		componentpath+"/slave_final_WINSCW_UDEB.txt",
+		componentpath+"/slave_final_WINSCW_UREL.txt",
+		componentpath+"/slave_lib_ARMV5_UDEB.txt",
+		componentpath+"/slave_lib_ARMV5_UREL.txt",
+		componentpath+"/slave_lib_WINSCW_UDEB.txt",
+		componentpath+"/slave_lib_WINSCW_UREL.txt",
+		componentpath+"/slave_makmake_ARMV5_UDEB.txt",
+		componentpath+"/slave_makmake_ARMV5_UREL.txt",
+		componentpath+"/slave_makmake_WINSCW_UDEB.txt",
+		componentpath+"/slave_makmake_WINSCW_UREL.txt",
+		componentpath+"/slave_resource_ARMV5_UDEB.txt",
+		componentpath+"/slave_resource_ARMV5_UREL.txt",
+		componentpath+"/slave_resource_WINSCW_UDEB.txt",
+		componentpath+"/slave_resource_WINSCW_UREL.txt"
 	]
 	t.run("windows") # we don't have make 3.79 on Linux
 	return t
--- a/sbsv2/raptor/test/smoke_suite/gnumakefile_whatlog.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/test/smoke_suite/gnumakefile_whatlog.py	Mon Dec 07 12:50:33 2009 +0000
@@ -47,7 +47,27 @@
 		componentpath+"/master_resource_ARMV5_UDEB.txt",
 		componentpath+"/master_resource_ARMV5_UREL.txt",
 		componentpath+"/master_resource_WINSCW_UDEB.txt",
-		componentpath+"/master_resource_WINSCW_UREL.txt"
+		componentpath+"/master_resource_WINSCW_UREL.txt",
+		componentpath+"/slave_bld_ARMV5_UDEB.txt",
+		componentpath+"/slave_bld_ARMV5_UREL.txt",
+		componentpath+"/slave_bld_WINSCW_UDEB.txt",
+		componentpath+"/slave_bld_WINSCW_UREL.txt",
+		componentpath+"/slave_final_ARMV5_UDEB.txt",
+		componentpath+"/slave_final_ARMV5_UREL.txt",
+		componentpath+"/slave_final_WINSCW_UDEB.txt",
+		componentpath+"/slave_final_WINSCW_UREL.txt",
+		componentpath+"/slave_lib_ARMV5_UDEB.txt",
+		componentpath+"/slave_lib_ARMV5_UREL.txt",
+		componentpath+"/slave_lib_WINSCW_UDEB.txt",
+		componentpath+"/slave_lib_WINSCW_UREL.txt",
+		componentpath+"/slave_makmake_ARMV5_UDEB.txt",
+		componentpath+"/slave_makmake_ARMV5_UREL.txt",
+		componentpath+"/slave_makmake_WINSCW_UDEB.txt",
+		componentpath+"/slave_makmake_WINSCW_UREL.txt",
+		componentpath+"/slave_resource_ARMV5_UDEB.txt",
+		componentpath+"/slave_resource_ARMV5_UREL.txt",
+		componentpath+"/slave_resource_WINSCW_UDEB.txt",
+		componentpath+"/slave_resource_WINSCW_UREL.txt"
 		]
 	t.stdout = [
 		"<whatlog bldinf='"+componentpath+"/bld.inf' mmp='' config='armv5_udeb.whatlog'>",
@@ -73,7 +93,31 @@
 		"<build>"+componentpath+"/master_final_WINSCW_UDEB.txt</build>",
 		"<build>"+componentpath+"/master_lib_WINSCW_UDEB.txt</build>",
 		"<build>"+componentpath+"/master_makmake_WINSCW_UDEB.txt</build>",
-		"<build>"+componentpath+"/master_resource_WINSCW_UDEB.txt</build>"
+		"<build>"+componentpath+"/master_resource_WINSCW_UDEB.txt</build>",
+		"<whatlog bldinf='"+componentpath+"/bld.inf' mmp='' config='armv5_udeb.whatlog'>",
+		"<build>"+componentpath+"/slave_bld_ARMV5_UDEB.txt</build>",
+		"<build>"+componentpath+"/slave_final_ARMV5_UDEB.txt</build>",
+		"<build>"+componentpath+"/slave_lib_ARMV5_UDEB.txt</build>",
+		"<build>"+componentpath+"/slave_makmake_ARMV5_UDEB.txt</build>",
+		"<build>"+componentpath+"/slave_resource_ARMV5_UDEB.txt</build>",
+		"<whatlog bldinf='"+componentpath+"/bld.inf' mmp='' config='armv5_urel.whatlog'>",
+		"<build>"+componentpath+"/slave_bld_ARMV5_UREL.txt</build>",
+		"<build>"+componentpath+"/slave_final_ARMV5_UREL.txt</build>",
+		"<build>"+componentpath+"/slave_lib_ARMV5_UREL.txt</build>",
+		"<build>"+componentpath+"/slave_makmake_ARMV5_UREL.txt</build>",
+		"<build>"+componentpath+"/slave_resource_ARMV5_UREL.txt</build>",
+		"<whatlog bldinf='"+componentpath+"/bld.inf' mmp='' config='winscw_urel.whatlog'>",
+		"<build>"+componentpath+"/slave_bld_WINSCW_UREL.txt</build>",
+		"<build>"+componentpath+"/slave_final_WINSCW_UREL.txt</build>",
+		"<build>"+componentpath+"/slave_lib_WINSCW_UREL.txt</build>",
+		"<build>"+componentpath+"/slave_makmake_WINSCW_UREL.txt</build>",
+		"<build>"+componentpath+"/slave_resource_WINSCW_UREL.txt</build>",
+		"<whatlog bldinf='"+componentpath+"/bld.inf' mmp='' config='winscw_udeb.whatlog'>",
+		"<build>"+componentpath+"/slave_bld_WINSCW_UDEB.txt</build>",
+		"<build>"+componentpath+"/slave_final_WINSCW_UDEB.txt</build>",
+		"<build>"+componentpath+"/slave_lib_WINSCW_UDEB.txt</build>",
+		"<build>"+componentpath+"/slave_makmake_WINSCW_UDEB.txt</build>",
+		"<build>"+componentpath+"/slave_resource_WINSCW_UDEB.txt</build>"
 	]
 	t.run("windows") # we don't have make 3.79 on Linux
 	return t
--- a/sbsv2/raptor/test/smoke_suite/longpath.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/test/smoke_suite/longpath.py	Mon Dec 07 12:50:33 2009 +0000
@@ -74,14 +74,12 @@
 	e32def = dirname + 'e32def.h'
 	
 	deftestu = dirname + 'deftestu.def'
-	distpol = dirname + 'distribution.policy.s60'
 	
 	dst_cpp = sbsHome + path + 'test.cpp'
 	dst_bld = sbsHome + path + 'bld.inf'
 	dst_deftest = sbsHome + path + 'deftest.mmp'
 	dst_e32def = sbsHome + path + 'e32def.h'
 	dst_deftestu = sbsHome + path_eabi + 'deftestu.def'
-	dst_distpol = sbsHome + path_eabi + 'distribution.policy.s60'
 	
 		
 	if os.path.exists(dst_cpp):
@@ -92,7 +90,6 @@
 		shutil.copy(deftest, dst_deftest)
 		shutil.copy(e32def, dst_e32def)
 		shutil.copy(deftestu , dst_deftestu)
-		shutil.copy(distpol , dst_distpol)
 		dirname = sbsHome + path
 		
 	t = SmokeTest()
--- a/sbsv2/raptor/test/smoke_suite/metadep.py	Mon Nov 16 20:40:58 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-#
-# Copyright (c) 2009 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"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-
-from raptor_tests import SmokeTest
-
-def run():
-	t = SmokeTest()
-	t.id = "71"
-	t.name = "metadep"
-	t.description =  """Tests metadata dependency generation.  Changes 
-			to bld.infs and mmps can be detected."""
-	t.usebash = True
-	t.command = """export SBSLOGFILE SBSMAKEFILE; bash smoke_suite/test_resources/metadep.sh 2>&1"""
-			
-	t.targets = [
-		]
-
-	t.mustmatch_multiline = [
-""".*Step 1 .*no warnings or errors.*
-sbs: build log in.*
-\+ sleep 1.*
-.*make -rf .*epoc32/build/metadata_all.mk.*
-.*make.*epoc32/build/metadata_all.mk. is up to date.*
-Step 2 .*
-.*RE-RUNNING SBS with previous parameters.*
-Step 3 .*
-.*RE-RUNNING SBS with previous parameters.*
-.*RE-RUNNING SBS with previous parameters.*"""
-	]
-	t.mustnotmatch_multiline = [
-"""RE-RUNNING SBS with previous parameters.*
-RE-RUNNING SBS with previous parameters.*
-RE-RUNNING SBS with previous parameters.*
-RE-RUNNING SBS with previous parameters.*"""
-	]
-	t.run()
-	return t
--- a/sbsv2/raptor/test/smoke_suite/mmp_keywords.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/test/smoke_suite/mmp_keywords.py	Mon Dec 07 12:50:33 2009 +0000
@@ -17,10 +17,10 @@
 from raptor_tests import SmokeTest
 
 def run():
-	result = SmokeTest.PASS
 	t = SmokeTest()
 	t.description = "This testcase tests all mmp keywords including new implementation of 'paged/unpaged code/data'"
 	t.usebash = True
+	
 	t.id = "75a"
 	t.name = "mmp_1"
 	t.command = "sbs -b smoke_suite/test_resources/mmp/mmp1/group/bld.inf -c armv5 -f-"
@@ -45,8 +45,6 @@
 		".*armlink.*--verbose.*"
 	]
 	t.run()
-	if t.result == SmokeTest.FAIL:
-		result = SmokeTest.FAIL
 
 	t.id = "75b"
 	t.name = "mmp_2"
@@ -72,9 +70,6 @@
 	]
 	t.warnings = 2
 	t.run()
-	if t.result == SmokeTest.FAIL:
-		result = SmokeTest.FAIL
-	
 	
 	t.id = "75c"
 	t.name = "mmp_3"
@@ -117,9 +112,6 @@
 	t.mustnotmatch = []
 	t.warnings = 0
 	t.run()
-	if t.result == SmokeTest.FAIL:
-		result = SmokeTest.FAIL
-	
 	
 	t.id = "75d"
 	t.name = "mmp_4"
@@ -167,8 +159,6 @@
 		])
 	t.mustmatch = []
 	t.run()
-	if t.result == SmokeTest.FAIL:
-		result = SmokeTest.FAIL
 	
 	# Test keywords: version, firstlib, nocompresstarget
 	t.id = "75e"
@@ -189,8 +179,6 @@
 		"fuzzlib_lib/armv5/urel/uc_exe_.o",
 		])
 	t.run()
-	if t.result == SmokeTest.FAIL:
-		result = SmokeTest.FAIL
 
 	t.id = "75f"
 	t.name = "mmp_6"
@@ -199,15 +187,11 @@
 		"$(EPOCROOT)/epoc32/release/armv5/udeb/diagsuppress_test.dll",
 		"$(EPOCROOT)/epoc32/release/armv5/urel/diagsuppress_test.dll",
 		]
-
 	t.mustmatch = [
 					"--diag_suppress 6780",
 					"--diag_suppress 6331"
 					]
-
 	t.run()
-	if t.result == SmokeTest.FAIL:
-		result = SmokeTest.FAIL
 	
 	t.id = "75g"
 	t.name = "mmp_7"
@@ -216,13 +200,9 @@
 		"$(EPOCROOT)/epoc32/release/armv5/urel/diagsuppress_noarmlibs_test.dll",
 		"$(EPOCROOT)/epoc32/release/armv5/udeb/diagsuppress_noarmlibs_test.dll"
 		]
-
 	t.mustmatch = ["--diag_suppress 6331"]
 	t.mustnotmatch = ["--diag_suppress 6780"]
-
 	t.run()
-	if t.result == SmokeTest.FAIL:
-		result = SmokeTest.FAIL
 
 	# Test keyword: version
 	t.id = "75h"
@@ -238,13 +218,77 @@
 	t.mustnotmatch = []
 	t.warnings = 2
 	t.run()
-	if t.result == SmokeTest.FAIL:
-		result = SmokeTest.FAIL
+
+	# Test keyword: armfpu softvfp|vfpv2
+	# Both armv5 RVCT (9a+b) and GCCE (10) builds, as they differ in behaviour.
+	t.id = "75i"
+	t.name = "mmp_9a"
+	t.command = "sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld.inf -p armfpu_soft.mmp -c armv5_urel -f-"			
+	t.targets = []
+	t.mustmatch = ["--fpu softvfp", "--fpu=softvfp"]
+	t.mustnotmatch = ["--fpu vfpv2", "--fpu=vfpv2"]
+	t.warnings = 0
+	t.run()
+		
+	t.id = "75j"
+	t.name = "mmp_9b"
+	t.command = "sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld.inf -c armv5_urel REALLYCLEAN &&" \
+			+ " sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld.inf -p armfpu_vfpv2.mmp -c armv5_urel -f-"
 
+	t.mustmatch = ["--fpu vfpv2", "--fpu=vfpv2"]
+	t.mustnotmatch = ["--fpu softvfp", "--fpu=softvfp"]	
+	t.run()
+	
+	t.id = "75k"
+	t.name = "mmp_10"
+	t.command = "sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld.inf  -c armv5_urel_gcce4_3_2 REALLYCLEAN &&" \
+			+ " sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld.inf -c armv5_urel_gcce4_3_2 -f-"
+	t.countmatch = [
+		["-mfloat-abi=soft", 2],
+		["--fpu=softvfp", 2]
+	]
+	t.mustmatch = []
+	t.mustnotmatch = ["--fpu=vfpv2"]
+	t.run()
+	
+	# Test keywords: compresstarget, nocompresstarget, bytepaircompresstarget, inflatecompresstarget
+	t.id = "75l"
+	t.name = "mmp_11"
+	t.command = "sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp11/bld.inf -c armv5_urel -f-"
+	t.mustmatch_singleline = [
+		"elf2e32.*--output.*\/compress\.exe.*--compressionmethod=inflate",
+		"elf2e32.*--output.*\/nocompress\.exe.*--uncompressed",
+		"elf2e32.*--output.*\/bytepaircompress\.exe.*--compressionmethod=bytepair",
+		"elf2e32.*--output.*\/inflatecompress\.exe.*--compressionmethod=inflate",
+		"elf2e32.*--output.*\/combinedcompress\.exe.*--compressionmethod=bytepair",		
+		"COMPRESSTARGET keyword in .*combinedcompresstarget.mmp overrides earlier use of NOCOMPRESSTARGET",
+		"INFLATECOMPRESSTARGET keyword in .*combinedcompresstarget.mmp overrides earlier use of COMPRESSTARGET",
+		"BYTEPAIRCOMPRESSTARGET keyword in .*combinedcompresstarget.mmp overrides earlier use of INFLATECOMPRESSTARGET"
+	]
+	t.countmatch = []
+	t.mustnotmatch = []
+	t.warnings = 3
+	t.run()
+
+	# Test keyword: APPLY
+	t.id = "75m"
+	t.name = "apply"
+	t.command = "sbs -b smoke_suite/test_resources/mmp/apply/bld.inf -f- -k --configpath=test/config"
+	t.targets = [
+		"$(EPOCROOT)/epoc32/release/armv5/urel/test_mmp_apply.exe",
+		"$(EPOCROOT)/epoc32/release/armv5/udeb/test_mmp_apply.exe",
+		"$(EPOCROOT)/epoc32/release/winscw/urel/test_mmp_apply.exe",
+		"$(EPOCROOT)/epoc32/release/winscw/udeb/test_mmp_apply.exe"
+		]
+	t.mustmatch_singleline = ["-DAPPLYTESTEXPORTEDVAR",
+	                          "-DAPPLYTESTAPPENDCDEFS"]
+	t.countmatch = [["<error.*APPLY unknown variant 'no_such_var'", 2]]
+	t.errors = 2 # no_such_var for armv5 and winscw
+	t.warnings = 0
+	t.returncode = 1
+	t.run()
 
 	t.id = "75"
 	t.name = "mmp_keywords"
-	t.result = result
 	t.print_result()
 	return t
-
--- a/sbsv2/raptor/test/smoke_suite/mmp_newlib_keyword.py	Mon Nov 16 20:40:58 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-#
-# Copyright (c) 2009 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"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-
-from raptor_tests import SmokeTest
-
-def run():
-	t = SmokeTest()
-	t.id = "40"
-	t.name = "mmp_newlib_keyword"
-	t.description = "Test the NEWLIB MMP keyword by specifying an invalid " + \
-			"library to link against"
-	t.command = "sbs -b smoke_suite/test_resources/newlib/bld.inf"
-	# 1 error is expected because the NEWLIB library we are trying to link
-	# Against does not exist
-	t.errors = 1
-	t.run()
-	return t
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/parallel_parsing.py	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,65 @@
+#
+# Copyright (c) 2009 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"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+
+from raptor_tests import SmokeTest
+
+def run():
+	t = SmokeTest()
+	t.usebash = True
+	result = SmokeTest.PASS
+
+	description = """This test covers parallel parsing."""
+	command = "cd $(SBS_HOME)/test/smoke_suite/test_resources/pp/ && sbs --command=$(SBS_HOME)/test/smoke_suite/test_resources/pp/ppbldinf_commandfile -c armv5 -c winscw --pp=on --noexport -m ${SBSMAKEFILE} -f - | grep recipe "
+
+	mmpcount = 10 # how many mmps in this parallel parsing test
+
+	
+	target_templ = [
+		"$(EPOCROOT)/epoc32/release/armv5/udeb/test_pp#.exe",
+		"$(EPOCROOT)/epoc32/release/armv5/udeb/test_pp#.exe.map",
+		"$(EPOCROOT)/epoc32/release/armv5/urel/test_pp#.exe",
+		"$(EPOCROOT)/epoc32/release/armv5/urel/test_pp#.exe.map",
+		"$(EPOCROOT)/epoc32/release/armv5/udeb/test_pp#.exe.sym",
+		"$(EPOCROOT)/epoc32/release/armv5/urel/test_pp#.exe.sym"
+	]
+
+	targets = []
+
+	# Build up target list for 10 similar executables
+	for num in range(1,mmpcount):
+		for atarget in target_templ:
+			targets.append(atarget.replace('pp#','pp'+ str(num)))
+
+	mustmatch = [
+		".*<recipe .*name='makefile_generation.*",
+	]
+	mustnotmatch = [
+		".*<recipe .*name='makefile_generation_export.*",
+		".*<error[^><]*>.*"
+	]
+
+	warnings = 0
+		
+	t.id = "104"
+	t.name = "parallelparsing"
+	t.description = description
+	t.command = command 
+	t.targets = targets
+	t.mustmatch = mustmatch
+	t.mustnotmatch = mustnotmatch
+	t.warnings = warnings
+	t.run()
+	return t
--- a/sbsv2/raptor/test/smoke_suite/stringtable_zip_whatlog.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/test/smoke_suite/stringtable_zip_whatlog.py	Mon Dec 07 12:50:33 2009 +0000
@@ -25,16 +25,13 @@
 	markerfile = re.sub("(\\\\|\/|:|;| )", "_",
 			ReplaceEnvs("$(SBS_HOME)_test_smoke_suite_test_resources_simple_zip_export_archive.zip$(EPOCROOT)_epoc32_testunzip.unzipped"))
 	
-	result = CheckWhatSmokeTest.PASS
-	
 	t = CheckWhatSmokeTest()
 	t.id = "0069a"
 	t.name = "stringtable_zip_whatlog"
 	t.command = "sbs -b smoke_suite/test_resources/simple_stringtable/bld.inf -b smoke_suite/test_resources/simple_zip_export/bld.inf -f - -m ${SBSMAKEFILE} -c armv5_udeb.whatlog EXPORT"
 	componentpath1 = re.sub(r'\\','/',os.path.abspath("smoke_suite/test_resources/simple_stringtable"))
 	componentpath2 = re.sub(r'\\','/',os.path.abspath("smoke_suite/test_resources/simple_zip_export"))
-	t.regexlinefilter = \
-			re.compile("^<(whatlog|archive|stringtable>|archive|member>|zipmarker>)")
+	t.regexlinefilter = re.compile("^<(whatlog|archive|stringtable>|member>|zipmarker>)")
 	t.hostossensitive = False
 	t.usebash = True
 	t.targets = [
@@ -43,6 +40,7 @@
 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile2.txt",
 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile3.txt",
 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile4.txt",
+		"$(EPOCROOT)/epoc32/testunzip/archive/archivefilelinuxbin",
 		"$(EPOCROOT)/epoc32/build/" + markerfile
 		]
 	t.addbuildtargets('smoke_suite/test_resources/simple_stringtable/bld.inf', [
@@ -59,24 +57,18 @@
 		"<member>$(EPOCROOT)/epoc32/testunzip/archive/archivefile2.txt</member>",
 		"<member>$(EPOCROOT)/epoc32/testunzip/archive/archivefile3.txt</member>",
 		"<member>$(EPOCROOT)/epoc32/testunzip/archive/archivefile4.txt</member>",
+		"<member>$(EPOCROOT)/epoc32/testunzip/archive/archivefilelinuxbin</member>",
 		"<zipmarker>$(EPOCROOT)/epoc32/build/" + markerfile + "</zipmarker>"
 	]
 	t.run()
-	if t.result == CheckWhatSmokeTest.FAIL:
-		result = CheckWhatSmokeTest.FAIL
-	
 	
 	"Tests to check that up-to-date zip exports are reported"
 	t.id = "0069b"
 	t.name = "stringtable_zip_whatlog_rebuild"
 	t.targets = []
 	t.run()
-	if t.result == CheckWhatSmokeTest.FAIL:
-		result = CheckWhatSmokeTest.FAIL
-	
 	
 	t.id = "69"
 	t.name = "stringtable_zip_whatlog"	
-	t.result = result
 	t.print_result()
 	return t
--- a/sbsv2/raptor/test/smoke_suite/test_resources/gnumakefile/slave.mak	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/gnumakefile/slave.mak	Mon Dec 07 12:50:33 2009 +0000
@@ -9,34 +9,34 @@
 
 
 MAKMAKE : 
-	echo SLAVE.MAK MAKMAKE >> master_makmake_$(PLATFORM)_$(CFG).txt
+	echo SLAVE.MAK MAKMAKE > slave_makmake_$(PLATFORM)_$(CFG).txt
 
 RESOURCE : 
-	echo SLAVE.MAK RESOURCE >> master_resource_$(PLATFORM)_$(CFG).txt
+	echo SLAVE.MAK RESOURCE > slave_resource_$(PLATFORM)_$(CFG).txt
 
 SAVESPACE : BLD
 
 BLD : 
-	echo SLAVE.MAK BLD >> master_bld_$(PLATFORM)_$(CFG).txt
+	echo SLAVE.MAK BLD > slave_bld_$(PLATFORM)_$(CFG).txt
  
 FREEZE : 
-	echo SLAVE.MAK FREEZE >> master_freeze_$(PLATFORM)_$(CFG).txt
+	echo SLAVE.MAK FREEZE > slave_freeze_$(PLATFORM)_$(CFG).txt
 
 LIB : 
-	echo SLAVE.MAK LIB >> master_lib_$(PLATFORM)_$(CFG).txt
+	echo SLAVE.MAK LIB > slave_lib_$(PLATFORM)_$(CFG).txt
 
 CLEANLIB : do_nothing
  
 FINAL : 
-	echo SLAVE.MAK FINAL >> master_final_$(PLATFORM)_$(CFG).txt
+	echo SLAVE.MAK FINAL >> slave_final_$(PLATFORM)_$(CFG).txt
 
 CLEAN : 
 	rm -f *.txt
  
 RELEASABLES : 
-	@echo $(DIRECTORY)/master_makmake_$(PLATFORM)_$(CFG).txt
-	@echo $(DIRECTORY)/master_resource_$(PLATFORM)_$(CFG).txt
-	@echo $(DIRECTORY)/master_bld_$(PLATFORM)_$(CFG).txt
-	@echo $(DIRECTORY)/master_lib_$(PLATFORM)_$(CFG).txt
-	@echo $(DIRECTORY)/master_final_$(PLATFORM)_$(CFG).txt
+	@echo $(DIRECTORY)/slave_makmake_$(PLATFORM)_$(CFG).txt
+	@echo $(DIRECTORY)/slave_resource_$(PLATFORM)_$(CFG).txt
+	@echo $(DIRECTORY)/slave_bld_$(PLATFORM)_$(CFG).txt
+	@echo $(DIRECTORY)/slave_lib_$(PLATFORM)_$(CFG).txt
+	@echo $(DIRECTORY)/slave_final_$(PLATFORM)_$(CFG).txt
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/mmp/apply/apply_test_exported_variants.xml	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<build xmlns="http://symbian.com/xml/build"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://symbian.com/xml/build build/2_0.xsd">
+
+  <!-- This variant is used so that we can tell if the APPLY keyword
+       can find variants exported into the epoc32 tree -->
+
+  <var name="apply_test_exported_var">
+	<append name="CDEFS" value="APPLYTESTEXPORTEDVAR" />
+  </var>
+  
+</build>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/mmp/apply/bld.inf	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,7 @@
+
+PRJ_EXPORTS
+apply_test_exported_variants.xml /epoc32/tools/makefile_templates/
+
+PRJ_MMPFILES
+test_mmp_apply.mmp
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/mmp/apply/test_mmp_apply.cpp	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,9 @@
+
+#include "e32def.h"
+
+char test[] = "test mmp keyword APPLY";
+
+TInt E32Main()
+{
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/mmp/apply/test_mmp_apply.mmp	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,16 @@
+
+TARGET			test_mmp_apply
+TARGETTYPE		EXE
+
+APPLY no_such_var
+
+LIBRARY			euser.lib
+
+SYSTEMINCLUDE		/epoc32/include
+
+APPLY apply_test_append_cdefs
+
+SOURCE			test_mmp_apply.cpp
+
+APPLY apply_test_exported_var
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/mmp/mmp11/bld.inf	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+PRJ_PLATFORMS
+ARMV5
+
+PRJ_MMPFILES
+compresstarget.mmp
+nocompresstarget.mmp
+bytepaircompresstarget.mmp
+inflatecompresstarget.mmp
+combinedcompresstarget.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/mmp/mmp11/bytepaircompresstarget.mmp	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+TARGET			bytepaircompress.exe
+TARGETTYPE		exe
+SOURCEPATH		.
+SOURCE			compress.cpp
+UID				0x100039ce 0x00000001
+LIBRARY			euser.lib
+SECUREID		0x10003a5c
+SYSTEMINCLUDE	/epoc32/include
+
+BYTEPAIRCOMPRESSTARGET
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/mmp/mmp11/combinedcompresstarget.mmp	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,30 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+TARGET			combinedcompress.exe
+TARGETTYPE		exe
+SOURCEPATH		.
+SOURCE			compress.cpp
+UID				0x100039ce 0x00000001
+LIBRARY			euser.lib
+SECUREID		0x10003a5c
+SYSTEMINCLUDE	/epoc32/include
+
+NOCOMPRESSTARGET
+COMPRESSTARGET
+INFLATECOMPRESSTARGET
+BYTEPAIRCOMPRESSTARGET
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/mmp/mmp11/compress.cpp	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,22 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "e32def.h"
+TInt E32Main()
+	{
+	return 0;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/mmp/mmp11/compresstarget.mmp	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+TARGET			compress.exe
+TARGETTYPE		exe
+SOURCEPATH		.
+SOURCE			compress.cpp
+UID				0x100039ce 0x00000001
+LIBRARY			euser.lib
+SECUREID		0x10003a5c
+SYSTEMINCLUDE	/epoc32/include
+
+COMPRESSTARGET
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/mmp/mmp11/inflatecompresstarget.mmp	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+TARGET			inflatecompress.exe
+TARGETTYPE		exe
+SOURCEPATH		.
+SOURCE			compress.cpp
+UID				0x100039ce 0x00000001
+LIBRARY			euser.lib
+SECUREID		0x10003a5c
+SYSTEMINCLUDE	/epoc32/include
+
+INFLATECOMPRESSTARGET
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/mmp/mmp11/nocompresstarget.mmp	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+TARGET			nocompress.exe
+TARGETTYPE		exe
+SOURCEPATH		.
+SOURCE			compress.cpp
+UID				0x100039ce 0x00000001
+LIBRARY			euser.lib
+SECUREID		0x10003a5c
+SYSTEMINCLUDE	/epoc32/include
+
+NOCOMPRESSTARGET
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/mmp/mmp9_10/armfpu.cpp	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include "e32def.h" // intentional  include
+
+char test[]="Simple test";
+
+
+TInt test1;
+
+TInt E32Main()
+{
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/mmp/mmp9_10/armfpu_soft.mmp	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,30 @@
+/*
+* Copyright (c) 2005-2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+target			test_softvfp
+TARGETTYPE		exe
+SOURCEPATH		.
+SOURCE			armfpu.cpp
+
+UID				0x100039ce 0x00000001
+LIBRARY			euser.lib
+SECUREID		0x10003a5c
+SYSTEMINCLUDE	/epoc32/include
+
+ARMFPU 			softvfp
+
+capability		all
+paged
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/mmp/mmp9_10/armfpu_vfpv2.mmp	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,30 @@
+/*
+* Copyright (c) 2005-2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+target			test_vfpv2
+TARGETTYPE		exe
+SOURCEPATH		.
+SOURCE			armfpu.cpp
+
+UID				0x100039ce 0x00000001
+LIBRARY			euser.lib
+SECUREID		0x10003a5c
+SYSTEMINCLUDE	/epoc32/include
+
+ARMFPU 			vfpv2
+
+capability		all
+paged
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/mmp/mmp9_10/bld.inf	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,26 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+PRJ_PLATFORMS
+ARMV5
+
+PRJ_MMPFILES
+armfpu_soft.mmp
+armfpu_vfpv2.mmp
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/pp1.inf	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,22 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+PRJ_PLATFORMS
+ARMV5 ARMV7 WINSCW ARMV5SMP
+
+PRJ_MMPFILES
+pp1.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/pp1.mmp	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,18 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+TARGET			test_pp1
+#include "pp_common.mmh"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/pp10.inf	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,22 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+PRJ_PLATFORMS
+ARMV5 ARMV7 WINSCW ARMV5SMP
+
+PRJ_MMPFILES
+pp10.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/pp10.mmp	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,18 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+TARGET			test_pp10
+#include "pp_common.mmh"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/pp2.inf	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,22 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+PRJ_PLATFORMS
+ARMV5 ARMV7 WINSCW ARMV5SMP
+
+PRJ_MMPFILES
+pp2.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/pp2.mmp	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,18 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+TARGET			test_pp2
+#include "pp_common.mmh"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/pp3.inf	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,22 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+PRJ_PLATFORMS
+ARMV5 ARMV7 WINSCW ARMV5SMP
+
+PRJ_MMPFILES
+pp3.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/pp3.mmp	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,18 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+TARGET			test_pp3
+#include "pp_common.mmh"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/pp4.inf	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,22 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+PRJ_PLATFORMS
+ARMV5 ARMV7 WINSCW ARMV5SMP
+
+PRJ_MMPFILES
+pp4.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/pp4.mmp	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,18 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+TARGET			test_pp4
+#include "pp_common.mmh"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/pp5.inf	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,22 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+PRJ_PLATFORMS
+ARMV5 ARMV7 WINSCW ARMV5SMP
+
+PRJ_MMPFILES
+pp5.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/pp5.mmp	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,18 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+TARGET			test_pp5
+#include "pp_common.mmh"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/pp6.inf	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,22 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+PRJ_PLATFORMS
+ARMV5 ARMV7 WINSCW ARMV5SMP
+
+PRJ_MMPFILES
+pp6.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/pp6.mmp	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,18 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+TARGET			test_pp6
+#include "pp_common.mmh"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/pp7.inf	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,22 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+PRJ_PLATFORMS
+ARMV5 ARMV7 WINSCW ARMV5SMP
+
+PRJ_MMPFILES
+pp7.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/pp7.mmp	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,18 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+TARGET			test_pp7
+#include "pp_common.mmh"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/pp8.inf	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,22 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+PRJ_PLATFORMS
+ARMV5 ARMV7 WINSCW ARMV5SMP
+
+PRJ_MMPFILES
+pp8.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/pp8.mmp	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,18 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+TARGET			test_pp8
+#include "pp_common.mmh"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/pp9.inf	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,22 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+PRJ_PLATFORMS
+ARMV5 ARMV7 WINSCW ARMV5SMP
+
+PRJ_MMPFILES
+pp9.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/pp9.mmp	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,18 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+TARGET			test_pp9
+#include "pp_common.mmh"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/pp_common.mmh	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+TARGETTYPE		EXE
+
+// Test backslash to / here:
+TARGETPATH		\sys\bin
+
+UID			0x100039ce 0x00000001
+LIBRARY			euser.lib
+SECUREID		0x10003a5c
+SYSTEMINCLUDE	/epoc32/include
+SOURCE			test.cpp test.cia test1.c++ test2.cxx test3.Cpp test4.cc test5.CC test6.C++
+MACRO			TEST_MACRO_THAT_DOES_NOTHING
+OPTION GCCE -O2
+PAGED
+DEBUGGABLE
+EPOCCALLDLLENTRYPOINTS
+EPOCSTACKSIZE 8192
+EPOCHEAPSIZE 0x5000 65535
+EPOCPROCESSPRIORITY low
+capability TCB ProtServ DiskAdmin AllFiles PowerMgmt CommDD
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/ppbldinf_commandfile	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,1 @@
+-b pp1.inf -b pp2.inf -b pp3.inf -b pp4.inf -b pp5.inf -b pp6.inf -b pp7.inf -b pp8.inf -b pp9.inf -b pp10.inf 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/readme	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,1 @@
+Parallel Parsing test resources
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/test.cia	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,30 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+// Some random assembler or a "straight" dummy function
+
+#ifndef __WINSCW__
+EXPORT_C __NAKED__ void dummy()
+	{
+	asm("stmia	r0, {r4-r11, sp, lr}	");
+	asm("mov  r0, #0"); 
+	}
+#else
+int fred(int i)
+	{
+	return 1;
+	}
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/test.cpp	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,38 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+#include "e32def.h" // intentional  include
+#include "test.h"
+
+char test[]="Simple test";
+
+TInt test1();
+TInt test2();
+TInt test3();
+TInt test4();
+TInt test5();
+TInt test6();
+
+TInt E32Main()
+{
+	test1();
+	test2();
+	test3();
+	test4();
+	test5();
+	test6();
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/test.h	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,17 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+// Blank header file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/test1.c++	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,7 @@
+#include "e32def.h" // intentional  include
+
+
+TInt test1()
+{
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/test2.cxx	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,7 @@
+#include "e32def.h" // intentional  include
+
+
+TInt test2()
+{
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/test3.Cpp	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,23 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+#include "e32def.h" // intentional  include
+
+
+TInt test3()
+{
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/test4.cc	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,7 @@
+#include "e32def.h" // intentional  include
+
+
+TInt test4()
+{
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/test5.CC	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,7 @@
+#include "e32def.h" // intentional  include
+
+
+TInt test5()
+{
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/pp/test6.C++	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,7 @@
+#include "e32def.h" // intentional  include
+
+
+TInt test6()
+{
+	return 0;
+}
Binary file sbsv2/raptor/test/smoke_suite/test_resources/simple_zip_export/archive.zip has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/toolchain_macros/bld.inf	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,22 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+PRJ_PLATFORMS
+ARMV5 WINSCW 
+
+PRJ_MMPFILES
+macros.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/toolchain_macros/macros.cpp	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,71 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#include "e32def.h"
+
+TInt E32Main()
+	{
+
+// Confirm macro presence in processing through warnings
+
+#ifdef __ARMCC__
+#warning __ARMCC__
+#endif
+
+#ifdef __ARMCC_2__
+#warning __ARMCC_2__
+#endif
+
+#ifdef __ARMCC_2_2__
+#warning __ARMCC_2_2__
+#endif
+
+#ifdef __ARMCC_3__
+#warning __ARMCC_3__
+#endif
+
+#ifdef __ARMCC_3_1__
+#warning __ARMCC_3_1__
+#endif
+
+#ifdef __ARMCC_4__
+#warning __ARMCC_4__
+#endif
+
+#ifdef __ARMCC_4_0__
+#warning __ARMCC_4_0__
+#endif
+
+#ifdef __GCCE__
+#warning __GCCE__
+#endif
+
+#ifdef __GCCE_4__
+#warning __GCCE_4__
+#endif
+
+#ifdef __GCCE_4_3__
+#warning __GCCE_4_3__
+#endif
+
+#ifdef __GCCE_4_4__
+#warning __GCCE_4_4__
+#endif
+
+	return 0;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/toolchain_macros/macros.mmp	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,70 @@
+/*
+* Copyright (c) 2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+TARGET			macros
+TARGETTYPE		EXE
+UID				0x100039ce 0x00000001
+LIBRARY			euser.lib
+SYSTEMINCLUDE	/epoc32/include
+SOURCE			macros.cpp
+
+// Confirm macro presence in processing through warnings
+
+#ifdef ARMCC
+#warning ARMCC
+#endif
+
+#ifdef ARMCC_2
+#warning ARMCC_2
+#endif
+
+#ifdef ARMCC_2_2
+#warning ARMCC_2_2
+#endif
+
+#ifdef ARMCC_3
+#warning ARMCC_3
+#endif
+
+#ifdef ARMCC_3_1
+#warning ARMCC_3_1
+#endif
+
+#ifdef ARMCC_4
+#warning ARMCC_4
+#endif
+
+#ifdef ARMCC_4_0
+#warning ARMCC_4_0
+#endif
+
+#ifdef GCCE
+#warning GCCE
+#endif
+
+#ifdef GCCE_4
+#warning GCCE_4
+#endif
+
+#ifdef GCCE_4_3
+#warning GCCE_4_3
+#endif
+
+#ifdef GCCE_4_4
+#warning GCCE_4_4
+#endif
--- a/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_featurevariant/traces/HelloWorldTraces.h	Mon Nov 16 20:40:58 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-// Created by TraceCompiler 1.3.0
-// DO NOT EDIT, CHANGES WILL BE LOST
-
-#ifndef __HELLOWORLDTRACES_H__
-#define __HELLOWORLDTRACES_H__
-
-#define KOstTraceComponentID 0xe78a5aa3
-
-#define _DOSTARTL 0x30001
-
-
-#endif
-
-// End of file
-
--- a/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/TC_featurevariant/traces/fixed_id.definitions	Mon Nov 16 20:40:58 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
-[GROUP]TRACE_NORMAL=0x3
-[TRACE]TRACE_NORMAL[0x3]__DOSTARTL=0x1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/timing.py	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,55 @@
+#
+# Copyright (c) 2009 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"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+
+from raptor_tests import SmokeTest
+
+def run():
+	t = SmokeTest()
+	t.usebash = True
+	
+	t.description = "Test that a timing log is created and contains total parse and build durations"
+
+	t.id = "0103a"
+	t.name = "timing_off"
+	t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -f-"
+	t.mustnotmatch = [
+			".*progress:discovery.*",
+			".*progress:start.*",
+			".*progress:end.*"
+			]
+	t.run()
+
+
+	t.id = "0103b"
+	t.name = "timing_on"
+	t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf --timing " + \
+			"--filters=FilterLogfile,FilterTiming -f ${SBSLOGFILE} && " + \
+			"grep progress:duration ${SBSLOGFILE}.timings"
+	t.mustmatch = [
+			"^<progress:duration object_type='layer' task='parse' key='.*' duration='\d+.\d+' />$",
+			"^<progress:duration object_type='layer' task='build' key='.*' duration='\d+.\d+' />$",
+			"^<progress:duration object_type='all' task='all' key='all' duration='\d+.\d+' />$"
+			]
+	t.mustnotmatch = []
+	t.run()
+
+
+	t.id = "103"
+	t.name = "timing"
+	t.print_result()
+	
+	return t
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/toolchain_macros.py	Mon Dec 07 12:50:33 2009 +0000
@@ -0,0 +1,60 @@
+#
+# Copyright (c) 2009 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"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+
+from raptor_tests import SmokeTest
+import string
+
+def run():
+	t = SmokeTest()
+	t.description = "Check that ARM toolchain specific macros are used in both metadata and source processing."
+	t.warnings = -1
+	
+	toolchains = {
+				'rvct2_2':   ['ARMCC', 'ARMCC_2', 'ARMCC_2_2', '__ARMCC__', '__ARMCC_2__',  '__ARMCC_2_2__'],
+				'rvct3_1':   ['ARMCC', 'ARMCC_3', 'ARMCC_3_1', '__ARMCC__', '__ARMCC_3__' , '__ARMCC_3_1__'],
+				'rvct4_0':   ['ARMCC', 'ARMCC_4', 'ARMCC_4_0', '__ARMCC__', '__ARMCC_4__' , '__ARMCC_4_0__'],
+				'gcce4_3_2': ['GCCE',  'GCCE_4',  'GCCE_4_3',  '__GCCE__',  '__GCCE_4__' ,  '__GCCE_4_3__'],
+				'gcce4_3_3': ['GCCE', 'GCCE_4', 'GCCE_4_3', '__GCCE__', '__GCCE_4__' , '__GCCE_4_3__'],
+				'gcce4_4_1': ['GCCE', 'GCCE_4', 'GCCE_4_4', '__GCCE__', '__GCCE_4__' , '__GCCE_4_4__']
+				}
+	
+	rootname = "toolchain_macros_armv5_%s_%s"
+	rootcommand = "sbs -b smoke_suite/test_resources/toolchain_macros/bld.inf -c arm.v5.urel."
+	macromatch = ": #warning( directive:)? %s(</warning>)?$"
+	
+	count = 0	
+	for toolchain in sorted(toolchains.keys()):
+		t.id = "0103" + string.ascii_lowercase[count]
+		t.name = rootname % (toolchain, "clean")
+		t.command = rootcommand + toolchain + " clean"
+		t.mustmatch_singleline = []
+		t.run()
+		count += 1
+		
+		t.id = "0103" + string.ascii_lowercase[count]
+		t.name = rootname % (toolchain, "build")
+		t.command = rootcommand + toolchain
+		mustmatch = []	
+		for macro in toolchains[toolchain]:
+			mustmatch.append(macromatch % macro)
+		t.mustmatch_singleline = mustmatch
+		t.run()
+		count += 1
+
+	t.id = "103"
+	t.name = "toolchain_macros"
+	t.print_result()
+	return t
--- a/sbsv2/raptor/test/smoke_suite/zip_export_plus_clean.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/test/smoke_suite/zip_export_plus_clean.py	Mon Dec 07 12:50:33 2009 +0000
@@ -21,9 +21,8 @@
 	markerfile = re.sub("(\\\\|\/|:|;| )", "_",
 			ReplaceEnvs("$(SBS_HOME)_test_smoke_suite_test_resources_simple_zip_export_archive.zip$(EPOCROOT)_epoc32_testunzip.unzipped"))
 	
-	result = SmokeTest.PASS
+	t = SmokeTest()
 	
-	t = SmokeTest()
 	t.id = "0024a"
 	t.name = "zip_export"
 	t.command = "sbs -b smoke_suite/test_resources/simple_zip_export/bld.inf"
@@ -32,32 +31,34 @@
 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile2.txt",
 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile3.txt",
 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile4.txt",
+		"$(EPOCROOT)/epoc32/testunzip/archive/archivefilelinuxbin",
 		"$(EPOCROOT)/epoc32/build/" + markerfile
 	]
 	t.run()
-	if t.result == SmokeTest.FAIL:
-		result = SmokeTest.FAIL
-		
+	
+	t.id = "0024aa"
+	t.name = "zip_export_execute_permissions"
+	t.usebash = True
+	t.targets = []
+	t.command = "ls -l $(EPOCROOT)/epoc32/testunzip/archive/archivefilelinuxbin"
+	t.mustmatch = ["-[rw-]{2}x[rw-]{2}x[rw-]{2}x"]
+	t.run("linux")
 	
 	t = AntiTargetSmokeTest()
 	t.id = "0024b"
 	t.name = "zip_export_reallyclean"
-	t.command = "sbs -b smoke_suite/test_resources/simple_zip_export/bld.inf " \
-			+ "REALLYCLEAN"
+	t.command = "sbs -b smoke_suite/test_resources/simple_zip_export/bld.inf REALLYCLEAN"
 	t.antitargets = [
 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile1.txt",
 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile2.txt",
 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile3.txt",
 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile4.txt",
+		"$(EPOCROOT)/epoc32/testunzip/archive/archivefilelinuxbin",
 		"$(EPOCROOT)/epoc32/build/" + markerfile
 	]
 	t.run()
-	if t.result == SmokeTest.FAIL:
-		result = SmokeTest.FAIL
-	
 	
 	t.id = "24"
 	t.name = "zip_export_plus_clean"
-	t.result = result
 	t.print_result()
 	return t
--- a/sbsv2/raptor/test/smoke_suite/zip_export_what.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/test/smoke_suite/zip_export_what.py	Mon Dec 07 12:50:33 2009 +0000
@@ -30,13 +30,16 @@
 		'$(EPOCROOT)/epoc32/testunzip/archive/archivefile1.txt',
 		'$(EPOCROOT)/epoc32/testunzip/archive/archivefile2.txt',
 		'$(EPOCROOT)/epoc32/testunzip/archive/archivefile3.txt',
-		'$(EPOCROOT)/epoc32/testunzip/archive/archivefile4.txt'
+		'$(EPOCROOT)/epoc32/testunzip/archive/archivefile4.txt',
+		"$(EPOCROOT)/epoc32/testunzip/archive/archivefilelinuxbin"
 	]
+	
 	t.targets = [
 		'$(EPOCROOT)/epoc32/testunzip/archive/archivefile1.txt',
 		'$(EPOCROOT)/epoc32/testunzip/archive/archivefile2.txt',
 		'$(EPOCROOT)/epoc32/testunzip/archive/archivefile3.txt',
 		'$(EPOCROOT)/epoc32/testunzip/archive/archivefile4.txt',
+		"$(EPOCROOT)/epoc32/testunzip/archive/archivefilelinuxbin",
 		"$(EPOCROOT)/epoc32/build/" + markerfile
 	]
 	t.run()
--- a/sbsv2/raptor/test/unit_suite/raptor_cli_unit.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/test/unit_suite/raptor_cli_unit.py	Mon Dec 07 12:50:33 2009 +0000
@@ -116,6 +116,10 @@
 	def SetExportOnly(self, yesOrNo):
 		self.doExportOnly = yesOrNo
 		return True
+
+	def SetNoExport(self, yesOrNo):
+		self.doExport = not yesOrNo
+		return True
 	
 	def SetKeepGoing(self, yesOrNo):
 		return True
@@ -131,6 +135,9 @@
 
 	def SetToolCheck(self, toolcheck):
 		return True
+	
+	def SetTiming(self, yesOrNo):
+		return True
 
 	def SetParallelParsing(self, onoroff):
 		self.pp=onoroff
--- a/sbsv2/raptor/test/unit_suite/raptor_data_unit.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/test/unit_suite/raptor_data_unit.py	Mon Dec 07 12:50:33 2009 +0000
@@ -84,26 +84,26 @@
 		filter.AddChildSpecification(raptor_data.Specification("TrueSpec"))
 		filter.Else.AddChildSpecification(raptor_data.Specification("FalseSpec"))
 		
-		filter.Configure( raptor_data.BuildUnit("ARMV5",[]) )
+		filter.Configure( raptor_data.BuildUnit("ARMV5",[]), cache=None )
 		# check a positive test
-		iface = filter.GetInterface()
+		iface = filter.GetInterface(cache=None)
 		self.assertEqual(iface.name, "True.EXE")
-		vars = filter.GetVariants()
+		vars = filter.GetVariants(cache = None)
 		self.assertEqual(vars[0].name, "True_var")
 		kids = filter.GetChildSpecs()
 		self.assertEqual(kids[0].name, "TrueSpec")
 		
-		filter.Configure( raptor_data.BuildUnit("NOT_ARMV5",[]) )
+		filter.Configure( raptor_data.BuildUnit("NOT_ARMV5",[]) , cache = None)
 		# check a negative test
-		iface = filter.GetInterface()
+		iface = filter.GetInterface(cache = None)
 		self.assertEqual(iface.name, "False.EXE")
-		vars = filter.GetVariants()
+		vars = filter.GetVariants(cache = None)
 		self.assertEqual(vars[0].name, "False_var")
 		kids = filter.GetChildSpecs()
 		self.assertEqual(kids[0].name, "FalseSpec")
 		
 
-	def testSimpeVariant(self):
+	def testSimpleVariant(self):
 		var = raptor_data.Variant()
 		self.failUnless(var)
 		self.failIf( var.Valid() )
@@ -127,7 +127,7 @@
 		self.failUnless( var.Valid() )
 
 		var.SetProperty("extends", "")
-		ops = var.GetAllOperationsRecursively()
+		ops = var.GetAllOperationsRecursively(None)
 
 		self.assertEqual( len(ops), 1 )
 		self.assertEqual( len(ops[0]), 2 )
@@ -158,16 +158,16 @@
 		r.cache.AddVariant(varB)
 		r.cache.AddVariant(varC)
 
-		e = r.GetEvaluator(None, varA.GenerateBuildUnits()[0] )
+		e = r.GetEvaluator(None, varA.GenerateBuildUnits(r.cache)[0] )
 		self.assertEqual( e.Get("V1"), "1A" )
 		self.assertEqual( e.Get("V2"), "2A" )
 
-		e = r.GetEvaluator(None, varB.GenerateBuildUnits()[0] )
+		e = r.GetEvaluator(None, varB.GenerateBuildUnits(r.cache)[0] )
 		self.assertEqual( e.Get("V1"), "1A" )
 		self.assertEqual( e.Get("V2"), "2B" )
 		self.assertEqual( e.Get("V3"), "3B" )
 
-		e = r.GetEvaluator(None, varC.GenerateBuildUnits()[0] )
+		e = r.GetEvaluator(None, varC.GenerateBuildUnits(r.cache)[0] )
 		self.assertEqual( e.Get("V1"), "1A" )
 		self.assertEqual( e.Get("V2"), "2B" )
 		self.assertEqual( e.Get("V3"), "3C" )
@@ -201,15 +201,15 @@
 		r.cache.AddVariant(varB)
 		r.cache.AddVariant(varC)
 
-		e = r.GetEvaluator(None, varA.GenerateBuildUnits()[0] )
+		e = r.GetEvaluator(None, varA.GenerateBuildUnits(r.cache)[0] )
 		self.assertEqual( e.Get("V1"), "1A" )
 		self.assertEqual( e.Get("V2"), "2A" )
 
-		e = r.GetEvaluator(None, varC.GenerateBuildUnits()[0] )
+		e = r.GetEvaluator(None, varC.GenerateBuildUnits(r.cache)[0] )
 		self.assertEqual( e.Get("V3"), "3C" )
 		self.assertEqual( e.Get("V4"), "4C" )
 
-		e = r.GetEvaluator(None, varB.GenerateBuildUnits()[0] )
+		e = r.GetEvaluator(None, varB.GenerateBuildUnits(r.cache)[0] )
 		self.assertEqual( e.Get("V1"), "1A" )
 		self.assertEqual( e.Get("V2"), "2B" )
 		self.assertEqual( e.Get("V3"), "3B" )
@@ -240,7 +240,7 @@
 
 		self.failUnless( alias.Valid() )
 
-		e = r.GetEvaluator(None, alias.GenerateBuildUnits()[0] )
+		e = r.GetEvaluator(None, alias.GenerateBuildUnits(r.cache)[0] )
 		self.assertEqual( e.Get("V1"), "1A" )
 		self.assertEqual( e.Get("V2"), "2B" )
 		self.assertEqual( e.Get("V3"), "3C" )
@@ -294,14 +294,14 @@
 		self.failUnless( group1.Valid() )
 		self.failUnless( group2.Valid() )
 
-		buildUnits = group1.GenerateBuildUnits()
+		buildUnits = group1.GenerateBuildUnits(r.cache)
 		self.assertEqual( len(buildUnits), 2 )
 		self.assertEqual( buildUnits[0].name, "A" )
 		self.assertEqual( buildUnits[1].name, "alias" )
 		self.assertEqual( buildUnits[1].variants[0].name, "B" )
 		self.assertEqual( buildUnits[1].variants[1].name, "C" )
 
-		buildUnits = group2.GenerateBuildUnits()
+		buildUnits = group2.GenerateBuildUnits(r.cache)
 		self.assertEqual( len(buildUnits), 3 )
 		self.assertEqual( buildUnits[0].name, "C.B" )
 		self.assertEqual( buildUnits[1].name, "A" )
@@ -316,7 +316,7 @@
 
 		r.cache.Load( generic_path.Join(r.home, "test", "config", "arm.xml") )
 
-		buildUnits = r.cache.FindNamedGroup("G2").GenerateBuildUnits()
+		buildUnits = r.cache.FindNamedGroup("G2").GenerateBuildUnits(r.cache)
 
 		self.assertEqual( len(buildUnits), 8 )
 
@@ -345,10 +345,11 @@
 		self.SetEnv("EPOCROOT", "/C")
 		aRaptor = raptor.Raptor()
 		cache = aRaptor.cache
+		aRaptor.debugOutput = True
 		cache.Load(generic_path.Join(aRaptor.home, "test", "config", "arm.xml"))
 		
 		var = cache.FindNamedVariant("ARMV5_UREL")
-		eval = aRaptor.GetEvaluator( None, var.GenerateBuildUnits()[0] )
+		eval = aRaptor.GetEvaluator( None, var.GenerateBuildUnits(aRaptor.cache)[0])
 		self.RestoreEnv("EPOCROOT")
 		
 		# test the Get method
@@ -366,13 +367,14 @@
 		var.AddOperation(raptor_data.Env("RAPTOR_SAYS_NO"))
 
 		aRaptor = raptor.Raptor()
-		var.SetOwner(aRaptor)
-		
-		eval = aRaptor.GetEvaluator(None, var.GenerateBuildUnits()[0] )
-		badval = eval.Get("RAPTOR_SAYS_NO")
-		
-		self.assertEqual(badval, "NO_VALUE_FOR_RAPTOR_SAYS_NO")
-		self.assertEqual(aRaptor.errorCode, 1)
+	
+		try:	
+			eval = aRaptor.GetEvaluator(None, var.GenerateBuildUnits(aRaptor.cache)[0] )
+			badval = eval.Get("RAPTOR_SAYS_NO")
+		except raptor_data.UninitialisedVariableException, e:
+			return
+
+		self.assertTrue(False)
 
 	def checkForParam(self, params, name, default):
 		for p in params:
@@ -386,27 +388,27 @@
 		cache.Load(generic_path.Join(aRaptor.home, "test", "config", "interface.xml"))
 		
 		base = cache.FindNamedInterface("Base.XYZ")
-		p = base.GetParams()
+		p = base.GetParams(cache)
 		self.failUnless(self.checkForParam(p, "A", None))
 		self.failUnless(self.checkForParam(p, "B", "baseB"))
 		self.failUnless(self.checkForParam(p, "C", "baseC"))
 		
 		extended = cache.FindNamedInterface("Extended.XYZ")
-		p = extended.GetParams()
+		p = extended.GetParams(cache)
 		self.failUnless(self.checkForParam(p, "A", None))
 		self.failUnless(self.checkForParam(p, "B", "baseB"))
 		self.failUnless(self.checkForParam(p, "C", "extC"))
 		self.failUnless(self.checkForParam(p, "D", None))
-		f = extended.GetFLMIncludePath()
+		f = extended.GetFLMIncludePath(cache=cache)
 		self.assertEqual(f.File(), "ext.flm")
 		
 		extended = cache.FindNamedInterface("Extended2.XYZ")
-		p = extended.GetParams()
+		p = extended.GetParams(cache)
 		self.failUnless(self.checkForParam(p, "A", None))
 		self.failUnless(self.checkForParam(p, "B", "baseB"))
 		self.failUnless(self.checkForParam(p, "C", "extC"))
 		self.failUnless(self.checkForParam(p, "D", None))
-		f = extended.GetFLMIncludePath()
+		f = extended.GetFLMIncludePath(cache)
 		self.assertEqual(f.File(), "base.flm")
 	
 	
--- a/sbsv2/raptor/test/unit_suite/raptor_make_unit.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/test/unit_suite/raptor_make_unit.py	Mon Dec 07 12:50:33 2009 +0000
@@ -71,14 +71,12 @@
 		svar.AddOperation(raptor_data.Set("EXEPARAM1", "parameter 1"))
 		svar.AddOperation(raptor_data.Set("EXEPARAM2", "parameter 2"))
 		spec.AddVariant(svar)
-		spec.SetOwner(aRaptor)
 		
 		# use a minimal Configuration
 		conf = raptor_data.Variant("myConfig")
 		cvar = raptor_data.Variant("CVAR")
 		cvar.AddOperation(raptor_data.Set("EXEPARAM3", "parameter 3"))
 		bldunit = raptor_data.BuildUnit("myConfig.CVAR",[conf,cvar])
-		conf.SetOwner(aRaptor)
 		
 		# delete any old Makefiles
 		m1 = testDir.Append("Makefile")
@@ -148,7 +146,6 @@
 		#
 		top1.AddChildSpecification(top1c1)
 		top1.AddChildSpecification(top1c2)
-		top1.SetOwner(aRaptor)
 		
 		# top 2 has no sub-nodes
 		top2 = raptor_data.Specification("top2")
@@ -157,7 +154,6 @@
 		top2v.AddOperation(raptor_data.Set("EXEPARAM1", "top2 p1"))
 		top2.AddVariant(top2v)
 		#
-		top2.SetOwner(aRaptor)
 		
 		# use a pair of minimal Configurations
 		
@@ -165,13 +161,11 @@
 		c1var = raptor_data.Variant()
 		c1var.AddOperation(raptor_data.Set("EXEPARAM2", "conf1 p2"))
 		buildunit1 = raptor_data.BuildUnit("conf1.c1var",[conf1,c1var])
-		conf1.SetOwner(aRaptor)
 		
 		conf2 = raptor_data.Variant("conf2")
 		c2var = raptor_data.Variant()
 		c2var.AddOperation(raptor_data.Set("EXEPARAM2", "conf2 p2"))
 		buildunit2 = raptor_data.BuildUnit("conf2.c2var",[conf2,c2var])
-		conf2.SetOwner(aRaptor)
 		
 		# delete any old Makefiles
 		makefiles = [testDir.Append("Makefile")]
@@ -205,6 +199,7 @@
 		aRaptor.LoadCache()
 		aRaptor.pruneDuplicateMakefiles = False
 		aRaptor.writeSingleMakefile = False
+		aRaptor.debugOutput = True
 		
 		# find the test directory
 		testDir = aRaptor.home.Append("test", "tmp")
@@ -258,7 +253,6 @@
 		#
 		top.Else.AddChildSpecification(childF)
 		
-		top.SetOwner(aRaptor)
 		
 		# Configurations
 		
@@ -267,42 +261,36 @@
 		confAv.AddOperation(raptor_data.Set("SWITCH", "confA switch"))
 		confAv.AddOperation(raptor_data.Set("TOGGLE", "confA toggle"))
 		b1 = raptor_data.BuildUnit("confA.confAv",[confA,confAv])
-		confA.SetOwner(aRaptor)
 		
 		confB = raptor_data.Variant("confB")	# hit
 		confBv = raptor_data.Variant()
 		confBv.AddOperation(raptor_data.Set("SWITCH", "confB switch"))
 		confBv.AddOperation(raptor_data.Set("TOGGLE", "confB toggle"))
 		b2 = raptor_data.BuildUnit("confB.confBv",[confB,confBv])
-		confB.SetOwner(aRaptor)
 		
 		confC = raptor_data.Variant("confC")
 		confCv = raptor_data.Variant()
 		confCv.AddOperation(raptor_data.Set("SWITCH", "confC switch"))
 		confCv.AddOperation(raptor_data.Set("TOGGLE", "confC toggle"))
 		b3 = raptor_data.BuildUnit("confC.confCv",[confC,confCv])
-		confC.SetOwner(aRaptor)
 		
 		confD = raptor_data.Variant("confD")
 		confDv = raptor_data.Variant()
 		confDv.AddOperation(raptor_data.Set("SWITCH", "ARM"))	# hit
 		confDv.AddOperation(raptor_data.Set("TOGGLE", "confD toggle"))
 		b4 = raptor_data.BuildUnit("confD.confDv",[confD,confDv])
-		confD.SetOwner(aRaptor)
 		
 		confE = raptor_data.Variant("confE")
 		confEv = raptor_data.Variant()
 		confEv.AddOperation(raptor_data.Set("SWITCH", "confE switch"))
 		confEv.AddOperation(raptor_data.Set("TOGGLE", "B"))		# hit
 		b5 = raptor_data.BuildUnit("confE.confEv",[confE,confEv])
-		confE.SetOwner(aRaptor)
 		
 		confF = raptor_data.Variant("confF")
 		confFv = raptor_data.Variant()
 		confFv.AddOperation(raptor_data.Set("SWITCH", "confF switch"))
 		confFv.AddOperation(raptor_data.Set("TOGGLE", "confF toggle"))
 		b6 = raptor_data.BuildUnit("confF.confFv",[confF,confFv])
-		confF.SetOwner(aRaptor)
 		
 		# delete any old Makefiles
 		makefiles = [testDir.Append("Makefile")]
@@ -322,7 +310,7 @@
 		
 		# create new Makefiles
 		maker = raptor_make.MakeEngine(aRaptor)
-		maker.Write(makefiles[0], [top], [b1,b2,b3,b4,b5,b6])
+		maker.Write(makefiles[0], specs=[top], configs=[b1,b2,b3,b4,b5,b6])
 		
 		# test and clean
 		self.failUnless(self.checkMakefiles(makefiles))
@@ -353,25 +341,19 @@
 		
 		f1 = raptor_data.Filter("f1")
 		f1.SetConfigCondition("c1")
-		f1.SetOwner(aRaptor)
 		
 		f2 = raptor_data.Filter("f2")
 		f2.SetConfigCondition("c2")
 		f2.SetInterface(iface)
-		f2.SetOwner(aRaptor)
 		
 		f3 = raptor_data.Filter("f3")
 		f3.SetConfigCondition("c3")
 		f3.SetInterface(iface)
-		f3.SetOwner(aRaptor)
 		
 		# Configurations
 		c1 = raptor_data.Variant("c1")
-		c1.SetOwner(aRaptor)
 		c2 = raptor_data.Variant("c2")
-		c2.SetOwner(aRaptor)
 		c3 = raptor_data.Variant("c3")
-		c3.SetOwner(aRaptor)
 
 		# Build Units
 		b1 = raptor_data.BuildUnit("c1",[c1])
--- a/sbsv2/raptor/test/unit_suite/raptor_meta_unit.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/test/unit_suite/raptor_meta_unit.py	Mon Dec 07 12:50:33 2009 +0000
@@ -141,13 +141,11 @@
 		
 		# Get the version of CPP that we are using and hope it's correct
 		# since there is no tool check.
-		if raptor_utilities.getOSFileSystem() == "cygwin":
-			self.__gnucpp = os.environ[raptor.env] + "/win32/bv/bin/cpp" 
+		if os.environ.has_key('SBS_GNUCPP'):
+			self.__gnucpp = os.environ['SBS_GNUCPP']
 		else: 
 			self.__gnucpp = "cpp" 
-		if os.environ.has_key('GNUCPP'):
-			self.__gnucpp = os.environ['GNUCPP']
-		
+	
 	def testPreProcessor(self):
 		# Just test for correct behaviour on failure, other tests excercise correct behaviour on success
 		preProcessor = raptor_meta.PreProcessor('cpp_that_does_not_exist', 
@@ -202,7 +200,8 @@
 		bldInfFile = aRootBldInfLocation.Append(aBldInfFile)
 		self.failUnless(bldInfFile)
 		
-		bldInfObject = raptor_meta.BldInfFile(bldInfFile, self.__gnucpp, self.raptor)
+		depfiles=[]
+		bldInfObject = raptor_meta.BldInfFile(bldInfFile, self.__gnucpp, depfiles=depfiles, log=self.raptor)
 		
 		bp = bldInfObject.getBuildPlatforms(self.defaultPlatform)
 		self.assertEquals(bp, aExpectedBldInfPlatforms)
@@ -246,7 +245,8 @@
 		bldInfTestRoot = self.__testRoot.Append('metadata/project/mmps/test_mmps')
 		
 		bldInfFile = bldInfTestRoot.Append('test_mmps.inf')
-		bldInfObject = raptor_meta.BldInfFile(bldInfFile, self.__gnucpp, self.raptor)
+		depfiles = []
+		bldInfObject = raptor_meta.BldInfFile(bldInfFile, self.__gnucpp, depfiles=depfiles, log=self.raptor)
 		testArmv5Platform = self.ARMV5
 		testArmv5Platform["TESTCODE"] = True
 		bldInfObject.getRomTestType(testArmv5Platform)
@@ -273,8 +273,9 @@
 		bldInfTestRoot = self.__testRoot.Append('metadata/project/bld.infs')
 		bldInfMakefilePathTestRoot = str(self.__makefilePathTestRoot) + '/metadata/project/'
 		
+		depfiles = []
 		bldInfObject = raptor_meta.BldInfFile(bldInfTestRoot.Append('exports.inf'), 
-											  self.__gnucpp, self.raptor)
+											  self.__gnucpp, depfiles=depfiles, log=self.raptor)
 					
 		exports = bldInfObject.getExports(self.defaultPlatform)
 		
@@ -491,8 +492,9 @@
 	def testBldInfExtensions(self):
 		bldInfTestRoot = self.__testRoot.Append('metadata/project/bld.infs')
 		bldInfMakefilePathTestRoot = str(self.__makefilePathTestRoot)+'/metadata/project/bld.infs'			
+		depfiles = []
 		bldInfObject = raptor_meta.BldInfFile(bldInfTestRoot.Append('extensions.inf'),
-											  self.__gnucpp, self.raptor)
+											  self.__gnucpp, depfiles=depfiles, log=self.raptor)
 		
 		extensions = bldInfObject.getExtensions(self.ARMV5)
 		
@@ -565,8 +567,9 @@
 		
 	def testBldInfIncludes(self):
 		bldInfTestRoot = self.__testRoot.Append('metadata/project/bld.infs/includes')
+		depfiles=[]
 		bldInfObject = raptor_meta.BldInfFile(bldInfTestRoot.Append('top_level.inf'),
-											  self.__gnucpp, self.raptor)
+											  self.__gnucpp, depfiles=depfiles, log=self.raptor)
 		Root = str(bldInfTestRoot)
 		
 		mmpFiles = bldInfObject.getMMPList(self.ARMV5)
@@ -582,15 +585,19 @@
 
 	def testMmpIncludes(self):
 		mmpTestRoot = self.__testRoot.Append('metadata/project/mmps/includes')
-		mmpMakefilePathTestRoot = str(self.__makefilePathTestRoot)+'/metadata/project/mmps/includes'			
+		mmpMakefilePathTestRoot = str(self.__makefilePathTestRoot)+'/metadata/project/mmps/includes'
+
+		depfiles=[]
 		bldInfObject = raptor_meta.BldInfFile(mmpTestRoot.Append('top_level.inf'),
-											  self.__gnucpp, self.raptor)
+										 self.__gnucpp, depfiles=depfiles, log=self.raptor)
 		
 		mmpFiles = bldInfObject.getMMPList(self.ARMV5)
+		mmpdeps = []
 		mmpFile = raptor_meta.MMPFile(mmpFiles['mmpFileList'][0].filename, 
 										   self.__gnucpp,
 										   bldInfObject,
-										   self.raptor)
+									           depfiles=mmpdeps,
+										   log=self.raptor)
 		
 		self.assertEquals(str(mmpFile.filename), 
 						  str(mmpTestRoot.Append("top_level.mmp")))
@@ -728,20 +735,32 @@
 		
 		for t in defFileTests:
 			self.assertEquals(t.test(self.raptor), True)
-		
+	
+	def dummyMetaReader(self):
+		"make raptor_meta.MetaReader.__init__ into a none operation"
+		self.savedInit = raptor_meta.MetaReader.__init__
+
+		def DummyMetaReaderInit(self, aRaptor):
+			self._MetaReader__Raptor = aRaptor
+
+		raptor_meta.MetaReader.__init__ = DummyMetaReaderInit
+
+	def restoreMetaReader(self):
+		"make raptor_meta.MetaReader.__init__ operational again"
+		raptor_meta.MetaReader.__init__ = self.savedInit
+
 	def testApplyOsVariant(self):
+		self.dummyMetaReader()
+
 		# Mock output class
 		class OutputMock(object):
 			def write(self, text):
 				pass
 				
-		def MetaReaderInitFunction(self, aRaptor):
-			self._MetaReader__Raptor = aRaptor
-		
 		bu = raptor_data.BuildUnit("os_variant", [])
 					
 		self.raptor.keepGoing = False
-		raptor_meta.MetaReader.__init__ = MetaReaderInitFunction
+		
 		metaReader = raptor_meta.MetaReader(self.raptor)
 		metaReader.ApplyOSVariant(bu, ".")
 
@@ -750,6 +769,8 @@
 		metaReader = raptor_meta.MetaReader(self.raptor)	
 		metaReader.ApplyOSVariant(bu, ".")
 
+		self.restoreMetaReader()
+
 	def __assertEqualStringList(self, aListOne, aListTwo):
 		self.assertEquals(len(aListOne), len(aListTwo))
 		
@@ -799,6 +820,8 @@
 		self.__assertEqualStringList(results, ['--assignmentArgU=value1<->--assignmentArgV=value2'])
 	
 	def testModuleName(self):
+		self.dummyMetaReader()
+
 		# Test how we resolve known permutations of values given to the .mmp file OPTION_REPLACE keyword
 		mockBackend = raptor_meta.MetaReader(self.raptor)
 		
@@ -816,6 +839,8 @@
 		for result in resultsDictList:
 			moduleName = mockBackend.ModuleName(result["bldinf"])
 			self.assertEquals(moduleName, result["result"])
+
+		self.restoreMetaReader()
 		
 # run all the tests
 
--- a/sbsv2/raptor/test/unit_suite/raptor_unit.py	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/test/unit_suite/raptor_unit.py	Mon Dec 07 12:50:33 2009 +0000
@@ -17,6 +17,8 @@
 
 import raptor
 import raptor_version
+import raptor_meta
+import raptor_utilities
 import re
 import unittest
 import generic_path
@@ -38,7 +40,7 @@
 		
 
 	def testVersion(self):
-		self.failUnless(re.match("^\d+\.\d+\.", raptor_version.Version()))
+		self.failUnless(re.match("^\d+\.\d+\.", raptor_version.fullversion()))
 
 
 	def testCLISupport(self):
@@ -56,10 +58,66 @@
 		r.SetSysDefBase("C:\\mysysdef")
 		r.AddBuildInfoFile("build.info")
 		r.SetTopMakefile("E:\\epoc32\\build\\Makefile")
+		
+		
+	def testComponentListParsing(self):
+		expected_spec_output = [
+				'test/smoke_suite/test_resources/simple/bld.inf',
+				'test/smoke_suite/test_resources/simple_export/bld.inf',
+				'test/smoke_suite/test_resources/simple_dll/bld.inf',
+				'test/smoke_suite/test_resources/simple_extension/bld.inf',
+				'test/smoke_suite/test_resources/simple_gui/Bld.inf',
+				'TOOLS2 SHOULD NOT APPEAR IN THE OUTPUT']
+		
+		r = raptor.Raptor()
+		null_log_instance = raptor_utilities.NullLog()
+		r.Info = null_log_instance.Info 
+		r.Debug = null_log_instance.Debug
+		r.Warn = null_log_instance.Warn
+		r.ConfigFile()
+		r.ProcessConfig()
+		# Note that tools2/bld.inf specifies tools2 as the only supported
+		# platform, so it should not appear in the component list at the end
+		r.CommandLine([
+				'-b', 'smoke_suite/test_resources/simple/bld.inf',
+				'-b', 'smoke_suite/test_resources/simple_dll/bld.inf',
+				'-b', 'smoke_suite/test_resources/simple_export/bld.inf',
+				'-b', 'smoke_suite/test_resources/simple_extension/bld.inf',
+				'-b', 'smoke_suite/test_resources/simple_gui/Bld.inf',
+				'-b', 'smoke_suite/test_resources/tools2/bld.inf',
+				'-c', 'armv5'])
+		# establish an object cache
+		r.LoadCache()
+		buildUnitsToBuild = r.GetBuildUnitsToBuild(r.configNames)
+		# find out what components to build, and in what way
+		layers = []
+		layers = r.GetLayersFromCLI()
+		
+		generic_specs = r.GenerateGenericSpecs(buildUnitsToBuild)
+		
+		specs = []
+		specs.extend(generic_specs)
+		metaReader = raptor_meta.MetaReader(r, buildUnitsToBuild)
+		specs.extend(metaReader.ReadBldInfFiles(layers[0].children,
+				False))
+
+		# See what components are actually built for the given configs
+		# should be only 5 since 1 is a tools component and we're building armv5
+		hits = 0
+		for c in layers[0].children:
+			if len(c.specs) > 0: 
+				# something will be built from this component because
+				# it has at least one spec
+				shortname = str(c.bldinf_filename)[len(os.environ['SBS_HOME'])+1:]
+				self.assertTrue(shortname in expected_spec_output)
+				hits += 1
+
+		# Ensure there actually are 5 build specs
+		self.assertEqual(hits, len(expected_spec_output) - 1)
+
 
 	def setUp(self):
 		self.r = raptor.Raptor()
-		self.r.out = OutputMock()
 		
 		self.cwd = generic_path.CurrentDir()
 		self.isFileReturningFalse = lambda: False
@@ -68,42 +126,44 @@
 		self.sysDef = self.cwd.Append(self.r.systemDefinition)
 		self.bldInf = self.cwd.Append(self.r.buildInformation)
 
-	def testCreateWarningForNonexistingBldInfAndSystemDefinitionFile(self): 
+	def testWarningIfSystemDefinitionFileDoesNotExist(self): 
 		"""Test if sbs creates warning if executed without specified 
 		component to build i.e. default bld.inf (bld.inf in current 
 		directory) or system definition file.
 
 		Uses an empty temporary directory for this."""
+		self.r.out = OutputMock()
 
 		d = tempfile.mkdtemp(prefix='raptor_test') 
 		cdir = os.getcwd()
 		os.chdir(d) 
-		self.r.GetComponentGroupsFromCLI()
+		layers = self.r.GetLayersFromCLI()
 		os.chdir(cdir) # go back
 		os.rmdir(d)
 		
 		self.assertTrue(self.r.out.warningWritten())
 
-	def testCreateWarningForExistingBldInf(self):
 		d = tempfile.mkdtemp(prefix='raptor_test') 
 		cdir = os.getcwd()
 		os.chdir(d)
 		f = open("bld.inf","w")
 		f.close()
-		self.r.GetComponentGroupsFromCLI()
+		layers = self.r.GetLayersFromCLI()
 		os.unlink("bld.inf")
 		os.chdir(cdir) # go back
 		os.rmdir(d)
 
-		self.assertFalse(self.r.out.warningWritten())
+		self.assertTrue(self.r.out.warningWritten())
 
-	def testCreateWarningForExistingSystemDefinitionFile(self): 
+	def testNoWarningIfSystemDefinitionFileExists(self): 
+		self.r.out = OutputMock()
+
 		d = tempfile.mkdtemp(prefix='raptor_test') 
 		cdir = os.getcwd()
 		os.chdir(d)
 		f = open("System_Definition.xml","w")
 		f.close()
-		self.r.GetComponentGroupsFromCLI()
+		layers = self.r.GetLayersFromCLI()
 		os.unlink("System_Definition.xml")
 		os.chdir(cdir) # go back
 		os.rmdir(d)
@@ -112,32 +172,38 @@
 	
 	# Test Info, Warn & Error functions can handle attributes
 	def testInfoAttributes(self):
+		self.r.out = OutputMock()
 		self.r.Info("hello %s", "world", planet="earth")
 		expected = "<info planet='earth'>hello world</info>\n"
 		self.assertEquals(self.r.out.actual, expected)
 		
 	def testWarnAttributes(self):
+		self.r.out = OutputMock()
 		self.r.Warn("look out", where="behind you")
 		expected = "<warning where='behind you'>look out</warning>\n"
 		self.assertEquals(self.r.out.actual, expected)
 		
 	def testErrorAttributes(self):
+		self.r.out = OutputMock()
 		self.r.Error("messed up %s and %s", "all", "sundry", bldinf="bld.inf")
 		expected = "<error bldinf='bld.inf'>messed up all and sundry</error>\n"
 		self.assertEquals(self.r.out.actual, expected)	
 		
 	# Test Info, Warn & Error functions to ensure XML control chars are escaped
 	def testInfoXMLEscaped(self):
+		self.r.out = OutputMock()
 		self.r.Info("h&l>o<&amp;")
 		expected = "<info>h&amp;l&gt;o&lt;&amp;amp;</info>\n"
 		self.assertEquals(self.r.out.actual, expected)
 		
 	def testWarnXMLEscaped(self):
+		self.r.out = OutputMock()
 		self.r.Warn("h&l>o<&amp;")
 		expected = "<warning>h&amp;l&gt;o&lt;&amp;amp;</warning>\n"
 		self.assertEquals(self.r.out.actual, expected)
 		
 	def testErrorXMLEscaped(self):
+		self.r.out = OutputMock()
 		self.r.Error("h&l>o<&amp;")
 		expected = "<error>h&amp;l&gt;o&lt;&amp;amp;</error>\n"
 		self.assertEquals(self.r.out.actual, expected)
@@ -146,14 +212,16 @@
 # Mock output class preserving output for checking
 # Can also check if any warning has been written
 class OutputMock(object):
-	actual = ""
+	warningRegExp = re.compile(".*warning.*")
+
+	def __init__(self):
+		self.actual = ""
 	
 	def write(self, text):
-		self.actual = text
+		self.actual += text
 		
 	def warningWritten(self):
-		regExp = re.compile(".*warning.*")
-		if regExp.match(self.actual):
+		if OutputMock.warningRegExp.match(self.actual):
 			return True
 		return False
 			
--- a/sbsv2/raptor/util/install-windows/raptorinstallerscript.nsi	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/util/install-windows/raptorinstallerscript.nsi	Mon Dec 07 12:50:33 2009 +0000
@@ -103,17 +103,17 @@
 	
     # Install Raptor
     SetOutPath "$INSTDIR\bin"
-    File /r ${RAPTOR_LOCATION}\bin\*.* 
+    File /r /x distribution.policy.s60 ${RAPTOR_LOCATION}\bin\*.* 
     SetOutPath "$INSTDIR\examples"
-    File /r ${RAPTOR_LOCATION}\examples\*.*
+    File /r /x distribution.policy.s60 ${RAPTOR_LOCATION}\examples\*.*
     SetOutPath "$INSTDIR\lib"
-    File /r ${RAPTOR_LOCATION}\lib\*.*
+    File /r /x distribution.policy.s60 ${RAPTOR_LOCATION}\lib\*.*
     SetOutPath "$INSTDIR\python"
-    File /r ${RAPTOR_LOCATION}\python\*.*
+    File /r /x distribution.policy.s60 ${RAPTOR_LOCATION}\python\*.*
     SetOutPath "$INSTDIR\schema"
-    File /r ${RAPTOR_LOCATION}\schema\*.*
+    File /r /x distribution.policy.s60 ${RAPTOR_LOCATION}\schema\*.*
     SetOutPath "$INSTDIR\win32"
-    File /r ${RAPTOR_LOCATION}\win32\*.*
+    File /r /x distribution.policy.s60 ${RAPTOR_LOCATION}\win32\*.*
     
     SetOutPath "$INSTDIR"
     File ${RAPTOR_LOCATION}\RELEASE-NOTES.txt
--- a/sbsv2/raptor/util/talon/Makefile	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/util/talon/Makefile	Mon Dec 07 12:50:33 2009 +0000
@@ -23,8 +23,12 @@
 ifeq ($(filter win,$(HOSTPLATFORM)),win)
 PROCESS_C:=process_win.c
 CFLAGS:=-DHOST_WIN
+ifeq ($(SBS_MINGW),)
 LDFLAGS:=$(subst \,/,$(SBS_HOME:\=/)\win32\mingw\lib\libiberty.a)
 else
+LDFLAGS:=$(subst \,/,$(SBS_MINGW:\=/)\lib\libiberty.a)
+endif
+else
 PROCESS_C:=process.c
 CFLAGS:=-g
 linux_PTHREADLIBS:=-lpthread
--- a/sbsv2/raptor/util/talon/lock.c	Mon Nov 16 20:40:58 2009 +0000
+++ b/sbsv2/raptor/util/talon/lock.c	Mon Dec 07 12:50:33 2009 +0000
@@ -12,7 +12,7 @@
 * Contributors:
 *
 * Description: 
-*
+* Test program for grabbing and releasing the talon output semaphore.
 */
 
 
Binary file sbsv2/raptor/win32/bin/ransleep.exe has changed
Binary file sbsv2/raptor/win32/bin/talon.exe has changed
Binary file sbsv2/raptor/win32/bin/talonctl.exe has changed