Upgrading to Raptor 2.14
authormikek
Fri, 04 Jun 2010 13:09:28 +0100
changeset 18 de5b887c98f7
parent 14 eb060913c963
child 19 d2fccb2bbe1a
Upgrading to Raptor 2.14
cross-plat-dev-utils/patch-files/diffs/patch-0f5e3a7fb6af.patch
sbsv2/raptor/RELEASE-NOTES.html
sbsv2/raptor/bin/depcrunch.py
sbsv2/raptor/bin/recipestats.py
sbsv2/raptor/bin/sbs_filter.py
sbsv2/raptor/examples/os_properties.xml
sbsv2/raptor/lib/config/arm.xml
sbsv2/raptor/lib/config/carbide.xml
sbsv2/raptor/lib/config/locations.xml
sbsv2/raptor/lib/config/make.xml
sbsv2/raptor/lib/config/root.xml
sbsv2/raptor/lib/config/rvct.xml
sbsv2/raptor/lib/config/variants.xml
sbsv2/raptor/lib/config/winscw.xml
sbsv2/raptor/lib/flm/base.xml
sbsv2/raptor/lib/flm/e32abiv2.flm
sbsv2/raptor/lib/flm/e32abiv2kdll.flm
sbsv2/raptor/lib/flm/resource.flm
sbsv2/raptor/lib/flm/standard.xml
sbsv2/raptor/lib/flm/tracecompiler.mk
sbsv2/raptor/lib/flm/win32.flm
sbsv2/raptor/notes/abiv1_implibs.txt
sbsv2/raptor/notes/delete_on_failed_compile.txt
sbsv2/raptor/notes/localresourcecopying.txt
sbsv2/raptor/notes/parametric_log_filters.txt
sbsv2/raptor/notes/query_cli.txt
sbsv2/raptor/notes/tcomsupport.txt
sbsv2/raptor/python/filter_interface.pyc
sbsv2/raptor/python/filter_list.py
sbsv2/raptor/python/filter_list.pyc
sbsv2/raptor/python/filter_utils.pyc
sbsv2/raptor/python/generic_path.pyc
sbsv2/raptor/python/mmpparser.pyc
sbsv2/raptor/python/pluginbox.pyc
sbsv2/raptor/python/plugins/dummyplugin.pyc
sbsv2/raptor/python/plugins/filter_carbide.pyc
sbsv2/raptor/python/plugins/filter_checksource.pyc
sbsv2/raptor/python/plugins/filter_clean.pyc
sbsv2/raptor/python/plugins/filter_component.py
sbsv2/raptor/python/plugins/filter_copyfile.py
sbsv2/raptor/python/plugins/filter_logfile.pyc
sbsv2/raptor/python/plugins/filter_splitlog.pyc
sbsv2/raptor/python/plugins/filter_squashlog.pyc
sbsv2/raptor/python/plugins/filter_tagcount.py
sbsv2/raptor/python/plugins/filter_terminal.pyc
sbsv2/raptor/python/plugins/filter_what.py
sbsv2/raptor/python/plugins/filter_what.pyc
sbsv2/raptor/python/pyparsing.pyc
sbsv2/raptor/python/raptor.py
sbsv2/raptor/python/raptor.pyc
sbsv2/raptor/python/raptor_api.py
sbsv2/raptor/python/raptor_cache.pyc
sbsv2/raptor/python/raptor_cli.py
sbsv2/raptor/python/raptor_cli.pyc
sbsv2/raptor/python/raptor_data.py
sbsv2/raptor/python/raptor_data.pyc
sbsv2/raptor/python/raptor_make.py
sbsv2/raptor/python/raptor_make.pyc
sbsv2/raptor/python/raptor_makefile.pyc
sbsv2/raptor/python/raptor_meta.py
sbsv2/raptor/python/raptor_meta.pyc
sbsv2/raptor/python/raptor_utilities.py
sbsv2/raptor/python/raptor_utilities.pyc
sbsv2/raptor/python/raptor_version.py
sbsv2/raptor/python/raptor_version.pyc
sbsv2/raptor/python/raptor_xml.py
sbsv2/raptor/python/raptor_xml.pyc
sbsv2/raptor/test/common/raptor_tests.py
sbsv2/raptor/test/config/abiv1kit/os_properties.xml
sbsv2/raptor/test/config/api.xml
sbsv2/raptor/test/metadata/project/bld.infs/bad_lone_end.inf
sbsv2/raptor/test/metadata/system/system_definition_multi_layers.xml
sbsv2/raptor/test/smoke_suite/annofile2log.py
sbsv2/raptor/test/smoke_suite/apply_usecases.py
sbsv2/raptor/test/smoke_suite/clean_readonly.py
sbsv2/raptor/test/smoke_suite/delete_on_failed_compile.py
sbsv2/raptor/test/smoke_suite/depcrunch_test.py
sbsv2/raptor/test/smoke_suite/dll_armv5.py
sbsv2/raptor/test/smoke_suite/exe_armv5_winscw_single_file.py
sbsv2/raptor/test/smoke_suite/featurevariants.py
sbsv2/raptor/test/smoke_suite/filter_params.py
sbsv2/raptor/test/smoke_suite/gccxml.py
sbsv2/raptor/test/smoke_suite/gnumakefile_what.py
sbsv2/raptor/test/smoke_suite/gui_whatlog.py
sbsv2/raptor/test/smoke_suite/implib_armv5.py
sbsv2/raptor/test/smoke_suite/implib_armv5_smp.py
sbsv2/raptor/test/smoke_suite/implib_armv5_what.py
sbsv2/raptor/test/smoke_suite/implib_armv5_with_armv5_smp.py
sbsv2/raptor/test/smoke_suite/implib_nodef.py
sbsv2/raptor/test/smoke_suite/implib_whatlog.py
sbsv2/raptor/test/smoke_suite/lib_versioned.py
sbsv2/raptor/test/smoke_suite/output_control.py
sbsv2/raptor/test/smoke_suite/pdll_arm.py
sbsv2/raptor/test/smoke_suite/query_cli.py
sbsv2/raptor/test/smoke_suite/resource.py
sbsv2/raptor/test/smoke_suite/sysdef_layers.py
sbsv2/raptor/test/smoke_suite/temtest.py
sbsv2/raptor/test/smoke_suite/test_resources/annofile2log/testanno2log.py
sbsv2/raptor/test/smoke_suite/test_resources/apply_usecases/linker_options/test_apply_linkeroptions.mmp
sbsv2/raptor/test/smoke_suite/test_resources/bv/config/variants/bv_test.xml
sbsv2/raptor/test/smoke_suite/test_resources/depcrunch/dep2.rpp.d
sbsv2/raptor/test/smoke_suite/test_resources/logexamples/filter_component.log
sbsv2/raptor/test/smoke_suite/test_resources/resource/dependentresource.rss
sbsv2/raptor/test/smoke_suite/test_resources/resource/group/testresource.mmp
sbsv2/raptor/test/smoke_suite/test_resources/resource/test.cpp
sbsv2/raptor/test/smoke_suite/test_resources/scripts/delete_on_failed_compile.py
sbsv2/raptor/test/smoke_suite/test_resources/simple/compilervariants/delete_on_failed_compile_compiler_variants.xml
sbsv2/raptor/test/smoke_suite/test_resources/simple/makevariants/delete_on_failed_compile_make_variants.xml
sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/child1.mmp
sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/child2.mmp
sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/child3.mmp
sbsv2/raptor/test/smoke_suite/timing.py
sbsv2/raptor/test/smoke_suite/tracecompiler_general.py
sbsv2/raptor/test/smoke_suite/tracecompiler_variants.py
sbsv2/raptor/test/smoke_suite/tracecompiler_whatlog.py
sbsv2/raptor/test/smoke_suite/unfrozen.py
sbsv2/raptor/test/smoke_suite/whatcomp.py
sbsv2/raptor/test/smoke_suite/whatlog_cache.py
sbsv2/raptor/test/smoke_suite/winscw_resource.py
sbsv2/raptor/test/unit_suite/raptor_api_unit.py
sbsv2/raptor/test/unit_suite/raptor_cli_unit.py
sbsv2/raptor/test/unit_suite/raptor_meta_unit.py
sbsv2/raptor/test/unit_suite/raptor_xml_unit.py
--- a/cross-plat-dev-utils/patch-files/diffs/patch-0f5e3a7fb6af.patch	Tue May 18 19:36:14 2010 +0100
+++ b/cross-plat-dev-utils/patch-files/diffs/patch-0f5e3a7fb6af.patch	Fri Jun 04 13:09:28 2010 +0100
@@ -336,7 +336,7 @@
  Destructor for E32ExportTable class.
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/e32tools/elf2e32/source/e32imagefile.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/e32imagefile.cpp
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/e32tools/elf2e32/source/e32imagefile.cpp	2010-05-18 19:32:30.877348862 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/e32imagefile.cpp	2010-05-15 14:32:45.000000000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/e32imagefile.cpp	2010-05-21 08:06:04.801225978 +0100
 @@ -21,6 +21,7 @@
  
  // get E32ImageHeader class...
@@ -511,7 +511,7 @@
  using std::cout;
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/e32tools/elf2e32/source/parametermanager.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/parametermanager.cpp
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/e32tools/elf2e32/source/parametermanager.cpp	2010-05-18 19:32:30.889348502 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/parametermanager.cpp	2010-05-15 16:38:48.000000000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/parametermanager.cpp	2010-06-04 12:41:24.559881231 +0100
 @@ -25,6 +25,7 @@
  #include "parametermanager.h"
  #include "errorhandler.h"
@@ -549,7 +549,7 @@
  		
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/e32tools/elf2e32/source/parametermanager.h /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/parametermanager.h
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/e32tools/elf2e32/source/parametermanager.h	2010-05-18 19:32:30.889348502 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/parametermanager.h	2010-05-15 14:32:45.000000000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/parametermanager.h	2010-06-04 12:41:24.576355460 +0100
 @@ -81,7 +81,7 @@
  	typedef std::map<string, const OptionDesc *, OptionCompare> OptionMap;
  	typedef vector<char *> LibSearchPaths;
@@ -2922,7 +2922,7 @@
  			break;
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/cpp-raptor/group/exports.inf /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/cpp-raptor/group/exports.inf
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/cpp-raptor/group/exports.inf	2010-05-18 19:32:31.900848497 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/cpp-raptor/group/exports.inf	2010-05-17 19:43:29.133345451 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/cpp-raptor/group/exports.inf	2010-06-04 12:39:35.436355000 +0100
 @@ -15,6 +15,6 @@
  *
  */
@@ -2933,10 +2933,11 @@
 +../win32/bin/cpp.exe ../../tools/sbs/win32/bv/bin/cpp.exe
 +../win32/i686-pc-mingw32/bin/cc1.exe ../../tools/sbs/win32/bv/i686-pc-mingw32/bin/cc1.exe
 +../win32/i686-pc-mingw32/bin/libiconv-2.dll ../../tools/sbs/win32/bv/i686-pc-mingw32/bin/libiconv-2.dll
+Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/bin: depcrunch.py
 Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/bin: recipestats.py
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/bin/sbs /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/bin/sbs
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/bin/sbs	2010-05-18 19:32:34.709348670 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/bin/sbs	2010-05-17 18:47:53.024843000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/bin/sbs	2010-06-04 12:09:24.955849000 +0100
 @@ -1,5 +1,5 @@
  #!/bin/bash
 -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -3012,7 +3013,7 @@
  
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/bin/sbs.bat /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/bin/sbs.bat
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/bin/sbs.bat	2010-05-18 19:32:34.709348670 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/bin/sbs.bat	2010-05-17 18:47:53.024843000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/bin/sbs.bat	2010-06-04 12:09:24.955849000 +0100
 @@ -1,5 +1,5 @@
  @rem
 -@rem Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -3071,6 +3072,17 @@
 Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/bin: sbs_filter.bat
 Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/bin: sbs_filter.py
 Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/bin: timelines.py
+diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/examples/os_properties.xml /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/examples/os_properties.xml
+--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/examples/os_properties.xml	2010-05-18 19:32:34.713348619 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/examples/os_properties.xml	2010-06-04 12:09:24.959850000 +0100
+@@ -18,6 +18,7 @@
+ 		<set name='POSTLINKER_SUPPORTS_WDP' value=''/>
+ 		<set name='SUPPORTS_STDCPP_NEWLIB' value=''/>
+ 		<set name='RVCT_PRE_INCLUDE' value='$(EPOCINCLUDE)/rvct2_2/rvct2_2.h'/>
++		<set name="SUPPORTS_ABIV1_IMPLIBS" value='1'/>
+ 	</var>
+ 	
+ </build>
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/group/exports.inf /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/group/exports.inf
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/group/exports.inf	2010-05-18 19:32:34.713348619 +0100
 +++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/group/exports.inf	2010-05-09 13:36:29.473288000 +0100
@@ -3492,7 +3504,7 @@
 +../win32/bin/talon.exe ../../tools/sbs/win32/bin/talon.exe
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/config/arm.xml /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/arm.xml
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/config/arm.xml	2010-05-18 19:32:34.717348918 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/arm.xml	2010-05-17 18:47:53.028843000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/arm.xml	2010-06-04 12:09:24.959850000 +0100
 @@ -1,51 +1,62 @@
  <?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 ../../schema/build/2_0.xsd">
@@ -3572,7 +3584,7 @@
  		<set name="STATIC_LIBRARY_DIR" value="$(EPOCROOT)/epoc32/release/$(VARIANTPLATFORM)/$(VARIANTTYPE)"/>
  		<set name="STATIC_RUNTIME_DIR" value="$(EPOCROOT)/epoc32/release/$(VARIANTPLATFORM)/$(VARIANTTYPE)"/>
  		<set name="SYMBIAN_CC_MESSAGE_OPTION" value="$(CC_WARNINGS_CONTROL_OPTION) $(CC_ERRORS_CONTROL_OPTION)"/>
-@@ -58,22 +69,16 @@
+@@ -58,23 +69,16 @@
  		<set name="TARGET" value=""/>
  		<set name="UNIX_SLASH_FOR_CC_ABS_PATHS" value="0"/>
  		<set name="UNRESOLVED_SYMBOL_REF_OPTION" value=""/>
@@ -3593,32 +3605,35 @@
  		<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="GENERATE_ABIV1_IMPLIBS" value="$(SUPPORTS_ABIV1_IMPLIBS)"/>
 +		<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">
-@@ -85,7 +90,8 @@
+ 		<set name="TRADITIONAL_PLATFORM" value="ARMV6"/>
+@@ -85,7 +89,9 @@
  		<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)"/>
++		<set name="SUPPORTS_ABIV1_IMPLIBS" value=""/>
  	</var>
  	<var name="v7">
  		<set name="TRADITIONAL_PLATFORM" value="ARMV7"/>
-@@ -95,7 +101,8 @@
+@@ -95,7 +101,9 @@
  		<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)"/>
++		<set name="SUPPORTS_ABIV1_IMPLIBS" value=""/>
  	</var>
  	<var name="9e" extends="v5">
  		<set name="VARIANTPLATFORM" value="arm9e"/>
-@@ -121,6 +128,9 @@
+@@ -121,6 +129,9 @@
  	<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"/>
  	
@@ -3628,9 +3643,35 @@
  	<alias name="armv6_urel" meaning="arm.v6.urel.rvct2_2"/>
  	<alias name="armv6_udeb" meaning="arm.v6.udeb.rvct2_2"/>
  	<alias name="armv7_urel" meaning="arm.v7.urel.rvct3_1"/>
+diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/config/carbide.xml /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/carbide.xml
+--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/config/carbide.xml	2010-05-18 19:32:34.717348918 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/carbide.xml	2010-06-04 12:09:24.963850000 +0100
+@@ -27,6 +27,22 @@
+ 			<config name="armv9e_urel"/>
+ 			<config name="armv9e_udeb"/>
+ 		</config>
++		<config name="armv5_gcce" abstract="true">
++			<config name="armv5_urel_gcce"/>
++			<config name="armv5_udeb_gcce"/>
++		</config>
++		<config name="armv6_gcce" abstract="true">
++			<config name="armv6_urel_gcce"/>
++			<config name="armv6_udeb_gcce"/>
++		</config>
++		<config name="armv7_gcce" abstract="true">
++			<config name="armv7_urel_gcce"/>
++			<config name="armv7_udeb_gcce"/>
++		</config>
++		<config name="armv9e_gcce" abstract="true">
++			<config name="armv9e_urel_gcce"/>
++			<config name="armv9e_udeb_gcce"/>
++		</config>
+ 	</config>
+ 
+ 	<config name="winscw" abstract="true">
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/config/gcce.xml /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/gcce.xml
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/config/gcce.xml	2010-05-18 19:32:34.717348918 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/gcce.xml	2010-05-17 18:47:53.032843000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/gcce.xml	2010-06-04 12:09:24.963850000 +0100
 @@ -1,108 +1,128 @@
  <?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 ../../schema/build/2_0.xsd">
@@ -3818,7 +3859,7 @@
  </build>
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/config/gcc.xml /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/gcc.xml
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/config/gcc.xml	2010-05-18 19:32:34.717348918 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/gcc.xml	2010-05-17 19:30:38.665334296 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/gcc.xml	2010-06-04 12:39:38.836352000 +0100
 @@ -1,32 +1,32 @@
  <?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 ../../schema/build/2_0.xsd">
@@ -3896,7 +3937,7 @@
  		<set name='LIBS.LINUX' value='$(LIBS) pthread'/>
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/config/gccxml.xml /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/gccxml.xml
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/config/gccxml.xml	2010-05-18 19:32:34.717348918 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/gccxml.xml	2010-05-17 18:47:53.032843000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/gccxml.xml	2010-06-04 12:09:24.963850000 +0100
 @@ -1,21 +1,20 @@
  <?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 ../../schema/build/2_0.xsd">
@@ -3945,7 +3986,7 @@
  		<set name='RVCTLIB' value='$(RVCT22LIB)'/>
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/config/interfaces.xml /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/interfaces.xml
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/config/interfaces.xml	2010-05-18 19:32:34.717348918 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/interfaces.xml	2010-05-17 18:47:53.032843000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/interfaces.xml	2010-06-04 12:09:24.963850000 +0100
 @@ -5,15 +5,17 @@
  	<var name="default.interfaces">
  		<!-- interfaces corresponding to target types -->
@@ -3967,7 +4008,7 @@
  		<set name="INTERFACE.var" value="Symbian.var"/>
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/config/locations.xml /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/locations.xml
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/config/locations.xml	2010-05-18 19:32:34.717348918 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/locations.xml	2010-05-17 18:47:53.032843000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/locations.xml	2010-06-04 12:09:24.963850000 +0100
 @@ -30,7 +30,7 @@
  		<env name='SBS_GNUTOUCH' default='/bin/touch' type='tool'/>
  		<env name='SBS_GNUFIND' default='/usr/bin/find' type='tool'/>
@@ -3991,19 +4032,30 @@
  		<!-- Place where intermediate files are built -->
  		<env name='SBS_BUILD_DIR' default='$(EPOCROOT)/epoc32/build' type='path'/>
  
-@@ -107,7 +108,7 @@
+@@ -107,7 +108,8 @@
  		<set name='BASE_USER_DEFAULT_PLATFORMS' value='ARMV5 ARMV7 WINSCW'/>
  
  		<set name='BUILD_INCLUDE' value=''/>
 -		<set name='CREATEVMAP' value='$(PYTHON) $(SBS_HOME)/bin/createvmap.py' type='tool'/>
 +		<set name='CREATEVMAP' value='$(PYTHON) $(SBS_HOME)/bin/createvmap.py' type='script'/>
++		<set name='DEPCRUNCH' value='$(PYTHON) $(SBS_HOME)/bin/depcrunch.py' type='script'/>
  		<set name='CREATEVMAPCPP' value='$(SBS_BVCPP)' type='tool'/>
  		<set name='FEATURELISTFILES' value=''/>
  		<set name='FEATUREVARIANTNAME' value=''/>
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/config/make.xml /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/make.xml
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/config/make.xml	2010-05-18 19:32:34.717348918 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/make.xml	2010-05-17 18:47:53.032843000 +0100
-@@ -47,6 +47,9 @@
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/make.xml	2010-06-04 12:09:24.963850000 +0100
+@@ -13,6 +13,9 @@
+ 		<set name='TALON_TIMEOUT' value='600000'/>
+ 		<set name='TALON_DESCRAMBLE' value='1'/>
+ 		
++		<!-- Work around for RVCT compile failures -->
++		<set name='DELETE_ON_FAILED_COMPILE' value='1'/>
++		
+ 		<!-- Command-line for initialisation -->
+ 		<set name="initialise" value=""/>
+ 
+@@ -47,9 +50,12 @@
  
  		<!-- is the text output with -j buffered or scrambled? -->
  		<set name="scrambled" value="true"/>
@@ -4012,20 +4064,58 @@
 +		<set name="copylogfromannofile" value="false"/>
  	</var>
  	
- 	<alias name="make" meaning="make_engine"/>
-@@ -67,6 +70,9 @@
+-	<alias name="make" meaning="make_engine"/>
++	<alias name="make" meaning="make_engine" type="engine"/>
+ 
+ 	<!-- use the talon shell -->
+ 	<var name="make_no_talon_engine" extends="make_engine">
+@@ -57,7 +63,7 @@
+ 	        <set name='USE_TALON' value=''/>
+ 	</var>
+ 
+-	<alias name="make_no_talon" meaning="make_no_talon_engine"/>
++	<alias name="make_no_talon" meaning="make_no_talon_engine" type="engine"/>
+ 
+ 	<!-- other derived versions of GNU make -->
+ 
+@@ -67,9 +73,13 @@
  		<set name="build" value="$(EMAKE) HAVE_ORDERONLY= -r"/>
  		<set name="scrambled" value="false"/>
  		<set name='TALON_DESCRAMBLE' value=''/>
++		<set name='DELETE_ON_FAILED_COMPILE' value=''/>
 +
 +		<!-- workaround for damaged log output from emake -->
 +		<set name="copylogfromannofile" value="true"/>
  	</var>
  
- 	<alias name="emake" meaning="emake_engine"/>
+-	<alias name="emake" meaning="emake_engine"/>
++	<alias name="emake" meaning="emake_engine" type="engine"/>
+ 	
+ 	<!-- use the talon shell -->
+ 	<var name="emake_no_talon_engine" extends="emake_engine">
+@@ -77,7 +87,7 @@
+ 	        <set name='USE_TALON' value=''/>
+ 	</var>
+ 
+-	<alias name="emake_no_talon" meaning="emake_no_talon_engine"/>
++	<alias name="emake_no_talon" meaning="emake_no_talon_engine" type="engine"/>
+ 	
+ 	<!-- Raptor make engine for PVMgmake -->
+ 	<var name="pvmgmake_engine" extends="make_engine">
+@@ -85,8 +95,9 @@
+ 		<set name="build" value="$(PVMGMAKE) HAVE_ORDERONLY=true  -r"/>
+ 		<set name="scrambled" value="false" />
+ 		<set name='TALON_DESCRAMBLE' value=''/>
++		<set name='DELETE_ON_FAILED_COMPILE' value=''/>
+ 	</var>
+ 
+-	<alias name="pvmgmake" meaning="pvmgmake_engine"/>
++	<alias name="pvmgmake" meaning="pvmgmake_engine" type="engine"/>
+ 
+ </build>
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/config/msvc.xml /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/msvc.xml
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/config/msvc.xml	2010-05-18 19:32:34.721348727 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/msvc.xml	2010-05-17 18:47:53.032843000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/msvc.xml	2010-06-04 12:09:24.963850000 +0100
 @@ -1,11 +1,11 @@
  <?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 ../../schema/build/2_0.xsd">
@@ -4084,7 +4174,7 @@
  		<set name='IMPORTLIBPATH' value='$(RELEASEPATHROOT)/tools/udeb'/>
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/config/root.xml /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/root.xml
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/config/root.xml	2010-05-18 19:32:34.721348727 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/root.xml	2010-05-17 18:47:53.032843000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/root.xml	2010-06-04 12:09:24.967850000 +0100
 @@ -11,6 +11,8 @@
  	-->
  
@@ -4094,9 +4184,17 @@
  		<varRef ref="root.places"/>
  		<varRef ref="root.properties"/>
  		
+@@ -43,6 +45,7 @@
+ 		<set name='POSTLINKER_SUPPORTS_WDP' value='1'/>
+ 		<set name='SUPPORTS_STDCPP_NEWLIB' value='1'/>
+ 		<set name="RVCT_PRE_INCLUDE" value="$(EPOCINCLUDE)/rvct/rvct.h"/>
++		<set name="SUPPORTS_ABIV1_IMPLIBS" value=''/>
+ 	</var>
+ 	
+ 	<!-- Placeholder for the root.changes variant. This will typically be
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/config/rvct.xml /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/rvct.xml
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/config/rvct.xml	2010-05-18 19:32:34.721348727 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/rvct.xml	2010-05-17 18:47:53.032843000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/rvct.xml	2010-06-04 12:09:24.967850000 +0100
 @@ -1,66 +1,62 @@
  <?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 ../../schema/build/2_0.xsd">
@@ -4195,7 +4293,7 @@
  		<set name="LIBPATH" value=""/>
  		<set name="LIBRARY" value=""/>
  		<set name="LICENSERETRY_OPTION" value=""/>
-@@ -69,25 +65,35 @@
+@@ -69,25 +65,34 @@
  		<set name="LINKER_DEFAULT_LIBS" value=""/>
  		<set name="LINKER_DEFAULT_LIB_PATHS" value=""/>
  		<set name="LINKER_ENTRY_OPTION" value="--entry"/>
@@ -4223,11 +4321,10 @@
  		<set name="SO_NAME_OPTION" value="--soname"/>
  		<set name="STATIC_LIBS_PATH" value="$(RVCTLIB)/armlib"/>
  		<set name="STDCPP_INCLUDE" value="$(EPOCINCLUDE)/stdapis"/>
--		<set name="SYMBIAN_LD_MESSAGE_OPTION" value="$(LD_WARNINGS_CONTROL_OPTION) $(LD_ERRORS_CONTROL_OPTION)"/>
-+		<set name="STDLIB_OPTION" value="--no_scanlib"/>
- 		<set name="SUPPORTS_ABIV1_IMPLIBS" value="1"/>		
++		<set name="STDLIB_OPTION" value="--no_scanlib"/>	
+ 		<set name="SYMBIAN_LD_MESSAGE_OPTION" value="$(LD_WARNINGS_CONTROL_OPTION) $(LD_ERRORS_CONTROL_OPTION)"/>
+-		<set name="SUPPORTS_ABIV1_IMPLIBS" value="1"/>		
 -		<set name="TARGET_RELOCATION_OPTION" value="" />
-+		<set name="SYMBIAN_LD_MESSAGE_OPTION" value="$(LD_WARNINGS_CONTROL_OPTION) $(LD_ERRORS_CONTROL_OPTION)"/>
  		<set name="SYMVER_OPTION" value="--symver_soname"/>
 +		<set name="TARGET_RELOCATION_OPTION" value=""/>
  		<set name="TEMP_FILES_OPTION" value=""/>
@@ -4236,7 +4333,11 @@
  		<set name="TRANASM_FLAGS" value="-n -s"/>
  		<set name="TRANASM_INPUT_OPTION" value=""/>
  		<set name="TRANASM_OUTPUT_OPTION" value="-o="/>
-@@ -98,10 +104,7 @@
+@@ -95,13 +100,11 @@
+ 		<set name="UNDEFINED_SYMBOL_REF_OPTION" value=""/>
+ 		<set name="UNIX_SLASH_FOR_CC_ABS_PATHS" value="0"/>
+ 		<set name="UNRESOLVED_SYMBOL_REF_OPTION" value=""/>
++		<set name="USE_RVCT22_DELETE_WORKAROUND" value=""/>
  		<set name="USERINCLUDE" value=""/>
  		<set name="USER_LIBS_PATH_OPTION" value="--userlibpath"/>
  		<set name="VFE_OPTION" value="--no_vfe"/>
@@ -4251,7 +4352,7 @@
  </build>
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/config/variants.xml /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/variants.xml
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/config/variants.xml	2010-05-18 19:32:34.721348727 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/variants.xml	2010-05-17 18:47:53.036842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/variants.xml	2010-06-04 12:09:24.967850000 +0100
 @@ -6,10 +6,23 @@
  	
  	-->
@@ -4276,6 +4377,15 @@
  	<!-- Run this variant to turn on trace compiler -->
  	<var name="tracecompiler">
  		<set name='USE_TRACE_COMPILER' value='1'/>
+@@ -68,7 +82,7 @@
+ 		<!-- PLATMACROS.LINUX is set from PLATMACROS.WINDOWS -->
+ 		<append name="TRADITIONAL_PLATFORM" value='SMP' separator="" />
+ 		<append name="VARIANTPLATFORM" value="smp" separator=""/>
+-		<set name="GENERATE_ABIV1_IMPLIBS" value=""/>
++		<set name="SUPPORTS_ABIV1_IMPLIBS" value=""/>
+ 	</var>
+ 
+ 	<!-- emit formatted releasable information into the logs for post-build parsing -->
 @@ -77,67 +91,40 @@
  	</var>
  
@@ -4367,7 +4477,7 @@
  		<set name="OWN_LIBRARY_OPTION" value="-Ono_known_library"/>
  		<set name="RELOCATABLE_IMAGE_OPTION" value="--reloc"/>
  		<set name="SPLIT_OPTION" value="--split"/>
-@@ -147,23 +134,24 @@
+@@ -147,23 +134,25 @@
  		<set name="STATIC_LIBS_LIST" value="h_t__uf.l(switch8.o)"/>
  		<set name="RUNTIME_LIBS_LIST" value="drtaeabi.dso dfpaeabi.dso dfprvct2_2.dso drtrvct2_2.dso"/>
  		<set name="USER_STATIC_RUNTIME_LIB" value="usrt2_2.lib"/>
@@ -4380,6 +4490,7 @@
 +		<set name="PL.SOFTVFP_MAYBE_VFPV2" value="softvfp"/>
  		<set name="CC.ARMV5" value="--cpu 5T"/>
  		<set name="CC.ARMV6" value="--cpu 6"/>
++		<set name="USE_RVCT22_DELETE_WORKAROUND" value="1" />
  	</var>
  
  	<var name="rvct3_1" extends="rvct">
@@ -4397,7 +4508,7 @@
  		<set name="OWN_LIBRARY_OPTION" value="--library_interface=aeabi_clib"/>
  		<set name="RELOCATABLE_IMAGE_OPTION" value=""/>
  		<set name="SPLIT_OPTION" value=""/>
-@@ -173,47 +161,48 @@
+@@ -173,47 +162,48 @@
  		<set name="STATIC_LIBS_LIST" value="h_5.l"/>
  		<set name="RUNTIME_LIBS_LIST" value="drtaeabi.dso dfpaeabi.dso dfprvct3_1.dso drtrvct3_1.dso"/>
  		<set name="USER_STATIC_RUNTIME_LIB" value="usrt3_1.lib"/>
@@ -4462,7 +4573,7 @@
  	</var>
  
  	<var name="urel">
-@@ -262,4 +251,17 @@
+@@ -262,4 +252,17 @@
  		<set name='OPTION_CW' value='-cwd include'/>
  	</var>
  
@@ -4482,7 +4593,7 @@
  </build>
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/config/winscw.xml /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/winscw.xml
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/config/winscw.xml	2010-05-18 19:32:34.721348727 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/winscw.xml	2010-05-17 18:47:53.036842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/config/winscw.xml	2010-06-04 12:09:24.967850000 +0100
 @@ -1,24 +1,31 @@
  <?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 ../../schema/build/2_0.xsd">
@@ -4537,7 +4648,7 @@
  		<set name="INTERFACE.stddll" value="Emulator.stddll"/>
  		<set name="INTERFACE.exexp" value="Emulator.exexp"/>
  		<set name="INTERFACE.fsy" value="Emulator.fsy"/>
-@@ -40,100 +48,100 @@
+@@ -40,104 +48,106 @@
  		<set name="INTERFACE.pdd" value="Emulator.pdd"/>
  		<set name="INTERFACE.pdl" value="Emulator.pdl"/>
  		<set name="INTERFACE.plugin" value="Emulator.plugin"/>
@@ -4694,23 +4805,27 @@
 +		<set name="PLATMACROS.LINUX" value="$(PLATMACROS.WINDOWS)"/>
  	</var>
  
- 	<var name="winscw_udeb" extends="winscw_base">
+-	<var name="winscw_udeb" extends="winscw_base">
 -		<set name='FULLVARIANTPATH' value='winscw/udeb'/>
 -		<set name='VARIANTTYPE' value='udeb'/>
-+		<set name="FULLVARIANTPATH" value="winscw/udeb"/>
-+		<set name="VARIANTTYPE" value="udeb"/>
- 
+-
 -		<append name='CDEFS' value='_DEBUG'/>
 -		<append name='CFLAGS' value='-g -O0 -inline off'/>
 -		<append name='LFLAGS' value='-g'/>
++	<var name="winscw_debug">
++		<set name="FULLVARIANTPATH" value="winscw/udeb"/>
++		<set name="VARIANTTYPE" value="udeb"/>
++
 +		<append name="CDEFS" value="_DEBUG"/>
 +		<append name="CFLAGS" value="-g -O0 -inline off"/>
 +		<append name="LFLAGS" value="-g"/>
  	</var>
- 
- 	<var name="winscw_urel" extends="winscw_base">
++	<alias name="winscw_udeb" meaning="winscw_base.winscw_debug"/>
+ 
+-	<var name="winscw_urel" extends="winscw_base">
 -		<set name='FULLVARIANTPATH' value='winscw/urel'/>
 -		<set name='VARIANTTYPE' value='urel'/>
++	<var name="winscw_release">
 +		<set name="FULLVARIANTPATH" value="winscw/urel"/>
 +		<set name="VARIANTTYPE" value="urel"/>
  
@@ -4719,22 +4834,39 @@
 +		<append name="CDEFS" value="NDEBUG"/>
 +		<append name="CFLAGS" value="-O4,s"/>
  	</var>
++	<alias name="winscw_urel" meaning="winscw_base.winscw_release"/>
  
  	<group name="winscw">
+-		<varRef ref="winscw_urel"/>
+-		<varRef ref="winscw_udeb"/>
++		<aliasRef ref="winscw_urel"/>
++		<aliasRef ref="winscw_udeb"/>
+ 	</group>
+ </build>
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/base.xml /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/base.xml
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/base.xml	2010-05-18 19:32:34.721348727 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/base.xml	2010-05-17 18:47:53.036842000 +0100
-@@ -16,6 +16,7 @@
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/base.xml	2010-06-04 12:09:24.967850000 +0100
+@@ -16,7 +16,9 @@
  		<param name='PROJECT_META' default=''/>     <!-- my.mmp  -->
  		<param name='DATE' default=''/>
  		<param name='DUMPBCINFO' default=''/>
 +		<param name='FLMDEBUG'  default=''/>
  		<param name='PLATFORM' default=''/>
++		<param name='PYTHON' default=''/> <!-- allow python scripts to be used in general flms -->
  		<param name='GNUMAKE38'/>
  		<param name='GNUCP'/>
+ 		<param name='GNUCAT'/>
+@@ -83,6 +85,7 @@
+ 	</interface>
+ 	<interface name="base.resource" extends="base.flm" flm="resource.flm">
+ 		<param name='BINCOPYDIRS' default=''/>
++		<param name='DEPCRUNCH'/>
+ 		<param name='MMPDEFS' default=''/>
+ 		<param name='GNUCPP'/>
+ 		<param name='GNUSED'/>
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/bitmap.flm /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/bitmap.flm
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/bitmap.flm	2010-05-18 19:32:34.721348727 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/bitmap.flm	2010-05-17 18:47:53.036842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/bitmap.flm	2010-06-04 12:09:24.967850000 +0100
 @@ -1,4 +1,4 @@
 -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
 +# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
@@ -4828,7 +4960,7 @@
  
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/build.flm /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/build.flm
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/build.flm	2010-05-18 19:32:34.721348727 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/build.flm	2010-05-17 18:47:53.036842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/build.flm	2010-06-04 12:09:24.967850000 +0100
 @@ -24,36 +24,31 @@
  
  .PHONY:: PP_EXPORTS
@@ -4899,7 +5031,7 @@
  
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/build.xml /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/build.xml
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/build.xml	2010-05-18 19:32:34.721348727 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/build.xml	2010-05-17 18:47:53.036842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/build.xml	2010-06-04 12:09:24.971850000 +0100
 @@ -9,6 +9,7 @@
  		<param name='CONFIGS' default=''/>
  		<param name='CLI_OPTIONS' default=''/>
@@ -4910,7 +5042,7 @@
  </build>
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2ani.flm /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2ani.flm
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2ani.flm	2010-05-18 19:32:34.725348467 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2ani.flm	2010-05-17 18:47:53.040843000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2ani.flm	2010-06-04 12:09:24.971850000 +0100
 @@ -1,4 +1,4 @@
 -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
 +# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
@@ -4949,7 +5081,7 @@
  
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2defaults.mk /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2defaults.mk
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2defaults.mk	2010-05-18 19:32:34.725348467 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2defaults.mk	2010-05-17 18:47:53.040843000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2defaults.mk	2010-06-04 12:09:24.975850000 +0100
 @@ -1,5 +1,5 @@
  #
 -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -5005,7 +5137,7 @@
 +endif
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2dll.flm /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2dll.flm
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2dll.flm	2010-05-18 19:32:34.725348467 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2dll.flm	2010-05-17 18:47:53.040843000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2dll.flm	2010-06-04 12:09:24.975850000 +0100
 @@ -28,7 +28,7 @@
  
  # Default Linker settings for this target type
@@ -5025,7 +5157,7 @@
  
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2exe.flm /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2exe.flm
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2exe.flm	2010-05-18 19:32:34.725348467 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2exe.flm	2010-05-17 18:47:53.040843000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2exe.flm	2010-06-04 12:09:24.975850000 +0100
 @@ -1,4 +1,4 @@
 -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
 +# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
@@ -5056,7 +5188,7 @@
  CDEFS:=$(CDEFS) __EXE__
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2exexp.flm /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2exexp.flm
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2exexp.flm	2010-05-18 19:32:34.725348467 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2exexp.flm	2010-05-17 18:47:53.040843000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2exexp.flm	2010-06-04 12:09:24.975850000 +0100
 @@ -52,10 +52,10 @@
  LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/$(FIRSTLIB)
  
@@ -5072,14 +5204,14 @@
  ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2.flm /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2.flm
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2.flm	2010-05-18 19:32:34.725348467 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2.flm	2010-05-17 18:47:53.040843000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2.flm	2010-06-04 12:09:24.971850000 +0100
 @@ -1,4 +1,4 @@
 -# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
 +# Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
  # All rights reserved.
  # This component and the accompanying materials are made available
  # under the terms of the License "Eclipse Public License v1.0"
-@@ -16,15 +16,37 @@
+@@ -16,21 +16,50 @@
  #
  #
  
@@ -5106,7 +5238,8 @@
 +#   test (FEATUREVARIANTNAME=="" and FEATUREVARIANT=="") or
 +#        (FEATUREVARIANTNAME!="" and FEATUREVARIANT==1)
 +#
-+
+ 
+-$(if $(FLMDEBUG),$(info <flm name='e32abiv2' target='$(TARGET)' type='$(TARGETTYPE)' outputpath='$(OUTPUTPATH)' metasource='$(METASOURCE)' postlinkfiletype='$(POSTLINKFILETYPE)' />))
 +DOBUILD:=
 +ifeq ($(FEATUREVARIANTSAFE),)
 +  DOBUILD:=$(if $(or $(call equal,$(FEATUREVARIANTNAME),),\
@@ -5119,26 +5252,72 @@
 +endif
 +
 +ifeq ($(DOBUILD),1)
- 
- $(if $(FLMDEBUG),$(info <flm name='e32abiv2' target='$(TARGET)' type='$(TARGETTYPE)' outputpath='$(OUTPUTPATH)' metasource='$(METASOURCE)' postlinkfiletype='$(POSTLINKFILETYPE)' />))
- 
-@@ -141,7 +163,6 @@
++
++$(if $(FLMDEBUG),$(info <debug><flm name='e32abiv2' target='$(TARGET)' type='$(TARGETTYPE)' outputpath='$(OUTPUTPATH)' metasource='$(METASOURCE)' postlinkfiletype='$(POSTLINKFILETYPE)' /></debug>))
++
++# Enable DELETE_ON_FAILED_COMPILE work around for failed RVCT 2.2 compiles
++ifneq ($(DELETE_ON_FAILED_COMPILE),)
++RVCT22_DELETE_WORKAROUND:=|| { $$(GNURM) $$@; exit 1; }
++endif # ifneq ($(DELETE_ON_FAILED_COMPILE),)
+ 
+ # Strip switch-type parameters
+ #
+ POSTLINKTARGETTYPE:=$(strip $(POSTLINKTARGETTYPE))
++TARGETEXT:=$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE))
++
+ UID1:=$(strip $(UID1))
+ UID2:=$(strip $(UID2))
+ UID3:=$(strip $(UID3))
+@@ -106,9 +135,9 @@
+ 
+ # Postlinkable targets need to be linked and elf2e32'd
+ ifneq ($(DOPOSTLINK),)
+-    E32TARGET:=$(RELEASABLEPATH)/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE))
+-    LINK_TARGET:=$(RELEASABLEPATH)/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE)).sym
+-    MAPFILE:=$(RELEASABLEPATH)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE)).map
++    E32TARGET:=$(RELEASABLEPATH)/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(TARGETEXT)
++    LINK_TARGET:=$(RELEASABLEPATH)/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(TARGETEXT).sym
++    MAPFILE:=$(RELEASABLEPATH)/$(TARGET).$(TARGETEXT).map
+ else
+   E32TARGET:=
+   LINK_TARGET:=
+@@ -141,23 +170,19 @@
    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 +177,6 @@
+-  # ABIv1 .lib (for specific builds, toolchains and host OS platforms only)
++  # ABIv1 .lib (for specific kits and toolchains only)
+   IMPORTLIBTARGET_LIB:=
+   IMPORTLIBTARGETVERSIONED_LIB:=
+   BUILDMARKER_IMPORTLIBTARGET_LIB:=TARGET_$(subst :,,$(VER_E32IMPORTLIBBASE)).lib
+-  # Only for builds that require and support them, and only on windows
+-  ifeq ($(OSTYPE),cygwin)
+-  ifeq ($(GENERATE_ABIV1_IMPLIBS),1)
++  # Only for kits that require and tools that support them
++  ifneq ($(SUPPORTS_ABIV1_IMPLIBS),)
+     WHATRELEASE:=$(WHATRELEASE) $(if $(EXPLICITVERSION),,$(TMP_IMPORTLIBTARGET_ROOT).lib)
+     WHATRELEASE:=$(WHATRELEASE) $(VER_E32IMPORTLIBBASE).lib
      ifeq ($($(BUILDMARKER_IMPORTLIBTARGET_LIB)),)
        IMPORTLIBTARGET_LIB:=$(TMP_IMPORTLIBTARGET_ROOT).lib
        IMPORTLIBTARGETVERSIONED_LIB:=$(VER_E32IMPORTLIBBASE).lib
 -      $(eval $(BUILDMARKER_IMPORTLIBTARGET_LIB):=1)
-     endif
+-    endif
    endif
    endif
-@@ -223,7 +243,7 @@
+ endif
+@@ -167,7 +192,7 @@
+ # put the hex version number in the right place
+ ifeq ($(LINKAS),)
+   LINKASNAME=$(TARGET)
+-  LINKASTYPE=$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE))
++  LINKASTYPE=$(TARGETEXT)
+ else
+   SPLIT_LINKAS=$(subst ., ,$(LINKAS))
+   LINKASNAME=$(word 1,$(SPLIT_LINKAS))
+@@ -223,7 +248,7 @@
  	DSODEFFILENAMEBASE:=$(TARGET){$(VERSIONHEX)}
  endif
  GENERATED_DSO:=$(call dblquote,$(INTERMEDIATEPATH)/$(DSODEFFILENAMEBASE).dso)
@@ -5147,7 +5326,7 @@
  
  ## IMPORT LIBRARY  ###########################################################
  
-@@ -251,6 +271,10 @@
+@@ -251,6 +276,10 @@
  # ABIv2 .dso
  ifneq ($(IMPORTLIBTARGET_DSO),) # check that we haven't tried to specify this target already
  
@@ -5158,7 +5337,7 @@
    ifneq ($(EXPLICITVERSION),)
      TARGETS:=$(strip $(TARGETS) $(IMPORTLIBTARGETVERSIONED_DSO))
  
-@@ -279,9 +303,6 @@
+@@ -279,9 +308,6 @@
  		$(call startrule,importlibtarget_unfrozen,FORCESUCCESS) \
  		$(GNUCP) $$(call dblquote,$$<) $$(call dblquote,$$@) \
  		$(call endrule,importlibtarget_unfrozen)
@@ -5168,7 +5347,7 @@
      endef
  
      define importlibtarget_unfrozen_ver
-@@ -289,8 +310,6 @@
+@@ -289,8 +315,6 @@
  		$(call startrule,importlibversioned_unfrozen,FORCESUCCESS) \
  		$(GNUCP) "$(GENERATED_DSO)" "$$@" \
  		$(call endrule,importlibversioned_unfrozen)
@@ -5177,7 +5356,7 @@
      endef
  
      ifeq ($(EXPLICITVERSION),)
-@@ -307,8 +326,6 @@
+@@ -307,8 +331,6 @@
  	   $(call startrule,importlibtarget,FORCESUCCESS) \
  	   $(GNUCP) "$$<" "$$@" \
  	   $(call endrule,importlibtarget)
@@ -5186,7 +5365,7 @@
        endef
  
        ifeq ($(EXPLICITVERSION),)
-@@ -325,8 +342,6 @@
+@@ -325,8 +347,6 @@
  	 	  --dso=$$(call dblquote,$$@) 				   \
  	 	  --linkas=$(call dblquote,$(LINKASVERSIONED)) \
  	      $(call endrule,importlibversioned)
@@ -5195,7 +5374,7 @@
        endef
        $(eval $(importlibtargetversioned_func))
      endif #  ifneq ($(DEFFILE),)
-@@ -335,7 +350,10 @@
+@@ -335,7 +355,10 @@
  
  # ABIv1 .lib
  ifneq ($(IMPORTLIBTARGETVERSIONED_LIB),) # check that we haven't tried to specify this target already
@@ -5207,7 +5386,7 @@
  
    define abiv1_generatelib
  
-@@ -351,12 +369,12 @@
+@@ -351,12 +374,12 @@
      # If unfrozen, .lib files are based on the .def file generated by the final postlink
      $(IMPORTLIBTARGETVERSIONED_LIB): $(if $(EXPORTUNFROZEN),$(E32TARGET),$(PREPPEDDEFFILE))
  	$(call startrule,importlibversioned_abiv1) \
@@ -5222,7 +5401,7 @@
  		--linkAs=$(call dblquote,$(LINKASVERSIONED)) \
  		--inter ; fi \
  	$(call endrule,importlibversioned_abiv1)
-@@ -388,7 +406,22 @@
+@@ -388,7 +411,22 @@
  # Generating the import library is enough if TARGETTYPE=implib #############
  
  ifneq ($(DOPOSTLINK),)
@@ -5246,7 +5425,7 @@
  endif # ifneq ($(DOPOSTLINK),)
  
  ifneq ($(TARGETTYPE),implib)
-@@ -534,7 +567,7 @@
+@@ -534,7 +572,7 @@
  endef
  $(eval $(artarget_func))
  
@@ -5255,7 +5434,7 @@
  endif
  
  
-@@ -542,8 +575,7 @@
+@@ -542,8 +580,7 @@
  # Targettype is some type of DLL or EXE (or derivative)
  ifneq ($(LINK_TARGET),)
  
@@ -5265,7 +5444,7 @@
  located_STATICLIBRARIES:=$(foreach L,$(STATICLIBRARY),$(STATIC_LIBRARY_DIR)/$(L).lib)
  e32abiv2_LIBS:=$(EXPTARGET) $(LINKER_STUB_LIBRARY) $(if $(STATIC_RUNTIME_LIB),$(STATIC_RUNTIME_DIR)/$(STATIC_RUNTIME_LIB),) $(located_STATICLIBRARIES)
  # DLLS and EXEs - These objects are linked by a linker
-@@ -556,12 +588,10 @@
+@@ -556,12 +593,10 @@
  REDUCED_RUNTIME_LIBS_LIST:=$(subst $(TARGET).dso,,$(RUNTIME_LIBS_LIST))
  
  ifeq ($(VARIANTTYPE),udeb)
@@ -5280,7 +5459,7 @@
  
  else
  # NORMAL
-@@ -574,19 +604,16 @@
+@@ -574,19 +609,16 @@
  ifeq ($(HAS_DEDICATED_OP_NEWDEL_LIB),1)
    e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(RUNTIME_LIBS_PATH)/,$(NEWLIB))
  endif
@@ -5303,7 +5482,7 @@
  endif
  
  # NOTE: the groupin10 macro must be used before a call to the "startrule" macro
-@@ -596,36 +623,76 @@
+@@ -596,36 +628,76 @@
  # outside the relevant tags but it is also unavoidable.
  define linktarget_func
  ## The actual link target, dependencies and build step
@@ -5393,15 +5572,17 @@
  WHATRELEASE:=$(WHATRELEASE) $(MAPFILE)
  
  endif # if TARGETTYPE lib
-@@ -646,6 +713,7 @@
+@@ -645,7 +717,9 @@
+ # USE_TRACE_COMPILER defaults to blank in Raptor config.
  # Users can turn TC on by setting it to 1 in user config.
  ifneq ($(USE_TRACE_COMPILER),)
++  # TARGETEXT is already set
    include $(FLMHOME)/tracecompiler.mk
 +  WHATRELEASE:=$(WHATRELEASE) $(TRACE_DICTIONARY) $(AUTOGEN_HEADER)
  endif
  
  CC_CPPONLY_ARGS:=$(SYMBIAN_CCFLAGS) $(if $(DEBUG_INFO),-g) $(DEBUG_FORMAT) \
-@@ -655,7 +723,7 @@
+@@ -655,7 +729,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))) \
@@ -5410,7 +5591,7 @@
  
  ## COMPILE CPP Files #################################################################
  
-@@ -674,7 +742,7 @@
+@@ -674,7 +748,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))) \
@@ -5419,7 +5600,7 @@
  
  ifeq ($(STDCPP),1)
  SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$(call dblquote,$(STDCPP_INCLUDE)))
-@@ -705,7 +773,7 @@
+@@ -705,7 +779,7 @@
  $(eval DEPENDFILE:=$(wildcard $(DEPENDFILENAME)))
  
  # $4 is for language specific options (e.g. C++ vs C)
@@ -5428,7 +5609,7 @@
  	$(call startrule,compile,,$(2))		\
  		$(if $(PERTURBSTARTTIME), $(RANSLEEP) $(PERTURBMSECS) ;,) \
  		$(if $(MULTIFILE_ENABLED), echo $(2) $(3) > $(MULTIFILE_VIAFILE) ;,) \
-@@ -716,24 +784,27 @@
+@@ -716,24 +790,27 @@
  			$(if $(USE_PROFILER_FEEDBACK),--profile=$(call dblquote,$(ARM_PROFILER_FILE)),) \
  			$(call makemacrodef,-D,$(COMPILER_INTERWORK_DEFINES) $(CDEFS))				\
  			$(if $(PREINCLUDE),$(PREINCLUDE_OPTION) ,)$(call concat, $(PREINCLUDE_OPTION) ,$(call dblquote,$(PREINCLUDE)))\
@@ -5442,7 +5623,8 @@
 +			$(if $(NO_DEPEND_GENERATE),,$(DEPEND_OPTION) $(call dblquote,$(1).d)) \
                          $(if $(LINKERFEEDBACK_STAGE2),$(FEEDBACK_OPTION)$(call dblquote,$(FEEDBACKFILE))) \
  			$(if $(MULTIFILE_ENABLED),--multifile $(OUTPUT_OPTION) $(MULTIFILEOBJECT) \
- 			--via $$(call dblquote, $(MULTIFILE_VIAFILE)),$(OUTPUT_OPTION) $$@ $$(call dblquote, $$<))  \
+-			--via $$(call dblquote, $(MULTIFILE_VIAFILE)),$(OUTPUT_OPTION) $$@ $$(call dblquote, $$<))  \
++			--via $$(call dblquote, $(MULTIFILE_VIAFILE)),$(OUTPUT_OPTION) $$@ $$(call dblquote, $$<)) $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \
  	$(call endrule,compile)
  
 -CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
@@ -5463,7 +5645,25 @@
  endif
  
  # individual source file compilation
-@@ -809,24 +880,27 @@
+@@ -780,7 +857,7 @@
+ 			$(if $(USERINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$(call dblquote,$(USERINCLUDE)))      \
+ 			$(if $(SYSTEMINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$(call dblquote,$(SYSTEMINCLUDE)))  \
+ 			$(if $(NOHIDEALL),--no_hide_all,) \
+-			$$(call dblquote, $$<) $(OUTPUT_OPTION) $$(@) \
++			$$(call dblquote, $$<) $(OUTPUT_OPTION) $$(@) $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \
+ 	$(call endrule,e32cpponly)
+ 
+ CLEANTARGETS:=$$(CLEANTARGETS) $(CPPONLYTARGET)
+@@ -793,7 +870,7 @@
+ define e32abiv2_listing
+ # $1 is the sourcefile
+ 
+-$(eval LISTINGTARGET:=$(strip $(call extractandmap,$(CPPFILEEXTENSIONS) $(CFILEEXTENSIONS),.$(subst _,.,$(call sanitise,$(FULLVARIANTPATH))).$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE)).lst,$1)))
++$(eval LISTINGTARGET:=$(strip $(call extractandmap,$(CPPFILEEXTENSIONS) $(CFILEEXTENSIONS),.$(subst _,.,$(call sanitise,$(FULLVARIANTPATH))).$(TARGET).$(TARGETEXT).lst,$1)))
+ $(eval DEPENDFILENAME:=$(call map2listfile,$1).d)
+ $(eval DEPENDFILE:=$(wildcard $(DEPENDFILENAME)))
+ 
+@@ -809,24 +886,27 @@
  			$(OPTION_COMPILER) 						\
  			$(call makemacrodef,-D,$(COMPILER_INTERWORK_DEFINES) $(CDEFS))				\
  			$(if $(PREINCLUDE),$(PREINCLUDE_OPTION) ,)$(call concat, $(PREINCLUDE_OPTION) ,$(call dblquote,$(PREINCLUDE)))\
@@ -5474,8 +5674,9 @@
  			$(if $(SYSTEMINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$(call dblquote,$(SYSTEMINCLUDE)))  \
  			$(if $(NOHIDEALL),--no_hide_all,) \
 -			$(DEPEND_OPTION) $(call dblquote,$(DEPENDFILENAME)) \
+-			$$(call dblquote, $$<) $(OUTPUT_OPTION) $$(@) \
 +			$(if $(NO_DEPEND_GENERATE),,$(DEPEND_OPTION) $(call dblquote,$(DEPENDFILENAME))) \
- 			$$(call dblquote, $$<) $(OUTPUT_OPTION) $$(@) \
++			$$(call dblquote, $$<) $(OUTPUT_OPTION) $$(@) $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \
  	$(call endrule,e32listing)
  
  CLEANTARGETS:=$$(CLEANTARGETS) $(LISTINGTARGET)
@@ -5498,7 +5699,14 @@
  endif
  
  endef
-@@ -852,17 +926,32 @@
+@@ -846,23 +926,38 @@
+ # separate arguments are interpreted as a single argument when passed to bash
+ FIVESPACES=$(BLANK)     $(BLANK)
+ 
+-FREEZEGUARD:=TARGET_$(TARGET)_$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE))_$(IMPORTLIBPATH)_EFREEZE
++FREEZEGUARD:=TARGET_$(TARGET)_$(TARGETEXT)_$(IMPORTLIBPATH)_EFREEZE
+ 
+ define e32freeze
  
  FREEZE:: $(1)
  	$(call startrule,freeze,,$(RESOLVED_DEFFILE)) \
@@ -5538,7 +5746,16 @@
  endif
  
  endif
-@@ -912,24 +1001,26 @@
+@@ -892,7 +987,7 @@
+ 			$(call makemacrodef,-D,$(COMPILER_INTERWORK_DEFINES) $(CDEFS) $(CIADEFS)) $(CPP_LANG_OPTION)      \
+ 	 		$(if $(USERINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$$(call dblquote,$(USERINCLUDE)))     \
+ 	 		$(if $(SYSTEMINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$$(call dblquote,$(SYSTEMINCLUDE))) \
+-	 		$$(call dblquote, $$<) $(OUTPUT_OPTION) $$@ \
++	 		$$(call dblquote, $$<) $(OUTPUT_OPTION) $$@ $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \
+ 	$(call endrule,cia2cpp2o)
+ 
+ 
+@@ -912,24 +1007,26 @@
         $(if $(PREINCLUDE),$(PREINCLUDE_OPTION) ,)$$(call concat, $(PREINCLUDE_OPTION) ,$$(call dblquote,$(PREINCLUDE))) \
         $(if $(USERINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$$(call dblquote,$(USERINCLUDE))) \
         $(if $(SYSTEMINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$$(call dblquote,$(SYSTEMINCLUDE))) \
@@ -5552,7 +5769,7 @@
 -	$(CC) $(e32abiv2_PREFILE_OPTIONS) $(OUTPUT_OPTION) $$@ $$(call dblquote,$1) && \
 -	$(CC) -M $(e32abiv2_PREFILE_OPTIONS) --depend_format=unix \
 -	  $(OUTPUT_OPTION) $$@ $$(call dblquote,$1) > $(call dblquote,$(e32abiv2_PREFILE).d) \
-+	$(CC) $(e32abiv2_PREFILE_OPTIONS) $(OUTPUT_OPTION) $$@ $$(call dblquote,$1) \
++	$(CC) $(e32abiv2_PREFILE_OPTIONS) $(OUTPUT_OPTION) $$@ $$(call dblquote,$1) $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \
 +	$(if $(NO_DEPEND_GENERATE),,&& $(CC) -M $(e32abiv2_PREFILE_OPTIONS) --depend_format=unix $(OUTPUT_OPTION) $$@ $$(call dblquote,$1) > $(call dblquote,$(e32abiv2_PREFILE).d)) \
  	$(call endrule,cia2cpp)
  
@@ -5574,18 +5791,20 @@
  endif
  
  endef
-@@ -960,21 +1051,26 @@
+@@ -960,21 +1057,26 @@
  	$(call startrule,asmcompile,,$(2)) \
  		$(if $(PERTURBSTARTTIME),$(RANSLEEP) $(PERTURBMSECS) ;,) \
  		$(CC) $(e32abiv2_asm_OPTIONS) \
 -		$(DEPEND_OPTION) $(call dblquote,$(DEPENDFILENAME)) \
+-	 	$$(call dblquote, $$<) $(OUTPUT_OPTION) $$@ \
 +		$(if $(NO_DEPEND_GENERATE),,$(DEPEND_OPTION) $(call dblquote,$(DEPENDFILENAME))) \
- 	 	$$(call dblquote, $$<) $(OUTPUT_OPTION) $$@ \
++	 	$$(call dblquote, $$<) $(OUTPUT_OPTION) $$@ $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \
  	$(call endrule,asmcompile)
 +ifeq ($(NO_DEPEND_GENERATE),)
  	$(call startrule,asmdependencies) \
  		$(CC) -M $(subst --no_rtti,,$(e32abiv2_asm_OPTIONS)) --depend_format=unix \
- 	  	$(OUTPUT_OPTION) $$@ $$(call dblquote,$2) > $(call dblquote,$(DEPENDFILENAME)) \
+-	  	$(OUTPUT_OPTION) $$@ $$(call dblquote,$2) > $(call dblquote,$(DEPENDFILENAME)) \
++	  	$(OUTPUT_OPTION) $$@ $$(call dblquote,$2) > $(call dblquote,$(DEPENDFILENAME)) $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \
  	$(call endrule,asmdependencies)
 +endif
  
@@ -5607,7 +5826,44 @@
  endif
  
  CREATABLEPATHS:=$$(CREATABLEPATHS) $(INTERMEDIATEPATH)
-@@ -1116,7 +1212,6 @@
+@@ -1000,7 +1102,7 @@
+         # Default values
+         ROMFILETYPE:=file
+         ROMFILE:=$(TARGET).$(REQUESTEDTARGETEXT)
+-        ROMPATH:=sys/bin/
++        ROMPATH:=$(if $(TARGETPATH),$(TARGETPATH)/,sys/bin/)
+         ROMDECORATIONS:=
+         ROMFILETYPE_RAM:=data
+         ROMFILE_RAM:=$(TARGET).$(REQUESTEDTARGETEXT)
+@@ -1021,6 +1123,7 @@
+         endif
+ 
+ 
++        DATATEXT:=
+         ifeq ($(TESTCODE),TRUE)
+         	# Add 'TEST' to the .iby filename
+         	ROMTEST:=test
+@@ -1031,8 +1134,6 @@
+                     DATATEXT:="data=/epoc32/data/z/test/$(MODULE)/$(VARIANTPLATFORM).$(TEST_OPTION).bat test/$(MODULE).$(TEST_OPTION).bat"
+                 endif
+             endif
+-        else
+-        	DATATEXT:=
+         endif
+ 
+         # ROMTARGET
+@@ -1078,8 +1179,8 @@
+ 	        $(call startrule,rombuild)	\
+ 	        $(GNUMKDIR) -p $(ROMDIR) \
+             $(if $(ROMFILE_CREATED_$(TOBLDINF)),,&& echo -e "// $(subst $(EPOC_ROOT)/,,$(ROMFILENAME))\n//\n$(DATATEXT)" > $(ROMFILENAME)) \
+-            $(if $(BUILDROMTARGET),&& echo "$(ROMFILETYPE)=/epoc32/release/##$(ABIDIR)##/##BUILD##/$(TARGET).$(REQUESTEDTARGETEXT)   $(1)$(ROMDECORATIONS)" >> $(ROMFILENAME))	\
+-	        $(if $(RAMTARGET),&& echo "$(ROMFILETYPE_RAM)=/epoc32/release/##$(ABIDIR)##/##BUILD##/$(TARGET).$(REQUESTEDTARGETEXT)   $(ROMPATH_RAM)$(ROMFILE_RAM)$(ROMDECORATIONS_RAM)" >> $(ROMFILENAME))	\
++            $(if $(BUILDROMTARGET),&& echo "$(ROMFILETYPE)=/epoc32/release/##$(ABIDIR)##/##BUILD##/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(REQUESTEDTARGETEXT)   $(1)$(ROMDECORATIONS)" >> $(ROMFILENAME))	\
++	        $(if $(RAMTARGET),&& echo "$(ROMFILETYPE_RAM)=/epoc32/release/##$(ABIDIR)##/##BUILD##/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(REQUESTEDTARGETEXT)   $(ROMPATH_RAM)$(ROMFILE_RAM)$(ROMDECORATIONS_RAM)" >> $(ROMFILENAME))	\
+ 	        $(call endrule,buildromfiletarget)
+     endef
+ 
+@@ -1116,7 +1217,6 @@
      PREVIOUSVARIANTTYPE:=$(VARIANTTYPE)
  
      WHATRELEASE:=$(WHATRELEASE) $(ROMFILENAME)
@@ -5615,7 +5871,7 @@
  endif
  
  # Deal with test code batch files generation.
-@@ -1127,7 +1222,6 @@
+@@ -1127,7 +1227,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)
@@ -5623,7 +5879,7 @@
  endif
  
  ###################### End of Build ROMFILE target ######################
-@@ -1167,12 +1261,12 @@
+@@ -1167,12 +1266,12 @@
  $(call makepath,$(CREATABLEPATHS))
  
  ## Clean up
@@ -5642,7 +5898,7 @@
  
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2fsy.flm /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2fsy.flm
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2fsy.flm	2010-05-18 19:32:34.725348467 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2fsy.flm	2010-05-17 18:47:53.040843000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2fsy.flm	2010-06-04 12:09:24.975850000 +0100
 @@ -1,4 +1,4 @@
 -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
 +# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
@@ -5676,7 +5932,13 @@
  CANIGNORENONCALLABLE:=1
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2kdll.flm /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2kdll.flm
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2kdll.flm	2010-05-18 19:32:34.725348467 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2kdll.flm	2010-05-17 18:47:53.044842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2kdll.flm	2010-06-04 12:09:24.975850000 +0100
+@@ -1,4 +1,4 @@
+-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
++# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
+ # All rights reserved.
+ # This component and the accompanying materials are made available
+ # under the terms of the License "Eclipse Public License v1.0"
 @@ -27,7 +27,7 @@
  
  # Determine what kind of entrypoint option to set
@@ -5686,9 +5948,17 @@
  
  ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
  LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
+@@ -48,6 +48,7 @@
+ IMPORTLIBRARYREQUIRED:=1
+ endif
+ POSTLINKDEFFILE:=$(DEFFILE)
++SUPPORT_FREEZE:=1
+ 
+ # No exception support for kernel code?
+ EXCEPTIONS:=$(NO_EXCEPTIONS)
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2kext.flm /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2kext.flm
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2kext.flm	2010-05-18 19:32:34.725348467 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2kext.flm	2010-05-17 18:47:53.044842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2kext.flm	2010-06-04 12:09:24.975850000 +0100
 @@ -34,7 +34,7 @@
  
  # Default Linker settings for this target type
@@ -5700,7 +5970,7 @@
  LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2ldd.flm /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2ldd.flm
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2ldd.flm	2010-05-18 19:32:34.729348906 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2ldd.flm	2010-05-17 18:47:53.044842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2ldd.flm	2010-06-04 12:09:24.975850000 +0100
 @@ -1,4 +1,4 @@
 -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
 +# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
@@ -5734,7 +6004,7 @@
  
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2pdd.flm /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2pdd.flm
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2pdd.flm	2010-05-18 19:32:34.729348906 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2pdd.flm	2010-05-17 18:47:53.044842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2pdd.flm	2010-06-04 12:09:24.979850000 +0100
 @@ -1,4 +1,4 @@
 -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
 +# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
@@ -5767,7 +6037,7 @@
  UID2:=100039d0
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2pdl.flm /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2pdl.flm
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2pdl.flm	2010-05-18 19:32:34.729348906 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2pdl.flm	2010-05-17 18:47:53.044842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2pdl.flm	2010-06-04 12:09:24.979850000 +0100
 @@ -1,4 +1,4 @@
 -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
 +# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
@@ -5802,7 +6072,7 @@
 Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm: e32abiv2pdll.flm
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2plugin.flm /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2plugin.flm
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2plugin.flm	2010-05-18 19:32:34.729348906 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2plugin.flm	2010-05-17 18:47:53.044842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2plugin.flm	2010-06-04 12:09:24.979850000 +0100
 @@ -1,4 +1,4 @@
 -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
 +# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
@@ -5866,7 +6136,7 @@
  endif
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2stddll.flm /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2stddll.flm
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2stddll.flm	2010-05-18 19:32:34.729348906 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2stddll.flm	2010-05-17 18:47:53.044842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2stddll.flm	2010-06-04 12:09:24.979850000 +0100
 @@ -29,7 +29,7 @@
  
  # Default Linker settings for this target type
@@ -5878,7 +6148,7 @@
  ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2stdexe.flm /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2stdexe.flm
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2stdexe.flm	2010-05-18 19:32:34.729348906 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2stdexe.flm	2010-05-17 18:47:53.044842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2stdexe.flm	2010-06-04 12:09:24.979850000 +0100
 @@ -1,4 +1,4 @@
 -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
 +# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
@@ -5914,7 +6184,7 @@
  # STDEXEs need the c runtime library
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2textnotifier2.flm /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2textnotifier2.flm
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2textnotifier2.flm	2010-05-18 19:32:34.729348906 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2textnotifier2.flm	2010-05-17 18:47:53.048842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2textnotifier2.flm	2010-06-04 12:09:24.979850000 +0100
 @@ -1,4 +1,4 @@
 -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
 +# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
@@ -5948,7 +6218,7 @@
  POSTLINKDEFFILE:=$(DEFFILE)
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2var2.flm /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2var2.flm
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2var2.flm	2010-05-18 19:32:34.729348906 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2var2.flm	2010-05-17 18:47:53.048842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2var2.flm	2010-06-04 12:09:24.979850000 +0100
 @@ -1,4 +1,4 @@
 -# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
 +# Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
@@ -5992,7 +6262,7 @@
  # other invocations so we are going to save it on a stack
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2var.flm /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2var.flm
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/e32abiv2var.flm	2010-05-18 19:32:34.729348906 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2var.flm	2010-05-17 18:47:53.048842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/e32abiv2var.flm	2010-06-04 12:09:24.979850000 +0100
 @@ -1,4 +1,4 @@
 -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
 +# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
@@ -6036,7 +6306,7 @@
  # other invocations so we are going to save it on a stack
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/emulator.xml /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/emulator.xml
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/emulator.xml	2010-05-18 19:32:34.729348906 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/emulator.xml	2010-05-17 18:47:53.048842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/emulator.xml	2010-06-04 12:09:24.979850000 +0100
 @@ -89,7 +89,6 @@
  		<param name='OPT.DEFINE'/>
  		<param name='OPT.DEFFILE'/>
@@ -6081,7 +6351,7 @@
  
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/gccxml.flm /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/gccxml.flm
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/gccxml.flm	2010-05-18 19:32:34.733348925 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/gccxml.flm	2010-05-17 18:47:53.048842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/gccxml.flm	2010-06-04 12:09:24.983850000 +0100
 @@ -1,4 +1,4 @@
 -# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
 +# Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
@@ -6146,7 +6416,7 @@
  
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/msvctools.flm /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/msvctools.flm
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/msvctools.flm	2010-05-18 19:32:34.733348925 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/msvctools.flm	2010-05-17 18:47:53.052842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/msvctools.flm	2010-06-04 12:09:24.983850000 +0100
 @@ -1,4 +1,4 @@
 -# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
 +# Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
@@ -6225,7 +6495,7 @@
 +$(call raptor_release,$(INSTALLTARGET))
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/msvctools.xml /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/msvctools.xml
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/msvctools.xml	2010-05-18 19:32:34.733348925 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/msvctools.xml	2010-05-17 18:47:53.052842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/msvctools.xml	2010-06-04 12:09:24.987850000 +0100
 @@ -42,7 +42,6 @@
  		<param name='OPT.LISTING'/>
  		<param name='OPT.OBJECTFILE'/>
@@ -6236,64 +6506,327 @@
  		<param name='OPT.SYSINCLUDE'/>
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/resource.flm /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/resource.flm
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/resource.flm	2010-05-18 19:32:34.733348925 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/resource.flm	2010-05-17 18:47:53.052842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/resource.flm	2010-06-04 12:09:24.987850000 +0100
 @@ -1,4 +1,4 @@
 -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
 +# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
  # All rights reserved.
  # This component and the accompanying materials are made available
  # under the terms of the License "Eclipse Public License v1.0"
-@@ -101,8 +101,6 @@
- 	@if [ ! -f $$@ ]; then echo "DATADIR: /$(RSSBASENAME)" > $$@ ; fi
- 	@echo -e "\n/z$(TARGETPATH)/$(TARGET_lower).rsc : $(RSSBASENAME).rpp" >> $$@
+@@ -48,119 +48,121 @@
+ # Ensure that RELEASABLES and CLEANTARGETS cannot expand indefinitely in successive calls to this flm:
+ CLEANTARGETS:=
+ RELEASABLES:=
++CREATABLEPATHS:=
+ 
+ # There is only one resource header (.rsg) file and we only
+ # make that if we are asked.
+ RSGDIR:=$(EPOCROOT)/epoc32/include
++# If there are multiple LANGUAGES then it is the last one in the list
++# which produces the header.
++HEADLANG:=$(lastword $(LANGUAGES:SC=sc))
+ ifneq ($(or $(HEADER),$(HEADERONLY)),)
+         RESOURCEHEADER:=$(RSGDIR)/$(HEADER)
+ 
+-        # If there are multiple LANGUAGES then it is the last one in the list
+-        # which produces the header.
+-        HEADLANG:=$(lastword $(LANGUAGES:SC=sc))
+ else
+-	HEADLANG:=
+     RESOURCEHEADER:=
+ endif
+ 
+ # we create intermediate .rpp and .d files
+-INTERBASE:=$(OUTPUTPATH)/$(TARGET_lower)$(if $(TARGETPATH),_$(subst /,_,$(TARGETPATH)),)
++INTERBASE_TMP:=$(OUTPUTPATH)/$(TARGET_lower)_$(notdir $(basename $(SOURCE)))
+ 
+-################################## localisation ###########################$(GNUMKDIR)#############
+-# Only make copies for full resource builds
+ 
+-# Initialise to prevent RELEASABLES spill-over between calls
+-DESTRPP:=
+-INFOFILE:=
+-
+-ifeq ($(HEADERONLY),)
+-
+-RSSBASENAME:=$(call lowercase,$(basename $(notdir $(SOURCE))))
+-DESTRPP:=$(EPOCROOT)/epoc32/localisation/$(RSSBASENAME)/rsc/$(RSSBASENAME).rpp
+-$(call makepath,$(EPOCROOT)/epoc32/localisation/$(RSSBASENAME)/rsc)
++# common pre-processor options
+ 
+-INFOFILE:=$(EPOCROOT)/epoc32/localisation/group/$(RSSBASENAME).info
+-# If there are MULTIPLE languages then copy the .rpp for the last one
+-RPPLANG:=$(lastword $(LANGUAGES:SC=sc))
++# We really should be using -iquote with a recent cpp.  This is a note for when we do update:
++#CPPOPT:=-nostdinc -undef -Wno-trigraphs -D_UNICODE -include $(PRODUCT_INCLUDE)\
++# -I$(dir $(SOURCE)) $(foreach I, $(USERINCLUDE),-iquote $(I) ) $(foreach J,$(SYSTEMINCLUDE),-I $(J) )
+ 
+-# Copy .rpp files from epoc32/build/ to epoc32/localisation/x/rsc/x.rpp and create .info files in localisation
+-define CreateRppAndInfo
++CPPOPT:=-nostdinc -undef -Wno-trigraphs -D_UNICODE -include $(PRODUCT_INCLUDE)\
++ -I$(dir $(SOURCE)) $(foreach I, $(USERINCLUDE),-I$(I) ) -I- $(foreach J,$(SYSTEMINCLUDE),-I$(J) )
+ 
+-ifeq ($(RESOURCE_$(call sanitise,$(SOURCE))),)
+-RESOURCE_$(call sanitise,$(SOURCE)):=1
++CREATABLEPATHS:=$(CREATABLEPATHS) $(RSCDIR) $(RSGDIR) $(OUTPUTPATH) 
+ 
+-RESOURCE:: $(DESTRPP) $(INFOFILE)
++# We intend to generate the resource in an intermediate location and copy to the targetpath to
++# ensure that when the "same" resource is built into separare target paths, it doesn't have to be 
++# completely recreated each time - just copied.
++RSCCOPYDIRS:=$(RSCDIR)
+ 
+-$(DESTRPP): $(INTERBASE)_$(RPPLANG).rpp
+-	$(call startrule,rppfilecopy,FORCESUCCESS) \
+-	$(GNUCP) $$< $$@ \
+-	$(call endrule,rppfilecopy)
++# additional binary resource copies performed based on BINCOPYDIRS
++ifneq ($(BINCOPYDIRS),)
++        RSCCOPYDIRS:=$(RSCCOPYDIRS) $(subst //,/,$(patsubst %,%/$(if $(TARGETPATH),/z/$(TARGETPATH),),$(BINCOPYDIRS)))
++endif
++CREATABLEPATHS:=$(CREATABLEPATHS) $(RSCCOPYDIRS)
+ 
+-$(INFOFILE)::
+-	@if [ ! -d $(EPOCROOT)/epoc32/localisation/group ]; then $(GNUMKDIR) -p $(EPOCROOT)/epoc32/localisation/group; fi
+-	@if [ ! -f $$@ ]; then echo "DATADIR: /$(RSSBASENAME)" > $$@ ; fi
+-	@echo -e "\n/z$(TARGETPATH)/$(TARGET_lower).rsc : $(RSSBASENAME).rpp" >> $$@
++###############################################################################
  
 -CLEANTARGETS:=$$(CLEANTARGETS) $(DESTRPP) $(INFOFILE)
--
- endif
- endef
- 
-@@ -114,7 +112,7 @@
- $(call makepath,$(INTERBASE))
- 
- # common pre-processor options
+ 
+-endif
+-endef
++define preprocessresource
++# $1 is the RPPFILE		(eg. /epoc32/build/xxx/b_sc.rpp)
++# $2 is the LANGUAGE		(eg. sc or 01 or 02 ...)
++# $3 is the "primary" language on which all the others depend
+ 
+-$(eval $(call CreateRppAndInfo))
+-endif
+-################################# end of localisation ###################################
++  ifeq ($(TARGET_$(call sanitise,$1)),)
++    TARGET_$(call sanitise,$1):=1
++    $(if $(FLMDEBUG),$$(info <debug>preprocessresource: $1 LANG:$2 dep $3</debug>))
+ 
+-# make the output directories while reading makefile - some build engines prefer this
+-$(call makepath,$(INTERBASE))
+ 
+-# common pre-processor options
 -CPPOPT:=-nostdinc -undef -D_UNICODE -include $(PRODUCT_INCLUDE)\
-+CPPOPT:=-nostdinc -undef -Wno-trigraphs -D_UNICODE -include $(PRODUCT_INCLUDE)\
-  -I$(dir $(SOURCE)) $(foreach I, $(USERINCLUDE),-I$(I) ) -I- $(foreach J,$(SYSTEMINCLUDE),-I$(J) )
- 
- CREATABLEPATHS:=$(RSCDIR) $(RSGDIR) $(OUTPUTPATH)
-@@ -174,7 +172,6 @@
- 
-    ifeq ($(TARGET_$(call sanitise,$2)),)
-            TARGET_$(call sanitise,$2):=1
+- -I$(dir $(SOURCE)) $(foreach I, $(USERINCLUDE),-I$(I) ) -I- $(foreach J,$(SYSTEMINCLUDE),-I$(J) )
++    # Correct dependency information when a header file can't be found.
++    # If the c preprocessor can't find a dependency it appears as it did in the #include statement
++    # e.g. "filename.mbg" or "filename.rsg" in the dependency file.
++
++ifneq ($(NO_DEPEND_GENERATE),)
++    # This version minimises the size of dependency files, to contain only .mbg and .rsg deps.
++    # It allows resources to be built in the right order but doesn't impose the weight of
++    # of full dependency information which can overwhelm make in large builds.
++    # The strategy is filter lines which don't have .rsg or .mbg dependencies in them and
++    # to sift each line to leave out non-relevant things like other header files, .hrh 
++    # files etc.  In the end don't print anything at all if we did not find the target.
+ 
+-CREATABLEPATHS:=$(RSCDIR) $(RSGDIR) $(OUTPUTPATH)
++define  DEPENDENCY_CORRECTOR
++{ $(DEPCRUNCH) --extensions rsg,mbg --assume '$$$$(EPOCROOT)/epoc32/include' ; } 
++endef
+ 
+-# additional binary resource copies performed based on BINCOPYDIRS
+-RSCCOPYDIRS:=
+-ifneq ($(BINCOPYDIRS),)
+-        RSCCOPYDIRS:=$(subst //,/,$(patsubst %,%/$(if $(TARGETPATH),/z/$(TARGETPATH),),$(BINCOPYDIRS)))
+-        CREATABLEPATHS:=$(CREATABLEPATHS) $(RSCCOPYDIRS)
++else
++    # This can correct the dependencies by assuming that the file will be in epoc32\include as this is the default
++    DEPENDENCY_CORRECTOR:=$(GNUSED)  -r 's% ([^ \/]+\.((rsg)|(mbg)))% $(EPOCROOT)\/epoc32\/include\/\1%ig' 
+ endif
+ 
+-###############################################################################
+-define preprocessresource
+-# $(1) is the RPPFILE		(eg. /epoc32/build/xxx/b_sc.rpp)
+-# $(2) is the related RESOURCEFILE if any (eg. /a/b.rsc)
+-# $(3) is the LANGUAGE		(eg. sc or 01 or 02 ...)
+ 
+-  ifeq ($(TARGET_$(call sanitise,$1)),)
+-    TARGET_$(call sanitise,$1):=1
+-    $(if $(FLMDEBUG),$(info preprocessresource: $(1) for $(2) LANG:$(3)))
++    ifeq "$1" "$3"
++        RESOURCE_DEPS:: $1.d
+ 
+-    RESOURCE_DEPS:: $(1).d
+-    $(1).d: $(SOURCE)
++        $1.d: $(SOURCE)
+ 	  $(call startrule,resourcedependencies,FORCESUCCESS) \
+-	  $(GNUCPP) -C -DLANGUAGE_$(3) -DLANGUAGE_$(subst sc,SC,$(3)) $(call makemacrodef,-D,$(MMPDEFS))\
+-	  $(CPPOPT) $(SOURCE) -M -MG -MT"$(1)" | \
+-	  $(GNUSED)  -r 's# ([^ \/]+\.((rsg)|(mbg)))# $(EPOCROOT)\/epoc32\/include\/\1#ig' > $(1).d \
++	  $(GNUCPP) -DLANGUAGE_$2 -DLANGUAGE_$(subst sc,SC,$2) $(call makemacrodef,-D,$(MMPDEFS))\
++	  $(CPPOPT) $(SOURCE) -M -MG -MT"$1" | \
++	  $$(DEPENDENCY_CORRECTOR) >$$@ \
+ 	  $(call endrule,resourcedependencies)
+ 
+-    $(1): $(1).d
++         $1 : $1.d
++
++    else
++         $1 : $3
++    endif
++
++    $1:
+ 	  $(call startrule,resourcepreprocess,FORCESUCCESS) \
+-	  $(GNUCPP) -C -DLANGUAGE_$(3) -DLANGUAGE_$(subst sc,SC,$(3)) $(call makemacrodef,-D,$(MMPDEFS))\
++	  $(GNUCPP) -C -DLANGUAGE_$2 -DLANGUAGE_$(subst sc,SC,$2) $(call makemacrodef,-D,$(MMPDEFS))\
+ 	  $(CPPOPT) $(SOURCE) -o $$@ \
+ 	  $(call endrule,resourcepreprocess)
++    endif
+ 
+-    CLEANTARGETS:= $$(CLEANTARGETS) $(1)
++    CLEANTARGETS:= $$(CLEANTARGETS) $1
+ 
+-    $(eval DEPENDFILENAME:=$(1).d)
++    ifeq "$(MAKEFILE_GROUP)" "RESOURCE"
++    ifeq "$1" "$3"
++      $(eval DEPENDFILENAME:=$1.d)
+     $(eval DEPENDFILE:=$(wildcard $(DEPENDFILENAME)))
+ 
+     CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
+     ifneq "$(DEPENDFILE)" ""
+       ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" ""
++          ifeq "$(MAKEFILE_GROUP)" "RESOURCE"
+         -include $(DEPENDFILE)
+       endif
+     endif
++      endif
++    endif
+ 
+   endif
+ endef # preprocessresource #
+@@ -168,43 +170,30 @@
+ ###############################################################################
+ define copyresource
+ # $(1) is the source
+-# $(2) is the destination
++# $(2) is the space separated list of destinations which must be filenames
+ 
+-RELEASABLES:=$$(RELEASABLES) $(2)
++   RELEASABLES:=$$(RELEASABLES) $(2)
+ 
+-   ifeq ($(TARGET_$(call sanitise,$2)),)
+-           TARGET_$(call sanitise,$2):=1
 -        CLEANTARGETS:=$$(CLEANTARGETS) $2
- 
-         RESOURCE:: $2
-         ## perform additional copies of binaries
-@@ -201,7 +198,6 @@
+-
+-        RESOURCE:: $2
+-        ## perform additional copies of binaries
+-        #
+-        # Only certain builds require further copies of the generated resource binaries
+-        #
+-        $(2): $(1)
+-		$(call startrule,resourcecopy,FORCESUCCESS) \
+-		$(GNUCP) $$< $$@ \
+-		$(call endrule,resourcecopy)
+-
+-   endif
++   $(info <finalcopy source='$1'>$2</finalcopy>)
+ 
+ endef # copyresource #
+ 
+ ###############################################################################
+ define generateresource
+ 
+-# $(1) is the resource filename e.g. /a/b/resource.rsc
++# $(1) is the intermediate resource filename with path e.g. /a/b/resource.rsc
+ # $(2) is the preprocessed resource to make it from
+ # $(3) is the language e.g. sc or 01 or 02
++# $(4) is the target resource filename without path
+ 
+-    RELEASABLES:=$$(RELEASABLES) $(1)
  
          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 @@
+-            $(if $(FLMDEBUG),$(info generateresource: $(1) from $(2) LANG:$(3)),)
++            $(if $(FLMDEBUG),$(info <debug>generateresource: $(1) from $(2) LANG:$(3)</debug>),)	
++            $(if $(FLMDEBUG),$(info <debug>generateresource: copies: $(sort $(patsubst %,%/$(notdir $(1)),$(RSCCOPYDIRS)))</debug>))
+ 
++            CLEANTARGETS:=$$(CLEANTARGETS) $(1)
+ 
+             RESOURCE:: $(1)
+ 
+@@ -214,11 +203,15 @@
+ 			$(call endrule,resourcecompile)
+ 
+         endif
++
+ #	Whether or not we have generated this resource for some other variant, check if there
+ #       are any new copies to be made for this variant. e.g. winscw requires that we make
+-#       some extra copies.
++#       some extra copies.  We tried to copy after running rcomp itself but we still need these
++#       targets for the sake of dependencies or, for example, if someone merely adds a new copy 
++#       when the resource is up-to-date
++
++        $(call copyresource,$1,$(sort $(patsubst %,%/$4,$(RSCCOPYDIRS))))
+ 
+-        $(foreach F,$(sort $(patsubst %,%/$(notdir $(1)),$(RSCCOPYDIRS))),$(call copyresource,$(1),$(F)))
+ 
+         # individual source file compilation
+         SOURCETARGET_$(call sanitise,$(SOURCE)): $(1)
+@@ -236,8 +229,7 @@
  
          ifeq ($(TARGET_$(call sanitise,$1)),)
                  TARGET_$(call sanitise,$1):=1
 -                CLEANTARGETS:= $$(CLEANTARGETS) $(1)
-                 $(if $(FLMDEBUG),$(info resourceheader: $(1) from $(2) LANG:$(3)))
+-                $(if $(FLMDEBUG),$(info resourceheader: $(1) from $(2) LANG:$(3)))
++                $(if $(FLMDEBUG),$(info <debug>resourceheader: $(1) from $(2) LANG:$(3)</debug>))
  
                  RESOURCE:: $(1)
-@@ -282,7 +277,6 @@
+ 
+@@ -260,19 +252,28 @@
+ # We always create at least the header
+ # even if we sometimes don't create the resources
+ ifneq ($(RESOURCEHEADER),)
+-        $(eval $(call generateresourceheader,$(RESOURCEHEADER),$(INTERBASE)_$(HEADLANG).rpp,$(HEADLANG)))
++        $(eval $(call generateresourceheader,$(RESOURCEHEADER),$(INTERBASE_TMP)_$(HEADLANG).rpp,$(HEADLANG)))
+ endif
+ 
++# The one on which the others will depend i.e. they will 
++# "sit in it's dependency slipstream" or in other words
++# We only have to make one dependency file because all of
++# the other languages will benefit from the dependency file
++# belonging to this language.
++PRIMARYRPPFILE:=$(INTERBASE_TMP)_$(HEADLANG).rpp
+ ifeq ($(HEADERONLY),)
+         # generate a resource file for each language
+         # For sc we generate $(RESBASE).rsc and define LANGUAGE_SC and LANGUAGE_sc.
+-        $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call preprocessresource,$(INTERBASE)_$(L).rpp,$(RESBASE).r$(L),$(L))))
+-        $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call generateresource,$(RESBASE).r$(L),$(INTERBASE)_$(L).rpp,$(L))))
++        $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call preprocessresource,$(INTERBASE_TMP)_$(L).rpp,$(L),$(PRIMARYRPPFILE))))
++
++        ifeq "$(MAKEFILE_GROUP)" "RESOURCE"
++            $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call generateresource,$(INTERBASE_TMP).r$(L),$(INTERBASE_TMP)_$(L).rpp,$(L),$(TARGET_lower).r$(L))))
++        endif
+ else
+         # No resources are going to be made so unless we specifically ask for it, there will be no
+         # preprocessed file from which to create the header:
+ 
+-        $(eval $(call preprocessresource,$(INTERBASE)_$(HEADLANG).rpp,,$(HEADLANG)))
++        $(eval $(call preprocessresource,$(INTERBASE_TMP)_$(HEADLANG).rpp,,$(HEADLANG),$(PRIMARYRPPFILE)))
+ 
+ endif
+ 
+@@ -282,20 +283,19 @@
  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 @@
+-  CREATABLEPATHS:=$(CREATABLEPATHS) $(dir $(RFIFILE))
++  CREATABLEPATHS:=$(CREATABLEPATHS) $(dir $(RFIFILE))/
+ 
+-  RPPFILES:=$(foreach L,$(LANGUAGES:SC=sc),$(INTERBASE)_$(L).rpp)
+-  $(eval $(call generaterfifile,$(RFIFILE),$(RPPFILES),$(addsuffix .d,$(RPPFILES))))
++  RPPFILES:=$(foreach L,$(LANGUAGES:SC=sc),$(INTERBASE_TMP)_$(L).rpp)
++  $(eval $(call generaterfifile,$(RFIFILE),$(RPPFILES),$(PRIMARYRPPFILE).d))
+ endif
  
  
  ## Clean up
@@ -6311,7 +6844,7 @@
 Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm: run.mk
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/standard.xml /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/standard.xml
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/standard.xml	2010-05-18 19:32:34.737348805 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/standard.xml	2010-05-17 18:47:53.056842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/standard.xml	2010-06-04 12:09:24.987850000 +0100
 @@ -5,11 +5,12 @@
  		<param name='ALWAYS_BUILD_AS_ARM' default=''/>
  		<param name='SET_ARMINC' default=''/>
@@ -6335,7 +6868,15 @@
  		<param name='LINKEROPTION_ARMCC' default=''/>
  		<param name='LISTING_OPTION' default='-S'/>
  		<param name='MMPDEFS' default=''/>
-@@ -58,9 +60,9 @@
+@@ -38,6 +40,7 @@
+ 		<param name='SOURCE' default=''/>
+ 		<param name='TARGET'/>
+ 		<param name='TARGET_lower'/>
++		<param name='TARGETPATH' default=''/>
+ 		<param name='LTCG' default=''/>
+ 		<param name='LTCG_OPTION' default='--ltcg'/>
+ 		<param name='TARGETTYPE'/>
+@@ -58,9 +61,9 @@
  		<param name='EPOCSTACKSIZE' default=''/>
  		<param name='EPOCFIXEDPROCESS' default=''/>
  		<param name='EPOCALLOWDLLDATA' default=''/>
@@ -6346,15 +6887,16 @@
  		<param name='STDCPP' default=''/>
  		<param name='NOSTDCPP' default=''/>
  		<param name='NEWLIB' default=''/>
-@@ -72,7 +74,6 @@
+@@ -72,7 +75,7 @@
  		<param name='CC.VAL.SOFTVFP_MAYBE_VFPV2' default=''/>
  		<param name='CODE_SEGMENT_START' default=''/>
  		<param name='TOOLCHAIN' default=''/>
 -		<param name='TOOLCHAINVERSION' default=''/>
++		<param name='USE_RVCT22_DELETE_WORKAROUND' default=''/>
  	</interface>
  	<interface name="Symbian.e32abiv2" extends="Symbian.mmp" flm="e32abiv2.flm">
  		<param name='SUPPORTS_STDCPP_NEWLIB' default='1'/>
-@@ -92,8 +93,9 @@
+@@ -92,8 +95,9 @@
  		<param name='CFLAGS'/>
  		<param name='COMMANDFILE_OPTION'/>
  		<param name='COMPILE_ONLY_OPTION'/>
@@ -6365,7 +6907,7 @@
  		<param name='COMPILER_INTERWORK_DEFINES'/>
  		<param name='COMPILER_SYSTEM_INCLUDE_OPTION'/>
  		<param name='COMPILER_THUMB_DEFINES'/>
-@@ -105,7 +107,6 @@
+@@ -105,7 +109,6 @@
  		<param name='DEBUG_FORMAT'/>
  		<param name='DEBUG_INFO'/>
  		<param name='DEPEND_OPTION'/>
@@ -6373,7 +6915,7 @@
  		<param name='ELF2E32'/>
  		<param name='EFREEZE'/>
  		<param name='EFREEZE_REMOVE_OPTION' default=''/>
-@@ -116,6 +117,7 @@
+@@ -116,14 +119,15 @@
  		<param name='FEATURELISTFILES' default=''/>
  		<param name='FEATUREVARIANT' default=''/>
  		<param name='FEATUREVARIANTNAME' default=''/>
@@ -6381,7 +6923,8 @@
  		<param name='FPMODE_OPTION'/>
  		<param name='FROMELF'/>
  		<param name='FULLVARIANTPATH'/>
-@@ -124,6 +126,7 @@
+-		<param name='GENERATE_ABIV1_IMPLIBS' default=''/>		
+ 		<param name='RVCT3_1' default=''/>
  		<param name='LD'/>
  		<param name='LD_ERRORS_CONTROL_OPTION'/>
  		<param name='LD_WARNINGS_CONTROL_OPTION'/>
@@ -6389,7 +6932,7 @@
  		<param name='LIBPATH'/>
  		<param name='LICENSERETRY_OPTION' default=''/>
  		<param name='LINKER_ADD_STATIC_RUNTIME'/>
-@@ -144,6 +147,8 @@
+@@ -144,6 +148,8 @@
  		<param name='PERL'/>
  		<param name='PERTURBSTARTTIME'/>
  		<param name='PERTURBMSECS' default='500'/>
@@ -6398,7 +6941,7 @@
  		<param name='PREPDEF'/>
  		<param name='PREINCLUDE'/>
  		<param name='PREINCLUDE_OPTION'/>
-@@ -158,6 +163,7 @@
+@@ -158,6 +164,7 @@
  		<param name='RVCTBIN'/>
  		<param name='RVCTINC'/>
  		<param name='RVCTLIB'/>
@@ -6406,7 +6949,7 @@
  		<param name='RW_BASE_OPTION'/>
  		<param name='SBSV1MAKE'/>
  		<param name='NMAKE'/>
-@@ -167,6 +173,7 @@
+@@ -167,10 +174,12 @@
  		<param name='SPLIT_OPTION'/>
  		<param name='KERNEL_STATIC_RUNTIME_LIB'/>
  		<param name='USER_STATIC_RUNTIME_LIB'/>
@@ -6414,7 +6957,12 @@
  		<param name='STATIC_LIBS_LIST'/>
  		<param name='STATIC_LIBS_PATH'/>
  		<param name='STATIC_LIBRARY_DIR'/>
-@@ -207,6 +214,10 @@
+ 		<param name='STATIC_RUNTIME_DIR'/>
++		<param name='SUPPORTS_ABIV1_IMPLIBS'/>		
+ 		<param name='SYMBIAN_CCFLAGS'/>
+ 		<param name='SYMBIAN_LD_MESSAGE_OPTION'/>
+ 		<param name='SYMBIAN_LINK_FLAGS'/>
+@@ -207,6 +216,10 @@
  		<param name='TARGETTYPE' default="dll"/>
  		<param name='UID1' default="10000079"/>
  	</interface>
@@ -6425,7 +6973,7 @@
  	<interface name="Symbian.stddll" extends="Symbian.e32abiv2" flm="e32abiv2stddll.flm">
  		<param name='TARGETTYPE' default="stddll"/>
  		<param name='UID1' default="10000079"/>
-@@ -229,6 +240,8 @@
+@@ -229,6 +242,8 @@
  	</interface>
  	<interface name="Symbian.plugin" extends="Symbian.dll" flm="e32abiv2plugin.flm">
  	</interface>
@@ -6436,7 +6984,7 @@
  	<interface name="Symbian.implib" extends="Symbian.dll" flm="e32abiv2implib.flm">
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/stringtable.flm /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/stringtable.flm
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/stringtable.flm	2010-05-18 19:32:34.737348805 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/stringtable.flm	2010-05-17 18:47:53.056842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/stringtable.flm	2010-06-04 12:09:24.987850000 +0100
 @@ -33,9 +33,7 @@
  
  EXPORT::
@@ -6485,7 +7033,7 @@
 -# 
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/template_ext.flm /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/template_ext.flm
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/template_ext.flm	2010-05-18 19:32:34.737348805 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/template_ext.flm	2010-05-17 18:47:53.056842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/template_ext.flm	2010-06-04 12:09:24.991849000 +0100
 @@ -81,11 +81,10 @@
  # to be target specific to the unique targets
  # that we have created.
@@ -6527,7 +7075,7 @@
  
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/tools2common.flm /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/tools2common.flm
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/tools2common.flm	2010-05-18 19:32:34.749348513 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/tools2common.flm	2010-05-17 18:47:53.068842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/tools2common.flm	2010-06-04 12:09:25.003850000 +0100
 @@ -1,4 +1,4 @@
 -# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
 +# Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
@@ -6609,7 +7157,7 @@
  ## The End
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/tools2exe.flm /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/tools2exe.flm
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/tools2exe.flm	2010-05-18 19:32:34.749348513 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/tools2exe.flm	2010-05-17 18:47:53.068842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/tools2exe.flm	2010-06-04 12:09:25.003850000 +0100
 @@ -1,4 +1,4 @@
 -# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
 +# Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
@@ -6658,7 +7206,7 @@
  
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/tools2lib.flm /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/tools2lib.flm
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/tools2lib.flm	2010-05-18 19:32:34.749348513 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/tools2lib.flm	2010-05-17 18:47:53.068842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/tools2lib.flm	2010-06-04 12:09:25.003850000 +0100
 @@ -19,7 +19,7 @@
  LIBTARGET:=$(RELEASEPATH)/$(TARGET).a
  
@@ -6670,7 +7218,7 @@
  ## Common build steps (compiling)
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/tools.xml /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/tools.xml
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/tools.xml	2010-05-18 19:32:34.745348494 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/tools.xml	2010-05-17 18:47:53.068842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/tools.xml	2010-06-04 12:09:25.003850000 +0100
 @@ -27,6 +27,7 @@
  		<param name='SYSTEMINCLUDE' default=''/>
  		<param name='TARGET'/>
@@ -6697,7 +7245,7 @@
  	<interface name="Tools.lib" extends="Tools.common" flm="tools2lib.flm">
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/tracecompiler.mk /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/tracecompiler.mk
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/tracecompiler.mk	2010-05-18 19:32:34.749348513 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/tracecompiler.mk	2010-05-17 18:47:53.068842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/tracecompiler.mk	2010-06-04 12:09:25.007850000 +0100
 @@ -1,5 +1,4 @@
 -#
 -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -6705,53 +7253,116 @@
  # All rights reserved.
  # This component and the accompanying materials are made available
  # under the terms of the License "Eclipse Public License v1.0"
-@@ -13,15 +12,44 @@
+@@ -13,61 +12,221 @@
  #
  # Description: 
  # Run Trace Compiler on source files to generate trace headers and decode files
 -#
  
++# Expected inputs:
++# TARGETEXT
++
 +# Set project name as <mmp_name>
  TRACE_PRJNAME:=$(basename $(notdir $(PROJECT_META)))
-+
-+TARGETEXT:=$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE))
-+
- # Find out TRACE_PATH
-+# first look for .*/traces/traces_<target_name>_<target_extension>
-+TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces/traces_$(TARGET)_$(TARGETEXT),$(DIR))))
-+
+-# Find out TRACE_PATH
+-TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces_$(TRACE_PRJNAME),$(DIR))))
+-ifeq ($(TRACE_PATH),)
+-TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces,$(DIR))))
++OLDTC_TRACE_PRJNAME:=$(TRACE_PRJNAME)
++TRACE_RELEASABLE_ID:=$(TARGET)_$(TARGETEXT)
++
++define get_trace_path
++$(firstword $(filter %$1, $(USERINCLUDE) $(SYSTEMINCLUDE)))
++endef
++
++$(if $(FLMDEBUG),$(info <debug>INCLUDES=$(USERINCLUDE) $(SYSTEMINCLUDE)</debug>))
++$(if $(FLMDEBUG),$(info <debug>TARGET=$(TARGET) TARGETEXT=$(TARGETEXT)</debug>))
++
++# Find out TRACE_PATH  by looking for the trace folder in SYSTEMINCLUDE and USERINCLUDES
++# traces/traces_<target_name>_<target_extension>
++TRACE_PATH:=$(call get_trace_path,/traces/traces_$(TRACE_RELEASABLE_ID))
 +ifneq ($(TRACE_PATH),)
-+# set project name as <target_name>_<target_extension> instead of <mmp_name>
-+TRACE_PRJNAME:=$(TARGET)_$(TARGETEXT)
-+endif
-+
-+# if not found look for .*/traces_<mmp_name>
-+ifeq ($(TRACE_PATH),)
- TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces_$(TRACE_PRJNAME),$(DIR))))
-+endif
-+
-+# if not found look for .*/traces
- ifeq ($(TRACE_PATH),)
- TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces,$(DIR))))
++  TRACE_PRJNAME:=$(TRACE_RELEASABLE_ID)
++else # obsolete forms for compatibility
++  # traces_<target_name>_<target_ext>
++  TRACE_PATH:=$(call get_trace_path,/traces_$(TARGET)_$(TARGETEXT))
++  ifneq ($(TRACE_PATH),)
++    # set project name as <target_name>_<target_ext> instead of <mmp_name>
++    # to trick old TCom into finding the path.
++    OLDTC_TRACE_PRJNAME:=$(TARGET)_$(TARGETEXT)
++  else
++    # traces_<target_name>_<target_type>
++    TRACE_PATH:=$(call get_trace_path,/traces_$(TARGET)_$(TARGETTYPE))
++    ifneq ($(TRACE_PATH),)
++      # set project name as <target_name>_<target_type> instead of <mmp_name>
++      # to trick old TCom into finding the path.
++      OLDTC_TRACE_PRJNAME:=$(TARGET)_$(TARGETTYPE)
++    else
++      # traces_<mmp_name>
++      TRACE_PATH:=$(call get_trace_path,/traces_$(TRACE_PRJNAME))
++   
++      # traces
++      ifeq ($(TRACE_PATH),)
++       TRACE_PATH:=$(call get_trace_path,/traces)
++      endif
++    endif
++  endif
  endif
  
-+# if not found look for .*/traces_<target_name>_<target_type>
-+ifeq ($(TRACE_PATH),)
-+TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces_$(TARGET)_$(TARGETTYPE),$(DIR))))
-+# set project name as <target_name>_<target_type> instead of <mmp_name>
-+TRACE_PRJNAME:=$(TARGET)_$(TARGETTYPE)
-+endif
 +
 +# initialise (so what output will be correct if we don't actually run the TC)
 +TRACE_DICTIONARY:=
 +AUTOGEN_HEADER:=
-+
-+$(if $(FLMDEBUG),$(info <debug>TRACE_PATH = $(TRACE_PATH)</debug>))
++$(if $(FLMDEBUG),$(info <debug>TRACE_PATH='$(TRACE_PATH)'   TRACE_RELEASABLE_ID='$(TRACE_RELEASABLE_ID)'</debug>))
 +
  # Run trace compiler only if TRACE_PATH exists
  ifneq ($(TRACE_PATH),)
- TRACE_MARKER:=$(TRACE_MARKER_PATH)/tracecompile_$(TRACE_PRJNAME)_$(UID_TC).done
-@@ -37,14 +65,24 @@
+-TRACE_MARKER:=$(TRACE_MARKER_PATH)/tracecompile_$(TRACE_PRJNAME)_$(UID_TC).done
++TRACE_MARKER:=$(TRACE_MARKER_PATH)/tracecompile_$(TRACE_RELEASABLE_ID)_$(UID_TC).done
+ TRACE_HEADERS:=
+ 
+-TRACE_SOURCE_LIST:=$(TRACE_MARKER_PATH)/tracecompile_$(TRACE_PRJNAME)_$(UID_TC).sourcelist
++TRACE_SOURCE_LIST:=$(TRACE_MARKER_PATH)/tracecompile_$(TRACE_RELEASABLE_ID)_$(UID_TC).sourcelist
++TRACE_VARIANT_SOURCE_LIST:=$(OUTPUTPATH)/$(VARIANTPLATFORM)/$(VARIANTTYPE)/tracecompile_$(TRACE_RELEASABLE_ID)_$(UID_TC).sourcelist
++
++# The sourcelist_grouped_write macro allows us to construct a source list file, 10 objects at a time
++# to avoid limits on argument lengths and sizes on Windows.
++# $1 = list of source files
++# $2 = ">" or ">>" i.e. for creating the file.
++define sourcelist_grouped_write
++	$(call startrule,sourcelist_write) \
++	$(if $1,echo -en '$(subst $(CHAR_SPACE),\n,$(strip $(wordlist 1,10,$1)))\n' $2 $$@,true) \
++	$(call endrule,sourcelist_write) 
++	$(if $1,$(call sourcelist_grouped_write,$(wordlist 11,$(words $1),$1),>>),)
++endef
++
++# Write the list of sources for this variant to a file
++# Make the combined sourcelist for this target depend on it
++# It's all to do with how make treats this file when it 
++# does exist. We are forcing it evaluate the target rule here 
++# even if the file is in place by making it PHONY. In other 
++# words, this is forcing the variant source list to always 
++# be written but later on we might not write to the combined 
++# source list if it isn't going to change.
++define sourcelist_write
++$(TRACE_SOURCE_LIST): $(TRACE_VARIANT_SOURCE_LIST)
+ 
+-# 1. Append to or create the list of source files for trace compiler to process
+-# 2. Check if the hash in trace marker remain unchanged. If not, remove marker so trace compiler will run again. 
+-X:=$(shell set -x ; $(GNUMKDIR) -p $(TRACE_MARKER_PATH) ; $(GNUTOUCH) $(TRACE_SOURCE_LIST) ; echo -e "$(subst $(CHAR_SPACE),\\n,$(SOURCE))" | $(GNUSORT) -u $(TRACE_SOURCE_LIST) - > $(TRACE_SOURCE_LIST).tmp && $(GNUMV) $(TRACE_SOURCE_LIST).tmp $(TRACE_SOURCE_LIST) ; $(GNUMD5SUM) -c $(TRACE_MARKER) || $(GNURM) $(TRACE_MARKER))
++.PHONY:: $(TRACE_VARIANT_SOURCE_LIST)
+ 
+-$(if $(FLMDEBUG),$(info <debug>Trace Compiler sourcelist generation output: $(X)</debug>))
++$(TRACE_VARIANT_SOURCE_LIST): $(SOURCE) 
++	$(call sourcelist_grouped_write,$(SOURCE),>)
++
++endef
++
++$(eval $(sourcelist_write))
++$(eval $(call GenerateStandardCleanTarget,$(TRACE_VARIANT_SOURCE_LIST),,))
++
++
++$(if $(FLMDEBUG),$(info <debug>Trace Compiler SOURCES: $(SOURCE)</debug>))
  
  $(TRACE_MARKER) : $(SOURCE)
  
@@ -6762,49 +7373,130 @@
  ifeq ($(GUARD_$(call sanitise,$(TRACE_MARKER))),)
  GUARD_$(call sanitise,$(TRACE_MARKER)):=1
  
++$(if $(FLMDEBUG),$(info <debug>PAST MARKER='$(TRACE_RELEASABLE_ID)'</debug>))
 +# The trace compiler likes to change . into _ so we must do the same in the case of mmps with a name like
 +# fred.prd.mmp we want fred_prd
 +TRACE_PRJNAME_SANITISED:=$(subst .,_,$(TRACE_PRJNAME))
-+
-+TRACE_DICTIONARY:=$(EPOCROOT)/epoc32/ost_dictionaries/$(TRACE_PRJNAME_SANITISED)_0x$(UID_TC)_Dictionary.xml
-+AUTOGEN_HEADER:=$(EPOCROOT)/epoc32/include/internal/SymbianTraces/autogen/$(TRACE_PRJNAME_SANITISED)_0x$(UID_TC)_TraceDefinitions.h
++OLDTC_TRACE_PRJNAME_SANITISED:=$(subst .,_,$(OLDTC_TRACE_PRJNAME))
++
 +
  JAVA_COMMAND:=$(SBS_JAVATC)
  TRACE_COMPILER_PATH:=$(EPOCROOT)/epoc32/tools
- TRACE_COMPILER_START:=-classpath $(TRACE_COMPILER_PATH)/tracecompiler com.nokia.tracecompiler.TraceCompiler
+-TRACE_COMPILER_START:=-classpath $(TRACE_COMPILER_PATH)/tracecompiler com.nokia.tracecompiler.TraceCompiler
  
 -TRACE_HEADERS:=$(foreach SRC,$(SOURCE),$(TRACE_PATH)/$(basename $(notdir $(SRC)))Traces.h)
- 
++# declare the trace_compile macro but only do it once in the build
++ifeq ($(trace_compile),)
+ 
++# Find out which macro to declare - the one supporting the new CLI 
++# or the old one.  First try to find TraceCompilerMain.class 
++# If it is there then it might be the new posix-like interface
++TRACE_VER:=
++TRACE_VSTR:=
++
++TCClass:=$(wildcard  $(TRACE_COMPILER_PATH)/tracecompiler/com/nokia/tracecompiler/TraceCompilerMain.class)
++ifneq ($(TCClass),) 
++# Get the version string from the TC (assume it's the new one)
++TRACE_COMPILER_START:=-classpath $(TRACE_COMPILER_PATH)/tracecompiler com.nokia.tracecompiler.TraceCompilerMain
++TRACE_VSTR:=$(firstword $(subst TraceCompiler version ,,$(shell $(JAVA_COMMAND) $(TRACE_COMPILER_START) --version)))
++# check if it looks like a version that supports the new cli interface: supporting up to verion 9 in the future.
++TRACE_VER:=$(findstring new,$(foreach version,2 3 4 5 6 7 8 9,$(patsubst $(version).%,new,$(TRACE_VSTR))))
++endif
++$(if $(FLMDEBUG),$(info <debug>TRACE_VSTR=$(TRACE_VSTR) TRACE_VER=$(TRACE_VER)</debug>))
++
++
++# 0. Generate a combined sourcelist from all variants. 
++# 0.1 Write the combined list to a temporary file
++# 0.2 Check if there are new files since the last build
++#      md5 stored in the trace marker.
++# 0.3 Rewrite the combined sourcelist if new sourcefiles have appeared
++#      since the last build
  # 1. Use pipe to send inputs to trace compiler to process
  # 2. Create a hash regarding to source names and put it in marker.
-@@ -56,18 +94,21 @@
+ # 3. Show source names that are processed by trace compiler
++
++ifeq ($(TRACE_VER),new)
++define trace_compile
++
++$(TRACE_SOURCE_LIST):
++	$(call startrule,sourcelist_combine) \
++	$(GNUCAT) $(TRACE_SOURCE_LIST) $$^ 2>/dev/null | $(GNUSORT) -u > $$@.new && \
++	$(GNUMD5SUM) -c $(TRACE_MARKER) 2>/dev/null ||  \
++	  $(GNUCP) $$@.new $$@ \
++	$(call endrule,sourcelist_combine)
++
++$(TRACE_MARKER) : $(PROJECT_META) $(TRACE_SOURCE_LIST)
++	$(call startrule,tracecompile) \
++	( $(GNUCAT) $(TRACE_SOURCE_LIST); \
++	  echo -en "*ENDOFSOURCEFILES*\n" ) | \
++	$(JAVA_COMMAND) $(TRACE_COMPILER_START) $(if $(FLMDEBUG),-d,) --uid=$(UID_TC) --project=$(TRACE_PRJNAME) --mmp=$(PROJECT_META) --traces=$(TRACE_PATH) &&  \
++	$(GNUMD5SUM) $(TRACE_SOURCE_LIST).new > $$@ 2>/dev/null && \
++	{ $(GNUTOUCH) $(TRACE_DICTIONARY) $(AUTOGEN_HEADER); \
++	 $(GNUCAT) $(TRACE_SOURCE_LIST) ; true ; } \
++	$(call endrule,tracecompile)
++endef
++
++else # Old inteface
++TRACE_COMPILER_START:=-classpath $(TRACE_COMPILER_PATH)/tracecompiler com.nokia.tracecompiler.TraceCompiler
++
+ define trace_compile
+-$(TRACE_MARKER) : $(PROJECT_META)
++
++$(TRACE_SOURCE_LIST):
++	$(call startrule,sourcelist_combine) \
++	$(GNUCAT) $(TRACE_SOURCE_LIST) $$^ 2>/dev/null | $(GNUSORT) -u > $$@.new && \
++	$(GNUMD5SUM) -c $(TRACE_MARKER) 2>/dev/null ||  \
++	  $(GNUCP) $$@.new $$@ \
++	$(call endrule,sourcelist_combine)
++
++$(TRACE_MARKER) : $(PROJECT_META) $(TRACE_SOURCE_LIST)
+ 	$(call startrule,tracecompile) \
+-	( echo -en "$(TRACE_PRJNAME)\n$(PROJECT_META)\n"; \
++	( echo -en "$(OLDTC_TRACE_PRJNAME)\n$(PROJECT_META)\n"; \
  	  $(GNUCAT) $(TRACE_SOURCE_LIST); \
  	  echo -en "*ENDOFSOURCEFILES*\n" ) | \
  	$(JAVA_COMMAND) $(TRACE_COMPILER_START) $(UID_TC) && \
 -	$(GNUMD5SUM) $(TRACE_SOURCE_LIST) > $(TRACE_MARKER) ; \
 -	$(GNUCAT) $(TRACE_SOURCE_LIST) \
-+	$(GNUMD5SUM) $(TRACE_SOURCE_LIST) > $(TRACE_MARKER) && \
++	$(GNUMD5SUM) $(TRACE_SOURCE_LIST).new > $$@ 2>/dev/null && \
 +	{ $(GNUTOUCH) $(TRACE_DICTIONARY) $(AUTOGEN_HEADER); \
 +	 $(GNUCAT) $(TRACE_SOURCE_LIST) ; true ; } \
  	$(call endrule,tracecompile)
  endef
  
++# End - new/old trace compiler
++endif
++
++# End - tracecompile is defined
++endif
++
++ifeq ($(TRACE_VER),new)
++TRACE_DICTIONARY:=$(EPOCROOT)/epoc32/ost_dictionaries/$(TRACE_PRJNAME_SANITISED)_0x$(UID_TC)_Dictionary.xml
++AUTOGEN_HEADER:=$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/$(TRACE_PRJNAME_SANITISED)_0x$(UID_TC)_TraceDefinitions.h
++else
++TRACE_DICTIONARY:=$(EPOCROOT)/epoc32/ost_dictionaries/$(OLDTC_TRACE_PRJNAME_SANITISED)_0x$(UID_TC)_Dictionary.xml
++AUTOGEN_HEADER:=$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/$(OLDTC_TRACE_PRJNAME_SANITISED)_0x$(UID_TC)_TraceDefinitions.h
++endif
++
  $(eval $(trace_compile))
  
 -$(eval $(call GenerateStandardCleanTarget,$(TRACE_HEADERS) $(TRACE_PATH)/tracebuilder.cache $(TRACE_MARKER) $(TRACE_SOURCE_LIST),,))
 +$(eval $(call GenerateStandardCleanTarget, $(TRACE_PATH)/tracebuilder.cache $(TRACE_MARKER) $(TRACE_SOURCE_LIST),,))
  
- # End sanity guard
+-# End sanity guard
++$(call makepath,$(TRACE_PATH) $(dir $(TRACE_DICTIONARY) $(AUTOGEN_HEADER)))
++# End  - guard that prevents repeated calls to TCom
  endif
  
 +$(eval $(call GenerateStandardCleanTarget,$(TRACE_HEADERS),,))
 +
++# End - Nothing to trace (not trace path in include)
  else
  # Indicate to following parts of the FLM that we actually won't run
  # trace compiler so they can set dependencies accordingly.
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/win32dll.flm /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/win32dll.flm
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/win32dll.flm	2010-05-18 19:32:34.753348601 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/win32dll.flm	2010-05-17 18:47:53.072842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/win32dll.flm	2010-06-04 12:09:25.007850000 +0100
 @@ -30,5 +30,5 @@
  include $(FLMHOME)/win32.flm
  
@@ -6814,7 +7506,7 @@
  endif
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/win32.flm /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/win32.flm
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/win32.flm	2010-05-18 19:32:34.749348513 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/win32.flm	2010-05-17 18:47:53.072842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/win32.flm	2010-06-04 12:09:25.007850000 +0100
 @@ -1,4 +1,4 @@
 -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
 +# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
@@ -6861,7 +7553,15 @@
    CFLAGS:=$(CFLAGS) $(OPT.DEPEND)
  endif
  
-@@ -197,7 +205,7 @@
+@@ -191,13 +199,14 @@
+ endif
+ 
+ 
+-BINTARGET:=$(BINDIR)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
++TARGETEXT:=$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
++BINTARGET:=$(BINDIR)/$(TARGET).$(TARGETEXT)
+ 
+ 
  # Run trace compiler #####################################
  TRACE_MARKER_PATH:=$(OUTPUTPATH)
  
@@ -6870,15 +7570,26 @@
    ifeq ($(UID2),)
      USE_TRACE_COMPILER:=
    else
-@@ -211,6 +219,7 @@
+@@ -210,7 +219,9 @@
+ # USE_TRACE_COMPILER defaults to blank in Raptor config.
  # Users can turn TC on by setting it to 1 in user config.
  ifneq ($(USE_TRACE_COMPILER),) 
++  # TARGETEXT must be set before here
    include $(FLMHOME)/tracecompiler.mk
 +  TC_RELEASABLES:=$(TRACE_DICTIONARY) $(AUTOGEN_HEADER)
  endif
  
  
-@@ -243,7 +252,6 @@
+@@ -218,7 +229,7 @@
+ ## IMPORT LIBRARY ##
+ ####################
+ 
+-IMPORTLIBLINKAS:=$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
++IMPORTLIBLINKAS:=$(TARGET).$(TARGETEXT)
+ # LINKAS, if supplied, only applies to IMPLIB TARGETTYPEs
+ ifeq ($(BASE_TYPE),importlib)
+   ifneq ($(LINKAS),)
+@@ -243,7 +254,6 @@
  ifeq ($(SUPPORTS_IMPORT_LIBRARY),1)
    ifneq ($(NOEXPORTLIBRARY),1)
      ifneq ($(TARGET_$(call sanitise,$(IMPORTLIBTARGET))),1)
@@ -6886,15 +7597,19 @@
        RELEASABLES:=$(RELEASABLES) $(if $(or $(EXPORTUNFROZEN),$(DEFFILE)),$(IMPORTLIBTARGET))
  
        # import libraries are generated to the UDEB release directory
-@@ -290,7 +298,6 @@
-     BINTARGETSTATICLINK:=$(BINDIRSTATICLINK)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
+@@ -287,10 +297,9 @@
+   #############
+ 
+   ifeq ($(COPY_FOR_STATIC_LINKAGE),1)
+-    BINTARGETSTATICLINK:=$(BINDIRSTATICLINK)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
++    BINTARGETSTATICLINK:=$(BINDIRSTATICLINK)/$(TARGET).$(TARGETEXT)
    endif
  
 -  CLEANTARGETS:=$(CLEANTARGETS) $(BINTARGET) $(BINTARGETSTATICLINK)
    RELEASABLES:=$(RELEASABLES) $(BINTARGET) $(BINTARGETSTATICLINK)
  
    # work on a local source files list
-@@ -368,20 +375,21 @@
+@@ -368,20 +377,21 @@
      $(eval DEPENDFILENAME:=$(call mapwin32file,$(1),.o.d))
      $(eval DEPENDFILE:=$(wildcard $(DEPENDFILENAME)))
  
@@ -6923,7 +7638,7 @@
          -include $(DEPENDFILE)
        endif
      endif
-@@ -412,24 +420,28 @@
+@@ -412,24 +422,28 @@
    STDMWCINCLUDEPATHS:=$(if $(MWCSym2Includes),$(MWCSym2Includes),$(MWCSYM2INCLUDES))
  
    define win32resourcecompile
@@ -6959,7 +7674,7 @@
          -include $(DEPENDFILE)
        endif
      endif
-@@ -463,7 +475,6 @@
+@@ -463,7 +477,6 @@
        # link map file (urel only)
        ifeq ($(VARIANTTYPE),urel)
          MAP:=$(OPT.MAP)$(BINTARGET).map
@@ -6967,7 +7682,25 @@
          RELEASABLES:=$(RELEASABLES) $(BINTARGET).map
        endif
      endif
-@@ -677,12 +688,11 @@
+@@ -524,7 +537,7 @@
+     TMP_IMPLIB:=$(BLDDIR)/$(TARGET).lib
+     TMP_INFFILE:=$(BLDDIR)/$(TARGET).inf
+     TMP_SYMFILE:=$(if $(OPEN_ENVIRONMENT),$(BLDDIR)/$(TARGET).sym,)
+-    TMP_TARGET:=$(BLDDIR)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
++    TMP_TARGET:=$(BLDDIR)/$(TARGET).$(TARGETEXT)
+     TMP_DEFFILE:=$(BLDDIR)/$(TARGET).def
+ 
+     CLEANTARGETS:=$(CLEANTARGETS) $(TMP_IMPLIB) $(TMP_INFFILE) $(TMP_TARGET) $(TMP_DEFFILE) $(TMP_SYMFILE)
+@@ -565,7 +578,7 @@
+ 		$(call groupin10,$(notdir $(OBJECTFILES))) ;
+ 	    $(call startrule,win32stageonelink) \
+ 	    $(if $(SUPPORTS_STDCPP_NEWLIB),$(if $(STATICLIBFILES),$(CHECKLIB) $(CHECKLIB_TYPE) $(OPT.CHECKLIB.WIN32) $(STATICLIBFILES) &&,),) \
+-	    MWSym2LibraryFiles="$(MWSym2LibraryFiles)" $(LD) $(LFLAGS) $(OPT.MENTRYPOINT)$(ENTRYSYMBOL) $(OPT.EXPORT)$(EXPORT_TYPE) $(OPT.NOCOMPACTIMPORTLIB) $(OPT.ADDCOMMAND) "out:$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))" $(OPT.WARNINGS) off $(OPT.IMPLIB)"$(TMP_IMPLIB)" $(OPT.OUT)"$(TMP_TARGET)" $(LINKER_FIRSTSTATLIBFILE) $(NEWLIBFILE) $(WIN32_LIBRARIES) $(STATICLIBFILES) $(LINKLIBFILES) $(OPT.LIBPATH)$(BLDDIR) $(OPT.SEARCH) @$(OBJECTFILES_LRF) \
++	    MWSym2LibraryFiles="$(MWSym2LibraryFiles)" $(LD) $(LFLAGS) $(OPT.MENTRYPOINT)$(ENTRYSYMBOL) $(OPT.EXPORT)$(EXPORT_TYPE) $(OPT.NOCOMPACTIMPORTLIB) $(OPT.ADDCOMMAND) "out:$(TARGET).$(TARGETEXT)" $(OPT.WARNINGS) off $(OPT.IMPLIB)"$(TMP_IMPLIB)" $(OPT.OUT)"$(TMP_TARGET)" $(LINKER_FIRSTSTATLIBFILE) $(NEWLIBFILE) $(WIN32_LIBRARIES) $(STATICLIBFILES) $(LINKLIBFILES) $(OPT.LIBPATH)$(BLDDIR) $(OPT.SEARCH) @$(OBJECTFILES_LRF) \
+ 	    $(call endrule,win32stageonelink)
+     endef
+     $(eval $(win32stageonelink))
+@@ -677,12 +690,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)
@@ -6986,7 +7719,7 @@
 Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm: win32pdll.flm
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/win32plugin.flm /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/win32plugin.flm
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/lib/flm/win32plugin.flm	2010-05-18 19:32:34.753348601 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/win32plugin.flm	2010-05-17 18:47:53.076842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/lib/flm/win32plugin.flm	2010-06-04 12:09:25.011850000 +0100
 @@ -1,4 +1,4 @@
 -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
 +# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
@@ -7024,7 +7757,7 @@
 Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor: notes
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/filter_interface.py /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/filter_interface.py
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/filter_interface.py	2010-05-18 19:32:34.785348756 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/filter_interface.py	2010-05-17 18:47:53.080842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/filter_interface.py	2010-06-04 12:09:25.019850000 +0100
 @@ -18,7 +18,7 @@
  
  class Filter(object):
@@ -7124,9 +7857,89 @@
 +	
 +
 +# the end
+diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/filter_list.py /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/filter_list.py
+--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/filter_list.py	2010-05-18 19:32:34.785348756 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/filter_list.py	2010-06-04 12:09:25.019850000 +0100
+@@ -1,5 +1,5 @@
+ #
+-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
++# Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
+ # All rights reserved.
+ # This component and the accompanying materials are made available
+ # under the terms of the License "Eclipse Public License v1.0"
+@@ -19,6 +19,7 @@
+ import os
+ import sys
+ import raptor
++import re
+ import filter_interface
+ import pluginbox
+ import traceback
+@@ -64,7 +65,23 @@
+ 		"""Nothing to do for stdout"""
+ 		return True
+ 
++def SplitList(listString):
++	"""turn a CLI filter string into a list of (class, param) pairs.
+ 
++	for example, "foo[a,b],bar[c,d]"
++	
++	becomes [ ("foo", ["a","b"]) , ("bar", ["c","d"]) ]
++	"""
++	matches = re.findall("(\w+)(\[([^\[\]]*)\])?,?", listString)
++	
++	pairs = []
++	for m in matches:
++		classname = m[0]
++		if len(m[2]) > 0:
++			pairs.append( (classname, m[2].split(",")) )
++		else:
++			pairs.append( (classname, []) )
++	return pairs
+ 
+ class FilterList(filter_interface.Filter):
+ 
+@@ -81,14 +98,31 @@
+ 		# Find all the filter plugins
+ 		self.pbox = pbox
+ 		possiblefilters = self.pbox.classesof(filter_interface.Filter)
++		filterdict = {}
++		for p in possiblefilters:
++			name = p.__name__.lower()
++			if name in filterdict:
++				raise ValueError("filters found in SBS_HOME/python/plugins which have duplicate name: %s " % p.__name__)
++			else:
++				filterdict[name] = p
++		
++		# turn "filternames" into a list of (classname, parameters) pairs
++		filterCalls = SplitList(filternames)
++		
++		# look for each filter class in the box
+ 		unfound = []
+ 		self.filters = []
+-		for f in filternames:
+-			unfound.append(f) # unfound unless we find it
+-			for pl in possiblefilters:
+-				if pl.__name__.upper() == f.upper():
+-					self.filters.append(pl())
+-					unfound = unfound[:-1]
++		for (f, params) in filterCalls:
++			# if the filter exists and is a valid filter use it
++			if f.lower() in filterdict:
++				if params:
++					self.filters.append(filterdict[f.lower()](params))
++				else:
++					self.filters.append(filterdict[f.lower()]())
++			else:
++				# record missing filters
++				unfound.append(f)
++
+ 		if unfound != []:
+ 			raise ValueError("requested filters not found: %s \
+ 			\nAvailable filters are: %s" % (str(unfound), self.format_output_list(possiblefilters)))
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/filter_utils.py /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/filter_utils.py
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/filter_utils.py	2010-05-18 19:32:34.785348756 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/filter_utils.py	2010-05-17 18:47:53.080842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/filter_utils.py	2010-06-04 12:09:25.019850000 +0100
 @@ -198,12 +198,16 @@
  	def isError(self, aLine):
  		"""Convenience matcher for basic errors.
@@ -7172,7 +7985,7 @@
 +		return False
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/generic_path.py /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/generic_path.py
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/generic_path.py	2010-05-18 19:32:34.785348756 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/generic_path.py	2010-05-17 18:47:53.084842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/generic_path.py	2010-06-04 12:09:25.019850000 +0100
 @@ -1,5 +1,5 @@
  #
 -# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -7227,7 +8040,7 @@
  
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/mmpparser.py /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/mmpparser.py
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/mmpparser.py	2010-05-18 19:32:34.785348756 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/mmpparser.py	2010-05-17 18:47:53.084842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/mmpparser.py	2010-06-04 12:09:25.019850000 +0100
 @@ -1,5 +1,5 @@
  #
 -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -7255,7 +8068,7 @@
 Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/plugins: filter_bz2log.py
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/plugins/filter_carbide.py /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/plugins/filter_carbide.py
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/plugins/filter_carbide.py	2010-05-18 19:32:34.785348756 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/plugins/filter_carbide.py	2010-05-17 18:47:53.084842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/plugins/filter_carbide.py	2010-06-04 12:09:25.023849000 +0100
 @@ -129,5 +129,4 @@
  		FilterCarbide.stdout.write("Overall Errors: %d\n" % self.__errors)
  		FilterCarbide.stdout.write("Overall Warnings: %d\n\n" % self.__warnings)
@@ -7267,7 +8080,7 @@
 Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/plugins: filter_check.py
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/plugins/filter_checksource.py /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/plugins/filter_checksource.py
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/plugins/filter_checksource.py	2010-05-18 19:32:34.785348756 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/plugins/filter_checksource.py	2010-05-17 18:47:53.084842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/plugins/filter_checksource.py	2010-06-04 12:09:25.023849000 +0100
 @@ -224,11 +224,11 @@
  				
  				# Do the check for each file 	
@@ -7293,7 +8106,7 @@
  			if not os.path.exists(path):
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/plugins/filter_clean.py /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/plugins/filter_clean.py
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/plugins/filter_clean.py	2010-05-18 19:32:34.785348756 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/plugins/filter_clean.py	2010-05-17 18:47:53.084842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/plugins/filter_clean.py	2010-06-04 12:09:25.023849000 +0100
 @@ -51,17 +51,23 @@
  		
  			if self.removeTargets:
@@ -7397,9 +8210,11 @@
 -
  # the end				
  
+Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/plugins: filter_component.py
+Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/plugins: filter_copyfile.py
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/plugins/filter_logfile.py /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/plugins/filter_logfile.py
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/plugins/filter_logfile.py	2010-05-18 19:32:34.785348756 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/plugins/filter_logfile.py	2010-05-17 18:47:53.088843000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/plugins/filter_logfile.py	2010-06-04 12:09:25.023849000 +0100
 @@ -16,6 +16,7 @@
  # Will ultimately do everything that scanlog does
  #
@@ -7419,7 +8234,7 @@
  					return False
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/plugins/filter_splitlog.py /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/plugins/filter_splitlog.py
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/plugins/filter_splitlog.py	2010-05-18 19:32:34.785348756 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/plugins/filter_splitlog.py	2010-05-17 18:47:53.088843000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/plugins/filter_splitlog.py	2010-06-04 12:09:25.027850000 +0100
 @@ -16,6 +16,7 @@
  # Will ultimately do everything that scanlog does
  #
@@ -7440,7 +8255,7 @@
 Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/plugins: filter_tagcount.py
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/plugins/filter_terminal.py /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/plugins/filter_terminal.py
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/plugins/filter_terminal.py	2010-05-18 19:32:34.789348356 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/plugins/filter_terminal.py	2010-05-17 18:47:53.088843000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/plugins/filter_terminal.py	2010-06-04 12:09:25.027850000 +0100
 @@ -1,5 +1,5 @@
  #
 -# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -7579,7 +8394,7 @@
 Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/plugins: filter_whatcomp.py
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/plugins/filter_what.py /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/plugins/filter_what.py
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/plugins/filter_what.py	2010-05-18 19:32:34.789348356 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/plugins/filter_what.py	2010-05-17 18:47:53.088843000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/plugins/filter_what.py	2010-06-04 12:09:25.027850000 +0100
 @@ -1,5 +1,5 @@
  #
 -# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -7656,7 +8471,20 @@
  		self.what = build_parameters.doWhat
  
  		self.outfile = sys.stdout
-@@ -78,6 +107,11 @@
+@@ -63,12 +92,6 @@
+ 		# when --check and --what are called
+ 		self.repetitions = {}
+ 		
+-		"Regex for old what output"
+-		if "win" in self.buildparameters.platform:
+-			self.regex = re.compile("^[a-zA-Z]:\S+$")
+-		else:
+-			self.regex = re.compile("^/\S+$")
+-		
+ 		"Regex for targets"
+ 		self.target_regex = re.compile("^<(build|stringtable|resource|bitmap)>.*")
+ 			
+@@ -78,6 +101,11 @@
  		"Regex for zip exports"
  		self.zip_export_regex = re.compile("^<member>.*")
  		
@@ -7668,7 +8496,7 @@
  		self.ok = True		
  		return self.ok
  	
-@@ -87,10 +121,22 @@
+@@ -87,13 +115,21 @@
  		for line in text.splitlines():
  			line = line.rstrip()
  			
@@ -7687,11 +8515,13 @@
  				self.repetitions[line] = 0
  				
  			if self.repetitions[line] == 0:
-+				
- 				if self.regex.match(line) and (self.what or self.check):
- 					"Print the whole line"
- 					self.print_file(line, (-1), len(line))
-@@ -116,10 +162,34 @@
+-				if self.regex.match(line) and (self.what or self.check):
+-					"Print the whole line"
+-					self.print_file(line, (-1), len(line))
+ 					
+ 				if self.target_regex.match(line):
+ 					"Grab the filename between <build> and </build>" 
+@@ -116,10 +152,34 @@
  					
  					self.print_file(line, start, end)
  						
@@ -7726,10 +8556,11 @@
  	def close(self):
  		if self.outfile_close:
  			self.outfile.close()
+Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python: raptor_api.py
 Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python: raptor_buildplatform.py
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/raptor_cache.py /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/raptor_cache.py
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/raptor_cache.py	2010-05-18 19:32:34.789348356 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/raptor_cache.py	2010-05-17 18:47:53.092842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/raptor_cache.py	2010-06-04 12:09:25.031849000 +0100
 @@ -143,7 +143,6 @@
  			self.WarnDuplicate("group", self.groups[obj.name], obj)
  			return
@@ -7764,7 +8595,7 @@
  
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/raptor_cli.py /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/raptor_cli.py
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/raptor_cli.py	2010-05-18 19:32:34.789348356 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/raptor_cli.py	2010-05-17 18:47:53.092842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/raptor_cli.py	2010-06-04 12:09:25.031849000 +0100
 @@ -1,5 +1,5 @@
  #
 -# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -7772,7 +8603,21 @@
  # All rights reserved.
  # This component and the accompanying materials are made available
  # under the terms of the License "Eclipse Public License v1.0"
-@@ -34,7 +34,7 @@
+@@ -18,13 +18,8 @@
+ # by a raptor.Raptor object.
+ #
+ 
+-import re
+ import types
+ import raptor
+-import os
+-import sys
+-import tempfile
+-from raptor_utilities import getOSPlatform
+ 
+ from optparse import OptionParser # for parsing command line parameters
+ 
+@@ -34,7 +29,7 @@
  # raptor_cli module attributes
  
  parser = OptionParser(prog = raptor.name,
@@ -7781,7 +8626,7 @@
  
  Targets:
  
-@@ -47,7 +47,7 @@
+@@ -47,7 +42,7 @@
  LIBRARY        Create import libraries from frozen .DEF files
  LISTING        Create assembler listing files for source files
  REALLYCLEAN    Same as CLEAN but also remove exported files
@@ -7790,7 +8635,7 @@
  ROMFILE        Create an IBY file to be included in a ROM
  TARGET         Create main executables
  WHAT           List all releaseable targets
-@@ -87,6 +87,9 @@
+@@ -87,6 +82,9 @@
  parser.add_option("--export-only",action="store_true",dest="doExportOnly",
  				help="Generate exports only and do not create any make files.")
  
@@ -7800,7 +8645,7 @@
  parser.add_option("-f","--logfile",action="store",dest="logfile",
  				help="Name of the log file, or '-' for stdout.")
  
-@@ -117,6 +120,9 @@
+@@ -117,6 +115,9 @@
  parser.add_option("--no-depend-include",action="store_true",dest="noDependInclude",
  				help="Do not include generated dependency files. This is only useful for extremely large non-incremental builds.")
  				
@@ -7810,7 +8655,26 @@
  parser.add_option("-o","--orderlayers",action="store_true",dest="sys_def_order_layers",
  				help="Build layers in the System Definition XML file in the order listed or, if given, in the order of -l options.")
  
-@@ -144,10 +150,15 @@
+@@ -126,6 +127,18 @@
+ parser.add_option("-q","--quiet",action="store_true",dest="quiet",
+ 				help="Run quietly, not generating output messages.")
+ 
++parser.add_option("--query",action="append",dest="query",
++				help="""Access various build settings and options using a basic API. The current options are:
++				
++				* aliases - return all the values that can be sensibly used with the sbs -c option.
++				
++				* products - return all the values that can be "." appended to an alias to specialise it for a product build.
++				
++				* config[x] - return a set of values that represent the build configuration "x". Typically "x" will be an alias name or an alias followed by "." followed by a product.
++				
++				Multiple --query options can be given.
++				""")
++
+ parser.add_option("-s","--sysdef",action="store",dest="sys_def_file",
+ 				help="System Definition XML filename.")
+ 
+@@ -144,10 +157,15 @@
  
  				  "forced" -  Check all tool versions. Don't use cached results.
  			""")
@@ -7826,11 +8690,14 @@
  					"off" - Parse bld.infs serially 
  				     """)
  
-@@ -236,12 +247,7 @@
- 
- 	# the leftover_args are either variable assignments of the form a=b
- 	# or target names.
+@@ -234,14 +252,8 @@
+ 	# parse the full set of arguments
+ 	(options, leftover_args) = parser.parse_args(expanded_args)
+ 
+-	# the leftover_args are either variable assignments of the form a=b
+-	# or target names.
 -	regex = re.compile("^(.+)=(.*)$")
++	# the leftover_args are target names.
  	for leftover in leftover_args:
 -		assignment = regex.findall(leftover)
 -		if len(assignment) > 0:
@@ -7839,7 +8706,7 @@
  			Raptor.AddTarget(leftover)
  
  	# Define the dictionary of functions to be used.
-@@ -260,11 +266,13 @@
+@@ -260,19 +272,23 @@
  				 'quiet' : Raptor.RunQuietly,
  				 'debugoutput' : Raptor.SetDebugOutput,
  				 'doExportOnly' : Raptor.SetExportOnly,
@@ -7852,8 +8719,10 @@
 +				 'noDependGenerate': Raptor.SetNoDependGenerate,
  				 'number_of_jobs': Raptor.SetJobs,
  				 'project_name' :  Raptor.AddProject,
++				 'query' : Raptor.AddQuery,
  				 'filter_list' : Raptor.FilterList,
-@@ -273,6 +281,7 @@
+ 				 'ignore_os_detection': Raptor.IgnoreOsDetection,
+ 				 'check' :  Raptor.SetCheck,
  				 'what' :  Raptor.SetWhat,
  				 'tries' : Raptor.SetTries,
  				 'toolcheck' : Raptor.SetToolCheck,
@@ -7863,7 +8732,7 @@
  				'parallel_parsing' : Raptor.SetParallelParsing,
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/raptor_data.py /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/raptor_data.py
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/raptor_data.py	2010-05-18 19:32:34.793348934 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/raptor_data.py	2010-05-17 18:47:53.096843000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/raptor_data.py	2010-06-04 12:09:25.035850000 +0100
 @@ -1,5 +1,5 @@
  #
 -# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -8444,16 +9313,30 @@
  		"""Returns a list of BuildUnits.
  
  		This function must be overridden by derived classes.
-@@ -830,6 +829,8 @@
+@@ -830,10 +829,13 @@
  
  class Variant(Model, Config):
  
-+	__slots__ = ('cache','name','host','extends','ops','variantRefs','allOperations')
++	__slots__ = ('cache','name','type','host','extends','ops','variantRefs','allOperations')
 +
  	def __init__(self, name = ""):
  		Model.__init__(self)
  		Config.__init__(self)
-@@ -868,20 +869,10 @@
+ 		self.name = name
++		self.type = ""
+ 
+ 		# Operations defined inside this variant.
+ 		self.ops = []
+@@ -854,6 +856,8 @@
+ 				self.host = value
+ 		elif name == "extends":
+ 			self.extends = value
++		elif name == "type":
++			self.type = value
+ 		else:
+ 			raise InvalidPropertyError()
+ 
+@@ -868,20 +872,10 @@
  	def Valid(self):
  		return self.name
  
@@ -8475,7 +9358,7 @@
  		"""Returns a list of all operations in this variant.
  
  		The list elements are themselves lists; the overall structure of the
-@@ -892,16 +883,16 @@
+@@ -892,16 +886,16 @@
  
  		if not self.allOperations:
  			if self.extends:
@@ -8497,7 +9380,7 @@
  
  		name = self.name
  		vars = [self]
-@@ -909,32 +900,46 @@
+@@ -909,32 +903,46 @@
  		for m in self.modifiers:
  			name = name + "." + m.name
  			vars.append(m)
@@ -8556,7 +9439,11 @@
  
  class Alias(Model, Config):
  
-@@ -946,8 +951,8 @@
+@@ -943,11 +951,12 @@
+ 		Config.__init__(self)
+ 		self.name = name
+ 		self.meaning = ""
++		self.type = ""
  		self.varRefs = []
  		self.variants = []
  
@@ -8567,12 +9454,14 @@
  
  	def SetProperty(self, key, val):
  		if key == "name":
-@@ -956,45 +961,53 @@
+@@ -956,45 +965,55 @@
  			self.meaning = val
  
  			for u in val.split("."):
 -				self.varRefs.append( VariantRef(u) )
 +				self.varRefs.append( VariantRef(ref = u) )
++		elif key == "type":
++			self.type = val
  		else:
  			raise InvalidPropertyError()
  
@@ -8635,7 +9524,7 @@
  		except KeyError:
  			raise BadReferenceError(self.ref)
  
-@@ -1018,41 +1031,39 @@
+@@ -1018,41 +1037,39 @@
  		else:
  			raise InvalidChildError()
  
@@ -8695,7 +9584,7 @@
  
  		return units
  
-@@ -1062,19 +1073,102 @@
+@@ -1062,19 +1079,102 @@
  	def __init__(self, ref=None):
  		Reference.__init__(self, ref)
  
@@ -8803,7 +9692,7 @@
  	# For use in dealing with tools that return non-ascii version strings.
  	nonascii = ""
  	identity_chartable = chr(0)
-@@ -1084,7 +1178,7 @@
+@@ -1084,7 +1184,7 @@
  		nonascii += chr(c)
  		identity_chartable += " "
  
@@ -8812,7 +9701,7 @@
  		self.name = name
  		self.command = command
  		self.versioncommand = versioncommand
-@@ -1097,7 +1191,6 @@
+@@ -1097,7 +1197,6 @@
  		# version until someone proves that it's OK
  		self.valid = False
  
@@ -8820,7 +9709,7 @@
  
  	def expand(self, toolset):
  		self.versioncommand = toolset.ExpandAll(self.versioncommand)
-@@ -1117,7 +1210,7 @@
+@@ -1117,7 +1216,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)
@@ -8829,7 +9718,7 @@
  				if testfile is None:
  					raise Exception("Can't be found in path")
  
-@@ -1127,18 +1220,20 @@
+@@ -1127,18 +1226,20 @@
  			testfile_stat = os.stat(testfile)
  			self.date = testfile_stat.st_mtime
  		except Exception,e:
@@ -8853,7 +9742,7 @@
  		except Exception,e:
  			versionoutput=None
  
-@@ -1148,12 +1243,11 @@
+@@ -1148,12 +1249,11 @@
  		versionoutput_a = versionoutput.translate(Tool.identity_chartable,"")
  
  		if versionoutput_a and self.vre.search(versionoutput_a) != None:
@@ -8868,7 +9757,7 @@
  
  def envhash(irrelevant_vars):
  	"""Determine something unique about this environment to identify it.
-@@ -1175,6 +1269,9 @@
+@@ -1175,6 +1275,9 @@
  	write() is used to flush the cache to disc.
  	"""
  	# The raptor shell - this is not mutable.
@@ -8878,7 +9767,7 @@
  	hostbinaries = os.path.join(os.environ['SBS_HOME'], 
  	                            os.environ['HOSTPLATFORM_DIR'])
  	                            
-@@ -1256,7 +1353,6 @@
+@@ -1256,7 +1359,6 @@
  								log.Info("Ignoring garbled toolcheck cache: %s (%s)\n", self.cachefilename, str(e))
  								self.__toolcheckcache = {}
  								
@@ -8886,7 +9775,7 @@
  						else:
  							log.Info("Toolcheck cache %s ignored - environment changed\n", self.cachefilename)
  					else:
-@@ -1316,8 +1412,11 @@
+@@ -1316,8 +1418,11 @@
  
  			self.log.Debug("toolcheck done: %s -key: %s" % (tool.name, tool.key))
  
@@ -8899,7 +9788,7 @@
  
  			# 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 +1455,11 @@
+@@ -1356,6 +1461,11 @@
  				self.log.Info("Could not write toolcheck cache: %s", str(e))
  		return self.valid
  
@@ -8911,7 +9800,7 @@
  
  class Evaluator(object):
  	"""Determine the values of variables under different Configurations.
-@@ -1364,11 +1468,11 @@
+@@ -1364,11 +1474,11 @@
  
  	refRegex = re.compile("\$\((.+?)\)")
  
@@ -8925,7 +9814,7 @@
  
  		specName = "none"
  		configName = "none"
-@@ -1377,14 +1481,18 @@
+@@ -1377,14 +1487,18 @@
  		opsLists = []
  
  		if buildUnit:
@@ -8947,7 +9836,7 @@
  		for opsList in opsLists:
  			for op in opsList:
  				# applying an Operation to a non-existent variable
-@@ -1394,13 +1502,20 @@
+@@ -1394,13 +1508,20 @@
  				except KeyError:
  					oldValue = ""
  
@@ -8969,7 +9858,7 @@
  
  		if self.gathertools:
  			self.tools = tools.values()
-@@ -1417,8 +1532,7 @@
+@@ -1417,8 +1538,7 @@
  			unresolved = False
  			for k, v in self.dict.items():
  				if v.find('$(' + k + ')') != -1:
@@ -8979,7 +9868,7 @@
  				else:
  					expanded = self.ExpandAll(v, specName, configName)
  
-@@ -1466,20 +1580,24 @@
+@@ -1466,20 +1586,24 @@
  
  		refs = Evaluator.refRegex.findall(value)
  
@@ -9011,7 +9900,7 @@
  
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/raptor_makefile.py /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/raptor_makefile.py
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/raptor_makefile.py	2010-05-18 19:32:34.793348934 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/raptor_makefile.py	2010-05-17 18:47:53.096843000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/raptor_makefile.py	2010-06-04 12:09:25.035850000 +0100
 @@ -134,6 +134,15 @@
  
  		return True
@@ -9042,7 +9931,7 @@
  			yield str(mf.filename)
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/raptor_make.py /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/raptor_make.py
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/raptor_make.py	2010-05-18 19:32:34.793348934 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/raptor_make.py	2010-05-17 18:47:53.096843000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/raptor_make.py	2010-06-04 12:09:25.035850000 +0100
 @@ -1,5 +1,5 @@
  #
 -# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -9050,7 +9939,7 @@
  # All rights reserved.
  # This component and the accompanying materials are made available
  # under the terms of the License "Eclipse Public License v1.0"
-@@ -20,27 +20,120 @@
+@@ -20,27 +20,123 @@
  import os
  import random
  import raptor
@@ -9103,7 +9992,10 @@
 +def AnnoFileParseOutput(annofile):
 +	""" A generator that extracts log output from an emake annotation file, 
 +	    perform an XML-unescape on it and "yields" it line by line.  """
-+	af = open(annofile, "r")
++	if isinstance(annofile,str):
++		af = open(annofile, "r")
++	else:
++		af = annofile
 +
 +	inOutput = False
 +
@@ -9176,7 +10068,7 @@
  		# look for an alias first as this gives end-users a chance to modify
  		# the shipped variant rather than completely replacing it.
  		if engine in Raptor.cache.aliases:
-@@ -48,12 +141,14 @@
+@@ -48,12 +144,14 @@
  		elif engine in Raptor.cache.variants:
  			avar = Raptor.cache.FindNamedVariant(engine)
  		else:
@@ -9194,7 +10086,20 @@
  			evaluator = Raptor.GetEvaluator( None, units[0] , gathertools=True)
  
  			# shell
-@@ -75,6 +170,25 @@
+@@ -64,6 +162,12 @@
+ 			self.talontimeout = str(evaluator.Get("TALON_TIMEOUT"))
+ 			self.talonretries = str(evaluator.Get("TALON_RETRIES"))
+ 
++			# work around for RVCT 2.2 failed compiles
++			delete_on_failed_compile_s = evaluator.Get("DELETE_ON_FAILED_COMPILE")
++			self.delete_on_failed_compile = ""
++			if delete_on_failed_compile_s is not None and delete_on_failed_compile_s != "":
++				self.delete_on_failed_compile = "1"
++
+ 			# commands
+ 			self.initCommand = evaluator.Get("initialise")
+ 			self.buildCommand = evaluator.Get("build")
+@@ -75,6 +179,25 @@
  			self.jobsOption = evaluator.Get("jobs")
  			self.defaultMakeOptions = evaluator.Get("defaultoptions")
  
@@ -9220,7 +10125,7 @@
  			# buffering
  			self.scrambled = (evaluator.Get("scrambled") == "true")
  
-@@ -101,14 +215,13 @@
+@@ -101,14 +224,13 @@
  				self.selectors = []
  
  		except KeyError:
@@ -9237,7 +10142,7 @@
  
  
  		if self.usetalon:
-@@ -123,7 +236,7 @@
+@@ -123,7 +245,7 @@
   component='$$COMPONENT_NAME'\
   bldinf='$$COMPONENT_META' mmp='$$PROJECT_META'\
   config='$$SBS_CONFIGURATION' platform='$$PLATFORM'\
@@ -9246,7 +10151,7 @@
  export TALON_RECIPEATTRIBUTES TALON_SHELL TALON_TIMEOUT
  USE_TALON:=%s
  
-@@ -135,7 +248,21 @@
+@@ -135,7 +257,21 @@
  """
  		
  
@@ -9268,11 +10173,12 @@
  # generated by %s %s
  
  HOSTPLATFORM:=%s
-@@ -143,12 +270,13 @@
+@@ -143,22 +279,49 @@
  OSTYPE:=%s
  FLMHOME:=%s
  SHELL:=%s
 +THIS_FILENAME:=$(firstword $(MAKEFILE_LIST))
++DELETE_ON_FAILED_COMPILE:=%s 
  
  %s
  
@@ -9283,7 +10189,9 @@
  			 " ".join(raptor.hostplatform),
  			 raptor.hostplatform_dir,
  			 self.raptor.filesystem,
-@@ -157,8 +285,32 @@
+ 			 str(self.raptor.systemFLM),
+ 			 self.shellpath,
++			 self.delete_on_failed_compile,
  			 talon_settings,
  			 self.raptor.systemFLM.Append('globals.mk') )
  
@@ -9295,11 +10203,11 @@
 +$(FLMHOME)/user/final.mk:
 +$(FLMHOME)/user/default.flm:
 +$(FLMHOME)/user/globals.mk:
-+
+ 
+-		self.makefile_epilogue = """
 +.DEFAULT::
 +	@echo "<warning>Missing dependency detected: $@</warning>"
- 
--		self.makefile_epilogue = """
++
 +"""
 +
 +		# Only output timings if requested on CLI
@@ -9317,7 +10225,7 @@
  
  include %s
  
-@@ -168,14 +320,17 @@
+@@ -168,14 +331,17 @@
  		"""Generate a set of makefiles, or one big Makefile."""
  
  		if not self.valid:
@@ -9337,7 +10245,7 @@
  										   selectors = self.selectors,
  										   filenamebase = str(toplevel.File()),
  										   prologue = self.makefile_prologue,
-@@ -190,11 +345,10 @@
+@@ -190,11 +356,10 @@
  			self.many = not self.raptor.writeSingleMakefile
  
  			# add a makefile for each spec under each config
@@ -9351,7 +10259,7 @@
  
  				# make sure the config_wide spec item is put out first so that it
  				# can affect everything.
-@@ -207,16 +361,22 @@
+@@ -207,16 +372,22 @@
  						ordered_specs.append(s)
  
  				if config_wide_spec is not None:
@@ -9378,7 +10286,7 @@
  
  
  	def WriteConfiguredSpec(self, parentMakefileSet, spec, config, useAllInterfaces):
-@@ -233,9 +393,10 @@
+@@ -233,9 +404,10 @@
  		guard = None
  		if hasInterface:
  			# find the Interface (it may be a ref)
@@ -9391,7 +10299,7 @@
  				self.raptor.Error("No interface for '%s'", spec.name)
  				return
  
-@@ -268,12 +429,12 @@
+@@ -268,12 +440,12 @@
  				md5hash.update(value)
  
  			# parameters required by the interface
@@ -9406,7 +10314,7 @@
  				for k,v in evaluator.ResolveMatching(g.patternre):
  					addparam(k,v,g.default)
  
-@@ -301,7 +462,7 @@
+@@ -301,7 +473,7 @@
  
  		# generate the call to the FLM
  		if iface is not None:
@@ -9415,7 +10323,7 @@
  
  		# recursive includes
  
-@@ -341,7 +502,7 @@
+@@ -341,7 +513,7 @@
  				return False
  
  		# Save file names to a list, to allow the order to be reversed
@@ -9424,7 +10332,7 @@
  
  		# Iterate through args passed to raptor, searching for CLEAN or REALLYCLEAN
  		clean_flag = False
-@@ -354,6 +515,9 @@
+@@ -354,6 +526,9 @@
  		if clean_flag:
  			fileName_list.reverse()
  
@@ -9434,7 +10342,7 @@
  		# Process each file in turn
  		for makefile in fileName_list:
  			if not os.path.exists(makefile):
-@@ -364,7 +528,7 @@
+@@ -364,7 +539,7 @@
  			command = self.buildCommand
  
  			if self.makefileOption:
@@ -9443,7 +10351,7 @@
  
  			if self.raptor.keepGoing and self.keepGoingOption:
  				command += " " + self.keepGoingOption
-@@ -377,12 +541,20 @@
+@@ -377,12 +552,20 @@
  			command += " " + self.defaultMakeOptions
  			# Can supply options on the commandline to override default settings.
  			if len(self.raptor.makeOptions) > 0:
@@ -9466,7 +10374,7 @@
  			if self.usetalon:
  				# use the descrambler if we set it up
  				command += ' TALON_DESCRAMBLE=' 
-@@ -401,7 +573,7 @@
+@@ -401,7 +584,7 @@
  
  			# targets go at the end, if the makefile supports them
  			addTargets = self.raptor.targets[:]
@@ -9475,7 +10383,7 @@
  			if addTargets and ignoreTargets:
  				for target in self.raptor.targets:
  					if re.match(ignoreTargets, target):
-@@ -410,6 +582,23 @@
+@@ -410,6 +593,23 @@
  			if addTargets:
  				command += " " + " ".join(addTargets)
  
@@ -9499,7 +10407,7 @@
  			self.raptor.Info("Executing '%s'", command)
  
  			# execute the build.
-@@ -417,6 +606,10 @@
+@@ -417,6 +617,10 @@
  			# bufsize=1 means "line buffered"
  			#
  			try:
@@ -9510,7 +10418,7 @@
  				makeenv=os.environ.copy()
  				if self.usetalon:
  					makeenv['TALON_RECIPEATTRIBUTES']="none"
-@@ -423,28 +616,55 @@
+@@ -423,28 +627,55 @@
  					makeenv['TALON_SHELL']=self.talonshell
  					makeenv['TALON_BUILDID']=str(self.buildID)
  					makeenv['TALON_TIMEOUT']=str(self.talontimeout)
@@ -9573,7 +10481,7 @@
  				if returncode != 0  and not self.raptor.keepGoing:
  					self.Tidy()
  					return False
-@@ -452,6 +672,9 @@
+@@ -452,6 +683,9 @@
  			except Exception,e:
  				self.raptor.Error("Exception '%s' during '%s'", str(e), command)
  				self.Tidy()
@@ -9583,7 +10491,7 @@
  				return False
  
  		# run any shutdown script
-@@ -496,7 +719,7 @@
+@@ -496,7 +730,7 @@
  			looking = (os.system(command) != 0)
  			tries += 1
  		if looking:
@@ -9594,7 +10502,7 @@
  		
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/raptor_meta.py /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/raptor_meta.py
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/raptor_meta.py	2010-05-18 19:32:34.793348934 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/raptor_meta.py	2010-05-17 18:47:53.100842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/raptor_meta.py	2010-06-04 12:09:25.039849000 +0100
 @@ -1,5 +1,5 @@
  #
 -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -9602,7 +10510,7 @@
  # All rights reserved.
  # This component and the accompanying materials are made available
  # under the terms of the License "Eclipse Public License v1.0"
-@@ -31,6 +31,7 @@
+@@ -31,9 +31,11 @@
  import generic_path
  import subprocess
  import zipfile
@@ -9610,7 +10518,11 @@
  from mmpparser import *
  
  import time
-@@ -232,6 +233,19 @@
++import generic_path
+ 
+ 
+ PiggyBackedBuildPlatforms = {'ARMV5':['GCCXML']}
+@@ -232,6 +234,19 @@
  	return commentDetail
  
  
@@ -9630,7 +10542,7 @@
  # Classes
  
  class MetaDataError(Exception):
-@@ -284,9 +298,8 @@
+@@ -284,9 +299,8 @@
  	def call(self, aArgs, sourcefilename):
  		""" Override call so that we can do our own error handling."""
  		tool = self._ExternalTool__Tool
@@ -9641,7 +10553,7 @@
  			# the actual call differs between Windows and Unix
  			if raptor_utilities.getOSFileSystem() == "unix":
  				p = subprocess.Popen(commandline, \
-@@ -332,7 +345,7 @@
+@@ -332,7 +346,7 @@
  				raise MetaDataError("Errors in %s" % str(sourcefilename))
  
  		except Exception,e:
@@ -9650,7 +10562,7 @@
  
  		return 0	# all OK
  
-@@ -398,11 +411,13 @@
+@@ -398,11 +412,13 @@
  	on the selected build platform.  This class provides a generic means of wrapping
  	up the preprocessing of such files."""
  
@@ -9665,7 +10577,7 @@
  		@param log 		A class with Debug(<string>), Info(<string>) and Error(<string>) methods
  		"""
  		self.filename = aFilename
-@@ -410,6 +425,7 @@
+@@ -410,6 +426,7 @@
  		# Dictionary with key of build platform and a text string of processed output as values
  		self.__PreProcessedContent = {}
  		self.log = log
@@ -9673,7 +10585,7 @@
  
  		self.__gnucpp = gnucpp
  		if gnucpp is None:
-@@ -436,7 +452,7 @@
+@@ -436,7 +453,7 @@
  			else:
  				metatarget = "'$(PARSETARGET)'"
  			generateDepsOptions = "-MD -MF%s -MT%s" % (adepfilename, metatarget)
@@ -9682,7 +10594,7 @@
  			try:
  				os.makedirs(os.path.dirname(adepfilename))
  			except Exception, e:
-@@ -515,15 +531,17 @@
+@@ -515,15 +532,17 @@
  	on the selected build platform.  This class provides a generic means of wrapping
  	up the preprocessing of such files."""
  
@@ -9703,7 +10615,37 @@
  
  		self.__gnucpp = gnucpp
  		if gnucpp is None:
-@@ -878,8 +896,8 @@
+@@ -750,9 +769,13 @@
+ 			biloc="." # Someone building with a relative raptor path
+ 
+ 		self.__StandardVariables = {}
+-		# Relative step-down to the root - let's try ignoring this for now, as it
+-		# should amount to the same thing in a world where absolute paths are king
++		# The source root directory is SRCROOT if set in the environment
++		# Set TO_ROOT to SRCROOT in case SBS_BUILD_DIR is on a different drive
++		if 'SRCROOT' in os.environ:
++			self.__StandardVariables['TO_ROOT'] = str(generic_path.Path(os.environ['SRCROOT']))
++		else:
+ 		self.__StandardVariables['TO_ROOT'] = ""
++		
+ 		# Top-level bld.inf location
+ 		self.__StandardVariables['TO_BLDINF'] = biloc
+ 		self.__StandardVariables['EXTENSION_ROOT'] = eiloc
+@@ -820,8 +843,11 @@
+ 			eiloc="." # Someone building with a relative raptor path
+ 
+ 		self.__StandardVariables = {}
+-		# Relative step-down to the root - let's try ignoring this for now, as it
+-		# should amount to the same thing in a world where absolute paths are king
++		# The source root directory is SRCROOT if set in the environment	
++		# Set TO_ROOT to SRCROOT in case SBS_BUILD_DIR is on a different drive
++		if 'SRCROOT' in os.environ:
++			self.__StandardVariables['TO_ROOT'] = str(generic_path.Path(os.environ['SRCROOT']))
++		else:
+ 		self.__StandardVariables['TO_ROOT'] = ""
+ 		# Top-level bld.inf location
+ 		self.__StandardVariables['TO_BLDINF'] = biloc
+@@ -878,8 +904,8 @@
  class BldInfFile(MetaDataFile):
  	"""Representation of a Symbian bld.inf file"""
  
@@ -9714,7 +10656,17 @@
  		self.__Raptor = log
  		self.testManual = 0
  		self.testAuto = 0
-@@ -1194,7 +1212,9 @@
+@@ -1053,6 +1079,9 @@
+ 			if (re.search(r'^\s*START ',extensionLine, re.I)):
+ 				start = extensionLine
+ 			elif re.search(r'^\s*END\s*$',extensionLine, re.I):
++				if start == "":
++					self.log.Error("unmatched END statement in %s section", aType, bldinf=str(self.filename))
++				else:
+ 				extensionObjects.append(Extension(self.filename, start, options, aBuildPlatform, self.__Raptor))
+ 				start = ""
+ 				options = []
+@@ -1194,7 +1223,9 @@
  		super(MMPRaptorBackend,self).__init__()
  		self.platformblock = None
  		self.__Raptor = aRaptor
@@ -9725,7 +10677,7 @@
  		self.ResourceVariants = []
  		self.BitmapVariants = []
  		self.StringTableVariants = []
-@@ -1208,11 +1228,12 @@
+@@ -1208,11 +1239,12 @@
  		self.__systeminclude = ""
  		self.__bitmapSourcepath = self.__sourcepath
  		self.__current_resource = ""
@@ -9739,7 +10691,7 @@
  
  		self.__TARGET = ""
  		self.__TARGETEXT = ""
-@@ -1283,16 +1304,15 @@
+@@ -1283,16 +1315,15 @@
  		elif varname == 'PAGED':
  			self.BuildVariant.AddOperation(raptor_data.Set(varname, "1"))
  			self.__debug( "Set switch PAGE ON")
@@ -9758,7 +10710,7 @@
  			self.BuildVariant.AddOperation(raptor_data.Set("PAGEDCODE_OPTION", "unpaged"))
  			self.__debug( "Set switch PAGEDCODE OFF")
  			self.BuildVariant.AddOperation(raptor_data.Set("PAGEDDATA_OPTION", "unpaged"))
-@@ -1314,6 +1334,7 @@
+@@ -1314,6 +1345,7 @@
  			self.BuildVariant.AddOperation(raptor_data.Set("PAGEDCODE_OPTION", "unpaged"))
  			self.__debug( "Set switch " + varname + " ON")
  			self.__pageConflict.append(varname)
@@ -9766,7 +10718,7 @@
  		elif varname == 'UNPAGEDDATA':
  			self.BuildVariant.AddOperation(raptor_data.Set("PAGEDDATA_OPTION", "unpaged"))
  			self.__debug( "Set switch " + varname + " ON")
-@@ -1322,6 +1343,7 @@
+@@ -1322,6 +1354,7 @@
  		elif varname == 'NOLINKTIMECODEGENERATION':
  			self.BuildVariant.AddOperation(raptor_data.Set("LTCG",""))
  			self.__debug( "Set switch " + varname + " OFF")
@@ -9774,7 +10726,7 @@
  		elif varname == 'NOMULTIFILECOMPILATION':
  			self.BuildVariant.AddOperation(raptor_data.Set("MULTIFILE_ENABLED",""))
  			self.__debug( "Set switch " + varname + " OFF")
-@@ -1331,13 +1353,19 @@
+@@ -1331,13 +1364,19 @@
  				self.__debuggable = "udeb urel"
  			else:
  				self.__Raptor.Warn("DEBUGGABLE keyword ignored as DEBUGGABLE_UDEBONLY is already specified")
@@ -9794,7 +10746,7 @@
  		else:
  			self.__debug( "Set switch "+toks[0]+" ON")
  			self.BuildVariant.AddOperation(raptor_data.Set(prefix+varname, "1"))
-@@ -1423,9 +1451,12 @@
+@@ -1423,9 +1462,12 @@
  
  		elif varname=='CAPABILITY':
  			for cap in toks[1]:
@@ -9809,7 +10761,7 @@
  		elif varname=='DEFFILE':
  			self.__defFileRoot = self.__currentMmpFile
  			self.deffile = toks[1]
-@@ -1450,8 +1481,10 @@
+@@ -1450,14 +1492,16 @@
  
  				# add in the minor number
  				minor = 0
@@ -9821,7 +10773,15 @@
  
  				self.__versionhex = "%04x%04x" % (major, minor)
  				self.BuildVariant.AddOperation(raptor_data.Set(varname, "%d.%d" %(major, minor)))
-@@ -1517,7 +1550,8 @@
+-				self.BuildVariant.AddOperation(raptor_data.Set(varname+"HEX", self.__versionhex))
++				self.BuildVariant.AddOperation(raptor_data.Set("VERSIONHEX", self.__versionhex))
+ 				self.__debug("Set "+toks[0]+"  OPTION to " + toks[1])
+-				self.__debug("Set "+toks[0]+"HEX OPTION to " + "%04x%04x" % (major,minor))
++				self.__debug("Set VERSIONHEX OPTION to " + self.__versionhex)
+ 
+ 			else:
+ 				self.__Raptor.Warn("Invalid version supplied to VERSION (%s), using default value" % toks[1])
+@@ -1517,7 +1561,8 @@
  					toks1 = re.sub("[,'\[\]]", "", toks1).replace("//","/")
  				self.__debug("Set "+toks[0]+" to " + toks1)
  				self.BuildVariant.AddOperation(raptor_data.Set(varname,toks1))
@@ -9831,7 +10791,7 @@
  		else:
  			self.__debug("Set "+toks[0]+" to " + str(toks[1]))
  			self.BuildVariant.AddOperation(raptor_data.Set(varname,"".join(toks[1])))
-@@ -1687,7 +1721,7 @@
+@@ -1687,7 +1732,7 @@
  	def getDefaultResourceTargetPath(self, targettype):
  		# the different default TARGETPATH values should come from the
  		# configuration rather than being hard-coded here.
@@ -9840,7 +10800,7 @@
  			return "resource/plugins"
  		if targettype == "pdl":
  			return "resource/printers"
-@@ -1884,7 +1918,7 @@
+@@ -1884,7 +1929,7 @@
  		self.__currentLineNumber += 1
  		self.__debug("Start BITMAP "+toks[1])
  
@@ -9849,7 +10809,7 @@
  		# 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
-@@ -1974,7 +2008,7 @@
+@@ -1974,7 +2019,7 @@
  		self.__debug("stringtable: " + toks[1])
  		self.__debug("adjusted stringtable source=" + source)
  
@@ -9858,7 +10818,7 @@
  		self.__currentStringTableVariant.AddOperation(raptor_data.Set("SOURCE", source))
  		self.__currentStringTableVariant.AddOperation(raptor_data.Set("EXPORTPATH", ""))
  		self.__stringtableExported = False
-@@ -2142,6 +2176,9 @@
+@@ -2142,6 +2187,9 @@
  		self.BuildVariant.AddOperation(raptor_data.Set("DEFFILEKEYWORD", deffile_keyword))
  		self.__debug("Set DEFFILEKEYWORD to '%s'",deffile_keyword)
  
@@ -9868,7 +10828,7 @@
  		# if this target type has a default TARGETPATH other than "" for
  		# resources then we need to add that default to all resources which
  		# do not explicitly set the TARGETPATH themselves.
-@@ -2167,16 +2204,20 @@
+@@ -2167,16 +2215,20 @@
  			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()))
  
@@ -9891,7 +10851,7 @@
  
  			if MMPRaptorBackend.supportedCapabilities.has_key(capability):
  				capabilityFlag1 = capabilityFlag1 ^ invert
-@@ -2205,12 +2246,21 @@
+@@ -2205,12 +2257,21 @@
  			for x in self.__pageConflict:
  				if x == "PAGEDCODE" or x == "UNPAGEDCODE":
  					self.__Raptor.Warn("Both PAGEDCODE and UNPAGEDCODE are specified. The last one %s will take effect" % x)
@@ -9913,7 +10873,7 @@
  
  		# Set Debuggable
  		self.BuildVariant.AddOperation(raptor_data.Set("DEBUGGABLE", self.__debuggable))
-@@ -2229,6 +2279,27 @@
+@@ -2229,6 +2290,27 @@
  		"""Target type in lower case - the standard format"""
  		return self.__targettype.lower()
  
@@ -9941,7 +10901,7 @@
  	def resolveDefFile(self, aTARGET, aBuildPlatform):
  		"""Returns a fully resolved DEFFILE entry depending on .mmp file location and TARGET, DEFFILE and NOSTRICTDEF
  		entries in the .mmp file itself (where appropriate).
-@@ -2283,6 +2354,32 @@
+@@ -2283,6 +2365,32 @@
  		return resolvedDefFile
  
  
@@ -9974,7 +10934,7 @@
  class MetaReader(object):
  	"""Entry point class for Symbian metadata processing.
  
-@@ -2299,10 +2396,10 @@
+@@ -2299,10 +2407,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]) )
@@ -9989,7 +10949,7 @@
  
  		# Only read each variant.cfg once
  		variantCfgs = {}
-@@ -2321,24 +2418,35 @@
+@@ -2321,24 +2429,35 @@
  		# with the same "export platform".
  		exports = {}
  
@@ -10032,7 +10992,7 @@
  
  			# Apply OS variant provided we are not ignoring this
  			if not self.__Raptor.ignoreOsDetection:
-@@ -2350,11 +2458,11 @@
+@@ -2350,11 +2469,11 @@
  			# is this a feature variant config or an ordinary variant
  			fv = evaluator.Get("FEATUREVARIANTNAME")
  			if fv:
@@ -10046,7 +11006,7 @@
  				variantCfg = generic_path.Path(variantCfg)
  				if not variantCfg in variantCfgs:
  					# get VARIANT_HRH from the variant.cfg file
-@@ -2369,19 +2477,18 @@
+@@ -2369,19 +2488,18 @@
  
  			detail['VARIANT_HRH'] = variantHRH
  			self.__Raptor.Info("'%s' uses variant hrh file '%s'", buildConfig.name, variantHRH)
@@ -10070,7 +11030,7 @@
  
  			# make a key that identifies this platform uniquely
  			# - used to tell us whether we have done the pre-processing
-@@ -2390,7 +2497,8 @@
+@@ -2390,7 +2508,8 @@
  			key = str(detail['VARIANT_HRH']) \
  			 	+ str(detail['EPOCROOT']) \
  		    	+ detail['SYSTEMINCLUDE'] \
@@ -10080,7 +11040,7 @@
  
  		    # Keep a short version of the key for use in filenames.
  			uniq = hashlib.md5()
-@@ -2426,11 +2534,7 @@
+@@ -2426,11 +2545,7 @@
  			# 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.
@@ -10093,7 +11053,7 @@
  
  			items.extend(interfaces)
  			platform = ""
-@@ -2452,20 +2556,8 @@
+@@ -2452,20 +2567,8 @@
  		# that are supposedly platform independent (e.g. PRJ_PLATFORMS)
  		self.defaultPlatform = self.ExportPlatforms[0]
  
@@ -10115,7 +11075,7 @@
  		"""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
-@@ -2475,7 +2567,7 @@
+@@ -2475,7 +2578,7 @@
  		# we need a Filter node per export platform
  		exportNodes = []
  		for i,ep in enumerate(self.ExportPlatforms):
@@ -10124,7 +11084,7 @@
  
  			# what configurations is this node active for?
  			for config in ep['configs']:
-@@ -2486,7 +2578,7 @@
+@@ -2486,7 +2589,7 @@
  		# we need a Filter node per build platform
  		platformNodes = []
  		for i,bp in enumerate(self.BuildPlatforms):
@@ -10133,7 +11093,7 @@
  
  			# what configurations is this node active for?
  			for config in bp['configs']:
-@@ -2502,18 +2594,18 @@
+@@ -2502,18 +2605,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.
@@ -10158,7 +11118,7 @@
  				if not self.__Raptor.keepGoing:
  					return []
  
-@@ -2545,6 +2637,7 @@
+@@ -2545,6 +2648,7 @@
  		# before we can do anything else (because raptor itself must do
  		# some exports before the MMP files that include them can be
  		# processed).
@@ -10166,7 +11126,7 @@
  		for i,p in enumerate(exportNodes):
  			exportPlatform = self.ExportPlatforms[i]
  			for s in p.GetChildSpecs():
-@@ -2555,10 +2648,12 @@
+@@ -2555,10 +2659,12 @@
  					self.__Raptor.Error("%s",e.Text)
  					if not self.__Raptor.keepGoing:
  						return []
@@ -10180,7 +11140,7 @@
  			self.__Raptor.Info("Processing Exports only")
  			return[]
  
-@@ -2601,8 +2696,8 @@
+@@ -2601,8 +2707,8 @@
  
  		def LeftPortionOf(pth,sep):
  			""" Internal function to return portion of str that is to the left of sep. 
@@ -10191,7 +11151,7 @@
  			return pth[0:length]
  			
  		modulePath = LeftPortionOf(LeftPortionOf(os.path.dirname(aBldInfPath), "group"), "ongoing")
-@@ -2615,37 +2710,30 @@
+@@ -2615,37 +2721,30 @@
  		return moduleName
  
  
@@ -10240,7 +11200,7 @@
  
  		# get the relevant build platforms
  		listedPlatforms = bldInfFile.getBuildPlatforms(self.defaultPlatform)
-@@ -2655,34 +2743,36 @@
+@@ -2655,34 +2754,36 @@
  													self.__baseuserdefaultplatforms)
  
  
@@ -10288,7 +11248,7 @@
  
  	def ProcessExports(self, componentNode, exportPlatform):
  		"""Do the exports for a given platform and skeleton bld.inf node.
-@@ -2694,18 +2784,18 @@
+@@ -2694,18 +2795,18 @@
  		[some MMP files #include exported .mmh files]
  		"""
  		if exportPlatform["TESTCODE"]:
@@ -10311,7 +11271,7 @@
  			exportwhatlog="<whatlog bldinf='%s' mmp='' config=''>\n" % bldinf_filename
  			for export in exports:
  				expSrc = export.getSource()
-@@ -2728,11 +2818,11 @@
+@@ -2728,11 +2829,11 @@
  							# export the file
  							exportwhatlog += self.CopyExport(fromFile, toFile, bldinf_filename)
  						else:
@@ -10325,7 +11285,7 @@
  							if members != None:
  								exportwhatlog += members
  							exportwhatlog += "</archive>\n"
-@@ -2767,8 +2857,10 @@
+@@ -2767,8 +2868,10 @@
  
  			sourceMTime = 0
  			destMTime = 0
@@ -10337,7 +11297,7 @@
  				destMTime = os.stat(dest_str)[stat.ST_MTIME]
  			except OSError, e:
  				if sourceMTime == 0:
-@@ -2782,6 +2874,9 @@
+@@ -2782,6 +2885,9 @@
  				if os.path.exists(dest_str):
  					os.chmod(dest_str,stat.S_IREAD | stat.S_IWRITE)
  				shutil.copyfile(source_str, dest_str)
@@ -10347,7 +11307,7 @@
  				self.__Raptor.Info("Copied %s to %s", source_str, dest_str)
  			else:
  				self.__Raptor.Info("Up-to-date: %s", dest_str)
-@@ -2845,7 +2940,7 @@
+@@ -2845,7 +2951,7 @@
  				for file in files:
  					if not file.endswith('/'):
  						expfilename = str(generic_path.Join(destination, file))
@@ -10356,7 +11316,7 @@
  
  				self.__Raptor.PrintXML("<clean bldinf='" + bldinf_filename + "' mmp='' config=''>\n")
  				self.__Raptor.PrintXML("<zipmarker>" + markerfilename + "</zipmarker>\n")
-@@ -2876,6 +2971,11 @@
+@@ -2876,6 +2982,11 @@
  						expfile = open(expfilename, 'wb')
  						expfile.write(exportzip.read(file))
  						expfile.close()
@@ -10368,7 +11328,7 @@
  						# Each file keeps its modified time the same as what it was before unzipping
  						accesstime = time.time()
  						datetime = exportzip.getinfo(file).date_time
-@@ -2885,7 +2985,7 @@
+@@ -2885,7 +2996,7 @@
  						os.utime(expfilename,(accesstime, modifiedtime))
  
  						filecount += 1
@@ -10377,7 +11337,7 @@
  					except IOError, e:
  						message = "Could not unzip %s to %s: file %s: %s" %(source, destination, expfilename, str(e))
  						if not self.__Raptor.keepGoing:
-@@ -2899,7 +2999,7 @@
+@@ -2899,7 +3010,7 @@
  			self.__Raptor.PrintXML("<zipmarker>" + markerfilename +	"</zipmarker>\n")
  			self.__Raptor.PrintXML("</clean>\n")
  
@@ -10386,7 +11346,7 @@
  			self.__Raptor.Warn("Problem while unzipping export %s to %s: %s",source,destination,str(e))
  
  		self.__Raptor.Info("Unzipped %d files from %s to %s", filecount, source, destination)
-@@ -2915,12 +3015,12 @@
+@@ -2915,12 +3026,12 @@
  			return	# feature variation does not run extensions at all
  		
  		if buildPlatform["TESTCODE"]:
@@ -10402,7 +11362,15 @@
  
  		for i,extension in enumerate(extensions):
  			if self.__Raptor.projects:
-@@ -2999,14 +3099,20 @@
+@@ -2979,7 +3090,6 @@
+ 				value = options[option].replace('$(EPOCROOT)', '$(EPOCROOT)/')
+ 				value = value.replace('$(', '$$$$(')
+ 				value = value.replace('$/', '/').replace('$;', ':')
+-				value = value.replace('$/', '/').replace('$;', ':')
+ 
+ 				if customInterface:
+ 					var.AddOperation(raptor_data.Set(option, value))
+@@ -2999,14 +3109,20 @@
  		gnuList = []
  		makefileList = []
  
@@ -10426,7 +11394,7 @@
  			projectname = mmpFileEntry.filename.File().lower()
  
  			if self.__Raptor.projects:
-@@ -3024,7 +3130,8 @@
+@@ -3024,7 +3140,8 @@
  
  			mmpFile = MMPFile(foundmmpfile,
  								   self.__gnucpp,
@@ -10436,7 +11404,7 @@
  								   log = self.__Raptor)
  
  			mmpFilename = mmpFile.filename
-@@ -3058,7 +3165,7 @@
+@@ -3058,7 +3175,7 @@
  				continue
  			
  			# now build the specification tree
@@ -10445,7 +11413,7 @@
  			var = backend.BuildVariant
  
  			var.AddOperation(raptor_data.Set("PROJECT_META", str(mmpFilename)))
-@@ -3094,7 +3201,7 @@
+@@ -3094,7 +3211,7 @@
  
  			# Although not part of the MMP, some MMP-based build specs additionally require knowledge of their
  			# container bld.inf exported headers
@@ -10454,7 +11422,7 @@
  				destination = export.getDestination()
  				if isinstance(destination, list):
  					exportfile = str(destination[0])
-@@ -3108,6 +3215,16 @@
+@@ -3108,6 +3225,16 @@
  			mmpSpec.AddVariant(var)
  			componentNode.AddChild(mmpSpec)
  
@@ -10471,7 +11439,7 @@
  			# resources, stringtables and bitmaps are sub-nodes of this project
  			# (do not add these for feature variant builds)
  			
-@@ -3150,7 +3267,7 @@
+@@ -3150,7 +3277,7 @@
  					self.projectList.remove(projectname)
  
  			self.__Raptor.Debug("%i gnumakefile extension makefiles for %s",
@@ -10480,8 +11448,12 @@
  			var = raptor_data.Variant()
  			gnuSpec = raptor_data.Specification("gnumakefile " + str(g.getMakefileName()))
  			interface = buildPlatform["ext_makefile"]
-@@ -3182,7 +3299,7 @@
- 					projectList.remove(projectname)
+@@ -3179,10 +3306,10 @@
+ 					self.__Raptor.Debug("Skipping %s", str(m.getMakefileName()))
+ 					continue
+ 				elif projectname in self.projectList:
+-					projectList.remove(projectname)
++					self.projectList.remove(projectname)
  
  			self.__Raptor.Debug("%i makefile extension makefiles for %s",
 -						len(makefileList), str(componentNode.bldinf.filename))
@@ -10489,7 +11461,7 @@
  			var = raptor_data.Variant()
  			gnuSpec = raptor_data.Specification("makefile " + str(m.getMakefileName()))
  			interface = buildPlatform["ext_makefile"]
-@@ -3203,17 +3320,6 @@
+@@ -3203,17 +3330,6 @@
  			gnuSpec.AddVariant(var)
  			componentNode.AddChild(gnuSpec)
  
@@ -10509,7 +11481,7 @@
  		# Form path to kif.xml and path to buildinfo.txt
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/raptor.py /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/raptor.py
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/raptor.py	2010-05-18 19:32:34.789348356 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/raptor.py	2010-05-17 18:47:53.092842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/raptor.py	2010-06-04 12:09:25.031849000 +0100
 @@ -1,5 +1,5 @@
  #
 -# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -10676,9 +11648,7 @@
 +		self.unfurl_all(build)
 +
 +		sp = self.specs
- 
--	def extend(self, c):
--		self.components.extend(c)
++
 +		build.AssertBuildOK()
 +
 +		m = self.realise_makefile(build, sp)
@@ -10691,9 +11661,15 @@
 +
 +
 +		return result
-+
-+
-+
+ 
+-	def extend(self, c):
+-		self.components.extend(c)
+ 	
+-	def append(self, c):
+-		self.components.append(c)
+ 
+-	def GenerateSpecs(self, genericspecs, configs):
+-		"""Return a build spec hierarchy for a ComponentGroup. This involves parsing the component MetaData (bld.infs, mmps). 
 +class Project(ModelNode):
 +	"""A project or, in symbian-speak, an MMP
 +	"""
@@ -10745,9 +11721,7 @@
 +	def __init__(self, name, componentlist=[]):
 +		super(Layer,self).__init__(name)
 +		self.name = name
- 	
--	def append(self, c):
--		self.components.append(c)
++
 +		for c in componentlist:
 +			if isinstance(c, raptor_xml.SystemModelComponent):
 +				# this component came from a system_definition.xml
@@ -10755,9 +11729,7 @@
 +			else:
 +				# this is a plain old bld.inf file from the command-line
 +				self.children.add(Component(c))
- 
--	def GenerateSpecs(self, genericspecs, configs):
--		"""Return a build spec hierarchy for a ComponentGroup. This involves parsing the component MetaData (bld.infs, mmps). 
++
 +	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.
@@ -10806,8 +11778,10 @@
 -		if metaReader:
 -			for c in metaReader.BuildPlatforms:
 -				self.dependencies.update(c["METADEPS"])
--
--
++				build.Error(e.Text)
+ 
++		self.unfurled = True
+ 
 -	def CreateMakefile(self, makefilename_base, engine, named = False):
 -		if len(self.specs) <= 0:
 -			return None
@@ -10819,19 +11793,17 @@
 -
 -		# insert the start time into the Makefile name?
 -		makefile.path = makefile.path.replace("%TIME", build.timestring)
-+				build.Error(e.Text)
- 
+-
 -		engine.Write(makefile, self.specs, self.configs)
-+		self.unfurled = True
  
 -		return makefile
- 
 +	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."""
  
+-
 -	def GenerateMetadataSpecs(self, configs):
  		# insert the start time into the Makefile name?
  
@@ -10840,22 +11812,19 @@
  
  		# Pass certain CLI flags through to the makefile-generating sbs calls
  		cli_options = ""
-@@ -206,34 +338,53 @@
+@@ -206,34 +338,50 @@
  		if build.quiet == True:
  			cli_options += " -q"
  
-+		if build.timing == True:
-+			cli_options += " --timing"
- 		
--		nc = len(self.components)
--		number_blocks = 16
 +		if build.noDependInclude == True:
 +			cli_options += " --no-depend-include"
 +
 +		if build.noDependGenerate == True:
 +			cli_options += " --no-depend-generate"
 +
-+
+ 		
+-		nc = len(self.components)
+-		number_blocks = 16
 +		nc = len(self.children)
 +		number_blocks = build.jobs
  		block_size = (nc / number_blocks) + 1
@@ -10902,7 +11871,7 @@
  				pass
  			
  			# add some basic data in a component-wide variant
-@@ -242,13 +393,19 @@
+@@ -242,13 +390,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))
@@ -10924,7 +11893,7 @@
  			try:
  				interface = build.cache.FindNamedInterface("build.makefiles")
  				specNode.SetInterface(interface)
-@@ -256,15 +413,30 @@
+@@ -256,15 +410,30 @@
  				build.Error("Can't find flm interface 'build.makefiles' ")
  				
  			spec_nodes.append(specNode)
@@ -10950,16 +11919,29 @@
  			
  
 -		## possibly some error handling here?
--
+ 
 -		self.specs = spec_nodes
  
- 
+-
 -class BuildCompleteException(Exception):
 +class BuildCannotProgressException(Exception):
  	pass
  
  # raptor module classes
-@@ -326,8 +498,8 @@
+@@ -276,9 +445,10 @@
+ 	created by the Main function. When operated by an IDE several Raptor
+ 	objects may be created and operated at the same time."""
+ 
+-
++	# mission enumeration
+ 	M_BUILD = 1
+-	M_VERSION = 2	
++	M_QUERY = 2
++	M_VERSION = 3
+ 
+ 	def __init__(self, home = None):
+ 
+@@ -326,8 +496,8 @@
  		# things to initialise
  		self.args = []
  
@@ -10970,7 +11952,7 @@
  		self.commandlineComponents = []
  
  		self.systemModel = None
-@@ -343,8 +515,10 @@
+@@ -343,9 +513,12 @@
  		self.maker = None
  		self.debugOutput = False
  		self.doExportOnly = False
@@ -10979,17 +11961,19 @@
  		self.noDependInclude = False
 +		self.noDependGenerate = False
  		self.projects = set()
++		self.queries = []
  
  		self.cache = raptor_cache.Cache(self)
-@@ -360,6 +534,7 @@
+ 		self.override = {env: str(self.home)}
+@@ -360,6 +533,7 @@
  		# what platform and filesystem are we running on?
  		self.filesystem = raptor_utilities.getOSFileSystem()
  
-+		self.timing = False
++		self.timing = True # Needed by filters such as copy_file to monitor progress
  		self.toolset = None
  
  		self.starttime = time.time()
-@@ -374,6 +549,9 @@
+@@ -374,6 +548,9 @@
  		return True
  
  	def AddConfigName(self, name):
@@ -10999,7 +11983,7 @@
  		self.configNames.append(name)
  		return True
  
-@@ -439,6 +617,16 @@
+@@ -439,6 +616,16 @@
  
  	def SetExportOnly(self, TrueOrFalse):
  		self.doExportOnly = TrueOrFalse
@@ -11016,7 +12000,7 @@
  		return True
  
  	def SetNoBuild(self, TrueOrFalse):
-@@ -449,6 +637,10 @@
+@@ -449,6 +636,10 @@
  		self.noDependInclude = TrueOrFalse
  		return True
  		
@@ -11027,12 +12011,12 @@
  	def SetKeepGoing(self, TrueOrFalse):
  		self.keepGoing = TrueOrFalse
  		return True
-@@ -503,10 +695,16 @@
+@@ -503,10 +694,16 @@
  
  		return True
  
 +	def SetTiming(self, TrueOrFalse):
-+		self.timing = TrueOrFalse
++		self.Info("--timing switch no longer has any effect - build timing is now permanently on")
 +		return True
 +
  	def SetParallelParsing(self, type):
@@ -11044,7 +12028,19 @@
  		elif type == "off":
  			self.doParallelParsing = False
  		else:
-@@ -529,7 +727,7 @@
+@@ -519,6 +716,11 @@
+ 		self.projects.add(projectName.lower())
+ 		return True
+ 
++	def AddQuery(self, q):
++		self.queries.append(q)
++		self.mission = Raptor.M_QUERY
++		return True
++	
+ 	def FilterList(self, value):
+ 		self.filterList = value
+ 		return True
+@@ -529,7 +731,7 @@
  
  	def PrintVersion(self,dummy):
  		global name
@@ -11053,7 +12049,7 @@
  		self.mission = Raptor.M_VERSION
  		return False
  
-@@ -538,7 +736,7 @@
+@@ -538,7 +740,7 @@
  	def Introduction(self):
  		"""Print a header of useful information about Raptor"""
  
@@ -11062,7 +12058,7 @@
  
  		self.Info("%s %s", env, str(self.home))
  		self.Info("Set-up %s", str(self.raptorXML))
-@@ -546,8 +744,8 @@
+@@ -546,8 +748,8 @@
  		self.Info("Current working directory %s", os.getcwd())
  		
  		# the inherited environment
@@ -11073,7 +12069,35 @@
  
  		# and some general debug stuff
  		self.Debug("Platform %s", "-".join(hostplatform))
-@@ -659,32 +857,6 @@
+@@ -597,8 +799,10 @@
+ 		self.args = args
+ 
+ 		# assuming self.CLI = "raptor_cli"
+-		more_to_do = raptor_cli.GetArgs(self, args)
++		if not raptor_cli.GetArgs(self, args):
++			self.skipAll = True		# nothing else to do
+ 
++	def ParseCommandLineTargets(self):
+ 		# resolve inter-argument dependencies.
+ 		# --what or --check implies the WHAT target and FilterWhat Filter
+ 		if self.doWhat or self.doCheck:
+@@ -631,9 +835,13 @@
+ 				self.filterList += ",filterclean"
+ 				if is_suspicious_clean:
+ 					self.Warn('CLEAN, CLEANEXPORT and a REALLYCLEAN should not be combined with other targets as the result is unpredictable.')
++			else:
++				""" Copyfile implements the <copy> tag which is primarily useful with cluster builds.
++				    It allows file copying to occur on the primary build host rather than on the cluster.
++				    This is more efficient.
++				"""
++				self.filterList += ",filtercopyfile"
+ 
+-		if not more_to_do:
+-			self.skipAll = True		# nothing else to do
+ 
+ 	def ProcessConfig(self):
+ 		# this function will perform additional processing of config
+@@ -659,32 +867,6 @@
  
  		self.cache.Load(self.systemFLM)
  
@@ -11106,7 +12130,7 @@
  	def GetBuildUnitsToBuild(self, configNames):
  		"""Return a list of the configuration objects that correspond to the 
  		   list of configuration names in the configNames parameter.
-@@ -700,15 +872,7 @@
+@@ -700,15 +882,7 @@
  			else:
  				configNames.append(self.defaultConfig)
  
@@ -11123,7 +12147,7 @@
  
  		for b in buildUnitsToBuild:
  			self.Info("Buildable configuration '%s'", b.name)
-@@ -770,13 +934,13 @@
+@@ -770,13 +944,13 @@
  				systemModel.DumpLayerInfo(layer)
  
  				if systemModel.IsLayerBuildable(layer):
@@ -11139,7 +12163,7 @@
  	def FindSysDefIn(self, aDir = None):
  		# Find a system definition file
  
-@@ -801,22 +965,12 @@
+@@ -801,22 +975,12 @@
  			dir = generic_path.Path(aDir)
  
  		bldInf = dir.Append(self.buildInformation)
@@ -11162,7 +12186,7 @@
  	def GenerateGenericSpecs(self, configsToBuild):
  		# if a Configuration has any config-wide interfaces
  		# then add a Specification node to call each of them.
-@@ -832,7 +986,7 @@
+@@ -832,7 +996,7 @@
  					filter.AddConfigCondition(c.name)
  				else:
  					# create a new node
@@ -11171,7 +12195,7 @@
  					filter.AddConfigCondition(c.name)
  					for i in iface.split():
  						spec = raptor_data.Specification(i)
-@@ -842,50 +996,25 @@
+@@ -842,50 +1006,25 @@
  					configWide[iface] = filter
  					genericSpecs.append(filter)
  
@@ -11205,13 +12229,13 @@
  	def GetEvaluator(self, specification, configuration, gathertools=False):
  		""" this will perform some caching later """
 -		return raptor_data.Evaluator(self, specification, configuration, gathertools=gathertools)
--
--
++		return raptor_data.Evaluator(specification, configuration, gathertools=gathertools, cache = self.cache)
+ 
+ 
 -	def areMakefilesUptodate(self):
 -		return False
-+		return raptor_data.Evaluator(specification, configuration, gathertools=gathertools, cache = self.cache)
- 
- 
+-
+-
 -	def Make(self, makefile):
 -
 -		if self.maker.Make(makefile):
@@ -11229,7 +12253,7 @@
  
  
  	def Report(self):
-@@ -898,10 +1027,10 @@
+@@ -898,10 +1037,10 @@
  		self.Info("Run time %s seconds" % self.runtime)
  
  	def AssertBuildOK(self):
@@ -11242,7 +12266,14 @@
  
  		return True
  
-@@ -934,17 +1063,17 @@
+@@ -928,23 +1067,23 @@
+ 			self.raptor_params = BuildStats(self)
+ 
+ 			# Open the requested plugins using the pluginbox
+-			self.out.open(self.raptor_params, self.filterList.split(','), self.pbox)
++			self.out.open(self.raptor_params, self.filterList, self.pbox)
+ 
+ 			# log header
  			self.out.write("<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n")
  
  			namespace = "http://symbian.com/xml/build/log"
@@ -11263,7 +12294,7 @@
  	def CloseLog(self):
  		if self.logOpen:
  			self.out.summary()
-@@ -976,6 +1105,30 @@
+@@ -976,6 +1115,30 @@
  		self.out.write("<info" + self.attributeString(attributes) + ">" +
  		               escape(format % extras) + "</info>\n")
  
@@ -11294,7 +12325,7 @@
  	def Debug(self, format, *extras, **attributes):
  		"Send a debugging message to the configured channel"
  
-@@ -1019,28 +1172,11 @@
+@@ -1019,28 +1182,11 @@
  		if format:
  			self.out.write(format % extras)
  
@@ -11326,7 +12357,7 @@
  		# 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 +1185,39 @@
+@@ -1049,38 +1195,64 @@
  				if self.systemDefinitionFile == None:
  					aComponent = self.FindComponentIn(cwd)
  					if aComponent:
@@ -11370,13 +12401,38 @@
 +				for c in cg:
 +					newcg.add(c)
 +			layers = [newcg]
++
++		return layers
++
++	def Query(self):
++		"process command-line queries."
  
 -		return componentGroups
-+		return layers
++		if self.mission != Raptor.M_QUERY:
++			return 0
++		
++		# establish an object cache based on the current settings
++		self.LoadCache()
++			
++		# our "self" is a valid object for initialising an API Context
++		import raptor_api
++		api = raptor_api.Context(self)
++		
++		print "<sbs version='%s'>" % raptor_version.numericversion()
++		
++		for q in self.queries:
++			try:
++				print api.stringquery(q)
++				
++			except Exception, e:
++				self.Error("exception '%s' with query '%s'", str(e), q)
++		
++		print "</sbs>"	
++		return self.errorCode
  
  	def Build(self):
  
-@@ -1102,20 +1239,24 @@
+@@ -1102,20 +1274,24 @@
  
  			# find out what configurations to build
  			self.AssertBuildOK()
@@ -11406,7 +12462,7 @@
  
  			# check the configurations (tools versions)
  			self.AssertBuildOK()
-@@ -1123,35 +1264,36 @@
+@@ -1123,35 +1299,36 @@
  			if self.toolcheck != 'off':
  				self.CheckConfigs(buildUnitsToBuild)
  			else:
@@ -11421,9 +12477,9 @@
 +					self.maker = raptor_make.MakeEngine(self, self.makeEngine)
 +				except raptor_make.BadMakeEngineException,e:
 +					self.Error("Unable to use make engine: %s " % str(e))
++					
  
 -			# 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):
@@ -11449,17 +12505,38 @@
  					# 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)
--
++					l.realise(self)
+ 
 -		except BuildCompleteException,b:
 +		except BuildCannotProgressException,b:
  			if str(b) != "":
  				self.Info(str(b))
  
-@@ -1185,6 +1327,8 @@
+@@ -1176,15 +1353,29 @@
+ 		build.ConfigFile()
+ 		build.ProcessConfig()
+ 		build.CommandLine(argv)
++		build.ParseCommandLineTargets()
+ 
+ 		return build 
+ 
++	@classmethod
++	def CreateCommandlineAnalysis(cls, argv):
++		""" Perform an analysis run where a build is not performed. """
++		build = Raptor()
++		build.AssertBuildOK()
++		build.ConfigFile()
++		build.ProcessConfig()
++		build.CommandLine(argv)
++		# Don't parse command line targets - they don't make any sense if you're not doing a build
++
++		return build
+ 
+ 
+ # Class for passing constricted parameters to filters
  class BuildStats(object):
  
  	def __init__(self, raptor_instance):
@@ -11468,7 +12545,7 @@
  		self.logFileName = raptor_instance.logFileName
  		self.quiet = raptor_instance.quiet
  		self.doCheck = raptor_instance.doCheck
-@@ -1212,17 +1356,7 @@
+@@ -1212,17 +1403,10 @@
  	# object which represents a build
  	b = Raptor.CreateCommandlineBuild(argv)
  
@@ -11479,7 +12556,9 @@
 -	build = b
 -	log = b
 -
--
++	if b.mission == Raptor.M_QUERY:
++		return b.Query()
+ 
 -	result = b.Build()
 -
 -	return result
@@ -11488,9 +12567,79 @@
  
  def DisplayBanner():
 Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python: raptor_timing.py
+diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/raptor_utilities.py /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/raptor_utilities.py
+--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/raptor_utilities.py	2010-05-18 19:32:34.793348934 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/raptor_utilities.py	2010-06-04 12:09:25.039849000 +0100
+@@ -1,5 +1,5 @@
+ #
+-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
++# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
+ # All rights reserved.
+ # This component and the accompanying materials are made available
+ # under the terms of the License "Eclipse Public License v1.0"
+@@ -20,6 +20,8 @@
+ import os.path
+ import re
+ import sys
++import stat
++import shutil
+ 
+ dosSlashRegEx = re.compile(r'\\')
+ unixSlashRegEx = re.compile(r'/')
+@@ -189,3 +191,50 @@
+ 		return
+ 
+ nulllog = NullLog()
++
++def copyfile(_source, _destination):
++	"""Copy the source file to the destination file (create a directory
++	   to copy into if it does not exist). Don't copy if the destination
++	   file exists and has an equal or newer modification time."""
++	source = generic_path.Path(str(_source).replace('%20',' '))
++	destination = generic_path.Path(str(_destination).replace('%20',' '))
++	dest_str = str(destination)
++	source_str = str(source)
++
++	try:
++
++
++		destDir = destination.Dir()
++		if not destDir.isDir():
++			os.makedirs(str(destDir))
++			shutil.copyfile(source_str, dest_str)
++			return 
++		# Destination file exists so we have to think about updating it
++		sourceMTime = 0
++		destMTime = 0
++		sourceStat = 0
++		try:
++			sourceStat = os.stat(source_str)
++			sourceMTime = sourceStat[stat.ST_MTIME]
++		except OSError, e:
++			message = "Source of copyfile does not exist:  " + str(source)
++			raise IOError(message)
++		try:
++			destMTime = os.stat(dest_str)[stat.ST_MTIME]
++		except OSError, e:
++			pass # destination doesn't have to exist
++
++		if destMTime == 0 or destMTime < sourceMTime:
++			if os.path.exists(dest_str):
++				os.chmod(dest_str,stat.S_IREAD | stat.S_IWRITE)
++			shutil.copyfile(source_str, dest_str)
++
++			# Ensure that the destination file remains executable if the source was also:
++			os.chmod(dest_str,sourceStat[stat.ST_MODE] | stat.S_IREAD | stat.S_IWRITE | stat.S_IWGRP ) 
++
++
++	except Exception,e:
++		message = "Could not update " + dest_str + " from " + source_str + " : " + str(e)
++		raise IOError(message)
++
++	return 
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/raptor_version.py /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/raptor_version.py
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/raptor_version.py	2010-05-18 19:32:34.793348934 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/raptor_version.py	2010-05-17 18:47:53.100842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/raptor_version.py	2010-06-04 12:09:25.039849000 +0100
 @@ -1,5 +1,5 @@
  #
 -# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -11507,7 +12656,7 @@
 -def Version():
 +# replace CHANGESET with the Hg changeset for ANY release
 +
-+version=(2,13,0,"2010-04-12","symbian build system","CHANGESET")
++version=(2,14,1,"2010-06-03","symbian build system","CHANGESET")
 +
 +def numericversion():
 +	"""Raptor version string"""
@@ -11520,7 +12669,7 @@
 Only in /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python: raptor_version.py.bak
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/raptor_xml.py /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/raptor_xml.py
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/python/raptor_xml.py	2010-05-18 19:32:34.793348934 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/raptor_xml.py	2010-05-17 18:47:53.100842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/raptor_xml.py	2010-06-04 12:09:25.039849000 +0100
 @@ -1,5 +1,5 @@
  #
 -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -11536,7 +12685,7 @@
 +	def __init__(self, aBldInfFile, aLayerName, aContainerNames, aSystemDefinitionFile, aSystemDefinitionBase, aSystemDefinitionVersion):
  		generic_path.Path.__init__(self, aBldInfFile.Absolute().path)
  		self.__ContainerNames = aContainerNames
-+		self.__LayerName = aLayerName
++		self.__LayerName = aLayerName
  		self.__SystemDefinitionFile = aSystemDefinitionFile
  		self.__SystemDefinitionBase = aSystemDefinitionBase
  		self.__SystemDefinitionVersion = aSystemDefinitionVersion
@@ -11545,24 +12694,41 @@
  		return self.__SystemDefinitionBase
  
 -	def GetSystemDefinitionFile(self):
-+	def GetSystemDefinitionVersion(self):
++	def GetSystemDefinitionVersion(self):
  		return self.__SystemDefinitionVersion
  
-+	def GetLayerName(self):
++	def GetLayerName(self):
 +		return self.__LayerName
 +
  	def GetContainerName(self, aContainerType):
  		if self.__ContainerNames.has_key(aContainerType):
  		  return self.__ContainerNames[aContainerType]
-@@ -174,6 +178,7 @@
+@@ -174,10 +178,12 @@
  		self.__SystemDefinitionFile = aSystemDefinitionFile.GetLocalString()
  		self.__SystemDefinitionBase = aSystemDefinitionBase.GetLocalString()
  		self.__Version = {'MAJOR':0,'MID':0,'MINOR':0}
-+		self.__IdAttribute = "name"
++		self.__IdAttribute = "name"
  		self.__ComponentRoot = ""
  		self.__TotalComponents = 0
  		self.__LayerList = []
-@@ -222,6 +227,10 @@
+ 		self.__LayerDetails = {}
++		self.__MissingBldInfs = {}
+ 
+ 		self.__DOM = None
+ 		self.__SystemDefinitionElement = None
+@@ -203,6 +209,11 @@
+ 		return self.__LayerDetails[aLayer]
+ 
+ 	def IsLayerBuildable(self, aLayer):
++		if aLayer in self.__MissingBldInfs:
++			for missingbldinf in self.__MissingBldInfs[aLayer]:
++				self.__Logger.Error("System Definition layer \"%s\" from system definition file \"%s\" " + \
++								    "refers to non existent bld.inf file %s", aLayer, self.__SystemDefinitionFile, missingbldinf)
++
+ 		if len(self.GetLayerComponents(aLayer)):
+ 			return True
+ 		return False
+@@ -222,6 +234,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()))
@@ -11573,35 +12739,35 @@
  
  	def __Read(self):
  		if not os.path.exists(self.__SystemDefinitionFile):
-@@ -259,42 +268,62 @@
+@@ -259,42 +275,62 @@
  
  		if self.__Version['MAJOR'] == 1 and self.__Version['MID'] > 2:
  			self.__ComponentRoot = self.__SystemDefinitionBase
 -		elif self.__Version['MAJOR'] == 2:
 -			# 2.0.0 format supports SOURCEROOT as an environment specified base - we respect this, unless
-+		elif self.__Version['MAJOR'] == 2 or self.__Version['MAJOR'] == 3:
-+			# 2.0.x and 3.0.0 formats support SOURCEROOT or SRCROOT as an environment specified base - we respect this, unless
++		elif self.__Version['MAJOR'] == 2 or self.__Version['MAJOR'] == 3:
++			# 2.0.x and 3.0.0 formats support SOURCEROOT or SRCROOT as an environment specified base - we respect this, unless
  			# explicitly overridden on the command line
 -			if os.environ.has_key('SOURCEROOT'):
-+			if os.environ.has_key('SRCROOT'):
-+				self.__ComponentRoot = generic_path.Path(os.environ['SRCROOT'])
-+			elif os.environ.has_key('SOURCEROOT'):
++			if os.environ.has_key('SRCROOT'):
++				self.__ComponentRoot = generic_path.Path(os.environ['SRCROOT'])
++			elif os.environ.has_key('SOURCEROOT'):
  				self.__ComponentRoot = generic_path.Path(os.environ['SOURCEROOT'])
-+				
++
  			if self.__SystemDefinitionBase and self.__SystemDefinitionBase != ".":
  				self.__ComponentRoot = self.__SystemDefinitionBase
 -				if os.environ.has_key('SOURCEROOT'):
-+				if os.environ.has_key('SRCROOT'):
-+					self.__Logger.Info("Command line specified System Definition file base \'%s\' overriding environment SRCROOT \'%s\'", self.__SystemDefinitionBase, os.environ['SRCROOT'])
-+				elif os.environ.has_key('SOURCEROOT'):
++				if os.environ.has_key('SRCROOT'):
++					self.__Logger.Info("Command line specified System Definition file base \'%s\' overriding environment SRCROOT \'%s\'", self.__SystemDefinitionBase, os.environ['SRCROOT'])
++				elif os.environ.has_key('SOURCEROOT'):
  					self.__Logger.Info("Command line specified System Definition file base \'%s\' overriding environment SOURCEROOT \'%s\'", self.__SystemDefinitionBase, os.environ['SOURCEROOT'])
  		else:
  			self.__Logger.Error("Cannot process schema version %s of file %s", version.string, self.__SystemDefinitionFile)
  			return False
  
-+		if self.__Version['MAJOR'] >= 3:
-+			# id is the unique identifier for 3.0 and later schema
-+			self.__IdAttribute = "id"
++		if self.__Version['MAJOR'] >= 3:
++			# id is the unique identifier for 3.0 and later schema
++			self.__IdAttribute = "id"
 +
  		return True
  
@@ -11625,14 +12791,14 @@
  
  		return component
  
-+	def __GetEffectiveLayer(self, aElement):
-+		#' return the ID of the topmost item which has an ID. For 1.x and 2.x, this will always be layer, for 3.x, it will be the topmost ID'd element in the file
-+		# never call this on the root element
-+		if aElement.parentNode.hasAttribute(self.__IdAttribute):
-+			return self.__GetEffectiveLayer(aElement.parentNode)
-+		elif aElement.hasAttribute(self.__IdAttribute):
-+			return aElement.getAttribute(self.__IdAttribute)
-+		return ""
++	def __GetEffectiveLayer(self, aElement):
++		#' return the ID of the topmost item which has an ID. For 1.x and 2.x, this will always be layer, for 3.x, it will be the topmost ID'd element in the file
++		# never call this on the root element
++		if aElement.parentNode.hasAttribute(self.__IdAttribute):
++			return self.__GetEffectiveLayer(aElement.parentNode)
++		elif aElement.hasAttribute(self.__IdAttribute):
++			return aElement.getAttribute(self.__IdAttribute)
++		return ""
 +
  	def __GetElementContainers(self, aElement, aContainers):
  		# take a <unit/> element and creates a type->name dictionary of all of its parent containers
@@ -11644,7 +12810,7 @@
  
  			if name:
  				aContainers[parent.tagName] = name
-@@ -305,8 +334,9 @@
+@@ -305,8 +341,9 @@
  		"""Search for XML <unit/> elements with 'bldFile' attributes and resolve concrete bld.inf locations
  		with an appreciation of different schema versions."""
  
@@ -11656,7 +12822,7 @@
  
  			if not self.__LayerDetails.has_key(currentLayer):
  				self.__LayerDetails[currentLayer] = []
-@@ -320,10 +350,10 @@
+@@ -320,10 +357,10 @@
  			if bldFileValue:
  				bldInfRoot = self.__ComponentRoot
  
@@ -11670,23 +12836,31 @@
  					# version 2.x.x schema paths are subject to a "root" attribute off-set, if it exists
  					rootValue = aElement.getAttribute("root")
  
-@@ -338,8 +368,14 @@
+@@ -338,16 +375,29 @@
  
  				group = generic_path.Path(bldFileValue)
  
-+				if self.__Version['MAJOR'] < 3:
-+					# absolute paths are not changed by root var in 1.x and 2.x
++				if self.__Version['MAJOR'] < 3:
++					# absolute paths are not changed by root var in 1.x and 2.x
  				if not group.isAbsolute() and bldInfRoot:
  					group = generic_path.Join(bldInfRoot, group)
-+				else:
-+					# only absolute paths are changed by root var in 3.x
-+					if group.isAbsolute() and bldInfRoot:
-+						group = generic_path.Join(bldInfRoot, group)
++				else:
++					# only absolute paths are changed by root var in 3.x
++					if group.isAbsolute() and bldInfRoot:
++						group = generic_path.Join(bldInfRoot, group)
  
  				bldinf = generic_path.Join(group, "bld.inf").FindCaseless()
  
-@@ -347,7 +383,7 @@
- 					self.__Logger.Error("No bld.inf found at %s in %s", group.GetLocalString(), self.__SystemDefinitionFile)
+ 				if bldinf == None:
+-					self.__Logger.Error("No bld.inf found at %s in %s", group.GetLocalString(), self.__SystemDefinitionFile)
++					# recording layers containing non existent bld.infs
++					bldinfname = group.GetLocalString()
++					bldinfname = bldinfname + 'bld.inf'
++					layer = self.__GetEffectiveLayer(aElement)
++					if not layer in self.__MissingBldInfs:
++						self.__MissingBldInfs[layer]=[]
++					self.__MissingBldInfs[layer].append(bldinfname)
++
  				else:
  					component = self.__CreateComponent(bldinf, aElement)
 -					layer = component.GetContainerName("layer")
@@ -11697,7 +12871,7 @@
 Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor: RELEASE-NOTES.html
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/schema/build/log/1_0.xsd /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/schema/build/log/1_0.xsd
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/schema/build/log/1_0.xsd	2010-05-18 19:32:34.797348465 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/schema/build/log/1_0.xsd	2010-05-17 18:47:53.100842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/schema/build/log/1_0.xsd	2010-06-04 12:09:25.043850000 +0100
 @@ -3,7 +3,7 @@
  
  	<xsd:annotation>
@@ -11721,7 +12895,7 @@
 Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util: build
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/config.h /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/config.h
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/config.h	2010-05-18 19:32:34.797348465 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/config.h	2010-05-17 18:47:53.584842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/config.h	2010-06-04 12:09:25.536350000 +0100
 @@ -1,5 +1,5 @@
  /*
 -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -11739,7 +12913,7 @@
  #define HAS_SETENV 1
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/gccprogram.mk /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/gccprogram.mk
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/gccprogram.mk	2010-05-18 19:32:35.141349393 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/gccprogram.mk	2010-05-17 18:47:53.976844000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/gccprogram.mk	2010-06-04 12:09:28.348350000 +0100
 @@ -1,5 +1,5 @@
  #
 -# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -11758,7 +12932,7 @@
  
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/install-linux/package_sbs.sh /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/install-linux/package_sbs.sh
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/install-linux/package_sbs.sh	2010-05-18 19:32:35.141349393 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/install-linux/package_sbs.sh	2010-05-17 18:47:53.984845000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/install-linux/package_sbs.sh	2010-06-04 12:09:28.348350000 +0100
 @@ -1,6 +1,6 @@
  #!/bin/bash
  
@@ -11778,7 +12952,7 @@
  	grep -v 'util/build'  | 
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/install-windows/raptorinstallermaker.py /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/install-windows/raptorinstallermaker.py
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/install-windows/raptorinstallermaker.py	2010-05-18 19:32:35.169348622 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/install-windows/raptorinstallermaker.py	2010-05-17 18:47:54.040845000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/install-windows/raptorinstallermaker.py	2010-06-04 12:09:28.376350000 +0100
 @@ -1,5 +1,5 @@
  #
 -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -11943,7 +13117,7 @@
  cleanup()
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/install-windows/raptorinstallerscript.nsi /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/install-windows/raptorinstallerscript.nsi
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/install-windows/raptorinstallerscript.nsi	2010-05-18 19:32:35.169348622 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/install-windows/raptorinstallerscript.nsi	2010-05-17 18:47:54.040845000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/install-windows/raptorinstallerscript.nsi	2010-06-04 12:09:28.376350000 +0100
 @@ -1,4 +1,4 @@
 -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
 +# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
@@ -12033,7 +13207,7 @@
 Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon: chomp.h
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/talon/lock.c /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/lock.c
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/talon/lock.c	2010-05-18 19:32:35.173348431 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/lock.c	2010-05-17 18:47:54.048842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/lock.c	2010-06-04 12:09:28.380350000 +0100
 @@ -12,7 +12,7 @@
  * Contributors:
  *
@@ -12045,7 +13219,7 @@
  
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/talon/Makefile /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/Makefile
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/talon/Makefile	2010-05-18 19:32:35.173348431 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/Makefile	2010-05-17 18:47:54.044845000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/Makefile	2010-06-04 12:09:28.380350000 +0100
 @@ -1,4 +1,4 @@
 -# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
 +# Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
@@ -12090,7 +13264,7 @@
 +
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/talon/process.c /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/process.c
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/talon/process.c	2010-05-18 19:32:35.173348431 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/process.c	2010-05-17 18:47:54.048842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/process.c	2010-06-04 12:09:28.384350000 +0100
 @@ -1,5 +1,5 @@
  /*
 -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -12116,7 +13290,7 @@
  	
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/talon/talon.c /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/talon.c
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/talon/talon.c	2010-05-18 19:32:35.173348431 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/talon.c	2010-05-17 18:47:54.048842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/talon.c	2010-06-04 12:09:28.384350000 +0100
 @@ -1,5 +1,5 @@
  /*
 -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -12262,7 +13436,7 @@
  	
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/talon/testbuffer.c /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/testbuffer.c
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/talon/testbuffer.c	2010-05-18 19:32:35.173348431 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/testbuffer.c	2010-05-17 18:47:54.052842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/testbuffer.c	2010-06-04 12:09:28.384350000 +0100
 @@ -1,5 +1,5 @@
  /*
 -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -12285,7 +13459,7 @@
 Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon: testchomp.c
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/talon/testprocess.c /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/testprocess.c
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/talon/testprocess.c	2010-05-18 19:32:35.177348591 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/testprocess.c	2010-05-17 18:47:54.052842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/testprocess.c	2010-06-04 12:09:28.388350000 +0100
 @@ -1,5 +1,5 @@
  /*
 -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -12310,7 +13484,7 @@
 Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/tests: run.sh
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/talon/tests/t3.mk /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/tests/t3.mk
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/talon/tests/t3.mk	2010-05-18 19:32:35.177348591 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/tests/t3.mk	2010-05-17 18:47:54.052842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/tests/t3.mk	2010-06-04 12:09:28.388350000 +0100
 @@ -1,5 +1,5 @@
  #
 -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -12330,7 +13504,7 @@
  
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/talon/tests/t4.mk /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/tests/t4.mk
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/talon/tests/t4.mk	2010-05-18 19:32:35.177348591 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/tests/t4.mk	2010-05-17 18:47:54.052842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/tests/t4.mk	2010-06-04 12:09:28.388350000 +0100
 @@ -1,5 +1,5 @@
  #
 -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -12362,7 +13536,7 @@
  
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/talon/tests/t5.mk /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/tests/t5.mk
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/talon/tests/t5.mk	2010-05-18 19:32:35.177348591 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/tests/t5.mk	2010-05-17 18:47:54.052842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/tests/t5.mk	2010-06-04 12:09:28.388350000 +0100
 @@ -1,5 +1,5 @@
  #
 -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -12381,7 +13555,7 @@
 Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/tests: t6.mk
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/talon/tests/t.mk /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/tests/t.mk
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/talon/tests/t.mk	2010-05-18 19:32:35.177348591 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/tests/t.mk	2010-05-17 18:47:54.052842000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/tests/t.mk	2010-06-04 12:09:28.388350000 +0100
 @@ -14,6 +14,7 @@
  # Description: 
  #
@@ -12392,7 +13566,7 @@
  COMPONENT_LAYER:=base
 diff -u -r -b -B -E -x '*.hg*' -x '*cross-plat-dev-utils*' -x '*baseline.txt' -x '*README' -x '*TODO' -x '*NEWS' -x '*.pyc' -x '*~' -x '*linux-unknown-libc2_11*' /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/talon/tests/xcopystdin.mk /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/tests/xcopystdin.mk
 --- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/util/talon/tests/xcopystdin.mk	2010-05-18 19:32:35.177348591 +0100
-+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/tests/xcopystdin.mk	2010-05-17 18:47:54.056843000 +0100
++++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/tests/xcopystdin.mk	2010-06-04 12:09:28.388350000 +0100
 @@ -1,5 +1,5 @@
  #
 -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
--- a/sbsv2/raptor/RELEASE-NOTES.html	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/RELEASE-NOTES.html	Fri Jun 04 13:09:28 2010 +0100
@@ -6,6 +6,46 @@
 
 <h1>Release Notes for Symbian Build System v2</h1>
 
+<h2>version 2.14.1</h2>
+ 
+<h3>Defect Fixes</h3>
+<ul>
+<li><a href="http://developer.symbian.org/bugs/show_bug.cgi?id=2203"> SF Bug 2203 </a> - [Raptor] Building extension makefile with SBS_BUILD_DIR set to another drive</li>
+<li>Fix : tracecompiler.mk caused poor makefile parse performance due to use of $(shell)</li>
+<li><a href="http://developer.symbian.org/bugs/show_bug.cgi?id=2561">SF Bug 2561</a> - [Raptor] creates incorrect .iby files w.r.t target file versions &amp; ramtargets</li>
+<li><a href="http://developer.symbian.org/bugs/show_bug.cgi?id=2562">SF Bug 2562</a> - [Raptor] adds incorrect entries into .iby files w.r.t file paths</li>
+<li><a href="http://developer.symbian.org/bugs/show_bug.cgi?id=2809">SF Bug 2809</a> - [Raptor] Intermediate Resource Filenames not unique (2.14.0 only), rom fails to boot</li>
+</ul>
+
+<h2>version 2.14.0</h2>
+
+<h3>New Features</h3>
+<ul>
+<li><a href="notes/tcomsupport.txt">           Support new Trace Compiler commandline interface, autogen header location   </a></li>
+<li><a href="notes/parametric_log_filters.txt">   Pass parameters to log filters from the command line </a></li>
+<li><a href="notes/delete_on_failed_compile.txt"> Work-around for failed RVCT 2.2 compiles             </a></li>
+<li><a href="notes/query_cli.txt">                Obtain configuration data using --query option       </a></li>
+<li>                                              Carbide.xml now contains *_gcce aliases                  </li>
+<li><a href="notes/abiv1_implibs.txt">            ABIv1 import libraries not generated by default      </a></li>
+</ul>
+
+<h3>Defect Fixes</h3>
+<ul>
+
+<li><a href="http://developer.symbian.org/bugs/show_bug.cgi?id=2605"> SF Bug 2605 </a> - [Raptor] ROMFILE creation using Raptor is not clean </li>
+<li><a href="http://developer.symbian.org/bugs/show_bug.cgi?id=2495"> SF Bug 2495 </a> - [Raptor] KDLL TARGETTYPEs do not support .def file freezing </li>
+<li><a href="http://developer.symbian.org/bugs/show_bug.cgi?id=2420"> SF Bug 2420 </a> - [Raptor] Output from recipes is mis-recognised as "what" output </li>
+<li><a href="http://developer.symbian.org/bugs/show_bug.cgi?id=2297"> SF Bug 2297 </a> Python exception in raptor_meta.py when processing bld.inf file </li>
+<li><a href="http://developer.symbian.org/bugs/show_bug.cgi?id=2174"> SF Bug 2174 </a> - [Raptor] -- layer option shows errors when bld.inf missing in another layer </li>
+<li><a href="notes/tcomsupport.txt">Fix: ensure trace paths exist before build starts to avoid clashes during the build with some make engines    </a></li>
+<li><a href="notes/tcomsupport.txt">Fix: permit traces header directory to be specified in systemincludes - helps Qt    </a></li>
+<li><a href="notes/localresourcecopying.txt">Fix: (performance in cluster builds) do resource copying on local host.</a></li>
+<li>Fix: don't generate multiple copies of the same resource just because there are several target paths. Generate it once and copy that to the different target paths. Helps when winscw is built after an arm build.</li>
+<li>Fix: (performance) remove unnecessary copying of rpp files into epoc32\localisation as they are not used.</li>
+
+</ul>
+
+
 <h2>version 2.13.0</h2>
 
 <h3>New Features</h3>
@@ -22,21 +62,20 @@
 <h3>Defect Fixes</h3>
 <ul>
 
-<li>                                                                  DPDEF143018      - Raptor doesn't handle spaces in GCCE installation directory correctly                                                </li>
-<li>                                                                  DPDEF143101      - GCC-E isn't tested as part of the tool checking mechanism                                                            </li>
-<li>                                                                  DPDEF141195      - Raptor doesn't handle spaces in tool paths                                                                           </li>
+<li>DPDEF143018      - Raptor doesn't handle spaces in GCCE installation directory correctly                                                </li>
+<li>DPDEF143101      - GCC-E isn't tested as part of the tool checking mechanism                                                            </li>
+<li>DPDEF141195      - Raptor doesn't handle spaces in tool paths                                                                           </li>
 <li><a href="http://developer.symbian.org/bugs/show_bug.cgi?id=2172"> SF Bug 2172 </a> - [Raptor] Resource builds warn on encountering trigraph-like strings                                                  </li>
 <li><a href="http://developer.symbian.org/bugs/show_bug.cgi?id=2308"> SF Bug 2308 </a> - [Raptor] PLUGIN3 TARGETTYPEs don't set resource output offsets correctly                                             </li>
-<li>                                                                  Fix: in copylogfromannofile mode, ensure that the build id and duration are included in the log.  These are not critical but are useful </li>
-<li>                                                                  Fix: remove unnecessary empty lines in log output in copylogfromannofile mode                                                           </li>
+<li>Fix: in copylogfromannofile mode, ensure that the build id and duration are included in the log.  These are not critical but are useful </li>
+<li>Fix: remove unnecessary empty lines in log output in copylogfromannofile mode                                                           </li>
 <li><a href="http://developer.symbian.org/bugs/show_bug.cgi?id=1939"> SF Bug 1939 </a> - [Raptor] PAGED keyword in MMP files should imply byte pair compressed                                                </li>
-<li>                                                                  DPDEF144648      - Raptor failed to build tools_deb objects under Windows XP                                                            </li>
+<li>DPDEF144648      - Raptor failed to build tools_deb objects under Windows XP                                                            </li>
 <li><a href="http://developer.symbian.org/bugs/show_bug.cgi?id=2134"> SF Bug 2134 </a> - [Raptor] Raptor does not pass overridden make variables into its makefiles                                           </li>
-<li>                                                                  Fix : do not allow data to be paged implicitly                                                                                          </li>
-<li>                                                                  Fix : sort build configurations by name for metadata preprocessing                                                                      </li>
+<li>Fix : do not allow data to be paged implicitly</li>
 <li><a href="http://developer.symbian.org/bugs/show_bug.cgi?id=2302"> SF Bug 2302 </a> - sbs_filter refers to python.exe in win32/python264/                                                                  </li>
-<li>                                                                  Fix : ensure that FLMDEBUG is empty by default                                                                                          </li>
-
+<li>Fix : Makefile Parse Performance in Resource stage is poor. Large size of included dependency files is a factor. In --no-depend-generate mode, create dependency files which only refer to other rsg/mbg files that are yet to be built - store no other dependencies.</li>
+<li>Fix : ensure that FLMDEBUG is empty by default</li>
 </ul>
 
 <!-- older notes are plain text -->
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/bin/depcrunch.py	Fri Jun 04 13:09:28 2010 +0100
@@ -0,0 +1,111 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# 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: 
+# Minimise the dependencies in a C preprocessor dependency file to
+# those that CPP could not find.  Then add in an assumption about 
+# where to find them.  Output is assumed to be relevant to only one target
+# even if multiple dep files are analysed.
+#
+
+import sys
+from  optparse import OptionParser
+import re
+
+class NoTargetException(Exception):
+	pass
+
+def depcrunch(file,extensions,assume):
+	target_pattern = r"^\s*(\S+):\s+"
+	target_re = re.compile(target_pattern)
+	# Not the use of (?i) in the following expression.  re.I seems to cause re.findall
+	# to not actually find all files matching the extension whereas (?i) provides
+	# case insensitivity at the right point and it works.  Really don't understand this.
+	extension_pattern = r"\s([^/ \t]+\.((?i)" + "|".join([t for t in extensions]) + r"))\b"
+	extension_re = re.compile(extension_pattern)
+
+	target = None
+
+	deps = []
+
+	# Read through the dependencies.
+	for l in file:
+		l = l.replace("\\","/").rstrip("\n\r")
+
+		# Look out for the target name if 
+		# we have not found it yet
+		if not target:
+			t = target_re.match(l)
+			if t:
+				target = t.groups()[0]
+
+		# Look for prerequisites matching the 
+		# extensions.  There may be one or more on 
+		# the same line as the target name.
+		# Don't use re.I - somehow prevents 
+		# all but one match in a line which may have several files
+		m = extension_re.findall(l)
+		if m:
+			deps.extend([d[0] for d in m])
+
+	if not target:
+		raise NoTargetException()
+
+	if len(deps) > 0:
+		print "%s: \\" % target
+		for d in deps[:-1]:
+			print " %s \\" % (assume + "/" + d)
+		print " %s " % (assume + "/" + deps[-1])
+
+
+
+
+## Command Line Interface ####################################################
+
+parser = OptionParser(prog = "depcrunch",
+	usage = "%prog [-h | options] [<depfile>]")
+
+parser.add_option("-e", "--extensions", 
+	 action="store", dest="extensions", type='string', help="comma separated list of file extensions of missing files to keep in the crunched dep file.") 
+
+parser.add_option("-a", "--assume", 
+	 action="store", dest="assume", type='string', help="when cpp reports missing dependencies, assume that they are in this directory") 
+
+(options, args) = parser.parse_args()
+
+
+if not options.extensions:
+	parser.error("you must specify a comma-separated list of file extensions with the -e option.")
+	sys.exit(1)
+
+if not options.assume:
+	parser.error("you must specify an 'assumed directory' for correcting missing dependencies with the -a option.")
+	sys.exit(1)
+
+depfilename="stdin"
+if len(args) > 0:
+	depfilename=args[0]
+	file = open(depfilename,"r")
+else:
+	file = sys.stdin
+try:
+	depcrunch(file,options.extensions.split(","), options.assume)
+except NoTargetException,e:
+	sys.stderr.write("Target name not found in dependency file\n");
+	sys.exit(2)
+	
+
+if file != sys.stdin:
+	file.close()
+
+sys.exit(0)
--- a/sbsv2/raptor/bin/recipestats.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/bin/recipestats.py	Fri Jun 04 13:09:28 2010 +0100
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -18,8 +18,21 @@
 # e.g. total times and so on.
 
 import time
+import __future__
+
+
+
 
 class RecipeStats(object):
+	def __init__(self, name, count, time):
+		self.name=name
+		self.count=count
+		self.time=time
+
+	def add(self, duration):
+		self.time += duration
+
+class BuildStats(object):
 	STAT_OK = 0
 
 
@@ -29,9 +42,10 @@
 		self.failtime = 0.0
 		self.failtypes = {}
 		self.retryfails = 0
+		self.hosts = {}
 		
-	def add(self, starttime, duration, name, status):
-		if status != RecipeStats.STAT_OK:
+	def add(self, starttime, duration, name, status, host, phase):
+		if status != BuildStats.STAT_OK:
 			self.failcount += 1
 			if name in self.failtypes:
 				self.failtypes[name] += 1
@@ -43,43 +57,84 @@
 			return
 			
 		if name in self.stats:
-			(count, time) = self.stats[name]
-			self.stats[name] = (count + 1, time + duration)
+			r = self.stats[name]
+			r.add(duration)
 		else:
-			self.stats[name] = (1,duration)
+			self.stats[name] = RecipeStats(name,1,duration)
+
+		hp=host
+		if hp in self.hosts:
+			self.hosts[hp] += 1
+		else:
+			self.hosts[hp] = 1
 
 	def recipe_csv(self):
-		s = "# name, time, count\n"
-		for (name,(count,time)) in self.stats.iteritems():
-			s += '"%s",%s,%d\n' % (name, str(time), count)
+		s = '"name", "time", "count"\n'
+		l = sorted(self.stats.values(), key= lambda r: r.time, reverse=True)
+		for r in l:
+			s += '"%s",%s,%d\n' % (r.name, str(r.time), r.count)
 		return s
 
+	def hosts_csv(self):
+		s='"host","recipecount"\n'
+		hs = self.hosts
+		for h in sorted(hs.keys()):
+			s += '"%s",%d\n' % (h,hs[h])
+		return s
 
 
 import sys
 import re
+import os
+from optparse import OptionParser # for parsing command line parameters
 
 def main():
-
-	f = sys.stdin
-	st = RecipeStats()
-
-	recipe_re = re.compile(".*<recipe name='([^']+)'.*")
+	recipe_re = re.compile(".*<recipe name='([^']+)'.*host='([^']+)'.*")
 	time_re = re.compile(".*<time start='([0-9]+\.[0-9]+)' *elapsed='([0-9]+\.[0-9]+)'.*")
 	status_re = re.compile(".*<status exit='(?P<exit>(ok|failed))'( *code='(?P<code>[0-9]+)')?.*")
+	phase_re = re.compile(".*<info>Making.*?([^\.]+\.[^\.]+)</info>")
+
+	parser = OptionParser(prog = "recipestats",
+                                          usage = """%prog --help [-b] [-f <logfilename>]""")
+
+	parser.add_option("-b","--buildhosts",action="store_true",dest="buildhosts_flag",
+                                help="Lists which build hosts were active in each invocation of the build engine and how many recipes ran on each.", default = False)
+	parser.add_option("-f","--logfile",action="store",dest="logfilename", help="Read from the file, not stdin", default = None)
+
+
+	(options, stuff) = parser.parse_args(sys.argv[1:])
+
+	if options.logfilename is None:
+		f = sys.stdin
+	else:
+		f = open(options.logfilename,"r")
+
+	st = BuildStats()
+
 
 	alternating = 0
 	start_time = 0.0
 
-	
-	for l in f.xreadlines():
+	phase=None
+	for l in f:
 		l2 = l.rstrip("\n\r")
+
 		rm = recipe_re.match(l2)
 
 		if rm is not None:
-			rname = rm.groups()[0]
+			(rname,host) = rm.groups()
 			continue
 
+		pm = phase_re.match(l2)
+
+		if pm is not None:
+			if phase is not None:
+				if options.buildhosts_flag:
+					print('"%s"\n' % phase)
+					print(st.hosts_csv())
+			st.hosts = {}	
+			phase = pm.groups()[0]
+			continue
 
 		tm = time_re.match(l2)
 		if tm is not None:
@@ -109,9 +164,13 @@
 		else:
 			status = int(sm.groupdict()['code'])
 
-		st.add(s, elapsed, rname, status)
+		st.add(s, elapsed, rname, status, host, phase)
 
-	print st.recipe_csv()
+	if options.buildhosts_flag:
+		print('"%s"\n' % phase)
+		print(st.hosts_csv())
+	else:
+		print(st.recipe_csv())
 
 
 if __name__ == '__main__': main()
--- a/sbsv2/raptor/bin/sbs_filter.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/bin/sbs_filter.py	Fri Jun 04 13:09:28 2010 +0100
@@ -1,6 +1,6 @@
 #!/usr/bin/python
 
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Symbian Foundation License v1.0"
@@ -46,7 +46,7 @@
 	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:])
+the_raptor = raptor.Raptor.CreateCommandlineAnalysis(sys.argv[1:])
 
 # from Raptor.OpenLog()
 try:
@@ -58,7 +58,7 @@
 	raptor_params = raptor.BuildStats(the_raptor)
 
 	# Open the requested plugins using the pluginbox
-	the_raptor.out.open(raptor_params, the_raptor.filterList.split(','), pbox)
+	the_raptor.out.open(raptor_params, the_raptor.filterList, pbox)
 	
 except Exception, e:
 	sys.stderr.write("error: problem while creating filters %s\n" % str(e))
--- a/sbsv2/raptor/examples/os_properties.xml	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/examples/os_properties.xml	Fri Jun 04 13:09:28 2010 +0100
@@ -18,6 +18,7 @@
 		<set name='POSTLINKER_SUPPORTS_WDP' value=''/>
 		<set name='SUPPORTS_STDCPP_NEWLIB' value=''/>
 		<set name='RVCT_PRE_INCLUDE' value='$(EPOCINCLUDE)/rvct2_2/rvct2_2.h'/>
+		<set name="SUPPORTS_ABIV1_IMPLIBS" value='1'/>
 	</var>
 	
 </build>
--- a/sbsv2/raptor/lib/config/arm.xml	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/lib/config/arm.xml	Fri Jun 04 13:09:28 2010 +0100
@@ -79,7 +79,6 @@
 		<set name="LINKER_ARCH_OPTION" value="$(LD.ARMV5)"/>
 		<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">
 		<set name="TRADITIONAL_PLATFORM" value="ARMV6"/>
@@ -92,6 +91,7 @@
 		<set name="STATIC_RUNTIME_DIR" value="$(EPOCROOT)/epoc32/release/armv5/$(VARIANTTYPE)"/>
 		<set name="COMPILER_FPU_DEFAULT" value="$(CC.SOFTVFP_MAYBE_VFPV2)"/>
 		<set name="POSTLINKER_FPU_DEFAULT" value="$(PL.SOFTVFP_MAYBE_VFPV2)"/>
+		<set name="SUPPORTS_ABIV1_IMPLIBS" value=""/>
 	</var>
 	<var name="v7">
 		<set name="TRADITIONAL_PLATFORM" value="ARMV7"/>
@@ -103,6 +103,7 @@
 		<set name="LINKER_ARCH_OPTION" value="$(LD.ARMV7)"/>
 		<set name="COMPILER_FPU_DEFAULT" value="$(CC.SOFTVFP_MAYBE_VFPV3)"/>
 		<set name="POSTLINKER_FPU_DEFAULT" value="$(PL.SOFTVFP_MAYBE_VFPV3)"/>
+		<set name="SUPPORTS_ABIV1_IMPLIBS" value=""/>
 	</var>
 	<var name="9e" extends="v5">
 		<set name="VARIANTPLATFORM" value="arm9e"/>
--- a/sbsv2/raptor/lib/config/carbide.xml	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/lib/config/carbide.xml	Fri Jun 04 13:09:28 2010 +0100
@@ -27,6 +27,22 @@
 			<config name="armv9e_urel"/>
 			<config name="armv9e_udeb"/>
 		</config>
+		<config name="armv5_gcce" abstract="true">
+			<config name="armv5_urel_gcce"/>
+			<config name="armv5_udeb_gcce"/>
+		</config>
+		<config name="armv6_gcce" abstract="true">
+			<config name="armv6_urel_gcce"/>
+			<config name="armv6_udeb_gcce"/>
+		</config>
+		<config name="armv7_gcce" abstract="true">
+			<config name="armv7_urel_gcce"/>
+			<config name="armv7_udeb_gcce"/>
+		</config>
+		<config name="armv9e_gcce" abstract="true">
+			<config name="armv9e_urel_gcce"/>
+			<config name="armv9e_udeb_gcce"/>
+		</config>
 	</config>
 
 	<config name="winscw" abstract="true">
--- a/sbsv2/raptor/lib/config/locations.xml	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/lib/config/locations.xml	Fri Jun 04 13:09:28 2010 +0100
@@ -109,6 +109,7 @@
 
 		<set name='BUILD_INCLUDE' value=''/>
 		<set name='CREATEVMAP' value='$(PYTHON) $(SBS_HOME)/bin/createvmap.py' type='script'/>
+		<set name='DEPCRUNCH' value='$(PYTHON) $(SBS_HOME)/bin/depcrunch.py' type='script'/>
 		<set name='CREATEVMAPCPP' value='$(SBS_BVCPP)' type='tool'/>
 		<set name='FEATURELISTFILES' value=''/>
 		<set name='FEATUREVARIANTNAME' value=''/>
--- a/sbsv2/raptor/lib/config/make.xml	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/lib/config/make.xml	Fri Jun 04 13:09:28 2010 +0100
@@ -13,6 +13,9 @@
 		<set name='TALON_TIMEOUT' value='600000'/>
 		<set name='TALON_DESCRAMBLE' value='1'/>
 		
+		<!-- Work around for RVCT compile failures -->
+		<set name='DELETE_ON_FAILED_COMPILE' value='1'/>
+		
 		<!-- Command-line for initialisation -->
 		<set name="initialise" value=""/>
 
@@ -52,7 +55,7 @@
 		<set name="copylogfromannofile" value="false"/>
 	</var>
 	
-	<alias name="make" meaning="make_engine"/>
+	<alias name="make" meaning="make_engine" type="engine"/>
 
 	<!-- use the talon shell -->
 	<var name="make_no_talon_engine" extends="make_engine">
@@ -60,7 +63,7 @@
 	        <set name='USE_TALON' value=''/>
 	</var>
 
-	<alias name="make_no_talon" meaning="make_no_talon_engine"/>
+	<alias name="make_no_talon" meaning="make_no_talon_engine" type="engine"/>
 
 	<!-- other derived versions of GNU make -->
 
@@ -70,12 +73,13 @@
 		<set name="build" value="$(EMAKE) HAVE_ORDERONLY= -r"/>
 		<set name="scrambled" value="false"/>
 		<set name='TALON_DESCRAMBLE' value=''/>
+		<set name='DELETE_ON_FAILED_COMPILE' value=''/>
 
 		<!-- workaround for damaged log output from emake -->
 		<set name="copylogfromannofile" value="true"/>
 	</var>
 
-	<alias name="emake" meaning="emake_engine"/>
+	<alias name="emake" meaning="emake_engine" type="engine"/>
 	
 	<!-- use the talon shell -->
 	<var name="emake_no_talon_engine" extends="emake_engine">
@@ -83,7 +87,7 @@
 	        <set name='USE_TALON' value=''/>
 	</var>
 
-	<alias name="emake_no_talon" meaning="emake_no_talon_engine"/>
+	<alias name="emake_no_talon" meaning="emake_no_talon_engine" type="engine"/>
 	
 	<!-- Raptor make engine for PVMgmake -->
 	<var name="pvmgmake_engine" extends="make_engine">
@@ -91,8 +95,9 @@
 		<set name="build" value="$(PVMGMAKE) HAVE_ORDERONLY=true  -r"/>
 		<set name="scrambled" value="false" />
 		<set name='TALON_DESCRAMBLE' value=''/>
+		<set name='DELETE_ON_FAILED_COMPILE' value=''/>
 	</var>
 
-	<alias name="pvmgmake" meaning="pvmgmake_engine"/>
+	<alias name="pvmgmake" meaning="pvmgmake_engine" type="engine"/>
 
 </build>
--- a/sbsv2/raptor/lib/config/root.xml	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/lib/config/root.xml	Fri Jun 04 13:09:28 2010 +0100
@@ -45,6 +45,7 @@
 		<set name='POSTLINKER_SUPPORTS_WDP' value='1'/>
 		<set name='SUPPORTS_STDCPP_NEWLIB' value='1'/>
 		<set name="RVCT_PRE_INCLUDE" value="$(EPOCINCLUDE)/rvct/rvct.h"/>
+		<set name="SUPPORTS_ABIV1_IMPLIBS" value=''/>
 	</var>
 	
 	<!-- Placeholder for the root.changes variant. This will typically be
--- a/sbsv2/raptor/lib/config/rvct.xml	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/lib/config/rvct.xml	Fri Jun 04 13:09:28 2010 +0100
@@ -87,8 +87,7 @@
 		<set name="SO_NAME_OPTION" value="--soname"/>
 		<set name="STATIC_LIBS_PATH" value="$(RVCTLIB)/armlib"/>
 		<set name="STDCPP_INCLUDE" value="$(EPOCINCLUDE)/stdapis"/>
-		<set name="STDLIB_OPTION" value="--no_scanlib"/>
-		<set name="SUPPORTS_ABIV1_IMPLIBS" value="1"/>	
+		<set name="STDLIB_OPTION" value="--no_scanlib"/>	
 		<set name="SYMBIAN_LD_MESSAGE_OPTION" value="$(LD_WARNINGS_CONTROL_OPTION) $(LD_ERRORS_CONTROL_OPTION)"/>
 		<set name="SYMVER_OPTION" value="--symver_soname"/>
 		<set name="TARGET_RELOCATION_OPTION" value=""/>
@@ -101,6 +100,7 @@
 		<set name="UNDEFINED_SYMBOL_REF_OPTION" value=""/>
 		<set name="UNIX_SLASH_FOR_CC_ABS_PATHS" value="0"/>
 		<set name="UNRESOLVED_SYMBOL_REF_OPTION" value=""/>
+		<set name="USE_RVCT22_DELETE_WORKAROUND" value=""/>
 		<set name="USERINCLUDE" value=""/>
 		<set name="USER_LIBS_PATH_OPTION" value="--userlibpath"/>
 		<set name="VFE_OPTION" value="--no_vfe"/>
--- a/sbsv2/raptor/lib/config/variants.xml	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/lib/config/variants.xml	Fri Jun 04 13:09:28 2010 +0100
@@ -82,7 +82,7 @@
 		<!-- PLATMACROS.LINUX is set from PLATMACROS.WINDOWS -->
 		<append name="TRADITIONAL_PLATFORM" value='SMP' separator="" />
 		<append name="VARIANTPLATFORM" value="smp" separator=""/>
-		<set name="GENERATE_ABIV1_IMPLIBS" value=""/>
+		<set name="SUPPORTS_ABIV1_IMPLIBS" value=""/>
 	</var>
 
 	<!-- emit formatted releasable information into the logs for post-build parsing -->
@@ -142,6 +142,7 @@
 		<set name="PL.SOFTVFP_MAYBE_VFPV2" value="softvfp"/>
 		<set name="CC.ARMV5" value="--cpu 5T"/>
 		<set name="CC.ARMV6" value="--cpu 6"/>
+		<set name="USE_RVCT22_DELETE_WORKAROUND" value="1" />
 	</var>
 
 	<var name="rvct3_1" extends="rvct">
--- a/sbsv2/raptor/lib/config/winscw.xml	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/lib/config/winscw.xml	Fri Jun 04 13:09:28 2010 +0100
@@ -127,7 +127,7 @@
 		<set name="PLATMACROS.LINUX" value="$(PLATMACROS.WINDOWS)"/>
 	</var>
 
-	<var name="winscw_udeb" extends="winscw_base">
+	<var name="winscw_debug">
 		<set name="FULLVARIANTPATH" value="winscw/udeb"/>
 		<set name="VARIANTTYPE" value="udeb"/>
 
@@ -135,17 +135,19 @@
 		<append name="CFLAGS" value="-g -O0 -inline off"/>
 		<append name="LFLAGS" value="-g"/>
 	</var>
-
-	<var name="winscw_urel" extends="winscw_base">
+	<alias name="winscw_udeb" meaning="winscw_base.winscw_debug"/>
+	
+	<var name="winscw_release">
 		<set name="FULLVARIANTPATH" value="winscw/urel"/>
 		<set name="VARIANTTYPE" value="urel"/>
 
 		<append name="CDEFS" value="NDEBUG"/>
 		<append name="CFLAGS" value="-O4,s"/>
 	</var>
-
+	<alias name="winscw_urel" meaning="winscw_base.winscw_release"/>
+	
 	<group name="winscw">
-		<varRef ref="winscw_urel"/>
-		<varRef ref="winscw_udeb"/>
+		<aliasRef ref="winscw_urel"/>
+		<aliasRef ref="winscw_udeb"/>
 	</group>
 </build>
--- a/sbsv2/raptor/lib/flm/base.xml	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/lib/flm/base.xml	Fri Jun 04 13:09:28 2010 +0100
@@ -18,6 +18,7 @@
 		<param name='DUMPBCINFO' default=''/>
 		<param name='FLMDEBUG'  default=''/>
 		<param name='PLATFORM' default=''/>
+		<param name='PYTHON' default=''/> <!-- allow python scripts to be used in general flms -->
 		<param name='GNUMAKE38'/>
 		<param name='GNUCP'/>
 		<param name='GNUCAT'/>
@@ -84,6 +85,7 @@
 	</interface>
 	<interface name="base.resource" extends="base.flm" flm="resource.flm">
 		<param name='BINCOPYDIRS' default=''/>
+		<param name='DEPCRUNCH'/>
 		<param name='MMPDEFS' default=''/>
 		<param name='GNUCPP'/>
 		<param name='GNUSED'/>
--- a/sbsv2/raptor/lib/flm/e32abiv2.flm	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/lib/flm/e32abiv2.flm	Fri Jun 04 13:09:28 2010 +0100
@@ -48,11 +48,18 @@
 
 ifeq ($(DOBUILD),1)
 
-$(if $(FLMDEBUG),$(info <flm name='e32abiv2' target='$(TARGET)' type='$(TARGETTYPE)' outputpath='$(OUTPUTPATH)' metasource='$(METASOURCE)' postlinkfiletype='$(POSTLINKFILETYPE)' />))
+$(if $(FLMDEBUG),$(info <debug><flm name='e32abiv2' target='$(TARGET)' type='$(TARGETTYPE)' outputpath='$(OUTPUTPATH)' metasource='$(METASOURCE)' postlinkfiletype='$(POSTLINKFILETYPE)' /></debug>))
+
+# Enable DELETE_ON_FAILED_COMPILE work around for failed RVCT 2.2 compiles
+ifneq ($(DELETE_ON_FAILED_COMPILE),)
+RVCT22_DELETE_WORKAROUND:=|| { $$(GNURM) $$@; exit 1; }
+endif # ifneq ($(DELETE_ON_FAILED_COMPILE),)
 
 # Strip switch-type parameters
 #
 POSTLINKTARGETTYPE:=$(strip $(POSTLINKTARGETTYPE))
+TARGETEXT:=$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE))
+
 UID1:=$(strip $(UID1))
 UID2:=$(strip $(UID2))
 UID3:=$(strip $(UID3))
@@ -128,9 +135,9 @@
 
 # Postlinkable targets need to be linked and elf2e32'd
 ifneq ($(DOPOSTLINK),)
-    E32TARGET:=$(RELEASABLEPATH)/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE))
-    LINK_TARGET:=$(RELEASABLEPATH)/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE)).sym
-    MAPFILE:=$(RELEASABLEPATH)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE)).map
+    E32TARGET:=$(RELEASABLEPATH)/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(TARGETEXT)
+    LINK_TARGET:=$(RELEASABLEPATH)/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(TARGETEXT).sym
+    MAPFILE:=$(RELEASABLEPATH)/$(TARGET).$(TARGETEXT).map
 else
   E32TARGET:=
   LINK_TARGET:=
@@ -165,13 +172,12 @@
     IMPORTLIBTARGETVERSIONED_DSO:=$(VER_E32IMPORTLIBBASE).dso
   endif
 
-  # ABIv1 .lib (for specific builds, toolchains and host OS platforms only)
+  # ABIv1 .lib (for specific kits and toolchains only)
   IMPORTLIBTARGET_LIB:=
   IMPORTLIBTARGETVERSIONED_LIB:=
   BUILDMARKER_IMPORTLIBTARGET_LIB:=TARGET_$(subst :,,$(VER_E32IMPORTLIBBASE)).lib
-  # Only for builds that require and support them, and only on windows
-  ifeq ($(OSTYPE),cygwin)
-  ifeq ($(GENERATE_ABIV1_IMPLIBS),1)
+  # Only for kits that require and tools that support them
+  ifneq ($(SUPPORTS_ABIV1_IMPLIBS),)
     WHATRELEASE:=$(WHATRELEASE) $(if $(EXPLICITVERSION),,$(TMP_IMPORTLIBTARGET_ROOT).lib)
     WHATRELEASE:=$(WHATRELEASE) $(VER_E32IMPORTLIBBASE).lib
     ifeq ($($(BUILDMARKER_IMPORTLIBTARGET_LIB)),)
@@ -179,7 +185,6 @@
       IMPORTLIBTARGETVERSIONED_LIB:=$(VER_E32IMPORTLIBBASE).lib
     endif
   endif
-  endif
 endif
 
 # Try to make sure that we get the right linkas name
@@ -187,7 +192,7 @@
 # put the hex version number in the right place
 ifeq ($(LINKAS),)
   LINKASNAME=$(TARGET)
-  LINKASTYPE=$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE))
+  LINKASTYPE=$(TARGETEXT)
 else
   SPLIT_LINKAS=$(subst ., ,$(LINKAS))
   LINKASNAME=$(word 1,$(SPLIT_LINKAS))
@@ -712,6 +717,7 @@
 # USE_TRACE_COMPILER defaults to blank in Raptor config.
 # Users can turn TC on by setting it to 1 in user config.
 ifneq ($(USE_TRACE_COMPILER),)
+  # TARGETEXT is already set
   include $(FLMHOME)/tracecompiler.mk
   WHATRELEASE:=$(WHATRELEASE) $(TRACE_DICTIONARY) $(AUTOGEN_HEADER)
 endif
@@ -792,7 +798,7 @@
 			$(if $(NO_DEPEND_GENERATE),,$(DEPEND_OPTION) $(call dblquote,$(1).d)) \
 			$(if $(LINKERFEEDBACK_STAGE2),$(FEEDBACK_OPTION)$(call dblquote,$(FEEDBACKFILE))) \
 			$(if $(MULTIFILE_ENABLED),--multifile $(OUTPUT_OPTION) $(MULTIFILEOBJECT) \
-			--via $$(call dblquote, $(MULTIFILE_VIAFILE)),$(OUTPUT_OPTION) $$@ $$(call dblquote, $$<))  \
+			--via $$(call dblquote, $(MULTIFILE_VIAFILE)),$(OUTPUT_OPTION) $$@ $$(call dblquote, $$<)) $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \
 	$(call endrule,compile)
 
 ifeq ($(NO_DEPEND_GENERATE),)
@@ -851,7 +857,7 @@
 			$(if $(USERINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$(call dblquote,$(USERINCLUDE)))      \
 			$(if $(SYSTEMINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$(call dblquote,$(SYSTEMINCLUDE)))  \
 			$(if $(NOHIDEALL),--no_hide_all,) \
-			$$(call dblquote, $$<) $(OUTPUT_OPTION) $$(@) \
+			$$(call dblquote, $$<) $(OUTPUT_OPTION) $$(@) $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \
 	$(call endrule,e32cpponly)
 
 CLEANTARGETS:=$$(CLEANTARGETS) $(CPPONLYTARGET)
@@ -864,7 +870,7 @@
 define e32abiv2_listing
 # $1 is the sourcefile
 
-$(eval LISTINGTARGET:=$(strip $(call extractandmap,$(CPPFILEEXTENSIONS) $(CFILEEXTENSIONS),.$(subst _,.,$(call sanitise,$(FULLVARIANTPATH))).$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE)).lst,$1)))
+$(eval LISTINGTARGET:=$(strip $(call extractandmap,$(CPPFILEEXTENSIONS) $(CFILEEXTENSIONS),.$(subst _,.,$(call sanitise,$(FULLVARIANTPATH))).$(TARGET).$(TARGETEXT).lst,$1)))
 $(eval DEPENDFILENAME:=$(call map2listfile,$1).d)
 $(eval DEPENDFILE:=$(wildcard $(DEPENDFILENAME)))
 
@@ -886,7 +892,7 @@
 			$(if $(SYSTEMINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$(call dblquote,$(SYSTEMINCLUDE)))  \
 			$(if $(NOHIDEALL),--no_hide_all,) \
 			$(if $(NO_DEPEND_GENERATE),,$(DEPEND_OPTION) $(call dblquote,$(DEPENDFILENAME))) \
-			$$(call dblquote, $$<) $(OUTPUT_OPTION) $$(@) \
+			$$(call dblquote, $$<) $(OUTPUT_OPTION) $$(@) $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \
 	$(call endrule,e32listing)
 
 CLEANTARGETS:=$$(CLEANTARGETS) $(LISTINGTARGET)
@@ -920,7 +926,7 @@
 # separate arguments are interpreted as a single argument when passed to bash
 FIVESPACES=$(BLANK)     $(BLANK)
 
-FREEZEGUARD:=TARGET_$(TARGET)_$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE))_$(IMPORTLIBPATH)_EFREEZE
+FREEZEGUARD:=TARGET_$(TARGET)_$(TARGETEXT)_$(IMPORTLIBPATH)_EFREEZE
 
 define e32freeze
 
@@ -981,7 +987,7 @@
 			$(call makemacrodef,-D,$(COMPILER_INTERWORK_DEFINES) $(CDEFS) $(CIADEFS)) $(CPP_LANG_OPTION)      \
 	 		$(if $(USERINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$$(call dblquote,$(USERINCLUDE)))     \
 	 		$(if $(SYSTEMINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$$(call dblquote,$(SYSTEMINCLUDE))) \
-	 		$$(call dblquote, $$<) $(OUTPUT_OPTION) $$@ \
+	 		$$(call dblquote, $$<) $(OUTPUT_OPTION) $$@ $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \
 	$(call endrule,cia2cpp2o)
 
 
@@ -1007,7 +1013,7 @@
 $(e32abiv2_PREFILE): $1 $(PROJECT_META) $(if $(DEPENDFILE),,RESOURCE BITMAP EXPORT)
 	$(call startrule,cia2cpp,,$1) \
 	$(if $(PERTURBSTARTTIME),$(RANSLEEP) $(PERTURBMSECS) ;,) \
-	$(CC) $(e32abiv2_PREFILE_OPTIONS) $(OUTPUT_OPTION) $$@ $$(call dblquote,$1) \
+	$(CC) $(e32abiv2_PREFILE_OPTIONS) $(OUTPUT_OPTION) $$@ $$(call dblquote,$1) $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \
 	$(if $(NO_DEPEND_GENERATE),,&& $(CC) -M $(e32abiv2_PREFILE_OPTIONS) --depend_format=unix $(OUTPUT_OPTION) $$@ $$(call dblquote,$1) > $(call dblquote,$(e32abiv2_PREFILE).d)) \
 	$(call endrule,cia2cpp)
 
@@ -1052,12 +1058,12 @@
 		$(if $(PERTURBSTARTTIME),$(RANSLEEP) $(PERTURBMSECS) ;,) \
 		$(CC) $(e32abiv2_asm_OPTIONS) \
 		$(if $(NO_DEPEND_GENERATE),,$(DEPEND_OPTION) $(call dblquote,$(DEPENDFILENAME))) \
-	 	$$(call dblquote, $$<) $(OUTPUT_OPTION) $$@ \
+	 	$$(call dblquote, $$<) $(OUTPUT_OPTION) $$@ $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \
 	$(call endrule,asmcompile)
 ifeq ($(NO_DEPEND_GENERATE),)
 	$(call startrule,asmdependencies) \
 		$(CC) -M $(subst --no_rtti,,$(e32abiv2_asm_OPTIONS)) --depend_format=unix \
-	  	$(OUTPUT_OPTION) $$@ $$(call dblquote,$2) > $(call dblquote,$(DEPENDFILENAME)) \
+	  	$(OUTPUT_OPTION) $$@ $$(call dblquote,$2) > $(call dblquote,$(DEPENDFILENAME)) $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \
 	$(call endrule,asmdependencies)
 endif
 
@@ -1096,7 +1102,7 @@
         # Default values
         ROMFILETYPE:=file
         ROMFILE:=$(TARGET).$(REQUESTEDTARGETEXT)
-        ROMPATH:=sys/bin/
+        ROMPATH:=$(if $(TARGETPATH),$(TARGETPATH)/,sys/bin/)
         ROMDECORATIONS:=
         ROMFILETYPE_RAM:=data
         ROMFILE_RAM:=$(TARGET).$(REQUESTEDTARGETEXT)
@@ -1117,6 +1123,7 @@
         endif
 
 
+        DATATEXT:=
         ifeq ($(TESTCODE),TRUE)
         	# Add 'TEST' to the .iby filename
         	ROMTEST:=test
@@ -1127,8 +1134,6 @@
                     DATATEXT:="data=/epoc32/data/z/test/$(MODULE)/$(VARIANTPLATFORM).$(TEST_OPTION).bat test/$(MODULE).$(TEST_OPTION).bat"
                 endif
             endif
-        else
-        	DATATEXT:=
         endif
 
         # ROMTARGET
@@ -1174,8 +1179,8 @@
 	        $(call startrule,rombuild)	\
 	        $(GNUMKDIR) -p $(ROMDIR) \
             $(if $(ROMFILE_CREATED_$(TOBLDINF)),,&& echo -e "// $(subst $(EPOC_ROOT)/,,$(ROMFILENAME))\n//\n$(DATATEXT)" > $(ROMFILENAME)) \
-            $(if $(BUILDROMTARGET),&& echo "$(ROMFILETYPE)=/epoc32/release/##$(ABIDIR)##/##BUILD##/$(TARGET).$(REQUESTEDTARGETEXT)   $(1)$(ROMDECORATIONS)" >> $(ROMFILENAME))	\
-	        $(if $(RAMTARGET),&& echo "$(ROMFILETYPE_RAM)=/epoc32/release/##$(ABIDIR)##/##BUILD##/$(TARGET).$(REQUESTEDTARGETEXT)   $(ROMPATH_RAM)$(ROMFILE_RAM)$(ROMDECORATIONS_RAM)" >> $(ROMFILENAME))	\
+            $(if $(BUILDROMTARGET),&& echo "$(ROMFILETYPE)=/epoc32/release/##$(ABIDIR)##/##BUILD##/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(REQUESTEDTARGETEXT)   $(1)$(ROMDECORATIONS)" >> $(ROMFILENAME))	\
+	        $(if $(RAMTARGET),&& echo "$(ROMFILETYPE_RAM)=/epoc32/release/##$(ABIDIR)##/##BUILD##/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(REQUESTEDTARGETEXT)   $(ROMPATH_RAM)$(ROMFILE_RAM)$(ROMDECORATIONS_RAM)" >> $(ROMFILENAME))	\
 	        $(call endrule,buildromfiletarget)
     endef
 
--- a/sbsv2/raptor/lib/flm/e32abiv2kdll.flm	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/lib/flm/e32abiv2kdll.flm	Fri Jun 04 13:09:28 2010 +0100
@@ -1,4 +1,4 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -48,6 +48,7 @@
 IMPORTLIBRARYREQUIRED:=1
 endif
 POSTLINKDEFFILE:=$(DEFFILE)
+SUPPORT_FREEZE:=1
 
 # No exception support for kernel code?
 EXCEPTIONS:=$(NO_EXCEPTIONS)
--- a/sbsv2/raptor/lib/flm/resource.flm	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/lib/flm/resource.flm	Fri Jun 04 13:09:28 2010 +0100
@@ -48,115 +48,119 @@
 # Ensure that RELEASABLES and CLEANTARGETS cannot expand indefinitely in successive calls to this flm:
 CLEANTARGETS:=
 RELEASABLES:=
+CREATABLEPATHS:=
 
 # There is only one resource header (.rsg) file and we only
 # make that if we are asked.
 RSGDIR:=$(EPOCROOT)/epoc32/include
+# If there are multiple LANGUAGES then it is the last one in the list
+# which produces the header.
+HEADLANG:=$(lastword $(LANGUAGES:SC=sc))
 ifneq ($(or $(HEADER),$(HEADERONLY)),)
         RESOURCEHEADER:=$(RSGDIR)/$(HEADER)
 
-        # If there are multiple LANGUAGES then it is the last one in the list
-        # which produces the header.
-        HEADLANG:=$(lastword $(LANGUAGES:SC=sc))
 else
-	HEADLANG:=
-    RESOURCEHEADER:=
+        RESOURCEHEADER:=
 endif
 
 # we create intermediate .rpp and .d files
-INTERBASE:=$(OUTPUTPATH)/$(TARGET_lower)$(if $(TARGETPATH),_$(subst /,_,$(TARGETPATH)),)
-
-################################## localisation ###########################$(GNUMKDIR)#############
-# Only make copies for full resource builds
-
-# Initialise to prevent RELEASABLES spill-over between calls
-DESTRPP:=
-INFOFILE:=
-
-ifeq ($(HEADERONLY),)
-
-RSSBASENAME:=$(call lowercase,$(basename $(notdir $(SOURCE))))
-DESTRPP:=$(EPOCROOT)/epoc32/localisation/$(RSSBASENAME)/rsc/$(RSSBASENAME).rpp
-$(call makepath,$(EPOCROOT)/epoc32/localisation/$(RSSBASENAME)/rsc)
-
-INFOFILE:=$(EPOCROOT)/epoc32/localisation/group/$(RSSBASENAME).info
-# If there are MULTIPLE languages then copy the .rpp for the last one
-RPPLANG:=$(lastword $(LANGUAGES:SC=sc))
-
-# Copy .rpp files from epoc32/build/ to epoc32/localisation/x/rsc/x.rpp and create .info files in localisation
-define CreateRppAndInfo
+INTERBASE_TMP:=$(OUTPUTPATH)/$(TARGET_lower)_$(notdir $(basename $(SOURCE)))
 
-ifeq ($(RESOURCE_$(call sanitise,$(SOURCE))),)
-RESOURCE_$(call sanitise,$(SOURCE)):=1
-
-RESOURCE:: $(DESTRPP) $(INFOFILE)
-
-$(DESTRPP): $(INTERBASE)_$(RPPLANG).rpp
-	$(call startrule,rppfilecopy,FORCESUCCESS) \
-	$(GNUCP) $$< $$@ \
-	$(call endrule,rppfilecopy)
-
-$(INFOFILE)::
-	@if [ ! -d $(EPOCROOT)/epoc32/localisation/group ]; then $(GNUMKDIR) -p $(EPOCROOT)/epoc32/localisation/group; fi
-	@if [ ! -f $$@ ]; then echo "DATADIR: /$(RSSBASENAME)" > $$@ ; fi
-	@echo -e "\n/z$(TARGETPATH)/$(TARGET_lower).rsc : $(RSSBASENAME).rpp" >> $$@
-
-endif
-endef
-
-$(eval $(call CreateRppAndInfo))
-endif
-################################# end of localisation ###################################
-
-# make the output directories while reading makefile - some build engines prefer this
-$(call makepath,$(INTERBASE))
 
 # common pre-processor options
+
+# We really should be using -iquote with a recent cpp.  This is a note for when we do update:
+#CPPOPT:=-nostdinc -undef -Wno-trigraphs -D_UNICODE -include $(PRODUCT_INCLUDE)\
+# -I$(dir $(SOURCE)) $(foreach I, $(USERINCLUDE),-iquote $(I) ) $(foreach J,$(SYSTEMINCLUDE),-I $(J) )
+
 CPPOPT:=-nostdinc -undef -Wno-trigraphs -D_UNICODE -include $(PRODUCT_INCLUDE)\
  -I$(dir $(SOURCE)) $(foreach I, $(USERINCLUDE),-I$(I) ) -I- $(foreach J,$(SYSTEMINCLUDE),-I$(J) )
 
-CREATABLEPATHS:=$(RSCDIR) $(RSGDIR) $(OUTPUTPATH)
+CREATABLEPATHS:=$(CREATABLEPATHS) $(RSCDIR) $(RSGDIR) $(OUTPUTPATH) 
+
+# We intend to generate the resource in an intermediate location and copy to the targetpath to
+# ensure that when the "same" resource is built into separare target paths, it doesn't have to be 
+# completely recreated each time - just copied.
+RSCCOPYDIRS:=$(RSCDIR)
 
 # additional binary resource copies performed based on BINCOPYDIRS
-RSCCOPYDIRS:=
 ifneq ($(BINCOPYDIRS),)
-        RSCCOPYDIRS:=$(subst //,/,$(patsubst %,%/$(if $(TARGETPATH),/z/$(TARGETPATH),),$(BINCOPYDIRS)))
-        CREATABLEPATHS:=$(CREATABLEPATHS) $(RSCCOPYDIRS)
+        RSCCOPYDIRS:=$(RSCCOPYDIRS) $(subst //,/,$(patsubst %,%/$(if $(TARGETPATH),/z/$(TARGETPATH),),$(BINCOPYDIRS)))
 endif
+CREATABLEPATHS:=$(CREATABLEPATHS) $(RSCCOPYDIRS)
 
 ###############################################################################
+
+
 define preprocessresource
-# $(1) is the RPPFILE		(eg. /epoc32/build/xxx/b_sc.rpp)
-# $(2) is the related RESOURCEFILE if any (eg. /a/b.rsc)
-# $(3) is the LANGUAGE		(eg. sc or 01 or 02 ...)
+# $1 is the RPPFILE		(eg. /epoc32/build/xxx/b_sc.rpp)
+# $2 is the LANGUAGE		(eg. sc or 01 or 02 ...)
+# $3 is the "primary" language on which all the others depend
 
   ifeq ($(TARGET_$(call sanitise,$1)),)
     TARGET_$(call sanitise,$1):=1
-    $(if $(FLMDEBUG),$(info preprocessresource: $(1) for $(2) LANG:$(3)))
+    $(if $(FLMDEBUG),$$(info <debug>preprocessresource: $1 LANG:$2 dep $3</debug>))
+
+
+    # Correct dependency information when a header file can't be found.
+    # If the c preprocessor can't find a dependency it appears as it did in the #include statement
+    # e.g. "filename.mbg" or "filename.rsg" in the dependency file.
+
+ifneq ($(NO_DEPEND_GENERATE),)
+    # This version minimises the size of dependency files, to contain only .mbg and .rsg deps.
+    # It allows resources to be built in the right order but doesn't impose the weight of
+    # of full dependency information which can overwhelm make in large builds.
+    # The strategy is filter lines which don't have .rsg or .mbg dependencies in them and
+    # to sift each line to leave out non-relevant things like other header files, .hrh 
+    # files etc.  In the end don't print anything at all if we did not find the target.
 
-    RESOURCE_DEPS:: $(1).d
-    $(1).d: $(SOURCE)
+define  DEPENDENCY_CORRECTOR
+{ $(DEPCRUNCH) --extensions rsg,mbg --assume '$$$$(EPOCROOT)/epoc32/include' ; } 
+endef
+
+else
+    # This can correct the dependencies by assuming that the file will be in epoc32\include as this is the default
+    DEPENDENCY_CORRECTOR:=$(GNUSED)  -r 's% ([^ \/]+\.((rsg)|(mbg)))% $(EPOCROOT)\/epoc32\/include\/\1%ig' 
+endif
+
+
+    ifeq "$1" "$3"
+        RESOURCE_DEPS:: $1.d
+
+        $1.d: $(SOURCE)
 	  $(call startrule,resourcedependencies,FORCESUCCESS) \
-	  $(GNUCPP) -C -DLANGUAGE_$(3) -DLANGUAGE_$(subst sc,SC,$(3)) $(call makemacrodef,-D,$(MMPDEFS))\
-	  $(CPPOPT) $(SOURCE) -M -MG -MT"$(1)" | \
-	  $(GNUSED)  -r 's# ([^ \/]+\.((rsg)|(mbg)))# $(EPOCROOT)\/epoc32\/include\/\1#ig' > $(1).d \
+	  $(GNUCPP) -DLANGUAGE_$2 -DLANGUAGE_$(subst sc,SC,$2) $(call makemacrodef,-D,$(MMPDEFS))\
+	  $(CPPOPT) $(SOURCE) -M -MG -MT"$1" | \
+	  $$(DEPENDENCY_CORRECTOR) >$$@ \
 	  $(call endrule,resourcedependencies)
 
-    $(1): $(1).d
+         $1 : $1.d
+
+    else
+         $1 : $3
+    endif
+
+    $1:
 	  $(call startrule,resourcepreprocess,FORCESUCCESS) \
-	  $(GNUCPP) -C -DLANGUAGE_$(3) -DLANGUAGE_$(subst sc,SC,$(3)) $(call makemacrodef,-D,$(MMPDEFS))\
+	  $(GNUCPP) -C -DLANGUAGE_$2 -DLANGUAGE_$(subst sc,SC,$2) $(call makemacrodef,-D,$(MMPDEFS))\
 	  $(CPPOPT) $(SOURCE) -o $$@ \
 	  $(call endrule,resourcepreprocess)
+    endif
 
-    CLEANTARGETS:= $$(CLEANTARGETS) $(1)
+    CLEANTARGETS:= $$(CLEANTARGETS) $1
 
-    $(eval DEPENDFILENAME:=$(1).d)
-    $(eval DEPENDFILE:=$(wildcard $(DEPENDFILENAME)))
-
-    CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
-    ifneq "$(DEPENDFILE)" ""
-      ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" ""
-        -include $(DEPENDFILE)
+    ifeq "$(MAKEFILE_GROUP)" "RESOURCE"
+    ifeq "$1" "$3"
+      $(eval DEPENDFILENAME:=$1.d)
+      $(eval DEPENDFILE:=$(wildcard $(DEPENDFILENAME)))
+      
+      CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
+      ifneq "$(DEPENDFILE)" ""
+        ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" ""
+          ifeq "$(MAKEFILE_GROUP)" "RESOURCE"
+           -include $(DEPENDFILE)
+          endif
+        endif
       endif
     endif
 
@@ -166,55 +170,48 @@
 ###############################################################################
 define copyresource
 # $(1) is the source
-# $(2) is the destination
-
-RELEASABLES:=$$(RELEASABLES) $(2)
-
-   ifeq ($(TARGET_$(call sanitise,$2)),)
-           TARGET_$(call sanitise,$2):=1
+# $(2) is the space separated list of destinations which must be filenames
 
-        RESOURCE:: $2
-        ## perform additional copies of binaries
-        #
-        # Only certain builds require further copies of the generated resource binaries
-        #
-        $(2): $(1)
-		$(call startrule,resourcecopy,FORCESUCCESS) \
-		$(GNUCP) $$< $$@ \
-		$(call endrule,resourcecopy)
+   RELEASABLES:=$$(RELEASABLES) $(2)
 
-   endif
-
+   $(info <finalcopy source='$1'>$2</finalcopy>)
+ 
 endef # copyresource #
 
 ###############################################################################
 define generateresource
 
-# $(1) is the resource filename e.g. /a/b/resource.rsc
+# $(1) is the intermediate resource filename with path e.g. /a/b/resource.rsc
 # $(2) is the preprocessed resource to make it from
 # $(3) is the language e.g. sc or 01 or 02
+# $(4) is the target resource filename without path
 
-    RELEASABLES:=$$(RELEASABLES) $(1)
 
         ifeq ($(TARGET_$(call sanitise,$1)),)
                 TARGET_$(call sanitise,$1):=1
 
-            $(if $(FLMDEBUG),$(info generateresource: $(1) from $(2) LANG:$(3)),)
+            $(if $(FLMDEBUG),$(info <debug>generateresource: $(1) from $(2) LANG:$(3)</debug>),)	
+            $(if $(FLMDEBUG),$(info <debug>generateresource: copies: $(sort $(patsubst %,%/$(notdir $(1)),$(RSCCOPYDIRS)))</debug>))
 
+            CLEANTARGETS:=$$(CLEANTARGETS) $(1)
 
             RESOURCE:: $(1)
 
             $(1): $(2) $(RCOMP)
 			$(call startrule,resourcecompile,FORCESUCCESS) \
-			$(RCOMP) -m045,046,047 -u -o$(1) -s$(2) \
+			$(RCOMP) -m045,046,047 -u -o$(1) -s$(2)  \
 			$(call endrule,resourcecompile)
 
         endif
+
 #	Whether or not we have generated this resource for some other variant, check if there
 #       are any new copies to be made for this variant. e.g. winscw requires that we make
-#       some extra copies.
+#       some extra copies.  We tried to copy after running rcomp itself but we still need these
+#       targets for the sake of dependencies or, for example, if someone merely adds a new copy 
+#       when the resource is up-to-date
 
-        $(foreach F,$(sort $(patsubst %,%/$(notdir $(1)),$(RSCCOPYDIRS))),$(call copyresource,$(1),$(F)))
+        $(call copyresource,$1,$(sort $(patsubst %,%/$4,$(RSCCOPYDIRS))))
+
 
         # individual source file compilation
         SOURCETARGET_$(call sanitise,$(SOURCE)): $(1)
@@ -228,11 +225,11 @@
 # $(2) is the preprocessed resource to make it from
 # $(3) is the language to use	(eg. sc)
 
-		RELEASABLES:= $$(RELEASABLES) $(1)
+        RELEASABLES:= $$(RELEASABLES) $(1)
 
         ifeq ($(TARGET_$(call sanitise,$1)),)
                 TARGET_$(call sanitise,$1):=1
-                $(if $(FLMDEBUG),$(info resourceheader: $(1) from $(2) LANG:$(3)))
+                $(if $(FLMDEBUG),$(info <debug>resourceheader: $(1) from $(2) LANG:$(3)</debug>))
 
                 RESOURCE:: $(1)
 
@@ -255,19 +252,28 @@
 # We always create at least the header
 # even if we sometimes don't create the resources
 ifneq ($(RESOURCEHEADER),)
-        $(eval $(call generateresourceheader,$(RESOURCEHEADER),$(INTERBASE)_$(HEADLANG).rpp,$(HEADLANG)))
+        $(eval $(call generateresourceheader,$(RESOURCEHEADER),$(INTERBASE_TMP)_$(HEADLANG).rpp,$(HEADLANG)))
 endif
 
+# The one on which the others will depend i.e. they will 
+# "sit in it's dependency slipstream" or in other words
+# We only have to make one dependency file because all of
+# the other languages will benefit from the dependency file
+# belonging to this language.
+PRIMARYRPPFILE:=$(INTERBASE_TMP)_$(HEADLANG).rpp
 ifeq ($(HEADERONLY),)
         # generate a resource file for each language
         # For sc we generate $(RESBASE).rsc and define LANGUAGE_SC and LANGUAGE_sc.
-        $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call preprocessresource,$(INTERBASE)_$(L).rpp,$(RESBASE).r$(L),$(L))))
-        $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call generateresource,$(RESBASE).r$(L),$(INTERBASE)_$(L).rpp,$(L))))
+        $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call preprocessresource,$(INTERBASE_TMP)_$(L).rpp,$(L),$(PRIMARYRPPFILE))))
+
+        ifeq "$(MAKEFILE_GROUP)" "RESOURCE"
+            $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call generateresource,$(INTERBASE_TMP).r$(L),$(INTERBASE_TMP)_$(L).rpp,$(L),$(TARGET_lower).r$(L))))
+        endif
 else
         # No resources are going to be made so unless we specifically ask for it, there will be no
         # preprocessed file from which to create the header:
 
-        $(eval $(call preprocessresource,$(INTERBASE)_$(HEADLANG).rpp,,$(HEADLANG)))
+        $(eval $(call preprocessresource,$(INTERBASE_TMP)_$(HEADLANG).rpp,,$(HEADLANG),$(PRIMARYRPPFILE)))
 
 endif
 
@@ -277,10 +283,10 @@
 ifneq ($(RFIFILE),)
   RESOURCE:: $(RFIFILE)
   RELEASABLES:=$(RELEASABLES) $(RFIFILE)
-  CREATABLEPATHS:=$(CREATABLEPATHS) $(dir $(RFIFILE))
+  CREATABLEPATHS:=$(CREATABLEPATHS) $(dir $(RFIFILE))/
 
-  RPPFILES:=$(foreach L,$(LANGUAGES:SC=sc),$(INTERBASE)_$(L).rpp)
-  $(eval $(call generaterfifile,$(RFIFILE),$(RPPFILES),$(addsuffix .d,$(RPPFILES))))
+  RPPFILES:=$(foreach L,$(LANGUAGES:SC=sc),$(INTERBASE_TMP)_$(L).rpp)
+  $(eval $(call generaterfifile,$(RFIFILE),$(RPPFILES),$(PRIMARYRPPFILE).d))
 endif
 
 
--- a/sbsv2/raptor/lib/flm/standard.xml	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/lib/flm/standard.xml	Fri Jun 04 13:09:28 2010 +0100
@@ -40,6 +40,7 @@
 		<param name='SOURCE' default=''/>
 		<param name='TARGET'/>
 		<param name='TARGET_lower'/>
+		<param name='TARGETPATH' default=''/>
 		<param name='LTCG' default=''/>
 		<param name='LTCG_OPTION' default='--ltcg'/>
 		<param name='TARGETTYPE'/>
@@ -74,6 +75,7 @@
 		<param name='CC.VAL.SOFTVFP_MAYBE_VFPV2' default=''/>
 		<param name='CODE_SEGMENT_START' default=''/>
 		<param name='TOOLCHAIN' default=''/>
+		<param name='USE_RVCT22_DELETE_WORKAROUND' default=''/>
 	</interface>
 	<interface name="Symbian.e32abiv2" extends="Symbian.mmp" flm="e32abiv2.flm">
 		<param name='SUPPORTS_STDCPP_NEWLIB' default='1'/>
@@ -121,7 +123,6 @@
 		<param name='FPMODE_OPTION'/>
 		<param name='FROMELF'/>
 		<param name='FULLVARIANTPATH'/>
-		<param name='GENERATE_ABIV1_IMPLIBS' default=''/>		
 		<param name='RVCT3_1' default=''/>
 		<param name='LD'/>
 		<param name='LD_ERRORS_CONTROL_OPTION'/>
@@ -178,6 +179,7 @@
 		<param name='STATIC_LIBS_PATH'/>
 		<param name='STATIC_LIBRARY_DIR'/>
 		<param name='STATIC_RUNTIME_DIR'/>
+		<param name='SUPPORTS_ABIV1_IMPLIBS'/>		
 		<param name='SYMBIAN_CCFLAGS'/>
 		<param name='SYMBIAN_LD_MESSAGE_OPTION'/>
 		<param name='SYMBIAN_LINK_FLAGS'/>
--- a/sbsv2/raptor/lib/flm/tracecompiler.mk	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/lib/flm/tracecompiler.mk	Fri Jun 04 13:09:28 2010 +0100
@@ -13,55 +13,100 @@
 # Description:
 # Run Trace Compiler on source files to generate trace headers and decode files
 
+# Expected inputs:
+# TARGETEXT
+
 # Set project name as <mmp_name>
 TRACE_PRJNAME:=$(basename $(notdir $(PROJECT_META)))
+OLDTC_TRACE_PRJNAME:=$(TRACE_PRJNAME)
+TRACE_RELEASABLE_ID:=$(TARGET)_$(TARGETEXT)
 
-TARGETEXT:=$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE))
+define get_trace_path
+$(firstword $(filter %$1, $(USERINCLUDE) $(SYSTEMINCLUDE)))
+endef
+
+$(if $(FLMDEBUG),$(info <debug>INCLUDES=$(USERINCLUDE) $(SYSTEMINCLUDE)</debug>))
+$(if $(FLMDEBUG),$(info <debug>TARGET=$(TARGET) TARGETEXT=$(TARGETEXT)</debug>))
 
-# Find out TRACE_PATH
-# first look for .*/traces/traces_<target_name>_<target_extension>
-TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces/traces_$(TARGET)_$(TARGETEXT),$(DIR))))
-
+# Find out TRACE_PATH  by looking for the trace folder in SYSTEMINCLUDE and USERINCLUDES
+# traces/traces_<target_name>_<target_extension>
+TRACE_PATH:=$(call get_trace_path,/traces/traces_$(TRACE_RELEASABLE_ID))
 ifneq ($(TRACE_PATH),)
-# set project name as <target_name>_<target_extension> instead of <mmp_name>
-TRACE_PRJNAME:=$(TARGET)_$(TARGETEXT)
+  TRACE_PRJNAME:=$(TRACE_RELEASABLE_ID)
+else # obsolete forms for compatibility
+  # traces_<target_name>_<target_ext>
+  TRACE_PATH:=$(call get_trace_path,/traces_$(TARGET)_$(TARGETEXT))
+  ifneq ($(TRACE_PATH),)
+    # set project name as <target_name>_<target_ext> instead of <mmp_name>
+    # to trick old TCom into finding the path.
+    OLDTC_TRACE_PRJNAME:=$(TARGET)_$(TARGETEXT)
+  else
+    # traces_<target_name>_<target_type>
+    TRACE_PATH:=$(call get_trace_path,/traces_$(TARGET)_$(TARGETTYPE))
+    ifneq ($(TRACE_PATH),)
+      # set project name as <target_name>_<target_type> instead of <mmp_name>
+      # to trick old TCom into finding the path.
+      OLDTC_TRACE_PRJNAME:=$(TARGET)_$(TARGETTYPE)
+    else
+      # traces_<mmp_name>
+      TRACE_PATH:=$(call get_trace_path,/traces_$(TRACE_PRJNAME))
+   
+      # traces
+      ifeq ($(TRACE_PATH),)
+       TRACE_PATH:=$(call get_trace_path,/traces)
+      endif
+    endif
+  endif
 endif
 
-# if not found look for .*/traces_<mmp_name>
-ifeq ($(TRACE_PATH),)
-TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces_$(TRACE_PRJNAME),$(DIR))))
-endif
-
-# if not found look for .*/traces
-ifeq ($(TRACE_PATH),)
-TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces,$(DIR))))
-endif
-
-# if not found look for .*/traces_<target_name>_<target_type>
-ifeq ($(TRACE_PATH),)
-TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces_$(TARGET)_$(TARGETTYPE),$(DIR))))
-# set project name as <target_name>_<target_type> instead of <mmp_name>
-TRACE_PRJNAME:=$(TARGET)_$(TARGETTYPE)
-endif
 
 # initialise (so what output will be correct if we don't actually run the TC)
 TRACE_DICTIONARY:=
 AUTOGEN_HEADER:=
-
-$(if $(FLMDEBUG),$(info <debug>TRACE_PATH = $(TRACE_PATH)</debug>))
+$(if $(FLMDEBUG),$(info <debug>TRACE_PATH='$(TRACE_PATH)'   TRACE_RELEASABLE_ID='$(TRACE_RELEASABLE_ID)'</debug>))
 
 # Run trace compiler only if TRACE_PATH exists
 ifneq ($(TRACE_PATH),)
-TRACE_MARKER:=$(TRACE_MARKER_PATH)/tracecompile_$(TRACE_PRJNAME)_$(UID_TC).done
+TRACE_MARKER:=$(TRACE_MARKER_PATH)/tracecompile_$(TRACE_RELEASABLE_ID)_$(UID_TC).done
 TRACE_HEADERS:=
 
-TRACE_SOURCE_LIST:=$(TRACE_MARKER_PATH)/tracecompile_$(TRACE_PRJNAME)_$(UID_TC).sourcelist
+TRACE_SOURCE_LIST:=$(TRACE_MARKER_PATH)/tracecompile_$(TRACE_RELEASABLE_ID)_$(UID_TC).sourcelist
+TRACE_VARIANT_SOURCE_LIST:=$(OUTPUTPATH)/$(VARIANTPLATFORM)/$(VARIANTTYPE)/tracecompile_$(TRACE_RELEASABLE_ID)_$(UID_TC).sourcelist
+
+# The sourcelist_grouped_write macro allows us to construct a source list file, 10 objects at a time
+# to avoid limits on argument lengths and sizes on Windows.
+# $1 = list of source files
+# $2 = ">" or ">>" i.e. for creating the file.
+define sourcelist_grouped_write
+	$(call startrule,sourcelist_write) \
+	$(if $1,echo -en '$(subst $(CHAR_SPACE),\n,$(strip $(wordlist 1,10,$1)))\n' $2 $$@,true) \
+	$(call endrule,sourcelist_write) 
+	$(if $1,$(call sourcelist_grouped_write,$(wordlist 11,$(words $1),$1),>>),)
+endef
 
-# 1. Append to or create the list of source files for trace compiler to process
-# 2. Check if the hash in trace marker remain unchanged. If not, remove marker so trace compiler will run again. 
-X:=$(shell set -x ; $(GNUMKDIR) -p $(TRACE_MARKER_PATH) ; $(GNUTOUCH) $(TRACE_SOURCE_LIST) ; echo -e "$(subst $(CHAR_SPACE),\\n,$(SOURCE))" | $(GNUSORT) -u $(TRACE_SOURCE_LIST) - > $(TRACE_SOURCE_LIST).tmp && $(GNUMV) $(TRACE_SOURCE_LIST).tmp $(TRACE_SOURCE_LIST) ; $(GNUMD5SUM) -c $(TRACE_MARKER) || $(GNURM) $(TRACE_MARKER))
+# Write the list of sources for this variant to a file
+# Make the combined sourcelist for this target depend on it
+# It's all to do with how make treats this file when it 
+# does exist. We are forcing it evaluate the target rule here 
+# even if the file is in place by making it PHONY. In other 
+# words, this is forcing the variant source list to always 
+# be written but later on we might not write to the combined 
+# source list if it isn't going to change.
+define sourcelist_write
+$(TRACE_SOURCE_LIST): $(TRACE_VARIANT_SOURCE_LIST)
 
-$(if $(FLMDEBUG),$(info <debug>Trace Compiler sourcelist generation output: $(X)</debug>))
+.PHONY:: $(TRACE_VARIANT_SOURCE_LIST)
+
+$(TRACE_VARIANT_SOURCE_LIST): $(SOURCE) 
+	$(call sourcelist_grouped_write,$(SOURCE),>)
+
+endef
+
+$(eval $(sourcelist_write))
+$(eval $(call GenerateStandardCleanTarget,$(TRACE_VARIANT_SOURCE_LIST),,))
+
+
+$(if $(FLMDEBUG),$(info <debug>Trace Compiler SOURCES: $(SOURCE)</debug>))
 
 $(TRACE_MARKER) : $(SOURCE)
 
@@ -72,43 +117,116 @@
 ifeq ($(GUARD_$(call sanitise,$(TRACE_MARKER))),)
 GUARD_$(call sanitise,$(TRACE_MARKER)):=1
 
+$(if $(FLMDEBUG),$(info <debug>PAST MARKER='$(TRACE_RELEASABLE_ID)'</debug>))
 # The trace compiler likes to change . into _ so we must do the same in the case of mmps with a name like
 # fred.prd.mmp we want fred_prd
 TRACE_PRJNAME_SANITISED:=$(subst .,_,$(TRACE_PRJNAME))
+OLDTC_TRACE_PRJNAME_SANITISED:=$(subst .,_,$(OLDTC_TRACE_PRJNAME))
 
-TRACE_DICTIONARY:=$(EPOCROOT)/epoc32/ost_dictionaries/$(TRACE_PRJNAME_SANITISED)_0x$(UID_TC)_Dictionary.xml
-AUTOGEN_HEADER:=$(EPOCROOT)/epoc32/include/internal/SymbianTraces/autogen/$(TRACE_PRJNAME_SANITISED)_0x$(UID_TC)_TraceDefinitions.h
 
 JAVA_COMMAND:=$(SBS_JAVATC)
 TRACE_COMPILER_PATH:=$(EPOCROOT)/epoc32/tools
-TRACE_COMPILER_START:=-classpath $(TRACE_COMPILER_PATH)/tracecompiler com.nokia.tracecompiler.TraceCompiler
+
+# declare the trace_compile macro but only do it once in the build
+ifeq ($(trace_compile),)
+
+# Find out which macro to declare - the one supporting the new CLI 
+# or the old one.  First try to find TraceCompilerMain.class 
+# If it is there then it might be the new posix-like interface
+TRACE_VER:=
+TRACE_VSTR:=
+
+TCClass:=$(wildcard  $(TRACE_COMPILER_PATH)/tracecompiler/com/nokia/tracecompiler/TraceCompilerMain.class)
+ifneq ($(TCClass),) 
+# Get the version string from the TC (assume it's the new one)
+TRACE_COMPILER_START:=-classpath $(TRACE_COMPILER_PATH)/tracecompiler com.nokia.tracecompiler.TraceCompilerMain
+TRACE_VSTR:=$(firstword $(subst TraceCompiler version ,,$(shell $(JAVA_COMMAND) $(TRACE_COMPILER_START) --version)))
+# check if it looks like a version that supports the new cli interface: supporting up to verion 9 in the future.
+TRACE_VER:=$(findstring new,$(foreach version,2 3 4 5 6 7 8 9,$(patsubst $(version).%,new,$(TRACE_VSTR))))
+endif
+$(if $(FLMDEBUG),$(info <debug>TRACE_VSTR=$(TRACE_VSTR) TRACE_VER=$(TRACE_VER)</debug>))
 
 
+# 0. Generate a combined sourcelist from all variants. 
+# 0.1 Write the combined list to a temporary file
+# 0.2 Check if there are new files since the last build
+#      md5 stored in the trace marker.
+# 0.3 Rewrite the combined sourcelist if new sourcefiles have appeared
+#      since the last build
 # 1. Use pipe to send inputs to trace compiler to process
 # 2. Create a hash regarding to source names and put it in marker.
 # 3. Show source names that are processed by trace compiler
+
+ifeq ($(TRACE_VER),new)
 define trace_compile
-$(TRACE_MARKER) : $(PROJECT_META)
+
+$(TRACE_SOURCE_LIST):
+	$(call startrule,sourcelist_combine) \
+	$(GNUCAT) $(TRACE_SOURCE_LIST) $$^ 2>/dev/null | $(GNUSORT) -u > $$@.new && \
+	$(GNUMD5SUM) -c $(TRACE_MARKER) 2>/dev/null ||  \
+	  $(GNUCP) $$@.new $$@ \
+	$(call endrule,sourcelist_combine)
+
+$(TRACE_MARKER) : $(PROJECT_META) $(TRACE_SOURCE_LIST)
 	$(call startrule,tracecompile) \
-	( echo -en "$(TRACE_PRJNAME)\n$(PROJECT_META)\n"; \
-	  $(GNUCAT) $(TRACE_SOURCE_LIST); \
+	( $(GNUCAT) $(TRACE_SOURCE_LIST); \
 	  echo -en "*ENDOFSOURCEFILES*\n" ) | \
-	$(JAVA_COMMAND) $(TRACE_COMPILER_START) $(UID_TC) &&  \
-	$(GNUMD5SUM) $(TRACE_SOURCE_LIST) > $(TRACE_MARKER) && \
+	$(JAVA_COMMAND) $(TRACE_COMPILER_START) $(if $(FLMDEBUG),-d,) --uid=$(UID_TC) --project=$(TRACE_PRJNAME) --mmp=$(PROJECT_META) --traces=$(TRACE_PATH) &&  \
+	$(GNUMD5SUM) $(TRACE_SOURCE_LIST).new > $$@ 2>/dev/null && \
 	{ $(GNUTOUCH) $(TRACE_DICTIONARY) $(AUTOGEN_HEADER); \
 	 $(GNUCAT) $(TRACE_SOURCE_LIST) ; true ; } \
 	$(call endrule,tracecompile)
 endef
 
+else # Old inteface
+TRACE_COMPILER_START:=-classpath $(TRACE_COMPILER_PATH)/tracecompiler com.nokia.tracecompiler.TraceCompiler
+
+define trace_compile
+
+$(TRACE_SOURCE_LIST):
+	$(call startrule,sourcelist_combine) \
+	$(GNUCAT) $(TRACE_SOURCE_LIST) $$^ 2>/dev/null | $(GNUSORT) -u > $$@.new && \
+	$(GNUMD5SUM) -c $(TRACE_MARKER) 2>/dev/null ||  \
+	  $(GNUCP) $$@.new $$@ \
+	$(call endrule,sourcelist_combine)
+
+$(TRACE_MARKER) : $(PROJECT_META) $(TRACE_SOURCE_LIST)
+	$(call startrule,tracecompile) \
+	( echo -en "$(OLDTC_TRACE_PRJNAME)\n$(PROJECT_META)\n"; \
+	  $(GNUCAT) $(TRACE_SOURCE_LIST); \
+	  echo -en "*ENDOFSOURCEFILES*\n" ) | \
+	$(JAVA_COMMAND) $(TRACE_COMPILER_START) $(UID_TC) &&  \
+	$(GNUMD5SUM) $(TRACE_SOURCE_LIST).new > $$@ 2>/dev/null && \
+	{ $(GNUTOUCH) $(TRACE_DICTIONARY) $(AUTOGEN_HEADER); \
+	 $(GNUCAT) $(TRACE_SOURCE_LIST) ; true ; } \
+	$(call endrule,tracecompile)
+endef
+
+# End - new/old trace compiler
+endif
+
+# End - tracecompile is defined
+endif
+
+ifeq ($(TRACE_VER),new)
+TRACE_DICTIONARY:=$(EPOCROOT)/epoc32/ost_dictionaries/$(TRACE_PRJNAME_SANITISED)_0x$(UID_TC)_Dictionary.xml
+AUTOGEN_HEADER:=$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/$(TRACE_PRJNAME_SANITISED)_0x$(UID_TC)_TraceDefinitions.h
+else
+TRACE_DICTIONARY:=$(EPOCROOT)/epoc32/ost_dictionaries/$(OLDTC_TRACE_PRJNAME_SANITISED)_0x$(UID_TC)_Dictionary.xml
+AUTOGEN_HEADER:=$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/$(OLDTC_TRACE_PRJNAME_SANITISED)_0x$(UID_TC)_TraceDefinitions.h
+endif
+
 $(eval $(trace_compile))
 
 $(eval $(call GenerateStandardCleanTarget, $(TRACE_PATH)/tracebuilder.cache $(TRACE_MARKER) $(TRACE_SOURCE_LIST),,))
 
-# End sanity guard
+$(call makepath,$(TRACE_PATH) $(dir $(TRACE_DICTIONARY) $(AUTOGEN_HEADER)))
+# End  - guard that prevents repeated calls to TCom
 endif
 
 $(eval $(call GenerateStandardCleanTarget,$(TRACE_HEADERS),,))
 
+# End - Nothing to trace (not trace path in include)
 else
 # Indicate to following parts of the FLM that we actually won't run
 # trace compiler so they can set dependencies accordingly.
--- a/sbsv2/raptor/lib/flm/win32.flm	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/lib/flm/win32.flm	Fri Jun 04 13:09:28 2010 +0100
@@ -199,7 +199,8 @@
 endif
 
 
-BINTARGET:=$(BINDIR)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
+TARGETEXT:=$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
+BINTARGET:=$(BINDIR)/$(TARGET).$(TARGETEXT)
 
 
 # Run trace compiler #####################################
@@ -217,7 +218,8 @@
 
 # USE_TRACE_COMPILER defaults to blank in Raptor config.
 # Users can turn TC on by setting it to 1 in user config.
-ifneq ($(USE_TRACE_COMPILER),) 
+ifneq ($(USE_TRACE_COMPILER),)
+  # TARGETEXT must be set before here
   include $(FLMHOME)/tracecompiler.mk
   TC_RELEASABLES:=$(TRACE_DICTIONARY) $(AUTOGEN_HEADER)
 endif
@@ -227,7 +229,7 @@
 ## IMPORT LIBRARY ##
 ####################
 
-IMPORTLIBLINKAS:=$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
+IMPORTLIBLINKAS:=$(TARGET).$(TARGETEXT)
 # LINKAS, if supplied, only applies to IMPLIB TARGETTYPEs
 ifeq ($(BASE_TYPE),importlib)
   ifneq ($(LINKAS),)
@@ -295,7 +297,7 @@
   #############
 
   ifeq ($(COPY_FOR_STATIC_LINKAGE),1)
-    BINTARGETSTATICLINK:=$(BINDIRSTATICLINK)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
+    BINTARGETSTATICLINK:=$(BINDIRSTATICLINK)/$(TARGET).$(TARGETEXT)
   endif
 
   RELEASABLES:=$(RELEASABLES) $(BINTARGET) $(BINTARGETSTATICLINK)
@@ -535,7 +537,7 @@
     TMP_IMPLIB:=$(BLDDIR)/$(TARGET).lib
     TMP_INFFILE:=$(BLDDIR)/$(TARGET).inf
     TMP_SYMFILE:=$(if $(OPEN_ENVIRONMENT),$(BLDDIR)/$(TARGET).sym,)
-    TMP_TARGET:=$(BLDDIR)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
+    TMP_TARGET:=$(BLDDIR)/$(TARGET).$(TARGETEXT)
     TMP_DEFFILE:=$(BLDDIR)/$(TARGET).def
 
     CLEANTARGETS:=$(CLEANTARGETS) $(TMP_IMPLIB) $(TMP_INFFILE) $(TMP_TARGET) $(TMP_DEFFILE) $(TMP_SYMFILE)
@@ -576,7 +578,7 @@
 		$(call groupin10,$(notdir $(OBJECTFILES))) ;
 	    $(call startrule,win32stageonelink) \
 	    $(if $(SUPPORTS_STDCPP_NEWLIB),$(if $(STATICLIBFILES),$(CHECKLIB) $(CHECKLIB_TYPE) $(OPT.CHECKLIB.WIN32) $(STATICLIBFILES) &&,),) \
-	    MWSym2LibraryFiles="$(MWSym2LibraryFiles)" $(LD) $(LFLAGS) $(OPT.MENTRYPOINT)$(ENTRYSYMBOL) $(OPT.EXPORT)$(EXPORT_TYPE) $(OPT.NOCOMPACTIMPORTLIB) $(OPT.ADDCOMMAND) "out:$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))" $(OPT.WARNINGS) off $(OPT.IMPLIB)"$(TMP_IMPLIB)" $(OPT.OUT)"$(TMP_TARGET)" $(LINKER_FIRSTSTATLIBFILE) $(NEWLIBFILE) $(WIN32_LIBRARIES) $(STATICLIBFILES) $(LINKLIBFILES) $(OPT.LIBPATH)$(BLDDIR) $(OPT.SEARCH) @$(OBJECTFILES_LRF) \
+	    MWSym2LibraryFiles="$(MWSym2LibraryFiles)" $(LD) $(LFLAGS) $(OPT.MENTRYPOINT)$(ENTRYSYMBOL) $(OPT.EXPORT)$(EXPORT_TYPE) $(OPT.NOCOMPACTIMPORTLIB) $(OPT.ADDCOMMAND) "out:$(TARGET).$(TARGETEXT)" $(OPT.WARNINGS) off $(OPT.IMPLIB)"$(TMP_IMPLIB)" $(OPT.OUT)"$(TMP_TARGET)" $(LINKER_FIRSTSTATLIBFILE) $(NEWLIBFILE) $(WIN32_LIBRARIES) $(STATICLIBFILES) $(LINKLIBFILES) $(OPT.LIBPATH)$(BLDDIR) $(OPT.SEARCH) @$(OBJECTFILES_LRF) \
 	    $(call endrule,win32stageonelink)
     endef
     $(eval $(win32stageonelink))
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/notes/abiv1_implibs.txt	Fri Jun 04 13:09:28 2010 +0100
@@ -0,0 +1,14 @@
+
+The ABIv1 toolchain was deprecated in Symbian OS 9.4 but the build system
+continued to generate both ABIv1 (.lib) import libraries and ABIv2 (.dso)
+import libraries for convenience during the transition to ABIv2.
+
+This change now turns off the generation of ABIv1 import libraries by
+default but makes support switchable on a kit-by-kit basis. To turn on
+ABIv1 import library generation, add the following setting to the
+root.changes variant in epoc32/sbs_config/os_properties.xml
+
+<set name="SUPPORTS_ABIV1_IMPLIBS" value="1"/>
+
+An example properties file is available in the examples/os_properties.xml
+file distributed within the Raptor installation.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/notes/delete_on_failed_compile.txt	Fri Jun 04 13:09:28 2010 +0100
@@ -0,0 +1,7 @@
+In certain circumstances, such as failure to obtain licenses, RVCT 2.2's armcc 
+program still produces object files whose contents is junk. This causes build 
+problems later as from Make's point of view those object files are "up to 
+date" so the build tries to link them. Of course, these attempts at linking 
+fail and the build is broken.
+
+This is a work around for that RVCT 2.2 problem.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/notes/localresourcecopying.txt	Fri Jun 04 13:09:28 2010 +0100
@@ -0,0 +1,24 @@
+Resources were copied using make rules.  This is sensible in local
+machine builds but non-optimal in cluster builds.  It is entirely IO
+bound so that instead of benefitting from running on the cluster it
+simply creates more IO as files need to be transferred over the network,
+possibly multiple times.
+
+This change introduces the <finalcopy> tag to the log which the frontend
+reads in a new "default" filter called FilterCopyFile.  Thus the python
+frontend does the copying rather than the cluster build engine.
+
+This happens at the end of each invocation of the build engine or "stage".
+Since resources are built in their own stage, the copying is completed
+before build tasks in the other stages require them.  The copied files
+are not needed in the resource stage itself.
+
+The filter uses <progress:end ...> tags to determine when a stage
+is finished and this requires that the timing feature be switched on
+permanently.
+
+The format of the tag is:
+<finalcopy source="sourcefilename">dest_filename1 dest_filename2 ...</finalcopy>
+
+Spaces may not be used in filenames. The sequence "%20" may be used
+instead.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/notes/parametric_log_filters.txt	Fri Jun 04 13:09:28 2010 +0100
@@ -0,0 +1,31 @@
+
+It is now possible to pass parameters from the command line into log filters.
+This works in the same way for both sbs and sbs_filter commands.
+
+For example:
+
+sbs --filters=Foo[param1,param2,param3]
+
+sbs_filter --filters=Bar[value] < build.log
+
+
+Multiple filters with parameters can be specified if needed,
+
+sbs --filters=Foo[param1,param2,param3],Bar[value]
+
+
+In the 2.13.0 release there are two filters which take parameters:
+
+1. sbs_filter --filters=FilterComp[wizard/group] < log
+
+Here the parameter is (part of) a bld.inf path and the filter only prints
+parts of the log which are attributable to the matching component. In the
+example above, the log elements from any bld.inf which has "wizard/group" 
+as part of its path will be printed: normally, passing the full path name
+will guarantee that only one component matches.
+
+2. sbs_filter --filters=FilterTagCounter[info,recipe] < log
+
+Here the parameters are a list of the element names to count. This is a
+simple analysis filter that shows you how many instances of XMl elements
+are in a log and how many characters of body text they have.
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/notes/query_cli.txt	Fri Jun 04 13:09:28 2010 +0100
@@ -0,0 +1,18 @@
+
+A new --query command-line option allows other tools to easily read raptor's
+configuration data without having to understand exactly how raptor config
+files work.
+
+For example, all the valid build aliases which can be used to build with
+the -c option can be obtained using:
+
+sbs --query=aliases
+
+All the known product variants can be obtained using:
+
+sbs --query=products
+
+And the details of a particular configuration can be found using:
+
+sbs --query=config[armv5_urel.n8]
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/notes/tcomsupport.txt	Fri Jun 04 13:09:28 2010 +0100
@@ -0,0 +1,42 @@
+New Trace Compiler
+-------------------
+
+Raptor supports an updated version of the Trace Compiler which has
+an improved command-line interface that allows Raptor to specify the
+directory in which trace data should be written.  This allows MMPs to
+implement a new convention for where trace files are stored.
+
+The new convention prevents clashes where building the same
+source file for different MMPs would previously have resulted in two
+build tasks trying to create the same trace file (header/dictionary).
+This caused build slowdowns and also made the trace data inaccurate.
+
+The standard for this directory is that the last two elements of the
+path should be
+
+   traces/traces_<targetname>_<ext>
+
+e.g.
+
+   traces/traces_euser_dll
+
+The new trace compiler also creates "autogen" headers in a new location
+under epoc32/include/platform rather than epoc32/include/internal.
+
+Trace Headers Directory can now also be in SYSTEMINCLUDEs
+----------------------------------------------------------
+
+Some teams were having trouble getting qmake to generate MMPs with
+USERINCLUDEs set.  So they were specifying the trace header directory in
+their SYTEMINCLUDEs.  This change causes Raptor to look for the traces
+directory in bot SYSTEMINCLUDES and USERINCLUDES.
+
+
+Create Trace Directories During Makefile Parse
+-----------------------------------------------
+
+Some build engines consider it a "clash" when two jobs attempt to make the
+same directory.  This change causes some important trace output directories
+to be created during makefile parsing which removes the (small) possibility
+that they would clash during the build part.
+
Binary file sbsv2/raptor/python/filter_interface.pyc has changed
--- a/sbsv2/raptor/python/filter_list.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/python/filter_list.py	Fri Jun 04 13:09:28 2010 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -19,6 +19,7 @@
 import os
 import sys
 import raptor
+import re
 import filter_interface
 import pluginbox
 import traceback
@@ -64,8 +65,24 @@
 		"""Nothing to do for stdout"""
 		return True
 
-
-
+def SplitList(listString):
+	"""turn a CLI filter string into a list of (class, param) pairs.
+	
+	for example, "foo[a,b],bar[c,d]"
+	
+	becomes [ ("foo", ["a","b"]) , ("bar", ["c","d"]) ]
+	"""
+	matches = re.findall("(\w+)(\[([^\[\]]*)\])?,?", listString)
+	
+	pairs = []
+	for m in matches:
+		classname = m[0]
+		if len(m[2]) > 0:
+			pairs.append( (classname, m[2].split(",")) )
+		else:
+			pairs.append( (classname, []) )
+	return pairs
+	
 class FilterList(filter_interface.Filter):
 
 	def __init__(self):
@@ -81,14 +98,31 @@
 		# Find all the filter plugins
 		self.pbox = pbox
 		possiblefilters = self.pbox.classesof(filter_interface.Filter)
+		filterdict = {}
+		for p in possiblefilters:
+			name = p.__name__.lower()
+			if name in filterdict:
+				raise ValueError("filters found in SBS_HOME/python/plugins which have duplicate name: %s " % p.__name__)
+			else:
+				filterdict[name] = p
+		
+		# turn "filternames" into a list of (classname, parameters) pairs
+		filterCalls = SplitList(filternames)
+		
+		# look for each filter class in the box
 		unfound = []
 		self.filters = []
-		for f in filternames:
-			unfound.append(f) # unfound unless we find it
-			for pl in possiblefilters:
-				if pl.__name__.upper() == f.upper():
-					self.filters.append(pl())
-					unfound = unfound[:-1]
+		for (f, params) in filterCalls:
+			# if the filter exists and is a valid filter use it
+			if f.lower() in filterdict:
+				if params:
+					self.filters.append(filterdict[f.lower()](params))
+				else:
+					self.filters.append(filterdict[f.lower()]())
+			else:
+				# record missing filters
+				unfound.append(f)
+
 		if unfound != []:
 			raise ValueError("requested filters not found: %s \
 			\nAvailable filters are: %s" % (str(unfound), self.format_output_list(possiblefilters)))
Binary file sbsv2/raptor/python/filter_list.pyc has changed
Binary file sbsv2/raptor/python/filter_utils.pyc has changed
Binary file sbsv2/raptor/python/generic_path.pyc has changed
Binary file sbsv2/raptor/python/mmpparser.pyc has changed
Binary file sbsv2/raptor/python/pluginbox.pyc has changed
Binary file sbsv2/raptor/python/plugins/dummyplugin.pyc has changed
Binary file sbsv2/raptor/python/plugins/filter_carbide.pyc has changed
Binary file sbsv2/raptor/python/plugins/filter_checksource.pyc has changed
Binary file sbsv2/raptor/python/plugins/filter_clean.pyc has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/python/plugins/filter_component.py	Fri Jun 04 13:09:28 2010 +0100
@@ -0,0 +1,96 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# 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: 
+# Filter class to print log entries for a selected component
+#
+
+import filter_interface
+import sys
+
+class FilterComp(filter_interface.FilterSAX):
+	
+	def __init__(self, params = []):
+		"""parameters to this filter are the path of the bld.inf and some flags.
+		
+		The bld.inf path can be a substring of the path to match. For example,
+		"email" will match an element with bldinf="y:/src/email/group/bld.inf".
+		
+		No flags are supported yet; this is for future expansion.
+			
+		If no parameters are passed then nothing is printed."""
+		self.bldinf = ""
+		self.flags = ""
+		
+		if len(params) > 0:
+			self.bldinf = params[0]
+			
+		if len(params) > 1:
+			self.flags = params[1]
+		
+		super(FilterComp, self).__init__()
+		
+	def startDocument(self):
+		# mark when we are inside an element with bldinf="the selected one"
+		self.inside = False
+		# and count nested elements so we can toggle off at the end.
+		self.nesting = 0
+	
+	def printElementStart(self, name, attributes):
+		sys.stdout.write("<" + name)
+		for att,val in attributes.items():
+			sys.stdout.write(" " + att + "='" + val + "'")
+		sys.stdout.write(">")
+		
+	def startElement(self, name, attributes):
+		if self.inside:
+			self.nesting += 1
+			self.printElementStart(name, attributes)
+			return
+		
+		if self.bldinf:
+			try:
+				if self.bldinf in attributes["bldinf"]:
+					self.inside = True
+					self.nesting = 1
+					self.printElementStart(name, attributes)
+			except KeyError:
+				pass
+			
+	def characters(self, char):
+		if self.inside:
+			sys.stdout.write(char)
+		
+	def endElement(self, name):
+		if self.inside:
+			sys.stdout.write("</" + name + ">")
+			
+		self.nesting -= 1
+		
+		if self.nesting == 0:
+			self.inside = False
+			print
+	
+	def endDocument(self):
+		pass
+	
+	def error(self, exception):
+		print filter_interface.Filter.formatError("FilterComp:" + str(exception))
+		
+	def fatalError(self, exception):
+		print filter_interface.Filter.formatError("FilterComp:" + str(exception))
+		
+	def warning(self, exception):
+		print filter_interface.Filter.formatWarning("FilterComp:" + str(exception))
+	
+# the end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/python/plugins/filter_copyfile.py	Fri Jun 04 13:09:28 2010 +0100
@@ -0,0 +1,92 @@
+#
+# Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# 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: 
+# Filter class for copying files in serial in python. This
+# is important in cluster builds where file copying is 
+# very inefficient.  
+# The one-to-many <finalcopy> tag is searched for and copy
+# instructions are built up in a hash table.
+# <finalcopy source='sourcefilename'>destfilename1 destfilename2 . . . .destfilenameN</copy>
+# destinations must be full filenames not directories.
+#
+# This filter monitors build progress
+# via the <progress> tags and flushes copies as build 
+# stages end (e.g. after resource so resources are ready for the next stage)
+# 
+
+import os
+import sys
+import tempfile
+import filter_interface
+import shutil
+import generic_path
+import stat
+from raptor_utilities import copyfile
+
+class FilterCopyFile(filter_interface.Filter):
+	
+	def open(self, params):
+		"initialise"
+		
+		self.ok = True
+
+		self.files = {}
+		
+		return self.ok
+	
+	
+	def write(self, text):
+		"process some log text"
+		
+		for line in text.splitlines():
+			if line.startswith("<finalcopy"):
+				source_start = line.find("source='")
+				source = line[source_start+8:line.find("'", source_start+8)]
+				destinations = line[line.find(">",source_start)+1:line.find("</finalcopy>")].split(" ")
+
+				if source in self.files:
+					self.files[source].update(destinations)
+				else:
+					self.files[source] = set(destinations)
+			elif line.startswith("<progress:end object_type='makefile' task='build'"):
+				self.flushcopies() # perform copies at end of each invocation of the make engine
+						   # to ensure dependencies are in place for the next one.
+				
+		return self.ok
+	
+	
+	def summary(self):
+		"finish off"
+		self.flushcopies()
+		return self.ok
+
+	def flushcopies(self):
+		for source in self.files.keys():
+			for dest in self.files[source]:
+				try:
+					copyfile(source, dest)
+				except IOError, e:
+					print "<error>%s</error>" % str(e)
+		self.files = {}
+		
+
+
+	def close(self):
+		"nop"
+		
+
+		return self.ok
+
+# the end				
+
Binary file sbsv2/raptor/python/plugins/filter_logfile.pyc has changed
Binary file sbsv2/raptor/python/plugins/filter_splitlog.pyc has changed
Binary file sbsv2/raptor/python/plugins/filter_squashlog.pyc has changed
--- a/sbsv2/raptor/python/plugins/filter_tagcount.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/python/plugins/filter_tagcount.py	Fri Jun 04 13:09:28 2010 +0100
@@ -19,6 +19,13 @@
 
 class FilterTagCounter(filter_interface.FilterSAX):
 	
+	def __init__(self, params = []):
+		"""parameters to this filter are the names of tags to print.
+		
+		If no parameters are passed then all tags are reported."""
+		self.interesting = params
+		super(FilterTagCounter, self).__init__()
+		
 	def startDocument(self):
 		# for each element name count the number of occurences
 		# and the amount of body text contained.
@@ -55,7 +62,8 @@
 		# report
 		print "\nsummary:"
 		for name,nos in sorted(self.count.items()):
-			print name, nos[0], nos[1]
+			if name in self.interesting or len(self.interesting) == 0:
+				print name, nos[0], nos[1]
 			
 		print "\nparsing:"
 		print "errors =", self.errors
Binary file sbsv2/raptor/python/plugins/filter_terminal.pyc has changed
--- a/sbsv2/raptor/python/plugins/filter_what.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/python/plugins/filter_what.py	Fri Jun 04 13:09:28 2010 +0100
@@ -90,13 +90,7 @@
 		
 		# repetitions is for tracking repeated lines in the output log
 		# when --check and --what are called
-		self.repetitions = {}
-		
-		"Regex for old what output"
-		if "win" in self.buildparameters.platform:
-			self.regex = re.compile("^[a-zA-Z]:\S+$")
-		else:
-			self.regex = re.compile("^/\S+$")
+		self.repetitions = {}	
 		
 		"Regex for targets"
 		self.target_regex = re.compile("^<(build|stringtable|resource|bitmap)>.*")
@@ -136,10 +130,6 @@
 				self.repetitions[line] = 0
 				
 			if self.repetitions[line] == 0:
-				
-				if self.regex.match(line) and (self.what or self.check):
-					"Print the whole line"
-					self.print_file(line, (-1), len(line))
 					
 				if self.target_regex.match(line):
 					"Grab the filename between <build> and </build>" 
Binary file sbsv2/raptor/python/plugins/filter_what.pyc has changed
Binary file sbsv2/raptor/python/pyparsing.pyc has changed
--- a/sbsv2/raptor/python/raptor.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/python/raptor.py	Fri Jun 04 13:09:28 2010 +0100
@@ -338,9 +338,6 @@
 		if build.quiet == True:
 			cli_options += " -q"
 
-		if build.timing == True:
-			cli_options += " --timing"
-
 		if build.noDependInclude == True:
 			cli_options += " --no-depend-include"
 
@@ -448,9 +445,10 @@
 	created by the Main function. When operated by an IDE several Raptor
 	objects may be created and operated at the same time."""
 
-
+	# mission enumeration
 	M_BUILD = 1
-	M_VERSION = 2
+	M_QUERY = 2
+	M_VERSION = 3
 
 	def __init__(self, home = None):
 
@@ -520,7 +518,8 @@
 		self.noDependInclude = False
 		self.noDependGenerate = False
 		self.projects = set()
-
+		self.queries = []
+		
 		self.cache = raptor_cache.Cache(self)
 		self.override = {env: str(self.home)}
 		self.targets = []
@@ -534,7 +533,7 @@
 		# what platform and filesystem are we running on?
 		self.filesystem = raptor_utilities.getOSFileSystem()
 
-		self.timing = False
+		self.timing = True # Needed by filters such as copy_file to monitor progress
 		self.toolset = None
 
 		self.starttime = time.time()
@@ -696,7 +695,7 @@
 		return True
 
 	def SetTiming(self, TrueOrFalse):
-		self.timing = TrueOrFalse
+		self.Info("--timing switch no longer has any effect - build timing is now permanently on")
 		return True
 
 	def SetParallelParsing(self, type):
@@ -717,6 +716,11 @@
 		self.projects.add(projectName.lower())
 		return True
 
+	def AddQuery(self, q):
+		self.queries.append(q)
+		self.mission = Raptor.M_QUERY
+		return True
+	
 	def FilterList(self, value):
 		self.filterList = value
 		return True
@@ -795,8 +799,10 @@
 		self.args = args
 
 		# assuming self.CLI = "raptor_cli"
-		more_to_do = raptor_cli.GetArgs(self, args)
+		if not raptor_cli.GetArgs(self, args):
+			self.skipAll = True		# nothing else to do
 
+	def ParseCommandLineTargets(self):
 		# resolve inter-argument dependencies.
 		# --what or --check implies the WHAT target and FilterWhat Filter
 		if self.doWhat or self.doCheck:
@@ -829,9 +835,13 @@
 				self.filterList += ",filterclean"
 				if is_suspicious_clean:
 					self.Warn('CLEAN, CLEANEXPORT and a REALLYCLEAN should not be combined with other targets as the result is unpredictable.')
+			else:
+				""" Copyfile implements the <copy> tag which is primarily useful with cluster builds.
+				    It allows file copying to occur on the primary build host rather than on the cluster.
+				    This is more efficient.
+				"""
+				self.filterList += ",filtercopyfile"
 
-		if not more_to_do:
-			self.skipAll = True		# nothing else to do
 
 	def ProcessConfig(self):
 		# this function will perform additional processing of config
@@ -1057,7 +1067,7 @@
 			self.raptor_params = BuildStats(self)
 
 			# Open the requested plugins using the pluginbox
-			self.out.open(self.raptor_params, self.filterList.split(','), self.pbox)
+			self.out.open(self.raptor_params, self.filterList, self.pbox)
 
 			# log header
 			self.out.write("<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n")
@@ -1219,6 +1229,31 @@
 
 		return layers
 
+	def Query(self):
+		"process command-line queries."
+		
+		if self.mission != Raptor.M_QUERY:
+			return 0
+		
+		# establish an object cache based on the current settings
+		self.LoadCache()
+			
+		# our "self" is a valid object for initialising an API Context
+		import raptor_api
+		api = raptor_api.Context(self)
+		
+		print "<sbs version='%s'>" % raptor_version.numericversion()
+		
+		for q in self.queries:
+			try:
+				print api.stringquery(q)
+				
+			except Exception, e:
+				self.Error("exception '%s' with query '%s'", str(e), q)
+		
+		print "</sbs>"	
+		return self.errorCode
+	
 	def Build(self):
 
 		if self.mission != Raptor.M_BUILD: # help or version requested instead.
@@ -1318,9 +1353,21 @@
 		build.ConfigFile()
 		build.ProcessConfig()
 		build.CommandLine(argv)
+		build.ParseCommandLineTargets()
 
 		return build
+	
+	@classmethod
+	def CreateCommandlineAnalysis(cls, argv):
+		""" Perform an analysis run where a build is not performed. """
+		build = Raptor()
+		build.AssertBuildOK()
+		build.ConfigFile()
+		build.ProcessConfig()
+		build.CommandLine(argv)
+		# Don't parse command line targets - they don't make any sense if you're not doing a build
 
+		return build
 
 
 # Class for passing constricted parameters to filters
@@ -1356,6 +1403,9 @@
 	# object which represents a build
 	b = Raptor.CreateCommandlineBuild(argv)
 
+	if b.mission == Raptor.M_QUERY:
+		return b.Query()
+	
 	return b.Build()
 
 
Binary file sbsv2/raptor/python/raptor.pyc has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/python/raptor_api.py	Fri Jun 04 13:09:28 2010 +0100
@@ -0,0 +1,221 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# 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: 
+#
+# raptor_api module
+#
+# Python API for Raptor. External code should interact with Raptor via this
+# module only, as it is the only programatic interface considered public. The
+# command line --query option is also implemented using this module.
+
+# constants
+ALL = 1
+
+# objects
+
+class Reply(object):
+	"""object to return values from API calls.
+	"""
+	def __init__(self, text=""):
+		self.text = text
+	
+	def __str__(self):
+		name = type(self).__name__.lower()
+		
+		string = "<" + name
+		children = []
+		longend = False
+		
+		for attribute,value in self.__dict__.items():
+			if attribute != "text":
+				if isinstance(value, Reply):
+					children.append(value)
+				else:
+					string += " %s='%s'" % (attribute, value)
+		
+		if children or self.text:
+			string += ">"
+			longend = True
+		
+		if self.text:
+			string += self.text
+		
+		if children:
+			string += "\n"
+				
+		for c in children:
+			string += str(c)
+			
+		if longend:
+			string += "</%s>\n" % name
+		else:	
+			string += "/>\n"
+		
+		return string
+
+class Alias(Reply):
+	def __init__(self, name, meaning):
+		super(Alias,self).__init__()
+		self.name = name
+		self.meaning = meaning
+
+class Config(Reply):
+	def __init__(self, fullname, outputpath):
+		super(Config,self).__init__()
+		self.fullname = fullname
+		self.outputpath = outputpath
+
+class Product(Reply):
+	def __init__(self, name):
+		super(Product,self).__init__()
+		self.name = name
+
+import generic_path
+import raptor
+import raptor_data
+import re
+
+class Context(object):
+	"""object to contain state information for API calls.
+	
+	For example,
+	
+	api = raptor_api.Context()
+	val = api.getaliases("X")
+	"""
+	def __init__(self, initialiser=None):
+		# this object has a private Raptor object that can either be
+		# passed in or created internally.
+		
+		if initialiser == None:
+			self.__raptor = raptor.Raptor()
+		else:
+			self.__raptor = initialiser
+			
+	def stringquery(self, query):
+		"""turn a string into an API call and execute it.
+		
+		This is a convenience method for "lazy" callers.
+		
+		The return value is also converted into a well-formed XML string.
+		"""
+		
+		if query == "aliases":
+			aliases = self.getaliases()
+			return "".join(map(str, aliases)).strip()
+		
+		elif query == "products":
+			variants = self.getproducts()
+			return "".join(map(str, variants)).strip()
+		
+		elif query.startswith("config"):
+			match = re.match("config\[(.*)\]", query)
+			if match:
+				config = self.getconfig(match.group(1))
+				return str(config).strip()
+			else:
+				raise BadQuery("syntax error")
+		
+		raise BadQuery("unknown query")
+
+	def getaliases(self, type=""):
+		"""extract all aliases of a given type.
+		
+		the default type is "".
+		to get all aliases pass type=ALL
+		"""
+		aliases = []
+		
+		for a in self.__raptor.cache.aliases.values():
+			if type == ALL or a.type == type:
+				# copy the members we want to expose
+				aliases.append( Alias(a.name, a.meaning) )
+			
+		return aliases
+	
+	def getconfig(self, name):
+		"""extract the values for a given configuration.
+		
+		'name' should be an alias or variant followed optionally by a
+		dot-separated list of variants. For example "armv5_urel" or
+		"armv5_urel.savespace.vasco".
+		"""
+		names = name.split(".")
+		if names[0] in self.__raptor.cache.aliases:
+			x = self.__raptor.cache.FindNamedAlias(names[0])
+			
+			if len(names) > 1:
+				fullname = x.meaning + "." + ".".join(names[1:])
+			else:
+				fullname = x.meaning
+				
+		elif names[0] in self.__raptor.cache.variants:
+			fullname = name
+			
+		else:
+			raise BadQuery("'%s' is not an alias or a variant" % names[0])
+		
+		# create an evaluator for the named configuration
+		tmp = raptor_data.Alias("tmp")
+		tmp.SetProperty("meaning", fullname)
+		
+		units = tmp.GenerateBuildUnits(self.__raptor.cache)
+		evaluator = self.__raptor.GetEvaluator(None, units[0])
+		
+		# get the outputpath
+		# this is messy as some configs construct the path inside the FLM
+		# rather than talking it from the XML: usually because of some
+		# conditional logic... but maybe some refactoring could avoid that.
+		releasepath = evaluator.Get("RELEASEPATH")
+		if not releasepath:
+			raise BadQuery("could not get RELEASEPATH for config '%s'" % name)
+		
+		variantplatform = evaluator.Get("VARIANTPLATFORM")
+		varianttype = evaluator.Get("VARIANTTYPE")
+		featurevariantname = evaluator.Get("FEATUREVARIANTNAME")
+		
+		platform = evaluator.Get("TRADITIONAL_PLATFORM")
+		
+		if platform == "TOOLS2":
+			outputpath = releasepath
+		else:
+			if not variantplatform:
+				raise BadQuery("could not get VARIANTPLATFORM for config '%s'" % name)
+			
+			if featurevariantname:
+				variantplatform += featurevariantname
+				
+			if not varianttype:
+				raise BadQuery("could not get VARIANTTYPE for config '%s'" % name)
+			
+			outputpath = str(generic_path.Join(releasepath, variantplatform, varianttype))
+		
+		return Config(fullname, outputpath)
+		
+	def getproducts(self):
+		"""extract all product variants."""
+		
+		variants = []
+		
+		for v in self.__raptor.cache.variants.values():
+			if v.type == "product":
+				# copy the members we want to expose
+				variants.append( Product(v.name) )
+			
+		return variants
+	
+class BadQuery(Exception):
+	pass
+
+# end of the raptor_api module
Binary file sbsv2/raptor/python/raptor_cache.pyc has changed
--- a/sbsv2/raptor/python/raptor_cli.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/python/raptor_cli.py	Fri Jun 04 13:09:28 2010 +0100
@@ -18,13 +18,8 @@
 # by a raptor.Raptor object.
 #
 
-import re
 import types
 import raptor
-import os
-import sys
-import tempfile
-from raptor_utilities import getOSPlatform
 
 from optparse import OptionParser # for parsing command line parameters
 
@@ -132,6 +127,18 @@
 parser.add_option("-q","--quiet",action="store_true",dest="quiet",
 				help="Run quietly, not generating output messages.")
 
+parser.add_option("--query",action="append",dest="query",
+				help="""Access various build settings and options using a basic API. The current options are:
+				
+				* aliases - return all the values that can be sensibly used with the sbs -c option.
+				
+				* products - return all the values that can be "." appended to an alias to specialise it for a product build.
+				
+				* config[x] - return a set of values that represent the build configuration "x". Typically "x" will be an alias name or an alias followed by "." followed by a product.
+				
+				Multiple --query options can be given.
+				""")
+
 parser.add_option("-s","--sysdef",action="store",dest="sys_def_file",
 				help="System Definition XML filename.")
 
@@ -245,8 +252,7 @@
 	# parse the full set of arguments
 	(options, leftover_args) = parser.parse_args(expanded_args)
 
-	# the leftover_args are either variable assignments of the form a=b
-	# or target names.
+	# the leftover_args are target names.
 	for leftover in leftover_args:
 		Raptor.AddTarget(leftover)
 
@@ -275,6 +281,7 @@
 				 'noDependGenerate': Raptor.SetNoDependGenerate,
 				 'number_of_jobs': Raptor.SetJobs,
 				 'project_name' :  Raptor.AddProject,
+				 'query' : Raptor.AddQuery,
 				 'filter_list' : Raptor.FilterList,
 				 'ignore_os_detection': Raptor.IgnoreOsDetection,
 				 'check' :  Raptor.SetCheck,
Binary file sbsv2/raptor/python/raptor_cli.pyc has changed
--- a/sbsv2/raptor/python/raptor_data.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/python/raptor_data.py	Fri Jun 04 13:09:28 2010 +0100
@@ -829,12 +829,13 @@
 
 class Variant(Model, Config):
 
-	__slots__ = ('cache','name','host','extends','ops','variantRefs','allOperations')
+	__slots__ = ('cache','name','type','host','extends','ops','variantRefs','allOperations')
 
 	def __init__(self, name = ""):
 		Model.__init__(self)
 		Config.__init__(self)
 		self.name = name
+		self.type = ""
 
 		# Operations defined inside this variant.
 		self.ops = []
@@ -855,6 +856,8 @@
 				self.host = value
 		elif name == "extends":
 			self.extends = value
+		elif name == "type":
+			self.type = value
 		else:
 			raise InvalidPropertyError()
 
@@ -948,6 +951,7 @@
 		Config.__init__(self)
 		self.name = name
 		self.meaning = ""
+		self.type = ""
 		self.varRefs = []
 		self.variants = []
 
@@ -962,6 +966,8 @@
 
 			for u in val.split("."):
 				self.varRefs.append( VariantRef(ref = u) )
+		elif key == "type":
+			self.type = val
 		else:
 			raise InvalidPropertyError()
 
Binary file sbsv2/raptor/python/raptor_data.pyc has changed
--- a/sbsv2/raptor/python/raptor_make.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/python/raptor_make.py	Fri Jun 04 13:09:28 2010 +0100
@@ -68,7 +68,10 @@
 def AnnoFileParseOutput(annofile):
 	""" A generator that extracts log output from an emake annotation file, 
 	    perform an XML-unescape on it and "yields" it line by line.  """
-	af = open(annofile, "r")
+	if isinstance(annofile,str):
+		af = open(annofile, "r")
+	else:
+		af = annofile
 
 	inOutput = False
 
@@ -158,6 +161,12 @@
 			self.talonshell = str(evaluator.Get("TALON_SHELL"))
 			self.talontimeout = str(evaluator.Get("TALON_TIMEOUT"))
 			self.talonretries = str(evaluator.Get("TALON_RETRIES"))
+			
+			# work around for RVCT 2.2 failed compiles
+			delete_on_failed_compile_s = evaluator.Get("DELETE_ON_FAILED_COMPILE")
+			self.delete_on_failed_compile = ""
+			if delete_on_failed_compile_s is not None and delete_on_failed_compile_s != "":
+				self.delete_on_failed_compile = "1"
 
 			# commands
 			self.initCommand = evaluator.Get("initialise")
@@ -271,6 +280,7 @@
 FLMHOME:=%s
 SHELL:=%s
 THIS_FILENAME:=$(firstword $(MAKEFILE_LIST))
+DELETE_ON_FAILED_COMPILE:=%s 
 
 %s
 
@@ -282,6 +292,7 @@
 			 self.raptor.filesystem,
 			 str(self.raptor.systemFLM),
 			 self.shellpath,
+			 self.delete_on_failed_compile,
 			 talon_settings,
 			 self.raptor.systemFLM.Append('globals.mk') )
 
Binary file sbsv2/raptor/python/raptor_make.pyc has changed
Binary file sbsv2/raptor/python/raptor_makefile.pyc has changed
--- a/sbsv2/raptor/python/raptor_meta.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/python/raptor_meta.py	Fri Jun 04 13:09:28 2010 +0100
@@ -35,6 +35,7 @@
 from mmpparser import *
 
 import time
+import generic_path
 
 
 PiggyBackedBuildPlatforms = {'ARMV5':['GCCXML']}
@@ -768,9 +769,13 @@
 			biloc="." # Someone building with a relative raptor path
 
 		self.__StandardVariables = {}
-		# Relative step-down to the root - let's try ignoring this for now, as it
-		# should amount to the same thing in a world where absolute paths are king
-		self.__StandardVariables['TO_ROOT'] = ""
+		# The source root directory is SRCROOT if set in the environment
+		# Set TO_ROOT to SRCROOT in case SBS_BUILD_DIR is on a different drive
+		if 'SRCROOT' in os.environ:
+			self.__StandardVariables['TO_ROOT'] = str(generic_path.Path(os.environ['SRCROOT']))
+		else:
+			self.__StandardVariables['TO_ROOT'] = ""
+		
 		# Top-level bld.inf location
 		self.__StandardVariables['TO_BLDINF'] = biloc
 		self.__StandardVariables['EXTENSION_ROOT'] = eiloc
@@ -838,9 +843,12 @@
 			eiloc="." # Someone building with a relative raptor path
 
 		self.__StandardVariables = {}
-		# Relative step-down to the root - let's try ignoring this for now, as it
-		# should amount to the same thing in a world where absolute paths are king
-		self.__StandardVariables['TO_ROOT'] = ""
+		# The source root directory is SRCROOT if set in the environment	
+		# Set TO_ROOT to SRCROOT in case SBS_BUILD_DIR is on a different drive
+		if 'SRCROOT' in os.environ:
+			self.__StandardVariables['TO_ROOT'] = str(generic_path.Path(os.environ['SRCROOT']))
+		else:
+			self.__StandardVariables['TO_ROOT'] = ""
 		# Top-level bld.inf location
 		self.__StandardVariables['TO_BLDINF'] = biloc
 		# Location of bld.inf file containing the current EXTENSION block
@@ -1071,9 +1079,12 @@
 			if (re.search(r'^\s*START ',extensionLine, re.I)):
 				start = extensionLine
 			elif re.search(r'^\s*END\s*$',extensionLine, re.I):
-				extensionObjects.append(Extension(self.filename, start, options, aBuildPlatform, self.__Raptor))
-				start = ""
-				options = []
+				if start == "":
+					self.log.Error("unmatched END statement in %s section", aType, bldinf=str(self.filename))
+				else:
+					extensionObjects.append(Extension(self.filename, start, options, aBuildPlatform, self.__Raptor))
+					start = ""
+					options = []
 			elif re.search(r'^\s*$',extensionLine, re.I):
 				continue
 			elif start:
@@ -1488,9 +1499,9 @@
 
 				self.__versionhex = "%04x%04x" % (major, minor)
 				self.BuildVariant.AddOperation(raptor_data.Set(varname, "%d.%d" %(major, minor)))
-				self.BuildVariant.AddOperation(raptor_data.Set(varname+"HEX", self.__versionhex))
+				self.BuildVariant.AddOperation(raptor_data.Set("VERSIONHEX", self.__versionhex))
 				self.__debug("Set "+toks[0]+"  OPTION to " + toks[1])
-				self.__debug("Set "+toks[0]+"HEX OPTION to " + "%04x%04x" % (major,minor))
+				self.__debug("Set VERSIONHEX OPTION to " + self.__versionhex)
 
 			else:
 				self.__Raptor.Warn("Invalid version supplied to VERSION (%s), using default value" % toks[1])
@@ -3079,7 +3090,6 @@
 				value = options[option].replace('$(EPOCROOT)', '$(EPOCROOT)/')
 				value = value.replace('$(', '$$$$(')
 				value = value.replace('$/', '/').replace('$;', ':')
-				value = value.replace('$/', '/').replace('$;', ':')
 
 				if customInterface:
 					var.AddOperation(raptor_data.Set(option, value))
@@ -3296,7 +3306,7 @@
 					self.__Raptor.Debug("Skipping %s", str(m.getMakefileName()))
 					continue
 				elif projectname in self.projectList:
-					projectList.remove(projectname)
+					self.projectList.remove(projectname)
 
 			self.__Raptor.Debug("%i makefile extension makefiles for %s",
 						len(makefileList), str(componentNode.component.bldinf.filename))
Binary file sbsv2/raptor/python/raptor_meta.pyc has changed
--- a/sbsv2/raptor/python/raptor_utilities.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/python/raptor_utilities.py	Fri Jun 04 13:09:28 2010 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -20,6 +20,8 @@
 import os.path
 import re
 import sys
+import stat
+import shutil
 
 dosSlashRegEx = re.compile(r'\\')
 unixSlashRegEx = re.compile(r'/')
@@ -189,3 +191,50 @@
 		return
 
 nulllog = NullLog()
+
+def copyfile(_source, _destination):
+	"""Copy the source file to the destination file (create a directory
+	   to copy into if it does not exist). Don't copy if the destination
+	   file exists and has an equal or newer modification time."""
+	source = generic_path.Path(str(_source).replace('%20',' '))
+	destination = generic_path.Path(str(_destination).replace('%20',' '))
+	dest_str = str(destination)
+	source_str = str(source)
+
+	try:
+
+
+		destDir = destination.Dir()
+		if not destDir.isDir():
+			os.makedirs(str(destDir))
+			shutil.copyfile(source_str, dest_str)
+			return 
+		# Destination file exists so we have to think about updating it
+		sourceMTime = 0
+		destMTime = 0
+		sourceStat = 0
+		try:
+			sourceStat = os.stat(source_str)
+			sourceMTime = sourceStat[stat.ST_MTIME]
+		except OSError, e:
+			message = "Source of copyfile does not exist:  " + str(source)
+			raise IOError(message)
+		try:
+			destMTime = os.stat(dest_str)[stat.ST_MTIME]
+		except OSError, e:
+			pass # destination doesn't have to exist
+
+		if destMTime == 0 or destMTime < sourceMTime:
+			if os.path.exists(dest_str):
+				os.chmod(dest_str,stat.S_IREAD | stat.S_IWRITE)
+			shutil.copyfile(source_str, dest_str)
+
+			# Ensure that the destination file remains executable if the source was also:
+			os.chmod(dest_str,sourceStat[stat.ST_MODE] | stat.S_IREAD | stat.S_IWRITE | stat.S_IWGRP ) 
+
+
+	except Exception,e:
+		message = "Could not update " + dest_str + " from " + source_str + " : " + str(e)
+		raise IOError(message)
+
+	return 
Binary file sbsv2/raptor/python/raptor_utilities.pyc has changed
--- a/sbsv2/raptor/python/raptor_version.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/python/raptor_version.py	Fri Jun 04 13:09:28 2010 +0100
@@ -16,7 +16,7 @@
 
 # replace CHANGESET with the Hg changeset for ANY release
 
-version=(2,13,0,"2010-04-12","symbian build system","CHANGESET")
+version=(2,14,1,"2010-06-03","symbian build system","CHANGESET")
 
 def numericversion():
 	"""Raptor version string"""
Binary file sbsv2/raptor/python/raptor_version.pyc has changed
--- a/sbsv2/raptor/python/raptor_xml.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/python/raptor_xml.py	Fri Jun 04 13:09:28 2010 +0100
@@ -11,7 +11,7 @@
 #
 # Contributors:
 #
-# Description: 
+# Description:
 # raptor_xml module
 #
 
@@ -67,15 +67,15 @@
 	objects = []
 
 	fileVersion = build.getAttribute("xsi:schemaLocation")
-	
+
 	# ignore the file it matches the "invalid" schema
 	if fileVersion.endswith(xsdIgnore):
 		return objects
-		
+
 	# check that the file matches the expected schema
 	if not fileVersion.endswith(xsdVersion):
 		Raptor.Warn("file '%s' uses schema '%s' which does not end with the expected version '%s'", filename, fileVersion, xsdVersion)
-		
+
 	# create a Data Model object from each sub-element
 	for child in build.childNodes:
 		if child.namespaceURI == namespace \
@@ -147,21 +147,21 @@
 	def __init__(self, aBldInfFile, aLayerName, aContainerNames, aSystemDefinitionFile, aSystemDefinitionBase, aSystemDefinitionVersion):
 		generic_path.Path.__init__(self, aBldInfFile.Absolute().path)
 		self.__ContainerNames = aContainerNames
-		self.__LayerName = aLayerName
+		self.__LayerName = aLayerName
 		self.__SystemDefinitionFile = aSystemDefinitionFile
-		self.__SystemDefinitionBase = aSystemDefinitionBase
-		self.__SystemDefinitionVersion = aSystemDefinitionVersion
+		self.__SystemDefinitionBase = aSystemDefinitionBase
+		self.__SystemDefinitionVersion = aSystemDefinitionVersion
 
 	def GetSystemDefinitionFile(self):
 		return self.__SystemDefinitionFile
 
 	def GetSystemDefinitionBase(self):
 		return self.__SystemDefinitionBase
-
-	def GetSystemDefinitionVersion(self):
-		return self.__SystemDefinitionVersion
-
-	def GetLayerName(self):
+
+	def GetSystemDefinitionVersion(self):
+		return self.__SystemDefinitionVersion
+
+	def GetLayerName(self):
 		return self.__LayerName
 
 	def GetContainerName(self, aContainerType):
@@ -177,12 +177,13 @@
 		self.__Logger = aLogger
 		self.__SystemDefinitionFile = aSystemDefinitionFile.GetLocalString()
 		self.__SystemDefinitionBase = aSystemDefinitionBase.GetLocalString()
-		self.__Version = {'MAJOR':0,'MID':0,'MINOR':0}
-		self.__IdAttribute = "name"
+		self.__Version = {'MAJOR':0,'MID':0,'MINOR':0}
+		self.__IdAttribute = "name"
 		self.__ComponentRoot = ""
 		self.__TotalComponents = 0
 		self.__LayerList = []
 		self.__LayerDetails = {}
+		self.__MissingBldInfs = {}
 
 		self.__DOM = None
 		self.__SystemDefinitionElement = None
@@ -208,10 +209,16 @@
 		return self.__LayerDetails[aLayer]
 
 	def IsLayerBuildable(self, aLayer):
+		if aLayer in self.__MissingBldInfs:
+			for missingbldinf in self.__MissingBldInfs[aLayer]:
+				self.__Logger.Error("System Definition layer \"%s\" from system definition file \"%s\" " + \
+								    "refers to non existent bld.inf file %s", aLayer, self.__SystemDefinitionFile, missingbldinf)
+
 		if len(self.GetLayerComponents(aLayer)):
 			return True
 		return False
 
+
 	def GetAllComponents(self):
 		components = []
 
@@ -268,33 +275,33 @@
 
 		if self.__Version['MAJOR'] == 1 and self.__Version['MID'] > 2:
 			self.__ComponentRoot = self.__SystemDefinitionBase
-		elif self.__Version['MAJOR'] == 2 or self.__Version['MAJOR'] == 3:
-			# 2.0.x and 3.0.0 formats support SOURCEROOT or SRCROOT as an environment specified base - we respect this, unless
-			# explicitly overridden on the command line
-			if os.environ.has_key('SRCROOT'):
-				self.__ComponentRoot = generic_path.Path(os.environ['SRCROOT'])
-			elif os.environ.has_key('SOURCEROOT'):
+		elif self.__Version['MAJOR'] == 2 or self.__Version['MAJOR'] == 3:
+			# 2.0.x and 3.0.0 formats support SOURCEROOT or SRCROOT as an environment specified base - we respect this, unless
+			# explicitly overridden on the command line
+			if os.environ.has_key('SRCROOT'):
+				self.__ComponentRoot = generic_path.Path(os.environ['SRCROOT'])
+			elif os.environ.has_key('SOURCEROOT'):
 				self.__ComponentRoot = generic_path.Path(os.environ['SOURCEROOT'])
-				
-			if self.__SystemDefinitionBase and self.__SystemDefinitionBase != ".":
-				self.__ComponentRoot = self.__SystemDefinitionBase
-				if os.environ.has_key('SRCROOT'):
-					self.__Logger.Info("Command line specified System Definition file base \'%s\' overriding environment SRCROOT \'%s\'", self.__SystemDefinitionBase, os.environ['SRCROOT'])
-				elif os.environ.has_key('SOURCEROOT'):
-					self.__Logger.Info("Command line specified System Definition file base \'%s\' overriding environment SOURCEROOT \'%s\'", self.__SystemDefinitionBase, os.environ['SOURCEROOT'])
+
+			if self.__SystemDefinitionBase and self.__SystemDefinitionBase != ".":
+				self.__ComponentRoot = self.__SystemDefinitionBase
+				if os.environ.has_key('SRCROOT'):
+					self.__Logger.Info("Command line specified System Definition file base \'%s\' overriding environment SRCROOT \'%s\'", self.__SystemDefinitionBase, os.environ['SRCROOT'])
+				elif os.environ.has_key('SOURCEROOT'):
+					self.__Logger.Info("Command line specified System Definition file base \'%s\' overriding environment SOURCEROOT \'%s\'", self.__SystemDefinitionBase, os.environ['SOURCEROOT'])
 		else:
 			self.__Logger.Error("Cannot process schema version %s of file %s", version.string, self.__SystemDefinitionFile)
 			return False
-
-		if self.__Version['MAJOR'] >= 3:
-			# id is the unique identifier for 3.0 and later schema
-			self.__IdAttribute = "id"
+
+		if self.__Version['MAJOR'] >= 3:
+			# id is the unique identifier for 3.0 and later schema
+			self.__IdAttribute = "id"
 
 		return True
 
 	def __Parse(self):
 		# For 2.0 and earlier: find the <systemModel> element (there can be 0 or 1) and search any <layer> elements for <unit> elements with "bldFile" attributes
-		# the <layer> context of captured "bldFile" attributes is recorded as we go
+		# the <layer> context of captured "bldFile" attributes is recorded as we go
 		# For 3.0 and later, process any architectural topmost element, use the topmost element with an id as the "layer"
 		for child in self.__SystemDefinitionElement.childNodes:
 			if child.localName in ["systemModel", "layer", "package", "collection", "component"]:
@@ -303,20 +310,20 @@
 	def __CreateComponent(self, aBldInfFile, aUnitElement):
 		# take a resolved bld.inf file and associated <unit/> element and returns a populated Component object
 		containers = {}
-		self.__GetElementContainers(aUnitElement, containers)
+		self.__GetElementContainers(aUnitElement, containers)
 		layer = self.__GetEffectiveLayer(aUnitElement)
 		component = SystemModelComponent(aBldInfFile, layer, containers, self.__SystemDefinitionFile, self.__SystemDefinitionBase, self.__Version)
 
 		return component
-
-	def __GetEffectiveLayer(self, aElement):
-		#' return the ID of the topmost item which has an ID. For 1.x and 2.x, this will always be layer, for 3.x, it will be the topmost ID'd element in the file
-		# never call this on the root element
-		if aElement.parentNode.hasAttribute(self.__IdAttribute):
-			return self.__GetEffectiveLayer(aElement.parentNode)
-		elif aElement.hasAttribute(self.__IdAttribute):
-			return aElement.getAttribute(self.__IdAttribute)
-		return ""
+
+	def __GetEffectiveLayer(self, aElement):
+		#' return the ID of the topmost item which has an ID. For 1.x and 2.x, this will always be layer, for 3.x, it will be the topmost ID'd element in the file
+		# never call this on the root element
+		if aElement.parentNode.hasAttribute(self.__IdAttribute):
+			return self.__GetEffectiveLayer(aElement.parentNode)
+		elif aElement.hasAttribute(self.__IdAttribute):
+			return aElement.getAttribute(self.__IdAttribute)
+		return ""
 
 	def __GetElementContainers(self, aElement, aContainers):
 		# take a <unit/> element and creates a type->name dictionary of all of its parent containers
@@ -333,7 +340,7 @@
 	def __ProcessSystemModelElement(self, aElement):
 		"""Search for XML <unit/> elements with 'bldFile' attributes and resolve concrete bld.inf locations
 		with an appreciation of different schema versions."""
-
+
 		# The effective "layer" is the item whose parent does not have an id (or name in 2.x and earlier)
 		if not aElement.parentNode.hasAttribute(self.__IdAttribute) :
 			currentLayer = aElement.getAttribute(self.__IdAttribute)
@@ -368,19 +375,26 @@
 
 				group = generic_path.Path(bldFileValue)
 
-				if self.__Version['MAJOR'] < 3:
-					# absolute paths are not changed by root var in 1.x and 2.x
+				if self.__Version['MAJOR'] < 3:
+					# absolute paths are not changed by root var in 1.x and 2.x
 					if not group.isAbsolute() and bldInfRoot:
-						group = generic_path.Join(bldInfRoot, group)
-				else:
-					# only absolute paths are changed by root var in 3.x
-					if group.isAbsolute() and bldInfRoot:
-						group = generic_path.Join(bldInfRoot, group)
+						group = generic_path.Join(bldInfRoot, group)
+				else:
+					# only absolute paths are changed by root var in 3.x
+					if group.isAbsolute() and bldInfRoot:
+						group = generic_path.Join(bldInfRoot, group)
 
 				bldinf = generic_path.Join(group, "bld.inf").FindCaseless()
 
 				if bldinf == None:
-					self.__Logger.Error("No bld.inf found at %s in %s", group.GetLocalString(), self.__SystemDefinitionFile)
+					# recording layers containing non existent bld.infs
+					bldinfname = group.GetLocalString()
+					bldinfname = bldinfname + 'bld.inf'
+					layer = self.__GetEffectiveLayer(aElement)
+					if not layer in self.__MissingBldInfs:
+						self.__MissingBldInfs[layer]=[]
+					self.__MissingBldInfs[layer].append(bldinfname)
+
 				else:
 					component = self.__CreateComponent(bldinf, aElement)
 					layer = component.GetLayerName()
Binary file sbsv2/raptor/python/raptor_xml.pyc has changed
--- a/sbsv2/raptor/test/common/raptor_tests.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/common/raptor_tests.py	Fri Jun 04 13:09:28 2010 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -603,9 +603,14 @@
 		# paths in --what output are tailored to the host OS, hence slashes are converted appropriately
 		# .whatlog output is used verbatim from the build/TEM/EM output
 		self.hostossensitive = True
+		
+		# Indicate whether output is expected to appear only once. If so, set it to True
+		self.output_expected_only_once = False 
 	
 	def posttest(self):
 		outlines = self.output.splitlines()
+		if self.output_expected_only_once:
+			outlines_left = list(outlines) 
 		
 		ok = True
 		seen = []
@@ -620,6 +625,8 @@
 				
 			if line in outlines:
 				seen.append(line)
+				if self.output_expected_only_once:
+					outlines_left.remove(line) 
 			else:
 				print "OUTPUT NOT FOUND:", line
 				ok = False
@@ -631,6 +638,13 @@
 			if not line in seen:
 				print "UNEXPECTED OUTPUT:", line
 				ok = False
+		
+		# and check for lines that we expected to see only once
+		if self.output_expected_only_once:
+			for line in outlines_left:
+				print "OUTPUT MORE THAN ONCE:", line
+				ok = False
+
 			
 		# do the base class things too
 		return (SmokeTest.posttest(self) and ok)	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/config/abiv1kit/os_properties.xml	Fri Jun 04 13:09:28 2010 +0100
@@ -0,0 +1,15 @@
+<?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 modifies the root variant for this particular kit. -->
+  <var name="root.changes">
+
+    <!-- ask for ABIv1 import libraries
+    --> 
+    <set name='SUPPORTS_ABIV1_IMPLIBS' value='1'/>
+  </var>
+  
+</build>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/config/api.xml	Fri Jun 04 13:09:28 2010 +0100
@@ -0,0 +1,32 @@
+<?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">
+
+	<!-- test data for raptor_api_unit -->
+
+	<alias meaning="a" name="alias_A"/>
+	<alias meaning="a.b" name="alias_B"/>
+	<alias meaning="a.b.c" name="alias_C" type="O"/>
+	<alias meaning="a.b.c.d" name="alias_D" type="X"/>
+ 
+ 	<var name="product_A" type="product"/>
+ 	<var name="product_B"/>
+ 	<var name="product_C" type="product"/>
+ 	<var name="product_D"/>
+ 	
+ 	<var name="buildme">
+ 		<set name="RELEASEPATH" value="/home/raptor" host="lin.*"/>
+ 		<set name="RELEASEPATH" value="C:/home/raptor" host="win.*"/>
+ 		<set name="VARIANTPLATFORM" value="foo"/>
+ 		<set name="VARIANTTYPE" value="bar"/>
+ 	</var>
+ 	
+ 	<var name="foo"/>
+ 	<var name="bar"/>
+ 	
+ 	<alias name="s1" meaning="buildme.foo"/>
+ 	<alias name="s2" meaning="buildme.foo.bar"/>
+ 	
+</build>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/metadata/project/bld.infs/bad_lone_end.inf	Fri Jun 04 13:09:28 2010 +0100
@@ -0,0 +1,33 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* 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: 
+*
+*/
+
+// test for failure in PRJ_EXTENSIONS by processing for ARMV5 and
+// test for failure in PRJ_TESTEXTENSIONS by processing for WINSCW
+
+#ifdef EABI
+
+PRJ_EXTENSIONS
+// an END without a START
+END
+
+#else
+
+PRJ_TESTEXTENSIONS
+// an END without a START
+END
+
+#endif
--- a/sbsv2/raptor/test/metadata/system/system_definition_multi_layers.xml	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/metadata/system/system_definition_multi_layers.xml	Fri Jun 04 13:09:28 2010 +0100
@@ -34,5 +34,14 @@
 		</layer>
 	    <layer name="Fifth Layer">
 		</layer>
+		<!--layer name="Sixth layer" deliberately omitted -->
+	    <layer name="Seventh Layer">
+			<component name="simple_stringtable">
+				<unit bldFile="test/smoke_suite/test_resources/simple_plugin" root="SBS_HOME" mrp="simple_plugin/test.mrp"/>
+			</component>
+			<component name="does_not_exist">
+				<unit bldFile="test/smoke_suite/test_resources/does_not_exist" root="SBS_HOME" mrp="does_not_exist/test.mrp"/>
+			</component>
+		</layer>
 	</systemModel>
 </SystemDefinition>
--- a/sbsv2/raptor/test/smoke_suite/annofile2log.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/annofile2log.py	Fri Jun 04 13:09:28 2010 +0100
@@ -19,14 +19,14 @@
 def run():
 	t = SmokeTest()
 	t.id = "43563"
-	t.name = "annofile2log_canned"
+	t.name = "annofile2log"
 	t.description = "test workaround for log corruption from a make engine whose name begins with 'e'"
 	
 	t.usebash = True
 	t.errors = 0
 	t.returncode = 0
 	t.exceptions = 0
-	t.command = "cd smoke_suite/test_resources/annofile2log && ( diff -wB <(python testanno2log.py <(bzip2 -dc scrubbed_ncp_dfs_resource.anno.bz2)) <(bzip2 -dc scrubbed_ncp_dfs_resource.stdout.bz2))"
+	t.command = 'cd smoke_suite/test_resources/annofile2log && ( FROMANNO="`mktemp`" ; bzip2 -dc scrubbed_ncp_dfs_resource.anno.bz2 | python testanno2log.py  >"${FROMANNO}" && FROMSTDOUT="`mktemp`"; bzip2 -dc scrubbed_ncp_dfs_resource.stdout.bz2 > "${FROMSTDOUT}" && diff -wB "${FROMANNO}" "${FROMSTDOUT}"; RET=$? ; rm "${FROMANNO}" "${FROMSTDOUT}"; exit $RET )'
 	
 	t.mustmatch_multiline = [ 
 		"^ *.?"
--- a/sbsv2/raptor/test/smoke_suite/apply_usecases.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/apply_usecases.py	Fri Jun 04 13:09:28 2010 +0100
@@ -23,7 +23,7 @@
 
 	# Introduce LINKER_OPTIONS for tools2 linker
 	t.id = "0108"
-	t.name = "apply_linker_options"
+	t.name = "apply_usecases"
 	t.command = "sbs -b smoke_suite/test_resources/apply_usecases/linker_options/bld.inf -c tools2 -f -"
 	t.targets = [
 		"$(EPOCROOT)/epoc32/release/tools2/rel/test_apply_linkeroptions.exe"
--- a/sbsv2/raptor/test/smoke_suite/clean_readonly.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/clean_readonly.py	Fri Jun 04 13:09:28 2010 +0100
@@ -24,7 +24,7 @@
 	
 	t = AntiTargetSmokeTest()
 	t.id = "10a"
-	t.name = "cleanreadonly" 
+	t.name = "clean_readonly" 
 	t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c armv5"
 	t.targets = [
 		"$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll.sym",
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/delete_on_failed_compile.py	Fri Jun 04 13:09:28 2010 +0100
@@ -0,0 +1,109 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# 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: 
+#
+
+import os
+from raptor_tests import AntiTargetSmokeTest
+
+def run():
+	t = AntiTargetSmokeTest()
+	t.id = "116"
+	t.name = "delete_on_failed_compile"
+	t.description = "Test that object files are not present following a forced failed compile."
+	
+	t.usebash = True
+	base_command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c armv5 -k"
+	
+	t.id = "116a" # Ensure everything is reallyclean before the test
+	t.name = "delete_on_failed_compile_reallyclean_01"
+	t.errors = 0
+	t.returncode = 0
+	t.antitargets = [ ]
+	t.command = base_command + " reallyclean"
+	t.run()
+	
+	t.id = "116b"  # Object files should *not* be present after this forced failed compile
+	t.name = "delete_on_failed_compile_build"
+	t.errors = 0
+	t.returncode = 1
+	# None of these files should be present
+	t.addbuildantitargets('smoke_suite/test_resources/simple/bld.inf', 
+		[	"test_/armv5/udeb/test.o",
+			"test_/armv5/udeb/test1.o",
+			"test_/armv5/udeb/test2.o",
+			"test_/armv5/udeb/test3.o",
+			"test_/armv5/udeb/test4.o",
+			"test_/armv5/udeb/test5.o",
+			"test_/armv5/udeb/test6.o",
+			"test_/armv5/urel/test.o",
+			"test_/armv5/urel/test1.o",
+			"test_/armv5/urel/test2.o",
+			"test_/armv5/urel/test3.o",
+			"test_/armv5/urel/test4.o",
+			"test_/armv5/urel/test5.o",
+			"test_/armv5/urel/test6.o"  ])
+	sbshome = os.environ["SBS_HOME"].replace("\\","/").rstrip("/")
+	t.command = base_command.replace("armv5", "armv5.fake_compiler") + \
+	" --configpath=%s/test/smoke_suite/test_resources/simple/compilervariants" % sbshome
+	t.run()
+	
+	t.id = "116c"
+	t.name = "delete_on_failed_compile_reallyclean_02"
+	t.errors = 0
+	t.returncode = 0
+	t.antitargets = [] # Remove the list of anti-targets
+	t.command = base_command + " reallyclean"
+	t.run()
+	
+	t.id = "116d"  # Use a redefined make_engine variant - object files *should* be present
+	t.name = "delete_on_failed_compile_build_redefined_make_engine"
+	t.errors = 0
+	t.returncode = 1
+	t.antitargets = [] # Remove the list of anti-targets
+	# All of these files should be present
+	t.addbuildtargets('smoke_suite/test_resources/simple/bld.inf', 
+		[	"test_/armv5/udeb/test.o",
+			"test_/armv5/udeb/test1.o",
+			"test_/armv5/udeb/test2.o",
+			"test_/armv5/udeb/test3.o",
+			"test_/armv5/udeb/test4.o",
+			"test_/armv5/udeb/test5.o",
+			"test_/armv5/udeb/test6.o",
+			"test_/armv5/urel/test.o",
+			"test_/armv5/urel/test1.o",
+			"test_/armv5/urel/test2.o",
+			"test_/armv5/urel/test3.o",
+			"test_/armv5/urel/test4.o",
+			"test_/armv5/urel/test5.o",
+			"test_/armv5/urel/test6.o"  ])
+	
+	t.command = base_command.replace("armv5", "armv5.fake_compiler") + " -e make_test " \
+	+ " --configpath=%s/test/smoke_suite/test_resources/simple/compilervariants " % sbshome \
+	+ " --configpath=%s/test/smoke_suite/test_resources/simple/makevariants" % sbshome
+	t.run()
+	
+	t.id = "116e"
+	t.name = "delete_on_failed_compile_reallyclean_03"
+	t.errors = 0
+	t.returncode = 0
+	t.antitargets = [] # Remove the list of anti-targets
+	t.targets = [] # Remove the list of targets
+	t.command = base_command + " reallyclean"
+	t.run()
+	
+	t.id = "116"
+	t.name = "delete_on_failed_compile"
+	t.print_result()
+	return t
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/depcrunch_test.py	Fri Jun 04 13:09:28 2010 +0100
@@ -0,0 +1,46 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# 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 dependency crunching for resource dependency files produces expected output" 
+
+	t.id = "43562999"
+	t.name = "depcrunch"
+	t.command = "python $SBS_HOME/bin/depcrunch.py --extensions mbg,rsg --assume EPOCROOT < smoke_suite/test_resources/depcrunch/dep2.rpp.d"
+	t.mustmatch_multiline = [
+		r"EPOCROOT/epoc32/build/resource/c_98665870f0168225/dependentresource_/dependentresource_dependentresource_sc.rpp: \\\n"+
+		r" EPOCROOT/testresource1.mbg \\\n"+
+		r" EPOCROOT/testresource2.rsg \\\n"+
+		r" EPOCROOT/testresource3.rsg \\\n"+
+		r" EPOCROOT/testresource4.mbg \\\n"+
+		r" EPOCROOT/testresource5.rsg \\\n"+
+		r" EPOCROOT/testresource6.mbg \\\n"+
+		r" EPOCROOT/testresource7.rsg \\\n"+
+		r" EPOCROOT/testresource8.mbg \\\n"+
+		r" EPOCROOT/testresource9.rsg \n"
+		]
+	t.run()
+
+
+	t.print_result()
+	
+	return t
+
--- a/sbsv2/raptor/test/smoke_suite/dll_armv5.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/dll_armv5.py	Fri Jun 04 13:09:28 2010 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -19,7 +19,6 @@
 def run():
 	t = AntiTargetSmokeTest()
 	t.usebash = True
-	result = AntiTargetSmokeTest.PASS
 	
 	command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c %s -f-"
 	maintargets = [
@@ -47,7 +46,7 @@
 		]
 	
 	# Note that ABIv1 import libraries are only generated for RVCT-based armv5
-	# builds on Windows
+	# builds on Windows if the kit asks for it (off by default)
 	
 	t.id = "0009a"
 	t.name = "dll_armv5_rvct"
@@ -56,24 +55,23 @@
 	t.addbuildtargets('smoke_suite/test_resources/simple_dll/bld.inf', buildtargets)
 	t.mustmatch = mustmatch
 	t.mustnotmatch = mustnotmatch
-	t.run("linux")
-	if t.result == AntiTargetSmokeTest.SKIP:
-		t.targets.extend(abiv1libtargets)
-		t.run("windows")
-	if t.result == AntiTargetSmokeTest.FAIL:
-		result = AntiTargetSmokeTest.FAIL
+	t.run()
+	
+	t.id = "0009b"
+	t.name = "dll_armv5_rvct_abiv1"
+	t.command += " --configpath=test/config/abiv1kit"
+	t.targets.extend(abiv1libtargets)
+	t.run("windows")
 		
-	t.id = "0009b"
+	t.id = "0009c"
 	t.name = "dll_armv5_clean"
 	t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c armv5 clean"
 	t.targets = []
 	t.mustmatch = []
 	t.mustnotmatch = []
 	t.run()	
-	if t.result == AntiTargetSmokeTest.FAIL:
-		result = AntiTargetSmokeTest.FAIL		
 		
-	t.id = "0009c"
+	t.id = "0009d"
 	t.name = "dll_armv5_gcce"
 	t.command = command % "gcce_armv5"
 	t.targets = maintargets
@@ -82,11 +80,8 @@
 	t.mustmatch = mustmatch
 	t.mustnotmatch = mustnotmatch
 	t.run()	
-	if t.result == AntiTargetSmokeTest.FAIL:
-		result = AntiTargetSmokeTest.FAIL
 	
 	t.id = "9"
 	t.name = "dll_armv5"
-	t.result = result
 	t.print_result()
 	return t
--- a/sbsv2/raptor/test/smoke_suite/exe_armv5_winscw_single_file.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/exe_armv5_winscw_single_file.py	Fri Jun 04 13:09:28 2010 +0100
@@ -27,8 +27,8 @@
 	t.command = "sbs -b smoke_suite/test_resources/simple_gui/Bld.inf -c armv5 -c winscw"
 	t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', [
 		"helloworld_exe/helloworld.mbm_bmconvcommands",
-		"helloworld_exe/helloworld__resource_apps_sc.rpp",
-		"helloworld_exe/helloworld__resource_apps_sc.rpp.d",
+		"helloworld_exe/helloworld_HelloWorld_sc.rpp",
+		"helloworld_exe/helloworld_HelloWorld_sc.rpp.d",
 		"helloworld_exe/armv5/udeb/HelloWorld_Application.o",
 		"helloworld_exe/armv5/udeb/HelloWorld_Application.o.d",
 		"helloworld_exe/armv5/udeb/HelloWorld_AppUi.o",
@@ -91,8 +91,8 @@
 		"helloworld_exe/winscw/urel/helloworld_UID_.o",
 		"helloworld_exe/winscw/urel/helloworld_UID_.o.d",
 		"helloworld_exe/winscw/urel/helloworld_urel_objects.lrf",
-		"helloworld_reg_exe/helloworld_reg__private_10003a3f_apps_sc.rpp",
-		"helloworld_reg_exe/helloworld_reg__private_10003a3f_apps_sc.rpp.d"
+		"helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp",
+		"helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp.d"
 	])
 
 	t.run()
--- a/sbsv2/raptor/test/smoke_suite/featurevariants.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/featurevariants.py	Fri Jun 04 13:09:28 2010 +0100
@@ -167,9 +167,8 @@
 		"createstaticdll_invariant_dll/armv5/urel/createstaticdll_invariant_urel_objects.via",
 		"createstaticdll_invariant_dll/armv5/urel/createstaticdll_invariant{000a0000}.def",
 		"createstaticdll_invariant_dll/armv5/urel/createstaticdll_invariant{000a0000}.dso",
-		
-		"dummy_inv_dll/dummy_inv__resource_apps_sc.rpp",
-		"dummy_inv_dll/dummy_inv__resource_apps_sc.rpp.d"
+		"dummy_inv_dll/dummy_inv_dummy_sc.rpp",
+		"dummy_inv_dll/dummy_inv_dummy_sc.rpp.d"
 		]
 
 	variantBuildTargetsDefaultTree = [
@@ -293,12 +292,12 @@
 		]
 	
 	variantBuildTargetsGeneric = [
-		"dummy_var1_dll/dummy_var1__resource_apps_sc.rpp",
-		"dummy_var1_dll/dummy_var1__resource_apps_sc.rpp.d",
-		"dummy_var2_dll/dummy_var2__resource_apps_sc.rpp",
-		"dummy_var2_dll/dummy_var2__resource_apps_sc.rpp.d",
-		"dummy_var3_exe/dummy_var3__resource_apps_sc.rpp",
-		"dummy_var3_exe/dummy_var3__resource_apps_sc.rpp.d"
+		"dummy_var1_dll/dummy_var1_dummy_sc.rpp",
+		"dummy_var1_dll/dummy_var1_dummy_sc.rpp.d",
+		"dummy_var2_dll/dummy_var2_dummy_sc.rpp",
+		"dummy_var2_dll/dummy_var2_dummy_sc.rpp.d",
+		"dummy_var3_exe/dummy_var3_dummy_sc.rpp",
+		"dummy_var3_exe/dummy_var3_dummy_sc.rpp.d"
 		]
 	
 	sbscommand = "sbs -b smoke_suite/test_resources/bv/bld.inf -c armv5 " + \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/filter_params.py	Fri Jun 04 13:09:28 2010 +0100
@@ -0,0 +1,140 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# 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.description = "Test the passing of parameters to log filters"
+	
+	command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c armv5_urel --filters="
+	
+	# no parameters means count all tags	
+	t.name = "filter_params_all_tags"
+	t.command = command + "FilterTagCounter"
+	t.mustmatch_singleline = [
+		"^info \d+ \d+",
+		"^whatlog \d+ \d+",
+		"^clean \d+ \d+"	
+		]
+	t.run()
+	
+	# empty parameter lists are valid
+	t.name = "filter_params_all_tags2"
+	t.command = command + "FilterTagCounter[]"
+	t.run()
+	
+	# parameters mean report only those tags	
+	t.name = "filter_params_info"
+	t.command = command + "FilterTagCounter[info]"
+	t.mustmatch_singleline = [
+		"^info \d+ \d+"
+		]
+	t.mustnotmatch_singleline = [
+		"^whatlog \d+ \d+",
+		"^clean \d+ \d+"	
+		]
+	t.run()
+	
+	# multiple parameters are valid	
+	t.name = "filter_params_info_clean"
+	t.command = command + "FilterTagCounter[info,clean]"
+	t.mustmatch_singleline = [
+		"^info \d+ \d+",
+		"^clean \d+ \d+"
+		]
+	t.mustnotmatch_singleline = [
+		"^whatlog \d+ \d+"
+		]
+	t.run()
+	
+	# using the same filter with different parameters is valid
+	t.name = "filter_params_info_clean2"
+	t.command = command + "FilterTagCounter[info],FilterTagCounter[clean]"
+	t.run()
+	
+	# using the same filter with the same parameters is valid too
+	t.name = "filter_params_info_clean3"
+	t.command = command + "FilterTagCounter[info,clean],FilterTagCounter[info,clean]"
+	t.run()
+	
+	
+	# parameters must work with the sbs_filter script as well
+	
+	command = "sbs_filter --filters=%s < smoke_suite/test_resources/logexamples/filter_component.log"
+	t.logfileOption = lambda :""
+	t.makefileOption = lambda :""
+
+	# should still work with no parameters
+	t.name = "sbs_filter_no_params"
+	t.command = command % "FilterComp"
+	t.mustmatch_singleline = [
+		]
+	t.mustnotmatch_singleline = [
+		"[<>]" # no elements should be printed at all as no bld.inf is selected
+		]
+	t.run()
+	
+	# should work with an empty parameter list
+	t.name = "sbs_filter_no_params2"
+	t.command = command % "FilterComp[]"
+	t.run()
+	
+	# with a parameter
+	t.name = "sbs_filter_one_param"
+	t.command = command % "FilterComp[email]"
+	t.stdout = [
+		"<error bldinf='y:/src/email/bld.inf'>email error #1</error>",
+		"<error bldinf='y:/src/email/bld.inf'>email error #2</error>",
+		"<warning bldinf='y:/src/email/bld.inf'>email warning #1</warning>",
+		"<warning bldinf='y:/src/email/bld.inf'>email warning #2</warning>",
+		"<whatlog bldinf='y:/src/email/bld.inf' config='armv5_urel' mmp='y:/src/email/a.mmp'>",
+		"<build>/epoc32/data/email_1</build>",
+		"<build>/epoc32/data/email_2</build>",
+		"</whatlog>",
+		"<recipe bldinf='y:/src/email/bld.inf' name='dummy'>",
+		"+ make_email",
+		"email was made fine",
+		"<status exit='ok'></status>",
+		"</recipe>",
+		"<fake bldinf='y:src/email/bld.inf'>",
+		"  <foo>",
+		"   <bar>",
+		"     <fb>fb email</fb>",
+		"   </bar>",
+		" </foo>",
+		"</fake>"
+		]
+	t.mustmatch_singleline = []
+	t.mustnotmatch_singleline = []
+	t.warnings = 2
+	t.errors = 2
+	t.run()
+	
+	# with multiple filters
+	t.name = "sbs_filter_multi"
+	t.command = command % "FilterComp[txt],FilterTagCounter[file,recipe]"
+	t.stdout = []
+	t.mustmatch_singleline = [ "txt", "^file \d+", "^recipe \d+" ]
+	t.mustnotmatch_singleline = [ "email" ]
+	t.warnings = 2
+	t.errors = 0
+	t.run()
+	
+	t.name = "filter_params"
+	t.print_result()
+	return t
--- a/sbsv2/raptor/test/smoke_suite/gccxml.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/gccxml.py	Fri Jun 04 13:09:28 2010 +0100
@@ -32,9 +32,9 @@
 		]
 	t.addbuildtargets('smoke_suite/test_resources/simple_gui/bld.inf', [
 		"helloworld_exe/gccxml/HelloWorld.mmp.xml",
-		"helloworld_exe/helloworld__resource_apps_sc.rpp.d",
+		"helloworld_exe/helloworld_HelloWorld_sc.rpp.d",
 		"helloworld_exe/gccxml/HelloWorld.rss.rfi",
-		"helloworld_reg_exe/helloworld_reg__private_10003a3f_apps_sc.rpp.d",
+		"helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp.d",
 		"helloworld_exe/gccxml/HelloWorld_reg.rss.rfi",
 		"helloworld_exe/gccxml/urel/HelloWorld_Application.xml.d",
 		"helloworld_exe/gccxml/urel/HelloWorld_Application.xml",
@@ -66,9 +66,9 @@
 	t.antitargets = ["$(EPOCROOT)/epoc32/release/gccxml/urel/helloworldexe.gxp"]
 	t.addbuildantitargets('smoke_suite/test_resources/simple_gui/bld.inf', [
 		"helloworld_exe/gccxml/HelloWorld.mmp.xml",
-		"helloworld_exe/helloworld__resource_apps_sc.rpp.d",
+		"helloworld_exe/helloworld_HelloWorld_sc.rpp.d",
 		"helloworld_exe/gccxml/HelloWorld.rss.rfi",
-		"helloworld_reg_exe/helloworld_reg__private_10003a3f_apps_sc.rpp.d",
+		"helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp.d",
 		"helloworld_exe/gccxml/HelloWorld_reg.rss.rfi",
 		"helloworld_exe/gccxml/urel/HelloWorld_Application.xml.d",
 		"helloworld_exe/gccxml/urel/HelloWorld_Application.xml",
--- a/sbsv2/raptor/test/smoke_suite/gnumakefile_what.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/gnumakefile_what.py	Fri Jun 04 13:09:28 2010 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -23,7 +23,8 @@
 	t.name = "gnumakefile_what"
 	t.command = "sbs -b smoke_suite/test_resources/gnumakefile/bld.inf --what"
 	componentpath = re.sub(r'\\','/',os.path.abspath("smoke_suite/test_resources/gnumakefile"))
-
+	
+	t.output_expected_only_once = True
 	t.stdout = [
 	# Generated txt files by the gnumakefile
 		componentpath+"/master_bld_ARMV5_UDEB.txt",
--- a/sbsv2/raptor/test/smoke_suite/gui_whatlog.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/gui_whatlog.py	Fri Jun 04 13:09:28 2010 +0100
@@ -30,13 +30,10 @@
 	t.usebash = True
 	t.targets = [
 		"$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.mbm",
-		"$(EPOCROOT)/epoc32/localisation/group/helloworld.info",
 		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.mbm",
 		"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.mbm",
 		"$(EPOCROOT)/epoc32/include/helloworld.rsg",
 		"$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.rsc",
-		"$(EPOCROOT)/epoc32/localisation/helloworld/rsc/helloworld.rpp",
-		"$(EPOCROOT)/epoc32/localisation/group/helloworld_reg.info",
 		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.rsc",
 		"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.rsc",
 		"$(EPOCROOT)/epoc32/release/armv5/udeb/helloworld.exe",
@@ -49,8 +46,8 @@
 		]
 	t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', [
 		"helloworld_exe/helloworld.mbm_bmconvcommands",
-		"helloworld_exe/helloworld__resource_apps_sc.rpp",
-		"helloworld_exe/helloworld__resource_apps_sc.rpp.d",
+		"helloworld_exe/helloworld_HelloWorld_sc.rpp",
+		"helloworld_exe/helloworld_HelloWorld_sc.rpp.d",
 		"helloworld_exe/armv5/udeb/HelloWorld_Application.o",
 		"helloworld_exe/armv5/udeb/HelloWorld_Application.o.d",
 		"helloworld_exe/armv5/udeb/HelloWorld_AppUi.o",
@@ -111,18 +108,14 @@
 		"helloworld_exe/winscw/urel/helloworld_UID_.dep",
 		"helloworld_exe/winscw/urel/helloworld_UID_.o",
 		"helloworld_exe/winscw/urel/helloworld_UID_.o.d",
-		"helloworld_reg_exe/helloworld_reg__private_10003a3f_apps_sc.rpp.d"
+		"helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp.d"
 	])
 	t.stdout = [
 		"<whatlog bldinf='"+componentpath+"/Bld.inf' mmp='"+componentpath+"/HelloWorld.mmp' config='armv5_udeb.whatlog'>",
 		"<bitmap>$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.mbm</bitmap>",
 		"<resource>$(EPOCROOT)/epoc32/include/helloworld.rsg</resource>",
 		"<resource>$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.rsc</resource>",
-		"<resource>$(EPOCROOT)/epoc32/localisation/helloworld/rsc/helloworld.rpp</resource>",
-		"<resource>$(EPOCROOT)/epoc32/localisation/group/helloworld.info</resource>",
 		"<resource>$(EPOCROOT)/epoc32/data/z/private/10003a3f/apps/helloworld_reg.rsc</resource>",
-		"<resource>$(EPOCROOT)/epoc32/localisation/helloworld_reg/rsc/helloworld_reg.rpp</resource>",
-		"<resource>$(EPOCROOT)/epoc32/localisation/group/helloworld_reg.info</resource>",
 		"<build>$(EPOCROOT)/epoc32/release/armv5/udeb/helloworld.exe</build>",
 		"<build>$(EPOCROOT)/epoc32/release/armv5/udeb/helloworld.exe.map</build>",
 		"<whatlog bldinf='"+componentpath+"/Bld.inf' mmp='"+componentpath+"/HelloWorld.mmp' config='winscw_urel.whatlog'>",
@@ -133,13 +126,9 @@
 		"<resource>$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.rsc</resource>",
 		"<resource>$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.rsc</resource>",
 		"<resource>$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.rsc</resource>",
-		"<resource>$(EPOCROOT)/epoc32/localisation/helloworld/rsc/helloworld.rpp</resource>",
-		"<resource>$(EPOCROOT)/epoc32/localisation/group/helloworld.info</resource>",
 		"<resource>$(EPOCROOT)/epoc32/data/z/private/10003a3f/apps/helloworld_reg.rsc</resource>",
 		"<resource>$(EPOCROOT)/epoc32/release/winscw/udeb/z/private/10003a3f/apps/helloworld_reg.rsc</resource>",
 		"<resource>$(EPOCROOT)/epoc32/release/winscw/urel/z/private/10003a3f/apps/helloworld_reg.rsc</resource>",
-		"<resource>$(EPOCROOT)/epoc32/localisation/helloworld_reg/rsc/helloworld_reg.rpp</resource>",
-		"<resource>$(EPOCROOT)/epoc32/localisation/group/helloworld_reg.info</resource>",
 		"<build>$(EPOCROOT)/epoc32/release/winscw/urel/helloworld.exe</build>",
 		"<build>$(EPOCROOT)/epoc32/release/winscw/urel/helloworld.exe.map</build>",
 		"<whatlog bldinf='"+componentpath+"/Bld.inf' mmp='"+componentpath+"/HelloWorld.mmp' config='armv5_urel.whatlog'>",
--- a/sbsv2/raptor/test/smoke_suite/implib_armv5.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/implib_armv5.py	Fri Jun 04 13:09:28 2010 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -22,7 +22,6 @@
 	t.name = "implib_armv5"
 	t.command = "sbs -b smoke_suite/test_resources/simple_implib/bld.inf" \
 		+ " -c armv5 LIBRARY"
-	# ABIv1 .lib files are not generated on Linux
 	t.targets = [
 		"$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.dso",
 		"$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.dso"
@@ -31,13 +30,7 @@
 		['simple_implib_lib/armv5/udeb/simple_implib.prep',
                  'simple_implib_lib/armv5/urel/simple_implib.prep']
 	])
-	t.run("linux")
-	# Run test on Windows if that is the current OS
-	if t.result == SmokeTest.SKIP:
-		t.targets.extend([
-			"$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.lib",
-			"$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.lib"
-		])
-		t.run("windows")
-		
+	t.run()
+	
+	t.print_result()	
 	return t
--- a/sbsv2/raptor/test/smoke_suite/implib_armv5_smp.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/implib_armv5_smp.py	Fri Jun 04 13:09:28 2010 +0100
@@ -27,12 +27,7 @@
 		"$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.dso",
 		"$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.dso"
 		]
-	t.run("linux")
-	if t.result == AntiTargetSmokeTest.SKIP:
-		t.antitargets = [
-			'$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.lib',
-			'$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.lib'
-		]
-		t.run("windows")
-		
+	t.run()
+	
+	t.print_result()
 	return t
--- a/sbsv2/raptor/test/smoke_suite/implib_armv5_what.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/implib_armv5_what.py	Fri Jun 04 13:09:28 2010 +0100
@@ -22,18 +22,11 @@
 	t.name = "implib_armv5_what"
 	t.command = "sbs -b smoke_suite/test_resources/simple_implib/bld.inf -c " + \
 			"armv5 --what LIBRARY"
-	# ABIv1 .lib files are not generated on Linux
 	t.stdout = [
 		'$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.dso',
 		'$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.dso'
 	]
-	t.run("linux")
-	# Run test on Windows if that is the current OS
-	if t.result == CheckWhatSmokeTest.SKIP:
-		t.stdout.extend([
-			'$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.lib',
-			'$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.lib'
-		])
-		t.run("windows")
+	t.run()
 	
+	t.print_result()
 	return t
--- a/sbsv2/raptor/test/smoke_suite/implib_armv5_with_armv5_smp.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/implib_armv5_with_armv5_smp.py	Fri Jun 04 13:09:28 2010 +0100
@@ -27,12 +27,7 @@
 		"$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.dso",
 		"$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.dso"
 		]
-	t.run("linux")
-	if t.result == SmokeTest.SKIP:
-		t.targets.extend([
-			"$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.lib",
-			"$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.lib"
-		])
-		t.run("windows")
-		
+	t.run()
+	
+	t.print_result()	
 	return t
--- a/sbsv2/raptor/test/smoke_suite/implib_nodef.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/implib_nodef.py	Fri Jun 04 13:09:28 2010 +0100
@@ -28,13 +28,7 @@
 		"$(EPOCROOT)/epoc32/release/armv5/lib/implib_implicit_def{000a0000}.dso",
 		"$(EPOCROOT)/epoc32/release/winscw/udeb/implib_implicit_def.lib"
 		]
-	t.run("linux")
-	if t.result == SmokeTest.SKIP:
-		t.targets.extend([
-			"$(EPOCROOT)/epoc32/release/armv5/lib/implib_implicit_def.lib",
-			"$(EPOCROOT)/epoc32/release/armv5/lib/implib_implicit_def{000a0000}.lib"
-			])
-		t.run("windows")
+	t.run()
 
 	t.id = "71b"
 	t.name = "implib_no_def"
--- a/sbsv2/raptor/test/smoke_suite/implib_whatlog.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/implib_whatlog.py	Fri Jun 04 13:09:28 2010 +0100
@@ -45,16 +45,7 @@
 		"<build>$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.dso</build>",
 		"<build>$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.dso</build>"
 	]
-	t.run("linux")
-	if t.result == CheckWhatSmokeTest.SKIP:
-		t.targets.extend([
-			"$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.lib",
-			"$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.lib"
-		])
-		t.stdout.extend([
-			"<build>$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.lib</build>",
-			"<build>$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.lib</build>"
-		])
-		t.run("windows")
-		
+	t.run()
+	
+	t.print_result()
 	return t
--- a/sbsv2/raptor/test/smoke_suite/lib_versioned.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/lib_versioned.py	Fri Jun 04 13:09:28 2010 +0100
@@ -49,22 +49,7 @@
 		"$(EPOCROOT)/epoc32/release/winscw/udeb/versionedlib.02.lib",
 		"$(EPOCROOT)/epoc32/release/winscw/udeb/versionedlib01.lib"
 		]
-
-	if sys.platform.lower().startswith("win"):
-		t.targets.extend (	
-		[
-		"$(EPOCROOT)/epoc32/release/armv5/lib/testver.lib",
-		"$(EPOCROOT)/epoc32/release/armv5/lib/versionedlib01.lib",
-		"$(EPOCROOT)/epoc32/release/armv5/lib/versioned.lib.03.lib",
-		"$(EPOCROOT)/epoc32/release/armv5/lib/versionedlib.02.lib",
-		"$(EPOCROOT)/epoc32/release/armv5/lib/testver{00020000}.lib",
-		"$(EPOCROOT)/epoc32/release/armv5/lib/testver{00030000}.lib",
-		"$(EPOCROOT)/epoc32/release/armv5/lib/versioned.lib{000a0000}.03.lib",
-		"$(EPOCROOT)/epoc32/release/armv5/lib/version.ed.lib.04.lib",
-		"$(EPOCROOT)/epoc32/release/armv5/lib/version.ed.lib{000a0000}.04.lib",
-		"$(EPOCROOT)/epoc32/release/armv5/lib/versionedlib01{000a0000}.lib",
-		"$(EPOCROOT)/epoc32/release/armv5/lib/versionedlib{000a0000}.02.lib"
-		] )
-		
 	t.run()
+	
+	t.print_result()
 	return t
--- a/sbsv2/raptor/test/smoke_suite/output_control.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/output_control.py	Fri Jun 04 13:09:28 2010 +0100
@@ -32,7 +32,7 @@
 	
 	t = SmokeTest()
 	t.id = "82"
-	t.name = "output_control_sbs_build_dir"
+	t.name = "output_control"
 	t.description = "Test building intermediate files into a location other than $EPOCROOT/epoc32/build. Use SBS_BUILD_DIR. environment variable."
 	t.sbs_build_dir = environ['EPOCROOT'].replace("\\","/").rstrip("/") + '/anotherbuilddir'
 	t.environ['SBS_BUILD_DIR'] = t.sbs_build_dir
--- a/sbsv2/raptor/test/smoke_suite/pdll_arm.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/pdll_arm.py	Fri Jun 04 13:09:28 2010 +0100
@@ -31,10 +31,6 @@
 		"$(EPOCROOT)/epoc32/release/%s/lib/createstaticpdll.dso",
 		"$(EPOCROOT)/epoc32/release/%s/lib/createstaticpdll{000a0000}.dso"
 		]
-	abiv1libtargets = [
-		"$(EPOCROOT)/epoc32/release/%s/lib/createstaticpdll.lib",
-		"$(EPOCROOT)/epoc32/release/%s/lib/createstaticpdll{000a0000}.lib"
-		]
 	buildtargets =  [
 		"createstaticpdll_dll/%s/udeb/CreateStaticDLL.o",
 		"createstaticpdll_dll/%s/urel/CreateStaticDLL.o"
@@ -47,9 +43,6 @@
 		".*ksrt.*"
 		]
 	
-	# Note that ABIv1 import libraries are only generated for RVCT-based armv5
-	# builds on Windows
-	
 	t.id = "0109a"
 	t.name = "pdll_armv5_rvct"
 	t.command = command % "armv5"
@@ -57,10 +50,7 @@
 	t.addbuildtargets('smoke_suite/test_resources/simple_dll/pbld.inf', map(lambda p: p % "armv5", buildtargets))
 	t.mustmatch = mustmatch
 	t.mustnotmatch = mustnotmatch
-	t.run("linux")
-	if t.result == AntiTargetSmokeTest.SKIP:
-		t.targets.extend(map(lambda x: x % "armv5", abiv1libtargets))
-		t.run("windows")
+	t.run()
 		
 	t.id = "0109b"
 	t.name = "pdll_armv5_clean"
@@ -74,7 +64,6 @@
 	t.name = "pdll_armv5_gcce"
 	t.command = command % "gcce_armv5"
 	t.targets = map(lambda p: p % "armv5", maintargets + armv5targets)
-	t.antitargets = map(lambda p: p % "armv5", abiv1libtargets)
 	t.addbuildtargets('smoke_suite/test_resources/simple_dll/pbld.inf', map(lambda p: p % "armv5", buildtargets))
 	t.mustmatch = mustmatch
 	t.mustnotmatch = mustnotmatch
@@ -109,7 +98,6 @@
 	t.name = "pdll_armv7_gcce"
 	t.command = command % "arm.v7.udeb.gcce4_3_2 -c arm.v7.urel.gcce4_3_2"
 	t.targets = map(lambda p: p % "armv7", maintargets)
-	t.antitargets = map(lambda p: p % "armv7", abiv1libtargets)
 	t.addbuildtargets('smoke_suite/test_resources/simple_dll/pbld.inf', map(lambda p: p % "armv7", buildtargets))
 	t.mustmatch = mustmatch
 	t.mustnotmatch = mustnotmatch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/query_cli.py	Fri Jun 04 13:09:28 2010 +0100
@@ -0,0 +1,110 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# 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: 
+#
+
+import raptor_tests
+
+def run():
+	
+	t = raptor_tests.SmokeTest()
+	t.description = "Test the --query command-line option"
+
+	t.name = "query_cli_alias"
+	t.command = "sbs --query=aliases"
+	t.mustmatch_singleline = [
+		"<sbs version='2\.\d+\.\d+'>",
+		"<alias.*name='armv5_urel'.*/>",
+		"<alias.*name='armv5_udeb'.*/>",
+		"<alias.*name='winscw_urel'.*/>",
+		"<alias.*name='winscw_udeb'.*/>",
+		"<alias.*name='tools2_rel'.*/>",
+		"<alias.*name='tools2_deb'.*/>",
+		"</sbs>"
+		]
+	t.mustnotmatch_singleline = [
+		"<alias.*name='make'.*/>",
+		"<alias.*name='emake'.*/>"
+		]
+	t.run()
+	
+	t.name = "query_cli_product"
+	t.command = "sbs --query=products --configpath=test/smoke_suite/test_resources/bv"
+	t.mustmatch_singleline = [
+		"<sbs version='2\.\d+\.\d+'>",
+		"<product.*name='test_bv_1'.*/>",
+		"<product.*name='test_bv_2'.*/>",
+		"<product.*name='test_bv_3'.*/>",
+		"</sbs>"
+		]
+	t.mustnotmatch_singleline = [
+		"<product.*name='arm'.*/>",
+		"<product.*name='root'.*/>"
+		]
+	t.run()
+	
+	t.name = "query_cli_config"
+	t.command = "sbs --query=config[armv5_urel]"
+	t.mustmatch_singleline = [
+		"<sbs version='2\.\d+\.\d+'>",
+		"fullname='arm\.v5\.urel\.rvct.*'",
+		"outputpath='.*/epoc32/release/armv5/urel'",
+		"</sbs>"
+		]
+	t.mustnotmatch_singleline = []
+	t.run()
+	
+	t.name = "query_cli_config_bv"
+	t.command = "sbs --query=config[armv5_urel.test_bv_1] --configpath=test/smoke_suite/test_resources/bv"
+	t.mustmatch_singleline = [
+		"<sbs version='2\.\d+\.\d+'>",
+		"fullname='arm\.v5\.urel\.rvct._.\.test_bv_1'",
+		"outputpath='.*/epoc32/release/armv5\.one/urel'",
+		"</sbs>"
+		]
+	t.mustnotmatch_singleline = []
+	t.run()
+	
+	t.name = "query_cli_config_others"
+	t.command = "sbs --query=config[winscw_urel] --query=config[tools2_rel]"
+	
+	if t.onWindows:
+		t2 = "tools2"
+	else:
+		t2 = raptor_tests.ReplaceEnvs("tools2/$(HOSTPLATFORM_DIR)")
+		
+	t.mustmatch_singleline = [
+		"<sbs version='2\.\d+\.\d+'>",
+		"outputpath='.*/epoc32/release/winscw/urel'",
+		"outputpath='.*/epoc32/release/%s/rel'" % t2,
+		"</sbs>"
+		]
+	t.mustnotmatch_singleline = []
+	t.run()
+	
+	t.name = "query_cli_bad"
+	t.command = "sbs --query=nonsense"
+	t.mustmatch_singleline = [
+		"<sbs version='2\.\d+\.\d+'>",
+		"exception 'unknown query' with query 'nonsense'",
+		"</sbs>"
+		]
+	t.mustnotmatch_singleline = []
+	t.errors = 1
+	t.returncode = 1
+	t.run()
+	
+	t.name = "query_cli"
+	t.print_result()
+	return t
--- a/sbsv2/raptor/test/smoke_suite/resource.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/resource.py	Fri Jun 04 13:09:28 2010 +0100
@@ -15,55 +15,91 @@
 #
 
 from raptor_tests import SmokeTest
+from raptor_tests import ReplaceEnvs
+from raptor_meta import BldInfFile
 
 def run():
 	t = SmokeTest()
 	t.id = "30"
 	t.name =  "resource"
-	t.command = "sbs -b smoke_suite/test_resources/resource/group/bld.inf -b smoke_suite/test_resources/simple_gui/Bld.inf RESOURCE"
+	t.command = "sbs  -b smoke_suite/test_resources/simple_gui/Bld.inf RESOURCE"
 	t.targets = [
-		"$(EPOCROOT)/epoc32/include/testresource.rsg",
-		"$(EPOCROOT)/epoc32/include/testresource.hrh",
-		"$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.r01",
-		"$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.rsc",
-		"$(EPOCROOT)/epoc32/localisation/group/testresource.info",
-		"$(EPOCROOT)/epoc32/localisation/testresource/rsc/testresource.rpp",
-		
 		"$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.mbm",
-		"$(EPOCROOT)/epoc32/localisation/group/helloworld.info",
 		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.mbm",
 		"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.mbm",
 		"$(EPOCROOT)/epoc32/include/helloworld.rsg",
 		"$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.rsc",
-		"$(EPOCROOT)/epoc32/localisation/helloworld/rsc/helloworld.rpp",
 		"$(EPOCROOT)/epoc32/data/z/private/10003a3f/apps/helloworld_reg.rsc",
-		"$(EPOCROOT)/epoc32/localisation/helloworld_reg/rsc/helloworld_reg.rpp",
-		"$(EPOCROOT)/epoc32/localisation/group/helloworld_reg.info",
 		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.rsc",
 		"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.rsc",
 		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/private/10003a3f/apps/helloworld_reg.rsc",
 		"$(EPOCROOT)/epoc32/release/winscw/urel/z/private/10003a3f/apps/helloworld_reg.rsc"	
 		]
 	
-	t.addbuildtargets('smoke_suite/test_resources/resource/group/bld.inf', [	
-		"testresource_/testresource_resource_testresource2_sc.rpp.d",
-		"testresource_/testresource_resource_testresource3_02.rpp",
-		"testresource_/testresource_resource_testresource3_02.rpp.d",
-		"testresource_/testresource_resource_testresource3_sc.rpp",
-		"testresource_/testresource_resource_testresource3_sc.rpp.d",
-		"testresource_/testresource_resource_testresource_01.rpp",
-		"testresource_/testresource_resource_testresource_01.rpp.d",
-		"testresource_/testresource_resource_testresource_sc.rpp",
-		"testresource_/testresource_resource_testresource_sc.rpp.d"])
 
 	t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', [
 		"helloworld_exe/helloworld.mbm_bmconvcommands",
-		"helloworld_exe/helloworld__resource_apps_sc.rpp",
-		"helloworld_exe/helloworld__resource_apps_sc.rpp.d",
-		"helloworld_reg_exe/helloworld_reg__private_10003a3f_apps_sc.rpp",
-		"helloworld_reg_exe/helloworld_reg__private_10003a3f_apps_sc.rpp.d"])
+		"helloworld_exe/helloworld_HelloWorld_sc.rpp",
+		"helloworld_exe/helloworld_HelloWorld_sc.rpp.d",
+		"helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp",
+		"helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp.d"])
 
 	t.mustnotmatch = ["HelloWorld.rss.* warning: trigraph"]
 	
 	t.run()
+
+	t.id="30a"
+	t.name =  "no_depend_gen_resource"
+	t.usebash = True
+	t.description =  """Check that dependent resources still build correctly even when we turn dependency generation off.  This
+			    test cannot really do this reliably, if you think about it, since it can't force make to try building resources
+			    in the 'wrong' order.  What it does attempt is to check that 
+			    the ultimately generated dependency file is ok.
+			    N.B.  It also attempts to ensure that the dependency file is 'minimal'  i.e. that it only references .mbg and .rsg files
+			    that might come from other parts of the same build.  This is important for performance in situations where --no-depend-generate
+			    is used because the weight of 'complete' dependency information would overwhelm make.
+			 """
+	buildLocation = ReplaceEnvs("$(EPOCROOT)/epoc32/build/") + BldInfFile.outputPathFragment('smoke_suite/test_resources/resource/group/bld.inf')
+	res_depfile= buildLocation+"/dependentresource_/dependentresource_dependentresource_sc.rpp.d"
+
+
+	t.targets = [
+		"$(EPOCROOT)/epoc32/data/z/resource/anotherresource/testresource.r01",
+		"$(EPOCROOT)/epoc32/data/z/resource/anotherresource/testresource.rsc",
+		"$(EPOCROOT)/epoc32/data/z/resource/dependentresource/dependentresource.rsc",
+		"$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.r01",
+		"$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.rsc",
+		"$(EPOCROOT)/epoc32/include/testresource.hrh",
+		"$(EPOCROOT)/epoc32/include/testresource.rsg",
+		"$(EPOCROOT)/epoc32/release/armv5/urel/testresource.exe",
+		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/anotherresource/testresource.r01",
+		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/anotherresource/testresource.rsc",
+		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/dependentresource/dependentresource.rsc",
+		"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/anotherresource/testresource.r01",
+		"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/anotherresource/testresource.rsc",
+		"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/dependentresource/dependentresource.rsc",
+		res_depfile
+		]
+
+	t.addbuildtargets('smoke_suite/test_resources/resource/group/bld.inf', [
+		"dependentresource_/dependentresource_dependentresource.rsc",
+		"testresource_/testresource_dependentresource.r01",
+		"testresource_/testresource_dependentresource.rsc",
+		"testresource_/testresource_testresource_01.rpp",
+		"testresource_/testresource_testresource_01.rpp.d",
+		"testresource_/testresource_testresource_02.rpp",
+		"testresource_/testresource_testresource_sc.rpp"])
+
+	t.command = "sbs -b smoke_suite/test_resources/resource/group/bld.inf  -c armv5_urel -c winscw_urel reallyclean ; sbs --no-depend-generate -j 16 -b smoke_suite/test_resources/resource/group/bld.inf -c armv5_urel -c  winscw_urel -f ${SBSLOGFILE} -m ${SBSMAKEFILE} && grep 'epoc32.include.testresource.rsg' %s && { X=`md5sum $(EPOCROOT)/epoc32/release/winscw/urel/z/resource/anotherresource/testresource.rsc` && Y=`md5sum $(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.rsc` && [ \"${X%% *}\" != \"${Y%% *}\" ] ; }  && wc -l %s " % (res_depfile, res_depfile)
+
+	t.mustnotmatch = []
+
+	t.mustmatch = [
+			"[23] .*.dependentresource_.dependentresource_dependentresource_sc.rpp.d"
+		      ]
+
+	t.run()
+
+	t.name = 'resource'
+	t.print_result()
 	return t
--- a/sbsv2/raptor/test/smoke_suite/sysdef_layers.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/sysdef_layers.py	Fri Jun 04 13:09:28 2010 +0100
@@ -46,13 +46,9 @@
 		"$(EPOCROOT)/epoc32/release/winscw/urel/helloworld.exe.map",
 		"$(EPOCROOT)/epoc32/release/winscw/urel/z/private/10003a3f/apps/helloworld_reg.rsc",
 		"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.rsc",
-		"$(EPOCROOT)/epoc32/localisation/group/helloworld.info",
-		"$(EPOCROOT)/epoc32/localisation/helloworld/rsc/helloworld.rpp",
-		"$(EPOCROOT)/epoc32/localisation/group/helloworld_reg.info",
-		"$(EPOCROOT)/epoc32/localisation/helloworld_reg/rsc/helloworld_reg.rpp"
 		]
 	t.addbuildtargets('smoke_suite/test_resources/sysdef/build_gen_source/bld.inf', [
-		"helloworld_/helloworld__resource_apps_sc.rpp"
+		"helloworld_/helloworld_HelloWorld_sc.rpp"
 		])
 	t.addbuildtargets('smoke_suite/test_resources/sysdef/dependent/bld.inf', [
 		"helloworld_exe/armv5/udeb/HelloWorld_Application.o",
@@ -79,11 +75,11 @@
 		"helloworld_exe/winscw/urel/HelloWorld_Main.o",
 		"helloworld_exe/winscw/urel/helloworld.UID.CPP",
 		"helloworld_exe/winscw/urel/helloworld_UID_.o",
-		"helloworld_reg_exe/helloworld_reg__private_10003a3f_apps_sc.rpp"
+		"helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp"
 		])
 	t.countmatch = [
-		["<recipe .*layer='Component with Layer Dependencies' component='dependent'.*>", 37],
-		["<recipe .*layer='Build Generated Source' component='build generated source'.*>", 7]		
+		["<recipe .*layer='Component with Layer Dependencies' component='dependent'.*>", 34],
+		["<recipe .*layer='Build Generated Source' component='build generated source'.*>", 4]		
 		]
 	t.run()
 	return t
--- a/sbsv2/raptor/test/smoke_suite/temtest.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/temtest.py	Fri Jun 04 13:09:28 2010 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -98,6 +98,7 @@
 	t.id = "0018f"
 	t.name = "temwhat"
 	t.command = "sbs -b smoke_suite/test_resources/simple_extension/bld.inf --what"
+	t.output_expected_only_once = True	
 	t.stdout = [
 		# exports
 		'$(EPOCROOT)/epoc32/tools/makefile_templates/sbsv2test/clean.mk',
--- a/sbsv2/raptor/test/smoke_suite/test_resources/annofile2log/testanno2log.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/annofile2log/testanno2log.py	Fri Jun 04 13:09:28 2010 +0100
@@ -27,7 +27,10 @@
 retcode=0
 
 
-annofile = sys.argv[1]
+if len(sys.argv) > 1:
+	annofile = sys.argv[1]
+else:
+	annofile = sys.stdin
 
 sys.stdout.write("<build>\n")
 try:
--- a/sbsv2/raptor/test/smoke_suite/test_resources/apply_usecases/linker_options/test_apply_linkeroptions.mmp	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/apply_usecases/linker_options/test_apply_linkeroptions.mmp	Fri Jun 04 13:09:28 2010 +0100
@@ -3,7 +3,5 @@
 
 SOURCE          test_apply_linkeroptions.cpp
 
-#ifndef TOOLS2_LINUX
 // Link to mingw libs: libwsock32.a 
 APPLY		apply_tools2_linker_options
-#endif
--- a/sbsv2/raptor/test/smoke_suite/test_resources/bv/config/variants/bv_test.xml	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/bv/config/variants/bv_test.xml	Fri Jun 04 13:09:28 2010 +0100
@@ -5,7 +5,7 @@
 			xsi:schemaLocation="http://symbian.com/xml/build build/2_0.xsd">
 
 		<!-- test feature variants -->
-		<var name="test_bv_1">
+		<var name="test_bv_1" type="product">
 			<set name='FEATUREVARIANTNAME' value='.one' />
 			<set name='FEATURELISTFILES'
 					value='$(SBS_HOME)/test/smoke_suite/test_resources/bv/listA.txt
@@ -16,7 +16,7 @@
 					value='$(SBS_HOME)/test/smoke_suite/test_resources/bv/var1
 					$(SBS_HOME)/test/smoke_suite/test_resources/bv/hrh' />   
   		</var>
-		<var name="test_bv_2">
+		<var name="test_bv_2" type="product">
 			<set name='FEATUREVARIANTNAME' value='.two' />
 			<set name='FEATURELISTFILES'
 					value='$(SBS_HOME)/test/smoke_suite/test_resources/bv/listA.txt
@@ -27,7 +27,7 @@
 					value='$(SBS_HOME)/test/smoke_suite/test_resources/bv/var2
 					$(SBS_HOME)/test/smoke_suite/test_resources/bv/hrh' />
 		</var>
-		<var name="test_bv_3">
+		<var name="test_bv_3" type="product">
 			<set name='FEATUREVARIANTNAME' value='.three' />
 			<set name='FEATURELISTFILES'
 					value='$(SBS_HOME)/test/smoke_suite/test_resources/bv/listA.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/depcrunch/dep2.rpp.d	Fri Jun 04 13:09:28 2010 +0100
@@ -0,0 +1,11 @@
+EPOCROOT/epoc32/build/resource/c_98665870f0168225/dependentresource_/dependentresource_dependentresource_sc.rpp: testresource1.mbg \
+ /home/tnmurphy/x/build/sbsv2/raptor/test/smoke_suite/test_resources/resource/dependentresource.rss \
+ /home/tnmurphy/x/test-epocroot/epoc32/include/variant/Symbian_OS.hrh \
+ /home/tnmurphy/x/test-epocroot/epoc32/include/testresource_badef.rh \
+ /home/tnmurphy/x/test-epocroot/epoc32/include/e32capability.h testresource2.rsg \
+ /home/tnmurphy/x/build/sbsv2/raptor/test/smoke_suite/test_resources/resource/inc/../inc/testresource.rh \
+ testresource3.rsg /home/tnmurphy/x/build/sbsv2/raptor/test/smoke_suite/test_resources/resource/inc/../inc/testresource.hrh \
+ /home/tnmurphy/x/build/sbsv2/raptor/test/smoke_suite/test_resources/resource/testresource.rls \
+ testresource4.mbg testresource5.rsg \
+  testresource6.mbg testresource7.rsg
+  testresource8.mbg testresource9.rsg
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/logexamples/filter_component.log	Fri Jun 04 13:09:28 2010 +0100
@@ -0,0 +1,42 @@
+<buildlog>
+
+<error bldinf="y:/src/email/bld.inf">email error #1</error>
+<error bldinf="y:/src/email/bld.inf">email error #2</error>
+
+<warning bldinf="y:/src/txt/bld.inf">txt warning #1</warning>
+<warning bldinf="y:/src/txt/bld.inf">txt warning #2</warning>
+
+<warning bldinf="y:/src/email/bld.inf">email warning #1</warning>
+<warning bldinf="y:/src/email/bld.inf">email warning #2</warning>
+
+<whatlog bldinf='y:/src/email/bld.inf' mmp='y:/src/email/a.mmp' config='armv5_urel'>
+<build>/epoc32/data/email_1</build>
+<build>/epoc32/data/email_2</build>
+</whatlog>
+
+<clean bldinf='y:/src/txt/bld.inf' mmp='y:/src/txt/b.mmp' config='armv5_udeb'>
+<file>/epoc32/data/txt_1</file>
+<file>/epoc32/data/txt_2</file>
+</clean>
+
+<recipe name='dummy' bldinf='y:/src/txt/bld.inf'>
++ make_txt
+txt was made fine
+<status exit='ok'/>
+</recipe>
+
+<recipe name='dummy' bldinf='y:/src/email/bld.inf'>
++ make_email
+email was made fine
+<status exit='ok'/>
+</recipe>
+
+<fake bldinf='y:src/email/bld.inf'>
+  <foo>
+    <bar>
+      <fb>fb email</fb>
+    </bar>
+  </foo>
+</fake>
+
+</buildlog>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/resource/dependentresource.rss	Fri Jun 04 13:09:28 2010 +0100
@@ -0,0 +1,333 @@
+/*
+* Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* 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: 
+* LOGWRAP.RSS
+*
+*/
+
+
+#include <testresource_badef.rh>
+#include <e32capability.h>
+
+#include "../inc/testresource.rh"
+#include "../inc/testresource.hrh"
+#include "testresource.rls"
+
+#include "testresource.mbg"
+#include <testresource.rsg>
+
+// MACRO statements in .mmp files should be reflected in resource preprocessing
+#ifndef SHOULD_BE_DEFINED
+#error "mmp MACRO SHOULD_BE_DEFINED is not defined!"
+#endif
+
+// Initial configuration
+RESOURCE CONFIG r_log_initial_config
+	{
+	size = 1000; // Maximum number of events
+	recent = 20; // Maximum size of recent lists
+	age = 2592000; // 30 days
+	}
+
+  RESOURCE ARRAY r_log_initial_events
+   	{
+   	items = 
+   		{
+  		ETYPE { uid = KLogCallEventType; description = LOG_CALL_EVENT_TYPE; },
+  		ETYPE { uid = KLogDataEventType; description = LOG_DATA_EVENT_TYPE; },
+  		ETYPE { uid = KLogFaxEventType; description = LOG_FAX_EVENT_TYPE; },
+  		ETYPE { uid = KLogShortMessageEventType; description = LOG_SHORT_MESSAGE_EVENT_TYPE; },
+  		ETYPE { uid = KLogTaskSchedulerEventType; description = LOG_TASK_SCHEDULER_EVENT_TYPE; },
+  		ETYPE { uid = KLogPacketDataEventType; description = LOG_PACKET_DATA_EVENT_TYPE; },
+
+
+  		ETYPE { uid = KLogLbsSelfLocateEventType; description = LOG_LBS_SELF_LOCATE_EVENT_TYPE; },
+  		ETYPE { uid = KLogLbsExternalLocateEventType; description = LOG_LBS_EXTERNAL_LOCATE_EVENT_TYPE; },
+ 		ETYPE { uid = KLogLbsTransmitLocationEventType; description = LOG_LBS_TRANSMIT_LOCATION_EVENT_TYPE; },
+ 		ETYPE { uid = KLogLbsNetworkLocateEventType; description = LOG_LBS_NETWORK_LOCATE_EVENT_TYPE; },
+ 		ETYPE { uid = KLogLbsAssistanceDataEventType; description = LOG_LBS_ASSISTANCE_DATA_EVENT_TYPE; }
+
+   		};
+   	}
+
+
+
+RESOURCE ARRAY r_log_security
+//
+// [See logwrap.rh for the definitions of SECURITY and CAPABILITY.]
+//
+// This structure defines settings for platform security in the Log engine.
+// All event types defined above in 'r_log_initial_events' need to be policed.
+// The server must always determine whether a client thread has the required
+// capability to read/write a log event(s) of a built-in type.  Each operation
+// may have from one to seven capabilities defined for it.  All operations on 
+// built in types _MUST_ have an associated security policy defined here.  If no
+// security is required, then use 'cap=ECapability_None'.  The CAPABILITY values
+// defined here will provide constructor arguments for TSecurityPolicy objects.
+// The maximum number of CAPABILITY(s) for each read or write operation is 7.
+// ( a read_caps or a write_caps { contains <= 7 CAPABILITY{}   statements }  )
+// Note that SID-based security isn't supported in the Log Engine.
+//
+	{
+	items = 
+		{
+		SECURITY 
+			{ 
+			uid = KLogCallEventType;	
+			read_caps=
+				{
+				CAPABILITY { cap=ECapabilityReadUserData; }
+				};
+			write_caps=
+				{
+				CAPABILITY { cap=ECapabilityWriteUserData; }
+				};
+			},
+		SECURITY 
+			{ 
+			uid=KLogDataEventType;	
+			read_caps=
+				{
+				CAPABILITY { cap=ECapabilityReadUserData; }
+				};
+			write_caps=
+				{
+				CAPABILITY { cap=ECapabilityWriteUserData; }
+				};
+			},
+		SECURITY 
+			{ 
+			uid=KLogFaxEventType;	
+			read_caps=
+				{
+				CAPABILITY { cap=ECapabilityReadUserData; }
+				};
+			write_caps=
+				{
+				CAPABILITY { cap=ECapabilityWriteUserData; }
+				};
+			},
+		SECURITY 
+			{ 
+			uid=KLogShortMessageEventType;	
+			read_caps=
+				{
+				CAPABILITY { cap=ECapabilityReadUserData; }
+				};
+			write_caps=
+				{
+				CAPABILITY { cap=ECapabilityWriteUserData; }
+				};
+			},
+		SECURITY 
+			{ 
+			uid=KLogTaskSchedulerEventType;	
+			read_caps=
+				{
+				CAPABILITY { cap=ECapabilityReadUserData; }
+				};
+			write_caps=
+				{
+				CAPABILITY { cap=ECapability_None; }
+				};
+			},
+		SECURITY 
+			{ 
+			uid=KLogPacketDataEventType;	
+			read_caps=
+				{
+				CAPABILITY { cap=ECapabilityReadUserData; }
+				};
+			write_caps=
+				{
+				CAPABILITY { cap=ECapabilityWriteUserData; }
+				};
+			},
+		SECURITY 
+			{ 
+			uid=KLogLbsSelfLocateEventType;	
+			read_caps=
+				{
+				CAPABILITY { cap=ECapabilityReadDeviceData; }
+				};
+			write_caps=
+				{
+				CAPABILITY { cap=ECapabilityWriteDeviceData; }
+				};
+			},
+		SECURITY 
+			{ 
+			uid=KLogLbsExternalLocateEventType;	
+			read_caps=
+				{
+				CAPABILITY { cap=ECapabilityReadDeviceData; }
+				};
+			write_caps=
+				{
+				CAPABILITY { cap=ECapabilityWriteDeviceData; }
+				};
+			},
+		SECURITY 
+			{ 
+			uid=KLogLbsTransmitLocationEventType;	
+			read_caps=
+				{
+				CAPABILITY { cap=ECapabilityReadDeviceData; }
+				};
+			write_caps=
+				{
+				CAPABILITY { cap=ECapabilityWriteDeviceData; }
+				};
+			},
+		SECURITY 
+			{ 
+			uid=KLogLbsNetworkLocateEventType;	
+			read_caps=
+				{
+				CAPABILITY { cap=ECapabilityReadDeviceData; }
+				};
+			write_caps=
+				{
+				CAPABILITY { cap=ECapabilityWriteDeviceData; }
+				};
+			},
+		SECURITY 
+			{ 
+			uid=KLogLbsAssistanceDataEventType;	
+			read_caps=
+				{
+				CAPABILITY { cap=ECapabilityReadDeviceData; }
+				};
+			write_caps=
+				{
+				CAPABILITY { cap=ECapabilityWriteDeviceData; }
+				};
+			}
+		};
+	}
+
+
+// Index entries
+RESOURCE ARRAY r_log_indexes
+	{
+	items =
+		{
+		INDEX
+			{
+			name = "Index1"; // do not translate
+			table = "Event"; // do not translate
+			keys = 
+				{
+				KEY { col = "Id"; } // do not translate
+				};
+			},
+		INDEX
+			{
+			name = "Index2"; // do not translate
+			table = "Event"; // do not translate
+			keys =
+				{
+				KEY { col = "ETime"; } // do not translate
+				};
+			},
+		INDEX
+			{
+			name = "Index3"; // do not translate
+			table = "String"; // do not translate
+			keys = 
+				{
+				KEY { col = "Id"; } // do not translate
+				};
+			}
+		};
+	}
+
+// Recent list setup
+RESOURCE ARRAY r_log_recent
+	{
+	items =
+		{
+		RECENT
+			{
+			id = KLogRecentIncomingCalls;
+			duplicate = ELogRemotePartyField|ELogContactField|ELogNumberField;
+			conditions = 
+				{
+				MATCH { field = ELogEventTypeField; value = KLogCallEventType; },
+				MATCH { field = ELogDirectionField; string = LOG_DIR_IN; },
+				MATCH { field = ELogDirectionField; string = LOG_DIR_IN_ALT; }
+				};
+			},
+		RECENT
+			{
+			id = KLogRecentOutgoingCalls;
+			duplicate = ELogRemotePartyField|ELogContactField|ELogNumberField;
+			conditions = 
+				{
+				MATCH { field = ELogEventTypeField; value = KLogCallEventType; },
+				MATCH { field = ELogDirectionField; string = LOG_DIR_OUT; },
+				MATCH { field = ELogDirectionField; string = LOG_DIR_OUT_ALT; }
+				};
+			},
+		RECENT
+			{
+			id = KLogRecentMissedCalls;
+			duplicate = ELogRemotePartyField|ELogContactField|ELogNumberField;
+			conditions = 
+				{
+				MATCH { field = ELogEventTypeField; value = KLogCallEventType; },
+				MATCH { field = ELogDirectionField; string = LOG_DIR_MISSED; },
+				MATCH { field = ELogDirectionField; string = LOG_DIR_MISSED_ALT; }
+				};
+			}
+		};
+	}
+
+
+// Direction
+RESOURCE LBUF r_log_dir_in { txt = LOG_DIR_IN; }
+RESOURCE LBUF r_log_dir_out { txt = LOG_DIR_OUT; }
+RESOURCE LBUF r_log_dir_in_alt { txt = LOG_DIR_IN_ALT; }
+RESOURCE LBUF r_log_dir_out_alt { txt = LOG_DIR_OUT_ALT; }
+RESOURCE LBUF r_log_dir_fetched { txt = LOG_DIR_FETCHED; }
+RESOURCE LBUF r_log_dir_missed { txt = LOG_DIR_MISSED; }
+RESOURCE LBUF r_log_dir_missed_alt { txt = LOG_DIR_MISSED_ALT; }
+
+
+// Delivery
+RESOURCE LBUF r_log_del_pending { txt = LOG_DEL_PENDING; }
+RESOURCE LBUF r_log_del_sent { txt = LOG_DEL_SENT; }
+RESOURCE LBUF r_log_del_failed { txt = LOG_DEL_FAILED; }
+/* R_LOG_DEL_NONE comes from the rsg that we're trying to depend on */
+RESOURCE LBUF r_log_del_none { txt = R_LOG_DEL_NONE; } 
+RESOURCE LBUF r_log_del_done { txt = LOG_DEL_DONE; }
+RESOURCE LBUF r_log_del_not_sent { txt = LOG_DEL_NOT_SENT; }
+RESOURCE LBUF r_log_del_scheduled { txt = LOG_DEL_SCHEDULED; }
+
+// Other
+RESOURCE LBUF r_log_remote_unknown { txt = LOG_REMOTE_UNKNOWN; }
+RESOURCE LBUF r_log_remote_multiple { txt = LOG_REMOTE_MULTIPLE; }
+RESOURCE LBUF r_log_subject_none { txt = LOG_SUBJECT_NONE; }
+RESOURCE LBUF r_log_subject_data_message { txt = LOG_SUBJECT_DATA_MESSAGE; }
+
+// Connection
+RESOURCE LBUF r_log_con_connected { txt = LOG_CON_CONNECTED; }
+RESOURCE LBUF r_log_con_connecting { txt = LOG_CON_CONNECTING; }
+RESOURCE LBUF r_log_con_disconnecting { txt = LOG_CON_DISCONNECTING; }
+RESOURCE LBUF r_log_con_disconnected{ txt = LOG_CON_DISCONNECTED; }
+RESOURCE LBUF r_log_con_suspended{ txt = LOG_CON_SUSPENDED; }
+
+// Delivery
+RESOURCE LBUF r_log_del_notified { txt = LOG_DEL_NOTIFIED; } 
+RESOURCE LBUF r_log_del_expired { txt = LOG_DEL_EXPIRED; }  
--- a/sbsv2/raptor/test/smoke_suite/test_resources/resource/group/testresource.mmp	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/resource/group/testresource.mmp	Fri Jun 04 13:09:28 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -52,10 +52,24 @@
 LANG 02 sc
 END
 
+
+START RESOURCE          dependentresource.rss
+TARGETPATH              resource/dependentresource
+LANG sc
+END
+
+// Looks like testresource but comes from another resource file
+START RESOURCE          dependentresource.rss
+TARGET 			testresource.rsc
+TARGETPATH              resource/anotherresource
+LANG SC 01
+END
+
 START BITMAP	testresource.mbm
 HEADER
-
 TARGETPATH		resource/apps
 SOURCEPATH		../aifsrccl
 SOURCE			c8,1 DEF24.BMP DEF2M.BMP
 END
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/resource/test.cpp	Fri Jun 04 13:09:28 2010 +0100
@@ -0,0 +1,25 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* 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[]="Resource test";
+
+
+TInt E32Main()
+{
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/scripts/delete_on_failed_compile.py	Fri Jun 04 13:09:28 2010 +0100
@@ -0,0 +1,55 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# 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: 
+# delete_on_failed_compile.py
+# This is a test module for verifying the delete on failed compile 
+# work around for RVCT 2.2. It creates a dummy object file and 
+# exits with an error code which should result in object files being deleted.
+# It takes the same arguments as armcc, but ignores them all apart from -o.
+#
+
+import sys
+import os
+import re
+
+# Parse for -o argument.
+objectfile_re = re.compile(".*-o\s(\S*\.(o|pre))\s.*", re.I)
+res = objectfile_re.match(" ".join(sys.argv[1:]))
+
+if res:
+	objectpath = res.group(1)
+	print "Found object file %s" % objectpath
+	objectdirectory = os.path.dirname(objectpath)
+	
+	# Make the directory if it doesn't exist
+	if not os.path.isdir(objectdirectory):
+		try:
+			os.makedirs(objectdirectory)
+		except:
+			print "Not making directory %s" % objectdirectory
+	
+	# Try to write something to the .o file
+	try:
+		fh = open(objectpath, "w")
+		fh.write("Fake object file for delete on failed compile test\n")
+		fh.close()
+	except Exception as error:
+		print "Failed to created object file %s; error was: %s" % (objectfile, str(error))
+else:
+	print "Failed to determine object filename. Commandline used was: %s" % " ".join(sys.argv[1:])
+
+# Always exit with an error
+print "Exiting with non-zero exit code." 
+sys.exit(1)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/simple/compilervariants/delete_on_failed_compile_compiler_variants.xml	Fri Jun 04 13:09:28 2010 +0100
@@ -0,0 +1,8 @@
+<?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 ../../schema/build/2_0.xsd">
+	<!-- Fake compiler variant for testing the  -->	
+	<var name="fake_compiler">
+		<set name='CC' value='python -u $(SBS_HOME)/test/smoke_suite/test_resources/scripts/delete_on_failed_compile.py'/>
+	</var>
+
+</build>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/simple/makevariants/delete_on_failed_compile_make_variants.xml	Fri Jun 04 13:09:28 2010 +0100
@@ -0,0 +1,60 @@
+<?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 ../../schema/build/2_0.xsd">
+	<!-- Some make engines for test purposes -->
+	
+	<!-- Raptor make engine for GNU make -->
+	<var name="make_engine">
+		<varRef ref="default.locations"/>
+
+		<!-- Shell settings -->
+		<set name='DEFAULT_SHELL' value='$(SBS_HOME)/$(HOSTPLATFORM_DIR)/bin/talon$(DOTEXE)' type='tool'/>
+		<set name='TALON_SHELL' value='$(SBS_SHELL)' type='tool'/>
+		<set name='USE_TALON' value='1'/>
+		<set name='TALON_TIMEOUT' value='600000'/>
+		<set name='TALON_DESCRAMBLE' value='1'/>
+		
+		<!-- Command-line for initialisation -->
+		<set name="initialise" value=""/>
+
+		<!-- Command-line for shutdown -->
+		<set name="shutdown" value=""/>
+
+		<!-- Command-line for build  -->
+		<set name="build" value="$(GNUMAKE38) HAVE_ORDERONLY=1 -r" type="tool"/>
+
+		<!-- Options  -->
+		<set name="makefile" value="-f"/>
+		<set name="keep_going" value="-k"/>
+		<set name="jobs" value="-j"/>
+		
+		<!-- The following are stuck on the commandline before any options
+		     specified by the sbs "mo" option, so they can be overridden -->
+		<set name="defaultoptions" value=""/>
+
+		<!-- How to split out the makefiles -->
+		<set name="selectors" value="export,bitmap,resource_deps,resource,default"/>
+		<set name="export.selector.iface" value="\.export$"/>
+		<set name="export.selector.target" value="EXPORT"/>
+		<set name="bitmap.selector.iface" value="\.(bitmap|extension|mifconv)$"/>
+		<set name="bitmap.selector.target" value="BITMAP"/>
+		<set name="resource_deps.selector.iface" value="\.resource$"/>
+		<set name="resource_deps.selector.target" value="RESOURCE_DEPS"/>
+		<set name="resource_deps.selector.ignoretargets" value="^(RESOURCE|CLEAN|CLEANEXPORT|REALLYCLEAN)$"/>
+		<set name="resource.selector.iface" value="\.(resource|extension|mif2cdlindex|nativejava)$"/>
+		<set name="resource.selector.target" value="RESOURCE"/>
+		<set name="default.selector.iface" value="\.(?!export$|bitmap$|resource$|mifconv$|mif2cdlindex$|nativejava$).*$"/>
+		<set name="default.selector.target" value="ALL"/>
+
+		<!-- is the text output with -j buffered or scrambled? -->
+		<set name="scrambled" value="true"/>
+	</var>
+	
+	<alias name="make_test" meaning="make_engine"/>
+
+	<!-- use the talon shell -->
+	<var name="make_no_talon_engine_test" extends="make_engine_test">
+	        <set name='DEFAULT_SHELL' value='$(SBS_SHELL)' type='tool'/>
+	        <set name='USE_TALON' value=''/>
+	</var>
+</build>
+
--- a/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/child1.mmp	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/child1.mmp	Fri Jun 04 13:09:28 2010 +0100
@@ -11,5 +11,5 @@
 SOURCE			child1.cpp
 SOURCE			common.cpp
 
-USERINCLUDE		../traces_child1_exe
+USERINCLUDE		../traces/traces_child1_exe
 
--- a/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/child2.mmp	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/child2.mmp	Fri Jun 04 13:09:28 2010 +0100
@@ -11,5 +11,5 @@
 SOURCE			child2.cpp
 SOURCE			common.cpp
 
-USERINCLUDE		../traces_child2_exe
+USERINCLUDE		../traces/traces_child2_exe
 
--- a/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/child3.mmp	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/child3.mmp	Fri Jun 04 13:09:28 2010 +0100
@@ -10,5 +10,5 @@
 SOURCE			child3.cpp
 SOURCE			common.cpp
 
-USERINCLUDE		../traces_child3_exe
+USERINCLUDE		../traces/traces_child3_exe
 
--- a/sbsv2/raptor/test/smoke_suite/timing.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/timing.py	Fri Jun 04 13:09:28 2010 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -22,21 +22,10 @@
 	
 	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} && " + \
+	t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf" + \
+			" --filters=FilterLogfile,FilterTiming -f ${SBSLOGFILE} && " + \
 			"grep progress:duration ${SBSLOGFILE}.timings"
 	t.mustmatch = [
 			"^<progress:duration object_type='layer' task='parse' key='.*' duration='\d+.\d+' />$",
--- a/sbsv2/raptor/test/smoke_suite/tracecompiler_general.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/tracecompiler_general.py	Fri Jun 04 13:09:28 2010 +0100
@@ -40,7 +40,7 @@
 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitpermparserTraces.h",	
 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/fixed_id.definitions",
 		"$(EPOCROOT)/epoc32/ost_dictionaries/testTC_0x1000008d_Dictionary.xml",
-		"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/testTC_0x1000008d_TraceDefinitions.h"
+		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/testTC_0x1000008d_TraceDefinitions.h"
 		]
 	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/testTC/group/bld.inf', [
 		"testtc_dll/armv5/udeb/wlanhwinit.o",
@@ -59,7 +59,7 @@
 		"testtc_dll/armv5/urel/wlanhwinitpermparser.o.d",	
 		"testtc_dll/armv5/urel/testTC_urel_objects.via",
 		"testtc_dll/armv5/urel/testTC{000a0000}.def",
-		"testtc_dll/tracecompile_testTC_1000008d.done"
+		"testtc_dll/tracecompile_testTC_dll_1000008d.done"
 	])
 	t.run()
 	
@@ -74,7 +74,7 @@
 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitpermparserTraces.h"
 		]
 	t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [
-		"testtc_dll/tracecompile_testTC_1000008d.done"
+		"testtc_dll/tracecompile_testTC_dll_1000008d.done"
 	])
 	t.run()
 			
@@ -90,7 +90,7 @@
 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/TC_featurevariant/traces/HelloWorldTraces.h",
 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/TC_featurevariant/traces/fixed_id.definitions",
 		"$(EPOCROOT)/epoc32/ost_dictionaries/HelloWorld_0xe78a5aa3_Dictionary.xml",
-		"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/HelloWorld_0xe78a5aa3_TraceDefinitions.h"
+		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/HelloWorld_0xe78a5aa3_TraceDefinitions.h"
 		]
 	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/TC_featurevariant/group/bld.inf', [
 		"helloworld_exe/armv5/udeb/HelloWorld.o",
@@ -99,7 +99,7 @@
 		"helloworld_exe/armv5/urel/HelloWorld.o",
 		"helloworld_exe/armv5/urel/HelloWorld.o.d",
 		"helloworld_exe/armv5/urel/HelloWorld_urel_objects.via",
-		"helloworld_exe/tracecompile_HelloWorld_e78a5aa3.done"
+		"helloworld_exe/tracecompile_HelloWorld_exe_e78a5aa3.done"
 	])
 	t.run()
 
@@ -120,7 +120,7 @@
 	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [
 		"test_/armv5/udeb/test.o",
 		"test_/armv5/urel/test.o",
-		"test_/tracecompile_autorun1_00000001.done"
+		"test_/tracecompile_test_exe_00000001.done"
 	])
 	t.run()
 	
@@ -141,7 +141,7 @@
 		"test_/armv5/urel/test.o",
 	])
 	t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [
-		"test_/tracecompile_autorun2_00000001.done"
+		"test_/tracecompile_test_exe_00000001.done"
 	])
 	t.run()
 
@@ -162,7 +162,7 @@
 		"test_/armv5/urel/test.o",
 	])
 	t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [
-		"test_/tracecompile_autorun3_00000001.done"
+		"test_/tracecompile_test_exe_00000001.done"
 	])
 	t.run()
 
@@ -183,7 +183,7 @@
 		"test_/armv5/urel/test.o"
 	])
 	t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [
-		"test_/tracecompile_autorun1_00000001.done"
+		"test_/tracecompile_test_exe_00000001.done"
 	])
 	t.run()
 
--- a/sbsv2/raptor/test/smoke_suite/tracecompiler_variants.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/tracecompiler_variants.py	Fri Jun 04 13:09:28 2010 +0100
@@ -42,8 +42,8 @@
 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/fixed_id.definitions",
 		"$(EPOCROOT)/epoc32/ost_dictionaries/invariant_source_0x10000002_Dictionary.xml",
 		"$(EPOCROOT)/epoc32/ost_dictionaries/variant_source_0x10000003_Dictionary.xml",
-		"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/invariant_source_0x10000002_TraceDefinitions.h",
-		"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/variant_source_0x10000003_TraceDefinitions.h"
+		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/invariant_source_0x10000002_TraceDefinitions.h",
+		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/variant_source_0x10000003_TraceDefinitions.h"
 		]
 	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/variant_source/group/bld.inf', [
 		"invariant_source_/armv5/udeb/inv_source.o",
@@ -54,7 +54,7 @@
 		"invariant_source_/winscw/udeb/inv_source.o.d",
 		"invariant_source_/winscw/urel/inv_source.o",
 		"invariant_source_/winscw/urel/inv_source.o.d",
-		"invariant_source_/tracecompile_invariant_source_10000002.done",
+		"invariant_source_/tracecompile_invariant_source_exe_10000002.done",
 		"variant_source_/armv5/udeb/var_source1.o",
 		"variant_source_/armv5/udeb/var_source1.o.d",
 		"variant_source_/armv5/udeb/var_source2.o",
@@ -71,7 +71,7 @@
 		"variant_source_/winscw/urel/var_source1.o.d",
 		"variant_source_/winscw/urel/var_source2.o",
 		"variant_source_/winscw/urel/var_source2.o.d",
-		"variant_source_/tracecompile_variant_source_10000003.done"
+		"variant_source_/tracecompile_variant_source_exe_10000003.done"
 	])
 	t.antitargets = [
 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/var_source3Traces.h"
@@ -105,8 +105,8 @@
 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/var_source3Traces.h",
 		"$(EPOCROOT)/epoc32/ost_dictionaries/invariant_source_0x10000002_Dictionary.xml",
 		"$(EPOCROOT)/epoc32/ost_dictionaries/variant_source_0x10000003_Dictionary.xml",
-		"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/invariant_source_0x10000002_TraceDefinitions.h",
-		"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/variant_source_0x10000003_TraceDefinitions.h"
+		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/invariant_source_0x10000002_TraceDefinitions.h",
+		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/variant_source_0x10000003_TraceDefinitions.h"
 		]
 	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/variant_source/group/bld.inf', [
 		"invariant_source_/armv5/udeb/inv_source.o",
@@ -117,7 +117,7 @@
 		"invariant_source_/winscw/udeb/inv_source.o.d",
 		"invariant_source_/winscw/urel/inv_source.o",
 		"invariant_source_/winscw/urel/inv_source.o.d",
-		"invariant_source_/tracecompile_invariant_source_10000002.done",
+		"invariant_source_/tracecompile_invariant_source_exe_10000002.done",
 		"variant_source_/armv5/udeb/var_source1.o",
 		"variant_source_/armv5/udeb/var_source1.o.d",
 		"variant_source_/armv5/udeb/var_source3.o",
@@ -134,7 +134,7 @@
 		"variant_source_/winscw/urel/var_source1.o.d",
 		"variant_source_/winscw/urel/var_source3.o",
 		"variant_source_/winscw/urel/var_source3.o.d",
-		"variant_source_/tracecompile_variant_source_10000003.done"
+		"variant_source_/tracecompile_variant_source_exe_10000003.done"
 	])
 	t.run()
 
@@ -159,7 +159,7 @@
 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/multiple_variants/traces/tc_bTraces.h",
 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/multiple_variants/traces/tc_cTraces.h",
 		"$(EPOCROOT)/epoc32/ost_dictionaries/tc_variants_0x10000004_Dictionary.xml",
-		"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/tc_variants_0x10000004_TraceDefinitions.h"
+		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/tc_variants_0x10000004_TraceDefinitions.h"
 		]
 	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/multiple_variants/group/bld.inf', [
 		"tc_variants_/armv5.phone1/udeb/tc_main.o",
@@ -174,7 +174,7 @@
 		"tc_variants_/armv5.phone3/udeb/tc_c.o",
 		"tc_variants_/armv5.phone3/urel/tc_main.o",
 		"tc_variants_/armv5.phone3/urel/tc_c.o",
-		"tc_variants_/tracecompile_tc_variants_10000004.done"
+		"tc_variants_/tracecompile_tc_variants_exe_10000004.done"
 	])	
 	t.run()
 
@@ -195,18 +195,18 @@
 		"$(EPOCROOT)/epoc32/release/armv5/urel/child2.exe",
 		"$(EPOCROOT)/epoc32/release/armv5/udeb/child3.exe",
 		"$(EPOCROOT)/epoc32/release/armv5/urel/child3.exe",
-		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child1_exe/child1Traces.h",
-		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child1_exe/commonTraces.h",
-		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child2_exe/child2Traces.h",
-		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child2_exe/commonTraces.h",
-		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child3_exe/child3Traces.h",
-		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child3_exe/commonTraces.h",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/traces_child1_exe/child1Traces.h",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/traces_child1_exe/commonTraces.h",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/traces_child2_exe/child2Traces.h",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/traces_child2_exe/commonTraces.h",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/traces_child3_exe/child3Traces.h",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/traces_child3_exe/commonTraces.h",
 		"$(EPOCROOT)/epoc32/ost_dictionaries/child1_exe_0x11100001_Dictionary.xml",
 		"$(EPOCROOT)/epoc32/ost_dictionaries/child2_exe_0x11100002_Dictionary.xml",
 		"$(EPOCROOT)/epoc32/ost_dictionaries/child3_exe_0x11100002_Dictionary.xml",
-		"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/child1_exe_0x11100001_TraceDefinitions.h",
-		"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/child2_exe_0x11100002_TraceDefinitions.h",
-		"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/child3_exe_0x11100002_TraceDefinitions.h"
+		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/child1_exe_0x11100001_TraceDefinitions.h",
+		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/child2_exe_0x11100002_TraceDefinitions.h",
+		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/child3_exe_0x11100002_TraceDefinitions.h"
 		]
 	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/bld.inf', [
 		"child1_/armv5/udeb/child1.o",
@@ -231,7 +231,7 @@
 	# Clean mmp A then build mmp B and C. As common.cpp is shared by A B and C, commonTraces.h would be 
 	# cleaned when cleaning mmp A. But as B and C aren't cleaned, Raptor wouldn't run trace compiler on
 	# B and C, thus commonTraces.h wouldn't be generated again, so be missing for mmp B and C.
-	# The solution is to use new trace path "traces_<TARGET>_<TARGETTYPE>" instead of "traces" so shared 
+	# The solution is to use new trace path "traces/traces_<TARGET>_<TARGETTYPE>" instead of "traces" so shared 
 	# source has different copy of trace headers for different projects.
 	t = SmokeTest()
 	t.id = "102e"
@@ -247,14 +247,14 @@
 		"$(EPOCROOT)/epoc32/release/armv5/urel/child2.exe",
 		"$(EPOCROOT)/epoc32/release/armv5/udeb/child3.exe",
 		"$(EPOCROOT)/epoc32/release/armv5/urel/child3.exe",
-		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child2_exe/child2Traces.h",
-		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child2_exe/commonTraces.h",
-		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child3_exe/child3Traces.h",
-		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child3_exe/commonTraces.h",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/traces_child2_exe/child2Traces.h",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/traces_child2_exe/commonTraces.h",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/traces_child3_exe/child3Traces.h",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/traces_child3_exe/commonTraces.h",
 		"$(EPOCROOT)/epoc32/ost_dictionaries/child2_exe_0x11100002_Dictionary.xml",
 		"$(EPOCROOT)/epoc32/ost_dictionaries/child3_exe_0x11100002_Dictionary.xml",
-		"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/child2_exe_0x11100002_TraceDefinitions.h",
-		"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/child3_exe_0x11100002_TraceDefinitions.h"
+		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/child2_exe_0x11100002_TraceDefinitions.h",
+		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/child3_exe_0x11100002_TraceDefinitions.h"
 		]
 	t.addbuildtargets('smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/bld.inf', [
 		"child2_/armv5/udeb/child2.o",
--- a/sbsv2/raptor/test/smoke_suite/tracecompiler_whatlog.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/tracecompiler_whatlog.py	Fri Jun 04 13:09:28 2010 +0100
@@ -46,7 +46,7 @@
 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitpermparserTraces.h",	
 		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/fixed_id.definitions",
 		"$(EPOCROOT)/epoc32/ost_dictionaries/test_TC_0x1000008d_Dictionary.xml",
-		"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/test_TC_0x1000008d_TraceDefinitions.h"
+		"$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/test_TC_0x1000008d_TraceDefinitions.h"
 		]
 	t.stdout = [
 		"<whatlog bldinf='$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/group/bld2.inf' mmp='$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/group/test.TC.mmp' config='armv5_urel.tracecompiler'>",
@@ -58,9 +58,11 @@
 		"<build>$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll</build>",
 		"<build>$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll.map</build>",
 		"<build>$(EPOCROOT)/epoc32/ost_dictionaries/test_TC_0x1000008d_Dictionary.xml</build>",
-		"<build>$(EPOCROOT)/epoc32/include/internal/SymbianTraces/autogen/test_TC_0x1000008d_TraceDefinitions.h</build>"
+		"<build>$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/test_TC_0x1000008d_TraceDefinitions.h</build>"
 		]		
-	t.run()
+	t.run("linux")
+	if t.result == CheckWhatSmokeTest.SKIP:
+		t.run("windows")
 
 	t.id = "112"
 
--- a/sbsv2/raptor/test/smoke_suite/unfrozen.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/unfrozen.py	Fri Jun 04 13:09:28 2010 +0100
@@ -156,14 +156,7 @@
 				]
 	t.warnings = 8
 	# ABIv1 .lib files are not generated on Linux
-	t.run("linux")
-	if t.result == SmokeTest.SKIP:
-		t.targets.extend([
-			"$(EPOCROOT)/epoc32/release/armv5/lib/unfrozensymbols.lib",
-			"$(EPOCROOT)/epoc32/release/armv5/lib/unfrozensymbols{000a0000}.lib",
-			"$(EPOCROOT)/epoc32/release/armv5/lib/unfrozensymbols2.lib",
-			"$(EPOCROOT)/epoc32/release/armv5/lib/unfrozensymbols2{000a0000}.lib"
-			])
-		t.run("windows")
+	t.run()
 	
+	t.print_result()
 	return t
--- a/sbsv2/raptor/test/smoke_suite/whatcomp.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/whatcomp.py	Fri Jun 04 13:09:28 2010 +0100
@@ -67,7 +67,7 @@
 	t.warnings = warnings
 	t.run()
 
-	t.id = "0106a"
+	t.id = "0106b"
 	t.name = "whatcomp_component_repeated"
 	t.description = """
 			It is possible for what information about a component to not be grouped
@@ -89,5 +89,6 @@
 	t.run()
 
 	t.id = "0106"
+	t.name = "whatcomp"
 	t.print_result()
 	return t
--- a/sbsv2/raptor/test/smoke_suite/whatlog_cache.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/whatlog_cache.py	Fri Jun 04 13:09:28 2010 +0100
@@ -42,14 +42,11 @@
 		
 	t.targets = [
 		"$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.mbm",
-		"$(EPOCROOT)/epoc32/localisation/group/helloworld.info",
 		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.mbm",
 		"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.mbm",
 		"$(EPOCROOT)/epoc32/include/helloworld.rsg",
 		"$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.rsc",
 		"$(EPOCROOT)/epoc32/data/z/private/10003a3f/apps/helloworld_reg.rsc",
-		"$(EPOCROOT)/epoc32/localisation/helloworld/rsc/helloworld.rpp",
-		"$(EPOCROOT)/epoc32/localisation/group/helloworld_reg.info",
 		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.rsc",
 		"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.rsc",
 		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/private/10003a3f/apps/helloworld_reg.rsc",
@@ -64,8 +61,8 @@
 		]
 	t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', [
 		"helloworld_exe/helloworld.mbm_bmconvcommands",
-		"helloworld_exe/helloworld__resource_apps_sc.rpp",
-		"helloworld_exe/helloworld__resource_apps_sc.rpp.d",
+		"helloworld_exe/helloworld_HelloWorld_sc.rpp",
+		"helloworld_exe/helloworld_HelloWorld_sc.rpp.d",
 		"helloworld_exe/armv5/udeb/HelloWorld_Application.o",
 		"helloworld_exe/armv5/udeb/HelloWorld_Application.o.d",
 		"helloworld_exe/armv5/udeb/HelloWorld_AppUi.o",
@@ -126,7 +123,7 @@
 		"helloworld_exe/winscw/urel/helloworld_UID_.dep",
 		"helloworld_exe/winscw/urel/helloworld_UID_.o",
 		"helloworld_exe/winscw/urel/helloworld_UID_.o.d",
-		"helloworld_reg_exe/helloworld_reg__private_10003a3f_apps_sc.rpp.d"
+		"helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp.d"
 	])
 	t.countmatch = [
 		["\$self->{abldcache}->{.*\\\\test\\\\smoke_suite\\\\test_resources\\\\simple_gui target (armv5|winscw) (udeb|urel) -what\'} =", 4],
@@ -134,10 +131,6 @@
 		[".*\'.*\\\\\\\\epoc32\\\\\\\\data\\\\\\\\z\\\\\\\\resource\\\\\\\\apps\\\\\\\\helloworld.mbm\'", 4],
 		[".*\'.*\\\\\\\\epoc32\\\\\\\\data\\\\\\\\z\\\\\\\\resource\\\\\\\\apps\\\\\\\\helloworld.rsc\'", 4],
 		[".*\'.*\\\\\\\\epoc32\\\\\\\\include\\\\\\\\helloworld.rsg\'", 4],
-		[".*\'.*\\\\\\\\epoc32\\\\\\\\localisation\\\\\\\\group\\\\\\\\helloworld.info\'", 4],
-		[".*\'.*\\\\\\\\epoc32\\\\\\\\localisation\\\\\\\\group\\\\\\\\helloworld_reg.info\'", 4],
-		[".*\'.*\\\\\\\\epoc32\\\\\\\\localisation\\\\\\\\helloworld\\\\\\\\rsc\\\\\\\\helloworld.rpp\'", 4],
-		[".*\'.*\\\\\\\\epoc32\\\\\\\\localisation\\\\\\\\helloworld_reg\\\\\\\\rsc\\\\\\\\helloworld_reg.rpp\'", 4],
 		[".*\'.*\\\\\\\\epoc32\\\\\\\\release\\\\\\\\(armv5|winscw)\\\\\\\\(udeb|urel)\\\\\\\\helloworld.exe\'",4],
 		[".*\'.*\\\\\\\\epoc32\\\\\\\\release\\\\\\\\(armv5|winscw)\\\\\\\\(udeb|urel)\\\\\\\\helloworld.exe.map\'", 3],
 		[".*\'.*\\\\\\\\epoc32\\\\\\\\release\\\\\\\\winscw\\\\\\\\(udeb|urel)\\\\\\\\z\\\\\\\\private\\\\\\\\10003a3f\\\\\\\\apps\\\\\\\\helloworld_reg.rsc\'", 2],
--- a/sbsv2/raptor/test/smoke_suite/winscw_resource.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/winscw_resource.py	Fri Jun 04 13:09:28 2010 +0100
@@ -30,9 +30,7 @@
 		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/testresource/testresource.r01",
 		"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/testresource/testresource.r01",
 		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/testresource/testresource.rsc",
-		"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/testresource/testresource.rsc",
-		"$(EPOCROOT)/epoc32/localisation/group/testresource.info",
-		"$(EPOCROOT)/epoc32/localisation/testresource/rsc/testresource.rpp"
+		"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/testresource/testresource.rsc"
 		]
 	t.run()
 	return t
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/unit_suite/raptor_api_unit.py	Fri Jun 04 13:09:28 2010 +0100
@@ -0,0 +1,104 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# 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: 
+# raptor_api_unit module
+
+import generic_path
+import raptor
+import raptor_api
+import unittest
+
+class TestRaptorApi(unittest.TestCase):
+			
+	def testContext(self):
+		api = raptor_api.Context()
+		
+	def testContextInitialiser(self):
+		r = raptor.Raptor()
+		api = raptor_api.Context(r)
+		
+	def testAliases(self):
+		r = raptor.Raptor()
+		r.cache.Load( generic_path.Join(r.home, "test", "config", "api.xml") )
+
+		api = raptor_api.Context(r)
+	
+		aliases = api.getaliases() # type == ""
+		self.failUnlessEqual(len(aliases), 4)
+		self.failUnlessEqual(set(["alias_A","alias_B","s1","s2"]),
+							 set(a.name for a in aliases))
+		
+		aliases = api.getaliases(raptor_api.ALL) # ignore type
+		self.failUnlessEqual(len(aliases), 6)
+		
+		aliases = api.getaliases("X") # type == "X"
+		self.failUnlessEqual(len(aliases), 1)
+		self.failUnlessEqual(aliases[0].name, "alias_D")
+		self.failUnlessEqual(aliases[0].meaning, "a.b.c.d")
+	
+	def testConfig(self):
+		r = raptor.Raptor()
+		r.cache.Load( generic_path.Join(r.home, "test", "config", "api.xml") )
+
+		api = raptor_api.Context(r)
+		
+		if r.filesystem == "unix":
+			path = "/home/raptor/foo/bar"
+		else:
+			path = "C:/home/raptor/foo/bar"
+			
+		config = api.getconfig("buildme")
+		self.failUnlessEqual(config.fullname, "buildme")
+		self.failUnlessEqual(config.outputpath, path)
+		
+		config = api.getconfig("buildme.foo")
+		self.failUnlessEqual(config.fullname, "buildme.foo")
+		self.failUnlessEqual(config.outputpath, path)
+		
+		config = api.getconfig("s1")
+		self.failUnlessEqual(config.fullname, "buildme.foo")
+		self.failUnlessEqual(config.outputpath, path)
+		
+		config = api.getconfig("s2.product_A")
+		self.failUnlessEqual(config.fullname, "buildme.foo.bar.product_A")
+		self.failUnlessEqual(config.outputpath, path)
+		
+	def testProducts(self):
+		r = raptor.Raptor()
+		r.cache.Load( generic_path.Join(r.home, "test", "config", "api.xml") )
+
+		api = raptor_api.Context(r)
+		
+		products = api.getproducts() # type == "product"
+		self.failUnlessEqual(len(products), 2)
+		self.failUnlessEqual(set(["product_A","product_C"]),
+							 set(p.name for p in products))
+		
+# run all the tests
+
+from raptor_tests import SmokeTest
+
+def run():
+	t = SmokeTest()
+	t.name = "raptor_api_unit"
+
+	tests = unittest.makeSuite(TestRaptorApi)
+	result = unittest.TextTestRunner(verbosity=2).run(tests)
+
+	if result.wasSuccessful():
+		t.result = SmokeTest.PASS
+	else:
+		t.result = SmokeTest.FAIL
+
+	return t
--- a/sbsv2/raptor/test/unit_suite/raptor_cli_unit.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/unit_suite/raptor_cli_unit.py	Fri Jun 04 13:09:28 2010 +0100
@@ -153,6 +153,9 @@
 	def AddProject(self, project):
 		return True
 
+	def AddQuery(self, query):
+		return True
+	
 	def PrintVersion(self):
 		return True
 			 			 
--- a/sbsv2/raptor/test/unit_suite/raptor_meta_unit.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/unit_suite/raptor_meta_unit.py	Fri Jun 04 13:09:28 2010 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -494,15 +494,21 @@
 				self.assertTrue(testOptions.has_key(testParameter))
 				self.assertEquals(testOptions.get(testParameter), aTestParameters.get(testParameter))
 
+
 	def testBldInfExtensions(self):
 		bldInfTestRoot = self.__testRoot.Append('metadata/project/bld.infs')
 		bldInfMakefilePathTestRoot = str(self.__makefilePathTestRoot)+'/metadata/project/bld.infs'			
+		if 'SRCROOT' in os.environ:
+			srcroot = os.environ['SRCROOT']
+		else:
+			srcroot = os.environ['SRCROOT'] = "x:/somesrcroot"
+		
 		depfiles = []
 		bldInfObject = raptor_meta.BldInfFile(bldInfTestRoot.Append('extensions.inf'),
 											  self.__gnucpp, depfiles=depfiles, log=self.raptor)
 		
 		extensions = bldInfObject.getExtensions(self.ARMV5)
-		
+				
 		self.__testExtension(extensions[0],
 							'test/dummyextension1.mk',
 							{'TARGET':'dummyoutput1.exe',
@@ -511,7 +517,7 @@
 							'TOOL':'dummytool1.exe',
 							'OPTION11':'option11value',
 							'OPTION12':'$(MAKE_VAR)',
-							'STDVAR_TO_ROOT':"",
+							'STDVAR_TO_ROOT':srcroot,
 							'STDVAR_TO_BLDINF':bldInfMakefilePathTestRoot,
 							'STDVAR_EXTENSION_ROOT':bldInfMakefilePathTestRoot}		
 							)
@@ -524,7 +530,7 @@
 							'TOOL':'dummytool2.exe',
 							'OPTION21':'option21value',
 							'OPTION22':'$(MAKE_VAR)',
-							'STDVAR_TO_ROOT':"",
+							'STDVAR_TO_ROOT':srcroot,
 							'STDVAR_TO_BLDINF':bldInfMakefilePathTestRoot,
 							'STDVAR_EXTENSION_ROOT':bldInfMakefilePathTestRoot}
 							)
@@ -537,7 +543,7 @@
 							'TOOL':'dummytool3.exe',
 							'OPTION31':'option31value',
 							'OPTION32':'$(MAKE_VAR)',
-							'STDVAR_TO_ROOT':"",
+							'STDVAR_TO_ROOT':srcroot,
 							'STDVAR_TO_BLDINF':bldInfMakefilePathTestRoot,
 							'STDVAR_EXTENSION_ROOT':bldInfMakefilePathTestRoot}
 							)
@@ -552,7 +558,7 @@
 							'TOOL':'dummytesttool1.exe',
 							'OPTIONTEST11':'optiontest11value',
 							'OPTIONTEST12':'$(MAKE_VAR)',
-							'STDVAR_TO_ROOT':"",
+							'STDVAR_TO_ROOT':srcroot,
 							'STDVAR_TO_BLDINF':bldInfMakefilePathTestRoot,
 							'STDVAR_EXTENSION_ROOT':bldInfMakefilePathTestRoot}		
 							)
@@ -565,11 +571,53 @@
 							'TOOL':'dummytesttool2.exe',
 							'OPTIONTEST21':'optiontest21value',
 							'OPTIONTEST22':'$(MAKE_VAR)',
-							'STDVAR_TO_ROOT':"",
+							'STDVAR_TO_ROOT':srcroot,
 							'STDVAR_TO_BLDINF':bldInfMakefilePathTestRoot,
 							'STDVAR_EXTENSION_ROOT':bldInfMakefilePathTestRoot}		
 							)
+	
+	def testBadBldInfs(self):
+		bldInfTestRoot = self.__testRoot.Append('metadata/project/bld.infs')
+		depfiles=[]
 		
+		class BadBldInfLogger(object):
+			"mock logger to capture Error messages from the parser."
+			
+			def __init__(self):
+				self.errors = []
+				self.debugOutput = False
+				
+			def Error(self, format, *extras, **attributes):
+				self.errors.append( ((format % extras), attributes) )
+		
+			def Debug(self, format, *extras, **attributes):
+				pass
+				
+		logger = BadBldInfLogger()
+		
+		# this bld.inf has END lines with no matching START
+		bldInfObject = raptor_meta.BldInfFile(bldInfTestRoot.Append('bad_lone_end.inf'),
+											  self.__gnucpp, depfiles=depfiles, 
+											  log=logger)
+		
+		# the PRJ_EXTENSIONS section is bad for ARMV5
+		extensions = bldInfObject.getExtensions(self.ARMV5)
+		#
+		self.assertEquals(len(logger.errors), 1)
+		err = logger.errors[0]
+		self.assertEquals(err[0], "unmatched END statement in PRJ_EXTENSIONS section")
+		self.assertTrue("bldinf" in err[1])
+		self.assertTrue(err[1]["bldinf"].endswith("bad_lone_end.inf"))
+		
+		# the PRJ_TESTEXTENSIONS section is bad for WINSCW
+		testextensions = bldInfObject.getTestExtensions(self.WINSCW)
+		#
+		self.assertEquals(len(logger.errors), 2)
+		err = logger.errors[1]
+		self.assertEquals(err[0], "unmatched END statement in PRJ_TESTEXTENSIONS section")
+		self.assertTrue("bldinf" in err[1])
+		self.assertTrue(err[1]["bldinf"].endswith("bad_lone_end.inf"))
+			
 	def testBldInfIncludes(self):
 		bldInfTestRoot = self.__testRoot.Append('metadata/project/bld.infs/includes')
 		depfiles=[]
--- a/sbsv2/raptor/test/unit_suite/raptor_xml_unit.py	Tue May 18 19:36:14 2010 +0100
+++ b/sbsv2/raptor/test/unit_suite/raptor_xml_unit.py	Fri Jun 04 13:09:28 2010 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -17,15 +17,34 @@
 #
 
 import os
+import generic_path
 import raptor
-import generic_path
 import raptor_xml
 import unittest
 
 class TestRaptorXML(unittest.TestCase):
+		
+	class Logger(object):
+		# Basic custom logger class to store errors (and only errors) for test checks
+
+		def __init__(self):	
+			self.errors = []
+					
+		def Error(self, format, *extras, **attributes):
+			self.errors.append(format % extras)
+
+		def Info(self, format, *extras, **attributes):
+			return
+			
+		def InfoDiscovery(self, object_type, count):
+			return
+		
+		def Clear(self):
+			del self.errors[:]
+			
 	
 	def setUp(self):
-		self.__logger = raptor.Raptor()
+		self.__logger = TestRaptorXML.Logger()
 		self.__nullSysDefRoot = generic_path.Path("smoke_suite/test_resources")
 		self.__sysDefRoot = generic_path.Join(os.environ[raptor.env],"test/smoke_suite/test_resources")
 		self.__sysDefFileRoot = generic_path.Join(os.environ[raptor.env], "test/metadata/system")
@@ -64,8 +83,11 @@
 		systemModel = raptor_xml.SystemModel(self.__logger, generic_path.Join(self.__sysDefFileRoot, "system_definition_3.0.0.xml"), self.__sysDefRoot)
 		self.__compareFileLists([], systemModel.GetAllComponents())
 				
-		
+		self.__logger.Clear()
 		systemModel = raptor_xml.SystemModel(self.__logger, generic_path.Join(self.__sysDefFileRoot, "system_definition_multi_layers.xml"), self.__sysDefRoot)
+		self.assertTrue(len(self.__logger.errors) == 0)
+
+		# Confirm components returned from layers are correct
 
 		expectedBldInfs = [ generic_path.Join(self.__sysDefRoot, "simple/bld.inf"),\
 							generic_path.Join(self.__sysDefRoot, "simple_dll/bld.inf"),\
@@ -74,7 +96,8 @@
 						    generic_path.Join(self.__sysDefRoot, "simple_implib/bld.inf"),\
 						    generic_path.Join(self.__sysDefRoot, "simple_lib/bld.inf"),\
 						    generic_path.Join(self.__sysDefRoot, "simple_stringtable/bld.inf"),\
-						    generic_path.Join(self.__sysDefRoot, "simple_test/bld.inf")]
+						    generic_path.Join(self.__sysDefRoot, "simple_test/bld.inf"),\
+						    generic_path.Join(self.__sysDefRoot, "simple_plugin/bld.inf")]
 		self.__compareFileLists(expectedBldInfs, systemModel.GetAllComponents())
 	
 		expectedBldInfs = [ generic_path.Join(self.__sysDefRoot, "simple_export/bld.inf"),\
@@ -85,6 +108,23 @@
 				
 		self.__compareFileLists([], systemModel.GetLayerComponents("Sixth Layer"))
 		
+		# Check that the overall "buildability" of layers is returned correctly
+		# Note that a layer is still buildable if some bld.infs in it are missing as long as at least 1 exists
+		# However, errors should always be generated for missing bld.infs when a layer is checked
+		
+		self.assertTrue(systemModel.IsLayerBuildable("First Layer"))		
+		self.assertFalse(systemModel.IsLayerBuildable("Sixth Layer"))
+		
+		self.__logger.Clear()
+		self.assertTrue(systemModel.IsLayerBuildable("Seventh Layer"))
+		self.assertTrue(len(self.__logger.errors) == 1)
+		sbsHome = os.environ["SBS_HOME"]
+		sysDefPath = sbsHome + "/test/metadata/system/system_definition_multi_layers.xml"
+		sysDefPath = sysDefPath.replace("\\","/")
+		bldInfPath = sbsHome + "/test/smoke_suite/test_resources/does_not_existbld.inf"
+		bldInfPath = bldInfPath.replace("\\","/")
+		self.assertEquals(self.__logger.errors[0],
+		  ("System Definition layer \"Seventh Layer\" from system definition file \"%s\" refers to non existent bld.inf file %s" % (sysDefPath, bldInfPath)))
 				
 		# Probably redundant, but return local environment (at least its dictionary) to pre-test state
 		os.environ["SOURCEROOT"] = sourceroot