## diff generated by diff_upstream.pl
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/bintools/checklib/library/library.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/bintools/checklib/library/library.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/bintools/checklib/library/library.cpp	2010-05-18 19:32:28.556848151 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/bintools/checklib/library/library.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -25,6 +25,7 @@
 #include <iostream>
 #include <iomanip>
 #include <cstdlib>
+#include <cstring>
 
 namespace
 {
@@ -52,7 +53,7 @@
     m_mem_p = new char[size];
 
     file.seekg(0, std::ios::beg);
-    file.read( const_cast<char*>(m_mem_p), size );
+	file.read(m_mem_p, size );
 
     file.close();
 
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/bintools/checklib/library/library.h /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/bintools/checklib/library/library.h
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/bintools/checklib/library/library.h	2010-05-18 19:32:28.556848151 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/bintools/checklib/library/library.h	2010-05-15 14:32:45.000000000 +0100
@@ -39,11 +39,12 @@
     const char* _eat_obj_header(const char*, const char*, unsigned long*, const char* = 0) const;
 
 private:
-    const char* m_mem_p;
+	char * m_mem_p;
 
     const char* m_first_p;
     const char* m_last_p;
 
+
     mutable std::vector<const char*> m_symbols;
     mutable std::vector< std::pair<const char*, const char*> > m_objects;
 };
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/bintools/checklib/main.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/bintools/checklib/main.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/bintools/checklib/main.cpp	2010-05-18 19:32:28.556848151 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/bintools/checklib/main.cpp	2010-05-15 16:32:57.000000000 +0100
@@ -22,6 +22,8 @@
 #include <sstream>
 #include <iostream>
 #include <stdexcept>
+#include <cstring>
+#include <cstdlib>
 
 
 const char SELF_NAME[] = "checklib";
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/bintools/checklib/object/coff_object.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/bintools/checklib/object/coff_object.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/bintools/checklib/object/coff_object.cpp	2010-05-18 19:32:28.560848450 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/bintools/checklib/object/coff_object.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -21,6 +21,7 @@
 
 #include <algorithm>
 #include <functional>
+#include <cstring>
 
 Coff_object::Coff_object(const char* p1, const char* p2)
 {
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/bintools/checklib/object/elf_object.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/bintools/checklib/object/elf_object.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/bintools/checklib/object/elf_object.cpp	2010-05-18 19:32:28.564848819 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/bintools/checklib/object/elf_object.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -22,6 +22,7 @@
 
 #include <algorithm>
 #include <functional>
+#include <cstring>
 
 Elf_object::Elf_object(const char* p1, const char* p2)
 {
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/bintools/rcomp/src/localise.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/bintools/rcomp/src/localise.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/bintools/rcomp/src/localise.cpp	2010-05-18 19:32:28.596848698 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/bintools/rcomp/src/localise.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -27,9 +27,11 @@
 #pragma warning( disable : 4530 )	// function not inlined.
 #endif
 
-#include <stdio.h>   
+#include <cstdio>
 #include <iostream>
 #include "ERRORHAN.H"
+#include <cstring>
+#include <cstdlib>
 
 #if defined(__MSVCDOTNET__) || defined(__TOOLS2__)
 using std::ifstream;
@@ -1787,8 +1789,16 @@
 	const char * fileName = SourceFileName.GetAssertedNonEmptyBuffer();
 	ifstream iFile(fileName);
 
+#ifdef __LINUX__
+	char LocalisationOutputFileName[sizeof("/tmp/rcomp_temp_XXXXXX")];
+	strcpy(LocalisationOutputFileName,"/tmp/rcomp_temp_XXXXXX");
+	int fd = mkstemp(LocalisationOutputFileName); close(fd);
+#endif
+#ifdef WIN32
 	char * LocalisationOutputFileName;
 	LocalisationOutputFileName = tmpnam(NULL);
+#endif
+
 	ofstream outputFile(LocalisationOutputFileName);
 
 	String fileLine("");
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/bintools/rcomp/src/rcomp.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/bintools/rcomp/src/rcomp.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/bintools/rcomp/src/rcomp.cpp	2010-05-18 19:32:28.600848647 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/bintools/rcomp/src/rcomp.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -90,8 +90,8 @@
 #pragma warning( disable : 4244 ) // C4244: '=' : conversion from 'int' to 'short', possible loss of data
 #endif //__VC32__
 
-#include "resource.h"
-#include "parser.h"
+#include "RESOURCE.H"
+#include "Parser.h"
 
 int yylex();
 void yyerror(const char* string, ...);
@@ -100,14 +100,14 @@
 extern int yylineno;
 
 #include "rcomp.hpp"
-#include "datatype.h"
-#include "mem.h"
-#include "rcbinstr.h"
-#include "rcscan.h"
-#include "errorhan.h"
-#include "fileacc.h"
-#include "version.h"
-#include "ctable.h"
+#include "DATATYPE.H"
+#include "MEM.H"
+#include "RCBINSTR.H"
+#include "RCSCAN.H"
+#include "ERRORHAN.H"
+#include "FILEACC.H"
+#include "VERSION.H"
+#include "CTABLE.H"
 #include "localise.h"
 #include "main.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/bintools/rcomp/src/rcompl.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/bintools/rcomp/src/rcompl.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/bintools/rcomp/src/rcompl.cpp	2010-05-18 19:32:28.600848647 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/bintools/rcomp/src/rcompl.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -662,8 +662,8 @@
 #include <limits.h>
 #include <string.h>
 #include "main.h"
-#include "structst.h"
-#include "parser.h"
+#include "STRUCTST.H"
+#include "Parser.h"
 #include "localise.h"
 
 #define YY_SKIP_YYWRAP 1
@@ -696,7 +696,7 @@
 }
 
 #include "rcomp.hpp"
-#include "fileline.h"
+#include "FILELINE.H"
 
 #define VALUE_LEN   (1024*8)	// must match sizeof(YYSTYPE.Value)
 char buf[VALUE_LEN];
@@ -734,7 +734,7 @@
 #pragma warning( disable : 4505 )
 #endif //__VC32__
 
-#include "errorhan.h"
+#include "ERRORHAN.H"
 
 #define REGISTER_LINE	ErrorHandler::Register(pFileLineHandler->GetCurrentFile(), pFileLineHandler->GetErrorLine(* pCurrentLineNumber))
 
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/bintools/rcomp/src/RCOMP.LEX /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/bintools/rcomp/src/RCOMP.LEX
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/bintools/rcomp/src/RCOMP.LEX	2010-05-18 19:32:28.592848398 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/bintools/rcomp/src/RCOMP.LEX	2010-05-15 14:32:45.000000000 +0100
@@ -20,9 +20,9 @@
 #include <limits.h>
 #include <string.h>
 #include "main.h"
-#include "structst.h"
-#include "parser.h"
-#include "localise.h"
+#include "STRUCTST.H"
+#include "PARSER.H"
+#include "LOCALISE.H"
 
 #define YY_SKIP_YYWRAP 1
 #define YY_NEVER_INTERACTIVE 1
@@ -92,7 +92,7 @@
 #pragma warning( disable : 4505 )
 #endif //__VC32__
 
-#include "errorhan.h"
+#include "ERRORHAN.H"
 
 #define REGISTER_LINE	ErrorHandler::Register(pFileLineHandler->GetCurrentFile(), pFileLineHandler->GetErrorLine(* pCurrentLineNumber))
 
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/bintools/rcomp/src/RCOMP.YACC /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/bintools/rcomp/src/RCOMP.YACC
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/bintools/rcomp/src/RCOMP.YACC	2010-05-18 19:32:28.596848698 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/bintools/rcomp/src/RCOMP.YACC	2010-05-15 14:32:45.000000000 +0100
@@ -35,8 +35,8 @@
 #pragma warning( disable : 4244 ) // C4244: '=' : conversion from 'int' to 'short', possible loss of data
 #endif //__VC32__
 
-#include "resource.h"
-#include "parser.h"
+#include "RESOURCE.H"
+#include "PARSER.H"
 
 int yylex();
 void yyerror(const char* string, ...);
@@ -45,14 +45,14 @@
 extern int yylineno;
 
 #include "rcomp.hpp"
-#include "datatype.h"
-#include "mem.h"
-#include "rcbinstr.h"
-#include "rcscan.h"
-#include "errorhan.h"
-#include "fileacc.h"
-#include "version.h"
-#include "ctable.h"
+#include "DATATYPE.H"
+#include "MEM.H"
+#include "RCBINSTR.H"
+#include "RSCAN.H"
+#include "ERRORHAN.H"
+#include "FILEACC.H"
+#include "VERSION.H"
+#include "CTABLE.H"
 #include "localise.h"
 #include "main.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/buildtoolguides/romtoolsguide/group/bld.inf /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/buildtoolguides/romtoolsguide/group/bld.inf
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/buildtoolguides/romtoolsguide/group/bld.inf	2010-05-18 19:32:30.861348504 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/buildtoolguides/romtoolsguide/group/bld.inf	2010-05-08 15:41:44.000000000 +0100
@@ -1,3 +1,3 @@
 
 PRJ_EXPORTS
-../com.nokia.rombuild_0.1.jar /plugins/com.nokia.rombuild_0.1.jar
\ No newline at end of file
+../com.nokia.rombuild_0.1.jar ../../plugins/com.nokia.rombuild_0.1.jar 
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/buildtoolguides/sbsv2guide/group/bld.inf /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/buildtoolguides/sbsv2guide/group/bld.inf
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/buildtoolguides/sbsv2guide/group/bld.inf	2010-05-18 19:32:30.861348504 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/buildtoolguides/sbsv2guide/group/bld.inf	2010-05-08 15:42:04.000000000 +0100
@@ -1,3 +1,3 @@
 
 PRJ_EXPORTS
-../com.nokia.sysbuild_0.1.jar /plugins/com.nokia.sysbuild_0.1.jar
\ No newline at end of file
+../com.nokia.sysbuild_0.1.jar ../../plugins/com.nokia.sysbuild_0.1.jar
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/e32lib/e32image/deflate/deflate.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/e32lib/e32image/deflate/deflate.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/e32tools/e32lib/e32image/deflate/deflate.cpp	2010-05-18 19:32:30.865349012 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/e32lib/e32image/deflate/deflate.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -87,7 +87,7 @@
 
 inline HDeflateHash* HDeflateHash::NewLC(TInt aLinks)
 	{
-	return new(HMem::Alloc(0,_FOFF(HDeflateHash,iOffset[Min(aLinks,KDeflateMaxDistance)]))) HDeflateHash;
+	return new(HMem::Alloc(0,_FOFF(HDeflateHash,iOffset[0]) + (sizeof(TOffset) * Min(aLinks,KDeflateMaxDistance)))) HDeflateHash;
 	}
 
 inline TInt HDeflateHash::Hash(const TUint8* aPtr)
Only in /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/e32tools/e32lib/e32image: Makefile.elftran.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/e32tools/e32lib/group/seclib.mmp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/e32lib/group/seclib.mmp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/e32tools/e32lib/group/seclib.mmp	2010-05-18 19:32:30.869349032 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/e32lib/group/seclib.mmp	2010-05-15 14:32:45.000000000 +0100
@@ -45,8 +45,11 @@
 userinclude     ../setcap 
 userinclude     ../../e32lib/e32image/inc
 systeminclude   /epoc32/include
+systeminclude    /epoc32/include/platform
 
 OPTION          GCC -w
+option 	GCC -w
+
 
 //macro __PLACEMENT_NEW_INLINE
 //macro __PLACEMENT_VEC_NEW_INLINE
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/group/elf2e32.mmp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/group/elf2e32.mmp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/e32tools/elf2e32/group/elf2e32.mmp	2010-05-18 19:32:30.873348842 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/group/elf2e32.mmp	2010-05-15 14:32:45.000000000 +0100
@@ -28,7 +28,9 @@
 source	 	byte_pair.cpp  pagedcompress.cpp checksum.cpp stdexe_target.cpp
 
 systeminclude    /epoc32/include  /epoc32/include/tools  
+systeminclude    /epoc32/include/platform
 userinclude		../source ../include
+userinclude ../../../bintools/elftools/inc
 
 option 	GCC -w
 
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/deffile.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/deffile.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/e32tools/elf2e32/source/deffile.cpp	2010-05-18 19:32:30.873348842 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/deffile.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -18,9 +18,11 @@
 //
 
 //
-#include <stdio.h>
+#include <cstdio>
+#include <cstring>
 #include <iostream>
-#include <stdlib.h>
+#include <cstdlib>
+
 
 #include "pl_symbol.h"
 #include "deffile.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/e32tools/elf2e32/source/deflatecompress.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/deflatecompress.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/e32tools/elf2e32/source/deflatecompress.cpp	2010-05-18 19:32:30.873348842 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/deflatecompress.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -126,7 +126,8 @@
 inline HDeflateHash* HDeflateHash::NewLC(TInt aLinks)
 {
 	//return new(HMem::Alloc(0,_FOFF(HDeflateHash,iOffset[Min(aLinks,KDeflateMaxDistance)]))) HDeflateHash;
-	return new(new char[_FOFF(HDeflateHash,iOffset[Min(aLinks,KDeflateMaxDistance)])]) HDeflateHash;
+	return new(new char[_FOFF(HDeflateHash,iOffset[0]) + 
+		(sizeof(TOffset) * Min(aLinks,KDeflateMaxDistance))]) HDeflateHash;
 }
 
 /**
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/e32exporttable.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/e32exporttable.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/e32tools/elf2e32/source/e32exporttable.cpp	2010-05-18 19:32:30.877348862 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/e32exporttable.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -18,6 +18,7 @@
 #include "pl_elfexports.h"
 #include "pl_dllsymbol.h"
 #include "pl_elflocalrelocation.h"
+#include <cstring>
 
 /**
 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
@@ -21,6 +21,7 @@
 
 // get E32ImageHeader class...
 #define INCLUDE_E32IMAGEHEADER_IMPLEMENTATION
+#include <cstdio>
 #define RETURN_FAILURE(_r) return (fprintf(stderr, "line %d\n", __LINE__),_r)
 //#define E32IMAGEHEADER_TRACE(_t) printf _t
 #include "e32imagefile.h"
@@ -40,11 +41,9 @@
 #include <iostream>
 #ifndef __LINUX__ 
     #include <io.h>
-#else
-    #include <time.h>
 #endif 
-#include <time.h>
-#include <stdio.h>
+#include <ctime>
+
 
 using namespace std;
 
@@ -365,7 +364,7 @@
 	iImportSectionSize = aTotalSize;
 	iImportSection = (uint32 *)new char[aTotalSize];
 	memset(iImportSection, 0, aTotalSize);
-	memcpy(iImportSection, aImportSection.begin(), aImportSectionSize);
+	memcpy(iImportSection, &*aImportSection.begin(), aImportSectionSize);
 	char * strTab = ((char *)iImportSection) + aImportSectionSize;
 	memcpy(strTab, aStrTab.data(), aStrTab.size());
 
@@ -1922,7 +1921,7 @@
 	memcpy(aInfo, (void*)&aSymInf, sizeof(aSymInf));
 
 	TUint aPos = aSymInf.iSymbolTblOffset;
-	memcpy(aInfo+aPos, iSymAddrTab.begin(), iSymAddrTab.size()*sizeof(uint32));
+	memcpy(aInfo+aPos, &*iSymAddrTab.begin(), iSymAddrTab.size()*sizeof(uint32));
 
 	aPos += iSymAddrTab.size()*aSizeofNames;
 	aPos += iSymNameOffTab.size()*aSizeofNames;
@@ -1933,13 +1932,13 @@
 	if(aSymInf.iFlags & 1)
 		aOffLen=4;
 	while(Iter != iSymNameOffTab.end()){
-		memcpy( ((void*)(aInfo+aPos)), ((void*)Iter), aOffLen);
+		memcpy( ((void*)(aInfo+aPos)), &*Iter, aOffLen);
 		aPos += aOffLen;
 		Iter++;
 	}
 
 	aPos = aSymInf.iStringTableOffset;
-	memcpy(aInfo+aPos, iSymbolNames.begin(), iSymbolNames.size());
+	memcpy(aInfo+aPos, &*iSymbolNames.begin(), iSymbolNames.size());
 
 	// At the end, the dependencies are listed. They remain zeroes and shall be fixed up
 	// while relocating.
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/elffilesupplied.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/elffilesupplied.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/e32tools/elf2e32/source/elffilesupplied.cpp	2010-05-18 19:32:30.877348862 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/elffilesupplied.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -25,7 +25,15 @@
 
 #include <algorithm>
 #include <iostream>
-#include<hash_set>
+#if __GNUC__ < 4
+    #include <ext/hash_set>
+    #define SET_TYPE __gnu_cxx::hash_set
+    #define HASH_FUN __gnu_cxx::hash
+#else    
+    #include <unordered_set>
+    #define SET_TYPE std::unordered_set
+    #define HASH_FUN std::hash
+#endif
 
 using namespace std;
 
@@ -638,7 +646,7 @@
 */ 
 int ElfFileSupplied::UnWantedSymbolp(const char * aSymbol)
 {
-  static hash_set<const char*, hash<const char*>, eqstr> aSymbolSet;
+  static SET_TYPE<const char*, HASH_FUN<const char*>, eqstr> aSymbolSet;
   int symbollistsize=sizeof(Unwantedruntimesymbols)/sizeof(Unwantedruntimesymbols[0]);
   static bool FLAG=false;
   while(!FLAG)
@@ -649,7 +657,7 @@
 	}
 	FLAG=true;
   }
-  hash_set<const char*, hash<const char*>, eqstr>::const_iterator it
+  SET_TYPE<const char*, HASH_FUN<const char*>, eqstr>::const_iterator it
     = aSymbolSet.find(aSymbol);
   if(it != aSymbolSet.end())
 	return 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/e32tools/elf2e32/source/errorhandler.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/errorhandler.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/e32tools/elf2e32/source/errorhandler.cpp	2010-05-18 19:32:30.881348532 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/errorhandler.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -26,7 +26,9 @@
 #include "errorhandler.h"
 #include "messagehandler.h"
 #include <iostream>
-#include <stdio.h>
+#include <cstdio>
+#include <cstring>
+
 using std::cerr;
 using std::endl;
 
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/huffman.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/huffman.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/e32tools/elf2e32/source/huffman.cpp	2010-05-18 19:32:30.885348692 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/huffman.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -22,6 +22,7 @@
 #endif
 
 #include <cassert>
+#include <cstring>
 #include "huffman.h"
 #include "errorhandler.h"
 #include "farray.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/e32tools/elf2e32/source/h_utl.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/h_utl.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/e32tools/elf2e32/source/h_utl.cpp	2010-05-18 19:32:30.885348692 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/h_utl.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -17,8 +17,9 @@
 // 
 //
 
-#include <stdlib.h>
-#include <stdio.h>
+#include <cstdlib>
+#include <cstdio>
+#include <cstring>
 #include "h_utl.h"
 
 /**
Only in /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/e32tools/elf2e32/source: h_utl.h.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/e32tools/elf2e32/source/inflate.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/inflate.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/e32tools/elf2e32/source/inflate.cpp	2010-05-18 19:32:30.885348692 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/inflate.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -23,6 +23,8 @@
 #include "farray.h"
 #include "errorhandler.h"
 #include<iostream>
+#include <cstring>
+
 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/librarytarget.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/librarytarget.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/e32tools/elf2e32/source/librarytarget.cpp	2010-05-18 19:32:30.885348692 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/librarytarget.cpp	2010-05-15 16:38:11.000000000 +0100
@@ -21,6 +21,7 @@
 #include "pl_dso_handler.h"
 #include "deffile.h"
 #include <iostream>
+#include <cstdlib>
 
 /**
 Constructor for the Library 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/messageimplementation.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/messageimplementation.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/e32tools/elf2e32/source/messageimplementation.cpp	2010-05-18 19:32:30.889348502 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/messageimplementation.cpp	2010-05-15 16:37:05.000000000 +0100
@@ -23,7 +23,9 @@
 #include<iostream>
 #include<stdarg.h>
 #include<string>
-#include <stdio.h>
+#include <cstring>
+#include <cstdlib>
+
 
 using std::endl;
 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
@@ -25,6 +25,7 @@
 #include "parametermanager.h"
 #include "errorhandler.h"
 #include <iostream>
+#include <cstdlib>
 
 #include "h_utl.h"
 #include "h_ver.h"
@@ -647,7 +648,7 @@
 			parser(this, "help", 0, 0);
 		}
 
-		parser(this, const_cast<char*>(aName.c_str()), optval, aDesc);
+		parser(this, aName.c_str(), optval, aDesc);
 	}
 }
 
@@ -2247,7 +2248,7 @@
 		{
 			int len = nq;
 			symbol = new char[len+1];
-			memcpy(symbol, p, len);
+			memcpy(symbol, &*p, len);
 			symbol[len] = 0;
 			q = nq+1;
 
@@ -2387,7 +2388,7 @@
 			if (*e == '-' || *e == '+') break;
 		}
 		if (e != b)
-			ParseCapability1(b, e, aCapabilities, invert);
+			ParseCapability1(&*b, &*e, aCapabilities, invert);
 
 		b = e;
 		
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
@@ -81,7 +81,7 @@
 	typedef std::map<string, const OptionDesc *, OptionCompare> OptionMap;
 	typedef vector<char *> LibSearchPaths;
 
-	typedef void (*ParserFn)(ParameterManager *, char *, char *, const OptionDesc *);
+	typedef void (*ParserFn)(ParameterManager *, char const *, char const *, const OptionDesc *);
 
 
 	#define DECLARE_PARAM_PARSER(name) \
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/pl_elfexecutable.h /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/pl_elfexecutable.h
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/e32tools/elf2e32/source/pl_elfexecutable.h	2010-05-18 19:32:30.893348941 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/pl_elfexecutable.h	2010-05-15 14:32:45.000000000 +0100
@@ -22,13 +22,19 @@
 
 #include "pl_common.h"
 #include <list>
-#include <hash_map>
+#if __GNUC__ < 4
+    #include <ext/hash_map>
+    #define MAP_TYPE __gnu_cxx::hash_map
+#else
+    #include <unordered_map>
+    #define MAP_TYPE std::unordered_map
+#endif    
 #include "pl_elfimports.h"
 #include "pl_elfrelocations.h"
 #include "pl_elfexports.h"
 
 using std::list;
-using std::hash_map;
+using MAP_TYPE;
 
 class DllSymbol;
 class Symbol;
@@ -122,7 +128,7 @@
 	 * The dynamic symbol array.
 	 */
 	Elf32_Sym		*iElfDynSym;//The ELF symbol
-	hash_map<PLUINT32, DllSymbol*>	iSymbolTable; //The representation
+	MAP_TYPE<PLUINT32, DllSymbol*>	iSymbolTable; //The representation
 
 	/**
 	 * The static symbol table.
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/pl_elfexports.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/pl_elfexports.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/e32tools/elf2e32/source/pl_elfexports.cpp	2010-05-18 19:32:30.893348941 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/pl_elfexports.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -20,6 +20,7 @@
 #include "pl_elfexports.h"
 #include "pl_elfexecutable.h"
 #include "pl_dllsymbol.h"
+#include <cstring>
 
 using std::set_difference;
 
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/pl_elfimports.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/pl_elfimports.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/e32tools/elf2e32/source/pl_elfimports.cpp	2010-05-18 19:32:30.893348941 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/pl_elfimports.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -19,6 +19,7 @@
 
 #include "pl_elfimports.h"
 #include "pl_elfimportrelocation.h"
+#include <cstring>
 
 /**
 Constructor for class ElfImports
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/pl_elfproducer.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/pl_elfproducer.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/e32tools/elf2e32/source/pl_elfproducer.cpp	2010-05-18 19:32:30.897348961 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/pl_elfproducer.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -22,6 +22,7 @@
 #include <stdio.h>
 #include <string>
 #include "errorhandler.h"
+#include <cstring>
 
 /**
  * Following array is indexed on the SECTION_INDEX enum 
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/pl_symbol.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/pl_symbol.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/e32tools/elf2e32/source/pl_symbol.cpp	2010-05-18 19:32:30.897348961 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/e32tools/elf2e32/source/pl_symbol.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -18,6 +18,7 @@
 //
 
 #include "pl_symbol.h"
+#include <cstring>
 
 
 /**
Only in /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/buildrom/tools: cdf.dtd.bak
Only in /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/buildrom/tools: featuredatabase.dtd.bak
Only in /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/buildrom/tools: featureuids.dtd.bak
Only in /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/buildrom/tools: imageContent.dtd.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/imgtools/imgcheck/group/bld.inf /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imgcheck/group/bld.inf
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imgcheck/group/bld.inf	2010-05-18 19:32:30.933348649 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imgcheck/group/bld.inf	2010-05-15 14:32:45.000000000 +0100
@@ -21,8 +21,10 @@
 
 // These libraries needs to be exported
 PRJ_EXPORTS
+#ifndef TOOLS2_LINUX
 ../libxml/lib/libxml2.a			/epoc32/release/tools2/rel/libxml2.a
 ../libxml/lib/libxml2.a			/epoc32/release/tools2/deb/libxml2.a
+#endif
 ../src/imgcheck.xsl			/epoc32/tools/imgcheck.xsl
 ./imgcheck.pl				/epoc32/tools/imgcheck.pl
 ./imgcheck.cmd				/epoc32/tools/imgcheck.cmd
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/imgtools/imgcheck/group/imgcheck.mmp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imgcheck/group/imgcheck.mmp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imgcheck/group/imgcheck.mmp	2010-05-18 19:32:30.937348738 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imgcheck/group/imgcheck.mmp	2010-05-15 16:53:48.000000000 +0100
@@ -25,17 +25,24 @@
 SOURCE		exceptionimplementation.cpp exceptionreporter.cpp
 SOURCE 		cmdlinewriter.cpp xmlwriter.cpp dbgflagchecker.cpp
 USERINCLUDE ../libimgutils/inc ../inc ../../imglib/compress
+#ifndef TOOLS2_LINUX
 USERINCLUDE   ../../imglib/boostlibrary
+#endif
 
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+#ifndef TOOLS2_LINUX
 SYSTEMINCLUDE ../libxml ../ 
+#endif 
 
 SYSTEMINCLUDE ../../imglib/inc ../../romtools/rofsbuild
 
-STATICLIBRARY imgutils xml2 wsock32 stlport.5.1 patchdataprocessor
 #ifdef TOOLS2_LINUX
-STATICLIBRARY   boost_thread-mgw34-mt-1_39_linux
-OPTION    GCC -pthread -O2 -Wno-uninitialized
+STATICLIBRARY imgutils patchdataprocessor
+#else
+STATICLIBRARY imgutils xml2 wsock32 patchdataprocessor
+#endif
+#ifdef TOOLS2_LINUX
+OPTION    GCC -pthread -O2 -Wno-uninitialized -isystem /usr/include/libxml2 -lxml2 -lboost_thread-mt
 #else
 STATICLIBRARY   boost_thread-mgw34-mt-1_39_win32
 OPTION    GCC -mthreads -O2 -Wno-uninitialized
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/imgtools/imgcheck/inc/cmdlinehandler.h /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imgcheck/inc/cmdlinehandler.h
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imgcheck/inc/cmdlinehandler.h	2010-05-18 19:32:31.137348888 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imgcheck/inc/cmdlinehandler.h	2010-05-15 14:32:45.000000000 +0100
@@ -120,7 +120,7 @@
 @internalComponent
 @released
 */
-typedef enum Suppress
+enum Suppress
 {
     EDep = 0x1,
     ESid = 0x2,
@@ -136,7 +136,7 @@
 @internalComponent
 @released
 */
-typedef enum NumberOfValue
+enum NumberOfValue
 {
     ENone = 0x0,
     ESingle = 0x1,
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/imgtools/imgcheck/inc/common.h /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imgcheck/inc/common.h
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imgcheck/inc/common.h	2010-05-18 19:32:31.137348888 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imgcheck/inc/common.h	2010-05-15 14:32:45.000000000 +0100
@@ -86,7 +86,7 @@
 @internalComponent
 @released
 */
-typedef enum ReturnType
+enum ReturnType
 {
 	ESuccess = 0,
 	EQuit,
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/imgtools/imgcheck/inc/exceptionimplementation.h /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imgcheck/inc/exceptionimplementation.h
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imgcheck/inc/exceptionimplementation.h	2010-05-18 19:32:31.137348888 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imgcheck/inc/exceptionimplementation.h	2010-05-15 14:32:45.000000000 +0100
@@ -91,7 +91,7 @@
 struct Messages
 {
 	int iIndex;
-	char* iMessage;
+	char const * iMessage;
 };
 
 /**
@@ -110,7 +110,7 @@
 	void Report(const String aMsg);
 	
 private:
-	ofstream iLogStream;
+	Ofstream iLogStream;
 	IndexVsMessageMap iMessage;
 	unsigned int iMsgIndex;
 	static unsigned int iCmdFlag;
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/imgtools/imgcheck/inc/xmlwriter.h /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imgcheck/inc/xmlwriter.h
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imgcheck/inc/xmlwriter.h	2010-05-18 19:32:31.200886150 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imgcheck/inc/xmlwriter.h	2010-05-15 14:32:45.000000000 +0100
@@ -24,7 +24,12 @@
 #define XMLWRITER_H
 
 #include "reportwriter.h"
-#include "libxml/xmlwriter.h"
+#if defined(__LINUX__)
+	#include <libxml/xmlwriter.h>
+#endif
+#if defined(WIN32)
+	#include "libxml/xmlwriter.h"
+#endif
 #include "common.h"
 
 /**
@@ -107,7 +112,7 @@
 
 private:
 	// File stream for xml output.
-	ofstream iXmlFile;
+	Ofstream iXmlFile;
 	// Xml file name for output.
 	const String iXmlFileName;
 	// Xml Buffer pointer.
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/imgtools/imgcheck/libimgutils/inc/romfsentry.h /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imgcheck/libimgutils/inc/romfsentry.h
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imgcheck/libimgutils/inc/romfsentry.h	2010-05-18 19:32:31.208851687 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imgcheck/libimgutils/inc/romfsentry.h	2010-05-15 14:32:45.000000000 +0100
@@ -32,7 +32,7 @@
 class RomImageFSEntry 
 {
 public:
-	RomImageFSEntry (char* aName) 
+	RomImageFSEntry (char const* aName) 
 	: iName(aName), iSibling(0), iChildren(0)
 	{
 	}
@@ -117,7 +117,7 @@
 class RomImageDirEntry : public RomImageFSEntry
 {
 public:
-	RomImageDirEntry(char* aName) : RomImageFSEntry(aName)
+	RomImageDirEntry(char const* aName) : RomImageFSEntry(aName)
 	{
 	}
 	~RomImageDirEntry(void)
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/imgtools/imgcheck/libimgutils/inc/typedefs.h /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imgcheck/libimgutils/inc/typedefs.h
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imgcheck/libimgutils/inc/typedefs.h	2010-05-18 19:32:31.212851566 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imgcheck/libimgutils/inc/typedefs.h	2010-05-15 14:32:45.000000000 +0100
@@ -28,8 +28,8 @@
 
 #undef _L
 
-#include <fstream.h>
-#include <iostream.h>
+#include <fstream>
+#include <iostream>
 #include <list>
 #include <vector>
 #include <map>
@@ -53,10 +53,10 @@
 @internalComponent
 @released
 */
-typedef ios Ios;
+typedef std::ios Ios;
 typedef std::string String;
-typedef ofstream Ofstream;
-typedef ifstream Ifstream;
+typedef std::ofstream Ofstream;
+typedef std::ifstream Ifstream;
 typedef std::list<String> StringList;
 typedef std::map<unsigned int, String> UintVsString;
 typedef std::map<unsigned int, UintVsString> RomAddrVsExeName;
@@ -95,7 +95,7 @@
 @internalComponent
 @released
 */
-typedef enum EImageType
+enum EImageType
 {
 	EUnknownImage,
 	ERomImage,
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/imgtools/imgcheck/libimgutils/src/dirreader.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imgcheck/libimgutils/src/dirreader.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imgcheck/libimgutils/src/dirreader.cpp	2010-05-18 19:32:31.212851566 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imgcheck/libimgutils/src/dirreader.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -119,9 +119,9 @@
 void DirReader::ProcessImage()
 {
 	char* cwd = new char[MAXPATHLEN];
-	getcwd(cwd,MAXPATHLEN);
+	char *cp = getcwd(cwd,MAXPATHLEN); (void)cp;
 	ReadDir(iImgFileName);
-	chdir(cwd);
+	int i = chdir(cwd); (void)i;
 	if(cwd != NULL)
 		delete [] cwd;
 	cwd = 0;
@@ -139,8 +139,11 @@
 */
 void DirReader::ReadDir(String aPath)
 {
+#ifndef __LINUX__
 	int handle;
 	int retVal = 0; 
+#endif
+ 
 	E32Image* e32Image = KNull;
 
 #ifdef __LINUX__
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/imgtools/imgcheck/libimgutils/src/e32reader.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imgcheck/libimgutils/src/e32reader.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imgcheck/libimgutils/src/e32reader.cpp	2010-05-18 19:32:31.212851566 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imgcheck/libimgutils/src/e32reader.cpp	2010-05-15 16:45:25.000000000 +0100
@@ -24,6 +24,7 @@
 
 #include "e32reader.h"
 #include <f32image.h>
+#include <cstdlib>
 
 /** 
 Constructor.
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/imgtools/imgcheck/src/cmdlinehandler.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imgcheck/src/cmdlinehandler.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imgcheck/src/cmdlinehandler.cpp	2010-05-18 19:32:31.252848475 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imgcheck/src/cmdlinehandler.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -25,6 +25,7 @@
 */
 
 #include "cmdlinehandler.h"
+#include <cstring>
 
 /**
 Constructor initializes the iOptionMap with short and long option names as key and
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/imgtools/imgcheck/src/cmdlinewriter.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imgcheck/src/cmdlinewriter.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imgcheck/src/cmdlinewriter.cpp	2010-05-18 19:32:31.252848475 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imgcheck/src/cmdlinewriter.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -24,6 +24,7 @@
 */
 
 #include "cmdlinewriter.h"
+#include <cstring>
 
 /**
 Constructor: CmdLineWriter 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/imgtools/imgcheck/src/exceptionimplementation.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imgcheck/src/exceptionimplementation.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imgcheck/src/exceptionimplementation.cpp	2010-05-18 19:32:31.252848475 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imgcheck/src/exceptionimplementation.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -187,7 +187,7 @@
     
 	if(iCmdFlag & KVerbose)
 	{
-		cout << aMsg.c_str() << endl;
+		std::cout << aMsg.c_str() << std::endl;
 	}
 }
 
@@ -207,10 +207,10 @@
 	iLogStream <<  aMsg.c_str() << "\n";
 	if(aMsg.find("Success") != String::npos)
 	{
-		cout << aMsg.c_str() << endl;
+		std::cout << aMsg.c_str() << std::endl;
 	}
 	else
 	{
-		cerr << aMsg.c_str() << endl;
+		std::cerr << aMsg.c_str() << std::endl;
 	}
 }
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/imgtools/imgcheck/src/sidchecker.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imgcheck/src/sidchecker.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imgcheck/src/sidchecker.cpp	2010-05-18 19:32:31.256848494 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imgcheck/src/sidchecker.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -249,8 +249,8 @@
 	{
 		exeAtt->iAttStatus = KNull;
 	}
-	if((iAllExecutables 
-		|| (exeAtt->iAttStatus == KDuplicate)) && !exeAtt->iAttStatus.empty() 
+	if(((iAllExecutables 
+		|| (exeAtt->iAttStatus == KDuplicate)) && !exeAtt->iAttStatus.empty())
 		|| iNoCheck)
 	{
 		aExeContainer->iExeAttList.push_back(exeAtt);
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/imgtools/imgcheck/src/xmlwriter.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imgcheck/src/xmlwriter.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imgcheck/src/xmlwriter.cpp	2010-05-18 19:32:31.256848494 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imgcheck/src/xmlwriter.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -24,9 +24,10 @@
 */
 
 #include "xmlwriter.h"
+#include <cstring>
 
 #ifndef __LINUX__		
-	#include "/epoc32/gcc_mingw/include/windows.h"	
+    #include <windows.h>	
 #endif //__LINUX__
 
 /**
@@ -99,7 +100,7 @@
 	}
 	xslSourcePath.append(KXslFileName.c_str());
 
-	ifstream xslSourceHandle;
+	Ifstream xslSourceHandle;
 	xslSourceHandle.open(xslSourcePath.c_str(), Ios::binary);
 	if(!xslSourceHandle)
 	{
@@ -116,7 +117,7 @@
 	xslSourceHandle.read(filetocopy,fileSize);
 	xslSourceHandle.close();
 
-	ofstream xslDestHandle(xslDestPath.c_str(), Ios::binary | Ios::out);
+	Ofstream xslDestHandle(xslDestPath.c_str(), Ios::binary | Ios::out);
 	if(!xslDestHandle)
 	{
 		delete [] filetocopy;
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/imgtools/imglib/boostlibrary/boost/thread/pthread/thread_data.hpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/boostlibrary/boost/thread/pthread/thread_data.hpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imglib/boostlibrary/boost/thread/pthread/thread_data.hpp	2010-05-18 19:32:31.796848405 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/boostlibrary/boost/thread/pthread/thread_data.hpp	2010-05-15 14:32:45.000000000 +0100
@@ -8,7 +8,7 @@
 #include <boost/thread/detail/config.hpp>
 #include <boost/thread/exceptions.hpp>
 #include <boost/shared_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
+#include <boost/smart_ptr/enable_shared_from_this.hpp>
 #include <boost/thread/mutex.hpp>
 #include <boost/optional.hpp>
 #include <pthread.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/imgtools/imglib/e32image/deflate/deflate.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/e32image/deflate/deflate.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imglib/e32image/deflate/deflate.cpp	2010-05-18 19:32:31.844848499 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/e32image/deflate/deflate.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -20,6 +20,7 @@
 #include "deflate.h"
 #include "h_utl.h"
 #include "panic.h"
+#define OFFSETOF(c,f) (((TInt)&(((c *)0x1000)->f))-0x1000)
 
 class HDeflateHash
 	{
@@ -89,7 +90,8 @@
 
 inline HDeflateHash* HDeflateHash::NewLC(TInt aLinks)
 	{
-	return new(HMem::Alloc(0,_FOFF(HDeflateHash,iOffset[Min(aLinks,KDeflateMaxDistance)]))) HDeflateHash;
+	return new(new char[OFFSETOF(HDeflateHash,iOffset[0]) + 
+		(sizeof(TOffset) * Min(aLinks,KDeflateMaxDistance))]) HDeflateHash;
 	}
 
 inline TInt HDeflateHash::Hash(const TUint8* aPtr)
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/imgtools/imglib/e32image/deflate/panic.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/e32image/deflate/panic.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imglib/e32image/deflate/panic.cpp	2010-05-18 19:32:31.848849218 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/e32image/deflate/panic.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -21,7 +21,7 @@
 #include "h_utl.h"
 #include <stdlib.h>
 
-char* HuffmanError[]=	{
+char const * HuffmanError[]=	{
 						"Huffman: Too many codes\n",
 						"Huffman: Invalid coding\n",
 						"Huffman: Buffer overflow\n",
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/imgtools/imglib/e32uid/uidcrc.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/e32uid/uidcrc.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imglib/e32uid/uidcrc.cpp	2010-05-18 19:32:31.848849218 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/e32uid/uidcrc.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -55,7 +55,7 @@
 
 	for (i=1; i<4; i++)
 		{
-		char* endptr = "failed";
+		char * endptr;
 		uids[i] = strtoul(argv[i],&endptr,0);
 		if (*endptr!='\0')
 			{
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/imgtools/imglib/filesystem/include/errorhandler.h /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/include/errorhandler.h
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imglib/filesystem/include/errorhandler.h	2010-05-18 19:32:31.852848469 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/include/errorhandler.h	2010-05-15 14:32:45.000000000 +0100
@@ -36,8 +36,8 @@
 class ErrorHandler
 {
 	public:
-		ErrorHandler(int aMessageIndex,char* aSubMessage,char* aFileName, int aLineNumber);
-        ErrorHandler(int aMessageIndex, char* aFileName, int aLineNumber);
+		ErrorHandler(int aMessageIndex,char const * aSubMessage,char const * aFileName, int aLineNumber);
+        ErrorHandler(int aMessageIndex, char const* aFileName, int aLineNumber);
 		virtual ~ErrorHandler();
 		void Report();
 
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/imgtools/imglib/filesystem/include/filesysteminterface.h /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/include/filesysteminterface.h
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imglib/filesystem/include/filesysteminterface.h	2010-05-18 19:32:31.852848469 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/include/filesysteminterface.h	2010-05-15 16:42:12.000000000 +0100
@@ -24,6 +24,7 @@
 
 #include "directory.h"
 #include <fstream>
+#include <cstdlib>
 
 typedef std::ofstream Ofstream;
 
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/imgtools/imglib/filesystem/include/messagehandler.h /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/include/messagehandler.h
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imglib/filesystem/include/messagehandler.h	2010-05-18 19:32:31.852848469 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/include/messagehandler.h	2010-05-15 14:32:45.000000000 +0100
@@ -36,9 +36,9 @@
     public:
 		static Message *GetInstance();
 		static void CleanUp();
-		static void StartLogging(char *filename);
-		static void CreateMessageFile(char *fileName);
-		static void ReportMessage(int aMsgType, int aMsgIndex,char* aName);
+		static void StartLogging(char const *filename);
+		static void CreateMessageFile(char const *fileName);
+		static void ReportMessage(int aMsgType, int aMsgIndex,char const* aName);
 
     private:
 		static Message* iInstance;
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/imgtools/imglib/filesystem/include/messageimplementation.h /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/include/messageimplementation.h
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imglib/filesystem/include/messageimplementation.h	2010-05-18 19:32:31.852848469 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/include/messageimplementation.h	2010-05-15 14:32:45.000000000 +0100
@@ -84,7 +84,7 @@
 		// display message to output device
 		virtual void Output(const char *aName) =0;
 		// start logging to a file
-		virtual void StartLogging(char *fileName)=0;
+		virtual void StartLogging(char const *fileName)=0;
 		virtual void ReportMessage(int aMsgType, int aMsgIndex,...)=0;
 		virtual void InitializeMessages()=0;
 };
@@ -105,7 +105,7 @@
 		char* GetMessageString(int errorIndex);
 		void Output(const char *aName);
 		void LogOutput(const char *aString);
-		void StartLogging(char *fileName);
+		void StartLogging(char const *fileName);
 		void ReportMessage(int aMsgType, int aMsgIndex,...);
 		void InitializeMessages();
     private:
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/imgtools/imglib/filesystem/source/cluster.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/source/cluster.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imglib/filesystem/source/cluster.cpp	2010-05-18 19:32:31.852848469 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/source/cluster.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -143,7 +143,9 @@
 {
 	if(iCurrentClusterNumber >= iTotalNumberOfClusters)
 	{
-    	throw ErrorHandler(IMAGESIZETOOBIG,"Occupied number of clusters count exceeded than available clusters",__FILE__,__LINE__);
+    	throw ErrorHandler(IMAGESIZETOOBIG,
+			"Occupied number of clusters count exceeded than available clusters",
+			__FILE__,__LINE__);
 	}
 	++iCurrentClusterNumber;
 }
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/imgtools/imglib/filesystem/source/dirregion.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/source/dirregion.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imglib/filesystem/source/dirregion.cpp	2010-05-18 19:32:31.856848559 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/source/dirregion.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -49,7 +49,7 @@
 	iClusterPtr = CCluster::Instance(iClusterSize,totalClusters);
 	if(iClusterPtr == NULL)
 	{
-		throw ErrorHandler(CLUSTERERROR,"Instance creation error", __FILE__, __LINE__);
+		throw ErrorHandler(CLUSTERERROR,"Instance creation error",__FILE__,__LINE__);
 	}
 	iClusterSize = iClusterPtr->GetClusterSize();
 }
@@ -117,7 +117,8 @@
 	aOutPutStream.flush();
 	if(aOutPutStream.bad())
 	{
-		throw ErrorHandler(FILEWRITEERROR, __FILE__, __LINE__);
+		throw ErrorHandler(FILEWRITEERROR,__FILE__,__LINE__);
+
 	}
 }
 
@@ -175,7 +176,7 @@
 	}
 	else
 	{
-		throw ErrorHandler(EMPTYFILENAME, __FILE__, __LINE__);
+		throw ErrorHandler(EMPTYFILENAME,__FILE__,__LINE__);
 	}
 }
 
@@ -247,7 +248,7 @@
 	if(tempString.length() == 0)
 	{
 		tempString.erase();
-		throw ErrorHandler(EMPTYFILENAME, __FILE__, __LINE__);
+		throw ErrorHandler(EMPTYFILENAME,__FILE__,__LINE__);
 	}
 	else
 	{
@@ -314,7 +315,8 @@
 	iInputStream.open(aEntry->GetFilePath().c_str(),Ios::binary);
 	if(iInputStream.fail() == true )
 	{
-		throw ErrorHandler(FILEOPENERROR,(char*)aEntry->GetFilePath().c_str(),__FILE__,__LINE__);
+		throw ErrorHandler(FILEOPENERROR,aEntry->GetFilePath().c_str(),
+			__FILE__,__LINE__);
 	}
 	else
 	{
@@ -324,7 +326,7 @@
 		char* dataBuffer = (char*)malloc((unsigned int)fileSize);
 		if(dataBuffer == 0)
 		{
-			throw ErrorHandler(MEMORYALLOCATIONERROR, __FILE__, __LINE__);
+			throw ErrorHandler(MEMORYALLOCATIONERROR,__FILE__,__LINE__);
 		}
 		//Read the whole file in one short
 		iInputStream.read (dataBuffer,fileSize);
@@ -332,7 +334,8 @@
 		Long64 bytesRead = (unsigned int)iInputStream.tellg();
 		if((iInputStream.bad()) || (bytesRead != fileSize))
 		{
-			throw ErrorHandler(FILEREADERROR,(char*)aEntry->GetFilePath().c_str(), __FILE__, __LINE__);
+			throw ErrorHandler(FILEREADERROR,aEntry->GetFilePath().c_str(),
+				__FILE__, __LINE__);
 		}
 		String clusterData(dataBuffer,(unsigned int)bytesRead);
 		PushStringIntoClusterMap(iClusterPtr->GetCurrentClusterNumber(),clusterData,iClusterSize,aEntry->GetEntryAttribute());
@@ -544,12 +547,12 @@
 		}
 		if(aNodeList.front()->GetEntryList()->size() <= 0)
 		{
-			throw ErrorHandler(NOENTRIESFOUND, __FILE__, __LINE__);
+			throw ErrorHandler(NOENTRIESFOUND,__FILE__,__LINE__);
 		}
 	}
 	else
 	{
-		throw ErrorHandler(ROOTNOTFOUND, __FILE__, __LINE__);
+		throw ErrorHandler(ROOTNOTFOUND,__FILE__,__LINE__);
 	}
 }
 
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/imgtools/imglib/filesystem/source/errorhandler.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/source/errorhandler.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imglib/filesystem/source/errorhandler.cpp	2010-05-18 19:32:31.856848559 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/source/errorhandler.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -22,9 +22,10 @@
 
 #include "errorhandler.h"
 #include "messagehandler.h"
+#include <cstring>
 
-char *errMssgPrefix="FileSystem : Error:";
-char *Gspace=" ";
+char const *errMssgPrefix="FileSystem : Error:";
+char const *Gspace=" ";
 
 /**
 ErrorHandler constructor for doing common thing required for derived 
@@ -41,7 +42,7 @@
 @param aFileName - File name from where the error is thrown
 @param aLineNumber - Line number from where the error is thrown
 */
-ErrorHandler::ErrorHandler(int aMessageIndex, char* aSubMessage, char* aFileName, int aLineNumber)
+ErrorHandler::ErrorHandler(int aMessageIndex, char const* aSubMessage, char const* aFileName, int aLineNumber)
                             :iSubMessage(aSubMessage), iFileName(aFileName), iLineNumber(aLineNumber)
 {
 	iMessageIndex = aMessageIndex;
@@ -60,7 +61,7 @@
 @param aFileName - File name from where the error is thrown
 @param aLineNumber - Line number from where the error is thrown
 */
-ErrorHandler::ErrorHandler(int aMessageIndex, char* aFileName, int aLineNumber)
+ErrorHandler::ErrorHandler(int aMessageIndex, char const* aFileName, int aLineNumber)
                             : iFileName(aFileName), iLineNumber(aLineNumber)
 {
 	iMessageIndex = aMessageIndex;
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/imgtools/imglib/filesystem/source/fat16bootsector.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/source/fat16bootsector.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imglib/filesystem/source/fat16bootsector.cpp	2010-05-18 19:32:31.856848559 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/source/fat16bootsector.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -21,6 +21,7 @@
 */
 
 #include "fat16bootsector.h"
+#include <cstring>
 
 /**
 Constructor of the fat16 boot sector 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/imgtools/imglib/filesystem/source/fat16filesystem.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/source/fat16filesystem.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imglib/filesystem/source/fat16filesystem.cpp	2010-05-18 19:32:31.856848559 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/source/fat16filesystem.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -21,7 +21,7 @@
 */
 
 #include"fat16filesystem.h"
-
+#include <cstring>
 
 /**
 Initializes the boot sector of a FAT 16 volume
@@ -76,45 +76,45 @@
 	//copying of boot sector values in to the array
 	iData = new unsigned char[BytesPerSector];
 	unsigned int pos = 0;
-	memcpy(&iData[pos],JmpBoot,3);
+	memmove(&iData[pos],JmpBoot,3);
 	pos += 3;
-	memcpy(&iData[pos],OEMName,8);
+	memmove(&iData[pos],OEMName,8);
 	pos += 8;
-	memcpy(&iData[pos],&BytesPerSector,2);
+	memmove(&iData[pos],&BytesPerSector,2);
 	pos += 2;
-	memcpy(&iData[pos],&SectorsPerCluster,1);
+	memmove(&iData[pos],&SectorsPerCluster,1);
 	pos += 1;
-	memcpy(&iData[pos],&ReservedSectors,2);
+	memmove(&iData[pos],&ReservedSectors,2);
 	pos += 2;
-	memcpy(&iData[pos],&NumFats,1);
+	memmove(&iData[pos],&NumFats,1);
 	pos += 1;
-	memcpy(&iData[pos],&RootDirEntries,2);
+	memmove(&iData[pos],&RootDirEntries,2);
 	pos += 2;
-	memcpy(&iData[pos],&LowSectors,2);
+	memmove(&iData[pos],&LowSectors,2);
 	pos += 2;
-	memcpy(&iData[pos],&Media,1);
+	memmove(&iData[pos],&Media,1);
 	pos += 1;
-	memcpy(&iData[pos],&FatSectors,2);
+	memmove(&iData[pos],&FatSectors,2);
 	pos += 2;
-	memcpy(&iData[pos],&SectorPerTrack,2);
+	memmove(&iData[pos],&SectorPerTrack,2);
 	pos += 2;
-	memcpy(&iData[pos],&NumberOfHeads,2);
+	memmove(&iData[pos],&NumberOfHeads,2);
 	pos += 2;
-	memcpy(&iData[pos],&HiddenSectors,4);
+	memmove(&iData[pos],&HiddenSectors,4);
 	pos += 4;
-	memcpy(&iData[pos],&HighSectorsCount,4);
+	memmove(&iData[pos],&HighSectorsCount,4);
 	pos += 4;
-	memcpy(&iData[pos],&BootSectorDriveNumber,1);		
+	memmove(&iData[pos],&BootSectorDriveNumber,1);		
 	pos += 1;
-	memcpy(&iData[pos],&ReservedByte,1);
+	memmove(&iData[pos],&ReservedByte,1);
 	pos += 1;
-	memcpy(&iData[pos],&BootSignature,1);
+	memmove(&iData[pos],&BootSignature,1);
 	pos += 1;
-	memcpy(&iData[pos],&VolumeId,4);
+	memmove(&iData[pos],&VolumeId,4);
 	pos += 4;
-	memcpy(&iData[pos],VolumeLab,11);
+	memmove(&iData[pos],VolumeLab,11);
 	pos += 11;
-	memcpy(&iData[pos],FileSysType,8);
+	memmove(&iData[pos],FileSysType,8);
 	pos += 8;
 	while(pos < BytesPerSector)
 	{
@@ -133,7 +133,7 @@
 	ComputeClusterSizeInBytes();
 	ComputeRootDirSectors();
 	ComputeBytesPerSector();
-	MessageHandler::ReportMessage (INFORMATION,BOOTSECTORCREATEMSG, "FAT16");
+	MessageHandler::ReportMessage (INFORMATION,BOOTSECTORCREATEMSG,"FAT16");
 }
 
 /**
@@ -195,8 +195,8 @@
 		// Each FAT16 entries occupies 2 bytes, hence multiply by 2
 		aFatString.append((totalFatEntries - clusterCounter)*2, 0);
 	}
-	MessageHandler::ReportMessage (INFORMATION,FATTABLEWRITEMSG,
-								   "FAT16");
+
+	MessageHandler::ReportMessage (INFORMATION,FATTABLEWRITEMSG,"FAT16");
 	
 	// Write FAT table multiple times depending upon the No of FATS set.
 	unsigned int noOfFats = iFAT16BootSector.NumberOfFats();
@@ -313,6 +313,6 @@
 	catch(...)
 	{
 		delete dirRegionPtr;
-		throw ErrorHandler(UNKNOWNERROR, __FILE__, __LINE__);
+		throw ErrorHandler(UNKNOWNERROR,__FILE__,__LINE__);
 	}
 }
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/imgtools/imglib/filesystem/source/fat32bootsector.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/source/fat32bootsector.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imglib/filesystem/source/fat32bootsector.cpp	2010-05-18 19:32:31.856848559 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/source/fat32bootsector.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -21,6 +21,7 @@
 */
 
 #include "fat32bootsector.h"
+#include <cstring>
 
 /**
 Constructor of the fat16 boot sector 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/imgtools/imglib/filesystem/source/fat32filesystem.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/source/fat32filesystem.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imglib/filesystem/source/fat32filesystem.cpp	2010-05-18 19:32:31.856848559 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/source/fat32filesystem.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -21,6 +21,7 @@
 */
 
 #include"fat32filesystem.h"
+#include <cstring>
 
 /**
 Initializes the boot sector of a FAT 32 volume
@@ -90,59 +91,59 @@
 	//copying of boot sector values in to the array
 	iData = new unsigned char[BytesPerSector];
 	unsigned int pos = 0;
-	memcpy(&iData[pos],JmpBoot,3);
+	memmove(&iData[pos],JmpBoot,3);
 	pos += 3;
-	memcpy(&iData[pos],OEMName,8);
+	memmove(&iData[pos],OEMName,8);
 	pos += 8;
-	memcpy(&iData[pos],&BytesPerSector,2);
+	memmove(&iData[pos],&BytesPerSector,2);
 	pos += 2;
-	memcpy(&iData[pos],&SectorsPerCluster,1);
+	memmove(&iData[pos],&SectorsPerCluster,1);
 	pos += 1;
-	memcpy(&iData[pos],&ReservedSectors,2);
+	memmove(&iData[pos],&ReservedSectors,2);
 	pos += 2;
-	memcpy(&iData[pos],&NumFats,1);
+	memmove(&iData[pos],&NumFats,1);
 	pos += 1;
-	memcpy(&iData[pos],&RootDirEntries,2);
+	memmove(&iData[pos],&RootDirEntries,2);
 	pos += 2;
-	memcpy(&iData[pos],&LowSectors,2);
+	memmove(&iData[pos],&LowSectors,2);
 	pos += 2;
-	memcpy(&iData[pos],&Media,1);
+	memmove(&iData[pos],&Media,1);
 	pos += 1;
-	memcpy(&iData[pos],&FatSectors,2);
+	memmove(&iData[pos],&FatSectors,2);
 	pos += 2;
-	memcpy(&iData[pos],&SectorPerTrack,2);
+	memmove(&iData[pos],&SectorPerTrack,2);
 	pos += 2;
-	memcpy(&iData[pos],&NumberOfHeads,2);
+	memmove(&iData[pos],&NumberOfHeads,2);
 	pos += 2;
-	memcpy(&iData[pos],&HiddenSectors,4);
+	memmove(&iData[pos],&HiddenSectors,4);
 	pos += 4;
-	memcpy(&iData[pos],&HighSectorsCount,4);
+	memmove(&iData[pos],&HighSectorsCount,4);
 	pos += 4;
-	memcpy(&iData[pos],&FatSectors32,4);
+	memmove(&iData[pos],&FatSectors32,4);
 	pos += 4;
-	memcpy(&iData[pos],&ExtFlags,2);
+	memmove(&iData[pos],&ExtFlags,2);
 	pos += 2;
-	memcpy(&iData[pos],&FileSystemVersion,2);
+	memmove(&iData[pos],&FileSystemVersion,2);
 	pos += 2;
-	memcpy(&iData[pos],&RootCluster,4);
+	memmove(&iData[pos],&RootCluster,4);
 	pos += 4;
-	memcpy(&iData[pos],&FSInfo,2);
+	memmove(&iData[pos],&FSInfo,2);
 	pos += 2;
-	memcpy(&iData[pos],&BackUpBootSector,2);
+	memmove(&iData[pos],&BackUpBootSector,2);
 	pos += 2;
-	memcpy(&iData[pos],FutureReserved,12);
+	memmove(&iData[pos],FutureReserved,12);
 	pos += 12;
-	memcpy(&iData[pos],&BootSectorDriveNumber,1);
+	memmove(&iData[pos],&BootSectorDriveNumber,1);
 	pos += 1;
-	memcpy(&iData[pos],&ReservedByte,1);
+	memmove(&iData[pos],&ReservedByte,1);
 	pos += 1;
-	memcpy(&iData[pos],&BootSignature,1);
+	memmove(&iData[pos],&BootSignature,1);
 	pos += 1;
-	memcpy(&iData[pos],&VolumeId,4);
+	memmove(&iData[pos],&VolumeId,4);
 	pos += 4;
-	memcpy(&iData[pos],VolumeLab,11);
+	memmove(&iData[pos],VolumeLab,11);
 	pos += 11;
-	memcpy(&iData[pos],FileSystemType,8);
+	memmove(&iData[pos],FileSystemType,8);
 	pos += 8;
 	while(pos < BytesPerSector)
 	{
@@ -159,7 +160,7 @@
 	ComputeClusterSizeInBytes();
 	ComputeRootDirSectors();
 	ComputeBytesPerSector();
-	MessageHandler::ReportMessage (INFORMATION,BOOTSECTORCREATEMSG, "FAT32");
+	MessageHandler::ReportMessage (INFORMATION,BOOTSECTORCREATEMSG,"FAT32");
 }
 
 /**
@@ -172,7 +173,7 @@
 */
 void CFat32FileSystem::WriteBootSector(ofstream& aOutPutStream)
 {
-	MessageHandler::ReportMessage (INFORMATION,BOOTSECTORWRITEMSG, "FAT32");
+	MessageHandler::ReportMessage (INFORMATION,BOOTSECTORWRITEMSG,"FAT32");
 	aOutPutStream.write(reinterpret_cast<char*>(&iData[0]),iFAT32BootSector.BytesPerSector());
 	aOutPutStream.flush();
 }
@@ -228,8 +229,9 @@
 		// Each FAT32 entries occupies 4 bytes, hence multiply by 4
 		aFatString.append((totalFatEntries - clusterCounter)*4, 0);
 	}
-	MessageHandler::ReportMessage (INFORMATION,FATTABLEWRITEMSG,
-								   "FAT32");
+
+	MessageHandler::ReportMessage (INFORMATION,FATTABLEWRITEMSG,"FAT32");
+
 	//Write FAT table multiple times depending on the value of No of FATS set.
 	unsigned int noOfFats = iFAT32BootSector.NumberOfFats();
 	for(unsigned int i=0; i<noOfFats; i++)
@@ -254,19 +256,19 @@
 	unsigned int bytesPerSector = iFAT32BootSector.BytesPerSector();
 	FSinfoData = new unsigned char[bytesPerSector];
 	iFSInfo.SetFSInfo();
-	memcpy(&FSinfoData[counter], &iFSInfo.FSI_LeadSign,4);
+	memmove(&FSinfoData[counter], &iFSInfo.FSI_LeadSign,4);
 	counter += 4;
-	memcpy(&FSinfoData[counter], &iFSInfo.FSI_Reserved,480);
+	memmove(&FSinfoData[counter], &iFSInfo.FSI_Reserved,480);
 	counter += 480;
-	memcpy(&FSinfoData[counter], &iFSInfo.FSI_StrucSig,4);
+	memmove(&FSinfoData[counter], &iFSInfo.FSI_StrucSig,4);
 	counter += 4;
-	memcpy(&FSinfoData[counter], &iFSInfo.FSI_Free_Count,4);
+	memmove(&FSinfoData[counter], &iFSInfo.FSI_Free_Count,4);
 	counter += 4;
-	memcpy(&FSinfoData[counter], &iFSInfo.FSI_Nxt_Free,4);
+	memmove(&FSinfoData[counter], &iFSInfo.FSI_Nxt_Free,4);
 	counter += 4;
-	memcpy(&FSinfoData[counter], &iFSInfo.FSI_Reserved2,12);
+	memmove(&FSinfoData[counter], &iFSInfo.FSI_Reserved2,12);
 	counter += 12;
-	memcpy(&FSinfoData[counter], &iFSInfo.FSI_TrailSig,4);
+	memmove(&FSinfoData[counter], &iFSInfo.FSI_TrailSig,4);
 	counter += 4;
 	counter += (bytesPerSector-KSizeOfFatBootSector);
 	aOutPutStream.write(reinterpret_cast<char*>(&FSinfoData[0]),counter);
@@ -367,11 +369,11 @@
  	iTotalClusters = totalDataSectors / iFAT32BootSector.SectorsPerCluster();
 	if(iTotalClusters < KMinimumFat32Clusters)
 	{
-		throw ErrorHandler(BOOTSECTORERROR,"Low Partition Size",__FILE__, __LINE__);
+		throw ErrorHandler(BOOTSECTORERROR,"Low Partition Size",__FILE__,__LINE__);
 	}
 	else if(iTotalClusters > KMaximumFat32Clusters)
 	{
-		throw ErrorHandler(BOOTSECTORERROR,"high Partition Size",__FILE__, __LINE__);
+		throw ErrorHandler(BOOTSECTORERROR,"high Partition Size",__FILE__,__LINE__);
 	}
 }
 /**
@@ -424,7 +426,7 @@
 	{
 		delete dirRegionPtr;
 		dirRegionPtr = NULL;
-		throw ErrorHandler(UNKNOWNERROR, __FILE__, __LINE__);
+		throw ErrorHandler(UNKNOWNERROR,__FILE__,__LINE__);
 	}
 }
 
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/imgtools/imglib/filesystem/source/fatbasebootsector.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/source/fatbasebootsector.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imglib/filesystem/source/fatbasebootsector.cpp	2010-05-18 19:32:31.856848559 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/source/fatbasebootsector.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -22,6 +22,7 @@
 */
 
 #include "fatbasebootsector.h"
+#include <cstring>
 
 /**
 Constructor of the base boot sector 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/imgtools/imglib/filesystem/source/filesysteminterface.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/source/filesysteminterface.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imglib/filesystem/source/filesysteminterface.cpp	2010-05-18 19:32:31.856848559 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/source/filesysteminterface.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -62,7 +62,7 @@
 		iOutputStream.open(aImageFileName,ios::out|ios::binary);
 		if(iOutputStream.fail() == true )
 		{
-			throw ErrorHandler(FILEOPENERROR,aImageFileName,__FILE__, __LINE__);
+			throw ErrorHandler(FILEOPENERROR,aImageFileName,__FILE__,__LINE__);
 		}
 		switch(aFileSystem)
 		{
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/imgtools/imglib/filesystem/source/longname.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/source/longname.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imglib/filesystem/source/longname.cpp	2010-05-18 19:32:31.856848559 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/source/longname.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -21,6 +21,7 @@
 
 
 #include "longname.h"
+#include <cstring>
 
 
 /** 
@@ -48,7 +49,7 @@
 	iLongNameLength = iLongName.length();
 	if(iLongNameLength == 0)
 	{
-		throw ErrorHandler(EMPTYFILENAME, __FILE__, __LINE__);
+		throw ErrorHandler(EMPTYFILENAME,__FILE__,__LINE__);
 	}
 	FormatLongFileName(iLongName);
 	iShortName = GetShortEntryName();
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/imgtools/imglib/filesystem/source/messagehandler.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/source/messagehandler.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imglib/filesystem/source/messagehandler.cpp	2010-05-18 19:32:31.860849207 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/source/messagehandler.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -51,7 +51,7 @@
 @param aFileName
 Name of the Log File
 */
-void MessageHandler::StartLogging(char *aFileName)
+void MessageHandler::StartLogging(char const *aFileName)
 {
     GetInstance()->StartLogging(aFileName);
 }
@@ -74,7 +74,7 @@
 @internalComponent
 @released
 */
-void MessageHandler::ReportMessage(int aMsgType, int aMsgIndex,char* aName)
+void MessageHandler::ReportMessage(int aMsgType, int aMsgIndex,char const* aName)
 {
 	GetInstance()->ReportMessage(aMsgType,aMsgIndex,aName);
 }
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/imgtools/imglib/filesystem/source/messageimplementation.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/source/messageimplementation.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imglib/filesystem/source/messageimplementation.cpp	2010-05-18 19:32:31.860849207 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/filesystem/source/messageimplementation.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -23,15 +23,17 @@
 
 #include "messageimplementation.h"
 #include "errorhandler.h"
+#include <cstring>
 
 using std::endl;
 using std::cout;
 typedef std::string String;
 
-char *errorMssgPrefix="FileSystem : Error:";
-char *warnMssgPrefix="FileSystem : Warning:";
-char *infoMssgPrefix="FileSystem : Information:";
-char *Space=" ";
+char const *errorMssgPrefix="FileSystem : Error:";
+char const *warnMssgPrefix="FileSystem : Warning:";
+char const *infoMssgPrefix="FileSystem : Information:";
+char const *Space=" ";
+
 
 enum MessageArraySize{MAX=16};
 
@@ -202,7 +204,7 @@
 
 @param aFileName - Name of the Log file
 */
-void MessageImplementation::StartLogging(char *aFileName)
+void MessageImplementation::StartLogging(char const *aFileName)
 {
 	char logFile[1024];
 	FILE *fptr;
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/imgtools/imglib/host/h_utl.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/host/h_utl.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imglib/host/h_utl.cpp	2010-05-18 19:32:31.860849207 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/host/h_utl.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -177,7 +177,7 @@
 
 
 	TInt build=0;
-	memset(&aVersion, sizeof(TVersion), 0);	
+	memset(&aVersion, 0, sizeof(TVersion));
 	TInt i;
 	TInt len=strlen(str);
 	for (i=0; i<len; i++)
@@ -192,7 +192,7 @@
 		{ 
 		cout << "\n Warning: major version must be in range 0 - 127 \n";
 		}
-	char* pMinor = strchr(str, '.');
+	char const * pMinor = strchr(str, '.');
 	if (pMinor)
 		{
 		pMinor++; 
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/imgtools/imglib/inc/h_utl.h /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/inc/h_utl.h
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imglib/inc/h_utl.h	2010-05-18 19:32:31.860849207 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/inc/h_utl.h	2010-05-15 14:32:45.000000000 +0100
@@ -65,9 +65,6 @@
 #define _stricmp strcasecmp		
 #define strnicmp strncasecmp	
 
-// to fix the linux problem: memcpy does not work with overlapped areas.
-#define memcpy memmove
-
 // hand-rolled strupr function for converting a string to all uppercase
 char* strupr(char *a);
 
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/imgtools/imglib/parameterfileprocessor/source/parameterfileprocessor.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/parameterfileprocessor/source/parameterfileprocessor.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/imglib/parameterfileprocessor/source/parameterfileprocessor.cpp	2010-05-18 19:32:31.864848459 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/imglib/parameterfileprocessor/source/parameterfileprocessor.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -21,6 +21,7 @@
 
 
 #include "parameterfileprocessor.h"
+#include <cstring>
 
 
 /**
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/imgtools/romtools/group/BLD.INF /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/group/BLD.INF
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/romtools/group/BLD.INF	2010-05-18 19:32:31.868848898 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/group/BLD.INF	2010-05-15 14:32:45.000000000 +0100
@@ -15,13 +15,14 @@
 *
 */
 
+#include <productvariant.hrh>
 
 PRJ_PLATFORMS
 TOOLS2
 
 PRJ_EXPORTS
 
-../maksym/fixupsym.bat              /epoc32/tools/fixupsym.bat
+../maksym/fixupsym.bat              EPOCROOT_EXPORT_PATH(epoc32/tools/fixupsym.bat)
 ../maksym/hpsym.bat                 /epoc32/tools/hpsym.bat
 ../maksym/maksym.bat                /epoc32/tools/maksym.bat
 ../maksym/maksymrofs.bat            /epoc32/tools/maksymrofs.bat
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/imgtools/romtools/group/readimage.mmp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/group/readimage.mmp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/romtools/group/readimage.mmp	2010-05-18 19:32:31.868848898 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/group/readimage.mmp	2010-05-15 14:32:45.000000000 +0100
@@ -45,15 +45,16 @@
 userinclude     ..\..\imglib\compress 
 userinclude		..\..\imglib\patchdataprocessor\include
 userinclude		..\..\sisutils\inc
+#ifndef TOOLS2_LINUX
 userinclude   ..\..\imglib\boostlibrary
+#endif
 
 USERINCLUDE ..\..\imglib\inc
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 
 staticlibrary 	sisutils
 #ifdef TOOLS2_LINUX
-STATICLIBRARY   boost_thread-mgw34-mt-1_39_linux
-OPTION    GCC -pthread -O2 -Wno-uninitialized
+OPTION    GCC -pthread -O2 -Wno-uninitialized -lboost_thread-mt
 #else
 STATICLIBRARY   boost_thread-mgw34-mt-1_39_win32
 OPTION    GCC -mthreads -O2 -Wno-uninitialized
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/imgtools/romtools/readimage/inc/common.h /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/readimage/inc/common.h
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/romtools/readimage/inc/common.h	2010-05-18 19:32:31.872848917 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/readimage/inc/common.h	2010-05-15 14:32:45.000000000 +0100
@@ -46,7 +46,7 @@
 #define DLL_UID1	10000079
 #define EXE_UID1	1000007a
 
-typedef enum EImageType
+enum EImageType
 {
 	EUNKNOWN_IMAGE,
 	EROM_IMAGE,
@@ -98,7 +98,7 @@
 	void Report();
 };
 
-ostream& DumpInHex(char* aDesc, TUint32 aData, bool aContinue = false,TUint aDataWidth=8,\
-				   char aFiller='0', TUint aMaxDescWidth=28);
+ostream& DumpInHex(char const * aDesc, TUint32 aData, bool aContinue = false,
+			TUint aDataWidth=8, char aFiller='0', TUint aMaxDescWidth=28);
 
 #endif //__IMAGE_READER_COMMON_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/imgtools/romtools/readimage/inc/image_reader.h /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/readimage/inc/image_reader.h
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/romtools/readimage/inc/image_reader.h	2010-05-18 19:32:31.872848917 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/readimage/inc/image_reader.h	2010-05-15 14:32:45.000000000 +0100
@@ -27,7 +27,19 @@
 
 
 #include "common.h"
-#include <direct.h>
+#if defined(WIN32)
+	#include <direct.h>
+	#define GETCWD	_getcwd
+	#define CHDIR	_chdir
+	#define MKDIR(dir)	_mkdir(dir)
+#elif defined(__LINUX__)
+	#include <sys/stat.h>
+	#include <unistd.h>
+	#define GETCWD	getcwd
+	#define CHDIR	chdir
+	#define MKDIR(dir)	mkdir((dir),S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH)
+#endif
+
 #include <map>
 
 typedef struct tag_FILEINFO
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/imgtools/romtools/readimage/inc/rofs_image_reader.h /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/readimage/inc/rofs_image_reader.h
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/romtools/readimage/inc/rofs_image_reader.h	2010-05-18 19:32:31.872848917 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/readimage/inc/rofs_image_reader.h	2010-05-15 14:32:45.000000000 +0100
@@ -65,10 +65,10 @@
 	void DumpDirStructure();
 	void DumpFileAttributes();
 	void MarkNodes();
-	void SetSeek(streampos aOff, ios::seek_dir aStartPos=ios::beg);
+	void SetSeek(streampos aOff, std::ios_base::seekdir aStartPos);
 	void ExtractImageContents();
 	void CheckFileExtension(char* aFileName,TRomBuilderEntry* aEntry,TRomNode* aNode,ofstream& aLogFile );
-	void GetCompleteNodePath(TRomNode* aNode,string& aName,char* aAppStr);
+	void GetCompleteNodePath(TRomNode* aNode,string& aName,char const* aAppStr);
 	void WriteEntryToFile(char* aFileName,TRomNode* aNode,ofstream& aLogFile);
 
 	void GetFileInfo(FILEINFOMAP &aFileMap);
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/imgtools/romtools/readimage/src/common.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/readimage/src/common.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/romtools/readimage/src/common.cpp	2010-05-18 19:32:31.872848917 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/readimage/src/common.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -40,7 +40,7 @@
 	*out << "Usage Error:" << iErrMessage.c_str() << endl;
 }
 
-ostream& DumpInHex(char* aDesc, TUint32 aData, bool aContinue, TUint aDataWidth, \
+ostream& DumpInHex(char const* aDesc, TUint32 aData, bool aContinue, TUint aDataWidth, \
 				   char aFiller, TUint aMaxDescWidth)
 {
 	TUint aDescLen = strlen(aDesc);
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/imgtools/romtools/readimage/src/e32_image_reader.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/readimage/src/e32_image_reader.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/romtools/readimage/src/e32_image_reader.cpp	2010-05-18 19:32:31.872848917 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/readimage/src/e32_image_reader.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -75,26 +75,26 @@
 	bool aContinue = true;
 
 	DumpInHex("Size", aE32Image.iSize ) << endl;
-	DumpInHex("Uids",aE32Image.iOrigHdr->iUid1);
-	DumpInHex(" ",aE32Image.iOrigHdr->iUid2, aContinue);
-	DumpInHex(" ",aE32Image.iOrigHdr->iUid3, aContinue);
-	DumpInHex(" ",aE32Image.iOrigHdr->iUidChecksum, aContinue) << endl;
+	DumpInHex("Uids", aE32Image.iOrigHdr->iUid1);
+	DumpInHex(" ", aE32Image.iOrigHdr->iUid2, aContinue);
+	DumpInHex(" ", aE32Image.iOrigHdr->iUid3, aContinue);
+	DumpInHex(" ", aE32Image.iOrigHdr->iUidChecksum, aContinue) << endl;
 
 	
 	DumpInHex("Entry point", aE32Image.iOrigHdr->iEntryPoint ) << endl;
-	DumpInHex("Code start addr" ,aE32Image.iOrigHdr->iCodeBase)<< endl;
-	DumpInHex("Data start addr" ,aE32Image.iOrigHdr->iDataBase) << endl;
-	DumpInHex("Text size" ,aE32Image.iOrigHdr->iTextSize) << endl;
-	DumpInHex("Code size" ,aE32Image.iOrigHdr->iCodeSize) << endl;
-	DumpInHex("Data size" ,aE32Image.iOrigHdr->iDataSize) << endl;
-	DumpInHex("Bss size" ,aE32Image.iOrigHdr->iBssSize) << endl;
-	DumpInHex("Total data size" ,(aE32Image.iOrigHdr->iBssSize + aE32Image.iOrigHdr->iDataSize)) << endl;
-	DumpInHex("Heap min" ,aE32Image.iOrigHdr->iHeapSizeMin) << endl;
-	DumpInHex("Heap max" ,aE32Image.iOrigHdr->iHeapSizeMax) << endl;
-	DumpInHex("Stack size" ,aE32Image.iOrigHdr->iStackSize) << endl;
-	DumpInHex("Export directory" ,aE32Image.iOrigHdr->iExportDirOffset) << endl;
-	DumpInHex("Export dir count" ,aE32Image.iOrigHdr->iExportDirCount) << endl;
-	DumpInHex("Flags" ,aE32Image.iOrigHdr->iFlags) << endl;
+	DumpInHex("Code start addr", aE32Image.iOrigHdr->iCodeBase)<< endl;
+	DumpInHex("Data start addr", aE32Image.iOrigHdr->iDataBase) << endl;
+	DumpInHex("Text size", aE32Image.iOrigHdr->iTextSize) << endl;
+	DumpInHex("Code size", aE32Image.iOrigHdr->iCodeSize) << endl;
+	DumpInHex("Data size", aE32Image.iOrigHdr->iDataSize) << endl;
+	DumpInHex("Bss size", aE32Image.iOrigHdr->iBssSize) << endl;
+	DumpInHex("Total data size", (aE32Image.iOrigHdr->iBssSize + aE32Image.iOrigHdr->iDataSize)) << endl;
+	DumpInHex("Heap min", aE32Image.iOrigHdr->iHeapSizeMin) << endl;
+	DumpInHex("Heap max", aE32Image.iOrigHdr->iHeapSizeMax) << endl;
+	DumpInHex("Stack size", aE32Image.iOrigHdr->iStackSize) << endl;
+	DumpInHex("Export directory", aE32Image.iOrigHdr->iExportDirOffset) << endl;
+	DumpInHex("Export dir count", aE32Image.iOrigHdr->iExportDirCount) << endl;
+	DumpInHex("Flags", aE32Image.iOrigHdr->iFlags) << endl;
 
 	TUint aHeaderFmt = E32ImageHeader::HdrFmtFromFlags(aE32Image.iOrigHdr->iFlags);
 
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/imgtools/romtools/readimage/src/image_handler.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/readimage/src/image_handler.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/romtools/readimage/src/image_handler.cpp	2010-05-18 19:32:31.872848917 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/readimage/src/image_handler.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -392,7 +392,7 @@
 	{
 		if(iInputFileName.empty())
 		{
-			throw SisUtilsException("Usage Error", "No SIS file passed");
+			throw SisUtilsException("Usage Error","No SIS file passed");
 		}
 
 		iSisUtils = new Sis2Iby((char*)iInputFileName.c_str());
@@ -409,7 +409,7 @@
 		}
 		else
 		{
-			throw SisUtilsException("Error:", "Cannot create Sis2Iby object");
+			throw SisUtilsException("Error:","Cannot create Sis2Iby object");
 		}
 	}
 }
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/imgtools/romtools/readimage/src/image_reader.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/readimage/src/image_reader.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/romtools/readimage/src/image_reader.cpp	2010-05-18 19:32:31.876848937 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/readimage/src/image_reader.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -173,7 +173,7 @@
 
 
 	// get the current working directory and store in buffer.
-	if( _getcwd(currWorkingDir,_MAX_BUFFER_SIZE_) == NULL )
+	if( GETCWD(currWorkingDir,_MAX_BUFFER_SIZE_) == NULL )
 	{
 		// throw an exception if unable to get current working directory information.
 		throw ImageReaderException((char*)ImageReader::iImgFileName.c_str(), "Failed to get the current working directory");
@@ -191,7 +191,7 @@
 			changeToDrive.append(aDelimiter);
 			
 			// change the current working directory to the specified directory.
-			if( _chdir(changeToDrive.c_str()) )
+			if( CHDIR(changeToDrive.c_str()) )
 			{
 				// throw an exception if unable to change the directory specified.
 				throw ImageReaderException((char*)ImageReader::iImgFileName.c_str(), "Failed to change to the directory specified");
@@ -200,23 +200,23 @@
 		else
 		{
 			// if not,then create a cPtr directory. 
-			_mkdir(cPtr);
+			MKDIR(cPtr);
 			// change the current working directory to cPtr.
-			_chdir(cPtr);
+			int r = CHDIR(cPtr); (void)r;
 		}
 		// repeat till cPtr is NULL.
 		while (cPtr!=NULL)
 		{
-			if (cPtr = strtok(NULL,aDelimiter))
+			if ((cPtr = strtok(NULL,aDelimiter)) != NULL)
 			{
 				// create the directory.
-				_mkdir(cPtr);
+				MKDIR(cPtr);
 				// change current working directory.
-				_chdir(cPtr);
+				int r = CHDIR(cPtr); (void)r;
 			}
 		}
 		// revert back the working directory.
-		_chdir(currWorkingDir);
+		int r = CHDIR(currWorkingDir); (void)r;
 		// replace the source path with the original path information.
 		strcpy(aSrcPath,origPath.c_str());
 		delete[] currWorkingDir;
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/imgtools/romtools/readimage/src/rofs_image_reader.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/readimage/src/rofs_image_reader.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/romtools/readimage/src/rofs_image_reader.cpp	2010-05-18 19:32:31.876848937 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/readimage/src/rofs_image_reader.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -42,7 +42,7 @@
 	delete iImageReader;
 }
 
-void RofsImageReader::SetSeek(streampos aOff, ios::seek_dir aStartPos)
+void RofsImageReader::SetSeek(streampos aOff, std::ios_base::seekdir aStartPos)
 {
 	if(!iInputFile)
 		return;
@@ -417,7 +417,8 @@
 	{
 		// get the complete path 
 		path.assign( (char*)aNode->iName );
-		GetCompleteNodePath( aNode, path, "\\\\" );
+		GetCompleteNodePath( aNode, path,"\\\\");
+
 	}
 	else
 	{
@@ -462,7 +463,7 @@
 @param aAppStr	- string to append.
 @return - returns full path of the given file.
 */
-void RofsImageReader::GetCompleteNodePath(TRomNode* aNode,string& aName,char* aAppStr)
+void RofsImageReader::GetCompleteNodePath(TRomNode* aNode,string& aName, char const* aAppStr)
 {
 	// check if the entry has a parent.
 	TRomNode* NodeParent = aNode->GetParent();
@@ -496,7 +497,7 @@
 	{
 		// get the complete path 
 		path.assign( (char*)aNode->iName );
-		GetCompleteNodePath( aNode, path, "\\" );
+		GetCompleteNodePath( aNode, path,"\\");
 	}
 	else
 	{
@@ -549,7 +550,7 @@
 				{
 					// get the complete path 
 					fileName.assign( (char*)currNode->iName );
-					GetCompleteNodePath( currNode, fileName, (char*)DIR_SEPARATOR );
+					GetCompleteNodePath( currNode, fileName,DIR_SEPARATOR );
 				}
 			}
 			else
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/imgtools/romtools/readimage/src/rom_image_reader.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/readimage/src/rom_image_reader.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/romtools/readimage/src/rom_image_reader.cpp	2010-05-18 19:32:31.876848937 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/readimage/src/rom_image_reader.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -20,6 +20,12 @@
 #include <e32rom.h>
 #include "rom_image_reader.h"
 #include "r_rom.h"
+#if defined(WIN32)
+	#define ALLOCA _alloca
+#elif defined(__LINUX__)
+	#include <alloca.h>
+	#define ALLOCA alloca
+#endif
 
 void InflateUnCompress(unsigned char* source, int sourcesize, unsigned char* dest, int destsize);
 RomImageFSEntry::RomImageFSEntry (const char* aName) : iName(aName), iSibling(0), iChildren(0) {
@@ -495,7 +502,7 @@
 
 void RomImageReader::Name(string& aName, const wchar_t* aUnicodeName, TUint aLen)
 {
-	char* temp = (char*)_alloca((aLen << 1) + 1) ;
+	char* temp = (char*)ALLOCA((aLen << 1) + 1) ;
 	size_t n = wcsrtombs(temp,&aUnicodeName,aLen,NULL);
 	if(n == (size_t)-1){ // the unicode string can not be coverted.
 		aName = "???";
@@ -695,8 +702,8 @@
 	*out << left << prefix;
 	out->width(40);	
 	*out << right << file->Name() << "[" ;
-	DumpInHex( "", aRomImgEntry->iHardwareVariant, true) << "] ";
-	DumpInHex( " DataSize=", (aRomImgEntry->iBssSize + aRomImgEntry->iDataSize), true) << endl;
+	DumpInHex("", aRomImgEntry->iHardwareVariant, true) << "] ";
+	DumpInHex(" DataSize=", (aRomImgEntry->iBssSize + aRomImgEntry->iDataSize), true) << endl;
 	
 }
 
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/imgtools/romtools/rofsbuild/r_build.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/rofsbuild/r_build.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/romtools/rofsbuild/r_build.cpp	2010-05-18 19:32:31.876848937 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/rofsbuild/r_build.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -29,7 +29,7 @@
 
 #if defined(__MSVCDOTNET__) || defined(__TOOLS2__)
 	#include <iomanip>
-	#include <strstream>
+	#include <sstream>
 #else //!__MSVCDOTNET__
 	#include <iomanip.h>
 #endif //__MSVCDOTNET__
@@ -1218,22 +1218,11 @@
 				f.UpdateHeaderCrc();
 				if (overflow)
 					{
-					char * buffer = new char [size];
-					// need to check if the compressed file will fit in the image
-   					#if defined(__LINUX__)
- 					ostrstream os((char*)aDest, aMaxSize, (ios::openmode)(ios::out+ios::binary));
-					#elif defined(__TOOLS2__) && defined (_STLP_THREADS)
-  					ostrstream os((char*)buffer, size,(ios::out+ios::binary));
-  					#elif defined( __TOOLS2__)
-   					ostrstream os((char*)buffer, size,(ios::out+ios::binary));
-					#else
-					ostrstream os( (char*)buffer, size, (ios::out+ios::binary));
-					#endif
+					ostringstream os(ios_base::out|ios_base::binary);
 					os << f;
-					TUint compressedSize = os.pcount();
+					TUint compressedSize = os.str().size();
 					if (compressedSize <= aMaxSize)
 						overflow = EFalse;	
-					delete[] buffer;
 					}
 				}
 			if (overflow)
@@ -1242,15 +1231,9 @@
 				Print(EError, "Overflowed by approximately 0x%x bytes.\n", size - aMaxSize);
 				exit(667);
 				}
-  			#if defined(__TOOLS2__) && defined (_STLP_THREADS)
-  			ostrstream os((char*)aDest, aMaxSize,(ios::out+ios::binary));
-  			#elif __TOOLS2__
-			ostrstream os((char*)aDest, aMaxSize, (std::_Ios_Openmode)(ios::out+ios::binary));
-			#else
-			ostrstream os((char*)aDest, aMaxSize, (ios::out+ios::binary));
-			#endif
+  			ostringstream os(ios_base::out|ios_base::binary);
 			os << f;
-			size = os.pcount();
+			size = os.str().size();
 			compression = f.iHdr->CompressionType();
 			memcpy(&iUids[0], aDest, sizeof(iUids));
 			}
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/imgtools/romtools/rofsbuild/r_coreimage.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/rofsbuild/r_coreimage.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/romtools/rofsbuild/r_coreimage.cpp	2010-05-18 19:32:31.876848937 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/rofsbuild/r_coreimage.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -305,7 +305,7 @@
 @param aInfo Used by the caller to identify where the error occurred.
 @return Error number. KErrNone is returned if there are no errors.
 */
-TInt RCoreImageReader::ImageError(int aItemsRead, int aExpected, char *aInfo)
+TInt RCoreImageReader::ImageError(int aItemsRead, int aExpected, char const *aInfo)
 	{
 	if (aItemsRead != aExpected)
 		{
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/imgtools/romtools/rofsbuild/r_coreimage.h /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/rofsbuild/r_coreimage.h
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/romtools/rofsbuild/r_coreimage.h	2010-05-18 19:32:31.876848937 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/rofsbuild/r_coreimage.h	2010-05-15 14:32:45.000000000 +0100
@@ -103,7 +103,7 @@
 	TText* Filename();
 private:
 	TInt ReadIdentifier();
-	TInt ImageError(int aBytesRead, int aExpected, char* aInfo);
+	TInt ImageError(int aBytesRead, int aExpected, char const* aInfo);
 
 	/** Image type of the file being read */
 	TImageType iImageType;
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/imgtools/romtools/rofsbuild/r_driveimage.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/rofsbuild/r_driveimage.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/romtools/rofsbuild/r_driveimage.cpp	2010-05-18 19:32:31.876848937 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/rofsbuild/r_driveimage.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -254,7 +254,7 @@
 	fileName.append("/");
 
 	// Go through each entry
-	while(dirEntry = readdir(dirHandler))
+	while((dirEntry = readdir(dirHandler)) != NULL)
 		{
 		if(dirEntry->d_type != DT_DIR) 
 			{
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/imgtools/romtools/rofsbuild/r_driveutl.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/rofsbuild/r_driveutl.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/romtools/rofsbuild/r_driveutl.cpp	2010-05-18 19:32:31.876848937 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/rofsbuild/r_driveutl.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -82,7 +82,7 @@
 /**
 Time Stamp for Log file.
 */ 
-TAny GetLocalTime(TAny)
+TAny GetLocalTime()
 	{
 	struct tm *aNewTime = NULL;
 	time_t aTime = 0;
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/imgtools/romtools/rofsbuild/r_driveutl.h /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/rofsbuild/r_driveutl.h
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/romtools/rofsbuild/r_driveutl.h	2010-05-18 19:32:31.880850004 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/rofsbuild/r_driveutl.h	2010-05-15 14:32:45.000000000 +0100
@@ -24,6 +24,6 @@
 #include <e32def.h>
 
 TInt Getlogfile(TText *aDriveObeyFileName,TText* &aPadLogFile);
-TAny GetLocalTime(TAny);
+TAny GetLocalTime();
 
 #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/imgtools/romtools/rofsbuild/r_obey.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/rofsbuild/r_obey.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/romtools/rofsbuild/r_obey.cpp	2010-05-18 19:32:31.880850004 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/rofsbuild/r_obey.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -47,6 +47,7 @@
 #include <time.h>
 #include <assert.h>
 #include <errno.h>
+#include <limits.h>
 
 #include <e32std.h>
 #include <e32std_private.h>
@@ -283,7 +284,7 @@
 	iCurrentLine++;
 	iCurrentMark = ftell(iObeyFile);
 	iLine[0]='\0';
-	fgets((char*)iLine,imaxLength+1,iObeyFile);
+	char *cp = fgets((char*)iLine,imaxLength+1,iObeyFile); (void)cp;
 	iCurrentObeyStatement = new TText[imaxLength+1];
 	strcpy((char*)iCurrentObeyStatement,(char*)iLine);
 	iNumWords = Parse();
@@ -646,13 +647,7 @@
 		{
 		  if (keyword == EKeywordCoreImage)
 			  {
-  			  #if defined(__TOOLS2__) && defined (_STLP_THREADS)
-  			  istringstream val(iReader.Word(1),(ios_base::in+ios_base::out));	  
-  			  #elif __TOOLS2__
-  			  istringstream val(iReader.Word(1),(std::_Ios_Openmode)(ios_base::in+ios_base::out));
-			  #else
-			  istrstream val(iReader.Word(1),strlen(iReader.Word(1)));
-			  #endif
+			istringstream val(iReader.Word(1),ios_base::in|ios_base::out);	  
 			  iReader.CopyWord(1, coreImageFileName);
 			  iReader.MarkNext(); // ready for processing extension
 			  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/imgtools/romtools/rofsbuild/rofsbuild.mmp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/rofsbuild/rofsbuild.mmp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/romtools/rofsbuild/rofsbuild.mmp	2010-05-18 19:32:31.880850004 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/rofsbuild/rofsbuild.mmp	2010-05-15 14:32:45.000000000 +0100
@@ -43,15 +43,16 @@
 USERINCLUDE   ../../imglib/inc ../../imglib/compress ../../imglib/filesystem/include 
 USERINCLUDE   ../../imglib/patchdataprocessor/include ../../imglib/parameterfileprocessor/include
 USERINCLUDE	  ../../imglib/memmap/include
+#ifndef TOOLS2_LINUX
 USERINCLUDE   ../../imglib/boostlibrary/
+#endif
 
 STATICLIBRARY 	filesystem 
 STATICLIBRARY   patchdataprocessor
 STATICLIBRARY   parameterfileprocessor
 STATICLIBRARY	memmap
 #ifdef TOOLS2_LINUX
-STATICLIBRARY   boost_thread-mgw34-mt-1_39_linux
-OPTION    GCC -pthread -O2 -Wno-uninitialized
+OPTION    GCC -pthread -O2 -Wno-uninitialized -lboost_thread-mt
 #else
 STATICLIBRARY   boost_thread-mgw34-mt-1_39_win32
 OPTION    GCC -mthreads -O2 -Wno-uninitialized
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/imgtools/romtools/rofsbuild/r_rofs.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/rofsbuild/r_rofs.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/romtools/rofsbuild/r_rofs.cpp	2010-05-18 19:32:31.880850004 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/rofsbuild/r_rofs.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -584,9 +584,10 @@
 			coffhead[0x54] = 0x20;
 
 			// now fill in the text segment size
-			*(TUint32 *) (&coffhead[0x18]) = ALIGN4K(iSizeUsed);
-			*(TUint32 *) (&coffhead[0x40]) = ALIGN4K(iSizeUsed);
-
+			TUint32 * p0x18 = reinterpret_cast<TUint32 *>(&coffhead[0x18]);
+			*p0x18 = ALIGN4K(iSizeUsed);
+			TUint32 * p0x40 = reinterpret_cast<TUint32 *>(&coffhead[0x40]);
+			*p0x40 = ALIGN4K(iSizeUsed);
 			os.write(reinterpret_cast<char *>(coffhead), sizeof(coffhead));
 			}
 		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/imgtools/romtools/rombuild/r_areaset.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/rombuild/r_areaset.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/romtools/rombuild/r_areaset.cpp	2010-05-18 19:32:31.884849046 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/rombuild/r_areaset.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -47,7 +47,7 @@
 Area::~Area()
 	{
 	ReleaseAllFiles();
-	free(const_cast<char*>(iName));	// allocated with strdup()
+	free(iName);	// allocated with strdup()
 	}
 
 
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/imgtools/romtools/rombuild/r_areaset.h /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/rombuild/r_areaset.h
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/romtools/rombuild/r_areaset.h	2010-05-18 19:32:31.884849046 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/rombuild/r_areaset.h	2010-05-15 14:32:45.000000000 +0100
@@ -104,7 +104,7 @@
 public:
 	TRomBuilderEntry* iFirstPagedCode; // For PagedRom only
 private:
-	const char* iName;
+	char* iName;
 	TLinAddr iDestBaseAddr;
 	TLinAddr iSrcBaseAddr;
 	TLinAddr iSrcLimitAddr;
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/imgtools/romtools/rombuild/r_obey.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/rombuild/r_obey.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/romtools/rombuild/r_obey.cpp	2010-05-18 19:32:31.888848507 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/rombuild/r_obey.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -301,7 +301,7 @@
 	iCurrentLine++;
 	iCurrentMark = ftell(iObeyFile);
 	iLine[0]='\0';
-	fgets((char*)iLine,imaxLength+1,iObeyFile);
+	char * cp = fgets((char*)iLine,imaxLength+1,iObeyFile); (void)cp;
 	iNumWords = Parse();
 	return KErrNone;
 	}
@@ -2973,13 +2973,7 @@
 	{
 		if (keyword == EKeywordCoreImage)
 		{
-#if defined(__TOOLS2__) && defined (_STLP_THREADS)
-			istringstream val(iReader.Word(1),(ios_base::in+ios_base::out));	  
-#elif __TOOLS2__
-			istringstream val(iReader.Word(1),(std::_Ios_Openmode)(ios_base::in+ios_base::out));
-#else
-			istrstream val(iReader.Word(1),strlen(iReader.Word(1)));
-#endif
+			istringstream val(iReader.Word(1),ios_base::in|ios_base::out);
 			iReader.CopyWord(1, coreImageFileName);
 			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/imgtools/romtools/rombuild/rombuild.mmp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/rombuild/rombuild.mmp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/romtools/rombuild/rombuild.mmp	2010-05-18 19:32:31.892848597 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/rombuild/rombuild.mmp	2010-05-15 14:32:45.000000000 +0100
@@ -41,7 +41,9 @@
 userinclude	../../imglib/compress 	../../imglib/inc 
 userinclude	../../imglib/patchdataprocessor/include ../../imglib/parameterfileprocessor/include
 userinclude ../../imglib/memmap/include
+#ifndef TOOLS2_LINUX
 userinclude	../../imglib/boostlibrary/
+#endif
 
 OS_LAYER_SYSTEMINCLUDE_SYMBIAN
 
@@ -50,8 +52,7 @@
 staticlibrary 	memmap
 
 #ifdef TOOLS2_LINUX
-STATICLIBRARY   boost_thread-mgw34-mt-1_39_linux
-OPTION    GCC -O2 -Wno-uninitialized -pthread
+OPTION    GCC -pthread -O2 -Wno-uninitialized -lboost_thread-mt
 #else
 STATICLIBRARY   boost_thread-mgw34-mt-1_39_win32
 OPTION    GCC -O2 -Wno-uninitialized -mthreads
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/imgtools/romtools/rombuild/r_rom.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/rombuild/r_rom.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/romtools/rombuild/r_rom.cpp	2010-05-18 19:32:31.892848597 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/romtools/rombuild/r_rom.cpp	2010-05-15 14:32:45.000000000 +0100
@@ -1835,7 +1835,7 @@
 			TRomFile** l=rf->iPDeps;
 			FindMarked(MARK_EXE, MARK_EXE, l);
 			TInt nx=l-rf->iPDeps;
-			if (!e->IsDll() && (nx>1 || nx==1 && l[-1]!=rf))
+			if (!e->IsDll() && (nx>1 || (nx==1 && l[-1]!=rf)))
 				{
 				Print(EError,"EXE %s links to the following other EXEs:\n", e->iFileName);
 				TInt j;
@@ -2198,8 +2198,11 @@
 			coffhead[0x54] = 0x20;
 
 			// now fill in the text segment size
-			*(TUint32 *) (&coffhead[0x18]) = ALIGN4K(iSizeUsed);
-			*(TUint32 *) (&coffhead[0x40]) = ALIGN4K(iSizeUsed);
+			TUint32 * p0x18 = reinterpret_cast<TUint32 *>(&coffhead[0x18]);
+			*p0x18 = ALIGN4K(iSizeUsed);
+			TUint32 * p0x40 = reinterpret_cast<TUint32 *>(&coffhead[0x40]);
+			*p0x40 = ALIGN4K(iSizeUsed);
+
 
 			os.write(reinterpret_cast<char *>(coffhead), sizeof(coffhead));
 			}
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/imgtools/sisutils/inc/pkgfileparser.h /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/sisutils/inc/pkgfileparser.h
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/sisutils/inc/pkgfileparser.h	2010-05-18 19:32:31.896848966 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/sisutils/inc/pkgfileparser.h	2010-05-15 14:32:45.000000000 +0100
@@ -33,6 +33,10 @@
 
 #include "pkglanguage.h"
 
+int CompareTwoString(wchar_t const * string ,wchar_t const * option);
+int CompareNString(wchar_t const * string ,wchar_t const * option, int len);
+
+
 typedef class PkgParser PKGPARSER, *PPKGPARSER;
 
 //Data structures for pkg file parsing
@@ -147,7 +151,7 @@
 	int OpenFile();
 	void DeleteAll();
 
-	HANDLE iPkgHandle;
+	FILE * iPkgHandle;
 
 	LANGUAGE_LIST iLangList;
 	PKG_HEADER iPkgHeader;
@@ -162,7 +166,7 @@
 	void GetNextChar();
 	void GetNextToken();
 	bool GetStringToken();
-	WORD ParseEscapeChars();
+	unsigned short ParseEscapeChars();
 	void GetAlphaNumericToken();
 	bool IsNumericToken();
 	void GetNumericToken();
@@ -193,12 +197,12 @@
 	VARIANTVAL m_tokenValue;
 	int m_nLineNo;
 
-	void ParserError(char* msg);
+	void ParserError(char const* msg);
 
 	friend String wstring2string (const std::wstring& aWide);
 	friend std::wstring string2wstring (const String& aNarrow);
-	friend int CompareTwoString(wchar_t* string ,wchar_t* option);
-	friend int CompareNString(wchar_t* string ,wchar_t* option, int len);
+    friend int CompareTwoString(wchar_t const * string ,wchar_t const * option);
+    friend int CompareNString(wchar_t const * string ,wchar_t const * option, int len);
 };
 
 #endif //__PKGFILEPARSER_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/imgtools/sisutils/inc/pkglanguage.h /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/sisutils/inc/pkglanguage.h
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/sisutils/inc/pkglanguage.h	2010-05-18 19:32:31.896848966 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/sisutils/inc/pkglanguage.h	2010-05-15 14:32:45.000000000 +0100
@@ -26,7 +26,7 @@
 
 typedef struct
 {
-	wchar_t*		iName;
+	wchar_t const *		iName;
 	unsigned long	iId;
 } SKeyword;
 
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/imgtools/sisutils/inc/sis2iby.h /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/sisutils/inc/sis2iby.h
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/sisutils/inc/sis2iby.h	2010-05-18 19:32:31.896848966 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/sisutils/inc/sis2iby.h	2010-05-15 14:32:45.000000000 +0100
@@ -38,7 +38,7 @@
 class Sis2Iby : public SisUtils
 {
 public:
-	Sis2Iby(char* aFile);
+	Sis2Iby(char const* aFile);
 	~Sis2Iby();
 
 	void ProcessSisFile();
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/imgtools/sisutils/inc/sisutils.h /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/sisutils/inc/sisutils.h
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/sisutils/inc/sisutils.h	2010-05-18 19:32:31.896848966 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/sisutils/inc/sisutils.h	2010-05-15 14:32:45.000000000 +0100
@@ -40,6 +40,9 @@
 #ifdef WIN32
 #define PATHSEPARATOR  "\\"
 #endif
+#ifdef __LINUX__
+#define PATHSEPARATOR  "/"
+#endif
 
 //typedefs
 typedef std::string String;
@@ -53,7 +56,7 @@
 class SisUtils
 {
 public:
-	SisUtils(char* aFile);
+	SisUtils(char const* aFile);
 	virtual ~SisUtils();
 
 	void SetVerboseMode();
@@ -81,7 +84,7 @@
 class SisUtilsException
 {
 public:
-	SisUtilsException(char* aFile, char* aErrMessage);
+	SisUtilsException(char const* aFile, char const* aErrMessage);
 	virtual ~SisUtilsException();
 	virtual void Report();
 
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/imgtools/sisutils/src/pkgfileparser.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/sisutils/src/pkgfileparser.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/sisutils/src/pkgfileparser.cpp	2010-05-18 19:32:31.896848966 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/sisutils/src/pkgfileparser.cpp	2010-05-15 17:10:43.000000000 +0100
@@ -18,13 +18,16 @@
 
 #include "sisutils.h"
 #include "pkgfileparser.h"
+#include <vector>
+#include <wchar.h>
+#include <cstdlib>
 
 // Parse options lookups
 #define MAXTOKENLEN	30
 struct SParseToken
 {
-	WCHAR pszOpt[MAXTOKENLEN];
-	DWORD dwOpt;
+	wchar_t pszOpt[MAXTOKENLEN];
+	unsigned dwOpt;
 };
 
 const SParseToken KTokens[] =
@@ -46,6 +49,10 @@
 };
 #define NUMPARSETOKENS (sizeof(KTokens)/sizeof(SParseToken))
 
+std::wstring string2wstring (const String& aNarrow);
+String wstring2string (const std::wstring& aWide);
+
+
 /**
 Constructor: PkgParser class
 Initilize the parameters to data members.
@@ -68,9 +75,9 @@
 */
 PkgParser::~PkgParser()
 {
-	if(iPkgHandle != INVALID_HANDLE_VALUE)
+	if(iPkgHandle)
 	{
-		::CloseHandle(iPkgHandle);
+		std::fclose(iPkgHandle);
 	}
 
 	DeleteAll();
@@ -84,9 +91,14 @@
 */
 int PkgParser::OpenFile()
 {
-	iPkgHandle = ::CreateFileW(string2wstring(iPkgFile).data(),GENERIC_READ,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
+#ifdef WIN32
+	iPkgHandle = _wfopen(string2wstring(iPkgFile).c_str(),L"r");
+#else
+	// *nix fopen doesn't care about the filename encoding, as long as its NULL-terminated.
+	iPkgHandle = std::fopen(iPkgFile.c_str(),"r");
+#endif
+	return iPkgHandle ? 1 : 0;
 	
-	return (iPkgHandle != INVALID_HANDLE_VALUE) ? 1 : 0;
 }
 
 /**
@@ -164,7 +176,7 @@
 {
 	if(!OpenFile())
 	{
-		throw SisUtilsException((char*)iPkgFile.data(), "Could not open file");
+		throw SisUtilsException(iPkgFile.c_str(),"Could not open file");
 	}
 
 	GetNextChar();
@@ -273,7 +285,7 @@
 	
 	// process application names
 	ExpectToken('{');
-	for (WORD wNumLangs = 0; wNumLangs < iLangList.size(); wNumLangs++)
+	for (unsigned short wNumLangs = 0; wNumLangs < iLangList.size(); wNumLangs++)
 	{
 		GetNextToken ();
 		ExpectToken(QUOTED_STRING_TOKEN);
@@ -771,7 +783,7 @@
 */
 void PkgParser::ParseOptionsBlockL()
 {
-	WORD wNumLangs;
+	unsigned short wNumLangs;
 	
 	ExpectToken('(');
 	GetNextToken ();
@@ -838,7 +850,7 @@
 void PkgParser::ParseVendorNameL()
 {
 	ExpectToken('{');
-	for (WORD wNumLangs = 0; wNumLangs < iLangList.size(); wNumLangs++)
+	for (unsigned short wNumLangs = 0; wNumLangs < iLangList.size(); wNumLangs++)
 	{
 		GetNextToken ();
 		ExpectToken(QUOTED_STRING_TOKEN);
@@ -990,14 +1002,8 @@
 */
 void PkgParser::GetNextChar()
 {
-#ifdef WIN32
-	DWORD dwBytesRead;
-	if (!::ReadFile(iPkgHandle, (LPVOID)&m_pkgChar, sizeof(WCHAR), &dwBytesRead, NULL) ||
-		dwBytesRead!=sizeof(wchar_t))
-		m_pkgChar='\0';
-#else
-#error "TODO: Implement this function under other OS than Windows"
-#endif
+	wint_t wch = std::fgetwc(iPkgHandle);
+	m_pkgChar = (wch == WEOF) ? 0 : wch;
 }
 
 /**
@@ -1105,10 +1111,10 @@
 */
 bool PkgParser::GetStringToken()
 {
-	DWORD wCount = 0;
+	unsigned wCount = 0;
 	bool done=false;
 	bool finished=false;
-	DWORD escapeChars = 0;
+	unsigned escapeChars = 0;
 	
 	while (!finished)
 	{
@@ -1153,15 +1159,16 @@
 @internalComponent
 @released
 */
-WORD PkgParser::ParseEscapeChars()
+unsigned short PkgParser::ParseEscapeChars()
 {
-	WORD found=0;
-	WCHAR temp[MAX_STRING];
-#ifdef WIN32
+	unsigned short found=0;
+	wchar_t temp[MAX_STRING];
+
 	while (m_pkgChar == '<')
 	{
 		wcscpy(temp,m_tokenValue.pszString);
-		DWORD fileOffset=::SetFilePointer(iPkgHandle, 0L, NULL, FILE_CURRENT);
+		std::fpos_t foff;
+		std::fgetpos(iPkgHandle,&foff);
 		try
 		{
 			GetNextChar();
@@ -1170,32 +1177,29 @@
 				found++;
 			else
 			{
-				::SetFilePointer(iPkgHandle, fileOffset, NULL, FILE_BEGIN);
+				std::fsetpos(iPkgHandle,&foff);
 				break;
 			}
 		}
 		catch (...)
 		{
 			wcscpy(m_tokenValue.pszString,temp);
-			::SetFilePointer(iPkgHandle, fileOffset, NULL, FILE_BEGIN);
+			std::fsetpos(iPkgHandle,&foff);
 			break;
 		}
-		DWORD num=m_tokenValue.dwNumber;
+		unsigned num=m_tokenValue.dwNumber;
 		// watch for CP1252 escapes which aren't appropriate for UNICODE
 		if (num>=0x80 && num<=0x9F) ParserError("Invalid Escape");
-		DWORD len=wcslen(temp);
+		unsigned len=wcslen(temp);
 		wcscpy(m_tokenValue.pszString,temp);
 		if (len+2<=MAX_STRING)
 		{
-			m_tokenValue.pszString[len]=(WCHAR)num;
+			m_tokenValue.pszString[len]=(wchar_t)num;
 			len++;
 			m_tokenValue.pszString[len]='\0';
 		}
 		GetNextChar();
 	}
-#else
-#error "TODO: Implement this function under other OS than Windows"
-#endif 
 	return found;
 }
 
@@ -1207,7 +1211,7 @@
 */
 void PkgParser::GetAlphaNumericToken()
 {
-	WORD wCount = 0;
+	unsigned short wCount = 0;
 	while(m_pkgChar && (isalnum(m_pkgChar) || ((m_pkgChar) == '_')))
 	{
 		if(wCount < (MAX_STRING - 1))
@@ -1232,12 +1236,13 @@
 	{
 		// we may have a number but we must look ahead one char to be certain
 		
-		WCHAR oldChar = m_pkgChar;
-		DWORD fileOffset=::SetFilePointer(iPkgHandle, 0L, NULL, FILE_CURRENT);
+		wchar_t oldChar = m_pkgChar;
+		std::fpos_t foff;
+		std::fgetpos(iPkgHandle,&foff);
 		GetNextChar();
 		lexemeIsNumber = iswdigit(m_pkgChar) != FALSE;
 		m_pkgChar = oldChar;
-		::SetFilePointer(iPkgHandle,fileOffset,NULL,FILE_BEGIN);
+		std::fsetpos(iPkgHandle,&foff);
 	}
 	
 	return lexemeIsNumber;
@@ -1251,23 +1256,30 @@
 */
 void PkgParser::GetNumericToken()
 {
-	WCHAR temp[MAX_STRING];
-	LPWSTR end;
+	wchar_t temp[MAX_STRING];
+	wchar_t * end;
 	bool hexString = false;
-	DWORD dwBytesRead;
-	DWORD fileOffset=::SetFilePointer(iPkgHandle, 0L, NULL, FILE_CURRENT);
+	std::fpos_t foff;
+	std::fgetpos(iPkgHandle,&foff);
 	
 	temp[0]=m_pkgChar;
-	if (!::ReadFile(iPkgHandle, &temp[1], (MAX_STRING-2)*sizeof(WCHAR), &dwBytesRead, NULL) ||
-		dwBytesRead==0)
+	unsigned wchRead = fread(&temp[1],sizeof(wchar_t),MAX_STRING - 2,iPkgHandle);
+	if (!wchRead)
+	{ 
 		ParserError("Read failed");
-	temp[1+dwBytesRead/sizeof(WCHAR)]='\0';
-	hexString = (!CompareNString(temp, L"0x", 2) || !CompareNString(&temp[1], L"0x", 2));
+	}
+	temp[1+wchRead] = 0;
+	hexString = (!CompareNString(temp,L"0x", 2) ||
+		!CompareNString(&temp[1],L"0x", 2));
 	
 	m_tokenValue.dwNumber = wcstoul(temp, &end, (hexString) ? 16 : 10);
 	
-	if (end==temp) ParserError("Read failed"); 
-	::SetFilePointer(iPkgHandle, fileOffset+(end-temp-1)*sizeof(WCHAR), NULL, FILE_BEGIN);
+	if (end==temp)
+	{
+		ParserError("Read failed");
+	}
+	std::fsetpos(iPkgHandle,&foff);
+	std::fseek(iPkgHandle,(end-temp-1) * sizeof(wchar_t),SEEK_CUR);		
 	GetNextChar();
 }
 
@@ -1338,13 +1350,13 @@
 
 @param msg - error message to be thrown
 */
-void PkgParser::ParserError(char* msg)
+void PkgParser::ParserError(char const* msg)
 {
 	std::ostringstream str;
 
 	str << (char*)iPkgFile.data() << "(" << m_nLineNo << "): " << msg;
 
-	throw SisUtilsException("PakageFile-Parser Error", (char*)(str.str()).data());
+	throw SisUtilsException("PackageFile-Parser Error",str.str().c_str());
 }
 
 /**
@@ -1357,22 +1369,13 @@
 */
 String wstring2string (const std::wstring& aWide)
 {
-	int max = ::WideCharToMultiByte(CP_OEMCP,0,aWide.c_str(),aWide.length(),0,0,0,0);
-	String reply;
-	if (max > 0 )
-	{
-		char* buffer = new char [max];
-		try
+	std::vector<char> buffer((aWide.length() * sizeof(wchar_t)) + 1, '\0');
+	size_t nchars = wcstombs(&buffer[0],aWide.c_str(),buffer.size());
+	if (nchars == (size_t)-1)
 		{
-			::WideCharToMultiByte(CP_OEMCP,0,aWide.c_str(),aWide.length(),buffer,max,0,0);
-			reply = String (buffer, max);
-		}
-		catch (...)
-		{
-			throw SisUtilsException("ParserError", "wstring to string conversion failed");
-		}
-		delete [] buffer;
+		throw SisUtilsException("ParserError","wstring to string conversion failed");
 	}
+	String reply(&buffer[0]);
 	return reply;
 }
 
@@ -1386,22 +1389,13 @@
 */
 std::wstring string2wstring (const String& aNarrow)
 {
-	int max = ::MultiByteToWideChar(CP_OEMCP,0,aNarrow.c_str(),aNarrow.length(),0,0);
-	std::wstring reply;
-	if (max > 0 )
+	std::vector<char> buffer(mblen(aNarrow.c_str(),aNarrow.length()) + 2, '\0');
+	size_t nchars = mbstowcs((wchar_t *)&buffer[0],aNarrow.c_str(),buffer.size());
+	if (nchars == (size_t)-1)
 	{
-		wchar_t* buffer = new wchar_t [max];
-		try
-		{
-			::MultiByteToWideChar(CP_OEMCP,0,aNarrow.c_str(),aNarrow.length(),buffer,max);
-			reply = std::wstring (buffer, max);
-		}
-		catch (...)
-		{
-			throw SisUtilsException("ParserError", "string to wstring conversion failed");
-		}
-		delete [] buffer;
+		throw SisUtilsException("ParserError","string to wstring conversion failed");
 	}
+	std::wstring reply((wchar_t *)&buffer[0]);
 	return reply;
 }
 
@@ -1414,9 +1408,13 @@
 @param string - first string
 @param option - second string
 */
-int CompareTwoString(wchar_t* string ,wchar_t* option)
+int CompareTwoString(wchar_t const * string ,wchar_t const * option)
 {
+#if defined(WIN32)
 	return wcsicmp(string,option);
+#elif defined(__LINUX__)
+	return wcscasecmp(string,option);
+#endif
 }
 
 /**
@@ -1429,7 +1427,7 @@
 @param option - second string
 @param len - no of wide characters to be compared
 */
-int CompareNString(wchar_t* string ,wchar_t* option, int len)
+int CompareNString(wchar_t const * string ,wchar_t const * option, int len)
 {
-	return wcsnicmp(string,option,len);
+	return wmemcmp(string,option,len);
 }
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/imgtools/sisutils/src/sis2iby.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/sisutils/src/sis2iby.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/sisutils/src/sis2iby.cpp	2010-05-18 19:32:31.896848966 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/sisutils/src/sis2iby.cpp	2010-05-15 17:08:28.000000000 +0100
@@ -18,6 +18,7 @@
 
 #include "sisutils.h"
 #include "sis2iby.h"
+#include <cstdlib>
 
 /**
 Constructor: Sis2Iby class
@@ -28,7 +29,7 @@
 
 @param aFile	- SIS file name
 */
-Sis2Iby::Sis2Iby(char* aFile) : SisUtils(aFile)
+Sis2Iby::Sis2Iby(char const* aFile) : SisUtils(aFile)
 {
 }
 
@@ -70,7 +71,7 @@
 
 	if(IsVerboseMode())
 	{
-		std::cout << "Processing " << (char*)sisFile.data() << std::endl;
+		std::cout << "Processing " << sisFile.c_str() << std::endl;
 	}
 
 	if(IsFileExist(sisFile))
@@ -86,12 +87,12 @@
 			break;
 		case STAT_FAILURE:
 			{
-				throw SisUtilsException((char*)sisFile.data(), "Failed to extract SIS file");
+				throw SisUtilsException(sisFile.c_str(),"Failed to extract SIS file");
 			}
 		}
 	}
 	else
-		throw SisUtilsException((char*)sisFile.data(), "File not found");
+		throw SisUtilsException(sisFile.c_str(),"File not found");
 }
 
 /**
@@ -128,18 +129,18 @@
 	ibyFile.append(".iby");
 
 	if( !MakeDirectory(iOutputPath) )
-		throw SisUtilsException((char*)iOutputPath.data(), "Failed to create path");
+		throw SisUtilsException(iOutputPath.c_str(),"Failed to create path");
 
 	if(IsVerboseMode())
 	{
-		std::cout << "Generating IBY file " << (char*)ibyFile.data() << std::endl;
+		std::cout << "Generating IBY file " << ibyFile.c_str() << std::endl;
 	}
 
 	ibyHandle.open((char*)ibyFile.data(),(std::ios::out));
 
 	if(!ibyHandle.good())
 	{
-		throw SisUtilsException((char*)ibyFile.data(), "Failed to create IBY file");
+		throw SisUtilsException(ibyFile.c_str(),"Failed to create IBY file");
 	}
 
 	// Generating Header
@@ -239,10 +240,10 @@
 			}
 		}
 		else
-			throw SisUtilsException((char*)pkgFileName.data(), "Could not create parser object");
+			throw SisUtilsException(pkgFileName.c_str(),"Could not create parser object");
 	}
 	else
-		throw SisUtilsException((char*)pkgFileName.data(), "File not found");
+		throw SisUtilsException(pkgFileName.c_str(),"File not found");
 }
 
 /**
@@ -551,7 +552,12 @@
 		aFile.assign(fPath);
 	}
 #else
-#error "TODO: Implement this function under other OS than Windows"
+	char fPath[FILENAME_MAX];
+	if (realpath(aFile.c_str(),fPath))
+	{
+		aFile.assign(fPath);
+	}
+
 #endif
 	return;
 }
@@ -652,7 +658,7 @@
 
 	if( !aIfs.is_open() )
 	{
-		throw SisUtilsException((char*)aFile.data(), "Cannot open file");
+		throw SisUtilsException(aFile.c_str(),"Cannot open file");
 	}
 
 	aIfs.seekg(0,std::ios::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/imgtools/sisutils/src/sisutils.cpp /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/sisutils/src/sisutils.cpp
--- /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/imgtools/sisutils/src/sisutils.cpp	2010-05-18 19:32:31.896848966 +0100
+++ /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/imgtools/sisutils/src/sisutils.cpp	2010-05-15 17:05:31.000000000 +0100
@@ -20,6 +20,13 @@
 #include <windows.h>
 #include <direct.h>
 #endif
+#ifdef __LINUX__
+#include <vector>
+#include <cerrno>
+#include <sys/wait.h>
+#include <sys/stat.h>
+#endif
+
 
 #include "sisutils.h"
 
@@ -33,7 +40,7 @@
 @param aFile	- Name of the file
 @param aErrMessage - Error message
 */
-SisUtilsException::SisUtilsException(char* aFile, char* aErrMessage) : \
+SisUtilsException::SisUtilsException(char const* aFile, char const* aErrMessage) : \
 	iSisFileName(aFile), iErrMessage(aErrMessage)
 {
 }
@@ -72,7 +79,7 @@
 
 @param aFile	- Name of the SIS file
 */
-SisUtils::SisUtils(char* aFile) :  iVerboseMode(EFalse),iSisFile(aFile)
+SisUtils::SisUtils(char const* aFile) :  iVerboseMode(EFalse),iSisFile(aFile)
 {
 }
 
@@ -201,9 +208,47 @@
 	::CloseHandle( pi.hProcess );
 	::CloseHandle( pi.hThread );
 #else
-#error "TODO: Implement this function under other OS than Windows"
+	String::iterator pch = cmd.begin();
+	String::iterator end = cmd.end();
+	char *token = NULL;
+	std::vector<char *> args;
+	for ( ;pch != end; ++pch)
+	{
+		if (isspace(*pch))
+		{
+			*pch = '\0';
+			if (token) {
+				token = NULL;
+			}
+		}
+		else if (!token)
+		{
+			token = &*pch;
+			args.push_back(token);
+		}  
+	}
+	args.push_back((char *)NULL);
+    pid_t pid = fork();
+    if (pid == 0)
+	{
+        execv(args[0],&args[0]);
+    }
+    else if (pid < 0)
+	{
+        iExitCode = static_cast<TUint32>(STAT_FAILURE);
+    }
+    else
+	{
+		int rtc;
+        pid_t ws = waitpid( pid, &rtc, 0);
+        if (ws != pid) {
+            iExitCode = static_cast<TUint32>(STAT_FAILURE);
+        }
+		else {
+			iExitCode = rtc;
+		}
+    }
 #endif
-
 	return iExitCode;
 }
 
@@ -281,7 +326,13 @@
 			}
 		}
 #else
-#error "TODO: Implement this function under other OS than Windows"
+		if(mkdir(dir.data(),777) != 0)
+		{
+			if(errno != EEXIST)
+			{
+				status = EFalse;
+			}
+		}
 #endif
 		if(status == EFalse)
 			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
@@ -15,6 +15,6 @@
 *
 */
 
-../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
+../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: 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
@@ -1,5 +1,5 @@
 #!/bin/bash
-# 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,7 +17,7 @@
 #
 
 # If SBS_HOME is not set in the environment then work it out
-# from the path to this batch file
+# from the path to this script
 if [ -z "$SBS_HOME" ] ; then
 	temp=$0
 	SBS_HOME=$(cd ${temp%/*} && echo $PWD)
@@ -62,31 +62,47 @@
 fi
 
 if [ "$OSTYPE" == "cygwin" ]; then
-
-	SBS_HOME=${SBS_HOME//\\//}
-
 	__MINGW__=${SBS_MINGW:-$SBS_HOME/$HOSTPLATFORM_DIR/mingw}
 	__CYGWIN__=${SBS_CYGWIN:-$SBS_HOME/$HOSTPLATFORM_DIR/cygwin}
-	__PYTHON__=${SBS_PYTHON:-$SBS_HOME/$HOSTPLATFORM_DIR/python252/python.exe}
 
     # Command for unifying path strings. For example, "c:\some\path" and
     # "/cygdrive/c/some/path" will both be converted into "c:/some/path".
 	u="$__CYGWIN__/bin/cygpath.exe -m"
 
-	__MINGW__=$($u "$__MINGW__")
-	__CYGWIN__=$($u "$__MINGW__")
-	__PYTHON__=$($u "$__PYTHON__")
-
+	SBS_HOME=${SBS_HOME//\\//}
 	export SBS_HOME=$($u "$SBS_HOME")
-	export EPOCROOT=$($u "$EPOCROOT")
 
+	__MINGW__=$($u "$__MINGW__")
+	__CYGWIN__=$($u "$__MINGW__")
 	export PATH=${__MINGW__}/bin:${__CYGWIN__}/bin:$SBS_HOME/$HOSTPLATFORM_DIR/bin:$PATH
 
 	# Tell Cygwin not to map unix security attributes to windows to
 	# prevent raptor from potentially creating read-only files:
 	export CYGWIN='nontsec nosmbntsec'
 
+	# The python and PYTHONPATH used by Raptor are determined by, in order of precedence:
+	#  1. the SBS_PYTHON and SBS_PYTHONPATH environment variables (if set)
+	#  2. the python shipped locally with Raptor (if present)
+	#  3. the python on the system PATH and the PYTHONPATH set in the system environment
+
+	__LOCAL_PYTHON__=$SBS_HOME/win32/python264/python.exe
+
+	if [ -n "$SBS_PYTHON" ]; then
+		__PYTHON__=$SBS_PYTHON
+	elif [ -f "$__LOCAL_PYTHON__" ]; then
+		__PYTHON__=$__LOCAL_PYTHON__
+		export SBS_PYTHON=$__PYTHON__
+		export PYTHONPATH=
+	else
+		__PYTHON__=python.exe
+	fi
+	__PYTHON__=$($u "$__PYTHON__")		
+
+	if [ -n "$SBS_PYTHONPATH" ]; then
+		export PYTHONPATH=$($u "$SBS_PYTHONPATH")
+	fi
 else
+	export PYTHONPATH=${SBS_PYTHONPATH:-$SBS_HOME/$HOSTPLATFORM_DIR/python262/lib}
 	PATH=$SBS_HOME/$HOSTPLATFORM_DIR/python262/bin:$SBS_HOME/$HOSTPLATFORM_DIR/bin:$PATH
 	LD_LIBRARY_PATH=$SBS_HOME/$HOSTPLATFORM_DIR/python262/lib:$SBS_HOME/$HOSTPLATFORM_DIR/bv/lib:$LD_LIBRARY_PATH
 
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
@@ -1,5 +1,5 @@
 @rem
-@rem Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 @rem All rights reserved.
 @rem This component and the accompanying materials are made available
 @rem under the terms of the License "Eclipse Public License v1.0"
@@ -15,43 +15,7 @@
 @rem
 
 @SETLOCAL
-@SET HOSTPLATFORM=win 32
-@SET HOSTPLATFORM_DIR=win32
-
-
-@REM Automatically find SBS_HOME if it is not set
-@IF NOT "%SBS_HOME%"==""  goto foundhome
-@SET RAPTORBINDIR=%~dp0
-@SET WD=%cd%
-@cd %RAPTORBINDIR%\..
-@SET SBS_HOME=%cd%
-@cd %WD%
-:foundhome 
-
-@REM Use the python set by the environment if possible
-@SET __PYTHON__=%SBS_PYTHON%
-@IF "%__PYTHON__%"=="" SET __PYTHON__=%SBS_HOME%\win32\python252\python.exe
-
-@REM Use the mingw set by the environment if possible
-@SET __MINGW__=%SBS_MINGW%
-@IF "%__MINGW__%"=="" SET __MINGW__=%SBS_HOME%\win32\mingw
-
-@REM Use the cygwin set by the environment if possible
-@SET __CYGWIN__=%SBS_CYGWIN%
-@IF "%__CYGWIN__%"=="" SET __CYGWIN__=%SBS_HOME%\win32\cygwin
-
-@REM add to the search path
-@SET PATH=%__MINGW__%\bin;%__CYGWIN__%\bin;%SBS_HOME%\win32\bin;%PATH%
-
-@REM Make sure that /tmp is not set incorrectly for sbs
-@umount -u /tmp >NUL  2>NUL
-@mount -u %TEMP% /tmp >NUL 2>NUL
-@umount -u / >NUL  2>NUL
-@mount -u %__CYGWIN__% / >NUL 2>NUL
-
-@REM Tell CYGWIN not to map unix security attributes to windows to
-@REM prevent raptor from potentially creating read-only files:
-@set CYGWIN=nontsec nosmbntsec
+@CALL "%~dp0sbs_env.bat"
 
 @REM Run Raptor with all the arguments.
 @%__PYTHON__% %SBS_HOME%\python\raptor_start.py %*
Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/bin: sbs_check_exports.py
Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/bin: sbs_env.bat
Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/bin: sbs_filter
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/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
@@ -15,209 +15,209 @@
 *
 */
 
-../RELEASE-NOTES.txt /tools/sbs/RELEASE-NOTES.txt
-../bin/sbs /tools/sbs/bin/sbs
-../bin/fixmeta.py /tools/sbs/bin/fixmeta.py
-../bin/codetest_osbuild.sh /tools/sbs/bin/codetest_osbuild.sh
-../bin/countbinaries.sh /tools/sbs/bin/countbinaries.sh
-../bin/gethost.sh /tools/sbs/bin/gethost.sh
-../bin/failedstats.py /tools/sbs/bin/failedstats.py
-../bin/sbs.bat /tools/sbs/bin/sbs.bat
-../bin/unsplitdirs.py /tools/sbs/bin/unsplitdirs.py
-../bin/buildstats.py /tools/sbs/bin/buildstats.py
-../bin/speedtest_osbuild.sh /tools/sbs/bin/speedtest_osbuild.sh
-../bin/sbsv2cache.py /tools/sbs/bin/sbsv2cache.py
-../bin/whatsource.py /tools/sbs/bin/whatsource.py
-../bin/oby2linux.py /tools/sbs/bin/oby2linux.py
-../bin/createrfifile.pl /tools/sbs/bin/createrfifile.pl
-../bin/vartoxml.py /tools/sbs/bin/vartoxml.py
-../bin/readme.txt /tools/sbs/bin/readme.txt
-../bin/squashlog.py /tools/sbs/bin/squashlog.py
-../bin/statcollate.py /tools/sbs/bin/statcollate.py
-../bin/createvmap.py /tools/sbs/bin/createvmap.py
-../bin/raptorlog.py /tools/sbs/bin/raptorlog.py
-../bin/osbuild.sh /tools/sbs/bin/osbuild.sh
-../bin/setup_user.sh /tools/sbs/bin/setup_user.sh
-../bin/msvcr71.dll /tools/sbs/bin/msvcr71.dll
-../bin/install_raptor.sh /tools/sbs/bin/install_raptor.sh
-../bin/mkgetfailed.py /tools/sbs/bin/mkgetfailed.py
-../examples/os_properties.xml /tools/sbs/examples/os_properties.xml
-../examples/sbs_init.xml /tools/sbs/examples/sbs_init.xml
-../lib/flm/e32abiv2stdexe.flm /tools/sbs/lib/flm/e32abiv2stdexe.flm
-../lib/flm/user/default.flm_ex /tools/sbs/lib/flm/user/default.flm_ex
-../lib/flm/user/globals.mk_ex /tools/sbs/lib/flm/user/globals.mk_ex
-../lib/flm/e32abiv2dll.flm /tools/sbs/lib/flm/e32abiv2dll.flm
-../lib/flm/tracecompiler.mk /tools/sbs/lib/flm/tracecompiler.mk
-../lib/flm/win32exe.flm /tools/sbs/lib/flm/win32exe.flm
-../lib/flm/template_ext.flm /tools/sbs/lib/flm/template_ext.flm
-../lib/flm/e32abiv2ani.flm /tools/sbs/lib/flm/e32abiv2ani.flm
-../lib/flm/converged-comms/createcommdbs.flm /tools/sbs/lib/flm/converged-comms/createcommdbs.flm
-../lib/flm/converged-comms/installdefaultcommdb.flm /tools/sbs/lib/flm/converged-comms/installdefaultcommdb.flm
-../lib/flm/win32plugin.flm /tools/sbs/lib/flm/win32plugin.flm
-../lib/flm/win32klib.flm /tools/sbs/lib/flm/win32klib.flm
-../lib/flm/extensions.xml /tools/sbs/lib/flm/extensions.xml
-../lib/flm/stack.mk /tools/sbs/lib/flm/stack.mk
-../lib/flm/globals.mk /tools/sbs/lib/flm/globals.mk
-../lib/flm/win32stdexe.flm /tools/sbs/lib/flm/win32stdexe.flm
-../lib/flm/e32abiv2lib.flm /tools/sbs/lib/flm/e32abiv2lib.flm
-../lib/flm/win32resource.flm /tools/sbs/lib/flm/win32resource.flm
-../lib/flm/config/default.flm /tools/sbs/lib/flm/config/default.flm
-../lib/flm/win32lib.flm /tools/sbs/lib/flm/win32lib.flm
-../lib/flm/null.flm /tools/sbs/lib/flm/null.flm
-../lib/flm/tools/test_command_diff.sh /tools/sbs/lib/flm/tools/test_command_diff.sh
-../lib/flm/tools/stlport.flm /tools/sbs/lib/flm/tools/stlport.flm
-../lib/flm/tools/buildstubsis.flm /tools/sbs/lib/flm/tools/buildstubsis.flm
-../lib/flm/msvctools.xml /tools/sbs/lib/flm/msvctools.xml
-../lib/flm/tools2lib.flm /tools/sbs/lib/flm/tools2lib.flm
-../lib/flm/win32ldd.flm /tools/sbs/lib/flm/win32ldd.flm
-../lib/flm/tools.xml /tools/sbs/lib/flm/tools.xml
-../lib/flm/metaflm.mk /tools/sbs/lib/flm/metaflm.mk
-../lib/flm/e32abiv2ldd.flm /tools/sbs/lib/flm/e32abiv2ldd.flm
-../lib/flm/e32abiv2pdl.flm /tools/sbs/lib/flm/e32abiv2pdl.flm
-../lib/flm/e32abiv2stdlib.flm /tools/sbs/lib/flm/e32abiv2stdlib.flm
-../lib/flm/config.xml /tools/sbs/lib/flm/config.xml
-../lib/flm/win32stddll.flm /tools/sbs/lib/flm/win32stddll.flm
-../lib/flm/gccxmlresource.flm /tools/sbs/lib/flm/gccxmlresource.flm
-../lib/flm/e32abiv2textnotifier2.flm /tools/sbs/lib/flm/e32abiv2textnotifier2.flm
-../lib/flm/e32abiv2implib.flm /tools/sbs/lib/flm/e32abiv2implib.flm
-../lib/flm/e32abiv2exe.flm /tools/sbs/lib/flm/e32abiv2exe.flm
-../lib/flm/win32pdl.flm /tools/sbs/lib/flm/win32pdl.flm
-../lib/flm/win32.flm /tools/sbs/lib/flm/win32.flm
-../lib/flm/base.xml /tools/sbs/lib/flm/base.xml
-../lib/flm/grouping.flm /tools/sbs/lib/flm/grouping.flm
-../lib/flm/e32abiv2.flm /tools/sbs/lib/flm/e32abiv2.flm
-../lib/flm/e32abiv2exexp.flm /tools/sbs/lib/flm/e32abiv2exexp.flm
-../lib/flm/e32abiv2defaults.mk /tools/sbs/lib/flm/e32abiv2defaults.mk
-../lib/flm/e32abiv2fsy.flm /tools/sbs/lib/flm/e32abiv2fsy.flm
-../lib/flm/final.mk /tools/sbs/lib/flm/final.mk
-../lib/flm/none.flm /tools/sbs/lib/flm/none.flm
-../lib/flm/analysis.xml /tools/sbs/lib/flm/analysis.xml
-../lib/flm/e32abiv2var2.flm /tools/sbs/lib/flm/e32abiv2var2.flm
-../lib/flm/msvctools.flm /tools/sbs/lib/flm/msvctools.flm
-../lib/flm/win32kdll.flm /tools/sbs/lib/flm/win32kdll.flm
-../lib/flm/win32ani.flm /tools/sbs/lib/flm/win32ani.flm
-../lib/flm/e32abiv2plugin.flm /tools/sbs/lib/flm/e32abiv2plugin.flm
-../lib/flm/win32bitmap.flm /tools/sbs/lib/flm/win32bitmap.flm
-../lib/flm/tools2common.flm /tools/sbs/lib/flm/tools2common.flm
-../lib/flm/win32fsy.flm /tools/sbs/lib/flm/win32fsy.flm
-../lib/flm/readme.txt /tools/sbs/lib/flm/readme.txt
-../lib/flm/e32abiv2kext.flm /tools/sbs/lib/flm/e32abiv2kext.flm
-../lib/flm/e32abiv2stddll.flm /tools/sbs/lib/flm/e32abiv2stddll.flm
-../lib/flm/win32exexp.flm /tools/sbs/lib/flm/win32exexp.flm
-../lib/flm/stringtable.flm /tools/sbs/lib/flm/stringtable.flm
-../lib/flm/utils/utility.xml /tools/sbs/lib/flm/utils/utility.xml
-../lib/flm/utils/prebuilt.flm /tools/sbs/lib/flm/utils/prebuilt.flm
-../lib/flm/utils/copydir.flm /tools/sbs/lib/flm/utils/copydir.flm
-../lib/flm/win32pdd.flm /tools/sbs/lib/flm/win32pdd.flm
-../lib/flm/taggedrules.mk /tools/sbs/lib/flm/taggedrules.mk
-../lib/flm/booleanlogic.mk /tools/sbs/lib/flm/booleanlogic.mk
-../lib/flm/emulator.xml /tools/sbs/lib/flm/emulator.xml
-../lib/flm/win32kext.flm /tools/sbs/lib/flm/win32kext.flm
-../lib/flm/test/exeabiv2_2/test.cpp /tools/sbs/lib/flm/test/exeabiv2_2/test.cpp
-../lib/flm/test/exeabiv2_2/test_function.cpp /tools/sbs/lib/flm/test/exeabiv2_2/test_function.cpp
-../lib/flm/test/exeabiv2_2/exeabiv2_2.mk /tools/sbs/lib/flm/test/exeabiv2_2/exeabiv2_2.mk
-../lib/flm/test/templateext/temex.mk /tools/sbs/lib/flm/test/templateext/temex.mk
-../lib/flm/test/templateext/Makefile /tools/sbs/lib/flm/test/templateext/Makefile
-../lib/flm/test/Makefile /tools/sbs/lib/flm/test/Makefile
-../lib/flm/test/exeabiv2_4/test.cpp /tools/sbs/lib/flm/test/exeabiv2_4/test.cpp
-../lib/flm/test/exeabiv2_4/exeabiv2_4.mk /tools/sbs/lib/flm/test/exeabiv2_4/exeabiv2_4.mk
-../lib/flm/test/exeabiv2_4/test_big.cpp /tools/sbs/lib/flm/test/exeabiv2_4/test_big.cpp
-../lib/flm/test/flmtests.mk /tools/sbs/lib/flm/test/flmtests.mk
-../lib/flm/test/ciaabiv2_1/uc_exe.cia /tools/sbs/lib/flm/test/ciaabiv2_1/uc_exe.cia
-../lib/flm/test/ciaabiv2_1/uc_exe.cpp /tools/sbs/lib/flm/test/ciaabiv2_1/uc_exe.cpp
-../lib/flm/test/ciaabiv2_1/ciaabiv2_1.mk /tools/sbs/lib/flm/test/ciaabiv2_1/ciaabiv2_1.mk
-../lib/flm/test/export1/Makefile /tools/sbs/lib/flm/test/export1/Makefile
-../lib/flm/test/export1/t1e.h /tools/sbs/lib/flm/test/export1/t1e.h
-../lib/flm/test/export1/t4e.h /tools/sbs/lib/flm/test/export1/t4e.h
-../lib/flm/test/export1/t2e.h /tools/sbs/lib/flm/test/export1/t2e.h
-../lib/flm/test/export1/t3e.h /tools/sbs/lib/flm/test/export1/t3e.h
-../lib/flm/test/dllabiv2_1/test.cpp /tools/sbs/lib/flm/test/dllabiv2_1/test.cpp
-../lib/flm/test/dllabiv2_1/dllabiv2_1.mk /tools/sbs/lib/flm/test/dllabiv2_1/dllabiv2_1.mk
-../lib/flm/test/raptorglue/raptorglue.mk /tools/sbs/lib/flm/test/raptorglue/raptorglue.mk
-../lib/flm/test/dllbasictests.mk /tools/sbs/lib/flm/test/dllbasictests.mk
-../lib/flm/test/exeabiv2_1/test.cpp /tools/sbs/lib/flm/test/exeabiv2_1/test.cpp
-../lib/flm/test/exeabiv2_1/exeabiv2_1.mk /tools/sbs/lib/flm/test/exeabiv2_1/exeabiv2_1.mk
-../lib/flm/test/dllabiv2_defaults.mk /tools/sbs/lib/flm/test/dllabiv2_defaults.mk
-../lib/flm/test/exeperftests.mk /tools/sbs/lib/flm/test/exeperftests.mk
-../lib/flm/test/ciatests.mk /tools/sbs/lib/flm/test/ciatests.mk
-../lib/flm/test/environment/pvm/pvmtest.mk /tools/sbs/lib/flm/test/environment/pvm/pvmtest.mk
-../lib/flm/test/environment/make/test_variable_restore.mk /tools/sbs/lib/flm/test/environment/make/test_variable_restore.mk
-../lib/flm/test/exebasictests.mk /tools/sbs/lib/flm/test/exebasictests.mk
-../lib/flm/test/exeabiv2_defaults.mk /tools/sbs/lib/flm/test/exeabiv2_defaults.mk
-../lib/flm/test/exeabiv2_3/exeabiv2_3.mk /tools/sbs/lib/flm/test/exeabiv2_3/exeabiv2_3.mk
-../lib/flm/test/exeabiv2_3/test_big.cpp /tools/sbs/lib/flm/test/exeabiv2_3/test_big.cpp
-../lib/flm/win32stdlib.flm /tools/sbs/lib/flm/win32stdlib.flm
-../lib/flm/win32var2.flm /tools/sbs/lib/flm/win32var2.flm
-../lib/flm/win32implib.flm /tools/sbs/lib/flm/win32implib.flm
-../lib/flm/bitmap.flm /tools/sbs/lib/flm/bitmap.flm
-../lib/flm/build.flm /tools/sbs/lib/flm/build.flm
-../lib/flm/build.xml /tools/sbs/lib/flm/build.xml
-../lib/flm/tools2exe.flm /tools/sbs/lib/flm/tools2exe.flm
-../lib/flm/e32abiv2klib.flm /tools/sbs/lib/flm/e32abiv2klib.flm
-../lib/flm/standard.xml /tools/sbs/lib/flm/standard.xml
-../lib/flm/win32var.flm /tools/sbs/lib/flm/win32var.flm
-../lib/flm/e32abiv2pdd.flm /tools/sbs/lib/flm/e32abiv2pdd.flm
-../lib/flm/e32abiv2none.flm /tools/sbs/lib/flm/e32abiv2none.flm
-../lib/flm/romfile.mk /tools/sbs/lib/flm/romfile.mk
-../lib/flm/win32textnotifier2.flm /tools/sbs/lib/flm/win32textnotifier2.flm
-../lib/flm/resource.flm /tools/sbs/lib/flm/resource.flm
-../lib/flm/flmtools.mk /tools/sbs/lib/flm/flmtools.mk
-../lib/flm/gnumakefile.flm /tools/sbs/lib/flm/gnumakefile.flm
-../lib/flm/e32abiv2kdll.flm /tools/sbs/lib/flm/e32abiv2kdll.flm
-../lib/flm/e32abiv2var.flm /tools/sbs/lib/flm/e32abiv2var.flm
-../lib/flm/win32dll.flm /tools/sbs/lib/flm/win32dll.flm
-../lib/flm/gccxml.flm /tools/sbs/lib/flm/gccxml.flm
-../lib/flm/e32postlink.mk /tools/sbs/lib/flm/e32postlink.mk
-../lib/config/default.xml /tools/sbs/lib/config/default.xml
-../lib/config/build.xml /tools/sbs/lib/config/build.xml
-../lib/config/interfaces.xml /tools/sbs/lib/config/interfaces.xml
-../lib/config/gcc.xml /tools/sbs/lib/config/gcc.xml
-../lib/config/variants.xml /tools/sbs/lib/config/variants.xml
-../lib/config/coverity.xml /tools/sbs/lib/config/coverity.xml
-../lib/config/meta.xml /tools/sbs/lib/config/meta.xml
-../lib/config/locations.xml /tools/sbs/lib/config/locations.xml
-../lib/config/gccxml.xml /tools/sbs/lib/config/gccxml.xml
-../lib/config/carbide.xml /tools/sbs/lib/config/carbide.xml
-../lib/config/msvc.xml /tools/sbs/lib/config/msvc.xml
-../lib/config/make.xml /tools/sbs/lib/config/make.xml
-../lib/config/root.xml /tools/sbs/lib/config/root.xml
-../lib/config/winscw.xml /tools/sbs/lib/config/winscw.xml
-../lib/config/arm.xml /tools/sbs/lib/config/arm.xml
-../lib/config/gcce.xml /tools/sbs/lib/config/gcce.xml
-../lib/config/rvct.xml /tools/sbs/lib/config/rvct.xml
-../python/raptor_makefile.py /tools/sbs/python/raptor_makefile.py
-../python/filter_interface.py /tools/sbs/python/filter_interface.py
-../python/raptor_start.py /tools/sbs/python/raptor_start.py
-../python/pyparsing.py /tools/sbs/python/pyparsing.py
-../python/raptor_cli.py /tools/sbs/python/raptor_cli.py
-../python/raptor_cache.py /tools/sbs/python/raptor_cache.py
-../python/raptor_meta.py /tools/sbs/python/raptor_meta.py
-../python/raptor_xml.py /tools/sbs/python/raptor_xml.py
-../python/raptor_version.py /tools/sbs/python/raptor_version.py
-../python/generic_path.py /tools/sbs/python/generic_path.py
-../python/raptor_make.py /tools/sbs/python/raptor_make.py
-../python/plugins/filter_logfile.py /tools/sbs/python/plugins/filter_logfile.py
-../python/plugins/filter_terminal.py /tools/sbs/python/plugins/filter_terminal.py
-../python/plugins/filter_carbide.py /tools/sbs/python/plugins/filter_carbide.py
-../python/plugins/filter_what.py /tools/sbs/python/plugins/filter_what.py
-../python/plugins/dummyplugin.py /tools/sbs/python/plugins/dummyplugin.py
-../python/plugins/filter_clean.py /tools/sbs/python/plugins/filter_clean.py
-../python/plugins/filter_squashlog.py /tools/sbs/python/plugins/filter_squashlog.py
-../python/plugins/filter_checksource.py /tools/sbs/python/plugins/filter_checksource.py
-../python/plugins/filter_splitlog.py /tools/sbs/python/plugins/filter_splitlog.py
-../python/sbs_dist.py /tools/sbs/python/sbs_dist.py
-../python/raptor_utilities.py /tools/sbs/python/raptor_utilities.py
-../python/pluginbox.py /tools/sbs/python/pluginbox.py
-../python/dos2unix.py /tools/sbs/python/dos2unix.py
-../python/raptor_data.py /tools/sbs/python/raptor_data.py
-../python/filter_list.py /tools/sbs/python/filter_list.py
-../python/raptor.py /tools/sbs/python/raptor.py
-../python/mmpparser.py /tools/sbs/python/mmpparser.py
-../python/filter_utils.py /tools/sbs/python/filter_utils.py
-../schema/build/2_0.xsd /tools/sbs/schema/build/2_0.xsd
-../schema/build/log/1_0.xsd /tools/sbs/schema/build/log/1_0.xsd
-../schema/build/1_0.xsd /tools/sbs/schema/build/1_0.xsd
-../win32/bin/ransleep.exe /tools/sbs/win32/bin/ransleep.exe
-../win32/bin/sbs_descramble.exe /tools/sbs/win32/bin/sbs_descramble.exe
-../win32/bin/talonctl.exe /tools/sbs/win32/bin/talonctl.exe
-../win32/bin/talon.exe /tools/sbs/win32/bin/talon.exe
+../RELEASE-NOTES.txt ../../tools/sbs/RELEASE-NOTES.txt
+../bin/sbs ../../tools/sbs/bin/sbs
+../bin/fixmeta.py ../../tools/sbs/bin/fixmeta.py
+../bin/codetest_osbuild.sh ../../tools/sbs/bin/codetest_osbuild.sh
+../bin/countbinaries.sh ../../tools/sbs/bin/countbinaries.sh
+../bin/gethost.sh ../../tools/sbs/bin/gethost.sh
+../bin/failedstats.py ../../tools/sbs/bin/failedstats.py
+../bin/sbs.bat ../../tools/sbs/bin/sbs.bat
+../bin/unsplitdirs.py ../../tools/sbs/bin/unsplitdirs.py
+../bin/buildstats.py ../../tools/sbs/bin/buildstats.py
+../bin/speedtest_osbuild.sh ../../tools/sbs/bin/speedtest_osbuild.sh
+../bin/sbsv2cache.py ../../tools/sbs/bin/sbsv2cache.py
+../bin/whatsource.py ../../tools/sbs/bin/whatsource.py
+../bin/oby2linux.py ../../tools/sbs/bin/oby2linux.py
+../bin/createrfifile.pl ../../tools/sbs/bin/createrfifile.pl
+../bin/vartoxml.py ../../tools/sbs/bin/vartoxml.py
+../bin/readme.txt ../../tools/sbs/bin/readme.txt
+../bin/squashlog.py ../../tools/sbs/bin/squashlog.py
+../bin/statcollate.py ../../tools/sbs/bin/statcollate.py
+../bin/createvmap.py ../../tools/sbs/bin/createvmap.py
+../bin/raptorlog.py ../../tools/sbs/bin/raptorlog.py
+../bin/osbuild.sh ../../tools/sbs/bin/osbuild.sh
+../bin/setup_user.sh ../../tools/sbs/bin/setup_user.sh
+../bin/msvcr71.dll ../../tools/sbs/bin/msvcr71.dll
+../bin/install_raptor.sh ../../tools/sbs/bin/install_raptor.sh
+../bin/mkgetfailed.py ../../tools/sbs/bin/mkgetfailed.py
+../examples/os_properties.xml ../../tools/sbs/examples/os_properties.xml
+../examples/sbs_init.xml ../../tools/sbs/examples/sbs_init.xml
+../lib/flm/e32abiv2stdexe.flm ../../tools/sbs/lib/flm/e32abiv2stdexe.flm
+../lib/flm/user/default.flm_ex ../../tools/sbs/lib/flm/user/default.flm_ex
+../lib/flm/user/globals.mk_ex ../../tools/sbs/lib/flm/user/globals.mk_ex
+../lib/flm/e32abiv2dll.flm ../../tools/sbs/lib/flm/e32abiv2dll.flm
+../lib/flm/tracecompiler.mk ../../tools/sbs/lib/flm/tracecompiler.mk
+../lib/flm/win32exe.flm ../../tools/sbs/lib/flm/win32exe.flm
+../lib/flm/template_ext.flm ../../tools/sbs/lib/flm/template_ext.flm
+../lib/flm/e32abiv2ani.flm ../../tools/sbs/lib/flm/e32abiv2ani.flm
+../lib/flm/converged-comms/createcommdbs.flm ../../tools/sbs/lib/flm/converged-comms/createcommdbs.flm
+../lib/flm/converged-comms/installdefaultcommdb.flm ../../tools/sbs/lib/flm/converged-comms/installdefaultcommdb.flm
+../lib/flm/win32plugin.flm ../../tools/sbs/lib/flm/win32plugin.flm
+../lib/flm/win32klib.flm ../../tools/sbs/lib/flm/win32klib.flm
+../lib/flm/extensions.xml ../../tools/sbs/lib/flm/extensions.xml
+../lib/flm/stack.mk ../../tools/sbs/lib/flm/stack.mk
+../lib/flm/globals.mk ../../tools/sbs/lib/flm/globals.mk
+../lib/flm/win32stdexe.flm ../../tools/sbs/lib/flm/win32stdexe.flm
+../lib/flm/e32abiv2lib.flm ../../tools/sbs/lib/flm/e32abiv2lib.flm
+../lib/flm/win32resource.flm ../../tools/sbs/lib/flm/win32resource.flm
+../lib/flm/config/default.flm ../../tools/sbs/lib/flm/config/default.flm
+../lib/flm/win32lib.flm ../../tools/sbs/lib/flm/win32lib.flm
+../lib/flm/null.flm ../../tools/sbs/lib/flm/null.flm
+../lib/flm/tools/test_command_diff.sh ../../tools/sbs/lib/flm/tools/test_command_diff.sh
+../lib/flm/tools/stlport.flm ../../tools/sbs/lib/flm/tools/stlport.flm
+../lib/flm/tools/buildstubsis.flm ../../tools/sbs/lib/flm/tools/buildstubsis.flm
+../lib/flm/msvctools.xml ../../tools/sbs/lib/flm/msvctools.xml
+../lib/flm/tools2lib.flm ../../tools/sbs/lib/flm/tools2lib.flm
+../lib/flm/win32ldd.flm ../../tools/sbs/lib/flm/win32ldd.flm
+../lib/flm/tools.xml ../../tools/sbs/lib/flm/tools.xml
+../lib/flm/metaflm.mk ../../tools/sbs/lib/flm/metaflm.mk
+../lib/flm/e32abiv2ldd.flm ../../tools/sbs/lib/flm/e32abiv2ldd.flm
+../lib/flm/e32abiv2pdl.flm ../../tools/sbs/lib/flm/e32abiv2pdl.flm
+../lib/flm/e32abiv2stdlib.flm ../../tools/sbs/lib/flm/e32abiv2stdlib.flm
+../lib/flm/config.xml ../../tools/sbs/lib/flm/config.xml
+../lib/flm/win32stddll.flm ../../tools/sbs/lib/flm/win32stddll.flm
+../lib/flm/gccxmlresource.flm ../../tools/sbs/lib/flm/gccxmlresource.flm
+../lib/flm/e32abiv2textnotifier2.flm ../../tools/sbs/lib/flm/e32abiv2textnotifier2.flm
+../lib/flm/e32abiv2implib.flm ../../tools/sbs/lib/flm/e32abiv2implib.flm
+../lib/flm/e32abiv2exe.flm ../../tools/sbs/lib/flm/e32abiv2exe.flm
+../lib/flm/win32pdl.flm ../../tools/sbs/lib/flm/win32pdl.flm
+../lib/flm/win32.flm ../../tools/sbs/lib/flm/win32.flm
+../lib/flm/base.xml ../../tools/sbs/lib/flm/base.xml
+../lib/flm/grouping.flm ../../tools/sbs/lib/flm/grouping.flm
+../lib/flm/e32abiv2.flm ../../tools/sbs/lib/flm/e32abiv2.flm
+../lib/flm/e32abiv2exexp.flm ../../tools/sbs/lib/flm/e32abiv2exexp.flm
+../lib/flm/e32abiv2defaults.mk ../../tools/sbs/lib/flm/e32abiv2defaults.mk
+../lib/flm/e32abiv2fsy.flm ../../tools/sbs/lib/flm/e32abiv2fsy.flm
+../lib/flm/final.mk ../../tools/sbs/lib/flm/final.mk
+../lib/flm/none.flm ../../tools/sbs/lib/flm/none.flm
+../lib/flm/analysis.xml ../../tools/sbs/lib/flm/analysis.xml
+../lib/flm/e32abiv2var2.flm ../../tools/sbs/lib/flm/e32abiv2var2.flm
+../lib/flm/msvctools.flm ../../tools/sbs/lib/flm/msvctools.flm
+../lib/flm/win32kdll.flm ../../tools/sbs/lib/flm/win32kdll.flm
+../lib/flm/win32ani.flm ../../tools/sbs/lib/flm/win32ani.flm
+../lib/flm/e32abiv2plugin.flm ../../tools/sbs/lib/flm/e32abiv2plugin.flm
+../lib/flm/win32bitmap.flm ../../tools/sbs/lib/flm/win32bitmap.flm
+../lib/flm/tools2common.flm ../../tools/sbs/lib/flm/tools2common.flm
+../lib/flm/win32fsy.flm ../../tools/sbs/lib/flm/win32fsy.flm
+../lib/flm/readme.txt ../../tools/sbs/lib/flm/readme.txt
+../lib/flm/e32abiv2kext.flm ../../tools/sbs/lib/flm/e32abiv2kext.flm
+../lib/flm/e32abiv2stddll.flm ../../tools/sbs/lib/flm/e32abiv2stddll.flm
+../lib/flm/win32exexp.flm ../../tools/sbs/lib/flm/win32exexp.flm
+../lib/flm/stringtable.flm ../../tools/sbs/lib/flm/stringtable.flm
+../lib/flm/utils/utility.xml ../../tools/sbs/lib/flm/utils/utility.xml
+../lib/flm/utils/prebuilt.flm ../../tools/sbs/lib/flm/utils/prebuilt.flm
+../lib/flm/utils/copydir.flm ../../tools/sbs/lib/flm/utils/copydir.flm
+../lib/flm/win32pdd.flm ../../tools/sbs/lib/flm/win32pdd.flm
+../lib/flm/taggedrules.mk ../../tools/sbs/lib/flm/taggedrules.mk
+../lib/flm/booleanlogic.mk ../../tools/sbs/lib/flm/booleanlogic.mk
+../lib/flm/emulator.xml ../../tools/sbs/lib/flm/emulator.xml
+../lib/flm/win32kext.flm ../../tools/sbs/lib/flm/win32kext.flm
+../lib/flm/test/exeabiv2_2/test.cpp ../../tools/sbs/lib/flm/test/exeabiv2_2/test.cpp
+../lib/flm/test/exeabiv2_2/test_function.cpp ../../tools/sbs/lib/flm/test/exeabiv2_2/test_function.cpp
+../lib/flm/test/exeabiv2_2/exeabiv2_2.mk ../../tools/sbs/lib/flm/test/exeabiv2_2/exeabiv2_2.mk
+../lib/flm/test/templateext/temex.mk ../../tools/sbs/lib/flm/test/templateext/temex.mk
+../lib/flm/test/templateext/Makefile ../../tools/sbs/lib/flm/test/templateext/Makefile
+../lib/flm/test/Makefile ../../tools/sbs/lib/flm/test/Makefile
+../lib/flm/test/exeabiv2_4/test.cpp ../../tools/sbs/lib/flm/test/exeabiv2_4/test.cpp
+../lib/flm/test/exeabiv2_4/exeabiv2_4.mk ../../tools/sbs/lib/flm/test/exeabiv2_4/exeabiv2_4.mk
+../lib/flm/test/exeabiv2_4/test_big.cpp ../../tools/sbs/lib/flm/test/exeabiv2_4/test_big.cpp
+../lib/flm/test/flmtests.mk ../../tools/sbs/lib/flm/test/flmtests.mk
+../lib/flm/test/ciaabiv2_1/uc_exe.cia ../../tools/sbs/lib/flm/test/ciaabiv2_1/uc_exe.cia
+../lib/flm/test/ciaabiv2_1/uc_exe.cpp ../../tools/sbs/lib/flm/test/ciaabiv2_1/uc_exe.cpp
+../lib/flm/test/ciaabiv2_1/ciaabiv2_1.mk ../../tools/sbs/lib/flm/test/ciaabiv2_1/ciaabiv2_1.mk
+../lib/flm/test/export1/Makefile ../../tools/sbs/lib/flm/test/export1/Makefile
+../lib/flm/test/export1/t1e.h ../../tools/sbs/lib/flm/test/export1/t1e.h
+../lib/flm/test/export1/t4e.h ../../tools/sbs/lib/flm/test/export1/t4e.h
+../lib/flm/test/export1/t2e.h ../../tools/sbs/lib/flm/test/export1/t2e.h
+../lib/flm/test/export1/t3e.h ../../tools/sbs/lib/flm/test/export1/t3e.h
+../lib/flm/test/dllabiv2_1/test.cpp ../../tools/sbs/lib/flm/test/dllabiv2_1/test.cpp
+../lib/flm/test/dllabiv2_1/dllabiv2_1.mk ../../tools/sbs/lib/flm/test/dllabiv2_1/dllabiv2_1.mk
+../lib/flm/test/raptorglue/raptorglue.mk ../../tools/sbs/lib/flm/test/raptorglue/raptorglue.mk
+../lib/flm/test/dllbasictests.mk ../../tools/sbs/lib/flm/test/dllbasictests.mk
+../lib/flm/test/exeabiv2_1/test.cpp ../../tools/sbs/lib/flm/test/exeabiv2_1/test.cpp
+../lib/flm/test/exeabiv2_1/exeabiv2_1.mk ../../tools/sbs/lib/flm/test/exeabiv2_1/exeabiv2_1.mk
+../lib/flm/test/dllabiv2_defaults.mk ../../tools/sbs/lib/flm/test/dllabiv2_defaults.mk
+../lib/flm/test/exeperftests.mk ../../tools/sbs/lib/flm/test/exeperftests.mk
+../lib/flm/test/ciatests.mk ../../tools/sbs/lib/flm/test/ciatests.mk
+../lib/flm/test/environment/pvm/pvmtest.mk ../../tools/sbs/lib/flm/test/environment/pvm/pvmtest.mk
+../lib/flm/test/environment/make/test_variable_restore.mk ../../tools/sbs/lib/flm/test/environment/make/test_variable_restore.mk
+../lib/flm/test/exebasictests.mk ../../tools/sbs/lib/flm/test/exebasictests.mk
+../lib/flm/test/exeabiv2_defaults.mk ../../tools/sbs/lib/flm/test/exeabiv2_defaults.mk
+../lib/flm/test/exeabiv2_3/exeabiv2_3.mk ../../tools/sbs/lib/flm/test/exeabiv2_3/exeabiv2_3.mk
+../lib/flm/test/exeabiv2_3/test_big.cpp ../../tools/sbs/lib/flm/test/exeabiv2_3/test_big.cpp
+../lib/flm/win32stdlib.flm ../../tools/sbs/lib/flm/win32stdlib.flm
+../lib/flm/win32var2.flm ../../tools/sbs/lib/flm/win32var2.flm
+../lib/flm/win32implib.flm ../../tools/sbs/lib/flm/win32implib.flm
+../lib/flm/bitmap.flm ../../tools/sbs/lib/flm/bitmap.flm
+../lib/flm/build.flm ../../tools/sbs/lib/flm/build.flm
+../lib/flm/build.xml ../../tools/sbs/lib/flm/build.xml
+../lib/flm/tools2exe.flm ../../tools/sbs/lib/flm/tools2exe.flm
+../lib/flm/e32abiv2klib.flm ../../tools/sbs/lib/flm/e32abiv2klib.flm
+../lib/flm/standard.xml ../../tools/sbs/lib/flm/standard.xml
+../lib/flm/win32var.flm ../../tools/sbs/lib/flm/win32var.flm
+../lib/flm/e32abiv2pdd.flm ../../tools/sbs/lib/flm/e32abiv2pdd.flm
+../lib/flm/e32abiv2none.flm ../../tools/sbs/lib/flm/e32abiv2none.flm
+../lib/flm/romfile.mk ../../tools/sbs/lib/flm/romfile.mk
+../lib/flm/win32textnotifier2.flm ../../tools/sbs/lib/flm/win32textnotifier2.flm
+../lib/flm/resource.flm ../../tools/sbs/lib/flm/resource.flm
+../lib/flm/flmtools.mk ../../tools/sbs/lib/flm/flmtools.mk
+../lib/flm/gnumakefile.flm ../../tools/sbs/lib/flm/gnumakefile.flm
+../lib/flm/e32abiv2kdll.flm ../../tools/sbs/lib/flm/e32abiv2kdll.flm
+../lib/flm/e32abiv2var.flm ../../tools/sbs/lib/flm/e32abiv2var.flm
+../lib/flm/win32dll.flm ../../tools/sbs/lib/flm/win32dll.flm
+../lib/flm/gccxml.flm ../../tools/sbs/lib/flm/gccxml.flm
+../lib/flm/e32postlink.mk ../../tools/sbs/lib/flm/e32postlink.mk
+../lib/config/default.xml ../../tools/sbs/lib/config/default.xml
+../lib/config/build.xml ../../tools/sbs/lib/config/build.xml
+../lib/config/interfaces.xml ../../tools/sbs/lib/config/interfaces.xml
+../lib/config/gcc.xml ../../tools/sbs/lib/config/gcc.xml
+../lib/config/variants.xml ../../tools/sbs/lib/config/variants.xml
+../lib/config/coverity.xml ../../tools/sbs/lib/config/coverity.xml
+../lib/config/meta.xml ../../tools/sbs/lib/config/meta.xml
+../lib/config/locations.xml ../../tools/sbs/lib/config/locations.xml
+../lib/config/gccxml.xml ../../tools/sbs/lib/config/gccxml.xml
+../lib/config/carbide.xml ../../tools/sbs/lib/config/carbide.xml
+../lib/config/msvc.xml ../../tools/sbs/lib/config/msvc.xml
+../lib/config/make.xml ../../tools/sbs/lib/config/make.xml
+../lib/config/root.xml ../../tools/sbs/lib/config/root.xml
+../lib/config/winscw.xml ../../tools/sbs/lib/config/winscw.xml
+../lib/config/arm.xml ../../tools/sbs/lib/config/arm.xml
+../lib/config/gcce.xml ../../tools/sbs/lib/config/gcce.xml
+../lib/config/rvct.xml ../../tools/sbs/lib/config/rvct.xml
+../python/raptor_makefile.py ../../tools/sbs/python/raptor_makefile.py
+../python/filter_interface.py ../../tools/sbs/python/filter_interface.py
+../python/raptor_start.py ../../tools/sbs/python/raptor_start.py
+../python/pyparsing.py ../../tools/sbs/python/pyparsing.py
+../python/raptor_cli.py ../../tools/sbs/python/raptor_cli.py
+../python/raptor_cache.py ../../tools/sbs/python/raptor_cache.py
+../python/raptor_meta.py ../../tools/sbs/python/raptor_meta.py
+../python/raptor_xml.py ../../tools/sbs/python/raptor_xml.py
+../python/raptor_version.py ../../tools/sbs/python/raptor_version.py
+../python/generic_path.py ../../tools/sbs/python/generic_path.py
+../python/raptor_make.py ../../tools/sbs/python/raptor_make.py
+../python/plugins/filter_logfile.py ../../tools/sbs/python/plugins/filter_logfile.py
+../python/plugins/filter_terminal.py ../../tools/sbs/python/plugins/filter_terminal.py
+../python/plugins/filter_carbide.py ../../tools/sbs/python/plugins/filter_carbide.py
+../python/plugins/filter_what.py ../../tools/sbs/python/plugins/filter_what.py
+../python/plugins/dummyplugin.py ../../tools/sbs/python/plugins/dummyplugin.py
+../python/plugins/filter_clean.py ../../tools/sbs/python/plugins/filter_clean.py
+../python/plugins/filter_squashlog.py ../../tools/sbs/python/plugins/filter_squashlog.py
+../python/plugins/filter_checksource.py ../../tools/sbs/python/plugins/filter_checksource.py
+../python/plugins/filter_splitlog.py ../../tools/sbs/python/plugins/filter_splitlog.py
+../python/sbs_dist.py ../../tools/sbs/python/sbs_dist.py
+../python/raptor_utilities.py ../../tools/sbs/python/raptor_utilities.py
+../python/pluginbox.py ../../tools/sbs/python/pluginbox.py
+../python/dos2unix.py ../../tools/sbs/python/dos2unix.py
+../python/raptor_data.py ../../tools/sbs/python/raptor_data.py
+../python/filter_list.py ../../tools/sbs/python/filter_list.py
+../python/raptor.py ../../tools/sbs/python/raptor.py
+../python/mmpparser.py ../../tools/sbs/python/mmpparser.py
+../python/filter_utils.py ../../tools/sbs/python/filter_utils.py
+../schema/build/2_0.xsd ../../tools/sbs/schema/build/2_0.xsd
+../schema/build/log/1_0.xsd ../../tools/sbs/schema/build/log/1_0.xsd
+../schema/build/1_0.xsd ../../tools/sbs/schema/build/1_0.xsd
+../win32/bin/ransleep.exe ../../tools/sbs/win32/bin/ransleep.exe
+../win32/bin/sbs_descramble.exe ../../tools/sbs/win32/bin/sbs_descramble.exe
+../win32/bin/talonctl.exe ../../tools/sbs/win32/bin/talonctl.exe
+../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
@@ -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">
-	<!-- build configurations for ARM compilers -->
+	<!-- build variants for ARM toolchain builds -->
 	<var name="arm" extends="root">
 		<varRef ref="default.interfaces"/>
 		<varRef ref="default.locations"/>
-		<env name="EFREEZE" default="$(PERL) $(EPOCROOT)/epoc32/tools/efreeze.pl" type="tool"/>
-		<!-- picked up from the Environment -->
-		<env name="ELF2E32" default="$(EPOCROOT)/epoc32/tools/elf2e32$(DOTEXE)" type="tool"/>
+		
+		<!-- tools and scripts -->
 		<env name="BMCONV" default="$(EPOCROOT)/epoc32/tools/bmconv$(DOTEXE)" type="tool"/>
 		<env name="CHECKLIB" default="$(EPOCROOT)/epoc32/tools/checklib$(DOTEXE)" type="tool"/>
-		<env name="TRANASM" default="$(PERL) $(EPOCROOT)/epoc32/tools/tranasm.pl" type="tool"/>
 		<env name="CPPFILT" default="$(GCCPREFIX)c++filt$(DOTEXE)" type="tool"/>
+		<env name="EFREEZE" default="$(PERL) $(EPOCROOT)/epoc32/tools/efreeze.pl" type="script"/>
+		<env name="ELF2E32" default="$(EPOCROOT)/epoc32/tools/elf2e32$(DOTEXE)" type="tool"/>
+		<env name="PREPDEF" default="$(PERL) $(EPOCROOT)/epoc32/tools/prepdef.pl" type="script"/>
 		<env name="RCOMP" default="$(EPOCROOT)/epoc32/tools/rcomp$(DOTEXE)" type="tool"/>
-		<env name="PREPDEF" default="$(PERL) $(EPOCROOT)/epoc32/tools/prepdef.pl" type="path"/>
-		<env name="STRINGTABLE" default="$(PERL) $(EPOCROOT)/epoc32/tools/stringtable.pl" type="path"/>
 		<!-- RANSLEEP is a program that can be used to cause a random delay in milliseconds. This is only useful in parallel builds.  See the PERTURBSTARTTIME switch for more details.  -->
 		<env name="RANSLEEP" default="$(SBS_HOME)/bin/$(HOSTPLATFORM_DIR)/ransleep$(DOTEXE)" type="tool"/>
-		<set name="BLDINF_OUTPUTPATH" value="$(SBS_BUILD_DIR)"/>
-		<set name="CDEFS" value=""/>	
-		<!-- arm specific interfaces -->
+		<env name="SBSV1MAKE" default="$(EPOCROOT)/epoc32/tools/make$(DOTEXE)" type="tool"/>
+		<env name="STRINGTABLE" default="$(PERL) $(EPOCROOT)/epoc32/tools/stringtable.pl" type="script"/>
+		<env name="TRANASM" default="$(PERL) $(EPOCROOT)/epoc32/tools/tranasm.pl" type="script"/>
+			
+		<!-- interfaces -->
 		<set name="INTERFACE.extension" value="Symbian.extension"/>
-		<!-- link to bld.inf and mmp platform names -->
-		<set name="ARMMACROS" value="__MARM_ARMV5__ $(ARMMACROS.CONFIG) $(ARMMACROS.VAR)"/>
+		
+		<!-- macros -->
 		<set name="ARMMACROS.CONFIG" value=""/>
 		<set name="ARMMACROS.VAR" value=""/>
+		<set name="ARMMACROS" value="__MARM_ARMV5__ $(ARMMACROS.CONFIG) $(ARMMACROS.VAR)"/>
+		<set name="PLATMACROS.WINDOWS" value="$(PLATMACROS.TOOLCHAIN) EPOC32 MARM EABI GENERIC_MARM MARM_ARMV5 $(PLATMACROS.CONFIG) $(PLATMACROS.VAR)"/>
+		<set name="PLATMACROS.LINUX" value="$(PLATMACROS.WINDOWS)"/>
+		<set name="PLATMACROS.CONFIG" value=""/>
+		<set name="PLATMACROS.VAR" value=""/>
+		<set name="PLATMACROS.TOOLCHAIN" value=""/>
+		
+		<set name="BLDINF_OUTPUTPATH" value="$(SBS_BUILD_DIR)"/>
 		<set name="CAPABILITY" value=""/>
+		<set name="CDEFS" value="__SUPPORT_CPP_EXCEPTIONS__ _UNICODE __SYMBIAN32__ __EPOC32__ __MARM__ __EABI__ __PRODUCT_INCLUDE__=&quot;$(PRODUCT_INCLUDE)&quot; $(MMPDEFS) $(ARMMACROS)"/>
 		<set name="CODE_SEGMENT_START" value=""/>
 		<set name="DEFAULT_STDCPP_NEWLIB" value="stdnew.dso"/>
 		<set name="DEFAULT_SYMBIAN_NEWLIB" value="scppnwdl.dso"/>
+		<set name="DUMPBCINFO" value=""/>
+		<set name="EPOCSTACKSIZE" value=""/>
 		<set name="FULLVARIANTPATH" value="$(VARIANTPLATFORM)/$(VARIANTTYPE)"/>
 		<set name="HEADER_FILES_CONTROL_OPTION" value=""/>
 		<set name="LIBRARY_DEBUG" value=""/>
 		<set name="MMPDEFS" value=""/>
 		<set name="NMAKE" value="nmake"/>
 		<set name="NMAKEFLAGS" value="-nologo -x - "/>
+		<set name="NO_UNALIGNED_ACCESS" value="$(CC.NO_UNALIGNED_ACCESS)"/>
 		<set name="OUTPUTPATH" value="$(SBS_BUILD_DIR)"/>
 		<set name="PERTURBSTARTTIME" value=""/>
-		<!-- add a random delay before starting armcc or armlink to ease contention for licensesthe maximum time to delay in milliseconds. RANSLEEP program must be available.   -->
+		<!-- add a random delay before starting armcc or armlink to ease contention for licenses the maximum time to delay in milliseconds. RANSLEEP program must be available.   -->
 		<set name="PERTURBMSECS" value="500"/>
 		<!-- the maximum time to delay in milliseconds -->
-		<set name="BLDINF_OUTPUTPATH" value="$(SBS_BUILD_DIR)"/>
+		<set name="POSTLINKER_COMPRESSION_DEFAULT" value="inflate"/>
 		<set name="RELEASEPATH" value="$(EPOCROOT)/epoc32/release"/>
 		<set name="RESOLVED_DEFFILE" value=""/>
 		<set name="RUNTIME_LIBS_PATH" value="$(EPOCROOT)/epoc32/release/armv5/lib"/>
-		<set name="SBSV1MAKE" value="$(EPOCROOT)/epoc32/tools/make$(DOTEXE)"/>
 		<set name="SID" value=""/>
-		<set name="EPOCSTACKSIZE" value=""/>
 		<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 @@
 		<set name="TARGET" value=""/>
 		<set name="UNIX_SLASH_FOR_CC_ABS_PATHS" value="0"/>
 		<set name="UNRESOLVED_SYMBOL_REF_OPTION" value=""/>
-		<set name="DUMPBCINFO" value=""/>
-		<set name="MAKEDEFFILE" value="1"/>
-		<set name="PLATMACROS.WINDOWS" value="ARMCC EPOC32 MARM EABI GENERIC_MARM MARM_ARMV5 $(PLATMACROS.CONFIG) $(PLATMACROS.VAR)"/>
-		<set name="PLATMACROS.LINUX" value="$(PLATMACROS.WINDOWS)"/>
-		<set name="PLATMACROS.CONFIG" value=""/>
-		<set name="PLATMACROS.VAR" value=""/>
-		<set name="NO_UNALIGNED_ACCESS" value="$(CC.NO_UNALIGNED_ACCESS)"/>
 	</var>
+	
 	<var name="v5">
 		<set name="TRADITIONAL_PLATFORM" value="ARMV5"/>
 		<set name="VARIANTPLATFORM" value="armv5"/>
-		<set name="PLATMACROS.CONFIG" value=""/>
 		<set name="DEBUG_FORMAT" value="$(CC.DWARF2)"/>
 		<set name="TARGET_ARCH_OPTION" value="$(CC.ARMV5)"/>
 		<set name="LINKER_ARCH_OPTION" value="$(LD.ARMV5)"/>
-		<set name="ARMFPU" value="$(CC.SOFTVFP_MAYBE_VFPV2)"/>
+		<set name="COMPILER_FPU_DEFAULT" value="$(CC.SOFTVFP_MAYBE_VFPV2)"/>
+		<set name="POSTLINKER_FPU_DEFAULT" value="$(PL.SOFTVFP_MAYBE_VFPV2)"/>
 		<set name="GENERATE_ABIV1_IMPLIBS" value="$(SUPPORTS_ABIV1_IMPLIBS)"/>
 	</var>
 	<var name="v6">
@@ -85,7 +90,8 @@
 		<set name="TARGET_ARCH_OPTION" value="$(CC.ARMV6)"/>
 		<set name="LINKER_ARCH_OPTION" value="$(LD.ARMV6)"/>
 		<set name="STATIC_RUNTIME_DIR" value="$(EPOCROOT)/epoc32/release/armv5/$(VARIANTTYPE)"/>
-		<set name="ARMFPU" value="$(CC.SOFTVFP_MAYBE_VFPV2)"/>
+		<set name="COMPILER_FPU_DEFAULT" value="$(CC.SOFTVFP_MAYBE_VFPV2)"/>
+		<set name="POSTLINKER_FPU_DEFAULT" value="$(PL.SOFTVFP_MAYBE_VFPV2)"/>
 	</var>
 	<var name="v7">
 		<set name="TRADITIONAL_PLATFORM" value="ARMV7"/>
@@ -95,7 +101,8 @@
 		<set name="DEBUG_FORMAT" value="$(CC.DWARF3)"/>
 		<set name="TARGET_ARCH_OPTION" value="$(CC.ARMV7)"/>
 		<set name="LINKER_ARCH_OPTION" value="$(LD.ARMV7)"/>
-		<set name="ARMFPU" value="$(CC.SOFTVFP_MAYBE_VFPV3)"/>
+		<set name="COMPILER_FPU_DEFAULT" value="$(CC.SOFTVFP_MAYBE_VFPV3)"/>
+		<set name="POSTLINKER_FPU_DEFAULT" value="$(PL.SOFTVFP_MAYBE_VFPV3)"/>
 	</var>
 	<var name="9e" extends="v5">
 		<set name="VARIANTPLATFORM" value="arm9e"/>
@@ -121,6 +128,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"/>
 	
+	<alias name="armv5_urel_gcce4_4_1" meaning="arm.v5.urel.gcce4_4_1"/>
+	<alias name="armv5_udeb_gcce4_4_1" meaning="arm.v5.udeb.gcce4_4_1"/>
+	
 	<alias name="armv6_urel" meaning="arm.v6.urel.rvct2_2"/>
 	<alias name="armv6_udeb" meaning="arm.v6.udeb.rvct2_2"/>
 	<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/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
@@ -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">
-	<!-- GCCE build variant for ARM compilers -->
-	<!-- This is called gcce_base in case someone wants to use "gcce" as a configuration name -->
+	<!-- build variant for GCCE ARM toolchains -->
 	<var name="gcce_base">
 		<set name="TOOLCHAIN" value="GCCE"/>
+		<set name="PLATMACROS.TOOLCHAIN" value="GCCE"/>
+
+		<!-- toolchain tools -->
+		<set name="GCCEAR" value="$(GCCEBIN)/arm-none-symbianelf-ar$(DOTEXE)"/>
+		<set name="GCCEASM" value="$(GCCEBIN)/arm-none-symbianelf-as$(DOTEXE)"/>
+		<set name="GCCECC" value="$(GCCEBIN)/arm-none-symbianelf-g++$(DOTEXE)"/>
+		<set name="GCCELD" value="$(GCCEBIN)/arm-none-symbianelf-g++$(DOTEXE)"/>
+		<set name="FROMELF" value="$(GCCEBIN)/arm-none-symbianelf-readelf$(DOTEXE)"/>
+
 		<set name="CC" value="$(GCCECC)"/>
 		<set name="LD" value="$(GCCELD)"/>
 		<set name="ASM" value="$(GCCEASM)"/>
 		<set name="AR" value="$(GCCEAR)"/>		
-		<set name="GCCECC" value="$(GCCEBIN)/arm-none-symbianelf-g++$(DOTEXE)"/>
-		<set name="GCCELD" value="$(GCCEBIN)/arm-none-symbianelf-ld$(DOTEXE)"/>
-		<set name="GCCEASM" value="$(GCCEBIN)/arm-none-symbianelf-as$(DOTEXE)"/>
-		<set name="GCCEAR" value="$(GCCEBIN)/arm-none-symbianelf-ar$(DOTEXE)"/>
-		<set name="FROMELF" value="$(GCCEBIN)/arm-none-symbianelf-readelf$(DOTEXE)"/>
+		
 		<set name="AAPCS_OPTION" value="-mapcs -mthumb-interwork"/>
 		<set name="ARCHIVER_CREATE_OPTION" value="cr"/>
 		<set name="ARM_INSTRUCTION_SET" value="-marm"/>
+		<set name="ARMLIBS" value=""/>
 		<set name="ASM_OUTPUT_OPTION" value="-o"/>
 		<set name="ASSEMBLER_LISTING_OPTION" value="-S"/>
 		<set name="BPABI_OPTION" value=""/>
-		<set name="CC_ERRORS_CONTROL_OPTION" value=""/>
-		<set name="CC_WARNINGS_CONTROL_OPTION" value="-Wall -Wno-unknown-pragmas"/>
 		<set name="C_LANG_OPTION" value="-x c"/>
-		<set name="COMMANDFILE_OPTION" value="@"/>
-		<set name="COMPILE_ONLY_OPTION" value="-c"/>
-		<set name="CPP_LANG_OPTION" value="-x c++ -Wno-ctor-dtor-privacy"/>
-		<set name="DEBUG_OPTIMISATION" value="-O0"/>
-		<set name="DEPEND_OPTION" value="-MD -MF"/>
-		<set name="ENUM_OPTION" value=""/>
-		<set name="EXPORT_VTBL_OPTION" value=""/>
-		<set name="EXTRA_LD_OPTION" value=""/>
-		<set name="FPMODE_OPTION" value=""/>
-		<set name="LD_ERRORS_CONTROL_OPTION" value=""/>
-		<set name="LD_WARNINGS_CONTROL_OPTION" value="--no-undefined"/>
-		<set name="LISTING_OPTION" value="-S"/>
-		<set name="EXCEPTIONS" value="-fexceptions"/>
-		<set name="NO_EXCEPTIONS" value="-fno-exceptions"/>
-		<set name="PREINCLUDE_OPTION" value="-include"/>
-		<set name="PREPROCESSOR_OPTION" value="-E"/>
-		<set name="REL_OPTIMISATION" value="-O2"/>
-		<set name="STDLIB_OPTION" value="-nostdlib"/>
-		<set name="RUNTIME_SYMBOL_VISIBILITY_OPTION" value=""/>
-		<set name="RW_BASE_OPTION" value="-Tdata"/>
-		<set name="CODE_SEGMENT_START" value="-Ttext"/>
-		<set name="PREINCLUDE" value="$(EPOCINCLUDE)/gcce/gcce.h"/>
+		<set name="CC.ARMV5" value="-march=armv5t"/>
+		<set name="CC.ARMV6" value="-march=armv6t2"/>
+		<set name="CC.ARMV7" value="-march=armv7"/>
 		<!-- From the GCC manual: "With this option, GCC uses features of DWARF version 3 when they are useful; ..." -->
 		<!-- There is no -gdwarf-3 option; hence CC.DWARF2 and CC.DWARF3 have the same value. -->
 		<set name="CC.DWARF2" value="-gdwarf-2"/>
 		<set name="CC.DWARF3" value="-gdwarf-2"/>
-		<set name="LD.ARMV5" value=""/>
-		<set name="LD.ARMV6" value=""/>
-		<set name="LD.ARMV7" value=""/>
-		<set name="ARMMACROS.VAR" value=""/>
+		<set name="CC.NO_UNALIGNED_ACCESS" value=""/>
+		<set name="CC.SOFTVFP_MAYBE_VFPV2" value="soft"/>
+		<set name="CC.SOFTVFP_MAYBE_VFPV3" value="soft"/>
+		<set name="CC_ERRORS_CONTROL_OPTION" value=""/>
+		<set name="CC_WARNINGS_CONTROL_OPTION" value="-Wall -Wno-unknown-pragmas"/>
 		<set name="CFLAGS" value=""/>
 		<set name="CIADEFS" value="__CIA__"/>
-		<append name="CDEFS" value='__SUPPORT_CPP_EXCEPTIONS__ _UNICODE __SYMBIAN32__ __GCCE__ __EPOC32__ __MARM__ __EABI__ __PRODUCT_INCLUDE__="$(PRODUCT_INCLUDE)" $(MMPDEFS) $(ARMMACROS)'/>
-		<!-- Note that the intention of ABLD for CIA compilation seems to be "-S -Wa,-adln", although this doesn't work -->
+		<set name="CODE_SEGMENT_START" value="-Ttext"/>
+		<set name="COMMANDFILE_OPTION" value="@"/>
+		<set name="COMPILE_ONLY_OPTION" value="-c"/>
 		<set name="COMPILER_CIA_FLAGS" value="-marm"/>
 		<set name="COMPILER_DEFINES" value="-D__GCCE__"/>
-		<set name="COMPILER_FPU_FLAGS" value="$(CC.OPT.SOFTVFP_MAYBE_VFPV2)$(CC.VAL.SOFTVFP_MAYBE_VFPV2)"/>		
+		<set name="COMPILER_FPU_OPTION" value="-mfloat-abi="/>		
 		<set name="COMPILER_INTERWORK_DEFINES" value="__MARM_INTERWORK__"/>
 		<set name="COMPILER_SYSTEM_INCLUDE_OPTION" value="-I"/>
 		<set name="COMPILER_THUMB_DEFINES" value="__MARM_THUMB__"/>
+		<set name="CPP_LANG_OPTION" value="-x c++ -Wno-ctor-dtor-privacy"/>
 		<set name="DATA_SEGMENT_START" value="$(SPLIT_OPTION) $(RW_BASE_OPTION)"/>
+		<set name="DEBUG_OPTIMISATION" value="-O0"/>
+		<set name="DEPEND_OPTION" value="-MD -MF"/>
+		<set name="ENUM_OPTION" value=""/>
+		<set name="EXCEPTIONS" value="-fexceptions"/>
+		<set name="EXPORT_VTBL_OPTION" value=""/>
 		<set name="EXTRA_CC_OPTION" value=""/>
+		<set name="EXTRA_LD_OPTION" value=""/>
+		<set name="FPMODE_OPTION" value=""/>
 		<set name="HEADER_FILES_CONTROL_OPTION" value=""/>
+		<set name="INSTRUCTION_SET" value=""/>
+		<set name="KERNEL_STATIC_RUNTIME_LIB" value="ksrt3_1.lib"/>
+		<set name="LD.ARMV5" value=""/>
+		<set name="LD.ARMV6" value=""/>
+		<set name="LD.ARMV7" value=""/>
+		<set name="LD_ERRORS_CONTROL_OPTION" value=""/>
+		<set name="LD_WARNINGS_CONTROL_OPTION" value="-Wl,--no-undefined"/>
 		<set name="LIBPATH" value=""/>
 		<set name="LIBRARY" value=""/>
 		<set name="LICENSERETRY_OPTION" value=""/>
 		<set name="LINKER_ADD_STATIC_RUNTIME" value="1"/>
 		<set name="LINKER_DEBUG_OPTION" value=""/>
-		<!-- Clearly the linker libs stuff following isn't right - need to use ARMLIBS (or reinvent this a bit) -->
+		<set name="LINKER_DEFAULT_LIB_PATHS" value=""/>
 		<set name="LINKER_DEFAULT_LIBS" value="-lsupc++ -lgcc"/>
-		<set name="LINKER_DEFAULT_LIB_PATHS" value="-L $(GCCEBIN)/../lib/gcc/arm-none-symbianelf/$(TOOLCHAINVERSION) -L $(GCCEBIN)/../lib/gcc/arm-none-symbianelf/$(TOOLCHAINVERSION)/../../../../arm-none-symbianelf/lib"/>
-		<set name="LINKER_ENTRY_OPTION" value="--entry"/>
-		<set name="LINKER_GROUP_START_OPTION" value="--start-group"/>
+		<set name="LINKER_ENTRY_OPTION" value="-Wl,--entry"/>
 		<set name="LINKER_GROUP_END_OPTION" value="--end-group"/>
-		<set name="LINKER_MISC_FLAGS" value="$(CODE_SEGMENT_START) 0x8000"/>
-		<set name="LINKER_NODEBUG_OPTION" value = "--strip-debug"/>
+		<set name="LINKER_GROUP_START_OPTION" value="--start-group"/>
+		<set name="LINKER_MISC_FLAGS" value="-Wl,$(CODE_SEGMENT_START),0x8000"/>
+		<set name="LINKER_NODEBUG_OPTION" value = "-Wl,--strip-debug"/>
 		<set name="LINKER_SCRIPT_FILE_OPTION" value="-T"/>
-		<set name="LINKER_SYMBOLS_OPTION" value="-Map"/>
-		<set name="LINKER_SYMBOLS_FILE_OPTION" value=""/>
-		<set name="SHARED_OBJECT_OPTION" value="-shared"/>
+		<set name="LINKER_SYMBOLS_FILE_OPTION" value="-Wl,-Map"/>
+		<set name="LINKER_SYMBOLS_OPTION" value=""/>
+		<set name="LISTING_OPTION" value="-S"/>
+		<set name="NEED_ENTRYPOINT_LIBRARY" value="" />
+		<set name="NEED_ENTRYPOINT_LIBRARY" value=""/>
+		<set name="NO_EXCEPTIONS" value="-fno-exceptions"/>
+		<set name="NO_UNALIGNED_ACCESS" value="$(CC.NO_UNALIGNED_ACCESS)"/>
+		<set name="OWN_LIBRARY_OPTION" value=""/>
+		<set name="PL.SOFTVFP_MAYBE_VFPV2" value="softvfp"/>
+		<set name="PL.SOFTVFP_MAYBE_VFPV3" value="softvfp"/>
+		<set name="PREINCLUDE" value="$(EPOCINCLUDE)/gcce/gcce.h"/>
+		<set name="PREINCLUDE_OPTION" value="-include"/>
+		<set name="PREPROCESSOR_OPTION" value="-E"/>
+		<set name="REL_OPTIMISATION" value="-O2"/>
+		<set name="RELOCATABLE_IMAGE_OPTION" value=""/>
+		<set name="RUNTIME_SYMBOL_VISIBILITY_OPTION" value=""/>
+		<set name="RVCTBIN" value="" />
+		<set name="RVCTINC" value="" />
+		<set name="RVCTLIB" value=""/>
+		<set name="RW_BASE" value="$(RW_BASE_OPTION)0x400000"/>
+		<set name="RW_BASE_OPTION" value="-Wl,-Tdata,"/>
+		<set name="SHARED_OBJECT_OPTION" value="-Wl,-shared"/>
 		<set name="SID" value=""/>
-		<set name="SO_NAME_OPTION" value="-soname"/>
+		<set name="SO_NAME_OPTION" value="-Wl,-soname"/>
+		<set name="SPLIT_OPTION" value=""/>
+		<set name="STATIC_LIBS_LIST" value=""/>
 		<set name="STATIC_LIBS_PATH" value="" />
 		<set name="STDCPP_INCLUDE" value="$(EPOCINCLUDE)/stdapis"/>
+		<set name="STDLIB_OPTION" value="-nodefaultlibs"/>
 		<set name="SUPPORTS_ABIV1_IMPLIBS" value=""/>	
 		<set name="SYMBIAN_LD_MESSAGE_OPTION" value="$(LD_WARNINGS_CONTROL_OPTION) $(LD_ERRORS_CONTROL_OPTION)"/>
+		<set name="SYMVER_OPTION" value="-Wl,--default-symver"/>
 		<set name="TARGET_RELOCATION_OPTION" value="--target1-rel" />
-		<set name="SYMVER_OPTION" value="--default-symver"/>
 		<set name="TEMP_FILES_OPTION" value="-pipe"/>
 		<set name="THUMB_INSTRUCTION_SET" value="-mthumb"/>
 		<set name="TRANSFORM_CIA" value=""/>		
-		<set name="INSTRUCTION_SET" value=""/>
 		<set name="UNDEFINED_SYMBOL_REF_OPTION" value="-u"/>
 		<set name="UNRESOLVED_SYMBOL_REF_OPTION" value=""/>
-		<set name="USERINCLUDE" value=""/>
 		<set name="USER_LIBS_PATH_OPTION" value="--userlibpath"/>
+		<set name="USER_STATIC_RUNTIME_LIB" value="usrt3_1.lib"/>
+		<set name="USER_STATIC_RUNTIME_LIB_NESTED_EXCEPTIONS" value="usrt_nx_3_1.lib"/>
+		<set name="USERINCLUDE" value=""/>
 		<set name="VFE_OPTION" value=""/>
-		<set name="PLATMACROS.WINDOWS" value="GCCE EPOC32 MARM EABI GENERIC_MARM MARM_ARMV5 $(PLATMACROS.CONFIG) $(PLATMACROS.VAR)"/>
-		<set name="PLATMACROS.LINUX" value="$(PLATMACROS.WINDOWS)"/>
-		<set name="PLATMACROS.CONFIG" value=""/>
-		<set name="PLATMACROS.VAR" value=""/>
-		<set name="NO_UNALIGNED_ACCESS" value="$(CC.NO_UNALIGNED_ACCESS)"/>
+
+		<append name="CDEFS" value="__GCCE__"/>
 	</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/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
@@ -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">
-
-	<!-- build configurations for GCC compilers -->
+	<!-- build variants for GCC toolchains -->
 	<var name="tools2_base" extends="root">
-
 		<varRef ref="default.interfaces"/>
 		<varRef ref="default.locations"/>
-		<!-- picked up from the Environment -->
+		
+		<!-- toolchain tools -->
 		<env name='RANLIB' default='$(GCCPREFIX)ranlib$(DOTEXE)' type='tool'/>
 		<env name='GCC' default='$(GCCPREFIX)g++$(DOTEXE)' type='tool'/>
 		<env name='AR' default='$(GCCPREFIX)ar$(DOTEXE)' type='tool'/>
 
+		<set name='COMPILER' value='$(GCC) -c' type='tool' versionCommand='$(GCC) -v' versionResult='gcc version (3.[456])|(4.[0-9])'/>
+		<set name='LINKER' value='$(GCC)'/>
+
+		<!-- tools and scripts -->
+		<env name='JAVATC' default='$(JAVA_HOME)/bin/java' type='tool'/> <!-- Java used by Trace Compiler -->
+
 		<!-- interfaces -->
 		<set name="INTERFACE.exe" value="Tools.exe"/>
 		<set name="INTERFACE.lib" value="Tools.lib"/>
 
-		<!-- Java used by Trace Compiler -->
-		<env name='JAVA_HOME' default='' type='path'/>
-		<env name='JAVATC' default='$(JAVA_HOME)/bin/java' type='tool'/>
-
 		<!-- link to bld.inf and mmp platform names -->
 		<set name='TRADITIONAL_PLATFORM' value='TOOLS2'/>
-		<set name='VARIANTPLATFORM' value='tools2'/>
-
-		<!-- used by FLM code -->
-		<set name='COMPILER' value='$(GCC) -c' type='tool' versionCommand='$(GCC) -v' versionResult='gcc version (3.[456])|(4.[0-9])'/>
 
-		<set name='CFLAGS' value='-fdefer-pop -fmerge-constants -fthread-jumps -floop-optimize -fif-conversion -fif-conversion2 -fguess-branch-probability -fcprop-registers -foptimize-sibling-calls -fstrength-reduce -fcse-follow-jumps -fcse-skip-blocks -frerun-cse-after-loop -frerun-loop-opt -fgcse -fgcse-lm -fgcse-sm -fgcse-las -fdelete-null-pointer-checks -fexpensive-optimizations -fregmove -fschedule-insns -fschedule-insns2 -fsched-interblock -fsched-spec -fcaller-saves -fpeephole2 -freorder-blocks -freorder-functions -fstrict-aliasing -funit-at-a-time -falign-functions -falign-jumps -falign-loops -falign-labels -fcrossjumping -pipe -Wall -Wno-ctor-dtor-privacy -Wno-unknown-pragmas -m32'/>
+		<!-- Java used by Trace Compiler -->
+		<set name='CFLAGS' value='-std=c++0x -fdefer-pop -fmerge-constants -fthread-jumps -floop-optimize -fif-conversion -fif-conversion2 -fguess-branch-probability -fcprop-registers -foptimize-sibling-calls -fstrength-reduce -fcse-follow-jumps -fcse-skip-blocks -frerun-cse-after-loop -frerun-loop-opt -fgcse -fgcse-lm -fgcse-sm -fgcse-las -fdelete-null-pointer-checks -fexpensive-optimizations -fregmove -fschedule-insns -fschedule-insns2 -fsched-interblock -fsched-spec -fcaller-saves -fpeephole2 -freorder-blocks -freorder-functions -fstrict-aliasing -funit-at-a-time -falign-functions -falign-jumps -falign-loops -falign-labels -fcrossjumping -pipe -Wall -Wno-ctor-dtor-privacy -Wno-unknown-pragmas -m32'/>
+		<env name='JAVA_HOME' default='' type='path'/>		
+		<set name='VARIANTPLATFORM' value='tools2'/>
 
 		<!-- msys based programs sometimes don't search the path properly.
 		COMPILER_PATH can be set to tell gcc where to find
@@ -39,13 +39,11 @@
 
 		<!-- macro definitions set by mmps etc -->
 		<set name='CDEFS' value='$(MMPDEFS)'/>
-
-
 		<set name='CDEFS.DEFAULT' value='__SYMBIAN32__ __TOOLS__ __TOOLS2__ __EXE__ __SUPPORT_CPP_EXCEPTIONS__ __PRODUCT_INCLUDE__="$(PRODUCT_INCLUDE)"'/>
 		<set name='CDEFS.WIN32' value='$(CDEFS.DEFAULT) _WIN32 WIN32 _WINDOWS __TOOLS2_WINDOWS__'/>
 		<set name='CDEFS.LINUX' value='$(CDEFS.DEFAULT) __LINUX__ __TOOLS2_LINUX__'/>
 
-		<set name='INC.COMPILER' value='$(EPOCINCLUDE)/gcc_mingw/gcc_mingw_3_4_2.h'/>
+		<set name='INC.COMPILER' value='$(EPOCINCLUDE)/gcc/gcc.h'/>
 
 		<set name='OPT.D' value='-D'/>
 		<set name='OPT.L' value='-L'/>
@@ -56,11 +54,10 @@
 		<set name='OPT.USERINCLUDE' value='-I '/>
 
 		<!-- always use stlport headers -->
-		<set name='SYSTEMINCLUDE' value='$(EPOCINCLUDE)/tools/stlport'/>
+		<set name='SYSTEMINCLUDE' value=''/>
 
-		<set name='LINKER' value='$(GCC)'/>
 		<set name='LFLAGS' value=''/>
-		<set name='STATICLIBRARY' value='stlport.5.1'/>
+		<set name='STATICLIBRARY' value=''/>
 		<set name='LIBS' value=''/>
 		<set name='LIBS.WIN32' value='$(LIBS)'/>
 		<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
@@ -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">
-	<!-- build configurations for the gccxml_cc1plus C++ language processor -->
+	<!-- build variants for the gccxml_cc1plus C++ language processor -->
 	<var name="gccxml_base" extends="root">
 		<varRef ref="default.interfaces"/>
 		<varRef ref="default.locations"/>
-		<!-- picked up from the Environment -->
-		<env name='CPP' default='$(GNUCPP)' type='tool'/>
+		
+		<!-- tools and scripts -->
 		<env name='BMCONV' default="$(EPOCROOT)/epoc32/tools/bmconv$(DOTEXE)" type='tool'/>
-		<env name='CREATERFIFILE' default='$(PERL) $(SBS_HOME)/bin/createrfifile.pl ' type='path'/>
+		<set name='CC' value="$(EPOCROOT)/epoc32/tools/gccxml_cc1plus$(DOTEXE)" type='tool'/>
+		<env name='CPP' default='$(GNUCPP)' type='tool'/>
+		<env name='CREATERFIFILE' default='$(PERL) $(SBS_HOME)/bin/createrfifile.pl ' type='script'/>
 		<env name='GNUAWK' default='$(GNUPREFIX)gawk$(DOTEXE)' type='tool' versionCommand='$(GNUAWK) --version' versionResult='GNU Awk [3-9].*'/>
-		<env name='MAKEDEF' default='$(PERL) $(EPOCROOT)/epoc32/tools/makedef.pl' type='path'/>
-		<env name='PREPDEF' default='$(PERL) $(EPOCROOT)/epoc32/tools/prepdef.pl' type='path'/>
+		<env name='MAKEDEF' default='$(PERL) $(EPOCROOT)/epoc32/tools/makedef.pl' type='script'/>
+		<env name='PREPDEF' default='$(PERL) $(EPOCROOT)/epoc32/tools/prepdef.pl' type='script'/>
 		<env name='RCOMP' default='$(EPOCROOT)/epoc32/tools/rcomp$(DOTEXE)' type='tool'/>
-		<env name='RVCT22BIN' type='path'/>
-		<env name='RVCT22INC' type='path'/>
-		<env name='RVCT22LIB' type='path'/>
-		<env name='STRINGTABLE' default='$(PERL) $(EPOCROOT)/epoc32/tools/stringtable.pl' type='path'/>
+		<env name='STRINGTABLE' default='$(PERL) $(EPOCROOT)/epoc32/tools/stringtable.pl' type='script'/>
 
 		<!-- link to bld.inf and mmp platform names -->
 		<set name='TRADITIONAL_PLATFORM' value='GCCXML'/>
@@ -51,11 +50,13 @@
 		<env name='JAVATC' default='$(JAVA_HOME)/bin/java' type='tool'/>
 
 		<!-- note that gccxml_cc1plus should be version checked, but I've yet to find a reliable way of doing this -->
-		<set name='CC' value="$(EPOCROOT)/epoc32/tools/gccxml_cc1plus$(DOTEXE)" type='tool'/>
 		<set name='CDEFS' value='_UNICODE __SYMBIAN32__ __GCC32__ __EPOC32__ __MARM__ __MINGW32__ _STLP_LITTLE_ENDIAN __GCCXML__ __MARM_ARM4__ $(MMPDEFS)'/>
 		<set name='CFLAGS' value='-bi -nostdinc -Wall -Wno-ctor-dtor-privacy -Wno-unknown-pragmas -UWIN32 -fshort-wchar -quiet -w '/>
 
 		<!-- in support of TEMs - processed as if in an RVCT build -->
+		<env name='RVCT22BIN' type='toolchainpath'/>
+		<env name='RVCT22INC' type='toolchainpath'/>
+		<env name='RVCT22LIB' type='toolchainpath'/>
 		<set name='RVCTBIN' value='$(RVCT22BIN)'/>
 		<set name='RVCTINC' value='$(RVCT22INC)'/>
 		<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
@@ -5,15 +5,17 @@
 	<var name="default.interfaces">
 		<!-- interfaces corresponding to target types -->
 
-		<set name="INTERFACE_TYPES" value="exe stdexe ext_makefile dll stddll lib stdlib export extension ani plugin textnotifier2 implib var var2 exexp kexe kdll kext klib ldd pdd pdl fsy resource none stringtable bitmap"/>
+		<set name="INTERFACE_TYPES" value="exe stdexe ext_makefile dll stddll lib stdlib export extension ani plugin plugin3 textnotifier2 implib var var2 exexp kexe kdll kext klib pdll ldd pdd pdl fsy resource none stringtable bitmap"/>
 		<set name="INTERFACE.exe" value="Symbian.exe"/>
 		<set name="INTERFACE.stdexe" value="Symbian.stdexe"/>
 		<set name="INTERFACE.stddll" value="Symbian.stddll"/>
 		<set name="INTERFACE.stdlib" value="Symbian.stdlib"/>
 		<set name="INTERFACE.dll" value="Symbian.dll"/>
+		<set name="INTERFACE.pdll" value="Symbian.pdll"/>
 		<set name="INTERFACE.lib" value="Symbian.lib"/>
 		<set name="INTERFACE.ani" value="Symbian.ani"/>
 		<set name="INTERFACE.plugin" value="Symbian.plugin"/>
+		<set name="INTERFACE.plugin3" value="Symbian.plugin3"/>
 		<set name="INTERFACE.textnotifier2" value="Symbian.textnotifier2"/>
 		<set name="INTERFACE.implib" value="Symbian.implib"/>
 		<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
@@ -30,7 +30,7 @@
 		<env name='SBS_GNUTOUCH' default='/bin/touch' type='tool'/>
 		<env name='SBS_GNUFIND' default='/usr/bin/find' type='tool'/>
 		<env name='SBS_GNUGREP' default='/bin/grep' type='tool'/>
-		<env name='SBS_GNUSORT' default='/bin/sort' type='tool'/>
+		<env name='SBS_GNUSORT' default='sort' type='tool'/>
 		<env name='SBS_SHELL' default="$(SBS_HOME)/$(HOSTPLATFORM_DIR)/bin/sh" type='tool'/>
 		<env name='SBS_ZIP' default="$(SBS_HOME)/$(HOSTPLATFORM_DIR)/bin/zip" type='tool'/>
 		<env name='SBS_UNZIP' default="$(SBS_HOME)/$(HOSTPLATFORM_DIR)/bin/unzip" type='tool'/>
@@ -72,11 +72,12 @@
 		<env name='SBS_UNZIP' default="$(COREUTILSBINDIR)/unzip.exe" type='tool'/>
 		<env name='SBS_BVCPP' default="$(SBS_HOME)/$(HOSTPLATFORM_DIR)/bv/bin/cpp.exe" type='tool'/>
 		<env name='SBS_PERL' default='perl.exe' type='tool'/>
-		<env name='SBS_PYTHON' default='$(SBS_HOME)/$(HOSTPLATFORM_DIR)/python252/python.exe' type='tool'/>
+		<env name='SBS_PYTHON' default='python.exe' type='tool'/>
 	</var>
 
 	<var name="default.locations" extends="hostplatform.locations">
 		<env name='EPOCROOT' default='' type='path'/>
+		<env name='SBS_HOME' default='' type='path'/>
 		<!-- Place where intermediate files are built -->
 		<env name='SBS_BUILD_DIR' default='$(EPOCROOT)/epoc32/build' type='path'/>
 
@@ -107,7 +108,7 @@
 		<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='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 @@
 
 		<!-- is the text output with -j buffered or scrambled? -->
 		<set name="scrambled" value="true"/>
+
+		<!-- workaround for damaged log output from emake -->
+		<set name="copylogfromannofile" value="false"/>
 	</var>
 	
 	<alias name="make" meaning="make_engine"/>
@@ -67,6 +70,9 @@
 		<set name="build" value="$(EMAKE) HAVE_ORDERONLY= -r"/>
 		<set name="scrambled" value="false"/>
 		<set name='TALON_DESCRAMBLE' value=''/>
+
+		<!-- workaround for damaged log output from emake -->
+		<set name="copylogfromannofile" value="true"/>
 	</var>
 
 	<alias name="emake" meaning="emake_engine"/>
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
@@ -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">
-	<!-- build configurations for MSVC compilers -->
+	<!-- build variants for MSVC toolchains -->
 	<var name="tools_base" extends="root">
 		<varRef ref="default.interfaces"/>
 		<varRef ref="default.locations"/>
 
-		<!-- picked up from the Environment -->
+		<!-- toolchain tools -->
 		<env name='MS_CL' default='cl.exe' type='tool' versionCommand='$(MS_CL)' versionResult='Version 12\.[0-9]{2}\.[0-9]{4}'/>
 		<env name='MS_LINK' default='link.exe' type='tool' versionCommand='$(MS_LINK)' versionResult='Version 6\.[0-9]{2}.[0-9]{4}'/>
 		<env name='MS_LIB' default='lib.exe' type='tool' versionCommand='$(MS_LIB)' versionResult='Version 6\.[0-9]{2}.[0-9]{4}'/>
@@ -17,8 +17,14 @@
 
 		<!-- link to bld.inf and mmp platform names -->
 		<set name='TRADITIONAL_PLATFORM' value='TOOLS'/>
+
+		<!-- interfaces -->
+		<set name="INTERFACE.exe" value="msvctools.exe"/>
+		<set name="INTERFACE.lib" value="msvctools.lib"/>		
+		
 		<set name='NMAKE' value='nmake'/>
 		<set name='NMAKEFLAGS' value='-nologo -x - '/>
+		
 		<!-- tools options -->
 		<set name='OPT.BROWSEDB' value='-o'/>
 		<set name='OPT.BROWSEFILE' value='-FR'/>
@@ -32,7 +38,6 @@
 		<set name='OPT.NOLOGO' value='-nologo'/>
 		<set name='OPT.OBJECTFILE' value='-Fo'/>
 		<set name='OPT.OUTFILE' value='-out:'/>
-		<set name='OPT.PDBFILE' value='-Fd'/>
 		<set name='OPT.PREINCLUDE' value='-FI '/>
 		<set name='OPT.SUBSYSTEM' value='-subsystem:'/>
 		<set name='OPT.SYSINCLUDE' value='-I '/>
@@ -44,7 +49,7 @@
 		<set name='CDEFS.REL' value='NDEBUG'/>
 		<set name='CFLAGS' value='$(OPT.COMPILE) $(OPT.NOLOGO) -Zp4 -GF'/>
 		<set name='CFLAGS.DEFAULT.WARNLEVEL' value='-W4'/>
-		<set name='CFLAGS.DEB' value='-Zi -Od'/>
+		<set name='CFLAGS.DEB' value='-Od'/>
 		<set name='CFLAGS.REL' value='-O1 -Op'/>
 		<set name='SHAREDFLAGS' value='kernel32.lib $(OPT.NOLOGO) -machine:IX86  -ignore:4089 -ignore:4005 -ignore:4098'/>
 		<set name='LD' value='$(MS_LINK)'/>
@@ -57,9 +62,6 @@
 		<set name='BROWSEFLAGS' value='$(OPT.NOLOGO)'/>
 		<set name='PLATMACROS.WINDOWS' value='VC32 TOOLS MSVC6 MSVC600'/>
 		<set name='PLATMACROS.LINUX' value='$(PLATMACROS.WINDOWS)'/>
-		<!-- interfaces -->
-		<set name="INTERFACE.exe" value="msvctools.exe"/>
-		<set name="INTERFACE.lib" value="msvctools.lib"/>
 
 		<set name='RELEASEPATHROOT' value='$(EPOCROOT)/epoc32/release'/>
 		<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
@@ -11,6 +11,8 @@
 	-->
 
 	<var name="root">
+		<env name='FLMDEBUG' default=''/>	
+	
 		<varRef ref="root.places"/>
 		<varRef ref="root.properties"/>
 		
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
@@ -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">
-	<!-- RVCT build variant for RVCT compilers -->
+	<!-- build variant for RVCT ARM toolchains -->
 	<var name="rvct">
 		<set name="TOOLCHAIN" value="RVCT"/>
+		<set name="PLATMACROS.TOOLCHAIN" value="ARMCC"/>
+	
+		<!-- toolchain tools -->
+		<set name="ARMAR" value="$(RVCTBIN)/armar$(DOTEXE)"/>
+		<set name="ARMASM" value="$(RVCTBIN)/armasm$(DOTEXE)"/>
+		<set name="ARMCC" value="$(RVCTBIN)/armcc$(DOTEXE)"/>
+		<set name="ARMLD" value="$(RVCTBIN)/armlink$(DOTEXE)"/>
+		<set name="FROMELF" value="$(RVCTBIN)/fromelf$(DOTEXE)"/>
+		
 		<set name="CC" value="$(ARMCC)"/>
 		<set name="LD" value="$(ARMLD)"/>
 		<set name="ASM" value="$(ARMASM)"/>
 		<set name="AR" value="$(ARMAR)"/>	
-		<set name="ARMCC" value="$(RVCTBIN)/armcc$(DOTEXE)"/>
-		<set name="ARMLD" value="$(RVCTBIN)/armlink$(DOTEXE)"/>
-		<set name="ARMASM" value="$(RVCTBIN)/armasm$(DOTEXE)"/>
-		<set name="ARMAR" value="$(RVCTBIN)/armar$(DOTEXE)"/>
-		<set name="FROMELF" value="$(RVCTBIN)/fromelf$(DOTEXE)"/>
+	
 		<set name="AAPCS_OPTION" value="--apcs /inter"/>
 		<set name="ARCHIVER_CREATE_OPTION" value="--create"/>
 		<set name="ARM_INSTRUCTION_SET" value="--arm"/>
 		<set name="ASM_OUTPUT_OPTION" value="-o"/>
 		<set name="ASSEMBLER_LISTING_OPTION" value="-S"/>
 		<set name="BPABI_OPTION" value="--bpabi"/>
+		<set name="CC.DWARF2" value="--dwarf2"/>
+		<set name="CC.DWARF3" value="--dwarf3"/>
 		<set name="CC_ERRORS_CONTROL_OPTION" value="--diag_error 1267"/>
 		<set name="CC_WARNINGS_CONTROL_OPTION" value="--diag_suppress 161,611,654,997,1152,1300,1464,1488,2523,6318,6331"/>
-		<set name="C_LANG_OPTION" value=""/>
+		<set name="CFLAGS" value=""/>
+		<set name="CIADEFS" value="__CIA__"/>
+		<set name="CODE_SEGMENT_START" value=""/>
 		<set name="COMMANDFILE_OPTION" value="--via "/>
+		<set name="COMPILER_CIA_FLAGS" value=""/>
+		<set name="COMPILER_DEFINES" value=""/>
+		<set name="COMPILER_FPU_OPTION" value="--fpu "/>
+		<set name="COMPILER_INTERWORK_DEFINES" value="__MARM_INTERWORK__"/>
+		<set name="COMPILER_SYSTEM_INCLUDE_OPTION" value="-J"/>
+		<set name="COMPILER_THUMB_DEFINES" value="__MARM_THUMB__"/>
 		<set name="COMPILE_ONLY_OPTION" value="-c"/>
 		<set name="CPP_LANG_OPTION" value="--cpp"/>
+		<set name="C_LANG_OPTION" value=""/>
+		<set name="DATA_SEGMENT_START" value="$(SPLIT_OPTION) $(RW_BASE_OPTION)"/>
 		<set name="DEBUG_OPTIMISATION" value="-O0"/>
 		<set name="DEPEND_OPTION" value="--depend_format=unix --depend"/>
 		<set name="ENUM_OPTION" value="--enum_is_int"/>
+		<set name="EXCEPTIONS" value="--exceptions --exceptions_unwind"/>
 		<set name="EXPORT_VTBL_OPTION" value="--export_all_vtbl"/>
+		<set name="EXTRA_CC_OPTION" value=""/>
 		<set name="EXTRA_LD_OPTION" value="--datacompressor=off"/>
 		<set name="FPMODE_OPTION" value="--fpmode ieee_no_fenv"/>
-		<set name="LD_ERRORS_CONTROL_OPTION" value=""/>
-		<set name="LD_WARNINGS_CONTROL_OPTION" value="--diag_suppress 6331"/>
-		<set name="LISTING_OPTION" value="-S"/>
-		<set name="EXCEPTIONS" value="--exceptions --exceptions_unwind"/>
-		<set name="NO_EXCEPTIONS" value="--no_exceptions --no_exceptions_unwind"/>
-		<set name="PREINCLUDE_OPTION" value="--preinclude"/>
-		<set name="PREPROCESSOR_OPTION" value="-E"/>
-		<set name="REL_OPTIMISATION" value="-O2"/>
-		<set name="STDLIB_OPTION" value="--no_scanlib"/>
-		<set name="RUNTIME_SYMBOL_VISIBILITY_OPTION" value="--dllimport_runtime"/>
-		<set name="RW_BASE_OPTION" value="--rw-base"/>
-		<set name="CODE_SEGMENT_START" value=""/>
-		<set name="PREINCLUDE" value="$(RVCT_PRE_INCLUDE)"/>
-		<set name="CC.DWARF2" value="--dwarf2"/>
-		<set name="CC.DWARF3" value="--dwarf3"/>
+		<set name="HEADER_FILES_CONTROL_OPTION" value=""/>
+		<set name="INSTRUCTION_SET" value=""/>
 		<set name="LD.ARMV5" value=""/>
 		<set name="LD.ARMV6" value=""/>
 		<set name="LD.ARMV7" value=""/>
-		<set name="ARMMACROS.VAR" value=""/>
-		<set name="CFLAGS" value=""/>
-		<set name="CIADEFS" value="__CIA__"/>
-		<append name="CDEFS" value='__SUPPORT_CPP_EXCEPTIONS__ _UNICODE __SYMBIAN32__ __ARMCC__ __EPOC32__ __MARM__ __EABI__ __PRODUCT_INCLUDE__="$(PRODUCT_INCLUDE)" $(MMPDEFS) $(ARMMACROS)'/>
-		<set name="COMPILER_CIA_FLAGS" value=""/>
-		<set name="COMPILER_FPU_FLAGS" value="--fpu $(ARMFPU)"/>	
-		<set name="COMPILER_DEFINES" value=""/>
-		<set name="COMPILER_INTERWORK_DEFINES" value="__MARM_INTERWORK__"/>
-		<set name="COMPILER_SYSTEM_INCLUDE_OPTION" value="-J"/>
-		<set name="COMPILER_THUMB_DEFINES" value="__MARM_THUMB__"/>
-		<set name="DATA_SEGMENT_START" value="$(SPLIT_OPTION) $(RW_BASE_OPTION)"/>
-		<set name="EXTRA_CC_OPTION" value=""/>
-		<set name="HEADER_FILES_CONTROL_OPTION" value=""/>
+		<set name="LD_ERRORS_CONTROL_OPTION" value=""/>
+		<set name="LD_WARNINGS_CONTROL_OPTION" value="--diag_suppress 6331"/>
+		<set name="LD_WARNINGS_SUPPRESSION_ARMLIBS" value="--diag_suppress 6780"/>
 		<set name="LIBPATH" value=""/>
 		<set name="LIBRARY" value=""/>
 		<set name="LICENSERETRY_OPTION" value=""/>
@@ -69,25 +65,35 @@
 		<set name="LINKER_DEFAULT_LIBS" value=""/>
 		<set name="LINKER_DEFAULT_LIB_PATHS" value=""/>
 		<set name="LINKER_ENTRY_OPTION" value="--entry"/>
-		<set name="LINKER_GROUP_START_OPTION" value=""/>
 		<set name="LINKER_GROUP_END_OPTION" value=""/>
+		<set name="LINKER_GROUP_START_OPTION" value=""/>
 		<set name="LINKER_MISC_FLAGS" value="$(LICENSERETRY_OPTION)"/>
 		<set name="LINKER_NODEBUG_OPTION" value=""/>
 		<set name="LINKER_SCRIPT_FILE_OPTION" value=""/>
-		<set name="LINKER_SYMBOLS_OPTION" value="--symbols"/>
 		<set name="LINKER_SYMBOLS_FILE_OPTION" value="--list"/>
+		<set name="LINKER_SYMBOLS_OPTION" value="--symbols"/> 
+		<set name="LISTING_OPTION" value="-S"/>
+		<set name="NO_EXCEPTIONS" value="--no_exceptions --no_exceptions_unwind"/>
+		<set name="NO_UNALIGNED_ACCESS" value="$(CC.NO_UNALIGNED_ACCESS)"/>
+		<set name="PREINCLUDE" value="$(RVCT_PRE_INCLUDE)"/>
+		<set name="PREINCLUDE_OPTION" value="--preinclude"/>
+		<set name="PREPROCESSOR_OPTION" value="-E"/>
+		<set name="REL_OPTIMISATION" value="-O2"/>
+		<set name="RUNTIME_SYMBOL_VISIBILITY_OPTION" value="--dllimport_runtime"/>
+		<set name="RW_BASE" value="$(RW_BASE_OPTION) 0x400000"/>
+		<set name="RW_BASE_OPTION" value="--rw-base"/> 
 		<set name="SHARED_OBJECT_OPTION" value="--dll"/>
 		<set name="SID" value=""/>
 		<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="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=""/>
 		<set name="THUMB_INSTRUCTION_SET" value="--thumb"/>
-		<set name="INSTRUCTION_SET" value=""/>
 		<set name="TRANASM_FLAGS" value="-n -s"/>
 		<set name="TRANASM_INPUT_OPTION" value=""/>
 		<set name="TRANASM_OUTPUT_OPTION" value="-o="/>
@@ -98,10 +104,7 @@
 		<set name="USERINCLUDE" value=""/>
 		<set name="USER_LIBS_PATH_OPTION" value="--userlibpath"/>
 		<set name="VFE_OPTION" value="--no_vfe"/>
-		<set name="PLATMACROS.WINDOWS" value="ARMCC EPOC32 MARM EABI GENERIC_MARM MARM_ARMV5 $(PLATMACROS.CONFIG) $(PLATMACROS.VAR)"/>
-		<set name="PLATMACROS.LINUX" value="$(PLATMACROS.WINDOWS)"/>
-		<set name="PLATMACROS.CONFIG" value=""/>
-		<set name="PLATMACROS.VAR" value=""/>
-		<set name="NO_UNALIGNED_ACCESS" value="$(CC.NO_UNALIGNED_ACCESS)"/>
+		
+		<append name="CDEFS" value="__ARMCC__"/>
 	</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/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
@@ -6,10 +6,23 @@
 	
 	-->
   
+	<!-- This variant enables building win32 tools in Linux. Tools2 on Linux only -->
+	<var name="win32">
+		<set name='TOOLS2WIN32' value='1'/>
+		<env name='SBS_MINGW_LINUX_PREFIX' default='i586-mingw32msvc'/>
+		<env name='GCC' default='$(SBS_MINGW_LINUX_PREFIX)-g++' type='tool'/>
+		<env name='ARCHIVER' default='$(SBS_MINGW_LINUX_PREFIX)-ar' type='tool'/>
+		<env name='RANLIB' default='$(SBS_MINGW_LINUX_PREFIX)-ranlib' type='tool'/>
+		<set name='RELEASEPATH' value='$(EPOCROOT)/epoc32/release/tools2/$(VARIANTTYPE)'/>
+		<set name='DOTEXE' value='.exe'/>
+		<set name='PLATMACROS.LINUX' value='$(PLATMACROS.WINDOWS)'/>
+	</var>
+
 	<!-- This variant turns debug info on for arm only -->
 	<var name="debug_info">
 		<set name='DEBUG_INFO' value='1'/>
 	</var>
+	
 	<!-- Run this variant to turn on trace compiler -->
 	<var name="tracecompiler">
 		<set name='USE_TRACE_COMPILER' value='1'/>
@@ -77,67 +91,40 @@
 	</var>
 
 	<var name="gcce4_3_2" extends="gcce_base">
-		<env name="GCCEBIN" type="path" />
-		<env name="GCCEVERSION" default="$(TOOLCHAINVERSION)" />
-		<set name="TOOLCHAINVERSION" value="4.3.2" />
-		<set name="OWN_LIBRARY_OPTION" value=""/>
-		<set name="STATIC_LIBS_LIST" value=""/>
+		<env name="SBS_GCCE432BIN" type="toolchainpath" />
+		<set name="GCCEBIN" value="$(SBS_GCCE432BIN)" />
+		<set name="GCCECC" value="$(GCCEBIN)/arm-none-symbianelf-g++$(DOTEXE)" type="tool" versionCommand="$(GCCECC) -dumpversion" versionResult="4.3.2"/>
 		<set name="RUNTIME_LIBS_LIST" value="drtaeabi.dso dfpaeabi.dso dfprvct3_1.dso drtrvct3_1.dso"/>
-		<set name="ARMLIBS" value=""/>
-		<set name="CC.OPT.SOFTVFP_MAYBE_VFPV2" value="-m"/>
-		<set name="CC.VAL.SOFTVFP_MAYBE_VFPV2" value="soft-float"/>
-		<set name="CC.ARMV5" value="-march=armv5t"/>
-		<set name="LD.ARMV5" value=""/>
-		<set name="LD.ARMV6" value=""/>
-		<set name="LD.ARMV7" value=""/>
-		<set name="RELOCATABLE_IMAGE_OPTION" value=""/>
-		<set name="RVCTLIB" value=""/>
-		<set name="CC.NO_UNALIGNED_ACCESS" value=""/>
-		<set name="CC.SOFTVFP_MAYBE_VFPV2" value=""/>
-		<set name="SPLIT_OPTION" value=""/>
-		<set name="NEED_ENTRYPOINT_LIBRARY" value=""/>
-		<set name="RVCTBIN" value="" />
-		<set name="RVCTINC" value="" />
-		<set name="USER_STATIC_RUNTIME_LIB" value="usrt3_1.lib"/>
-		<set name="KERNEL_STATIC_RUNTIME_LIB" value="ksrt3_1.lib"/>
-		<set name="NEED_ENTRYPOINT_LIBRARY" value="" />
+		<set name="PLATMACROS.VAR" value="GCCE_4 GCCE_4_3"/>
+		<set name="ARMMACROS.VAR" value="__GCCE_4__ __GCCE_4_3__"/>
 	</var>
 
 	<var name="gcce4_3_3" extends="gcce_base">
-		<env name="GCCEBIN" type="path" />
-		<env name="GCCEVERSION" default="$(TOOLCHAINVERSION)" />
-		<set name="TOOLCHAINVERSION" value="4.3.3" />
-		<set name="OWN_LIBRARY_OPTION" value=""/>
-		<set name="STATIC_LIBS_LIST" value=""/>
+		<env name="SBS_GCCE433BIN" type="toolchainpath" />
+		<set name="GCCEBIN" value="$(SBS_GCCE433BIN)" />
+		<set name="GCCECC" value="$(GCCEBIN)/arm-none-symbianelf-g++$(DOTEXE)" type="tool" versionCommand="$(GCCECC) -dumpversion" versionResult="4.3.3"/>
 		<set name="RUNTIME_LIBS_LIST" value="drtaeabi.dso dfpaeabi.dso dfprvct3_1.dso drtrvct3_1.dso"/>
-		<set name="ARMLIBS" value=""/>
-		<set name="CC.OPT.SOFTVFP_MAYBE_VFPV2" value="-m"/>
-		<set name="CC.VAL.SOFTVFP_MAYBE_VFPV2" value="soft-float"/>
-		<set name="CC.ARMV5" value="-march=armv5t"/>
-		<set name="LD.ARMV5" value=""/>
-		<set name="LD.ARMV6" value=""/>
-		<set name="LD.ARMV7" value=""/>
-		<set name="RELOCATABLE_IMAGE_OPTION" value=""/>
-		<set name="RVCTLIB" value=""/>
-		<set name="CC.NO_UNALIGNED_ACCESS" value=""/>
-		<set name="CC.SOFTVFP_MAYBE_VFPV2" value=""/>
-		<set name="SPLIT_OPTION" value=""/>
-		<set name="NEED_ENTRYPOINT_LIBRARY" value=""/>
-		<set name="RVCTBIN" value="" />
-		<set name="RVCTINC" value="" />
-		<set name="USER_STATIC_RUNTIME_LIB" value="usrt3_1.lib"/>
-		<set name="KERNEL_STATIC_RUNTIME_LIB" value="ksrt3_1.lib"/>
-		<set name="NEED_ENTRYPOINT_LIBRARY" value="" />
+		<set name="PLATMACROS.VAR" value="GCCE_4 GCCE_4_3"/>
+		<set name="ARMMACROS.VAR" value="__GCCE_4__ __GCCE_4_3__"/>
+	</var>
+	
+	<var name="gcce4_4_1" extends="gcce_base">
+		<env name="SBS_GCCE441BIN" type="toolchainpath" />
+		<set name="GCCEBIN" value="$(SBS_GCCE441BIN)" />
+		<set name="GCCECC" value="$(GCCEBIN)/arm-none-symbianelf-g++$(DOTEXE)" type="tool" versionCommand="$(GCCECC) -dumpversion" versionResult="4.4.1"/>
+		<set name="RUNTIME_LIBS_LIST" value="drtaeabi.dso dfpaeabi.dso"/>
+		<set name="PLATMACROS.VAR" value="GCCE_4 GCCE_4_4"/>
+		<set name="ARMMACROS.VAR" value="__GCCE_4__ __GCCE_4_4__"/>
 	</var>
 
 	<var name="rvct2_2" extends="rvct">
-		<env name="RVCT22BIN" type="path"/>
-		<env name="RVCT22INC" type="path"/>
-		<env name="RVCT22LIB" type="path"/>
+		<env name="RVCT22BIN" type="toolchainpath"/>
+		<env name="RVCT22INC" type="toolchainpath"/>
+		<env name="RVCT22LIB" type="toolchainpath"/>
 		<set name="RVCTBIN" value="$(RVCT22BIN)"/>
 		<set name="RVCTINC" value="$(RVCT22INC)"/>
 		<set name="RVCTLIB" value="$(RVCT22LIB)"/>
-		<set name="ARMCC" value="&quot;$(RVCTBIN)/armcc$(DOTEXE)&quot;" type="tool" versionCommand="$(ARMCC) --vsn" versionResult="Compiler, RVCT2\.2\b"/>
+		<set name="ARMCC" value="$(RVCTBIN)/armcc$(DOTEXE)" type="tool" versionCommand="$(ARMCC) --vsn" versionResult="Compiler, RVCT2\.2\b"/>
 		<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 @@
 		<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"/>
+		<set name="USER_STATIC_RUNTIME_LIB_NESTED_EXCEPTIONS" value="usrt_nx_2_2.lib"/>
 		<set name="KERNEL_STATIC_RUNTIME_LIB" value="ksrt2_2.lib"/>
-		<set name="USRTLIB" value="usrt2_2.lib"/>
 		<set name="NEED_ENTRYPOINT_LIBRARY" value="False"/>
 		<set name="CC.NO_UNALIGNED_ACCESS" value="--memaccess -UL41"/>
 		<set name="CC.SOFTVFP_MAYBE_VFPV2" value="softvfp"/>
+		<set name="PL.SOFTVFP_MAYBE_VFPV2" value="softvfp"/>
 		<set name="CC.ARMV5" value="--cpu 5T"/>
 		<set name="CC.ARMV6" value="--cpu 6"/>
 	</var>
 
 	<var name="rvct3_1" extends="rvct">
-		<env name="RVCT31BIN" type="path"/>
-		<env name="RVCT31INC" type="path"/>
-		<env name="RVCT31LIB" type="path"/>
+		<env name="RVCT31BIN" type="toolchainpath"/>
+		<env name="RVCT31INC" type="toolchainpath"/>
+		<env name="RVCT31LIB" type="toolchainpath"/>
 		<set name="RVCTBIN" value="$(RVCT31BIN)"/>
 		<set name="RVCTINC" value="$(RVCT31INC)"/>
 		<set name="RVCTLIB" value="$(RVCT31LIB)"/>
-		<set name="ARMCC" value="&quot;$(RVCTBIN)/armcc$(DOTEXE)&quot;" type="tool" versionCommand="$(ARMCC) --version_number" versionResult="310[6-9]\d\d\b"/>
+		<set name="ARMCC" value="$(RVCTBIN)/armcc$(DOTEXE)" type="tool" versionCommand="$(ARMCC) --version_number" versionResult="310[6-9]\d\d\b"/>
 		<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 @@
 		<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"/>
+		<set name="USER_STATIC_RUNTIME_LIB_NESTED_EXCEPTIONS" value="usrt_nx_3_1.lib"/>
 		<set name="KERNEL_STATIC_RUNTIME_LIB" value="ksrt3_1.lib"/>
-		<set name="USRTLIB" value="usrt3_1.lib"/>
 		<set name="NEED_ENTRYPOINT_LIBRARY" value="True"/>
 		<set name="CC.NO_UNALIGNED_ACCESS" value="--no_unaligned_access"/>
 		<set name="CC.SOFTVFP_MAYBE_VFPV2" value="softvfp"/>
+		<set name="PL.SOFTVFP_MAYBE_VFPV2" value="softvfp"/>
 		<set name="CC.SOFTVFP_MAYBE_VFPV3" value="softvfp"/>
-		<set name="CC.ARMV5" value="--cpu=5TE"/>
-		<set name="CC.ARMV6" value="--cpu=6"/>
-		<set name="CC.ARMV7" value="--cpu=7-A"/>
+		<set name="PL.SOFTVFP_MAYBE_VFPV3" value="softvfp"/>
+		<set name="CC.ARMV5" value="--cpu 5TE"/>
+		<set name="CC.ARMV6" value="--cpu 6"/>
+		<set name="CC.ARMV7" value="--cpu 7-A"/>
 	</var>
 
 	<var name="rvct4_0" extends="rvct">
-		<env name="RVCT40BIN" type="path"/>
-		<env name="RVCT40INC" type="path"/>
-		<env name="RVCT40LIB" type="path"/>
+		<env name="RVCT40BIN" type="toolchainpath"/>
+		<env name="RVCT40INC" type="toolchainpath"/>
+		<env name="RVCT40LIB" type="toolchainpath"/>
 		<set name="RVCTBIN" value="$(RVCT40BIN)"/>
 		<set name="RVCTINC" value="$(RVCT40INC)"/>
 		<set name="RVCTLIB" value="$(RVCT40LIB)"/>
-		<set name="ARMCC" value="&quot;$(RVCTBIN)/armcc$(DOTEXE)&quot;" type="tool" versionCommand="$(ARMCC) --version_number" versionResult="400[4-9]\d\d\b"/>
+		<set name="ARMCC" value="$(RVCTBIN)/armcc$(DOTEXE)" type="tool" versionCommand="$(ARMCC) --version_number" versionResult="400[4-9]\d\d\b"/>
 		<set name="OWN_LIBRARY_OPTION" value="--library_interface=aeabi_clib"/>
 		<set name="RELOCATABLE_IMAGE_OPTION" value=""/>
 		<set name="SPLIT_OPTION" value=""/>
-		<set name="STDLIB_OPTION" value=""/>
 		<set name="PLATMACROS.VAR" value="ARMCC_4 ARMCC_4_0"/>
 		<set name="ARMMACROS.VAR" value="__ARMCC_4__ __ARMCC_4_0__"/>
 		<set name="SYMBIAN_LINK_FLAGS.VAR" value="--override_visibility"/>
 		<set name="STATIC_LIBS_LIST" value=""/>
 		<set name="RUNTIME_LIBS_LIST" value="drtaeabi.dso dfpaeabi.dso"/>
 		<set name="USER_STATIC_RUNTIME_LIB" value="usrt4_0.lib"/>
+		<set name="USER_STATIC_RUNTIME_LIB_NESTED_EXCEPTIONS" value="usrt_nx_4_0.lib"/>
 		<set name="KERNEL_STATIC_RUNTIME_LIB" value="ksrt4_0.lib"/>
-		<set name="USRTLIB" value="usrt4_0.lib"/>
 		<set name="NEED_ENTRYPOINT_LIBRARY" value="True"/>
 		<set name="CC.NO_UNALIGNED_ACCESS" value="--no_unaligned_access"/>
 		<set name="CC.SOFTVFP_MAYBE_VFPV2" value="softvfp+vfpv2"/>
+		<set name="PL.SOFTVFP_MAYBE_VFPV2" value="vfpv2"/>
 		<set name="CC.SOFTVFP_MAYBE_VFPV3" value="softvfp+vfpv3"/>
-		<set name="CC.ARMV5" value="--cpu=5TE"/>
-		<set name="CC.ARMV6" value="--cpu=6"/>
-		<set name="CC.ARMV7" value="--cpu=7-A"/>
-		<set name="LD.ARMV5" value="$(CC.ARMV5)"/>
-		<set name="LD.ARMV6" value="$(CC.ARMV6)"/>
-		<set name="LD.ARMV7" value="$(CC.ARMV7)"/>
+		<!-- Not supported yet : <set name="PL.SOFTVFP_MAYBE_VFPV3" value="vfpv3"/> -->
+		<set name="PL.SOFTVFP_MAYBE_VFPV3" value="vfpv2"/>
+		<set name="CC.ARMV5" value="--cpu 5TE"/>
+		<set name="CC.ARMV6" value="--cpu 6"/>
+		<set name="CC.ARMV7" value="--cpu 7-A"/>
 	</var>
 
 	<var name="urel">
@@ -262,4 +251,17 @@
 		<set name='OPTION_CW' value='-cwd include'/>
 	</var>
 
+	<!-- Variant to allow GCCE-built binaries to be created in epoc32/release/gcce, 
+	     epoc32/release/gccev6 and epoc32/release/gccev7 -->
+	<var name="release_gcce">
+		<set name="VARIANTPLATFORM" value="gcce" />
+		<set name="STATIC_RUNTIME_DIR" value="$(EPOCROOT)/epoc32/release/armv5/$(VARIANTTYPE)"/>
+		<set name="STATIC_LIBRARY_DIR" value="$(EPOCROOT)/epoc32/release/armv5/$(VARIANTTYPE)"/>
+	</var>
+	<var name="release_gccev6" extends="release_gcce" >
+		<set name="VARIANTPLATFORM" value="gccev6" />
+	</var>
+	<var name="release_gccev7" extends="release_gcce" >
+		<set name="VARIANTPLATFORM" value="gccev7" />
+	</var>
 </build>
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
@@ -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">
-	<!-- build configurations for Metrowerks Emulator compilers -->
+	<!-- build variants for CodeWarrior toolchains -->
 	<var name="winscw_base" extends="root">
 		<varRef ref="default.interfaces"/>
 		<varRef ref="default.locations"/>
-		<!-- picked up from the Environment -->
-		<env name='CHECKLIB' default='$(EPOCROOT)/epoc32/tools/checklib$(DOTEXE)' type='tool'/>
-		<env name='EFREEZE' default="$(PERL) $(EPOCROOT)/epoc32/tools/efreeze.pl" type='tool'/>
-		<env name='BMCONV' default="$(EPOCROOT)/epoc32/tools/bmconv$(DOTEXE)" type='tool'/>
-		<env name='MAKEDEF' default='$(PERL) $(EPOCROOT)/epoc32/tools/makedef.pl' type='path'/>
-		<env name='MWCC' default='mwccsym2$(DOTEXE)' type='tool' versionCommand='$(MWCC) -version' versionResult='Version 3.2.*'/>
-		<env name='MWLD' default='mwldsym2$(DOTEXE)' type='tool' versionCommand='$(MWLD) -version' versionResult='Version 3.2.*'/>
-		<env name='MWWINRC' default='mwwinrc$(DOTEXE)' type='tool' versionCommand='$(MWWINRC) -version' versionResult='Version 3.2.*'/>
-
-		<env name='PREPDEF' default='$(PERL) $(EPOCROOT)/epoc32/tools/prepdef.pl' type='path'/>
-		<env name='RCOMP' default='$(EPOCROOT)/epoc32/tools/rcomp$(DOTEXE)' type='tool'/>
-		<env name='STRINGTABLE' default='$(PERL) $(EPOCROOT)/epoc32/tools/stringtable.pl' type='path'/>	
+		
+		<!-- toolchain tools -->
+		<env name="MWCC" default="mwccsym2$(DOTEXE)" type="tool" versionCommand="$(MWCC) -version" versionResult="Version 3.2.*"/>
+		<env name="MWLD" default="mwldsym2$(DOTEXE)" type="tool" versionCommand="$(MWLD) -version" versionResult="Version 3.2.*"/>
+		<env name="MWWINRC" default="mwwinrc$(DOTEXE)" type="tool" versionCommand="$(MWWINRC) -version" versionResult="Version 3.2.*"/>
+		
+		<set name="CC" value="$(MWCC)"/>
+		<set name="LD" value="$(MWLD)"/>
+		<set name="RC" value="$(MWWINRC)"/>
+		
+		<!-- tools and scripts -->
+		<env name="BMCONV" default="$(EPOCROOT)/epoc32/tools/bmconv$(DOTEXE)" type="tool"/>
+		<env name="CHECKLIB" default="$(EPOCROOT)/epoc32/tools/checklib$(DOTEXE)" type="tool"/>
+		<env name="EFREEZE" default="$(PERL) $(EPOCROOT)/epoc32/tools/efreeze.pl" type="script"/>
+		<env name="MAKEDEF" default="$(PERL) $(EPOCROOT)/epoc32/tools/makedef.pl" type="script"/>
+		<env name="PREPDEF" default="$(PERL) $(EPOCROOT)/epoc32/tools/prepdef.pl" type="script"/>
+		<env name="RCOMP" default="$(EPOCROOT)/epoc32/tools/rcomp$(DOTEXE)" type="tool"/>
+		<env name="SBSV1MAKE" default="$(EPOCROOT)/epoc32/tools/make$(DOTEXE)" type="tool"/>
+		<env name="STRINGTABLE" default="$(PERL) $(EPOCROOT)/epoc32/tools/stringtable.pl" type="script"/>	
 		
 		<!-- link to bld.inf and mmp platform names -->
-		<set name='TRADITIONAL_PLATFORM' value='WINSCW'/>
+		<set name="TRADITIONAL_PLATFORM" value="WINSCW"/>
 
 		<!-- interfaces -->
 		<set name="INTERFACE.ani" value="Emulator.ani"/>
@@ -26,6 +33,7 @@
 		<set name="INTERFACE.exe" value="Emulator.exe"/>
 		<set name="INTERFACE.stdexe" value="Emulator.stdexe"/>
 		<set name="INTERFACE.dll" value="Emulator.dll"/>
+		<set name="INTERFACE.pdll" value="Emulator.pdll"/>
 		<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 @@
 		<set name="INTERFACE.pdd" value="Emulator.pdd"/>
 		<set name="INTERFACE.pdl" value="Emulator.pdl"/>
 		<set name="INTERFACE.plugin" value="Emulator.plugin"/>
+		<set name="INTERFACE.plugin3" value="Emulator.plugin3"/>
 		<set name="INTERFACE.resource" value="Emulator.resource"/>
 		<set name="INTERFACE.textnotifier2" value="Emulator.textnotifier2"/>
 		<set name="INTERFACE.var" value="Emulator.var"/>
-		<set name='CC' value='$(MWCC)'/>
-		<set name='CDEFS' value='__SYMBIAN32__ __CW32__ __WINS__ __WINSCW__ __SUPPORT_CPP_EXCEPTIONS__ _UNICODE $(MMPDEFS)'/>
-		<set name='CFLAGS' value='-c -align 4 -warnings on -w nohidevirtual,nounusedexpr -msgstyle gcc -enum int -str pool -exc ms -trigraphs on -cwd source'/>
-		<set name='CW_DEFAULT_LIBS' value='gdi32.lib user32.lib kernel32.lib'/>
-		<set name='CW_RUNTIME_STATIC' value='msl_all_static_mse_symbian_d.lib'/>
-		<set name='CW_RUNTIME_NONSTATIC' value='MSL_All_x86_Symbian_D.lib'/>
-		<set name='DEFAULT_NORMAL_NEWLIB' value='scppnwdl.lib'/>
-		<set name='DEFAULT_SYSTEM_NEWLIB' value='scppnwdl_kern.lib'/>
-		<set name='EXPORT_TYPE' value='dllexport'/>
-		<set name='LD' value='$(MWLD)'/>
-		<set name='LFLAGS' value='-msgstyle gcc -stdlib -subsystem windows'/>
-		<set name='LFLAGS_INFGEN' value='-S -show only,names,unmangled,verbose '/>
-		<set name='LFLAGS_SYMGEN' value='-S -show only,names,verbose '/>
-		<set name='LINKPATH' value='winscw/udeb'/>
-		<set name='LISTING_OPTION' value='-S'/>
-		<set name='MMPDEFS' value=''/>
-		<set name='EPOCSTACKSIZE' value=''/>
-		<set name='NMAKE' value='nmake'/>
-		<set name='NMAKEFLAGS' value='-nologo -x - '/>
-		<set name='OPT.ADDCOMMAND' value='-addcommand '/>
-		<set name='OPT.CHECKLIB.STDCPP' value='stdc++'/>
-		<set name='OPT.CHECKLIB.SYMCPP' value='symc++'/>
-		<set name='OPT.CHECKLIB.WIN32' value='--coff'/>
-		<set name='OPT.HEAPCOMMIT' value='-heapcommit='/>
-		<set name='OPT.DEFINE' value='-d '/>
-		<set name='OPT.DEFFILE' value='-f '/>
-		<set name='OPT.DEPEND' value='-gccdepends -MD '/>
-		<set name='OPT.EXPORT' value='-export '/>
-		<set name='OPT.HEAPRESERVE' value='-heapreserve='/>
-		<set name='OPT.IMAGEBASE' value='-imagebase '/>
-		<set name='OPT.IMPLIB' value='-implib '/>
-		<set name='OPT.IMPORTLIB' value='-importlib '/>
-		<set name='OPT.LIBFILE' value='-l'/>
-		<set name='OPT.LIBPATH' value='-l '/>
-		<set name='OPT.LISTING' value='-S -show source,unmangled,comments '/>
-		<set name='OPT.MENTRYPOINT' value='-m '/>
-		<set name='OPT.MAINENTRYPOINT' value='-main '/>
-		<set name='OPT.MAP' value='-map '/>
-		<set name='OPT.NOCOMPACTIMPORTLIB' value='-nocompactimportlib '/>
-		<set name='OPT.NOENTRY' value='-noentry '/>
-		<set name='OPT.NOIMPLIB' value='-noimplib '/>
-		<set name='OPT.NOSTDINC' value='-nostdinc '/>
-		<set name='OPT.OUT' value='-o '/>
-		<set name='OPT.PREINCLUDE' value='-include '/>
-		<set name='OPT.RUNTIME' value='-runtime '/>
-		<set name='OPT.SEARCH' value='-search'/>
-		<set name='OPT.SHARED' value='-shared '/>
-		<set name='OPT.SPLITINCLUDE' value='-i-'/>
-		<set name='OPT.STATICLIBRARY' value='-library '/>
-		<set name='OPT.STDINC' value='-stdinc '/>
-		<set name='OPT.STDLIB' value='-stdlib '/>
-		<set name='OPT.SYM' value='-sym '/>
-		<set name='OPT.SYSINCLUDE' value='-i '/>
-		<set name='OPT.USERINCLUDE' value='-i '/>
-		<set name='OPT.WCHAR' value='-wchar_t '/>
-		<set name='OPT.WARNINGS' value='-warnings '/>
-		<set name='OUTPUTPATH' value='$(SBS_BUILD_DIR)'/>
-		<set name='BLDINF_OUTPUTPATH' value='$(SBS_BUILD_DIR)'/>
-		<set name='RC' value='$(MWWINRC)'/>
-		<set name='RELEASEPATH' value='$(EPOCROOT)/epoc32/release'/>
-		<set name='SBSV1MAKE' value='$(EPOCROOT)/epoc32/tools/make$(DOTEXE)'/>
-		<set name='STDCPP_DEF' value='__SYMBIAN_STDCPP_SUPPORT__'/>
-		<set name='STDCPP_INCLUDE' value='$(EPOCINCLUDE)/stdapis'/>
-		<set name='STDCPP_WCHAR_DEF' value='__wchar_t_defined'/>
-		<set name='SYMLOOKUPUTIL' value='$(PERL) $(EPOCROOT)/epoc32/tools/sym_lkup_util.pl'/>
-		<set name='SYMLOOKUPARGS' value='--ignore_export_dir'/>
-		<set name='SYSTEMINCLUDE' value=''/>
-		<set name='TARGET' value='TARGET_WAS_NOT_SET_PROPERLY'/>
-		<set name='TARGETPATH' value=''/>
-		<set name='TARGETTYPE' value='TARGETTYPE_WAS_NOT_SET_PROPERLY'/>
-		<set name='USERINCLUDE' value=''/>
-		<set name='VARIANTPLATFORM' value='winscw'/>
-		<set name='PLATMACROS.WINDOWS' value='CW32 WINS WINSCW'/>
-		<set name='PLATMACROS.LINUX' value='$(PLATMACROS.WINDOWS)'/>
+		
+		<set name="BLDINF_OUTPUTPATH" value="$(SBS_BUILD_DIR)"/>
+		<set name="CDEFS" value="__SYMBIAN32__ __CW32__ __WINS__ __WINSCW__ __SUPPORT_CPP_EXCEPTIONS__ _UNICODE $(MMPDEFS)"/>
+		<set name="CFLAGS" value="-c -align 4 -warnings on -w nohidevirtual,nounusedexpr -msgstyle gcc -enum int -str pool -exc ms -trigraphs on -cwd source"/>
+		<set name="CW_DEFAULT_LIBS" value="gdi32.lib user32.lib kernel32.lib"/>
+		<set name="CW_RUNTIME_NONSTATIC" value="MSL_All_x86_Symbian_D.lib"/>
+		<set name="CW_RUNTIME_STATIC" value="msl_all_static_mse_symbian_d.lib"/>
+		<set name="DEFAULT_NORMAL_NEWLIB" value="scppnwdl.lib"/>
+		<set name="DEFAULT_SYSTEM_NEWLIB" value="scppnwdl_kern.lib"/>
+		<set name="EPOCSTACKSIZE" value=""/>
+		<set name="EXPORT_TYPE" value="dllexport"/>
+		<set name="LFLAGS" value="-msgstyle gcc -stdlib -subsystem windows"/>
+		<set name="LFLAGS_INFGEN" value="-S -show only,names,unmangled,verbose "/>
+		<set name="LFLAGS_SYMGEN" value="-S -show only,names,verbose "/>
+		<set name="LINKPATH" value="winscw/udeb"/>
+		<set name="LISTING_OPTION" value="-S"/>
+		<set name="MMPDEFS" value=""/>
+		<set name="NMAKE" value="nmake"/>
+		<set name="NMAKEFLAGS" value="-nologo -x - "/>
+		<set name="OPT.ADDCOMMAND" value="-addcommand "/>
+		<set name="OPT.CHECKLIB.STDCPP" value="stdc++"/>
+		<set name="OPT.CHECKLIB.SYMCPP" value="symc++"/>
+		<set name="OPT.CHECKLIB.WIN32" value="--coff"/>
+		<set name="OPT.DEFFILE" value="-f "/>
+		<set name="OPT.DEFINE" value="-d "/>
+		<set name="OPT.DEPEND" value="-gccdepends -MD "/>
+		<set name="OPT.EXPORT" value="-export "/>
+		<set name="OPT.HEAPCOMMIT" value="-heapcommit="/>
+		<set name="OPT.HEAPRESERVE" value="-heapreserve="/>
+		<set name="OPT.IMAGEBASE" value="-imagebase "/>
+		<set name="OPT.IMPLIB" value="-implib "/>
+		<set name="OPT.IMPORTLIB" value="-importlib "/>
+		<set name="OPT.LIBFILE" value="-l"/>
+		<set name="OPT.LIBPATH" value="-l "/>
+		<set name="OPT.LISTING" value="-S -show source,unmangled,comments "/>
+		<set name="OPT.MAINENTRYPOINT" value="-main "/>
+		<set name="OPT.MAP" value="-map "/>
+		<set name="OPT.MENTRYPOINT" value="-m "/>
+		<set name="OPT.NOCOMPACTIMPORTLIB" value="-nocompactimportlib "/>
+		<set name="OPT.NOENTRY" value="-noentry "/>
+		<set name="OPT.NOIMPLIB" value="-noimplib "/>
+		<set name="OPT.NOSTDINC" value="-nostdinc "/>
+		<set name="OPT.OUT" value="-o "/>
+		<set name="OPT.PREINCLUDE" value="-include "/>
+		<set name="OPT.RUNTIME" value="-runtime "/>
+		<set name="OPT.SEARCH" value="-search"/>
+		<set name="OPT.SHARED" value="-shared "/>
+		<set name="OPT.SPLITINCLUDE" value="-i-"/>
+		<set name="OPT.STATICLIBRARY" value="-library "/>
+		<set name="OPT.STDINC" value="-stdinc "/>
+		<set name="OPT.STDLIB" value="-stdlib "/>
+		<set name="OPT.SYM" value="-sym "/>
+		<set name="OPT.SYSINCLUDE" value="-i "/>
+		<set name="OPT.USERINCLUDE" value="-i "/>
+		<set name="OPT.WARNINGS" value="-warnings "/>
+		<set name="OPT.WCHAR" value="-wchar_t "/>
+		<set name="OUTPUTPATH" value="$(SBS_BUILD_DIR)"/>
+		<set name="RELEASEPATH" value="$(EPOCROOT)/epoc32/release"/>
+		<set name="STDCPP_DEF" value="__SYMBIAN_STDCPP_SUPPORT__"/>
+		<set name="STDCPP_INCLUDE" value="$(EPOCINCLUDE)/stdapis"/>
+		<set name="STDCPP_WCHAR_DEF" value="__wchar_t_defined"/>
+		<set name="SYMLOOKUPARGS" value="--ignore_export_dir"/>
+		<set name="SYMLOOKUPUTIL" value="$(PERL) $(EPOCROOT)/epoc32/tools/sym_lkup_util.pl"/>
+		<set name="SYSTEMINCLUDE" value=""/>
+		<set name="TARGET" value="TARGET_WAS_NOT_SET_PROPERLY"/>
+		<set name="TARGETPATH" value=""/>
+		<set name="TARGETTYPE" value="TARGETTYPE_WAS_NOT_SET_PROPERLY"/>
+		<set name="USERINCLUDE" value=""/>
+		<set name="VARIANTPLATFORM" value="winscw"/>
+		
+		<!-- macros -->
+		<set name="PLATMACROS.WINDOWS" value="CW32 WINS WINSCW"/>
+		<set name="PLATMACROS.LINUX" value="$(PLATMACROS.WINDOWS)"/>
 	</var>
 
 	<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'/>
+		<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">
-		<set name='FULLVARIANTPATH' value='winscw/urel'/>
-		<set name='VARIANTTYPE' value='urel'/>
+		<set name="FULLVARIANTPATH" value="winscw/urel"/>
+		<set name="VARIANTTYPE" value="urel"/>
 
-		<append name='CDEFS' value='NDEBUG'/>
-		<append name='CFLAGS' value='-O4,s'/>
+		<append name="CDEFS" value="NDEBUG"/>
+		<append name="CFLAGS" value="-O4,s"/>
 	</var>
 
 	<group name="winscw">
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 @@
 		<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='GNUMAKE38'/>
 		<param name='GNUCP'/>
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
@@ -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"
@@ -60,7 +60,7 @@
 
 BMCONVCMDFILE:=$(OUTPUTPATH)/$(BMTARGET)_bmconvcommands
 RELEASEABLES:=$(BITMAPHEADER) $(BITMAPFILE)
-CLEANTARGETS:=$(BITMAPHEADER) $(BITMAPFILE) $(BMCONVCMDFILE)
+CLEANTARGETS:=$(BMCONVCMDFILE)
 
 # The groupbmpin10 macro allows us to construct a command file, 10 
 # bitmap objects at a time to avoid limits on argument lengths and 
@@ -107,7 +107,6 @@
 	$(GNUCP) $$< $$@ \
 	$(call endrule,bitmapcopy)
 
-CLEANTARGETS:=$(CLEANTARGETS) $(MBMCOPYFILES)
 endef
 
 
@@ -119,64 +118,13 @@
 $(eval $(call copybitmap))
 endif
 
-################################### localisation #########################################
-## copy .bmp files to localisation
-
-# $(BMPFILES) is a list of bmp files in src
-BMPFILES:=$(subst FILE=,,$(filter FILE=%,$(SOURCE)))
-BMBASENAME:=$(call lowercase,$(basename $(BMTARGET)))
-BMPCOPYFILES:=
-BMPCOPYDIR:=$(EPOCROOT)/epoc32/localisation/$(BMBASENAME)/mbm
-$(call makepath,$(BMPCOPYDIR))
-
-define copyBMP
-# $(1) is the source .bmp file
-# $(2) is the (lower cased) copy in localisation 
-
-ifneq ($(BINCOPYDIRS),)
-BITMAP:: $(2)
-
-$(2): $(1)
-	$(call startrule,bmpfilecopy,FORCESUCCESS) \
-	$(GNUCP) $(1) $(2) && $(GNUCHMOD) +rw $(2) \
-	$(call endrule,bmpfilecopy)
-
-CLEANTARGETS:=$$(CLEANTARGETS) $(2)
-endif
-
-BMPCOPYFILES:=$$(BMPCOPYFILES) $(2)
-endef
-
-$(foreach BMP,$(BMPFILES),$(eval $(call copyBMP,$(BMP),$(BMPCOPYDIR)/$(call lowercase,$(notdir $(BMP))))))
-
-## create and edit info files for bitmap files in localisation/group
-INFOFILE:=$(EPOCROOT)/epoc32/localisation/group/$(BMBASENAME).info
-DEPTH:=$(subst DEPTH=,,$(filter DEPTH=%,$(SOURCE)))
-BMP:=$(notdir $(BMPFILES))
-DEPTHBMP:=$(subst _,\,$(join $(patsubst %,/%,$(DEPTH)),$(patsubst %,_%,$(BMP))))
-
-define bmpInfo
-
-BITMAP::$(INFOFILE)
-
-$(INFOFILE)::
-	@if [ ! -d $(EPOCROOT)/epoc32/localisation/group ]; then $(GNUMKDIR) -p $(EPOCROOT)/epoc32/localisation/group; fi
-	@if [ ! -f $$@ ]; then echo "DATADIR: /$(BMBASENAME)" > $$@ ; fi
-	@echo -e "\n/z$(TARGETPATH)/$(BMTARGET) : $(DEPTHBMP)" >> $$@
-
-CLEANTARGETS:=$$(CLEANTARGETS) $(INFOFILE)
-endef
-
-$(eval $(call bmpInfo))
-
-# end of localisation #########################################################
 
 ## Clean up
-$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS) ,$(CREATABLEPATHS)))
+$(call raptor_clean,$(CLEANTARGETS))
 $(call makepath,$(CREATABLEPATHS))
 $(call makepathfor,$(BITMAPHEADER))
 
 # for the abld -what target
-BMPRELEASEABLES:=$(RELEASEABLES) $(MBMCOPYFILES) $(BMPCOPYFILES) $(INFOFILE)
-$(eval $(call whatmacro,$(BMPRELEASEABLES),WHATBITMAP))
+BMPRELEASEABLES:=$(RELEASEABLES) $(MBMCOPYFILES)
+$(call raptor_release,$(BMPRELEASEABLES),BITMAP)
 
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
@@ -24,36 +24,31 @@
 
 .PHONY:: PP_EXPORTS
 
+ifneq ($(filter win,$(HOSTPLATFORM)),)
+SBS:=$(subst \,/,$(SBS_HOME)/bin/sbs.bat)
+else
+SBS:=$(SBS_HOME)/bin/sbs
+endif
 
-SBS := $(subst \,/,$(SBS_HOME)/bin/sbs)
 
 define doexports
 PP_EXPORTS::
 	$(call startrule,makefile_generation_exports) \
-	export TALON_DESCRAMBLE=0; \
-	$(SBS) --export-only $(component_list) $(config_list) -f- -m $(SBS_BUILD_DIR)/makefiles_export.mk $(cli_options)  --mo=DESCRAMBLE:=  --mo=TALON_DESCRAMBLE:=0 | $(GNUSED) 's#]I*]>#XXX#' \
+	$(SBS) --toolcheck=off --export-only $(component_list) $(config_list) -f- -m $(MAKEFILE_PATH).exports $(CLI_OPTIONS)  \
 	$(call endrule,makefile_generation_exports)
 
-CLEANTARGETS:=$$(CLEANTARGETS) $(SBS_BUILD_DIR)/makefiles_export.mk
+CLEANTARGETS:=$$(CLEANTARGETS) $(MAKEFILE_PATH).exports 
 endef
 
 # Generate makefiles for particular bldinf
 # $(1) = source target source target......
 define generate_makefiles
 
-$$(info XXX component_list=$(COMPONENT_PATHS) makefile=$(MAKEFILE_PATH))
-
-ifeq ($(NO_BUILD),1)
 ALL:: $(MAKEFILE_PATH)
-else
-include $(MAKEFILE_PATH)
-endif
 
-$(MAKEFILE_PATH): $(COMPONENT_PATHS) | PP_EXPORTS 
+$(MAKEFILE_PATH): $(COMPONENT_PATHS) $(if $(DOEXPORT),| PP_EXPORTS )
 	$(call startrule,makefile_generation) \
-	export TALON_DESCRAMBLE=0; \
-	$(SBS) --toolcheck=off -n $(CLI_OPTIONS) $(component_list) $(config_list) -m $$@ -f- --mo=DESCRAMBLE:= --mo=TALON_DESCRAMBLE:=0  | $(GNUSED) 's#\]\][>]#XXX#' && \
-	$(MAKE) -j 8 -f $$@.resource_deps \
+	$(SBS) --noexport --toolcheck=off -n $(CLI_OPTIONS) $(component_list) $(config_list) -m $$@ -f- \
 	$(call endrule,makefile_generation)
 
 CLEANTARGETS:=$$(CLEANTARGETS) $(MAKEFILE_PATH) 
@@ -63,13 +58,19 @@
 # Create config list for commands
 config_list:=$(addprefix -c ,$(CONFIGS))
 component_list:=$(addprefix -b ,$(COMPONENT_PATHS))
-$(info COMFIG_LIST: $(config_list))
 
-$(eval $(doexports))
+$(if $(FLMDEBUG),$(info <debug>build.flm: configlist: $(config_list)</debug>))
+
+# Do exports only if asked. This doesn't work brilliantly in emake
+# since exports are often duplicated in some components - leads to conflicts 
+# and rebuilds.  Better to export before trying to do parallel parsing at all.
+$(if $(DOEXPORT),$(eval $(doexports)),$(if $(FLMDEBUG),$(info <debug>build.flm: Exports off </debug>)))
 
 # Create the Makefiles
 $(eval $(call generate_makefiles))
 
+CREATABLEPATHS:=$(CREATABLEPATHS) $(dir $(MAKEFILE_PATH))
+
 $(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS),$(CREATABLEPATHS),))
 $(call makepath,$(CREATABLEPATHS))
 
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
@@ -9,6 +9,7 @@
 		<param name='CONFIGS' default=''/>
 		<param name='CLI_OPTIONS' default=''/>
 		<param name='NO_BUILD' default='' />
+		<param name='DOEXPORT' default='1' />
 	</interface>
 
 </build>
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
@@ -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"
@@ -25,11 +25,11 @@
 POSTLINKFILETYPE:=ani
 DOPOSTLINK:=1
 AUTOEXPORTS:=_Z15CreateCAnimDllLv,1;
-DEFFILE:=
+
 
 # Determine what kind of entrypoint option to set
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/edll.lib
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Dll $(LINKER_ENTRYPOINT_DECORATION) $(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
 LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
@@ -39,6 +39,15 @@
 STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB)
 CANIGNORENONCALLABLE:=1
 
+# Fixed export TARGETTYPEs should only reference a .def file if an explicit DEFFILE statement is present in the .mmp file
+ifneq ($(DEFFILEKEYWORD),)
+POSTLINKDEFFILE:=$(DEFFILE)
+SUPPORT_FREEZE:=1
+ifeq ($(NOEXPORTLIBRARY),)
+IMPORTLIBRARYREQUIRED:=1
+endif
+endif
+
 UID2:=10003b22
 
 
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
@@ -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"
@@ -40,13 +40,17 @@
 # Reset these variables as they change for every single target type
 # LINKER_ENTRYPOINT_ADORNMENT will be blank for GCCE; for RVCT it will look like "(uc_exe_.o)"
 # LINKER_ENTRYPOINT_DECORATION will be blank for RVCT; for GCCE it will look like "-u _E32Startup"
+# LINKER_SEPARATOR is a comma for GCCE as g++ is used for linking; for RVCT is should be a space, but
+# as make strips trailing spaces, we use the CHAR_SPACE variable.
 
 LINKER_ENTRYPOINT_ADORNMENT:=
 LINKER_ENTRYPOINT_DECORATION:=
+LINKER_SEPARATOR:=
 
 # For GCCE
 ifeq ($(TOOLCHAIN),GCCE)
-LINKER_ENTRYPOINT_DECORATION:=$(if $(call isoneof,$(TARGETTYPE),exexp exe),-u _E32Startup,-u _E32Dll)
+LINKER_ENTRYPOINT_DECORATION:=$(if $(call isoneof,$(TARGETTYPE),exexp exe),-Wl$(CHAR_COMMA)-u$(CHAR_COMMA)_E32Startup,-Wl$(CHAR_COMMA)-u$(CHAR_COMMA)_E32Dll)
+LINKER_SEPARATOR:=$(CHAR_COMMA)
 endif
 
 # For RVCT
@@ -55,7 +59,7 @@
 	LINKER_ENTRYPOINT_ADORNMENT:=(uc_exe_.o)
   endif
 
-  ifeq ($(call isoneof,$(TARGETTYPE),ani textnotifier2 stddll plugin fsy pdl dll),1)
+  ifeq ($(call isoneof,$(TARGETTYPE),ani textnotifier2 stddll plugin plugin3 fsy pdl dll pdll),1)
 	LINKER_ENTRYPOINT_ADORNMENT:=(uc_dll_.o)
   endif
 
@@ -74,6 +78,7 @@
   ifeq ($(TARGETTYPE),kdll)
 	LINKER_ENTRYPOINT_ADORNMENT:=(L_ENTRY_.o)
   endif
+LINKER_SEPARATOR:=$(CHAR_SPACE)
 endif
 
 # "OPTION" metadata from the front-end can potentially be supplied simultaneously for both GCCE and RVCT,
@@ -89,3 +94,9 @@
   OPTION_COMPILER:=$(OPTION_ARMCC)
   OPTION_REPLACE_COMPILER:=$(OPTION_REPLACE_ARMCC)
 endif
+
+# "ARMFPU" overrides for 'fpu-ness' in compiler and postlinker calls in .mmp files are currently only
+# supported for RVCT-based builds, GCCE builds always make use of the interface defined defaults.
+ifeq ($(TOOLCHAIN),GCCE)
+  ARMFPU:=
+endif
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
@@ -28,7 +28,7 @@
 
 # Default Linker settings for this target type
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/edll.lib
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Dll $(LINKER_ENTRYPOINT_DECORATION) $(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
 LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
@@ -55,6 +55,6 @@
 $(call vrestore)
 
 else
-$(error $e32abiv2dll.flm called with wrong TARGETTYPE (should be 'dll' but is '$(TARGETTYPE)'))
+$(error e32abiv2dll.flm called with wrong TARGETTYPE (should be 'dll' but is '$(TARGETTYPE)'))
 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/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
@@ -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"
@@ -28,15 +28,17 @@
 LINKER_STUB_LIBRARY:=
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/$(if $(FIRSTLIB),$(FIRSTLIB),eexe.lib)
 
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Startup $(LINKER_ENTRYPOINT_DECORATION) $(call dblquote,$(STATIC_RUNTIME_DIR)/$(if $(FIRSTLIB),$(FIRSTLIB),eexe.lib)$(LINKER_ENTRYPOINT_ADORNMENT)) 
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Startup $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/$(if $(FIRSTLIB),$(FIRSTLIB),eexe.lib)$(LINKER_ENTRYPOINT_ADORNMENT)) 
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
 LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
 endif
 
-STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB)
-
-MAKEDEFFILE:=
+ifeq ($(EPOCNESTEDEXCEPTIONS),)
+  STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB)
+else
+  STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB_NESTED_EXCEPTIONS)
+endif
 
 $(call vsave,CDEFS)
 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
@@ -52,10 +52,10 @@
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/$(FIRSTLIB)
 
 ifeq ("$(TOOLCHAIN)","RVCT")
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Startup  $(call dblquote,$(STATIC_RUNTIME_DIR)/$(FIRSTLIB)($(FIRSTLIB_OBJECTFILE)))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Startup $(call dblquote,$(STATIC_RUNTIME_DIR)/$(FIRSTLIB)($(FIRSTLIB_OBJECTFILE)))
 else
 # GCCE
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Startup -u _E32Startup  $(call dblquote,$(STATIC_RUNTIME_DIR)/$(FIRSTLIB))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Startup -Wl,-u$(LINKER_SEPARATOR)_E32Startup$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/$(FIRSTLIB))
 endif
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
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
@@ -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 @@
 #
 #
 
-# Only build feature invariant binaries in non-product builds *and*
-# Only build feature variant binaries in product builds.
+# Feature/Binary Variation
 #
-# FEATUREVARIANTNAME != "" implies product build
-# FEATUREVARIANT == 1 implies a feature variant binary
+# FEATUREVARIANTNAME != "" implies a product build configuration
+# FEATUREVARIANT == 1 implies a .mmp defined feature variant binary
+#
+# By default:
+#   Build all binaries in non-product builds *and*
+#   Only build feature variant binaries in product builds.
 #
 # test FEATUREVARIANTNAME=="" or FEATUREVARIANT==1
 #
-ifneq ($(or $(call equal,$(FEATUREVARIANTNAME),),$(call equal,$(FEATUREVARIANT),1)),)
+# If FEATUREVARIANTSAFE is set:
+#   Only build feature invariant binaries in non-product builds *and*
+#   Only build feature variant binaries in product builds.
+#
+#   test (FEATUREVARIANTNAME=="" and FEATUREVARIANT=="") or
+#        (FEATUREVARIANTNAME!="" and FEATUREVARIANT==1)
+#
+
+DOBUILD:=
+ifeq ($(FEATUREVARIANTSAFE),)
+  DOBUILD:=$(if $(or $(call equal,$(FEATUREVARIANTNAME),),\
+                     $(call equal,$(FEATUREVARIANT),1)),1)
+else
+  DOBUILD:=$(if $(or $(and $(call equal,$(FEATUREVARIANTNAME),),\
+                           $(call equal,$(FEATUREVARIANT),)),\
+                     $(and $(call not,$(call equal,$(FEATUREVARIANTNAME),)),\
+                           $(call equal,$(FEATUREVARIANT),1))),1)
+endif
+
+ifeq ($(DOBUILD),1)
 
 $(if $(FLMDEBUG),$(info <flm name='e32abiv2' target='$(TARGET)' type='$(TARGETTYPE)' outputpath='$(OUTPUTPATH)' metasource='$(METASOURCE)' postlinkfiletype='$(POSTLINKFILETYPE)' />))
 
@@ -141,7 +163,6 @@
   ifeq ($($(BUILDMARKER_IMPORTLIBTARGET_DSO)),)
     IMPORTLIBTARGET_DSO:=$(TMP_IMPORTLIBTARGET_ROOT).dso
     IMPORTLIBTARGETVERSIONED_DSO:=$(VER_E32IMPORTLIBBASE).dso
-    $(eval $(BUILDMARKER_IMPORTLIBTARGET_DSO):=1)
   endif
 
   # ABIv1 .lib (for specific builds, toolchains and host OS platforms only)
@@ -156,7 +177,6 @@
     ifeq ($($(BUILDMARKER_IMPORTLIBTARGET_LIB)),)
       IMPORTLIBTARGET_LIB:=$(TMP_IMPORTLIBTARGET_ROOT).lib
       IMPORTLIBTARGETVERSIONED_LIB:=$(VER_E32IMPORTLIBBASE).lib
-      $(eval $(BUILDMARKER_IMPORTLIBTARGET_LIB):=1)
     endif
   endif
   endif
@@ -223,7 +243,7 @@
 	DSODEFFILENAMEBASE:=$(TARGET){$(VERSIONHEX)}
 endif
 GENERATED_DSO:=$(call dblquote,$(INTERMEDIATEPATH)/$(DSODEFFILENAMEBASE).dso)
-GENERATED_DEFFILE:=$(call dblquote,$(INTERMEDIATEPATH)/$(DSODEFFILENAMEBASE).def)
+GENERATED_DEFFILE:=$(INTERMEDIATEPATH)/$(DSODEFFILENAMEBASE).def
 
 ## IMPORT LIBRARY  ###########################################################
 
@@ -251,6 +271,10 @@
 # ABIv2 .dso
 ifneq ($(IMPORTLIBTARGET_DSO),) # check that we haven't tried to specify this target already
 
+  # By Now we're committed to producing a target for this DSO so it's safe to
+  # set the marker that will prevent any further targets from being made.
+  $(eval $(BUILDMARKER_IMPORTLIBTARGET_DSO):=1)
+
   ifneq ($(EXPLICITVERSION),)
     TARGETS:=$(strip $(TARGETS) $(IMPORTLIBTARGETVERSIONED_DSO))
 
@@ -279,9 +303,6 @@
 		$(call startrule,importlibtarget_unfrozen,FORCESUCCESS) \
 		$(GNUCP) $$(call dblquote,$$<) $$(call dblquote,$$@) \
 		$(call endrule,importlibtarget_unfrozen)
-
-       CLEANTARGETS:=$$(CLEANTARGETS) $(IMPORTLIBTARGET_DSO)
-
     endef
 
     define importlibtarget_unfrozen_ver
@@ -289,8 +310,6 @@
 		$(call startrule,importlibversioned_unfrozen,FORCESUCCESS) \
 		$(GNUCP) "$(GENERATED_DSO)" "$$@" \
 		$(call endrule,importlibversioned_unfrozen)
-
-      CLEANTARGETS:=$$(CLEANTARGETS) $(IMPORTLIBTARGET_DSO)
     endef
 
     ifeq ($(EXPLICITVERSION),)
@@ -307,8 +326,6 @@
 	   $(call startrule,importlibtarget,FORCESUCCESS) \
 	   $(GNUCP) "$$<" "$$@" \
 	   $(call endrule,importlibtarget)
-
-          CLEANTARGETS:=$$(CLEANTARGETS) $(IMPORTLIBTARGET_DSO)
       endef
 
       ifeq ($(EXPLICITVERSION),)
@@ -325,8 +342,6 @@
 	 	  --dso=$$(call dblquote,$$@) 				   \
 	 	  --linkas=$(call dblquote,$(LINKASVERSIONED)) \
 	      $(call endrule,importlibversioned)
-
-              CLEANTARGETS:=$$(CLEANTARGETS) $(IMPORTLIBTARGETVERSIONED_DSO)
       endef
       $(eval $(importlibtargetversioned_func))
     endif #  ifneq ($(DEFFILE),)
@@ -335,7 +350,10 @@
 
 # ABIv1 .lib
 ifneq ($(IMPORTLIBTARGETVERSIONED_LIB),) # check that we haven't tried to specify this target already
-  CLEANTARGETS:=$(CLEANTARGETS) $(IMPORTLIBTARGETVERSIONED_LIB) $(IMPORTLIBTARGET_LIB)
+
+  # By Now we're committed to producing a target for this DSO so it's safe to
+  # set the marker that will prevent any further targets from being made.
+  $(eval $(BUILDMARKER_IMPORTLIBTARGET_LIB):=1)
 
   define abiv1_generatelib
 
@@ -351,12 +369,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) \
-        if [ -f "$(EPOCROOT)/epoc32/tools/def2dll.pl" -a -f "$(if $(EXPORTUNFROZEN),$(GENERATED_DEFFILE),$(PREPPEDDEFFILE))" ]; then \
+        if [ -f "$(EPOCROOT)/epoc32/tools/def2dll.pl" -a -f "$(if $(EXPORTUNFROZEN),$(call dblquote,$(GENERATED_DEFFILE)),$(PREPPEDDEFFILE))" ]; then \
                  $(PERL) $(EPOCROOT)/epoc32/tools/def2dll.pl \
 		--path=$(IMPORTLIBPATH) \
 		--bldpath=$(INTERMEDIATEPATH) \
 		--import=$(notdir $(basename $(IMPORTLIBTARGETVERSIONED_LIB))) \
-		--deffile="$(if $(EXPORTUNFROZEN),$(GENERATED_DEFFILE),$(PREPPEDDEFFILE))" \
+		--deffile="$(if $(EXPORTUNFROZEN),$(call dblquote,$(GENERATED_DEFFILE)),$(PREPPEDDEFFILE))" \
 		--linkAs=$(call dblquote,$(LINKASVERSIONED)) \
 		--inter ; fi \
 	$(call endrule,importlibversioned_abiv1)
@@ -388,7 +406,22 @@
 # Generating the import library is enough if TARGETTYPE=implib #############
 
 ifneq ($(DOPOSTLINK),)
-include $(FLMHOME)/e32postlink.mk
+# Capabilities
+FINAL_CAPABILITIES:=$(if $(CAPABILITY),$(CAPABILITY),NONE)
+
+# Paging options for the old postlinker
+POSTLINKER_PAGEDOPTION:=--defaultpaged
+ifeq ($(PAGED),1)
+  POSTLINKER_PAGEDOPTION:=--paged
+endif
+ifeq ($(PAGED),0)
+  POSTLINKER_PAGEDOPTION:=--unpaged
+endif
+
+CLEANTARGETS:=$(CLEANTARGETS) $(E32TARGET)
+CLEANTARGETS:=$(CLEANTARGETS) $(GENERATED_DEFFILE)
+CLEANTARGETS:=$(CLEANTARGETS) $(GENERATED_DSO)
+
 endif # ifneq ($(DOPOSTLINK),)
 
 ifneq ($(TARGETTYPE),implib)
@@ -534,7 +567,7 @@
 endef
 $(eval $(artarget_func))
 
-CLEANTARGETS:=$(CLEANTARGETS) $(VIAFILE) $(ARTARGET) $(if $(DUMPBCINFO),$(ARTARGET).elfdump,)
+CLEANTARGETS:=$(CLEANTARGETS) $(VIAFILE) $(if $(DUMPBCINFO),$(ARTARGET).elfdump,)
 endif
 
 
@@ -542,8 +575,7 @@
 # Targettype is some type of DLL or EXE (or derivative)
 ifneq ($(LINK_TARGET),)
 
-escaped_located_ARMLIBS:=$(foreach L,$(ARMLIBS),$(call ruleEscape,$(wildcard $(subst $(CHAR_SPACE),?,$(RVCTLIB)/*/$(L)))))
-quoted_located_ARMLIBS:=$(foreach L,$(ARMLIBS),$(call dblquoteitem,$(wildcard $(RVCTLIB)/*/$(L))))
+located_ARMLIBS:=$(foreach L,$(ARMLIBS),$(wildcard $(RVCTLIB)/*/$(L)))
 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 @@
 REDUCED_RUNTIME_LIBS_LIST:=$(subst $(TARGET).dso,,$(RUNTIME_LIBS_LIST))
 
 ifeq ($(VARIANTTYPE),udeb)
-  e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY_DEBUG)) $(addprefix $(RUNTIME_LIBS_PATH)/,$(REDUCED_RUNTIME_LIBS_LIST)) 
+  e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY_DEBUG)) $(addprefix $(RUNTIME_LIBS_PATH)/,$(REDUCED_RUNTIME_LIBS_LIST)) $(located_ARMLIBS)
 else
-  e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY)) $(addprefix $(RUNTIME_LIBS_PATH)/,$(REDUCED_RUNTIME_LIBS_LIST)) 
+  e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY)) $(addprefix $(RUNTIME_LIBS_PATH)/,$(REDUCED_RUNTIME_LIBS_LIST)) $(located_ARMLIBS)
 endif
-quoted_e32abiv2_LIBS=$(e32abiv2_LIBS) $(quoted_located_ARMLIBS)
-escaped_e32abiv2_LIBS=$(e32abiv2_LIBS) $(escaped_located_ARMLIBS)
 
 else
 # NORMAL
@@ -574,19 +604,16 @@
 ifeq ($(HAS_DEDICATED_OP_NEWDEL_LIB),1)
   e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(RUNTIME_LIBS_PATH)/,$(NEWLIB))
 endif
-quoted_e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(RUNTIME_LIBS_PATH)/,$(RUNTIME_LIBS_LIST)) $(call addquotedprefix,$(STATIC_LIBS_PATH)/,$(STATIC_LIBS_LIST)) $(quoted_located_ARMLIBS)
-escaped_e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(RUNTIME_LIBS_PATH)/,$(RUNTIME_LIBS_LIST)) $(addprefix $(call ruleEscape,$(STATIC_LIBS_PATH)/),$(STATIC_LIBS_LIST)) $(escaped_located_ARMLIBS)
+e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(RUNTIME_LIBS_PATH)/,$(RUNTIME_LIBS_LIST)) $(addprefix $(STATIC_LIBS_PATH)/,$(STATIC_LIBS_LIST)) $(located_ARMLIBS)
 
 endif
 else
 # ARM RUNTIME LIBS
 ifeq ($(VARIANTTYPE),udeb)
-  e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY_DEBUG)) 
+  e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY_DEBUG)) $(located_ARMLIBS)
 else
-  e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY))
+  e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY)) $(located_ARMLIBS)
 endif
-quoted_e32abiv2_LIBS=$(e32abiv2_LIBS) $(quoted_located_ARMLIBS)
-escaped_e32abiv2_LIBS=$(e32abiv2_LIBS) $(escaped_located_ARMLIBS)
 endif
 
 # NOTE: the groupin10 macro must be used before a call to the "startrule" macro
@@ -596,36 +623,76 @@
 # outside the relevant tags but it is also unavoidable.
 define linktarget_func
 ## The actual link target, dependencies and build step
-$(LINK_TARGET): $(if $(MULTIFILE_ENABLED),$(MULTIFILEOBJECT) $(CIAFILES_LINKOBJECTS),$(LINKOBJECTS)) $(escaped_e32abiv2_LIBS) $(LINKER_ENTRYPOINT_LIBDEP) $(if $(SUPPORTS_STDCPP_NEWLIB),$(CHECKLIB)) $(if $(LINKERFEEDBACK_STAGE2),$(FEEDBACKFILE),)
+$(E32TARGET): $(POSTLINKDEFFILE) $(ELF2E32) $(if $(MULTIFILE_ENABLED),$(MULTIFILEOBJECT) $(CIAFILES_LINKOBJECTS),$(LINKOBJECTS)) $(e32abiv2_LIBS) $(LINKER_ENTRYPOINT_LIBDEP) $(if $(SUPPORTS_STDCPP_NEWLIB),$(CHECKLIB)) $(if $(LINKERFEEDBACK_STAGE2),$(FEEDBACKFILE),) $(if $(HAVE_ORDERONLY),|,) $(EPOCROOT)/epoc32/build/TEM_LIB
 	$(if $(MULTIFILE_ENABLED),,@echo -n "" > $(VIAFILE);
 	$(call groupin10,$(LINKOBJECTS)) ;)
-	$(call startrule,link) \
+	$(call startrule,linkandpostlink) \
 	$(if $(PERTURBSTARTTIME),$(RANSLEEP) $(PERTURBMSECS) ;,) \
 	$(if $(SUPPORTS_STDCPP_NEWLIB),$(if $(located_STATICLIBRARIES),$(CHECKLIB) $(CHECKLIB_TYPE) --elf $(call dblquote,$(located_STATICLIBRARIES)) &&,),) \
 	$(LD) $(LINKER_MISC_FLAGS) $(LINKER_DEFAULT_LIB_PATHS) $(SYMBIAN_LINK_FLAGS) $(if $(DEBUG_INFO),$(LINKER_DEBUG_OPTION),$(LINKER_NODEBUG_OPTION)) \
+	  $(if $(ARMLIBS),$(LD_WARNINGS_SUPPRESSION_ARMLIBS),) \
 	  $(SHARED_OBJECT_OPTION) $(SPLIT_OPTION) \
-	  $(RW_BASE_OPTION) 0x400000 \
+	  $(RW_BASE) \
 	  $(LINKER_ARCH_OPTION) \
-	  $(SYMVER_OPTION) $(SO_NAME_OPTION) $(call dblquote,$(LINKASVERSIONED)) \
+	  $(SYMVER_OPTION) $(SO_NAME_OPTION)=$(call dblquote,$(LINKASVERSIONED)) \
 	  $(LINKER_ENTRYPOINT_SETTING) \
-	  -o $$(call dblquote,$$@) \
+	  -o $$(call dblquote,$(LINK_TARGET)) \
 	  $(if $(LTCG),$(LTCG_OPTION),) \
-	  $(LINKER_SYMBOLS_OPTION) $(LINKER_SYMBOLS_FILE_OPTION) \
-	  $(call dblquote,$(MAPFILE)) \
+	  $(LINKER_SYMBOLS_OPTION) $(LINKER_SYMBOLS_FILE_OPTION)=$(call dblquote,$(MAPFILE)) \
   	  $(LINKEROPTION) \
 	  $(if $(MULTIFILE_ENABLED),$(call dblquote,$(MULTIFILEOBJECT) $(CIAFILES_LINKOBJECTS)),$(COMMANDFILE_OPTION)$(call dblquote,$(VIAFILE))) \
           $(if $(GENERATELINKERFEEDBACK),$(FEEDBACK_OPTION)$(call dblquote,$(FEEDBACKFILE))) \
 	  $(if $(LINKER_ADD_STATIC_RUNTIME),$(if $(STATIC_RUNTIME_LIB),$(LINKER_GROUP_START_OPTION) $(STATIC_RUNTIME_DIR)/$(STATIC_RUNTIME_LIB) $(LINKER_GROUP_END_OPTION),)) \
-	  $(quoted_e32abiv2_LIBS) $(LINKER_DEFAULT_LIBS)\
-	$(call endrule,link)
+	  $(call dblquote,$(e32abiv2_LIBS)) $(LINKER_DEFAULT_LIBS) && \
+	  $(ELF2E32) \
+	  --sid=0x$(if $(SID),$(SID),$(if $(UID3),$(UID3),0)) \
+	  --version=$(VERSION) \
+	  --capability=$(FINAL_CAPABILITIES) \
+	  --linkas=$(call dblquote,$(LINKASVERSIONED)) \
+	  --fpu=$(if $(ARMFPU),$(ARMFPU),$(POSTLINKER_FPU_DEFAULT)) \
+	  --targettype=$(POSTLINKTARGETTYPE) \
+	  --output=$$(call dblquote,$$@) \
+	  --elfinput=$(call dblquote,$(LINK_TARGET)) \
+	  $(if $(UID1),--uid1=0x$(UID1),) \
+	  $(if $(UID2),--uid2=0x$(UID2),) \
+	  $(if $(UID3),--uid3=0x$(UID3),) \
+	  $(if $(VENDORID),--vid=0x$(VENDORID),) \
+	  $(if $(EXPTARGET),--customdlltarget,) \
+	  $(if $(ARMLIBS),--excludeunwantedexports,) \
+	  $(if $(EPOCALLOWDLLDATA),--dlldata,) \
+	  $(if $(EPOCPROCESSPRIORITY),--priority=$(EPOCPROCESSPRIORITY),) \
+	  $(if $(EPOCSTACKSIZE),--stack=0x$(EPOCSTACKSIZE),) \
+	  $(if $(EPOCHEAPSIZEMIN),--heap=0x$(EPOCHEAPSIZEMIN)$(CHAR_COMMA)0x$(EPOCHEAPSIZEMAX),) \
+	  $(if $(EPOCFIXEDPROCESS),--fixedaddress,) \
+	  $(if $(EPOCDATALINKADDRESS),--datalinkaddress=$(EPOCDATALINKADDRESS),) \
+	  $(if $(NAMEDSYMLKUP),--namedlookup,) \
+	  $(if $(SMPSAFE),--smpsafe,) \
+	  $(if $(POSTLINKDEFFILE),--definput=$(POSTLINKDEFFILE),) \
+	  $(if $(EXPORTUNFROZEN),--unfrozen,) \
+	  $(if $(AUTOEXPORTS),--sysdef=$(call dblquote,$(AUTOEXPORTS)),) \
+	  $(if $(CANIGNORENONCALLABLE), \
+	    $(if $(IMPORTLIBRARYREQUIRED),,--ignorenoncallable),) \
+	  $(if $(CANHAVEEXPORTS), --defoutput=$(call dblquote,$(GENERATED_DEFFILE)) --dso=$(GENERATED_DSO)) \
+	  $(if $(filter $(VARIANTTYPE),$(DEBUGGABLE)),--debuggable,) \
+	  $(if $(POSTLINKER_SUPPORTS_WDP), \
+	    --codepaging=$(PAGEDCODE_OPTION) --datapaging=$(PAGEDDATA_OPTION), \
+	    $(POSTLINKER_PAGEDOPTION)) \
+	  $(if $(NOCOMPRESSTARGET),--uncompressed, \
+	    $(if $(INFLATECOMPRESSTARGET),--compressionmethod=inflate, \
+	      $(if $(BYTEPAIRCOMPRESSTARGET),--compressionmethod=bytepair, \
+	        --compressionmethod=$(POSTLINKER_COMPRESSION_DEFAULT)))) \
+	  --libpath="$(call concat,$(PATHSEP)$(CHAR_SEMIC),$(strip $(RUNTIME_LIBS_PATH) $(STATIC_LIBS_PATH)))" \
+	  $(if $(SAVESPACE),$(if $(EXPORTUNFROZEN),,&& { $(GNURM) -rf $(INTERMEDIATEPATH); true; })) \
+	$(call endrule,linkandpostlink)
 
-$(MAPFILE): $(LINK_TARGET)
+$(MAPFILE): $(E32TARGET)
+$(LINK_TARGET): $(E32TARGET)
 endef
+ifneq ($(DOPOSTLINK),)
 $(eval $(linktarget_func))
+endif # ifneq ($(DOPOSTLINK),)
 
-CLEANTARGETS:=$(CLEANTARGETS) $(LINK_TARGET) $(if $(GENERATELINKERFEEDBACK),$(FEEDBACKFILE)) $(if $(MULTIFILE_ENABLED),$(MULTIFILEOBJECT))
-CLEANTARGETS:=$(CLEANTARGETS) $(VIAFILE)
-CLEANTARGETS:=$(CLEANTARGETS) $(MAPFILE)
+CLEANTARGETS:=$(CLEANTARGETS) $(VIAFILE) $(if $(GENERATELINKERFEEDBACK),$(FEEDBACKFILE)) $(if $(MULTIFILE_ENABLED),$(MULTIFILEOBJECT))
 WHATRELEASE:=$(WHATRELEASE) $(MAPFILE)
 
 endif # if TARGETTYPE lib
@@ -646,6 +713,7 @@
 # Users can turn TC on by setting it to 1 in user config.
 ifneq ($(USE_TRACE_COMPILER),)
   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 @@
   $(EXPORT_VTBL_OPTION) $(NO_UNALIGNED_ACCESS) $(VFE_OPTION) $(AAPCS_OPTION) \
   $(CPPONLYOPTION) $(INSTRUCTION_SET) \
   $(if $(ALWAYS_BUILD_AS_ARM),$(ARM_INSTRUCTION_SET),$(THUMB_INSTRUCTION_SET) $(call makemacrodef,-D,$(COMPILER_THUMB_DEFINES))) \
-  $(COMPILER_FPU_FLAGS)
+  $(COMPILER_FPU_OPTION)$(if $(ARMFPU),$(ARMFPU),$(COMPILER_FPU_DEFAULT))
 
 ## COMPILE CPP Files #################################################################
 
@@ -674,7 +742,7 @@
   $(EXPORT_VTBL_OPTION) $(NO_UNALIGNED_ACCESS) $(VFE_OPTION) $(AAPCS_OPTION) \
   $(COMPILE_ONLY_OPTION) $(INSTRUCTION_SET) \
   $(if $(ALWAYS_BUILD_AS_ARM),$(ARM_INSTRUCTION_SET),$(THUMB_INSTRUCTION_SET) $(call makemacrodef,-D,$(COMPILER_THUMB_DEFINES))) \
-  $(COMPILER_FPU_FLAGS)
+  $(COMPILER_FPU_OPTION)$(if $(ARMFPU),$(ARMFPU),$(COMPILER_FPU_DEFAULT))
 
 ifeq ($(STDCPP),1)
 SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$(call dblquote,$(STDCPP_INCLUDE)))
@@ -705,7 +773,7 @@
 $(eval DEPENDFILE:=$(wildcard $(DEPENDFILENAME)))
 
 # $4 is for language specific options (e.g. C++ vs C)
-$(1): $(2) $(PROJECT_META) $(if $(MULTIFILE_ENABLED),,$(if $(DEPENDFILE),,RESOURCE BITMAP EXPORT)) $(if $(USE_TRACE_COMPILER),$(TRACE_MARKER),) $(if $(LINKERFEEDBACK_STAGE2),$(FEEDBACKFILE),)
+$(1): $(2) $(PROJECT_META) $(if $(MULTIFILE_ENABLED),,$(if $(DEPENDFILE),,RESOURCE BITMAP EXPORT)) $(if $(LINKERFEEDBACK_STAGE2),$(FEEDBACKFILE),) | $(if $(USE_TRACE_COMPILER),$(TRACE_MARKER),)  
 	$(call startrule,compile,,$(2))		\
 		$(if $(PERTURBSTARTTIME), $(RANSLEEP) $(PERTURBMSECS) ;,) \
 		$(if $(MULTIFILE_ENABLED), echo $(2) $(3) > $(MULTIFILE_VIAFILE) ;,) \
@@ -716,24 +784,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)))\
-			$(if $(SET_ARMINC),$(if $(RVCTINC),$(COMPILER_SYSTEM_INCLUDE_OPTION)$(call dblquoteitem,$(RVCTINC)),),)       \
+			$(if $(SET_ARMINC),$(if $(RVCTINC),$(COMPILER_SYSTEM_INCLUDE_OPTION)$(call dblquote,$(RVCTINC)),),)       \
 			$(COMPILER_SYSTEM_INCLUDE_OPTION)$$(call dblquote,$$(<D))                                                      \
 			$(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,) \
-			$(DEPEND_OPTION) $(call dblquote,$(1).d) \
+			$(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, $$<))  \
 	$(call endrule,compile)
 
-CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
-ifneq "$(DEPENDFILE)" ""
-ifeq ($(NO_DEPEND_INCLUDE),)
-  ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" ""
+ifeq ($(NO_DEPEND_GENERATE),)
+  CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
+endif
+
+ifneq ($(DEPENDFILE),)
+  ifeq ($(NO_DEPEND_INCLUDE),)
+    ifeq ($(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS))),)
     -include $(DEPENDFILE)
   endif
-endif
+  endif
 endif
 
 # individual source file compilation
@@ -809,24 +880,27 @@
 			$(OPTION_COMPILER) 						\
 			$(call makemacrodef,-D,$(COMPILER_INTERWORK_DEFINES) $(CDEFS))				\
 			$(if $(PREINCLUDE),$(PREINCLUDE_OPTION) ,)$(call concat, $(PREINCLUDE_OPTION) ,$(call dblquote,$(PREINCLUDE)))\
-			$(if $(SET_ARMINC),$(if $(RVCTINC),$(COMPILER_SYSTEM_INCLUDE_OPTION)$(call dblquoteitem,$(RVCTINC)),),)       \
+			$(if $(SET_ARMINC),$(if $(RVCTINC),$(COMPILER_SYSTEM_INCLUDE_OPTION)$(call dblquote,$(RVCTINC)),),)       \
 			$(COMPILER_SYSTEM_INCLUDE_OPTION)$$(call dblquote,$$(<D))                                                   \
 			$(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,) \
-			$(DEPEND_OPTION) $(call dblquote,$(DEPENDFILENAME)) \
+			$(if $(NO_DEPEND_GENERATE),,$(DEPEND_OPTION) $(call dblquote,$(DEPENDFILENAME))) \
 			$$(call dblquote, $$<) $(OUTPUT_OPTION) $$(@) \
 	$(call endrule,e32listing)
 
 CLEANTARGETS:=$$(CLEANTARGETS) $(LISTINGTARGET)
 
-CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
-ifneq "$(DEPENDFILE)" ""
-ifeq ($(NO_DEPEND_INCLUDE),)
-  ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" ""
+ifeq ($(NO_DEPEND_GENERATE),))
+  CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
+endif
+
+ifneq ($(DEPENDFILE),)
+  ifeq ($(NO_DEPEND_INCLUDE),)
+    ifeq ($(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS))),)
     -include $(DEPENDFILE)
   endif
-endif
+  endif
 endif
 
 endef
@@ -852,17 +926,32 @@
 
 FREEZE:: $(1)
 	$(call startrule,freeze,,$(RESOLVED_DEFFILE)) \
-	$(EFREEZE) $(EFREEZE_REMOVE_OPTION) "$(RESOLVED_DEFFILE)" $(FIVESPACES) $(GENERATED_DEFFILE) \
+	$(EFREEZE) $(EFREEZE_REMOVE_OPTION) "$(RESOLVED_DEFFILE)" $(FIVESPACES) $(call dblquote,$(GENERATED_DEFFILE)) \
 	$(call endrule,freeze)
 endef
 
-# DEFFILE should only be generated for target types that have a def file
-ifeq ($(MAKEDEFFILE),1)
-# Eval freeze only once - no point making the DEFFILE for urel *and* udeb.
+# Only freeze once - udeb and urel cannot differ
 ifeq ($($(FREEZEGUARD)),)
-$(eval $(call e32freeze,$(E32TARGET)))
-$(FREEZEGUARD):=1
-endif
+  # For most freezing activity we need the temporary .def file generated in the final post-link
+  # that lists the current exports - FREEZE can therefore be dependent on the final post-linked binary,
+  # with the side-effect that a build is triggered if someone tries to freeze without having built.
+  #
+  # However, there's one case where we don't want to be dependent on the post-linked binary in this way,
+  # and that's when (a) there are missing exports, (b) the user's aware of them and (c) they're deliberately freezing to
+  # remove them using EFREEZE's remove option.  Being dependent on the post-linked binary in this case, where ELF2E32
+  # actually fails to generate a final binary, would mean that the freeze would never happen and post-linking would
+  # just be continually re-attempted (to fail each time).
+  #
+  # So, as a special case, if the user is explicitly attempting to freeze and perform removals, we make FREEZE dependent
+  # on the temporary .def file instead.  This has no rule to actually make it, but gives a hint as to what is wrong if
+  # the users performs a freeze with remove without having explicitly built previously.
+  #
+  ifneq ($(EFREEZE_REMOVE_OPTION),)
+    $(eval $(call e32freeze,$(GENERATED_DEFFILE)))
+  else
+    $(eval $(call e32freeze,$(E32TARGET)))
+  endif
+  $(FREEZEGUARD):=1
 endif
 
 endif
@@ -912,24 +1001,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))) \
-       $(if $(ARMINC),$(if $(RVCTINC), $(COMPILER_SYSTEM_INCLUDE_OPTION)$$(call dblquoteitem,$(RVCTINC)),),) )
+       $(if $(ARMINC),$(if $(RVCTINC), $(COMPILER_SYSTEM_INCLUDE_OPTION)$$(call dblquote,$(RVCTINC)),),) )
 
 
 $(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) -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) \
+	$(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)
 
-CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
-ifneq "$(DEPENDFILE)" ""
-ifeq ($(NO_DEPEND_INCLUDE),)
-  ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" ""
+ifeq ($(NO_DEPEND_GENERATE),)
+  CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
+endif
+
+ifneq ($(DEPENDFILE),)
+  ifeq ($(NO_DEPEND_INCLUDE),)
+    ifeq ($(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS))),)
     -include $(DEPENDFILE)
   endif
-endif
+  endif
 endif
 
 endef
@@ -960,21 +1051,26 @@
 	$(call startrule,asmcompile,,$(2)) \
 		$(if $(PERTURBSTARTTIME),$(RANSLEEP) $(PERTURBMSECS) ;,) \
 		$(CC) $(e32abiv2_asm_OPTIONS) \
-		$(DEPEND_OPTION) $(call dblquote,$(DEPENDFILENAME)) \
+		$(if $(NO_DEPEND_GENERATE),,$(DEPEND_OPTION) $(call dblquote,$(DEPENDFILENAME))) \
 	 	$$(call dblquote, $$<) $(OUTPUT_OPTION) $$@ \
 	$(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)) \
 	$(call endrule,asmdependencies)
+endif
 
-CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
-ifneq "$(DEPENDFILE)" ""
-ifeq ($(NO_DEPEND_INCLUDE),)
-  ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" ""
+ifeq ($(NO_DEPEND_GENERATE),)
+  CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
+endif
+
+ifneq ($(DEPENDFILE),)
+  ifeq ($(NO_DEPEND_INCLUDE),)
+    ifeq ($(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS))),)
     -include $(DEPENDFILE)
   endif
-endif
+  endif
 endif
 
 CREATABLEPATHS:=$$(CREATABLEPATHS) $(INTERMEDIATEPATH)
@@ -1116,7 +1212,6 @@
     PREVIOUSVARIANTTYPE:=$(VARIANTTYPE)
 
     WHATRELEASE:=$(WHATRELEASE) $(ROMFILENAME)
-    CLEANTARGETS:=$(CLEANTARGETS) $(ROMFILENAME)
 endif
 
 # Deal with test code batch files generation.
@@ -1127,7 +1222,6 @@
     BATCHFILE_CREATED_$(EPOCROOT)/epoc32/data/z/test/$(MODULE)/$(VARIANTPLATFORM).$(TESTPATH):=1
     TARGET_CREATED_$(EPOCROOT)/epoc32/data/z/test/$(MODULE)/$(VARIANTPLATFORM).$(TESTPATH)_$(TARGET):=1
     WHATRELEASE:=$(WHATRELEASE) $(EPOCROOT)/epoc32/data/z/test/$(MODULE)/$(VARIANTPLATFORM).$(TESTPATH)
-    CLEANTARGETS:=$(CLEANTARGETS) $(EPOCROOT)/epoc32/data/z/test/$(MODULE)/$(VARIANTPLATFORM).$(TESTPATH)
 endif
 
 ###################### End of Build ROMFILE target ######################
@@ -1167,12 +1261,12 @@
 $(call makepath,$(CREATABLEPATHS))
 
 ## Clean up
-$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS) ,$(CREATABLEPATHS),))
+$(call raptor_clean,$(CLEANTARGETS))
 
-# For the abld -what target
-$(eval $(call whatmacro,$(filter-out %.sym,$(WHATRELEASE)),WHATARMV5))
+# For the --what option and the log file
+$(call raptor_release,$(filter-out %.sym,$(WHATRELEASE)))
 
-endif # FEATUREVARIANTNAME=="" or FEATUREVARIANT==1
+endif # DOBUILD
 
 ## 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/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
@@ -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"
@@ -28,7 +28,7 @@
 # Determine what kind of entrypoint option to set
 AUTOEXPORTS:=CreateFileSystem,1;
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/edll.lib
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Dll $(LINKER_ENTRYPOINT_DECORATION) $(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
 LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
@@ -36,6 +36,15 @@
 
 LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib
 
+# Fixed export TARGETTYPEs should only reference a .def file if an explicit DEFFILE statement is present in the .mmp file
+ifneq ($(DEFFILEKEYWORD),)
+POSTLINKDEFFILE:=$(DEFFILE)
+SUPPORT_FREEZE:=1
+ifeq ($(NOEXPORTLIBRARY),)
+IMPORTLIBRARYREQUIRED:=1
+endif
+endif
+
 UID2:=100039df
 STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB)
 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
@@ -27,7 +27,7 @@
 
 # Determine what kind of entrypoint option to set
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/ekll.lib
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Dll $(LINKER_ENTRYPOINT_DECORATION) $(call dblquote,$(STATIC_RUNTIME_DIR)/ekll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/ekll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
 LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
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
@@ -34,7 +34,7 @@
 
 # Default Linker settings for this target type
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/eext.lib
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Dll $(LINKER_ENTRYPOINT_DECORATION) $(call dblquote,$(STATIC_RUNTIME_DIR)/eext.lib$(LINKER_ENTRYPOINT_ADORNMENT))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/eext.lib$(LINKER_ENTRYPOINT_ADORNMENT))
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
 LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
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
@@ -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"
@@ -29,7 +29,7 @@
 
 # Determine what kind of entrypoint option to set
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/edev.lib
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Dll $(LINKER_ENTRYPOINT_DECORATION) $(call dblquote,$(STATIC_RUNTIME_DIR)/edev.lib$(LINKER_ENTRYPOINT_ADORNMENT))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edev.lib$(LINKER_ENTRYPOINT_ADORNMENT))
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
 LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
@@ -46,6 +46,15 @@
 # No dedicated library for operator new/delete functions.
 HAS_DEDICATED_OP_NEWDEL_LIB:=
 
+# Fixed export TARGETTYPEs should only reference a .def file if an explicit DEFFILE statement is present in the .mmp file
+ifneq ($(DEFFILEKEYWORD),)
+POSTLINKDEFFILE:=$(DEFFILE)
+SUPPORT_FREEZE:=1
+ifeq ($(NOEXPORTLIBRARY),)
+IMPORTLIBRARYREQUIRED:=1
+endif
+endif
+
 BASELIBS:=edev
 UID2:=100000af
 
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
@@ -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"
@@ -28,7 +28,7 @@
 
 # Determine what kind of entrypoint option to set
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/edev.lib
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Dll $(LINKER_ENTRYPOINT_DECORATION) $(call dblquote,$(STATIC_RUNTIME_DIR)/edev.lib$(LINKER_ENTRYPOINT_ADORNMENT))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edev.lib$(LINKER_ENTRYPOINT_ADORNMENT))
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
 LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
@@ -45,6 +45,14 @@
 # No dedicated library for operator new/delete functions.
 HAS_DEDICATED_OP_NEWDEL_LIB:=
 
+# Fixed export TARGETTYPEs should only reference a .def file if an explicit DEFFILE statement is present in the .mmp file
+ifneq ($(DEFFILEKEYWORD),)
+POSTLINKDEFFILE:=$(DEFFILE)
+SUPPORT_FREEZE:=1
+ifeq ($(NOEXPORTLIBRARY),)
+IMPORTLIBRARYREQUIRED:=1
+endif
+endif
 
 BASELIBS:=edev
 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
@@ -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"
@@ -28,7 +28,7 @@
 
 # Determine what kind of entrypoint option to set
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/edll.lib
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Dll $(LINKER_ENTRYPOINT_DECORATION) $(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
 LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
@@ -38,6 +38,15 @@
 STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB)
 CANIGNORENONCALLABLE:=1
 
+# Fixed export TARGETTYPEs should only reference a .def file if an explicit DEFFILE statement is present in the .mmp file
+ifneq ($(DEFFILEKEYWORD),)
+POSTLINKDEFFILE:=$(DEFFILE)
+SUPPORT_FREEZE:=1
+ifeq ($(NOEXPORTLIBRARY),)
+IMPORTLIBRARYREQUIRED:=1
+endif
+endif
+
 BASELIBS:=
 UID2:=10003b1c
 RESOURCEPATH:=Resource\Printers
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
@@ -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"
@@ -16,22 +16,12 @@
 # 
 #
 
-ifeq ($(TARGETTYPE),plugin)
+ifneq ($(filter plugin plugin3,$(TARGETTYPE)),)
 include $(FLMHOME)/e32abiv2defaults.mk
 
-# This is basically a DLL with some tweaks
-# If DEFFILE keyword is specified in the MMP, set the POSTLINKDEFFILE
-# and guarantee the generation of import library; if not specified import library
-# won't be generated for plugin (default)
-ifneq ($(DEFFILEKEYWORD),)
-POSTLINKDEFFILE:=$(DEFFILE)
-SUPPORT_FREEZE:=1
-IMPORTLIBRARYREQUIRED:=1
-endif
-
 # Default Linker settings for this target type
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/edll.lib
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Dll $(LINKER_ENTRYPOINT_DECORATION) $(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
 LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
@@ -48,9 +38,22 @@
 AUTOEXPORTS:=_Z24ImplementationGroupProxyRi,1;
 CANIGNORENONCALLABLE:=1
 
+# Fixed export TARGETTYPEs should only reference a .def file if an explicit DEFFILE statement is present in the .mmp file
+ifneq ($(DEFFILEKEYWORD),)
+POSTLINKDEFFILE:=$(DEFFILE)
+SUPPORT_FREEZE:=1
+ifeq ($(NOEXPORTLIBRARY),)
+IMPORTLIBRARYREQUIRED:=1
+endif
+endif
+
 # We could check the UID rather than forcing it
 # but there seems to be no point in that.
 UID2:=10009D8D
+ifeq ($(TARGETTYPE),plugin3)
+UID2:=10009D93
+POSTLINKTARGETTYPE:=PLUGIN3
+endif
 
 
 RESOURCEPATH:=Resource/Plugins
@@ -65,5 +68,5 @@
 $(call vrestore)
 
 else
-$(error $e32abiv2plugin.flm called with wrong TARGETTYPE (should be 'plugin' but is '$(TARGETTYPE)'))
+$(error $e32abiv2plugin.flm called with wrong TARGETTYPE (should be 'plugin' or 'plugin3' but is '$(TARGETTYPE)'))
 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
@@ -29,7 +29,7 @@
 
 # Default Linker settings for this target type
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/edll.lib
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Dll $(LINKER_ENTRYPOINT_DECORATION) $(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
 DEFAULT_NEWLIB:=$(DEFAULT_STDCPP_NEWLIB)
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
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
@@ -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"
@@ -28,19 +28,22 @@
 # Determine what kind of entrypoint option to set
 LINKER_STUB_LIBRARY:=
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/eexe.lib
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Startup $(LINKER_ENTRYPOINT_DECORATION) $(call dblquote,$(STATIC_RUNTIME_DIR)/eexe.lib$(LINKER_ENTRYPOINT_ADORNMENT))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Startup $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/eexe.lib$(LINKER_ENTRYPOINT_ADORNMENT))
 DEFAULT_NEWLIB:=$(DEFAULT_STDCPP_NEWLIB)
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
 LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
 endif
 
-STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB)
+ifeq ($(EPOCNESTEDEXCEPTIONS),)
+  STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB)
+else
+  STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB_NESTED_EXCEPTIONS)
+endif
+
 NAMEDSYMLKUP:=1
 LIBRARY:=$(LIBRARY) euser.dso
 
-MAKEDEFFILE:=
-
 $(call vsave,CDEFS SYSTEMINCLUDE STATICLIBRARY)
 
 # 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
@@ -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"
@@ -28,7 +28,7 @@
 AUTOEXPORTS:=_Z13NotifierArrayv,1;
 # Determine what kind of entrypoint option to set
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/edll.lib
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Dll $(LINKER_ENTRYPOINT_DECORATION) $(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
 LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
@@ -38,6 +38,15 @@
 STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB)
 CANIGNORENONCALLABLE:=1
 
+# Fixed export TARGETTYPEs should only reference a .def file if an explicit DEFFILE statement is present in the .mmp file
+ifneq ($(DEFFILEKEYWORD),)
+POSTLINKDEFFILE:=$(DEFFILE)
+SUPPORT_FREEZE:=1
+ifeq ($(NOEXPORTLIBRARY),)
+IMPORTLIBRARYREQUIRED:=1
+endif
+endif
+
 RESOURCEPATH:=System/Notifiers
 UID2:=101fe38b
 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
@@ -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).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -19,17 +19,9 @@
 ifeq ($(TARGETTYPE),var2)
 include $(FLMHOME)/e32abiv2defaults.mk
 
-# What we need to build a DLL
-# May need a dso e.g. ecust.dll
-ifeq ($(NOEXPORTLIBRARY),)
-IMPORTLIBRARYREQUIRED:=1
-endif
-POSTLINKDEFFILE:=$(DEFFILE)
-SUPPORT_FREEZE:=1
-
 # Determine what kind of entrypoint option to set
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/evar.lib
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Dll $(LINKER_ENTRYPOINT_DECORATION) $(call dblquote,$(STATIC_RUNTIME_DIR)/evar.lib$(LINKER_ENTRYPOINT_ADORNMENT))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/evar.lib$(LINKER_ENTRYPOINT_ADORNMENT))
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
 LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
@@ -55,7 +47,14 @@
 # No exception support for kernel code?
 EXCEPTIONS:=$(NO_EXCEPTIONS)
 
-
+# Fixed export TARGETTYPEs should only reference a .def file if an explicit DEFFILE statement is present in the .mmp file
+ifneq ($(DEFFILEKEYWORD),)
+POSTLINKDEFFILE:=$(DEFFILE)
+SUPPORT_FREEZE:=1
+ifeq ($(NOEXPORTLIBRARY),)
+IMPORTLIBRARYREQUIRED:=1
+endif
+endif
 
 # We are appending to CDEFS but we don't want this to affect
 # 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
@@ -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"
@@ -19,17 +19,9 @@
 ifeq ($(TARGETTYPE),var)
 include $(FLMHOME)/e32abiv2defaults.mk
 
-# What we need to build a DLL
-# May need a dso e.g. ecust.dll
-ifeq ($(NOEXPORTLIBRARY),)
-IMPORTLIBRARYREQUIRED:=1
-endif
-POSTLINKDEFFILE:=$(DEFFILE)
-SUPPORT_FREEZE:=1
-
 # Determine what kind of entrypoint option to set
 LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/evar.lib
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Dll $(LINKER_ENTRYPOINT_DECORATION) $(call dblquote,$(STATIC_RUNTIME_DIR)/evar.lib$(LINKER_ENTRYPOINT_ADORNMENT))
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/evar.lib$(LINKER_ENTRYPOINT_ADORNMENT))
 
 ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
 LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
@@ -55,7 +47,14 @@
 # No exception support for kernel code?
 EXCEPTIONS:=$(NO_EXCEPTIONS)
 
-
+# Fixed export TARGETTYPEs should only reference a .def file if an explicit DEFFILE statement is present in the .mmp file
+ifneq ($(DEFFILEKEYWORD),)
+POSTLINKDEFFILE:=$(DEFFILE)
+SUPPORT_FREEZE:=1
+ifeq ($(NOEXPORTLIBRARY),)
+IMPORTLIBRARYREQUIRED:=1
+endif
+endif
 
 # We are appending to CDEFS but we don't want this to affect
 # 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
@@ -89,7 +89,6 @@
 		<param name='OPT.DEFINE'/>
 		<param name='OPT.DEFFILE'/>
 		<param name='OPT.DEPEND'/>
-		<param name='DEPEND_SKIP' default=''/>
 		<param name='OPT.EXPORT'/>
 		<param name='OPT.IMPORTLIB'/>
 		<param name='OPT.LISTING'/>
@@ -151,6 +150,23 @@
 		<param name='MAKEDEF'/>
 	</interface>
 
+	<interface name="Emulator.pdll" extends="Emulator.win32" flm="win32pdll.flm">
+		<param name='CHECKLIB' default=''/>
+		<param name='LD'/>
+		<param name='LFLAGS_INFGEN'/>
+		<param name='OPT.CHECKLIB.STDCPP'/>
+		<param name='OPT.CHECKLIB.SYMCPP'/>
+		<param name='OPT.CHECKLIB.WIN32'/>
+		<param name='OPT.HEAPCOMMIT'/>
+		<param name='OPT.HEAPRESERVE'/>
+		<param name='OPT.IMAGEBASE'/>
+		<param name='OPT.IMPLIB'/>
+		<param name='OPT.LIBFILE'/>
+		<param name='OPT.LIBPATH'/>
+		<param name='OPT.NOIMPLIB'/>
+		<param name='MAKEDEF'/>
+	</interface>
+
 	<interface name="Emulator.stddll" extends="Emulator.dll" flm="win32stddll.flm">
 		<param name='LFLAGS_SYMGEN'/>
 		<param name='SYMLOOKUPUTIL'/>
@@ -215,6 +231,9 @@
 	<interface name="Emulator.plugin" extends="Emulator.dll" flm="win32plugin.flm">
 	</interface>
 
+	<interface name="Emulator.plugin3" extends="Emulator.dll" flm="win32plugin.flm">
+	</interface>
+
 	<interface name="Emulator.textnotifier2" extends="Emulator.dll" flm="win32textnotifier2.flm">
 	</interface>
 
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
@@ -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).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -71,7 +71,7 @@
 # $(2) list of further variable arguments to group in 150 element calls
 define groupcallin50
 	$(if $2,$1 $(foreach L,$(wordlist 1,50,$2),$(L)),)
-	$(if $2,$(call groupcallin50,$1,$(wordlist 51,$(words $2),$2)),true)
+	$(if $2,$(call groupcallin50,$1,$(wordlist 51,$(words $2),$2)),@true)
 endef
 
 # echos content to a file in groups performing optional search/replace based on passed args
@@ -92,7 +92,7 @@
 TEMPGXPARCHIVE:=$(VARIANTBLDPATH)/$(TARGET)$(BASE_TYPE).gxp
 GXPARCHIVE:=$(VARIANTRELEASEPATH)/$(TARGET)$(BASE_TYPE).gxp
 
-CLEANTARGETS:=$(CLEANTARGETS) $(MMPXMLFILE) $(SRCXMLFILES) $(DEPFILES) $(TEMPGXPARCHIVE) $(GXPARCHIVE)
+CLEANTARGETS:=$(CLEANTARGETS) $(MMPXMLFILE) $(SRCXMLFILES) $(DEPFILES) $(TEMPGXPARCHIVE)
 RELEASABLES:=$(RELEASABLES) $(GXPARCHIVE)
 
 # Deduce whether we should be performing a build with standard CPP characteristics
@@ -200,7 +200,7 @@
 define gccxmlprocesssource
 
   $(eval DEPENDFILENAME:=$(call mapsource2output,$(1),.xml.d))
-  $(eval DEPENDFILE:=$(DEPENDFILENAME))
+  $(eval DEPENDFILE:=$(wildcard $(DEPENDFILENAME)))
 
   $(call mapsource2output,$(1),.xml): $(1) $(if $(DEPENDFILE),,RESOURCE BITMAP EXPORT)
 	$(call startrule,gccxmlprocesssource) \
@@ -214,9 +214,9 @@
 	$(call endrule,gccxmlprocesssource)
 
     CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
-    ifneq "$(DEPENDFILE)" ""
+    ifneq ($(DEPENDFILE),)
     ifeq ($(NO_DEPEND_INCLUDE),)
-      ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" ""
+        ifeq ($(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS))),)
         -include $(DEPENDFILE)
       endif
     endif
@@ -235,7 +235,7 @@
 # note: the main call here needs to reside outside of start/endrule in order to avoid command line length issues.
 define gccxmlpackage
   $(TEMPGXPARCHIVE): $(MMPXMLFILE) $(SRCXMLFILES) $(DEFFILE)
-	  $$(call groupcallin50,$(ZIP) -j $$@,$$^ $(RFIFILES)) ;
+	  $$(call groupcallin50,@$(ZIP) -j $$@ > /dev/null 2>&1,$$^ $(RFIFILES)) ;
 	  $(call startrule,gccxmlpackage) \
 	  $(GNURM) -f $(GXPARCHIVE) && \
 	  $(GNUCP) $$@ $(GXPARCHIVE) \
@@ -252,6 +252,6 @@
 TARGET:: $(RELEASABLES)
 
 # clean up
-$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS),$(CREATABLEPATHS),))
+$(call raptor_clean,$(CLEANTARGETS))
 $(call makepath, $(CREATABLEPATHS))
 
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
@@ -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).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -28,8 +28,7 @@
 $(call makepath,$(RELEASEPATH))
 $(call makepath,$(BUILDPATH))
 
-CLEANTARGETS:=$(CLEANTARGETS) $(RELEASETARGET)
-RELEASEABLES:=$(RELEASEABLES) $(RELEASETARGET)
+RELEASABLES:=$(RELEASABLES) $(RELEASETARGET)
 
 GENDEBUGINFO:=$(if $(findstring deb,$(VARIANTTYPE)),1,)
 
@@ -59,10 +58,6 @@
 # macros
 DEFINES:=$(call makemacrodef,$(OPT.DEFINE),$(CDEFS) $(BASE_MACRO) $(CFLAGS.ADD))
 
-# other
-PDBFILE:=$(if $(GENDEBUGINFO),$(RELEASEPATH)/$(TARGET).pdb,)
-CLEANTARGETS:=$(CLEANTARGETS) $(PDBFILE)
-
 #compile
 define msvctoolscompile
   $(BUILDPATH)/$(basename $(notdir $(1))).obj: $(1) $(PROJECT_META) $(if $(HAVE_ORDERONLY),|,)  EXPORT
@@ -71,7 +66,6 @@
 	$(if $(findstring staticlib,$(BASE_TYPE)),,$(CFLAGS.LIB)) \
 	$(CFLAGS) $$(subst /,-,$(OPTION_MSVC)) \
 	$(if $(findstring /W,$(OPTION_MSVC)),,$(CFLAGS.DEFAULT.WARNLEVEL)) \
-	$(if $(PDBFILE),$$(call msvcformatarg,$(OPT.PDBFILE),$(PDBFILE)),) \
 	$(DEFINES) $(INCLUDES) \
 	$$(call msvcformatarg,$(OPT.BROWSEFILE),$(BUILDPATH)/$(basename $(notdir $(1))).sbr) \
 	$$(call msvcformatarg,$(OPT.OBJECTFILE),$$@) $(1) \
@@ -157,8 +151,7 @@
 
 ifneq ($(INSTALLPATH),)
   INSTALLTARGET:=$(INSTALLPATH)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
-  CLEANTARGETS:=$(CLEANTARGETS) $(INSTALLTARGET)
-  RELEASEABLES:=$(RELEASEABLES) $(INSTALLTARGET)
+  RELEASABLES:=$(RELEASABLES) $(INSTALLTARGET)
 
   define msvctoolsinstall
     $(INSTALLTARGET): $(RELEASETARGET)
@@ -180,8 +173,8 @@
 ifneq ($(GENDEBUGINFO),)
   BSCFILE:=$(RELEASEPATH)/$(TARGET).bsc
   BSCRESPONSEFILE:=$(BUILDPATH)/$(TARGET).brf
-  CLEANTARGETS:=$(CLEANTARGETS) $(BSCFILE) $(BSCRESPONSEFILE)
-  RELEASEABLES:=$(RELEASEABLES) $(BSCFILE)
+  CLEANTARGETS:=$(CLEANTARGETS) $(BSCRESPONSEFILE)
+  RELEASABLES:=$(RELEASABLES) $(BSCFILE)
 
   define msvctoolsgenbrowse  
     $(BSCFILE): $(OBJFILES)
@@ -199,14 +192,14 @@
 
 # Global targets
 .PHONY:: $(ALLTARGET)
-$(ALLTARGET):: $(RELEASEABLES)
-TARGET:: $(RELEASEABLES)
+$(ALLTARGET):: $(RELEASABLES)
+TARGET:: $(RELEASABLES)
 
 ifeq ($(BASE_TYPE),staticlib)
   LIBRARY:: $(RELEASETARGET) $(INSTALLTARGET)
 endif
 
 # clean up
-$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS),,))
-# for the abld -what target
-$(eval $(call whatmacro,$(INSTALLTARGET),WHATTOOLS))
+$(call raptor_clean,$(CLEANTARGETS))
+# for the --what option and the log file
+$(call raptor_release,$(INSTALLTARGET))
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
@@ -42,7 +42,6 @@
 		<param name='OPT.LISTING'/>
 		<param name='OPT.OBJECTFILE'/>
 		<param name='OPT.OUTFILE'/>
-		<param name='OPT.PDBFILE'/>
 		<param name='OPT.PREINCLUDE'/>
 		<param name='OPT.SUBSYSTEM'/>
 		<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
@@ -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" >> $$@
 
-CLEANTARGETS:=$$(CLEANTARGETS) $(DESTRPP) $(INFOFILE)
-
 endif
 endef
 
@@ -114,7 +112,7 @@
 $(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
-        CLEANTARGETS:=$$(CLEANTARGETS) $2
 
         RESOURCE:: $2
         ## perform additional copies of binaries
@@ -201,7 +198,6 @@
 
         ifeq ($(TARGET_$(call sanitise,$1)),)
                 TARGET_$(call sanitise,$1):=1
-            CLEANTARGETS:=$$(CLEANTARGETS) $(1)
 
             $(if $(FLMDEBUG),$(info generateresource: $(1) from $(2) LANG:$(3)),)
 
@@ -236,7 +232,6 @@
 
         ifeq ($(TARGET_$(call sanitise,$1)),)
                 TARGET_$(call sanitise,$1):=1
-                CLEANTARGETS:= $$(CLEANTARGETS) $(1)
                 $(if $(FLMDEBUG),$(info resourceheader: $(1) from $(2) LANG:$(3)))
 
                 RESOURCE:: $(1)
@@ -282,7 +277,6 @@
 ifneq ($(RFIFILE),)
   RESOURCE:: $(RFIFILE)
   RELEASABLES:=$(RELEASABLES) $(RFIFILE)
-  CLEANTARGETS:=$(CLEANTARGETS) $(RFIFILE)
   CREATABLEPATHS:=$(CREATABLEPATHS) $(dir $(RFIFILE))
 
   RPPFILES:=$(foreach L,$(LANGUAGES:SC=sc),$(INTERBASE)_$(L).rpp)
@@ -291,11 +285,11 @@
 
 
 ## Clean up
-$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS),$(CREATABLEPATHS),))
+$(call raptor_clean,$(CLEANTARGETS))
 # make the output directories while reading makefile - some build engines prefer this
 $(call makepath,$(CREATABLEPATHS))
 
-# for the abld -what target
+# for the --what option and the log file
 RELEASABLES:=$(RELEASABLES) $(DESTRPP) $(INFOFILE)
-$(eval $(call whatmacro,$(RELEASABLES),WHATRESOURCES))
+$(call raptor_release,$(RELEASABLES),RESOURCE)
 
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
@@ -5,11 +5,12 @@
 		<param name='ALWAYS_BUILD_AS_ARM' default=''/>
 		<param name='SET_ARMINC' default=''/>
 		<param name='ARMLIBS' default=''/>
-		<param name='ARMFPU' default='softvfp'/>
-		<param name='POSTLINKFPU' default='softvfp'/>
+		<param name='ARMFPU' default=''/>
 		<param name='ARMRT' default=''/>
+		<param name='BYTEPAIRCOMPRESSTARGET' default=''/>
 		<param name='TESTPATH' default=''/>
 		<param name='CAPABILITY'/>
+		<param name='COMPRESSTARGET' default=''/>
 		<param name='CPPONLYOPTION' default='-E'/>
 		<param name='LIBRARY'/>
 		<param name='LIBRARY_DEBUG'/>
@@ -20,6 +21,7 @@
 		<param name='EXPORTUNFROZEN' default=''/>
 		<param name='FEEDBACK_OPTION' default='--feedback=' />
 		<param name='FIRSTLIB' default=''/>
+		<param name='INFLATECOMPRESSTARGET' default=''/>
 		<param name='LINKEROPTION_ARMCC' default=''/>
 		<param name='LISTING_OPTION' default='-S'/>
 		<param name='MMPDEFS' default=''/>
@@ -58,9 +60,9 @@
 		<param name='EPOCSTACKSIZE' default=''/>
 		<param name='EPOCFIXEDPROCESS' default=''/>
 		<param name='EPOCALLOWDLLDATA' default=''/>
+		<param name='EPOCNESTEDEXCEPTIONS' default=''/>
 		<param name='PLATMACROS.WINDOWS' default=''/>
 		<param name='PLATMACROS.LINUX' default=''/>
-		<param name='MAKEDEFFILE' default='1'/>
 		<param name='STDCPP' default=''/>
 		<param name='NOSTDCPP' default=''/>
 		<param name='NEWLIB' default=''/>
@@ -72,7 +74,6 @@
 		<param name='CC.VAL.SOFTVFP_MAYBE_VFPV2' default=''/>
 		<param name='CODE_SEGMENT_START' default=''/>
 		<param name='TOOLCHAIN' default=''/>
-		<param name='TOOLCHAINVERSION' default=''/>
 	</interface>
 	<interface name="Symbian.e32abiv2" extends="Symbian.mmp" flm="e32abiv2.flm">
 		<param name='SUPPORTS_STDCPP_NEWLIB' default='1'/>
@@ -92,8 +93,9 @@
 		<param name='CFLAGS'/>
 		<param name='COMMANDFILE_OPTION'/>
 		<param name='COMPILE_ONLY_OPTION'/>
+		<param name='COMPILER_FPU_DEFAULT'/>
+		<param name='COMPILER_FPU_OPTION'/>
 		<param name='COMPILER_CIA_FLAGS'/>
-		<param name='COMPILER_FPU_FLAGS'/>
 		<param name='COMPILER_INTERWORK_DEFINES'/>
 		<param name='COMPILER_SYSTEM_INCLUDE_OPTION'/>
 		<param name='COMPILER_THUMB_DEFINES'/>
@@ -105,7 +107,6 @@
 		<param name='DEBUG_FORMAT'/>
 		<param name='DEBUG_INFO'/>
 		<param name='DEPEND_OPTION'/>
-		<param name='DEPEND_SKIP' default=''/>
 		<param name='ELF2E32'/>
 		<param name='EFREEZE'/>
 		<param name='EFREEZE_REMOVE_OPTION' default=''/>
@@ -116,6 +117,7 @@
 		<param name='FEATURELISTFILES' default=''/>
 		<param name='FEATUREVARIANT' default=''/>
 		<param name='FEATUREVARIANTNAME' default=''/>
+		<param name='FEATUREVARIANTSAFE' default=''/>
 		<param name='FPMODE_OPTION'/>
 		<param name='FROMELF'/>
 		<param name='FULLVARIANTPATH'/>
@@ -124,6 +126,7 @@
 		<param name='LD'/>
 		<param name='LD_ERRORS_CONTROL_OPTION'/>
 		<param name='LD_WARNINGS_CONTROL_OPTION'/>
+		<param name='LD_WARNINGS_SUPPRESSION_ARMLIBS' default='' />
 		<param name='LIBPATH'/>
 		<param name='LICENSERETRY_OPTION' default=''/>
 		<param name='LINKER_ADD_STATIC_RUNTIME'/>
@@ -144,6 +147,8 @@
 		<param name='PERL'/>
 		<param name='PERTURBSTARTTIME'/>
 		<param name='PERTURBMSECS' default='500'/>
+		<param name='POSTLINKER_COMPRESSION_DEFAULT'/>
+		<param name='POSTLINKER_FPU_DEFAULT'/>
 		<param name='PREPDEF'/>
 		<param name='PREINCLUDE'/>
 		<param name='PREINCLUDE_OPTION'/>
@@ -158,6 +163,7 @@
 		<param name='RVCTBIN'/>
 		<param name='RVCTINC'/>
 		<param name='RVCTLIB'/>
+		<param name='RW_BASE'/>
 		<param name='RW_BASE_OPTION'/>
 		<param name='SBSV1MAKE'/>
 		<param name='NMAKE'/>
@@ -167,6 +173,7 @@
 		<param name='SPLIT_OPTION'/>
 		<param name='KERNEL_STATIC_RUNTIME_LIB'/>
 		<param name='USER_STATIC_RUNTIME_LIB'/>
+		<param name='USER_STATIC_RUNTIME_LIB_NESTED_EXCEPTIONS'/>
 		<param name='STATIC_LIBS_LIST'/>
 		<param name='STATIC_LIBS_PATH'/>
 		<param name='STATIC_LIBRARY_DIR'/>
@@ -207,6 +214,10 @@
 		<param name='TARGETTYPE' default="dll"/>
 		<param name='UID1' default="10000079"/>
 	</interface>
+	<interface name="Symbian.pdll" extends="Symbian.e32abiv2" flm="e32abiv2pdll.flm">
+		<param name='TARGETTYPE' default="pdll"/>
+		<param name='UID1' default="10000079"/>
+	</interface>
 	<interface name="Symbian.stddll" extends="Symbian.e32abiv2" flm="e32abiv2stddll.flm">
 		<param name='TARGETTYPE' default="stddll"/>
 		<param name='UID1' default="10000079"/>
@@ -229,6 +240,8 @@
 	</interface>
 	<interface name="Symbian.plugin" extends="Symbian.dll" flm="e32abiv2plugin.flm">
 	</interface>
+	<interface name="Symbian.plugin3" extends="Symbian.dll" flm="e32abiv2plugin.flm">
+	</interface>
 	<interface name="Symbian.textnotifier2" extends="Symbian.dll" flm="e32abiv2textnotifier2.flm">
 	</interface>
 	<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
@@ -33,9 +33,7 @@
 
 EXPORT::
 
-
 CLEANTARGETS:=
-CLEANEXPORTS:=
 RELEASEEXPORTS:=
 CREATABLEPATHS:=$(OUTPUTPATH) $(EXPORTPATH)
 
@@ -60,7 +58,6 @@
 	$(GNUCP) '$(STRINGTABLEHEADER)' '$$@'  \
 	$(call endrule,exportstringtableheader) 
 
-CLEANEXPORTS:=$(EXPORTEDSTRINGTABLEHEADER)
 RELEASEEXPORTS:=$(EXPORTEDSTRINGTABLEHEADER)
 endef
 
@@ -83,24 +80,9 @@
 $(eval $(genstringtable))
 
 
-## Clean up and log releasables (using eval to avoid target specific variables)
-$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS),$(CREATABLEPATHS),))
-$(eval $(call GenerateStandardCleanTarget,$(CLEANEXPORTS),,CLEANEXPORT))
+## Clean up and log releasables
+$(call raptor_clean,$(CLEANTARGETS))
 # make the output directories while reading makefile - some build engines prefer this
 $(call makepath,$(CREATABLEPATHS))
-$(eval $(call whatmacro,$(RELEASEEXPORTS),WHATSTRINGTABLE))
+$(call raptor_release,$(RELEASEEXPORTS),STRINGTABLE)
 
-########################
-# SBSv1 example:
-########################
-# GENERATED_FILES= \
-#         $(EPOCROOT)epoc32\build\generated\http\WspParamConstants.cpp \
-#         $(EPOCROOT)epoc32\include\WspParamConstants.h
-# 
-# $(EPOCROOT)epoc32\build\generated\http\WspParamConstants.cpp : ..\strings\WspParamConstants.st
-#         perl -S ecopyfile.pl ..\strings\WspParamConstants.st $(EPOCROOT)epoc32\build\generated\http\WspParamConstants.st
-#         perl $(EPOCROOT)epoc32\tools\stringtable.pl $(EPOCROOT)epoc32\build\generated\http\WspParamConstants.st
-# 
-# $(EPOCROOT)epoc32\include\WspParamConstants.h : $(EPOCROOT)epoc32\build\generated\http\WspParamConstants.cpp
-#         perl -S ecopyfile.pl $(EPOCROOT)epoc32\build\generated\http\WspParamConstants.h $(EPOCROOT)epoc32\include\WspParamConstants.h
-# 
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
@@ -81,11 +81,10 @@
 # to be target specific to the unique targets
 # that we have created.
 
-UNIQ:=$(TEMPLATE_EXTENSION_MAKEFILE)$(PLATFORM)$(TO_ROOT)$(TO_BLDINF)$(EPOCBLD)$(EXTENSION_ROOT)$(TEMCOUNT)
+UNIQ:=$(TEMPLATE_EXTENSION_MAKEFILE)$(VARIANTPLATFORM)$(TO_ROOT)$(TO_BLDINF)$(EPOCBLD)$(EXTENSION_ROOT)$(TEMCOUNT)
 UNIQ:=$(word 1,$(shell echo $(UNIQ) | $(GNUMD5SUM)))
 
 # Work out the other FINAL target if we're building both udeb and urel
-ifneq ($($(UNIQ)),)
 
 ifeq ($(CFG),urel)
 OTHER_CFG:=udeb
@@ -100,6 +99,7 @@
 OTHER_CFG:=rel
 endif
 
+ifneq ($($(UNIQ)_$(OTHER_CFG)),)
 OTHER_MAKMAKE:=$(UNIQ)_$(OTHER_CFG)_MAKMAKE
 OTHER_BLD:=$(UNIQ)_$(OTHER_CFG)_BLD
 OTHER_FREEZE:=$(UNIQ)_$(OTHER_CFG)_FREEZE
@@ -111,7 +111,7 @@
 endif # ifneq ($($(UNIQ)),)
 
 # Set $($(UNIQ)) so it can be detected if we're run again
-$(UNIQ):=1
+$(UNIQ)_$(CFG):=1
 
 tem_$(notdir $(TEMPLATE_EXTENSION_MAKEFILE))_$(PLATFORM)_$(CFG):=$(tem_$(notdir $(TEMPLATE_EXTENSION_MAKEFILE))_$(PLATFORM)_$(CFG)) $(UNIQ)_$(CFG)
 
@@ -121,7 +121,7 @@
 	RMDIR RM ERASE MKDIR CP                 \
 	PLATFORM_PATH CFG_PATH                  \
 	TEMPLATE_EXTENSION_MAKEFILE             \
-	TARGET SOURCE DEPENDENCIES TOOL PRODUCT_INCLUDE \
+	PRODUCT_INCLUDE \
 	RVCTBIN RVCTINC RVCTLIB
 
 
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
@@ -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"
@@ -18,17 +18,28 @@
 
 ## Input parameters
 
+ifeq ($(filter win,$(HOSTPLATFORM)),win)
+CDEFS.TOOLS2:=$(CDEFS.WIN32) $(CDEFS)
+CFLAGS:=$(CFLAGS.WIN32) $(CFLAGS) $(OPTION_GCC)
+COMPILER_PATH:=$(COMPILER_PATH.WIN32)
 OUTPUTPATH:=$(OUTPUTPATH)/$(TARGET)_$(TARGETTYPE)/tools2/$(VARIANTTYPE)$(TOOLPLATFORMDIR)
-
-ifeq ($(OSTYPE),cygwin)
+else
+ifneq ($(TOOLS2WIN32),)
+# Build win32 tools in Linux
 CDEFS.TOOLS2:=$(CDEFS.WIN32) $(CDEFS)
 CFLAGS:=$(CFLAGS.WIN32) $(CFLAGS) $(OPTION_GCC)
 COMPILER_PATH:=$(COMPILER_PATH.WIN32)
+OUTPUTPATH:=$(OUTPUTPATH)/$(TARGET)_$(TARGETTYPE)/tools2/$(VARIANTTYPE)
 else
+# Build linux tools in Linux
 CDEFS.TOOLS2:=$(CDEFS.LINUX) $(CDEFS)
 CFLAGS:=$(CFLAGS) $(OPTION_GCC)
 COMPILER_PATH=$(COMPILER_PATH.LINUX)
+OUTPUTPATH:=$(OUTPUTPATH)/$(TARGET)_$(TARGETTYPE)/tools2/$(VARIANTTYPE)$(TOOLPLATFORMDIR)
+endif
 endif
+
+
 CDEFS.TOOLS2:=$(call makemacrodef,$(OPT.D),$(CDEFS.TOOLS2))
 
 ## Locally used variables
@@ -75,16 +86,21 @@
 $(compile2object_TARGET): $(1) $(if (DEPENDFILE),,EXPORT)
 	$(call startrule,compile2object,,$(1)) \
 	$(if $(COMPILER_PATH),COMPILER_PATH="$(COMPILER_PATH)",) \
-	$(COMPILER) $(CFLAGS) $(CDEFS.TOOLS2) -MD -MT"$$@" -MF"$(DEPENDFILENAME)" $(INCLUDES) $(OPT.O)"$$@" "$(1)" \
+	$(COMPILER) $(CFLAGS) $(CDEFS.TOOLS2) \
+	$(if $(NO_DEPEND_GENERATE),,-MD -MT"$$@" -MF"$(DEPENDFILENAME)") \
+	$(INCLUDES) $(OPT.O)"$$@" "$(1)" \
 	$(call endrule,compile2object)
 
-CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
-ifneq "$(DEPENDFILE)" ""
-ifeq ($(NO_DEPEND_INCLUDE),)
-  ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" ""
+ifeq ($(NO_DEPEND_GENERATE),)
+  CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
+endif
+
+ifneq ($(DEPENDFILE),)
+  ifeq ($(NO_DEPEND_INCLUDE),)
+    ifeq ($(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS))),)
     -include $(DEPENDFILE)
   endif
-endif
+  endif
 endif
 
 endef
@@ -99,9 +115,9 @@
 # make the output directories while reading makefile - some build engines prefer this
 $(call makepath,$(CREATABLEPATHS))
 
-## Clean up (using eval to avoid target specific variables)
-$(eval $(call GenerateStandardCleanTarget,$(TARGETS) $(OBJECTFILES),$(CREATABLEPATHS),))
-## WHAT target
-$(eval $(call whatmacro,$(RELEASEABLES),WHATTOOLS2))
+## Clean up
+$(call raptor_clean,$(CLEANTARGETS) $(OBJECTFILES))
+## for the --what option and the log file
+$(call raptor_release,$(RELEASABLES))
 
 ## The End
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
@@ -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,20 +16,28 @@
 #
 
 ## Outputs - externally relevant targets that this FLM generates
-ifeq ($(OSTYPE),cygwin)
+ifeq ($(filter win,$(HOSTPLATFORM)),win)
 SYSTEMLIBS:=$(LIBS.WIN32)
 else
+ifneq ($(TOOLS2WIN32),)
+# Build win32 tools in Linux 
+SYSTEMLIBS:=$(LIBS.WIN32)
+else
+# Build linux tools in Linux
 SYSTEMLIBS:=$(LIBS.LINUX)
 endif
+endif
+
 
 EXETARGET:=$(RELEASEPATH)/$(TARGET)$(DOTEXE)
 
+INSTALLED:=
 ifneq ($(TOOLSPATH),)
 INSTALLED:=$(TOOLSPATH)/$(TARGET)$(DOTEXE)
 endif
 
 ## Target groups
-RELEASEABLES:=$(INSTALLED)
+RELEASABLES:=$(INSTALLED)
 TARGETS:=$(EXETARGET) $(INSTALLED)
 
 ## Common build steps (compiling and cleaning)
@@ -51,7 +59,7 @@
 define tools2linkexe
 $(EXETARGET): $(OBJECTFILES) $(STATICLIBS)
 	$(call startrule,tools2linkexe) \
-	$(LINKER) $(CFLAGS) $(LFLAGS) $(OPT.O)"$(EXETARGET)" $(call dblquote,$(OBJECTFILES)) $(LLIBS) \
+	$(LINKER) $(CFLAGS) $(LFLAGS) $(OPT.O)"$(EXETARGET)" $(call dblquote,$(OBJECTFILES)) $(LLIBS) $(LINKER_OPTIONS) \
 	$(if $(SAVESPACE),; $(GNURM) -rf $(OUTPUTPATH); true,) \
 	$(call endrule,tools2linkexe)
 
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
@@ -19,7 +19,7 @@
 LIBTARGET:=$(RELEASEPATH)/$(TARGET).a
 
 ## Target groups
-RELEASEABLES:=$(LIBTARGET)
+RELEASABLES:=$(LIBTARGET)
 TARGETS:=$(LIBTARGET)
 
 ## 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
@@ -27,6 +27,7 @@
 		<param name='SYSTEMINCLUDE' default=''/>
 		<param name='TARGET'/>
 		<param name='TOOLSPATH'/>
+		<param name='TOOLS2WIN32' default=''/>
 		<param name='USERINCLUDE' default=''/>
 		<param name='PRODUCT_INCLUDE' default=''/>
 		<param name='PLATMACROS.WINDOWS'/>
@@ -35,6 +36,7 @@
 	</interface>
 
 	<interface name="Tools.exe" extends="Tools.common" flm="tools2exe.flm">
+		<param name='DOTEXE'/>
 		<param name='LINKER'/>
 		<param name='LFLAGS'/>
 		<param name='LIBS.WIN32' default=''/>
@@ -43,6 +45,7 @@
 		<param name='OPT.l'/>
 		<param name='STATICLIBRARY'/>
 		<param name='TARGETTYPE' default="EXE"/>
+		<param name='LINKER_OPTIONS' default=''/>	
 	</interface>
 
 	<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
@@ -1,5 +1,4 @@
-#
-# 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"
@@ -13,15 +12,44 @@
 #
 # Description: 
 # Run Trace Compiler on source files to generate trace headers and decode files
-#
 
+# 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))))
+
+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))))
 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>))
+
 # 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) : $(SOURCE)
 
+TRACE_HEADERS:=$(foreach SRC,$(SOURCE),$(TRACE_PATH)/$(basename $(notdir $(SRC)))Traces.h)
+
+$(TRACE_HEADERS): $(TRACE_MARKER)
+
 ifeq ($(GUARD_$(call sanitise,$(TRACE_MARKER))),)
 GUARD_$(call sanitise,$(TRACE_MARKER)):=1
 
+# 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
+
 JAVA_COMMAND:=$(SBS_JAVATC)
 TRACE_COMPILER_PATH:=$(EPOCROOT)/epoc32/tools
 TRACE_COMPILER_START:=-classpath $(TRACE_COMPILER_PATH)/tracecompiler com.nokia.tracecompiler.TraceCompiler
 
-TRACE_HEADERS:=$(foreach SRC,$(SOURCE),$(TRACE_PATH)/$(basename $(notdir $(SRC)))Traces.h)
 
 # 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 @@
 	  $(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) && \
+	{ $(GNUTOUCH) $(TRACE_DICTIONARY) $(AUTOGEN_HEADER); \
+	 $(GNUCAT) $(TRACE_SOURCE_LIST) ; true ; } \
 	$(call endrule,tracecompile)
 endef
 
 $(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
 endif
 
+$(eval $(call GenerateStandardCleanTarget,$(TRACE_HEADERS),,))
+
 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
@@ -30,5 +30,5 @@
 include $(FLMHOME)/win32.flm
 
 else
-$(error $win32dll.flm called with wrong TARGETTYPE (should be 'dll' but is '$(TARGETTYPE)'))
+$(error win32dll.flm called with wrong TARGETTYPE (should be 'dll' but is '$(TARGETTYPE)'))
 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
@@ -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"
@@ -50,6 +50,7 @@
 MAINLINKAS:=
 NEWLIBFILE:=
 RELEASABLES:=
+TC_RELEASABLES:=
 STATLIBDIR:=
 STDCPP_BUILD:=
 STDCPPTAGFILE:=
@@ -111,15 +112,22 @@
     endif
   endif
 
+  # Operator new linking depends on both the use of the NEWLIB keyword and whether a component supports a standard
+  # CPP build.
   ifneq ($(NEWLIB),)
+    # If specified, always use the NEWLIB keyword value for operator new library linking
     NEWLIBFILE:=$(STATLIBDIR)/$(NEWLIB)
   else
+    # If not performing a standard CPP build, link to an appropriate default Symbian new library.
+    # Standard CPP components defer to the toolchain supplied libraries.
+    ifneq ($(STDCPP_BUILD),1)
     ifeq ($(SYSTEM_TARGET),1)
       NEWLIBFILE:=$(STATLIBDIR)/$(DEFAULT_SYSTEM_NEWLIB)
     else
       NEWLIBFILE:=$(STATLIBDIR)/$(DEFAULT_NORMAL_NEWLIB)
     endif
   endif
+  endif
 endif
 
 ifeq ($(STDCPP_BUILD),1)
@@ -142,7 +150,7 @@
 endif
 
 # get the compiler to generate dependencies for us?
-ifeq ($(DEPEND_SKIP),)
+ifeq ($(NO_DEPEND_GENERATE),)
   CFLAGS:=$(CFLAGS) $(OPT.DEPEND)
 endif
 
@@ -197,7 +205,7 @@
 # Run trace compiler #####################################
 TRACE_MARKER_PATH:=$(OUTPUTPATH)
 
-ifeq ($(UID3),)
+ifeq ($(subst 0,,$(UID3)),)
   ifeq ($(UID2),)
     USE_TRACE_COMPILER:=
   else
@@ -211,6 +219,7 @@
 # Users can turn TC on by setting it to 1 in user config.
 ifneq ($(USE_TRACE_COMPILER),) 
   include $(FLMHOME)/tracecompiler.mk
+  TC_RELEASABLES:=$(TRACE_DICTIONARY) $(AUTOGEN_HEADER)
 endif
 
 
@@ -243,7 +252,6 @@
 ifeq ($(SUPPORTS_IMPORT_LIBRARY),1)
   ifneq ($(NOEXPORTLIBRARY),1)
     ifneq ($(TARGET_$(call sanitise,$(IMPORTLIBTARGET))),1)
-      CLEANTARGETS:=$(CLEANTARGETS) $(if $(or $(EXPORTUNFROZEN),$(DEFFILE)),$(IMPORTLIBTARGET))
       RELEASABLES:=$(RELEASABLES) $(if $(or $(EXPORTUNFROZEN),$(DEFFILE)),$(IMPORTLIBTARGET))
 
       # import libraries are generated to the UDEB release directory
@@ -290,7 +298,6 @@
     BINTARGETSTATICLINK:=$(BINDIRSTATICLINK)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
   endif
 
-  CLEANTARGETS:=$(CLEANTARGETS) $(BINTARGET) $(BINTARGETSTATICLINK)
   RELEASABLES:=$(RELEASABLES) $(BINTARGET) $(BINTARGETSTATICLINK)
 
   # work on a local source files list
@@ -368,20 +375,21 @@
     $(eval DEPENDFILENAME:=$(call mapwin32file,$(1),.o.d))
     $(eval DEPENDFILE:=$(wildcard $(DEPENDFILENAME)))
 
-    $(call mapwin32file,$(1),.o): $(1) $(PROJECT_META) $(if $(DEPENDFILE),,RESOURCE BITMAP EXPORT) $(if $(USE_TRACE_COMPILER),$(TRACE_MARKER))
+    $(call mapwin32file,$(1),.o): $(1) $(PROJECT_META) $(if $(DEPENDFILE),,RESOURCE BITMAP EXPORT) | $(if $(USE_TRACE_COMPILER),$(TRACE_MARKER))
 	  $(call startrule,win32compile2object,,$(1)) \
 	  $(CC) $$(if $$(filter %.C,$(1)),-lang c) $(CFLAGS) $(OPTION_CW) \
 	  $(if $(STDCPP_BUILD),$$(if $$(filter %.c %.C,$(1)),,$$(call makemacrodef,$(OPT.DEFINE),$(STDCPP_WCHAR_DEF))),) \
-	  $(DEFINES) $(INCLUDES) $(OPT.OUT)"$$@" "$(1)" && \
-	  $(GNUSED) 's#\\\\\(.\)#/\1#g;s#/ #\\\ #g;s#\([A-Za-z]:\)\\\\#\1/#g;1,1s#.*: .* \(.\)\?$$$$#$(call mapwin32file,$(1),.o): $1 \1#' $(call mapwin32file,$(1),.dep) > $(call mapwin32file,$(1),.o.d) \
+	  $(DEFINES) $(INCLUDES) $(OPT.OUT)"$$@" "$(1)" \
+	  $(if $(NO_DEPEND_GENERATE),,&& $(GNUSED) 's#\\\\\(.\)#/\1#g;s#/ #\\\ #g;s#\([A-Za-z]:\)\\\\#\1/#g;1,1s#.*: .* \(.\)\?$$$$#$(call mapwin32file,$(1),.o): $1 \1#' $(call mapwin32file,$(1),.dep) > $(call mapwin32file,$(1),.o.d)) \
 	  $(call endrule,win32compile2object)
 
-    CLEANTARGETS:=$$(CLEANTARGETS) $(call mapwin32file,$(1),.dep)
+    ifeq ($(NO_DEPEND_GENERATE),)
+      CLEANTARGETS:=$$(CLEANTARGETS) $(call mapwin32file,$(1),.dep) $(DEPENDFILENAME)
+    endif
 
-    CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
-    ifneq "$(DEPENDFILE)" ""
+    ifneq ($(DEPENDFILE),)
     ifeq ($(NO_DEPEND_INCLUDE),)
-      ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" ""
+        ifeq ($(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS))),)
         -include $(DEPENDFILE)
       endif
     endif
@@ -412,24 +420,28 @@
   STDMWCINCLUDEPATHS:=$(if $(MWCSym2Includes),$(MWCSym2Includes),$(MWCSYM2INCLUDES))
 
   define win32resourcecompile
-    # Note that two calls are made to the resource compiler here.  There seems to be no means to override the
-    # default behaviour of dumping dependency files into the CWD when using -MD.  So - we compile once for real,
-    # and then pipe dependency output through SED afterwards to create the dependency file where we want it
+    # Note that, if dependency files are required, two calls are made to the resource compiler here.
+    # There seems to be no means to override the default behaviour of dumping dependency files into the CWD when using -MD.
+    # So - we compile once for real, and then pipe dependency output through SED afterwards to create the dependency file where we want it
 
     $(eval DEPENDFILENAME:=$(call mapwin32file,$(1),.res.d))
     $(eval DEPENDFILE:=$(wildcard $(DEPENDFILENAME)))
 
     $(call mapwin32file,$(1),.res): $(1) $(PROJECT_META) $(if $(DEPENDFILE),,RESOURCE BITMAP EXPORT)
 	  $(call startrule,win32resourcecompile,,$(1)) \
-	  MWCIncludes='$(STDMWCINCLUDEPATHS)' $(RC) $(OPT.OUT)"$$@" "$(1)" && \
+	  MWCIncludes='$(STDMWCINCLUDEPATHS)' $(RC) $(OPT.OUT)"$$@" "$(1)" \
+	  $(if $(NO_DEPEND_GENERATE),,&& \
 	  MWCIncludes='$(STDMWCINCLUDEPATHS)' $(RC) -make $(OPT.OUT)"$$@" "$(1)" | \
-	  $(GNUSED) 's#\\\\\(.\)#/\1#g;s#/ #\\\ #g;s#\([A-Za-z]:\)\\\\#\1/#g;1,1s#.*: .* \(.\)\?$$$$#$(call mapwin32file,$(1),.res): $1 \1#' > $(call mapwin32file,$(1),.res.d) \
+	    $(GNUSED) 's#\\\\\(.\)#/\1#g;s#/ #\\\ #g;s#\([A-Za-z]:\)\\\\#\1/#g;1,1s#.*: .* \(.\)\?$$$$#$(call mapwin32file,$(1),.res): $1 \1#' > $(call mapwin32file,$(1),.res.d)) \
 	  $(call endrule,win32resourcecompile)
 
+    ifeq ($(NO_DEPEND_GENERATE),)
     CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
-    ifneq "$(DEPENDFILE)" ""
+    endif
+    
+    ifneq ($(DEPENDFILE),)
     ifeq ($(NO_DEPEND_INCLUDE),)
-      ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" ""
+        ifeq ($(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS))),)
         -include $(DEPENDFILE)
       endif
     endif
@@ -463,7 +475,6 @@
       # link map file (urel only)
       ifeq ($(VARIANTTYPE),urel)
         MAP:=$(OPT.MAP)$(BINTARGET).map
-        CLEANTARGETS:=$(CLEANTARGETS) $(BINTARGET).map
         RELEASABLES:=$(RELEASABLES) $(BINTARGET).map
       endif
     endif
@@ -677,12 +688,11 @@
   BATCHFILE_CREATED_$(BATCHDIR)$(MODULE)/$(VARIANTPLATFORM).$(TESTPATH):=1
   TARGET_CREATED_$(EPOCROOT)/epoc32/release/$(VARIANTPLATFORM)/$(VARIANTTYPE)/z/test/$(MODULE)/$(VARIANTPLATFORM).$(TESTPATH)_$(TARGET):=1
   RELEASABLES:=$(RELEASABLES) $(EPOCROOT)/epoc32/release/$(VARIANTPLATFORM)/$(VARIANTTYPE)/z/test/$(MODULE)/$(VARIANTPLATFORM).$(TESTPATH)
-  CLEANTARGETS:=$(CLEANTARGETS) $(EPOCROOT)/epoc32/release/$(VARIANTPLATFORM)/$(VARIANTTYPE)/z/test/$(MODULE)/$(VARIANTPLATFORM).$(TESTPATH)
 endif
 
 # clean up
-$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS),$(CREATABLEPATHS),))
+$(call raptor_clean,$(CLEANTARGETS))
 # make the output directories while reading makefile - some build engines prefer this
 $(call makepath,$(CREATABLEPATHS))
-# for the abld -what target
-$(eval $(call whatmacro,$(RELEASABLES),WHATWINSCW))
+# for the --what option and the log file
+$(call raptor_release,$(RELEASABLES) $(TC_RELEASABLES))
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
@@ -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"
@@ -16,8 +16,7 @@
 # 
 #
 
-ifeq ($(TARGETTYPE),plugin)
-
+ifneq ($(filter plugin plugin3,$(TARGETTYPE)),)
 BASE_TYPE:=dll
 CW_STATIC_RUNTIME:=1
 FIRST_STATLIB:=
@@ -24,11 +23,15 @@
 FIXED_EXPORT:=?ImplementationGroupProxy@@YAPBUTImplementationProxy@@AAH@Z
 SUPPORTS_IMPORT_LIBRARY:=0
 SYSTEM_TARGET:=0
+
 UID2_DEFAULT:=10009D8D
+ifeq ($(TARGETTYPE),plugin3)
+UID2_DEFAULT:=10009D93
+endif
 
 # Use the general win32 FLM 
 include $(FLMHOME)/win32.flm
 
 else
-$(error $win32plugin.flm called with wrong TARGETTYPE (should be 'plugin' but is '$(TARGETTYPE)'))
+$(error $win32plugin.flm called with wrong TARGETTYPE (should be 'plugin' or 'plugin3' but is '$(TARGETTYPE)'))
 endif
Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor: license.txt
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
@@ -18,7 +18,7 @@
 
 class Filter(object):
 	
-	def open(self, raptor):
+	def open(self, params):
 		return False
 	
 	def write(self, text):
@@ -32,3 +32,89 @@
 	
 	def formatError(self, message):
 		return "sbs: error: " + message + "\n"
+		
+	def formatWarning(self, message):
+		return "sbs: warning: " + message + "\n"	
+
+import sys
+import xml.sax
+
+class FilterSAX(Filter, xml.sax.handler.ContentHandler, xml.sax.handler.ErrorHandler):
+	"base class for filters using a SAX parser"
+	
+	# define these methods in your subclass
+	
+	def startDocument(self):
+		"called once before any elements are seen"
+		pass
+		
+	def startElement(self, name, attributes):
+		"called on the opening of any element"
+		pass
+	
+	def characters(self, char):
+		"called one or more times with body text from an element"
+		pass
+		
+	def endElement(self, name):
+		"called on the closing of any element"
+		pass
+	
+	def endDocument(self):
+		"called once when all elements are closed"
+		pass
+
+	def error(self, exception):
+		"the parse found an error which is (possibly) recoverable"
+		pass
+		
+	def fatalError(self, exception):
+		"the parser thinks an error occurred which should stop everything"
+		pass
+		
+	def warning(self, exception):
+		"the parser found something to complain about that might not matter"
+		pass
+		
+	# these methods are from the Filter base class
+	
+	def open(self, params):
+		"initialise"
+		
+		self.params = params
+		self.ok = True
+		try:
+			self.parser = xml.sax.make_parser(['xml.sax.expatreader'])
+			self.parser.setContentHandler(self)
+			self.parser.setErrorHandler(self)
+			
+		except Exception, ex:
+			sys.stderr.write(self.formatError(str(ex)))
+			self.ok = False
+		
+		return self.ok
+	
+		
+	def write(self, text):
+		"process some log text"
+		try:
+			self.parser.feed(text)
+		except Exception, ex:
+			sys.stderr.write(self.formatError(str(ex)))
+			self.ok = False
+				
+		return self.ok
+	
+
+	def close(self):
+		"finish off"
+		try:
+			self.parser.close()
+		except Exception, ex:
+			sys.stderr.write(self.formatError(str(ex)))
+			self.ok = False
+			
+		return self.ok
+	
+
+# the end
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
@@ -198,12 +198,16 @@
 	def isError(self, aLine):
 		"""Convenience matcher for basic errors.
 		Override in sub-classes to specialise."""
-		return True if Recipe.error.match(aLine) else False
+		if Recipe.error.match(aLine):
+			return True
+		return False
 	
 	def isWarning(self, aLine):
 		"""Convenience matcher for basic warnings.
 		Override in sub-classes to specialise."""
-		return True if Recipe.warning.match(aLine) else False
+		if Recipe.warning.match(aLine):
+			return True
+		return False
 	
 	def getOutput(self):
 		""""Return a list of all output that isn't an error or a warning.
@@ -234,16 +238,17 @@
 	
 	def isSuccess(self):
 		"Convenience method to get overall recipe status."
-		return True if self.getDetail(Recipe.exit) == "ok" else False
+		return (self.getDetail(Recipe.exit) == "ok")
 	
 	
 class Win32Recipe(Recipe):
 	"Win32 tailored recipe class."
 	def isError(self, aLine):
-		return True if mwError.match(aLine) else False
+		if mwError.match(aLine):
+			return True
+		return False
 	
 	def isWarning(self, aLine):
-		return True if mwWarning.match(aLine) else False
-
-
-	
+		if mwWarning.match(aLine):
+			return True
+		return False
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
@@ -1,5 +1,5 @@
 #
-# 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"
@@ -19,6 +19,7 @@
 import sys
 import re
 import types
+import ctypes
 
 # are we on windows, and if so what is the current drive letter
 isWin = sys.platform.lower().startswith("win")
@@ -265,6 +266,36 @@
 
 		return self.path
 
+	def GetSpaceSafePath(self):
+		"""Returns a version of the path where spaces don't interfere with shell interpretation.
+		
+		This functionality only applies to Windows - paths containing spaces are assumed to be problematic
+		on non-Windows platforms.
+		
+		On Windows, the path is returned in Windows-specific 8.3 short path form - tilde are used to replace
+		spaces and fit path elements within 8.3 requirements.  As 8.3 format paths are not guaranteed to be
+		supported on all Windows installs, and can only be calculated if they exist, a newly formated path is
+		only returned if it is returned by the Windows API and tested to exist.
+		"""
+		
+		if not isWin:
+			return None
+		
+		from ctypes.wintypes import DWORD, LPSTR, MAX_PATH
+
+		GetShortPathNameA = ctypes.windll.kernel32.GetShortPathNameA
+		GetShortPathNameA.restype = DWORD
+		GetShortPathNameA.argtypes = LPSTR, LPSTR, DWORD
+		
+		buffer = ctypes.create_string_buffer(MAX_PATH)
+		GetShortPathNameA(self.path, buffer, MAX_PATH)
+		
+		spacesafe = buffer.value
+		
+		if not spacesafe or not os.path.exists(spacesafe):
+			return None
+		
+		return spacesafe
 
 # Module functions
 
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
@@ -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"
@@ -71,6 +71,7 @@
 		self.assignment = \
 			( \
 			Line(CaselessKeyword('ARMFPU') + String()) ^ \
+			Line(CaselessKeyword('APPLY') + String()) ^ \
 			Line(CaselessKeyword('ASSPLIBRARY') + StringList()) ^ \
 			Line(CaselessKeyword('CAPABILITY') + StringList()) ^ \
 			Line(CaselessKeyword('DOCUMENT') + StringList()) ^ \
@@ -142,6 +143,7 @@
 			CaselessKeyword('EPOCALLOWDLLDATA') ^ \
 			CaselessKeyword('EPOCCALLDLLENTRYPOINTS') ^ \
 			CaselessKeyword('EPOCFIXEDPROCESS') ^ \
+			CaselessKeyword('EPOCNESTEDEXCEPTIONS') ^ \
 			CaselessKeyword('EXPORTUNFROZEN') ^ \
 			CaselessKeyword('FEATUREVARIANT') ^ \
 			CaselessKeyword('BYTEPAIRCOMPRESSTARGET') ^ \
Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/plugins: filter_broken.py
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
@@ -129,5 +129,4 @@
 		FilterCarbide.stdout.write("Overall Errors: %d\n" % self.__errors)
 		FilterCarbide.stdout.write("Overall Warnings: %d\n\n" % self.__warnings)
 
-		return True if self.__errors == 0 else False
-
+		return (self.__errors == 0)
Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/plugins: filter_checkcomp.py
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
@@ -224,11 +224,11 @@
 				
 				# Do the check for each file 	
 				for dep in deplistnodups:
-					dep = os.path.normpath(dep).replace('\\', '/')
+					dep = os.path.abspath(dep).replace('\\', '/')
 					self.checksource(dep)
 					
 			except Exception, e:
-				sys.stderr.write("sbs: could not access temporary file for FilterClean\n")
+				sys.stderr.write("sbs: FilterCheckSource failed: %s\n" % str(e))
 				
 			if self.errors == 0:
 				sys.stdout.write("No checksource errors found\n")
@@ -263,7 +263,7 @@
 		def checkcase(self, path):
 			"""Checks the path matches the file system"""
 			
-			path = os.path.normpath(path)
+			path = os.path.abspath(path)
 			path = path.replace('\\', '/')
 			
 			if not os.path.exists(path):
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
@@ -51,17 +51,23 @@
 		
 			if self.removeTargets:
 				if line.startswith("<file>"):
-					self.doFile(line)
-				elif line.startswith("<dir>"):
-					self.doDirectory(line)
+					self.doFile(line, "file")
+				elif line.startswith("<build>"):
+					self.doFile(line, "build")
+				elif line.startswith("<resource>"):
+					self.doFile(line, "resource")
+				elif line.startswith("<bitmap>"):
+					self.doFile(line, "bitmap")
+				elif line.startswith("<stringtable>"):
+					self.doFile(line, "stringtable")
 						
 			if self.removeExports:
 				if line.startswith("<export "):
 					self.doExport(line)
 				elif line.startswith("<member>"):
-					self.doMember(line)
+					self.doFile(line, "member")
 				elif line.startswith("<zipmarker>"):
-					self.doZipMarker(line)
+					self.doFile(line, "zipmarker")
 				
 		return self.ok
 	
@@ -82,12 +88,13 @@
 				if os.path.isfile(path):
 					self.removeFile(path)
 					
-				elif os.path.isdir(path):
-					dirs.add(path)
+				directory = os.path.dirname(path)
+				if os.path.isdir(directory):
+					dirs.add(directory)
 					
 			self.tmp.close()	# this also deletes the temporary file
-		except:
-			sys.stderr.write("sbs: could not access temporary file for FilterClean\n")
+		except Exception,e:
+			sys.stderr.write("sbs: problem reading temporary file for FilterClean: %s\n" % str(e))
 			self.ok = False
 		
 		# finally remove (empty) directories
@@ -123,48 +130,21 @@
 			self.ok = False
 	
 			
-	def doFile(self, line):
-		"remove filenames in <file> tags immediately (not .d or .dep)."
-		filename = line[6:-7]                # line is "<file>filename</file>
-		filename = filename.strip("\"\'")    # some names are quoted
+	def doFile(self, line, tagname):
+		"deal with <tagname>X</tagname>"
 		
-		# dependency files must be deleted at the end,
-		# everything else can be deleted straight away.
-		if filename.endswith(".d") or filename.endswith(".dep"):
+		first = len(tagname) + 2	# line is "<tagname>filename</tagname>
+		last = -(first + 1)
+		filename = line[first:last]                
+		filename = filename.strip("\"\'")    # some names are quoted
 			self.saveItem(filename)
-		else:
-			if os.path.isfile(filename):
-				self.removeFile(filename)
-
-
-	def doDirectory(self, line):
-		"save directories in <dir> tags for the end."
-		# assuming <dir>X</dir>
-		dirname = line[5:-6]
-		self.saveItem(dirname.strip("\"\'"))
 		
 		
 	def doExport(self, line):
-		"save exported files in <export> tags for the end."
-		# assuming <export destination='X' source='Y' />
+		"deal with <export destination='X' source='Y'/>"
 		filename = line[21:line.find("'", 21)]
 		self.saveItem(filename)
 		
 		
-	def doMember(self, line):
-		"save zip exports in <member> tags for the end."
-		# assuming <member>X</member>
-		filename = line[8:-9]
-		self.saveItem(filename)
-		
-		
-	def doZipMarker(self, line):
-		"Remove file in <zipmarker> tags"
-		# assuming <zipmarker>X</zipmarker>
-		filename = line[11:-12]
-		if os.path.isfile(filename):
-			self.removeFile(filename)
-
-
 # the end				
 
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
@@ -16,6 +16,7 @@
 # Will ultimately do everything that scanlog does
 #
 
+import errno
 import os
 import sys
 import raptor
@@ -38,7 +39,7 @@
 				if dirname and not os.path.isdir(dirname):
 					os.makedirs(dirname)
 			except os.error, e:
-				if e.errno != os.errno.EEXIST:
+				if e.errno != errno.EEXIST:
 					sys.stderr.write("%s : error: cannot create directory %s\n" % \
 						(str(raptor.name), dirname))
 					return False
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
@@ -16,6 +16,7 @@
 # Will ultimately do everything that scanlog does
 #
 
+import errno
 import os
 import sys
 import raptor
@@ -38,7 +39,7 @@
 				if dirname and not os.path.isdir(dirname):
 					os.makedirs(dirname)
 			except os.error, e:
-				if e.errno != os.errno.EEXIST:
+				if e.errno != errno.EEXIST:
 					sys.stderr.write("%s : error: cannot create directory " +
 							"%s\n" % (raptor.name, dirname))
 					return False
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
@@ -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"
@@ -105,7 +105,7 @@
 
 	attribute_re = re.compile("([a-z][a-z0-9]*)='([^']*)'",re.I)
 	maxdots = 40 # if one prints dots then don't print masses
-	recipelinelimit = 200 # don't scan ultra-long recipes in case we run out of memory
+	recipelinelimit = 1024 # don't scan ultra-long recipes in case we run out of memory
 
 	# recipes that we think most users are interested in
 	# and the mapping that we will use to output them as
@@ -113,6 +113,7 @@
 		"asmcompile" : "asmcompile" ,
 		"compile" : "compile" ,
 		"postlink" : "target",
+		"linkandpostlink" : "target",
 		"resourcecompile" : "resource",
 		"genstringtable" : "strtable",
 		"tem" : "tem",
@@ -200,6 +201,9 @@
 		if self.raptor.quiet:
 			self.quiet = True
 		
+		# the build configurations which were reported
+		self.built_configs = []
+		
 		# keep count of errors and warnings
 		self.err_count = 0
 		self.warn_count = 0
@@ -229,6 +233,8 @@
 			# detect the status report from a recipe
 			if text.find('failed') != -1:
 				self.failed = True
+				if text.find("reason='timeout'") != -1:
+					self.timedout = True
 			else:
 				self.failed = False
 			return
@@ -281,7 +287,9 @@
 
 			# This variable holds all recipe information
 			self.failed = False # Recipe status
+			self.timedout = False # Did it Timeout?
 			self.recipeBody = []
+			self.recipelineExceeded = 0
 			return		
 		elif text.startswith("</recipe>"):
 			# detect the end of a recipe
@@ -296,13 +304,27 @@
 				
 				if self.failed == True:
 					if not self.analyseonly:
-						sys.stderr.write("\n FAILED %s for %s: %s\n" % \
+						reason=""
+						if self.timedout:
+							reason="(timeout)"
+
+						sys.stderr.write("\n FAILED %s %s for %s: %s\n" % \
 								(self.recipe_dict['name'],
+								reason,
 								self.recipe_dict['config'],
 								self.recipe_dict['name_to_user']))
 	
 						mmppath = generic_path.Path(self.recipe_dict['mmp']).From(generic_path.CurrentDir()).GetShellPath()
+						if mmppath is not "":
 						sys.stderr.write("  mmp: %s\n" % mmppath)
+						if self.timedout:
+							sys.stderr.write( \
+"""    Timeouts may be due to network related issues (e.g. license servers),
+    tool bugs or abnormally large components. TALON_TIMEOUT can be adjusted 
+    in the make engine configuration if required.  Make engines may have 
+    their own timeouts that Raptor cannot influence
+""")
+						else:
 						for L in self.recipeBody:
 							if not L.startswith('+'):
 								sys.stdout.write("   %s\n" % L.rstrip())
@@ -311,7 +333,7 @@
 					r = Recipe.factory(self.recipe_dict['name'], "".join(self.recipeBody))
 					warnings = r.warnings()
 					info = r.info()
-					if len(warnings) > 0:
+					if len(warnings) or len(info):
 						if not self.analyseonly:
 							for L in self.recipeBody:
 								if not L.startswith('+'):
@@ -336,6 +358,11 @@
 		elif text.startswith("]]>"):
 			if self.inRecipe:
 				self.inBody = False
+				if self.recipelineExceeded > 0:
+					self.recipeBody.append("[filter_terminal: OUTPUT TRUNCATED: " + \
+						"Recipe output limit exceeded; see logfile for full output " + \
+						"(%s lines shown out of %s)]" % (FilterTerminal.recipelinelimit, \
+						FilterTerminal.recipelinelimit + self.recipelineExceeded))
 		elif text.startswith("<info>Copied"):
 			if not self.analyseonly and not self.quiet:
 				start = text.find(" to ") + 4
@@ -365,8 +392,13 @@
 			# we have to keep the output until we find out
 			# if the recipe failed. But not all of it if it turns
 			# out to be very long
-			if len(self.recipeBody) < FilterTerminal.recipelinelimit:
+			if len(self.recipeBody) <= FilterTerminal.recipelinelimit:
 				self.recipeBody.append(text)
+			else:
+				self.recipelineExceeded += 1
+		elif text.startswith("<info>Buildable configuration '"):
+			# <info>Buildable configuration 'name'</info>
+			self.built_configs.append(text[30:-8])
 
 	def logit(self):
 		""" log a message """
@@ -405,10 +437,13 @@
 		if self.warn_count > 0 or self.err_count > 0:
 			sys.stdout.write("\n%s : warnings: %s\n" % (raptor.name,
 					self.warn_count))
-			sys.stdout.write("%s : errors: %s\n" % (raptor.name,
+			sys.stdout.write("%s : errors: %s\n\n" % (raptor.name,
 					self.err_count))
 		else:
-			sys.stdout.write("\nno warnings or errors\n")
+			sys.stdout.write("\nno warnings or errors\n\n")
+
+		for bc in self.built_configs:
+			sys.stdout.write("built " + bc + "\n")
 
 		sys.stdout.write("\nRun time %d seconds\n" % self.raptor.runtime);
 		sys.stdout.write("\n")
Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/python/plugins: filter_timing.py
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
@@ -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"
@@ -22,6 +22,11 @@
 
 class FilterWhat(filter_interface.Filter):
 
+	def __init__(self):
+		super(filter_interface.Filter,self).__init__()
+		self.path_prefix_to_strip = None
+		self.path_prefix_to_add_on = None
+		self.check = False
 	
 	def print_file(self, line, start, end):
 		"Ensure DOS slashes on Windows"
@@ -29,18 +34,40 @@
 		"""Use chars between enclosing tags ("<>", "''", etc)
 				start = opening tag, so the line we need
 				actually starts at 'start + 1' """
+
+		abs_filename = line[(start + 1):end]
+		filename = abs_filename
+
+		# Adjust drive letters for case insensitivity on windows
+
+		path_prefix_to_strip = self.path_prefix_to_strip
 		if "win" in self.buildparameters.platform:
-			filename = line[(start + 1):end].replace("/","\\")
-		else:
-			filename = line[(start + 1):end]
+			filename = filename[0].upper()+filename[1:]
+			filename = filename.replace("/","\\")
+
+		if path_prefix_to_strip:
+			if "win" in self.buildparameters.platform:
+				path_prefix_to_strip = path_prefix_to_strip[0].upper()+path_prefix_to_strip[1:].replace("/","\\")
+			if filename.startswith(path_prefix_to_strip):
+				filename = filename[len(path_prefix_to_strip):]
+			if self.path_prefix_to_add_on != None:
+				filename = self.path_prefix_to_add_on + filename
 			
 		if self.check:
-			if not os.path.isfile(filename):
+			if not os.path.isfile(abs_filename):
 				print "MISSING:", filename
 				self.ok = False
 		else:
 			self.outfile.write(filename+"\n")
 
+		self.prints += 1
+
+	def start_bldinf(self, bldinf):
+		pass
+
+	def end_bldinf(self):
+		pass
+		
 
 	def open(self, build_parameters):
 		"initialise"
@@ -45,8 +72,10 @@
 	def open(self, build_parameters):
 		"initialise"
 		
+
 		self.buildparameters = build_parameters
-		self.check = build_parameters.doCheck
+		if build_parameters.doCheck:
+			self.check = True
 		self.what = build_parameters.doWhat
 
 		self.outfile = sys.stdout
@@ -78,6 +107,11 @@
 		"Regex for zip exports"
 		self.zip_export_regex = re.compile("^<member>.*")
 		
+		"Regex for determining bld.inf name"
+		self.whatlog_regex = re.compile("^<whatlog *bldinf='(?P<bldinf>[^']*)'.*")
+		self.current_bldinf = ''
+		
+		self.prints = 0
 		self.ok = True		
 		return self.ok
 	
@@ -87,10 +121,22 @@
 		for line in text.splitlines():
 			line = line.rstrip()
 			
+			# we are normally the ONLY filter running so we have to pass on
+			# any errors and warnings that emerge
+			#
+			if line.startswith("<error"):
+				sys.stderr.write(self.formatError(line))
+				self.ok = False
+				continue
+			if line.startswith("<warning"):
+				sys.stderr.write(self.formatWarning(line))
+				continue
+				
 			if not line in self.repetitions:
 				self.repetitions[line] = 0
 				
 			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 @@
 					
 					self.print_file(line, start, end)
 						
+			"work out what the 'current' bldinf file is"
+			m = self.whatlog_regex.match(line)
+			if m:
+				bi = m.groupdict()['bldinf']
+				if self.current_bldinf != bi:
+					if self.current_bldinf != '':
+						self.end_bldinf()
+					self.current_bldinf = bi
+					if bi != '':
+						self.start_bldinf(bi)
+							
+					
+						
 			self.repetitions[line] += 1
 				
 		return self.ok
 	
+	def summary(self):
+		if self.prints == 0:
+			if self.what:
+				message = "no WHAT information found"
+			else:
+				message = "no CHECK information found"
+				
+			sys.stderr.write(self.formatError(message))
+			self.ok = False
+		return self.ok
+		
 	def close(self):
 		if self.outfile_close:
 			self.outfile.close()
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
@@ -143,7 +143,6 @@
 			self.WarnDuplicate("group", self.groups[obj.name], obj)
 			return
 
-		obj.SetOwner(self.raptor)
 		self.groups[obj.name] = obj
 
 	def FindNamedAlias(self, name):
@@ -154,7 +153,6 @@
 			self.WarnDuplicate("alias", self.aliases[obj.name], obj)
 			return
 
-		obj.SetOwner(self.raptor)
 		self.aliases[obj.name] = obj
 
 
@@ -176,7 +174,6 @@
 			self.WarnDuplicate("interface", self.interfaces[cacheID][obj.name], obj)
 			return
 
-		obj.SetOwner(self.raptor)
 		obj.cacheID = cacheID
 		self.interfaces[cacheID][obj.name] = obj
 
@@ -192,7 +189,6 @@
 				self.WarnDuplicate("variant", self.variants[obj.name], obj)
 				return
 
-			obj.SetOwner(self.raptor)
 			self.variants[obj.name] = obj
 
 
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
@@ -1,5 +1,5 @@
 #
-# 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"
@@ -34,7 +34,7 @@
 # raptor_cli module attributes
 
 parser = OptionParser(prog = raptor.name,
-					  usage = """%prog [--help] [options] [variable=value] [target] ...
+					  usage = """%prog [--help] [options] [target] ...
 
 Targets:
 
@@ -47,7 +47,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
-RESOURCE       Create resource files and AIFs
+RESOURCE       Create resource files
 ROMFILE        Create an IBY file to be included in a ROM
 TARGET         Create main executables
 WHAT           List all releaseable targets
@@ -87,6 +87,9 @@
 parser.add_option("--export-only",action="store_true",dest="doExportOnly",
 				help="Generate exports only and do not create any make files.")
 
+parser.add_option("--noexport",action="store_true",dest="doExport",
+				help="Don't export any files - useful in some builds when you know exports have already been done.")
+
 parser.add_option("-f","--logfile",action="store",dest="logfile",
 				help="Name of the log file, or '-' for stdout.")
 
@@ -117,6 +120,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.")
 				
+parser.add_option("--no-depend-generate",action="store_true",dest="noDependGenerate",
+				help="Do not generate dependency files. This is only useful for extremely large non-incremental builds.  Implies --no-depend-include.")
+				
 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 @@
 
 				  "forced" -  Check all tool versions. Don't use cached results.
 			""")
+
+parser.add_option("--timing",action="store_true",dest="timing",
+			help="Show extra timing information for various processes in the build.")
+
 parser.add_option("--pp",action="store",dest="parallel_parsing",
 				help="""Controls how metadata (e.g. bld.infs) are parsed in Parallel.
 					Possible values are:
 					"on"  - Parse bld.infs in parallel (should be faster on clusters/multicore machines)
+					"slave" - used internally by Raptor 
 					"off" - Parse bld.infs serially 
 				     """)
 
@@ -236,12 +247,7 @@
 
 	# the leftover_args are either variable assignments of the form a=b
 	# or target names.
-	regex = re.compile("^(.+)=(.*)$")
 	for leftover in leftover_args:
-		assignment = regex.findall(leftover)
-		if len(assignment) > 0:
-			Raptor.SetEnv(assignment[0][0],assignment[0][1])
-		else:
 			Raptor.AddTarget(leftover)
 
 	# Define the dictionary of functions to be used.
@@ -260,11 +266,13 @@
 				 'quiet' : Raptor.RunQuietly,
 				 'debugoutput' : Raptor.SetDebugOutput,
 				 'doExportOnly' : Raptor.SetExportOnly,
+				 'doExport' : Raptor.SetNoExport,
 				 'keepgoing': Raptor.SetKeepGoing,
 				 'nobuild' : Raptor.SetNoBuild,
 				 'make_engine': Raptor.SetMakeEngine,
 				 'make_option': Raptor.AddMakeOption,
 				 'noDependInclude': Raptor.SetNoDependInclude,
+				 'noDependGenerate': Raptor.SetNoDependGenerate,
 				 'number_of_jobs': Raptor.SetJobs,
 				 'project_name' :  Raptor.AddProject,
 				 'filter_list' : Raptor.FilterList,
@@ -273,6 +281,7 @@
 				 'what' :  Raptor.SetWhat,
 				 'tries' : Raptor.SetTries,
 				 'toolcheck' : Raptor.SetToolCheck,
+				 'timing' : Raptor.SetTiming,
 				 'source_target' : Raptor.AddSourceTarget,
 				 'command_file' : CommandFile,
 				'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
@@ -1,5 +1,5 @@
 #
-# 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"
@@ -27,8 +27,13 @@
 import subprocess
 from tempfile import gettempdir
 from time import time, clock
+import traceback
+import raptor_cache
 
 
+class MissingInterfaceError(Exception):
+	def __init__(self, s):
+		Exception.__init__(self,s)
 
 # What host platforms we recognise
 # This allows us to tie some variants to one host platform and some to another
@@ -60,7 +65,7 @@
 
 # Make sure not to start up on an unsupported platform
 if not HostPlatform.IsKnown(HostPlatform.hostplatform):
-	raise Exception("raptor_data module loaded on an unrecognised platform '%s'. Expected one of %s" % (hostplatform, str(hostplatforms)))
+	raise Exception("raptor_data module loaded on an unrecognised platform '%s'. Expected one of %s" % (HostPlatform.hostplatform, str(HostPlatform.hostplatforms)))
 
 
 # raptor_data module classes
@@ -68,16 +73,14 @@
 class Model(object):
 	"Base class for data-model objects"
 
+	__slots__ = ('host', 'source', 'cacheID')
+
 	def __init__(self):
-		self.owner = None	# Raptor object
 		self.source = None	# XML file
-		self.indent = " "	# for DebugPrint
 		self.host = None
 		self.cacheID = ""	# default set of cached objects
-
-
-	def SetOwner(self, aRaptor):
-		self.owner = aRaptor
+		# not using the cache parameter - there to make the 
+		# init for all Model objects "standard"
 
 
 	def SetSourceFile(self, filename):
@@ -92,10 +95,6 @@
 		raise InvalidChildError()
 
 
-	def DebugPrint(self, prefix = ""):
-		if self.owner:
-			self.owner.Debug("%s", prefix)
-
 	def Valid(self):
 		return False
 
@@ -139,9 +138,14 @@
 	def Resolve(self):
 		raise BadReferenceError()
 
-	def GetModifiers(self):
-		cache = self.owner.cache
-		return [ cache.FindNamedVariant(m) for m in self.modifiers ]
+	def GetModifiers(self, cache):
+		mods = []
+		for m in self.modifiers:
+			try:
+				mods.append(cache.FindNamedVariant(m))
+			except KeyError:
+				raise BadReferenceError(m)
+		return mods
 
 	def Valid(self):
 		return self.ref
@@ -154,20 +158,13 @@
 		self.variants = []
 
 
-	def SetOwner(self, aRaptor):
-		Model.SetOwner(self, aRaptor)
-		for v in self.variants:
-			v.SetOwner(aRaptor)
-
-
-	def DebugPrint(self, prefix = ""):
-		for v in self.variants:
-			v.DebugPrint(prefix)
+	def __str__(self):
+		return "\n".join([str(v) for v in self.variants])
 
 
 	def AddVariant(self, variant):
 		if type(variant) is types.StringTypes:
-			variant = VariantRef(variant)
+			variant = VariantRef(ref = variant)
 
 
 		# Only add the variant if it's not in the list
@@ -175,15 +172,19 @@
 		if not variant in self.variants:
 			self.variants.append(variant)
 
-	def GetVariants(self):
+	def GetVariants(self, cache):
 		# resolve any VariantRef objects into Variant objects
+		missing_variants = []
 		for i,var in enumerate(self.variants):
 			if isinstance(var, Reference):
 				try:
-					self.variants[i] = var.Resolve()
+					self.variants[i] = var.Resolve(cache=cache)
 
 				except BadReferenceError:
-					self.owner.Error("Missing variant '%s'", var.ref)
+					missing_variants.append(var.ref)
+
+		if len(missing_variants) > 0:
+			raise MissingVariantException("Missing variants '%s'", " ".join(missing_variants))
 
 		return self.variants
 
@@ -199,27 +200,25 @@
 		self.params = []
 		self.paramgroups = []
 
-	def DebugPrint(self, prefix = ""):
-		self.owner.Debug("%s<interface name='%s'>", prefix, self.name)
-		self.owner.Debug("%s...", prefix)
-		self.owner.Debug("%s</interface>", prefix)
+	def __str__(self):
+		return "<interface name='%s'>" % self.name + "</interface>"
 
-	def FindParent(self):
+	def FindParent(self, cache):
 		try:
-			return self.owner.cache.FindNamedInterface(self.extends, self.cacheID)
+			return cache.FindNamedInterface(self.extends, self.cacheID)
 		except KeyError:
 			raise BadReferenceError("Cannot extend interface because it cannot be found: "+str(self.extends))
 
-	def GetParams(self):
+	def GetParams(self, cache):
 		if self.extends != None:
-			parent = self.FindParent()
+			parent = self.FindParent(cache)
 
 			# what parameter names do we have already?
 			names = set([x.name for x in self.params])
 
 			# pick up ones we don't have that are in our parent
 			pp = []
-			for p in parent.GetParams():
+			for p in parent.GetParams(cache):
 				if not p.name in names:
 					pp.append(p)
 
@@ -229,29 +228,29 @@
 
 		return self.params
 
-	def GetParamGroups(self):
+	def GetParamGroups(self, cache):
 		if self.extends != None:
-			parent = self.FindParent()
+			parent = self.FindParent(cache)
 
 			# what parameter names do we have already?
 			patterns = set([x.pattern for x in self.paramgroups])
 
 			# pick up ones we don't have that are in our parent
-			for g in parent.GetParamGroups():
+			for g in parent.GetParamGroups(cache):
 				if not g.pattern in patterns:
 					self.paramgroups.append(g)
 
 		return self.paramgroups
 
 
-	def GetFLMIncludePath(self):
+	def GetFLMIncludePath(self, cache):
 		"absolute path to the FLM"
 
 		if self.flm == None:
 			if self.extends != None:
-				parent = self.FindParent()
+				parent = self.FindParent(cache)
 
-				return parent.GetFLMIncludePath()
+				return parent.GetFLMIncludePath(cache)
 			else:
 				raise InvalidPropertyError()
 
@@ -295,12 +294,12 @@
 
 class InterfaceRef(Reference):
 
-	def DebugPrint(self, prefix = ""):
-		self.owner.Debug("%s<interfaceRef ref='%s'/>", prefix, self.ref)
+	def __str__(self):
+		return "<interfaceRef ref='%s'/>" % self.ref
 
-	def Resolve(self):
+	def Resolve(self, cache):
 		try:
-			return self.owner.cache.FindNamedInterface(self.ref, self.cacheID)
+			return cache.FindNamedInterface(self.ref, self.cacheID)
 		except KeyError:
 			raise BadReferenceError()
 
@@ -316,24 +315,13 @@
 		self.parentSpec = None
 
 
-	def DebugPrint(self, prefix = ""):
-		self.owner.Debug("%s<spec name='%s'>", prefix, self.name)
-		if self.interface:
-			self.interface.DebugPrint(prefix + self.indent)
-		VariantContainer.DebugPrint(self, prefix + self.indent)
+	def __str__(self):
+		s = "<spec name='%s'>" % str(self.name)
+		s += VariantContainer.__str__(self)
 		for c in self.childSpecs:
-			c.DebugPrint(prefix + self.indent)
-		self.owner.Debug("%s</spec>", prefix)
-
-
-	def SetOwner(self, aRaptor):
-		VariantContainer.SetOwner(self, aRaptor)
-
-		if self.interface != None:
-			self.interface.SetOwner(aRaptor)
-
-		for s in self.childSpecs:
-			s.SetOwner(aRaptor)
+			s += str(c) + '\n'
+		s += "</spec>"
+		return s
 
 
 	def SetProperty(self, name, value):
@@ -343,10 +331,10 @@
 			raise InvalidPropertyError()
 
 
-	def Configure(self, config):
+	def Configure(self, config, cache):
 		# configure all the children (some may be Filters or parents of)
 		for spec in self.GetChildSpecs():
-			spec.Configure(config)
+			spec.Configure(config, cache = cache)
 
 
 	def HasInterface(self):
@@ -358,10 +346,10 @@
 		or isinstance(interface, InterfaceRef):
 			self.interface = interface
 		else:
-			self.interface = InterfaceRef(interface)
+			self.interface = InterfaceRef(ref = interface)
 
 
-	def GetInterface(self):
+	def GetInterface(self, cache):
 		"""return the Interface (fetching from the cache if it was a ref)
 		may return None"""
 
@@ -371,13 +359,11 @@
 
 		if isinstance(self.interface, InterfaceRef):
 			try:
-				self.interface = self.interface.Resolve()
+				self.interface = self.interface.Resolve(cache=cache)
 				return self.interface
 
 			except BadReferenceError:
-				self.owner.Error("Missing interface %s", self.interface.ref)
-				return None
-
+				raise MissingInterfaceError("Missing interface %s" % self.interface.ref)
 
 	def AddChild(self, child):
 		if isinstance(child, Specification):
@@ -409,7 +395,7 @@
 		return True
 
 
-	def GetAllVariantsRecursively(self):
+	def GetAllVariantsRecursively(self, cache):
 		"""Returns all variants contained in this node and in its ancestors.
 
 		The returned value is a list, the structure of which is [variants-in-parent,
@@ -419,11 +405,11 @@
 		the variants themselves.
 		"""
 		if self.parentSpec:
-			variants = self.parentSpec.GetAllVariantsRecursively()
+			variants = self.parentSpec.GetAllVariantsRecursively(cache = cache)
 		else:
 			variants = []
 
-		variants.extend( self.GetVariants() )
+		variants.extend( self.GetVariants(cache = cache) )
 
 		return variants
 
@@ -438,22 +424,21 @@
 	If several Conditions are set, the test is an OR of all of them."""
 
 	def __init__(self, name = ""):
-		Specification.__init__(self, name)	# base class constructor
-		self.Else = Specification(name)     # same for Else part
+		Specification.__init__(self, name = name)	# base class constructor
+		self.Else = Specification(name = name)     # same for Else part
 		self.isTrue = True
 		self.configNames = set()            #
 		self.variableNames = set()          # TO DO: Condition class
 		self.variableValues = {}            #
 
-	def DebugPrint(self, prefix = ""):
-		self.owner.Debug("%s<filter name='%s'>", prefix, self.name)
-		self.owner.Debug("%s <if config='%s'>", prefix, " | ".join(self.configNames))
-		Specification.DebugPrint(self, prefix + self.indent)
-		self.owner.Debug("%s </if>", prefix)
-		self.owner.Debug("%s <else>", prefix)
-		self.Else.DebugPrint(prefix + self.indent)
-		self.owner.Debug("%s </else>", prefix)
-		self.owner.Debug("%s</filter>", prefix)
+	def __str__(self, prefix = ""):
+		s = "<filter name='%s'>\n"% self.name
+		s += "<if config='%s'>\n" % " | ".join(self.configNames)
+		s += Specification.__str__(self)
+		s += "</if>\n <else>\n"
+		s += str(self.Else)
+		s += " </else>\n</filter>\n"
+		return s
 
 
 	def SetConfigCondition(self, configName):
@@ -478,13 +463,14 @@
 			self.variableValues[variableName] = set([variableValues])
 
 
-	def Configure(self, buildUnit):
+	def Configure(self, buildUnit, cache):
 		self.isTrue = False
 
 		if buildUnit.name in self.configNames:
 			self.isTrue = True
 		elif self.variableNames:
-			evaluator = self.owner.GetEvaluator(self.parentSpec, buildUnit)
+
+			evaluator = Evaluator(self.parentSpec, buildUnit, cache=cache)
 
 			for variableName in self.variableNames:
 				variableValue = evaluator.Get(variableName)
@@ -495,14 +481,7 @@
 
 		# configure all the children too
 		for spec in self.GetChildSpecs():
-			spec.Configure(buildUnit)
-
-
-	def SetOwner(self, aRaptor):
-		# base class method
-		Specification.SetOwner(self, aRaptor)
-		# same for Else part
-		self.Else.SetOwner(aRaptor)
+			spec.Configure(buildUnit, cache=cache)
 
 
 	def HasInterface(self):
@@ -512,18 +491,18 @@
 			return self.Else.HasInterface()
 
 
-	def GetInterface(self):
+	def GetInterface(self, cache):
 		if self.isTrue:
-			return Specification.GetInterface(self)
+			return Specification.GetInterface(self, cache = cache)
 		else:
-			return self.Else.GetInterface()
+			return self.Else.GetInterface(cache = cache)
 
 
-	def GetVariants(self):
+	def GetVariants(self, cache):
 		if self.isTrue:
-			return Specification.GetVariants(self)
+			return Specification.GetVariants(self, cache = cache)
 		else:
-			return self.Else.GetVariants()
+			return self.Else.GetVariants(cache = cache)
 
 
 	def SetParentSpec(self, parent):
@@ -591,18 +570,17 @@
 
 class Operation(Model):
 	"Base class for variant operations"
+	__slots__ = 'type'
 	def __init__(self):
 		Model.__init__(self)	# base class constructor
 		self.type = None
 
-
 	def Apply(self, oldValue):
 		pass
 
 
 class Append(Operation):
-	__slots__ = ('name','value','separator','owner')
-
+	__slots__ = ('name', 'value', 'separator')
 	def __init__(self, name = None, value = None, separator = " "):
 		Operation.__init__(self)	# base class constructor
 		self.name = name
@@ -610,9 +588,9 @@
 		self.separator = separator
 
 
-	def DebugPrint(self, prefix = ""):
+	def __str__(self):
 		attributes = "name='" + self.name + "' value='" + self.value + "' separator='" + self.separator + "'"
-		self.owner.Debug("%s<append %s/>", prefix, attributes)
+		return "<append %s/>" % attributes
 
 
 	def Apply(self, oldValue):
@@ -641,6 +619,7 @@
 
 
 class Prepend(Operation):
+	__slots__ = ('name', 'value', 'separator')
 	def __init__(self, name = None, value = None, separator = " "):
 		Operation.__init__(self)	# base class constructor
 		self.name = name
@@ -648,9 +627,9 @@
 		self.separator = separator
 
 
-	def DebugPrint(self, prefix = ""):
+	def __str__(self, prefix = ""):
 		attributes = "name='" + self.name + "' value='" + self.value + "' separator='" + self.separator + "'"
-		self.owner.Debug("%s<prepend %s/>", prefix, attributes)
+		return "<prepend %s/>" % prefix
 
 
 	def Apply(self, oldValue):
@@ -679,8 +658,8 @@
 
 
 class Set(Operation):
+	__slots__ = ('name', 'value', 'type', 'versionCommand', 'versionResult')
 	"""implementation of <set> operation"""
-	__slots__ = ('name','value', 'type', 'versionCommand', 'versionResult', 'owner')
 
 	def __init__(self, name = None, value = "", type = ""):
 		Operation.__init__(self)	# base class constructor
@@ -691,12 +670,12 @@
 		self.versionResult = ""
 
 
-	def DebugPrint(self, prefix = ""):
+	def __str__(self):
 		attributes = "name='" + self.name + "' value='" + self.value + "' type='" + self.type + "'"
 		if type == "tool":
 			attributes += " versionCommand='" + self.versionCommand + "' versionResult='" + self.versionResult
 
-		self.owner.Debug("%s<set %s/>", prefix, attributes)
+		return "<set %s/>" % attributes
 
 
 	def Apply(self, oldValue):
@@ -724,6 +703,8 @@
 	def Valid(self):
 		return (self.name != None and self.value != None)
 
+class BadToolValue(Exception):
+	pass
 
 class Env(Set):
 	"""implementation of <env> operator"""
@@ -733,36 +714,54 @@
 		self.default = default
 
 
-	def DebugPrint(self, prefix = ""):
+	def __str__(self):
 		attributes = "name='" + self.name + "' type='" + self.type + "'"
-		if default != None:
+		if self.default != None:
 			attributes += " default='" + self.default + "'"
 
 		if type == "tool":
 			attributes += " versionCommand='" + self.versionCommand + "' versionResult='" + self.versionResult + "'"
 
-		self.owner.Debug("%s<env %s/>", prefix, attributes)
+		return "<env %s/>" % attributes
 
 
 	def Apply(self, oldValue):
 		try:
 			value = os.environ[self.name]
 
-			# if this value is a "path" or a "tool" then we need to make sure
+			if value:
+				if self.type in ["path", "tool", "toolchainpath"]:
+					# if this value is some sort of path or tool then we need to make sure
 			# it is a proper absolute path in our preferred format.
-			if value and (self.type == "path" or self.type == "tool"):
 				try:
 					path = generic_path.Path(value)
 					value = str(path.Absolute())
 				except ValueError,e:
-					self.owner.Error("the environment variable %s is incorrect: %s" % (self.name, str(e)))
-					return "NO_VALUE_FOR_" + self.name
+						raise BadToolValue("the environment variable %s is incorrect: %s" % (self.name, str(e)))
+					
+					if self.type in ["tool", "toolchainpath"]:
+						# if  we're dealing with tool-related values, then make sure that we can get "safe"
+						# versions if they contain spaces - if we can't, that's an error, as they won't
+						# survive full usage in the toolcheck or when used and/or referenced in FLMs						
+						if ' ' in value:
+							path = generic_path.Path(value)
+							spaceSafeValue = path.GetSpaceSafePath()
+						
+							if not spaceSafeValue:
+								raise BadToolValue("the environment variable %s is incorrect - it is a '%s' type but contains spaces that cannot be neutralised: %s" % (self.name, self.type, value))
+							
+							value = spaceSafeValue	
+				elif value.endswith('\\'):
+					# if this value ends in an un-escaped backslash, then it will be treated as a line continuation character
+					# in makefile parsing - un-escaped backslashes at the end of values are therefore escaped					
+					count = len(value) - len(value.rstrip('\\'))	# an odd number of backslashes means there's one to escape
+					if count % 2:
+						value += '\\'	
 		except KeyError:
 			if self.default != None:
 				value = self.default
 			else:
-				self.owner.Error("%s is not set in the environment and has no default", self.name)
-				return "NO_VALUE_FOR_" + self.name
+				raise BadToolValue("%s is not set in the environment and has no default" % self.name)
 
 		return value
 
@@ -791,7 +790,7 @@
 		self.operations = []
 		self.variantKey = ""
 
-	def GetOperations(self):
+	def GetOperations(self, cache):
 		"""Return all operations related to this BuildUnit.
 		
 		The result is cached, and so will only be computed once per BuildUnit.
@@ -800,7 +799,7 @@
 		if self.variantKey != key:
 			self.variantKey = key
 			for v in self.variants:
-				self.operations.extend( v.GetAllOperationsRecursively() )
+				self.operations.extend( v.GetAllOperationsRecursively(cache=cache) )
 
 		return self.operations
 
@@ -820,7 +819,7 @@
 	def ClearModifiers(self):
 		self.modifiers = []
 
-	def GenerateBuildUnits(self):
+	def GenerateBuildUnits(self,cache):
 		"""Returns a list of BuildUnits.
 
 		This function must be overridden by derived classes.
@@ -830,6 +829,8 @@
 
 class Variant(Model, Config):
 
+	__slots__ = ('cache','name','host','extends','ops','variantRefs','allOperations')
+
 	def __init__(self, name = ""):
 		Model.__init__(self)
 		Config.__init__(self)
@@ -868,20 +869,10 @@
 	def Valid(self):
 		return self.name
 
-	def SetOwner(self, aRaptor):
-
-		Model.SetOwner(self, aRaptor)
-
-		for r in self.variantRefs:
-			r.SetOwner(aRaptor)
-
-		for op in self.ops:
-			op.SetOwner(aRaptor)
-
 	def AddOperation(self, op):
 		self.ops.append(op)
 
-	def GetAllOperationsRecursively(self):
+	def GetAllOperationsRecursively(self, cache):
 		"""Returns a list of all operations in this variant.
 
 		The list elements are themselves lists; the overall structure of the
@@ -892,16 +883,16 @@
 
 		if not self.allOperations:
 			if self.extends:
-				parent = self.owner.cache.FindNamedVariant(self.extends)
-				self.allOperations.extend( parent.GetAllOperationsRecursively() )
+				parent = cache.FindNamedVariant(self.extends)
+				self.allOperations.extend( parent.GetAllOperationsRecursively(cache = cache) )
 			for r in self.variantRefs:
-				for v in [ r.Resolve() ] + r.GetModifiers():
-					self.allOperations.extend( v.GetAllOperationsRecursively() )
+				for v in [ r.Resolve(cache = cache) ] + r.GetModifiers(cache = cache):
+					self.allOperations.extend( v.GetAllOperationsRecursively(cache = cache) )
 			self.allOperations.append(self.ops)
 
 		return self.allOperations
 
-	def GenerateBuildUnits(self):
+	def GenerateBuildUnits(self,cache):
 
 		name = self.name
 		vars = [self]
@@ -909,32 +900,46 @@
 		for m in self.modifiers:
 			name = name + "." + m.name
 			vars.append(m)
+		return [ BuildUnit(name=name, variants=vars) ]
 
-		return [ BuildUnit(name, vars) ]
-
-	def DebugPrint(self, prefix = ""):
+	def isDerivedFrom(self, progenitor, cache):
+		if self.name == progenitor:
+			return True
 
-		self.owner.Debug("%s<var name='%s' extends='%s'>", prefix, self.name, self.extends)
-		for op in self.ops:
-			op.DebugPrint(prefix + self.indent)
+		pname = self.extends
+		while pname is not None and pname is not '':
+			parent = cache.FindNamedVariant(pname)
+			if parent is None:
+				break
+			if parent.name == progenitor:
+				return True
+			pname = parent.extends
 
-		self.owner.Debug("%s</var>", prefix)
+		return False
 
+	def __str__(self):
+		s = "<var name='%s' extends='%s'>\n" % (self.name, self.extends)
+		for op in self.ops:
+			s +=  str(op) + '\n'
+		s += "</var>"
+		return s
 
 class VariantRef(Reference):
 
 	def __init__(self, ref=None):
-		Reference.__init__(self, ref)
+		Reference.__init__(self, ref = ref)
 
-	def DebugPrint(self, prefix = ""):
-		self.owner.Debug("%s<varRef ref='%s'/>", prefix, self.ref)
+	def __str__(self):
+		return "<varRef ref='%s'/>" % self.ref
 
-	def Resolve(self):
+	def Resolve(self, cache):
 		try:
-			return self.owner.cache.FindNamedVariant(self.ref)
+			return cache.FindNamedVariant(self.ref)
 		except KeyError:
 			raise BadReferenceError(self.ref)
 
+class MissingVariantException(Exception):
+	pass
 
 class Alias(Model, Config):
 
@@ -946,8 +951,8 @@
 		self.varRefs = []
 		self.variants = []
 
-	def DebugPrint(self, prefix = ""):
-		self.owner.Debug("%s<alias name='%s' meaning='%s'/>", prefix, self.name, self.meaning)
+	def __str__(self):
+		return "<alias name='%s' meaning='%s'/>" % (self.name, self.meaning)
 
 	def SetProperty(self, key, val):
 		if key == "name":
@@ -956,45 +961,53 @@
 			self.meaning = val
 
 			for u in val.split("."):
-				self.varRefs.append( VariantRef(u) )
+				self.varRefs.append( VariantRef(ref = u) )
 		else:
 			raise InvalidPropertyError()
 
-	def SetOwner(self, raptor):
-		Model.SetOwner(self, raptor)
-		for r in self.varRefs:
-			r.SetOwner(raptor)
-
 	def Valid(self):
 		return self.name and self.meaning
 
-	def GenerateBuildUnits(self):
+	def Resolve(self, cache):
 		if not self.variants:
+			missing_variants = []
 			for r in self.varRefs:
 				try:
-					self.variants.append( r.Resolve() )
+					self.variants.append( r.Resolve(cache=cache) )
 				except BadReferenceError:
-					self.owner.Error("Missing variant '%s'", r.ref)
+					missing_variants.append(r.ref)
+				
+			if len(missing_variants) > 0:
+				raise MissingVariantException("Missing variants '%s'" % " ".join(missing_variants))
+
+	def GenerateBuildUnits(self, cache):
+		self.Resolve(cache)
 
 		name = self.name
 
 		for v in self.modifiers:
 			name = name + "." + v.name
 
-		return [ BuildUnit(name, self.variants + self.modifiers) ]
+		return [ BuildUnit(name=name, variants=self.variants + self.modifiers) ]
 
+	def isDerivedFrom(self, progenitor, cache):
+		self.Resolve(cache)
+		for v in self.variants:
+			if v.isDerivedFrom(progenitor,cache):
+				return True
+		return False
 
 class AliasRef(Reference):
 
 	def __init__(self, ref=None):
 		Reference.__init__(self, ref)
 
-	def DebugPrint(self, prefix = ""):
-		self.owner.Debug("%s<aliasRef ref='%s'/>", prefix, self.ref)
+	def __str__(self):
+		return "<aliasRef ref='%s'/>" % self.ref
 
-	def Resolve(self):
+	def Resolve(self, cache):
 		try:
-			return self.owner.cache.FindNamedAlias(self.ref)
+			return cache.FindNamedAlias(self.ref)
 		except KeyError:
 			raise BadReferenceError(self.ref)
 
@@ -1018,41 +1031,39 @@
 		else:
 			raise InvalidChildError()
 
-	def SetOwner(self, raptor):
-		Model.SetOwner(self, raptor)
-		for r in self.childRefs:
-			r.SetOwner(raptor)
-
 	def Valid(self):
 		return self.name and self.childRefs
 
-	def DebugPrint(self, prefix = ""):
-
-		self.owner.Debug("<group name='%s'>", prefix, self.name)
-
+	def __str__(self):
+		s = "<group name='%s'>" % self.name
 		for r in self.childRefs:
-			r.DebugPrint(prefix + self.indent)
-
-		self.owner.Debug("%s</group>", prefix)
-
-	def GenerateBuildUnits(self):
+			s += str(r)
+		s += "</group>"
+		return s
 
+	def GenerateBuildUnits(self, cache):
 		units = []
 
+		missing_variants = []
 		for r in self.childRefs:
-			refMods = r.GetModifiers()
-
 			try:
-				obj = r.Resolve()
+				obj = r.Resolve(cache=cache)
 			except BadReferenceError:
-				self.owner.Error("Missing variant '%s'", r.ref)
+				missing_variants.append(r.ref)
 			else:
 				obj.ClearModifiers()
-
+				try:
+					refMods = r.GetModifiers(cache)
+				except BadReferenceError,e:
+					missing_variants.append(str(e))
+				else:
 				for m in refMods + self.modifiers:
 					obj.AddModifier(m)
 
-				units.extend( obj.GenerateBuildUnits() )
+					units.extend( obj.GenerateBuildUnits(cache) )
+
+		if len(missing_variants) > 0:
+			raise MissingVariantException("Missing variants '%s'" % " ".join(missing_variants))
 
 		return units
 
@@ -1062,19 +1073,102 @@
 	def __init__(self, ref=None):
 		Reference.__init__(self, ref)
 
-	def DebugPrint(self, prefix = ""):
-		mod = ".".join(self.modifiers)
-		self.owner.Debug("%s<groupRef ref='%s' mod='%s'/>", prefix, self.ref, mod)
+	def __str__(self):
+		return "<groupRef ref='%s' mod='%s'/>" % (self.ref, ".".join(self.modifiers))
 
-	def Resolve(self):
+	def Resolve(self, cache):
 		try:
-			return self.owner.cache.FindNamedGroup(self.ref)
+			return cache.FindNamedGroup(self.ref)
 		except KeyError:
 			raise BadReferenceError(self.ref)
 
+def GetBuildUnits(configNames, cache, logger):
+	"""expand a list of config strings like "arm.v5.urel" into a list
+	of BuildUnit objects that can be queried for settings.
+	
+	The expansion tries to be tolerant of errors in the XML so that a
+	typo in one part of a group does not invalidate the whole group.
+	"""
+	
+	# turn dot-separated name strings into Model objects (Group, Alias, Variant)
+	models = []
+		
+	for c in set(configNames):
+		ok = True
+		names = c.split(".")
+
+		base = names[0]
+		mods = names[1:]
+
+		if base in cache.groups:
+			x = cache.FindNamedGroup(base)
+		elif base in cache.aliases:
+			x = cache.FindNamedAlias(base)
+		elif base in cache.variants:
+			x = cache.FindNamedVariant(base)
+		else:
+			logger.Error("Unknown build configuration '%s'" % base)
+			continue
+
+		x.ClearModifiers()
+
+		for m in mods:
+			if m in cache.variants:
+				x.AddModifier( cache.FindNamedVariant(m) )
+			else:
+				logger.Error("Unknown build variant '%s'" % m)
+				ok = False
+				
+		if ok:
+			models.append(copy.copy(x))
+
+	# turn Model objects into BuildUnit objects
+	#
+	# all objects have a GenerateBuildUnits method but don't use
+	# that for Groups because it is not tolerant of errors (the
+	# first error raises an exception and the rest of the group is
+	# abandoned)
+	units = []
+		
+	while len(models) > 0:
+		x = models.pop()
+		try:
+			if isinstance(x, (Alias, Variant)):
+				# these we just turn straight into BuildUnits
+				units.extend(x.GenerateBuildUnits(cache))
+			elif isinstance(x, Group):
+				# deal with each part of the group separately (later)
+				for child in x.childRefs:
+					modChild = copy.copy(child)
+					modChild.modifiers = child.modifiers + [m.name for m in x.modifiers]
+					models.append(modChild)
+			elif isinstance(x, Reference):
+				# resolve references and their modifiers
+				try:
+					obj = x.Resolve(cache)
+					modObj = copy.copy(obj)
+					modObj.modifiers = x.GetModifiers(cache)
+				except BadReferenceError,e:
+					logger.Error("Unknown reference '%s'" % str(e))
+				else:
+					models.append(modObj)
+		except Exception, e:
+			logger.Error(str(e))
+
+	return units
+	
+class ToolErrorException(Exception):
+	def __init__(self, s):
+		Exception.__init__(self,s)
+
 class Tool(object):
 	"""Represents a tool that might be used by raptor e.g. a compiler"""
 
+	# It's difficult and expensive to give each tool a log reference but a class one
+	# will facilitate debugging when that is needed without being a design flaw the
+	# rest of the time.
+	log = raptor_utilities.nulllog
+
 	# For use in dealing with tools that return non-ascii version strings.
 	nonascii = ""
 	identity_chartable = chr(0)
@@ -1084,7 +1178,7 @@
 		nonascii += chr(c)
 		identity_chartable += " "
 
-	def __init__(self, name, command, versioncommand, versionresult, id="", log = raptor_utilities.nulllog):
+	def __init__(self, name, command, versioncommand, versionresult, id=""):
 		self.name = name
 		self.command = command
 		self.versioncommand = versioncommand
@@ -1097,7 +1191,6 @@
 		# version until someone proves that it's OK
 		self.valid = False
 
-		self.log=log
 
 	def expand(self, toolset):
 		self.versioncommand = toolset.ExpandAll(self.versioncommand)
@@ -1117,7 +1210,7 @@
 				# If it really is not a simple command then we won't be able to get a date and
 				# we won't be able to tell if it is altered or updated - too bad!
 				testfile = generic_path.Where(self.command)
-				self.log.Debug("toolcheck: tool '%s' was found on the path at '%s' ", self.command, testfile)
+				#self.log.Debug("toolcheck: tool '%s' was found on the path at '%s' ", self.command, testfile)
 				if testfile is None:
 					raise Exception("Can't be found in path")
 
@@ -1127,18 +1220,20 @@
 			testfile_stat = os.stat(testfile)
 			self.date = testfile_stat.st_mtime
 		except Exception,e:
-			self.log.Debug("toolcheck: '%s=%s' cannot be dated - this is ok, but the toolcheck won't be able to tell when a new  of the tool is installed. (%s)", self.name, self.command, str(e))
+			# We really don't mind if the tool could not be dated - for any reason
+			Tool.log.Debug("toolcheck: '%s=%s' cannot be dated - this is ok, but the toolcheck won't be able to tell when a new version of the tool is installed. (%s)", self.name, self.command, str(e))
+			pass
 	
 			
-	def check(self, shell, evaluator):
+	def check(self, shell, evaluator, log = raptor_utilities.nulllog):
 
 		self.vre = re.compile(self.versionresult)
 
 		try:
 			self.log.Debug("Pre toolcheck: '%s' for version '%s'", self.name, self.versionresult)
 			p = subprocess.Popen(args=[shell, "-c", self.versioncommand], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+			log.Debug("Checking tool '%s' for version '%s'", self.name, self.versionresult)
 			versionoutput,err = p.communicate()
-			self.log.Debug("Checking tool '%s' for version '%s'", self.name, self.versionresult)
 		except Exception,e:
 			versionoutput=None
 
@@ -1148,12 +1243,11 @@
 		versionoutput_a = versionoutput.translate(Tool.identity_chartable,"")
 
 		if versionoutput_a and self.vre.search(versionoutput_a) != None:
-			self.log.Debug("tool '%s' returned an acceptable version '%s' at %s", self.name, versionoutput_a, str(self.date))
+			log.Debug("tool '%s' returned an acceptable version '%s'", self.name, versionoutput_a)
 			self.valid = True
 		else:
-			self.log.Error("tool '%s' from config '%s' did not return version '%s' as required.\nCommand '%s' returned:\n%s\nCheck your environment and configuration.\n", self.name, self.id, self.versionresult, self.versioncommand, versionoutput_a)
 			self.valid = False
-		return self.valid
+			raise ToolErrorException("tool '%s' from config '%s' did not return version '%s' as required.\nCommand '%s' returned:\n%s\nCheck your environment and configuration.\n" % (self.name, self.id, self.versionresult, self.versioncommand, versionoutput_a))
 
 def envhash(irrelevant_vars):
 	"""Determine something unique about this environment to identify it.
@@ -1175,6 +1269,9 @@
 	write() is used to flush the cache to disc.
 	"""
 	# The raptor shell - this is not mutable.
+	if 'SBS_SHELL' in os.environ:
+		shell = os.environ['SBS_SHELL']
+	else:
 	hostbinaries = os.path.join(os.environ['SBS_HOME'], 
 	                            os.environ['HOSTPLATFORM_DIR'])
 	                            
@@ -1256,7 +1353,6 @@
 								log.Info("Ignoring garbled toolcheck cache: %s (%s)\n", self.cachefilename, str(e))
 								self.__toolcheckcache = {}
 								
-									
 						else:
 							log.Info("Toolcheck cache %s ignored - environment changed\n", self.cachefilename)
 					else:
@@ -1316,8 +1412,11 @@
 
 			self.log.Debug("toolcheck done: %s -key: %s" % (tool.name, tool.key))
 
-			if not tool.check(ToolSet.shell, evaluator):
+			try:
+				tool.check(ToolSet.shell, evaluator, log = self.log)
+			except ToolErrorException, e:
 				self.valid = False
+				self.log.Error("%s\n" % str(e))
 
 			# Tool failures are cached just like successes - don't want to repeat them
 			cache[tool.key] =  { "name" : tool.name, "valid" : tool.valid, "age" : 0 , "date" : tool.date }
@@ -1356,6 +1455,11 @@
 				self.log.Info("Could not write toolcheck cache: %s", str(e))
 		return self.valid
 
+class UninitialisedVariableException(Exception):
+	pass
+
+class RecursionException(Exception):
+	pass
 
 class Evaluator(object):
 	"""Determine the values of variables under different Configurations.
@@ -1364,11 +1468,11 @@
 
 	refRegex = re.compile("\$\((.+?)\)")
 
-	def __init__(self, Raptor, specification, buildUnit, gathertools = False):
-		self.raptor = Raptor
+	def __init__(self, specification, buildUnit, cache, gathertools = False):
 		self.dict = {}
 		self.tools = []
 		self.gathertools = gathertools
+		self.cache = cache
 
 		specName = "none"
 		configName = "none"
@@ -1377,14 +1481,18 @@
 		opsLists = []
 
 		if buildUnit:
-			opsLists.extend( buildUnit.GetOperations() )
+			ol = buildUnit.GetOperations(cache)
+			self.buildUnit = buildUnit
+			
+			opsLists.extend( ol )
 
 		if specification:
-			for v in specification.GetAllVariantsRecursively():
-				opsLists.extend( v.GetAllOperationsRecursively() )
+			for v in specification.GetAllVariantsRecursively(cache):
+				opsLists.extend( v.GetAllOperationsRecursively(cache) )
 
 		tools = {}
 
+		unfound_values = []
 		for opsList in opsLists:
 			for op in opsList:
 				# applying an Operation to a non-existent variable
@@ -1394,13 +1502,20 @@
 				except KeyError:
 					oldValue = ""
 
+				try:
 				newValue = op.Apply(oldValue)
+				except BadToolValue, e:
+					unfound_values.append(str(e))
+					newValue = "NO_VALUE_FOR_" + op.name
+					
 				self.dict[op.name] = newValue
 			
 				if self.gathertools:
 					if op.type == "tool" and op.versionCommand and op.versionResult:
-						tools[op.name] = Tool(op.name, newValue, op.versionCommand, op.versionResult, configName, log = self.raptor)
+						tools[op.name] = Tool(op.name, newValue, op.versionCommand, op.versionResult, configName)
 
+		if len(unfound_values) > 0:
+			raise UninitialisedVariableException("\n".join(unfound_values))
 
 		if self.gathertools:
 			self.tools = tools.values()
@@ -1417,8 +1532,7 @@
 			unresolved = False
 			for k, v in self.dict.items():
 				if v.find('$(' + k + ')') != -1:
-					self.raptor.Error("Recursion Detected in variable '%s' in configuration '%s' ",k,configName)
-					expanded = "RECURSIVE_INVALID_STRING"
+						raise RecursionException("Recursion Detected in variable '%s' in configuration '%s' " % (k,configName))
 				else:
 					expanded = self.ExpandAll(v, specName, configName)
 
@@ -1466,20 +1580,24 @@
 
 		refs = Evaluator.refRegex.findall(value)
 
+		# store up all the unset variables before raising an exception
+		# to allow us to find them all
+		unset_variables = [] 
+
 		for r in set(refs):
 			expansion = None
 
-			if r in self.raptor.override:
-				expansion = self.raptor.override[r]
-			elif r in self.dict:
+			if r in self.dict:
 				expansion = self.dict[r]
 			else:
 				# no expansion for $(r)
-				self.raptor.Error("Unset variable '%s' used in spec '%s' with config '%s'",
-							  	  r, spec, config)
+				unset_variables.append("Unset variable '%s' used in spec '%s' with config '%s'" % (r, spec, config))
 			if expansion != None:
 				value = value.replace("$(" + r + ")", expansion)
 
+		if len(unset_variables) > 0: # raise them all
+			raise UninitialisedVariableException(". ".join(unset_variables))
+
 		return value
 
 
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
@@ -134,6 +134,15 @@
 
 		return True
 
+	def addInclude(self, makefilename):
+		"""
+		"""
+		# create the directory if it does not exist
+
+		self.open()
+		# now we can write the values into the makefile
+		self.file.write("include %s\n" % (makefilename+"."+self.selector.name))
+
 	def close(self):
 		if self.file is not None:
 			if self.epilogue != None:
@@ -191,6 +200,11 @@
 		for f in self.makefiles:
 			f.addCall(specname, configname, ifname, useAllInterfaces, flmpath, parameters, guard)
 
+	def addInclude(self, makefilename):
+		"""include a makefile from each of the makefiles in the set - has the selector name appended to it."""
+		for f in self.makefiles:
+			f.addInclude(makefilename)
+
 	def makefileNames(self):
 		for mf in self.makefiles:
 			yield str(mf.filename)
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
@@ -1,5 +1,5 @@
 #
-# 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"
@@ -20,27 +20,120 @@
 import os
 import random
 import raptor
-import raptor_data
+import raptor_timing
 import raptor_utilities
 import raptor_version
+import raptor_data
 import re
 import subprocess
 import time
 from raptor_makefile import *
+import traceback
+import sys
+from xml.sax.saxutils import escape
+from xml.sax.saxutils import unescape
+
+
+class BadMakeEngineException(Exception):
+	pass
+
+def string_following(prefix, str):
+	"""If str starts with prefix then return the rest of str, otherwise None"""
+	if str.startswith(prefix):
+		return str[len(prefix):]
+	else:
+		return None
+
+def XMLEscapeLog(stream):
+	""" A generator that reads a raptor log from a stream and performs an XML escape
+	    on all text between tags, which is usually make output that could contain
+	    illegal characters that upset XML-based log parsers.
+	    This function yields "xml-safe" output line by line.
+	"""
+	inRecipe = False
+
+	for line in stream:
+		if line.startswith("<recipe"):
+			inRecipe = True
+		elif line.startswith("</recipe"):
+			inRecipe = False
+			
+		# unless we are inside a "recipe", any line not starting
+		# with "<" is free text that must be escaped.
+		if inRecipe or line.startswith("<"):
+			yield line
+		else:
+			yield escape(line)
+
+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")
+
+	inOutput = False
+
+	buildid = ""
+	for line in af:
+		line = line.rstrip("\n\r")
+
+
+		if not inOutput:
+			o = string_following("<output>", line)
+			if not o:
+				o = string_following('<output src="prog">', line)
+
+			if o:
+				inOutput = True	
+				yield unescape(o)+'\n'
+				continue
+
+
+			o = string_following('<build id="',line)
+			if o:
+				buildid = o[:o.find('"')]
+				yield "Starting build: "+buildid+"\n"
+				continue 
+
+			o = string_following('<metric name="duration">', line)
+			if o:
+				secs = int(o[:o.find('<')])
+				if secs != 0:
+					duration = "%d:%d" % (secs/60, secs % 60)
+				else:
+					duration = "0:0"
+				continue 
+
+
+			o = string_following('<metric name="clusterAvailability">', line)
+			if o:
+				availability = o[:o.find('<')]
+				continue 
+				
+		else:
+			end_output = line.find("</output>")
+		
+			if end_output != -1:
+				line = line[:end_output]
+				inOutput = False
+			
+			if line != "":	
+				yield unescape(line)+'\n'
+
+	yield "Finished build: %s   Duration: %s (m:s)   Cluster availability: %s%%\n" %(buildid,duration,availability)
+	af.close()
+
+
 
 # raptor_make module classes
 
 class MakeEngine(object):
 
-	def __init__(self, Raptor):
+	def __init__(self, Raptor, engine="make_engine"):
 		self.raptor = Raptor
 		self.valid = True
-		self.makefileset = None
 		self.descrambler = None
 		self.descrambler_started = False
 
-		engine = Raptor.makeEngine
-		
 		# 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 @@
 		elif engine in Raptor.cache.variants:
 			avar = Raptor.cache.FindNamedVariant(engine)
 		else:
-			Raptor.Error("No settings found for build engine '%s'", engine)
-			return
+			raise BadMakeEngineException("'%s' does not appear to be a make engine - no settings found for it" % engine)
+
+		if not avar.isDerivedFrom("make_engine", Raptor.cache):
+			raise BadMakeEngineException("'%s' is not a build engine (it's a variant but it does not extend 'make_engine')" % engine)
 					
 		# find the variant and extract the values
 		try:
-			units = avar.GenerateBuildUnits()
+			units = avar.GenerateBuildUnits(Raptor.cache)
 			evaluator = Raptor.GetEvaluator( None, units[0] , gathertools=True)
 
 			# shell
@@ -75,6 +170,25 @@
 			self.jobsOption = evaluator.Get("jobs")
 			self.defaultMakeOptions = evaluator.Get("defaultoptions")
 
+			# Logging
+			#  copylogfromannofile means, for emake, that we should ignore 
+			# emake's console output and instead extract output from its annotation
+			# file.  This is a workaround for a problem where some emake
+			# console output is lost.  The annotation file has a copy of this
+			# output in the "parse" job and it turns out to be uncorrupted.
+			self.copyLogFromAnnoFile = (evaluator.Get("copylogfromannofile") == "true")
+			self.annoFileName = None
+
+			if self.copyLogFromAnnoFile:
+				for o in self.raptor.makeOptions:
+					self.annoFileName = string_following("--emake-annofile=", o)
+					if self.annoFileName:
+						self.raptor.Info("annofile: " + o)
+
+				if not self.annoFileName:
+					self.raptor.Info("Cannot copy log from annotation file as no annotation filename was specified via the option --mo=--emake-annofile=<filename>")
+					self.copyLogFromAnnoFile = False
+
 			# buffering
 			self.scrambled = (evaluator.Get("scrambled") == "true")
 
@@ -101,14 +215,13 @@
 				self.selectors = []
 
 		except KeyError:
-			Raptor.Error("Bad '%s' configuration found.", engine)
 			self.valid = False
-			return
+			raise BadMakeEngineException("Bad '%s' configuration found." % engine)
 
 		# there must at least be a build command...
 		if not self.buildCommand:
-				Raptor.Error("No build command for '%s'", engine)
 				self.valid = False
+			raise BadMakeEngineException("No build command for '%s'"% engine)
 
 
 		if self.usetalon:
@@ -123,7 +236,7 @@
  component='$$COMPONENT_NAME'\
  bldinf='$$COMPONENT_META' mmp='$$PROJECT_META'\
  config='$$SBS_CONFIGURATION' platform='$$PLATFORM'\
- phase='$$MAKEFILE_GROUP' source='$$SOURCE
+ phase='$$MAKEFILE_GROUP' source='$$SOURCE'
 export TALON_RECIPEATTRIBUTES TALON_SHELL TALON_TIMEOUT
 USE_TALON:=%s
 
@@ -135,7 +248,21 @@
 """
 		
 
+		timing_start = "$(info " + \
+				raptor_timing.Timing.custom_string(tag = "start",
+				object_type = "makefile", task = "parse",
+				key = "$(THIS_FILENAME)",
+				time="$(shell date +%s.%N)").rstrip("\n") + ")"
+				
+		timing_end = "$(info " + \
+				raptor_timing.Timing.custom_string(tag = "end",
+				object_type = "makefile", task = "parse",
+				key = "$(THIS_FILENAME)",
+				time="$(shell date +%s.%N)").rstrip("\n") + ")"
+
+
 		self.makefile_prologue = """
+
 # generated by %s %s
 
 HOSTPLATFORM:=%s
@@ -143,12 +270,13 @@
 OSTYPE:=%s
 FLMHOME:=%s
 SHELL:=%s
+THIS_FILENAME:=$(firstword $(MAKEFILE_LIST))
 
 %s
 
 include %s
 
-""" 		% (  raptor.name, raptor_version.Version(),
+""" 		% (  raptor.name, raptor_version.fullversion(),
 			 " ".join(raptor.hostplatform),
 			 raptor.hostplatform_dir,
 			 self.raptor.filesystem,
@@ -157,8 +285,32 @@
 			 talon_settings,
 			 self.raptor.systemFLM.Append('globals.mk') )
 
+		# Unless dependency processing has been eschewed via the CLI, use a .DEFAULT target to
+		# trap missing dependencies (ignoring user config files that we know are usually absent)
+		if not (self.raptor.noDependGenerate or self.raptor.noDependInclude):
+			self.makefile_prologue += """
+
+$(FLMHOME)/user/final.mk:
+$(FLMHOME)/user/default.flm:
+$(FLMHOME)/user/globals.mk:
+
+.DEFAULT::
+	@echo "<warning>Missing dependency detected: $@</warning>"
 
-		self.makefile_epilogue = """
+"""
+
+		# Only output timings if requested on CLI
+		if self.raptor.timing:
+			self.makefile_prologue += "\n# Print Start-time of Makefile parsing\n" \
+					+ timing_start + "\n\n"
+	
+	
+			self.makefile_epilogue = "\n\n# Print End-time of Makefile parsing\n" \
+				+ timing_end + "\n"
+		else:
+			self.makefile_epilogue = ""
+
+		self.makefile_epilogue += """
 
 include %s
 
@@ -168,14 +320,17 @@
 		"""Generate a set of makefiles, or one big Makefile."""
 
 		if not self.valid:
-			return
+			return None
+
+		self.raptor.Debug("Writing Makefile '%s'" % (str(toplevel)))
 
 		self.toplevel = toplevel
 
 		# create the top-level makefiles
+		makefileset = None
 
 		try:
-			self.makefileset = MakefileSet(directory = str(toplevel.Dir()),
+			makefileset = MakefileSet(directory = str(toplevel.Dir()),
 										   selectors = self.selectors,
 										   filenamebase = str(toplevel.File()),
 										   prologue = self.makefile_prologue,
@@ -190,11 +345,10 @@
 			self.many = not self.raptor.writeSingleMakefile
 
 			# add a makefile for each spec under each config
-			config_makefileset = self.makefileset
-
+			config_makefileset = makefileset
 			for c in configs:
 				if self.many:
-					config_makefileset = self.makefileset.createChild(c.name)
+					config_makefileset = makefileset.createChild(c.name)
 
 				# make sure the config_wide spec item is put out first so that it
 				# can affect everything.
@@ -207,16 +361,22 @@
 						ordered_specs.append(s)
 
 				if config_wide_spec is not None:
-					config_wide_spec.Configure(c)
+					config_wide_spec.Configure(c, cache = self.raptor.cache)
 					self.WriteConfiguredSpec(config_makefileset, config_wide_spec, c, True)
 
 				for s in ordered_specs:
-					s.Configure(c)
+					s.Configure(c, cache = self.raptor.cache)
 					self.WriteConfiguredSpec(config_makefileset, s, c, False)
 
-			self.makefileset.close()
+			makefileset.close()
 		except Exception,e:
-			self.raptor.Error("Failed to write makefile '%s': %s" % (str(toplevel),str(e)))
+			tb = traceback.format_exc()
+			if not self.raptor.debugOutput:
+				tb=""
+			self.raptor.Error("Failed to write makefile '%s': %s : %s" % (str(toplevel),str(e),tb))
+			makefileset = None
+
+		return makefileset
 
 
 	def WriteConfiguredSpec(self, parentMakefileSet, spec, config, useAllInterfaces):
@@ -233,9 +393,10 @@
 		guard = None
 		if hasInterface:
 			# find the Interface (it may be a ref)
-			iface = spec.GetInterface()
+			try:
+				iface = spec.GetInterface(self.raptor.cache)
 
-			if iface == None:
+			except raptor_data.MissingInterfaceError, e:	
 				self.raptor.Error("No interface for '%s'", spec.name)
 				return
 
@@ -268,12 +429,12 @@
 				md5hash.update(value)
 
 			# parameters required by the interface
-			for p in iface.GetParams():
+			for p in iface.GetParams(self.raptor.cache):
 				val = evaluator.Resolve(p.name)
 				addparam(p.name,val,p.default)
 
 			# Use Patterns to fetch a group of parameters
-			for g in iface.GetParamGroups():
+			for g in iface.GetParamGroups(self.raptor.cache):
 				for k,v in evaluator.ResolveMatching(g.patternre):
 					addparam(k,v,g.default)
 
@@ -301,7 +462,7 @@
 
 		# generate the call to the FLM
 		if iface is not None:
-			makefileset.addCall(spec.name, config.name, iface.name, useAllInterfaces, iface.GetFLMIncludePath(), parameters, guard)
+			makefileset.addCall(spec.name, config.name, iface.name, useAllInterfaces, iface.GetFLMIncludePath(self.raptor.cache), parameters, guard)
 
 		# recursive includes
 
@@ -341,7 +502,7 @@
 				return False
 
 		# Save file names to a list, to allow the order to be reversed
-		fileName_list = list(self.makefileset.makefileNames())
+		fileName_list = list(makefileset.makefileNames())
 
 		# Iterate through args passed to raptor, searching for CLEAN or REALLYCLEAN
 		clean_flag = False
@@ -354,6 +515,9 @@
 		if clean_flag:
 			fileName_list.reverse()
 
+		# Report number of makefiles to be built
+		self.raptor.InfoDiscovery(object_type = "makefile", count = len(fileName_list))
+
 		# Process each file in turn
 		for makefile in fileName_list:
 			if not os.path.exists(makefile):
@@ -364,7 +528,7 @@
 			command = self.buildCommand
 
 			if self.makefileOption:
-				command += " " + self.makefileOption + " " + '"' + str(makefile) + '"'
+				command += " " + self.makefileOption + " " + ' "' + str(makefile) + '" '
 
 			if self.raptor.keepGoing and self.keepGoingOption:
 				command += " " + self.keepGoingOption
@@ -377,12 +541,20 @@
 			command += " " + self.defaultMakeOptions
 			# Can supply options on the commandline to override default settings.
 			if len(self.raptor.makeOptions) > 0:
-				command += " " + " ".join(self.raptor.makeOptions)
+				for o in self.raptor.makeOptions:
+					if o.find(";") != -1 or  o.find("\\") != -1:
+						command += "  " + "'" + o + "'"
+					else:
+						command += "  " + o
 
 			# Switch off dependency file including?
-			if self.raptor.noDependInclude:
+			if self.raptor.noDependInclude or self.raptor.noDependGenerate:
 				command += " NO_DEPEND_INCLUDE=1"
 			
+			# Switch off dependency file generation (and, implicitly, inclusion)?
+			if self.raptor.noDependGenerate:
+				command += " NO_DEPEND_GENERATE=1"
+			
 			if self.usetalon:
 				# use the descrambler if we set it up
 				command += ' TALON_DESCRAMBLE=' 
@@ -401,7 +573,7 @@
 
 			# targets go at the end, if the makefile supports them
 			addTargets = self.raptor.targets[:]
-			ignoreTargets = self.makefileset.ignoreTargets(makefile)
+			ignoreTargets = makefileset.ignoreTargets(makefile)
 			if addTargets and ignoreTargets:
 				for target in self.raptor.targets:
 					if re.match(ignoreTargets, target):
@@ -410,6 +582,23 @@
 			if addTargets:
 				command += " " + " ".join(addTargets)
 
+			# Send stderr to a file so that it can't mess up the log (e.g.
+			# clock skew messages from some build engines scatter their
+			# output across our xml.
+			stderrfilename = makefile+'.stderr'
+			stdoutfilename = makefile+'.stdout'
+			command += " 2>'%s' " % stderrfilename
+
+			# Keep a copy of the stdout too in the case of using the 
+			# annofile - so that we can trap the problem that
+			# makes the copy-log-from-annofile workaround necessary
+			# and perhaps determine when we can remove it.
+			if self.copyLogFromAnnoFile:
+				command += " >'%s' " % stdoutfilename
+
+			# Substitute the makefile name for any occurrence of #MAKEFILE#
+			command = command.replace("#MAKEFILE#", str(makefile))
+
 			self.raptor.Info("Executing '%s'", command)
 
 			# execute the build.
@@ -417,6 +606,10 @@
 			# bufsize=1 means "line buffered"
 			#
 			try:
+				# Time the build
+				self.raptor.InfoStartTime(object_type = "makefile",
+						task = "build", key = str(makefile))
+				
 				makeenv=os.environ.copy()
 				if self.usetalon:
 					makeenv['TALON_RECIPEATTRIBUTES']="none"
@@ -423,28 +616,55 @@
 					makeenv['TALON_SHELL']=self.talonshell
 					makeenv['TALON_BUILDID']=str(self.buildID)
 					makeenv['TALON_TIMEOUT']=str(self.talontimeout)
+
 				if self.raptor.filesystem == "unix":
-					p = subprocess.Popen(command, bufsize=65535,
+					p = subprocess.Popen([command], bufsize=65535,
 									     stdout=subprocess.PIPE,
 									     stderr=subprocess.STDOUT,
 									     close_fds=True, env=makeenv, shell=True)
 				else:
-					p = subprocess.Popen(command, bufsize=65535,
+					p = subprocess.Popen(args = 
+						[raptor_data.ToolSet.shell, '-c', command],
+						bufsize=65535,
 									     stdout=subprocess.PIPE,
 									     stderr=subprocess.STDOUT,
+						shell = False,
 									     universal_newlines=True, env=makeenv)
 				stream = p.stdout
 
+				inRecipe = False
 
-				line = " "
-				while line:
-					line = stream.readline()
-					self.raptor.out.write(line)
+				if not self.copyLogFromAnnoFile:
+					for l in XMLEscapeLog(stream):
+						self.raptor.out.write(l)
 
-				# should be done now
 				returncode = p.wait()
+				else:
+					returncode = p.wait()
+
+					annofilename = self.annoFileName.replace("#MAKEFILE#", makefile)
+					self.raptor.Info("copylogfromannofile: Copying log from annotation file %s to work around a potential problem with the console output", annofilename)
+					try:
+						for l in XMLEscapeLog(AnnoFileParseOutput(annofilename)):
+							self.raptor.out.write(l)
+					except Exception,e:
+						self.raptor.Error("Couldn't complete stdout output from annofile %s for %s - '%s'", annofilename, command, str(e))
 
 
+				# Take all the stderr output that went into the .stderr file
+				# and put it back into the log, but safely so it can't mess up
+				# xml parsers.
+				try:
+					e = open(stderrfilename,"r")
+					for line in e:
+						self.raptor.out.write(escape(line))
+					e.close()
+				except Exception,e:
+					self.raptor.Error("Couldn't complete stderr output for %s - '%s'", command, str(e))
+				# Report end-time of the build
+				self.raptor.InfoEndTime(object_type = "makefile",
+						task = "build", key = str(makefile))
+
 				if returncode != 0  and not self.raptor.keepGoing:
 					self.Tidy()
 					return False
@@ -452,6 +672,9 @@
 			except Exception,e:
 				self.raptor.Error("Exception '%s' during '%s'", str(e), command)
 				self.Tidy()
+				# Still report end-time of the build
+				self.raptor.InfoEndTime(object_type = "Building", task = "Makefile",
+						key = str(makefile))
 				return False
 
 		# run any shutdown script
@@ -496,7 +719,7 @@
 			looking = (os.system(command) != 0)
 			tries += 1
 		if looking:
-			self.raptor.Error("Failed to initilaise the talon shell for this build")
+			self.raptor.Error("Failed to initialise the talon shell for this build")
 			self.talonctl = ""
 			return False
 		
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
@@ -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"
@@ -31,6 +31,7 @@
 import generic_path
 import subprocess
 import zipfile
+from xml.sax.saxutils import escape
 from mmpparser import *
 
 import time
@@ -232,6 +233,19 @@
 	return commentDetail
 
 
+def getSpecName(aFileRoot, fullPath=False):
+	"""Returns a build spec name: this is the file root (full path
+	or simple file name) made safe for use as a file name."""
+
+	if fullPath:
+		specName = str(aFileRoot).replace("/","_")
+		specName = specName.replace(":","")
+	else:
+		specName = aFileRoot.File()
+
+	return specName.lower()
+
+
 # Classes
 
 class MetaDataError(Exception):
@@ -284,9 +298,8 @@
 	def call(self, aArgs, sourcefilename):
 		""" Override call so that we can do our own error handling."""
 		tool = self._ExternalTool__Tool
-		try:
 			commandline = tool + " " + aArgs + " " + str(sourcefilename)
-
+		try:
 			# the actual call differs between Windows and Unix
 			if raptor_utilities.getOSFileSystem() == "unix":
 				p = subprocess.Popen(commandline, \
@@ -332,7 +345,7 @@
 				raise MetaDataError("Errors in %s" % str(sourcefilename))
 
 		except Exception,e:
-			raise MetaDataError("Preprocessor exception: %s" % str(e))
+			raise MetaDataError("Preprocessor exception: '%s' : in command : '%s'" % (str(e), commandline))
 
 		return 0	# all OK
 
@@ -398,11 +411,13 @@
 	on the selected build platform.  This class provides a generic means of wrapping
 	up the preprocessing of such files."""
 
-	def __init__(self, aFilename, gnucpp, aRootLocation=None, log=None):
+	def __init__(self, aFilename, gnucpp, depfiles, aRootLocation=None, log=None):
 		"""
 		@param aFilename	An MMP, bld.inf or other preprocessable build spec file
 		@param aDefaultPlatform  Default preprocessed version of this file
 		@param aCPP 		location of GNU CPP
+		@param depfiles     	list to add dependency file tuples to
+		@param aRootLocation    where the file is 
 		@param log 		A class with Debug(<string>), Info(<string>) and Error(<string>) methods
 		"""
 		self.filename = aFilename
@@ -410,6 +425,7 @@
 		# Dictionary with key of build platform and a text string of processed output as values
 		self.__PreProcessedContent = {}
 		self.log = log
+		self.depfiles = depfiles
 
 		self.__gnucpp = gnucpp
 		if gnucpp is None:
@@ -436,7 +452,7 @@
 			else:
 				metatarget = "'$(PARSETARGET)'"
 			generateDepsOptions = "-MD -MF%s -MT%s" % (adepfilename, metatarget)
-			aBuildPlatform['METADEPS'].append((adepfilename, metatarget))
+			self.depfiles.append((adepfilename, metatarget))
 			try:
 				os.makedirs(os.path.dirname(adepfilename))
 			except Exception, e:
@@ -515,15 +531,17 @@
 	on the selected build platform.  This class provides a generic means of wrapping
 	up the preprocessing of such files."""
 
-	def __init__(self, aFilename, gnucpp, bldinf, log=None):
+	def __init__(self, aFilename, gnucpp, bldinf, depfiles, log=None):
 		"""
 		@param aFilename	An MMP, bld.inf or other preprocessable build spec file
 		@param gnucpp 		location of GNU CPP
-		@param bldinf   	the bldinf file that this mmp comes from
+		@param bldinf		the bld.inf file this mmp was specified in
+		@param depfiles         list to fill with mmp dependency files
 		@param log 			A class with Debug(<string>), Info(<string>) and Error(<string>) methods
 		"""
-		super(MMPFile, self).__init__(aFilename, gnucpp, str(bldinf.filename.Dir()), log)
+		super(MMPFile, self).__init__(aFilename, gnucpp, depfiles, str(bldinf.filename.Dir()),  log)
 		self.__bldinf = bldinf
+		self.depfiles = depfiles
 
 		self.__gnucpp = gnucpp
 		if gnucpp is None:
@@ -878,8 +896,8 @@
 class BldInfFile(MetaDataFile):
 	"""Representation of a Symbian bld.inf file"""
 
-	def __init__(self, aFilename, gnucpp, log=None):
-		MetaDataFile.__init__(self, aFilename, gnucpp, None, log)
+	def __init__(self, aFilename, gnucpp, depfiles, log=None):
+		MetaDataFile.__init__(self, aFilename, gnucpp, depfiles, None, log)
 		self.__Raptor = log
 		self.testManual = 0
 		self.testAuto = 0
@@ -1194,7 +1212,9 @@
 		super(MMPRaptorBackend,self).__init__()
 		self.platformblock = None
 		self.__Raptor = aRaptor
-		self.BuildVariant = raptor_data.Variant()
+		self.__debug("-----+++++ %s " % aMmpfilename)
+		self.BuildVariant = raptor_data.Variant(name = "mmp")
+		self.ApplyVariants = []
 		self.ResourceVariants = []
 		self.BitmapVariants = []
 		self.StringTableVariants = []
@@ -1208,11 +1228,12 @@
 		self.__systeminclude = ""
 		self.__bitmapSourcepath = self.__sourcepath
 		self.__current_resource = ""
-		self.__capabilities = []
 		self.__resourceFiles = []
 		self.__pageConflict = []
 		self.__debuggable = ""
+		self.__compressionKeyword = ""
 		self.sources = []
+		self.capabilities = []
 
 		self.__TARGET = ""
 		self.__TARGETEXT = ""
@@ -1283,16 +1304,15 @@
 		elif varname == 'PAGED':
 			self.BuildVariant.AddOperation(raptor_data.Set(varname, "1"))
 			self.__debug( "Set switch PAGE ON")
+			# PAGED is equivalent to PAGEDCODE
 			self.BuildVariant.AddOperation(raptor_data.Set("PAGEDCODE_OPTION", "paged"))
 			self.__debug( "Set switch PAGEDCODE ON")
-			self.BuildVariant.AddOperation(raptor_data.Set("PAGEDDATA_OPTION", "paged"))
-			self.__debug( "Set data PAGEDDATA ON")
 			self.__pageConflict.append("PAGEDCODE")
-			self.__pageConflict.append("PAGEDDATA")
 
 		elif varname == 'UNPAGED':
 			self.BuildVariant.AddOperation(raptor_data.Set("PAGED", "0"))
 			self.__debug( "Set switch PAGED OFF")
+			# UNPAGED is equivalent to UNPAGEDCODE *and* UNPAGEDDATA
 			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 @@
 			self.BuildVariant.AddOperation(raptor_data.Set("PAGEDCODE_OPTION", "unpaged"))
 			self.__debug( "Set switch " + varname + " ON")
 			self.__pageConflict.append(varname)
+			
 		elif varname == 'UNPAGEDDATA':
 			self.BuildVariant.AddOperation(raptor_data.Set("PAGEDDATA_OPTION", "unpaged"))
 			self.__debug( "Set switch " + varname + " ON")
@@ -1322,6 +1343,7 @@
 		elif varname == 'NOLINKTIMECODEGENERATION':
 			self.BuildVariant.AddOperation(raptor_data.Set("LTCG",""))
 			self.__debug( "Set switch " + varname + " OFF")
+			
 		elif varname == 'NOMULTIFILECOMPILATION':
 			self.BuildVariant.AddOperation(raptor_data.Set("MULTIFILE_ENABLED",""))
 			self.__debug( "Set switch " + varname + " OFF")
@@ -1331,13 +1353,19 @@
 				self.__debuggable = "udeb urel"
 			else:
 				self.__Raptor.Warn("DEBUGGABLE keyword ignored as DEBUGGABLE_UDEBONLY is already specified")
+		
 		elif varname == 'DEBUGGABLE_UDEBONLY':
 			if self.__debuggable != "":
 				self.__Raptor.Warn("DEBUGGABLE keyword has no effect as DEBUGGABLE or DEBUGGABLE_UDEBONLY is already set")
 			self.__debuggable = "udeb"
+		
 		elif varname == 'FEATUREVARIANT':
 			self.BuildVariant.AddOperation(raptor_data.Set(varname,"1"))
 			self.featureVariant = True
+		
+		elif varname in ['COMPRESSTARGET', 'NOCOMPRESSTARGET', 'INFLATECOMPRESSTARGET', 'BYTEPAIRCOMPRESSTARGET']:
+			self.resolveCompressionKeyword(varname)
+		
 		else:
 			self.__debug( "Set switch "+toks[0]+" ON")
 			self.BuildVariant.AddOperation(raptor_data.Set(prefix+varname, "1"))
@@ -1423,9 +1451,12 @@
 
 		elif varname=='CAPABILITY':
 			for cap in toks[1]:
-				self.BuildVariant.AddOperation(raptor_data.Append(varname,cap," "))
+				cap = cap.lower()
 				self.__debug("Setting  "+toks[0]+": " + cap)
-				self.__capabilities.append(cap.lower())
+				if not cap.startswith("-"):
+					if not cap.startswith("+"):
+						cap = "+" + cap	
+				self.capabilities.append(cap)
 		elif varname=='DEFFILE':
 			self.__defFileRoot = self.__currentMmpFile
 			self.deffile = toks[1]
@@ -1450,8 +1481,10 @@
 
 				# add in the minor number
 				minor = 0
-				if len(version) >  1:
+				if version[1] is not None:
 					minor = int(version[2],10)
+				else:
+					self.__Raptor.Warn("VERSION (%s) missing '.minor' in %s, using '.0'" % (toks[1],self.__currentMmpFile))
 
 				self.__versionhex = "%04x%04x" % (major, minor)
 				self.BuildVariant.AddOperation(raptor_data.Set(varname, "%d.%d" %(major, minor)))
@@ -1517,7 +1550,8 @@
 					toks1 = re.sub("[,'\[\]]", "", toks1).replace("//","/")
 				self.__debug("Set "+toks[0]+" to " + toks1)
 				self.BuildVariant.AddOperation(raptor_data.Set(varname,toks1))
-
+		elif varname=='APPLY':
+			self.ApplyVariants.append(toks[1])
 		else:
 			self.__debug("Set "+toks[0]+" to " + str(toks[1]))
 			self.BuildVariant.AddOperation(raptor_data.Set(varname,"".join(toks[1])))
@@ -1687,7 +1721,7 @@
 	def getDefaultResourceTargetPath(self, targettype):
 		# the different default TARGETPATH values should come from the
 		# configuration rather than being hard-coded here.
-		if targettype == "plugin":
+		if targettype in ["plugin", "plugin3"]:
 			return "resource/plugins"
 		if targettype == "pdl":
 			return "resource/printers"
@@ -1884,7 +1918,7 @@
 		self.__currentLineNumber += 1
 		self.__debug("Start BITMAP "+toks[1])
 
-		self.__currentBitmapVariant = raptor_data.Variant(toks[1].replace('.','_'))
+		self.__currentBitmapVariant = raptor_data.Variant(name = toks[1].replace('.','_'))
 		# Use BMTARGET and BMTARGET_lower because that prevents
 		# confusion with the TARGET and TARGET_lower of our parent MMP
 		# when setting the OUTPUTPATH.  This in turn allows us to
@@ -1974,7 +2008,7 @@
 		self.__debug("stringtable: " + toks[1])
 		self.__debug("adjusted stringtable source=" + source)
 
-		self.__currentStringTableVariant = raptor_data.Variant(uniqname)
+		self.__currentStringTableVariant = raptor_data.Variant(name = uniqname)
 		self.__currentStringTableVariant.AddOperation(raptor_data.Set("SOURCE", source))
 		self.__currentStringTableVariant.AddOperation(raptor_data.Set("EXPORTPATH", ""))
 		self.__stringtableExported = False
@@ -2142,6 +2176,9 @@
 		self.BuildVariant.AddOperation(raptor_data.Set("DEFFILEKEYWORD", deffile_keyword))
 		self.__debug("Set DEFFILEKEYWORD to '%s'",deffile_keyword)
 
+		# If target type is "implib" it must have a def file
+		self.checkImplibDefFile(resolvedDefFile)
+
 		# 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 @@
 			self.ResourceVariants[i].AddOperation(raptor_data.Set("MAIN_TARGET_lower", self.__TARGET.lower()))
 			self.ResourceVariants[i].AddOperation(raptor_data.Set("MAIN_REQUESTEDTARGETEXT", self.__TARGETEXT.lower()))
 
+		# Create Capability variable in one SET operation (more efficient than multiple appends)
+		
+		self.BuildVariant.AddOperation(raptor_data.Set("CAPABILITY","".join(self.capabilities)))
+
 		# Resolve combined capabilities as hex flags, for configurations that require them
 		capabilityFlag1 = 0
 		capabilityFlag2 = 0			# Always 0
 
-		for capability in self.__capabilities:
+		for capability in self.capabilities:
 			invert = 0
 
 			if capability.startswith('-'):
 				invert = 0xffffffff
-				capability = capability.lstrip('-')
+			capability = capability[1:]
 
 			if MMPRaptorBackend.supportedCapabilities.has_key(capability):
 				capabilityFlag1 = capabilityFlag1 ^ invert
@@ -2205,12 +2246,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)
+					if x == "PAGEDCODE":
+						self.resolveCompressionKeyword("BYTEPAIRCOMPRESSTARGET")
 					break
+		elif "PAGEDCODE" in self.__pageConflict:
+			self.resolveCompressionKeyword("BYTEPAIRCOMPRESSTARGET")
+				
 		if "PAGEDDATA" in self.__pageConflict and "UNPAGEDDATA" in self.__pageConflict:
 			for x in self.__pageConflict:
 				if x == "PAGEDDATA" or x == "UNPAGEDDATA":
 					self.__Raptor.Warn("Both PAGEDDATA and UNPAGEDDATA are specified. The last one %s will take effect" % x)
+					if x == "PAGEDDATA":
+						self.resolveCompressionKeyword("BYTEPAIRCOMPRESSTARGET")
 					break
+		elif "PAGEDDATA" in self.__pageConflict:
+			self.resolveCompressionKeyword("BYTEPAIRCOMPRESSTARGET")
 
 		# Set Debuggable
 		self.BuildVariant.AddOperation(raptor_data.Set("DEBUGGABLE", self.__debuggable))
@@ -2229,6 +2279,27 @@
 		"""Target type in lower case - the standard format"""
 		return self.__targettype.lower()
 
+	def resolveCompressionKeyword(self, aCompressionKeyword):
+		"""If a compression keyword is set more than once either explicitly
+		or implicitly a warning is given and the last one takes effect 
+		"""
+		if self.__compressionKeyword and self.__compressionKeyword != aCompressionKeyword:
+			self.__Raptor.Warn("%s keyword in %s overrides earlier use of %s" % \
+						(aCompressionKeyword, self.__currentMmpFile, self.__compressionKeyword))
+			self.BuildVariant.AddOperation(raptor_data.Set(self.__compressionKeyword, ""))
+			self.__debug( "Set switch " + self.__compressionKeyword + " OFF")
+		self.BuildVariant.AddOperation(raptor_data.Set(aCompressionKeyword,"1"))
+		self.__debug( "Set switch " + aCompressionKeyword + " ON")
+		self.__compressionKeyword = aCompressionKeyword
+
+	def checkImplibDefFile(self, defFile):
+		"""Project with target type implib must have DEFFILE defined 
+		explicitly or implicitly, otherwise it is an error
+		""" 
+		if self.getTargetType() == 'implib' and defFile == '':
+			self.__Raptor.Error("No DEF File for IMPLIB target type in " + \
+							self.__currentMmpFile, bldinf=self.__bldInfFilename)
+
 	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 @@
 		return resolvedDefFile
 
 
+def CheckedGet(self, key, default = None):
+	"""extract a value from an self and raise an exception if None.
+
+	An optional default can be set to replace a None value.
+
+	This function belongs in the Evaluator class logically. But
+	Evaluator doesn't know how to raise a Metadata error. Since
+	being able to raise a metadata error is the whole point of
+	the method, it makes sense to adapt the Evaluator class from
+	raptor_meta for the use of everything inside raptor_meta.
+
+	... so it will be added to the Evaluator class.
+	"""
+
+	value = self.Get(key)
+	if value == None:
+		if default == None:
+			raise MetaDataError("configuration " + self.buildUnit.name +
+							    " has no variable " + key)
+		else:
+			return default
+	return value
+
+raptor_data.Evaluator.CheckedGet = CheckedGet 
+
+
 class MetaReader(object):
 	"""Entry point class for Symbian metadata processing.
 
@@ -2299,10 +2396,10 @@
 		# Get the version of CPP that we are using
 		metadata = self.__Raptor.cache.FindNamedVariant("meta")
 		evaluator = self.__Raptor.GetEvaluator(None, raptor_data.BuildUnit(metadata.name, [metadata]) )
-		self.__gnucpp = self.CheckValue(evaluator, "GNUCPP")
-		self.__defaultplatforms = self.CheckValue(evaluator, "DEFAULT_PLATFORMS")
-		self.__basedefaultplatforms = self.CheckValue(evaluator, "BASE_DEFAULT_PLATFORMS")
-		self.__baseuserdefaultplatforms = self.CheckValue(evaluator, "BASE_USER_DEFAULT_PLATFORMS")
+		self.__gnucpp = evaluator.CheckedGet("GNUCPP")
+		self.__defaultplatforms = evaluator.CheckedGet("DEFAULT_PLATFORMS")
+		self.__basedefaultplatforms = evaluator.CheckedGet("BASE_DEFAULT_PLATFORMS")
+		self.__baseuserdefaultplatforms = evaluator.CheckedGet("BASE_USER_DEFAULT_PLATFORMS")
 
 		# Only read each variant.cfg once
 		variantCfgs = {}
@@ -2321,24 +2418,35 @@
 		# with the same "export platform".
 		exports = {}
 
-		for buildConfig in configsToBuild:
+		# We sort configurations by name here.  This is solely to deal with situations
+		# where macros linked to builds end up being used in preprocessor conditionals
+		# within bld.inf files that then wrap exports under PRJ_EXPORTS statements.
+		# Having exports that are conditional on these macros isn't supported, but
+		# as there are areas of the source base that make this assumption, and
+		# fail if emulator macros are used instead of arm ones, we ensure that arm
+		# configurations come first when multiple configurations are active, and so are
+		# used first for determining exports.
+		sortedConfigsToBuild = sorted(configsToBuild,key=lambda config: config.name)
+
+		self.__Raptor.Debug("MetaReader: sortedConfigsToBuild:  %s", [b.name for b in sortedConfigsToBuild])
+		for buildConfig in sortedConfigsToBuild:
 			# get everything we need to know about the configuration
 			evaluator = self.__Raptor.GetEvaluator(None, buildConfig)
 
 			detail = {}
-			detail['PLATFORM'] = self.CheckValue(evaluator, "TRADITIONAL_PLATFORM")
-			epocroot = self.CheckValue(evaluator, "EPOCROOT")
+			detail['PLATFORM'] = evaluator.CheckedGet("TRADITIONAL_PLATFORM")
+			epocroot = evaluator.CheckedGet("EPOCROOT")
 			detail['EPOCROOT'] = generic_path.Path(epocroot)
 
-			sbs_build_dir = self.CheckValue(evaluator, "SBS_BUILD_DIR")
+			sbs_build_dir = evaluator.CheckedGet("SBS_BUILD_DIR")
 			detail['SBS_BUILD_DIR'] = generic_path.Path(sbs_build_dir)
-			flm_export_dir = self.CheckValue(evaluator, "FLM_EXPORT_DIR")
+			flm_export_dir = evaluator.CheckedGet("FLM_EXPORT_DIR")
 			detail['FLM_EXPORT_DIR'] = generic_path.Path(flm_export_dir)
 			detail['CACHEID'] = flm_export_dir
 			if raptor_utilities.getOSPlatform().startswith("win"):
-				detail['PLATMACROS'] = self.CheckValue(evaluator,"PLATMACROS.WINDOWS")
+				detail['PLATMACROS'] = evaluator.CheckedGet("PLATMACROS.WINDOWS")
 			else:
-				detail['PLATMACROS'] = self.CheckValue(evaluator,"PLATMACROS.LINUX")
+				detail['PLATMACROS'] = evaluator.CheckedGet("PLATMACROS.LINUX")
 
 			# Apply OS variant provided we are not ignoring this
 			if not self.__Raptor.ignoreOsDetection:
@@ -2350,11 +2458,11 @@
 			# is this a feature variant config or an ordinary variant
 			fv = evaluator.Get("FEATUREVARIANTNAME")
 			if fv:
-				variantHdr = self.CheckValue(evaluator, "VARIANT_HRH")
+				variantHdr = evaluator.CheckedGet("VARIANT_HRH")
 				variantHRH = generic_path.Path(variantHdr)
 				detail['ISFEATUREVARIANT'] = True
 			else:
-				variantCfg = self.CheckValue(evaluator, "VARIANT_CFG")
+				variantCfg = evaluator.CheckedGet("VARIANT_CFG")
 				variantCfg = generic_path.Path(variantCfg)
 				if not variantCfg in variantCfgs:
 					# get VARIANT_HRH from the variant.cfg file
@@ -2369,19 +2477,18 @@
 
 			detail['VARIANT_HRH'] = variantHRH
 			self.__Raptor.Info("'%s' uses variant hrh file '%s'", buildConfig.name, variantHRH)
-			detail['SYSTEMINCLUDE'] = self.CheckValue(evaluator, "SYSTEMINCLUDE")
+			detail['SYSTEMINCLUDE'] = evaluator.CheckedGet("SYSTEMINCLUDE")
 
-			detail['METADEPS'] = [] # Dependency targets for all metadata files in this platform
 
 			# find all the interface names we need
-			ifaceTypes = self.CheckValue(evaluator, "INTERFACE_TYPES")
+			ifaceTypes = evaluator.CheckedGet("INTERFACE_TYPES")
 			interfaces = ifaceTypes.split()
 
 			for iface in interfaces:
-				detail[iface] = self.CheckValue(evaluator, "INTERFACE." + iface)
+				detail[iface] = evaluator.CheckedGet("INTERFACE." + iface)
 
 			# not test code unless positively specified
-			detail['TESTCODE'] = self.CheckValue(evaluator, "TESTCODE", "")
+			detail['TESTCODE'] = evaluator.CheckedGet("TESTCODE", "")
 
 			# make a key that identifies this platform uniquely
 			# - used to tell us whether we have done the pre-processing
@@ -2390,7 +2497,8 @@
 			key = str(detail['VARIANT_HRH']) \
 			 	+ str(detail['EPOCROOT']) \
 		    	+ detail['SYSTEMINCLUDE'] \
-		    	+ detail['PLATFORM']
+		    	+ detail['PLATFORM'] \
+		    	+ detail['PLATMACROS']
 
 		    # Keep a short version of the key for use in filenames.
 			uniq = hashlib.md5()
@@ -2426,11 +2534,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.
-			items = ['PLATFORM', 'EPOCROOT', 'VARIANT_HRH', 'SYSTEMINCLUDE', 'TESTCODE']
-			if raptor_utilities.getOSPlatform().startswith("win"):
-				items.append('PLATMACROS.WINDOWS')
-			else:
-				items.append('PLATMACROS.LINUX')
+			items = ['PLATFORM', 'PLATMACROS', 'EPOCROOT', 'VARIANT_HRH', 'SYSTEMINCLUDE', 'TESTCODE']
 
 			items.extend(interfaces)
 			platform = ""
@@ -2452,20 +2556,8 @@
 		# that are supposedly platform independent (e.g. PRJ_PLATFORMS)
 		self.defaultPlatform = self.ExportPlatforms[0]
 
-	def CheckValue(self, evaluator, key, default = None):
-		"""extract a value from an evaluator and raise an exception if None.
-
-		An optional default can be set to replace a None value."""
-		value = evaluator.Get(key)
-		if value == None:
-			if default == None:
-				raise MetaDataError("configuration " + evaluator.config.name +
-								    " has no variable " + key)
-			else:
-				return default
-		return value
 
-	def ReadBldInfFiles(self, aFileList, doExportOnly):
+	def ReadBldInfFiles(self, aComponentList, doexport, dobuild = True):
 		"""Take a list of bld.inf files and return a list of build specs.
 
 		The returned specification nodes will be suitable for all the build
@@ -2475,7 +2567,7 @@
 		# we need a Filter node per export platform
 		exportNodes = []
 		for i,ep in enumerate(self.ExportPlatforms):
-			filter = raptor_data.Filter("export_" + str(i))
+			filter = raptor_data.Filter(name = "export_" + str(i))
 
 			# what configurations is this node active for?
 			for config in ep['configs']:
@@ -2486,7 +2578,7 @@
 		# we need a Filter node per build platform
 		platformNodes = []
 		for i,bp in enumerate(self.BuildPlatforms):
-			filter = raptor_data.Filter("build_" + str(i))
+			filter = raptor_data.Filter(name = "build_" + str(i))
 
 			# what configurations is this node active for?
 			for config in bp['configs']:
@@ -2502,18 +2594,18 @@
 
 		# check that each bld.inf exists and add a Specification node for it
 		# to the nodes of the export and build platforms that it supports.
-		for bif in aFileList:
-			if bif.isFile():
-				self.__Raptor.Info("Processing %s", str(bif))
+		for c in aComponentList:
+			if c.bldinf_filename.isFile():
+				self.__Raptor.Info("Processing %s", str(c.bldinf_filename))
 				try:
-					self.AddComponentNodes(bif, exportNodes, platformNodes)
+					self.AddComponentNodes(c, exportNodes, platformNodes)
 
 				except MetaDataError, e:
-					self.__Raptor.Error(e.Text, bldinf=str(bif))
+					self.__Raptor.Error(e.Text, bldinf=str(c.bldinf_filename))
 					if not self.__Raptor.keepGoing:
 						return []
 			else:
-				self.__Raptor.Error("build info file does not exist", bldinf=str(bif))
+				self.__Raptor.Error("build info file does not exist", bldinf=str(c.bldinf_filename))
 				if not self.__Raptor.keepGoing:
 					return []
 
@@ -2545,6 +2637,7 @@
 		# before we can do anything else (because raptor itself must do
 		# some exports before the MMP files that include them can be
 		# processed).
+		if doexport:
 		for i,p in enumerate(exportNodes):
 			exportPlatform = self.ExportPlatforms[i]
 			for s in p.GetChildSpecs():
@@ -2555,10 +2648,12 @@
 					self.__Raptor.Error("%s",e.Text)
 					if not self.__Raptor.keepGoing:
 						return []
+		else:
+			self.__Raptor.Info("Not Processing Exports (--noexport enabled)")
 
 		# this is a switch to return the function at this point if export
 		# only option is specified in the run
-		if (self.__Raptor.doExportOnly):
+		if dobuild is not True:
 			self.__Raptor.Info("Processing Exports only")
 			return[]
 
@@ -2601,8 +2696,8 @@
 
 		def LeftPortionOf(pth,sep):
 			""" Internal function to return portion of str that is to the left of sep. 
-			The partition is case-insentive."""
-			length = len((pth.lower().partition(sep.lower()))[0])
+			The split is case-insensitive."""
+			length = len((pth.lower().split(sep.lower()))[0])
 			return pth[0:length]
 			
 		modulePath = LeftPortionOf(LeftPortionOf(os.path.dirname(aBldInfPath), "group"), "ongoing")
@@ -2615,37 +2710,30 @@
 		return moduleName
 
 
-	def AddComponentNodes(self, buildFile, exportNodes, platformNodes):
+	def AddComponentNodes(self, component, exportNodes, platformNodes):	
 		"""Add Specification nodes for a bld.inf to the appropriate platforms."""
-		bldInfFile = BldInfFile(buildFile, self.__gnucpp, self.__Raptor)
-
-		specName = self.getSpecName(buildFile, fullPath=True)
+		bldInfFile = BldInfFile(component.bldinf_filename, self.__gnucpp, component.depfiles, self.__Raptor)
+		component.bldinf = bldInfFile 
 
-		if isinstance(buildFile, raptor_xml.SystemModelComponent):
-			# this component came from a system_definition.xml
-			layer = buildFile.GetContainerName("layer")
-			component = buildFile.GetContainerName("component")
-		else:
-			# this is a plain old bld.inf file from the command-line
-			layer = ""
-			component = ""
+		specName = getSpecName(component.bldinf_filename, fullPath=True)
 
 		# exports are independent of build platform
 		for i,ep in enumerate(self.ExportPlatforms):
-			specNode = raptor_data.Specification(specName)
+			specNode = raptor_data.Specification(name = specName)
 
 			# keep the BldInfFile object for later
-			specNode.bldinf = bldInfFile
+			specNode.component = component
 
 			# add some basic data in a component-wide variant
-			var = raptor_data.Variant()
-			var.AddOperation(raptor_data.Set("COMPONENT_META", str(buildFile)))
-			var.AddOperation(raptor_data.Set("COMPONENT_NAME", component))
-			var.AddOperation(raptor_data.Set("COMPONENT_LAYER", layer))
+			var = raptor_data.Variant(name='component-wide')
+			var.AddOperation(raptor_data.Set("COMPONENT_META", str(component.bldinf_filename)))
+			var.AddOperation(raptor_data.Set("COMPONENT_NAME", component.componentname))
+			var.AddOperation(raptor_data.Set("COMPONENT_LAYER", component.layername))
 			specNode.AddVariant(var)
 
 			# add this bld.inf Specification to the export platform
 			exportNodes[i].AddChild(specNode)
+			component.exportspecs.append(specNode)
 
 		# get the relevant build platforms
 		listedPlatforms = bldInfFile.getBuildPlatforms(self.defaultPlatform)
@@ -2655,34 +2743,36 @@
 													self.__baseuserdefaultplatforms)
 
 
-
-		outputDir = BldInfFile.outputPathFragment(buildFile)
+		outputDir = BldInfFile.outputPathFragment(component.bldinf_filename)
 
 		# Calculate "module name"
-		modulename = self.ModuleName(str(buildFile))
+		modulename = self.ModuleName(str(component.bldinf_filename))
 
 		for i,bp in enumerate(self.BuildPlatforms):
+			plat = bp['PLATFORM']
 			if bp['PLATFORM'] in platforms:
-				specNode = raptor_data.Specification(specName)
+				specNode = raptor_data.Specification(name = specName)
 
-				# keep the BldInfFile object for later
-				specNode.bldinf = bldInfFile
+				# remember what component this spec node comes from for later
+				specNode.component = component
 
 				# add some basic data in a component-wide variant
-				var = raptor_data.Variant()
-				var.AddOperation(raptor_data.Set("COMPONENT_META",str(buildFile)))
-				var.AddOperation(raptor_data.Set("COMPONENT_NAME", component))
-				var.AddOperation(raptor_data.Set("COMPONENT_LAYER", layer))
+				var = raptor_data.Variant(name='component-wide-settings-' + plat)
+				var.AddOperation(raptor_data.Set("COMPONENT_META",str(component.bldinf_filename)))
+				var.AddOperation(raptor_data.Set("COMPONENT_NAME", component.componentname))
+				var.AddOperation(raptor_data.Set("COMPONENT_LAYER", component.layername))
 				var.AddOperation(raptor_data.Set("MODULE", modulename))
 				var.AddOperation(raptor_data.Append("OUTPUTPATHOFFSET", outputDir, '/'))
 				var.AddOperation(raptor_data.Append("OUTPUTPATH", outputDir, '/'))
 				var.AddOperation(raptor_data.Append("BLDINF_OUTPUTPATH",outputDir, '/'))
 
-				var.AddOperation(raptor_data.Set("TEST_OPTION", specNode.bldinf.getRomTestType(bp)))
+				var.AddOperation(raptor_data.Set("TEST_OPTION", component.bldinf.getRomTestType(bp)))
 				specNode.AddVariant(var)
 
 				# add this bld.inf Specification to the build platform
 				platformNodes[i].AddChild(specNode)
+				# also attach it into the component
+				component.specs.append(specNode)
 
 	def ProcessExports(self, componentNode, exportPlatform):
 		"""Do the exports for a given platform and skeleton bld.inf node.
@@ -2694,18 +2784,18 @@
 		[some MMP files #include exported .mmh files]
 		"""
 		if exportPlatform["TESTCODE"]:
-			exports = componentNode.bldinf.getTestExports(exportPlatform)
+			exports = componentNode.component.bldinf.getTestExports(exportPlatform)
 		else:
-			exports = componentNode.bldinf.getExports(exportPlatform)
+			exports = componentNode.component.bldinf.getExports(exportPlatform)
 
 		self.__Raptor.Debug("%i exports for %s",
-							len(exports), str(componentNode.bldinf.filename))
+							len(exports), str(componentNode.component.bldinf.filename))
 		if exports:
 
 			# each export is either a 'copy' or 'unzip'
 			# maybe we should trap multiple exports to the same location here?
 			epocroot = str(exportPlatform["EPOCROOT"])
-			bldinf_filename = str(componentNode.bldinf.filename)
+			bldinf_filename = str(componentNode.component.bldinf.filename)
 			exportwhatlog="<whatlog bldinf='%s' mmp='' config=''>\n" % bldinf_filename
 			for export in exports:
 				expSrc = export.getSource()
@@ -2728,11 +2818,11 @@
 							# export the file
 							exportwhatlog += self.CopyExport(fromFile, toFile, bldinf_filename)
 						else:
-							# unzip the zip
-							exportwhatlog += ("<archive zipfile='" + str(fromFile) + "'>\n")
 							members = self.UnzipExport(fromFile, toFile,
 									str(exportPlatform['SBS_BUILD_DIR']),
 									bldinf_filename)
+							
+							exportwhatlog += ("<archive zipfile='" + str(fromFile) + "'>\n")
 							if members != None:
 								exportwhatlog += members
 							exportwhatlog += "</archive>\n"
@@ -2767,8 +2857,10 @@
 
 			sourceMTime = 0
 			destMTime = 0
+			sourceStat = 0
 			try:
-				sourceMTime = os.stat(source_str)[stat.ST_MTIME]
+				sourceStat = os.stat(source_str)
+				sourceMTime = sourceStat[stat.ST_MTIME]
 				destMTime = os.stat(dest_str)[stat.ST_MTIME]
 			except OSError, e:
 				if sourceMTime == 0:
@@ -2782,6 +2874,9 @@
 				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 ) 
 				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 @@
 				for file in files:
 					if not file.endswith('/'):
 						expfilename = str(generic_path.Join(destination, file))
-						exportwhatlog += "<member>" + expfilename + "</member>\n"
+						exportwhatlog += "<member>" + escape(expfilename) + "</member>\n"
 
 				self.__Raptor.PrintXML("<clean bldinf='" + bldinf_filename + "' mmp='' config=''>\n")
 				self.__Raptor.PrintXML("<zipmarker>" + markerfilename + "</zipmarker>\n")
@@ -2876,6 +2971,11 @@
 						expfile = open(expfilename, 'wb')
 						expfile.write(exportzip.read(file))
 						expfile.close()
+						
+						# Resurrect any file execution permissions present in the archived version
+						if (exportzip.getinfo(file).external_attr >> 16L) & 0100:
+							os.chmod(expfilename, stat.S_IMODE(os.stat(expfilename).st_mode) | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)						
+						
 						# Each file keeps its modified time the same as what it was before unzipping
 						accesstime = time.time()
 						datetime = exportzip.getinfo(file).date_time
@@ -2885,7 +2985,7 @@
 						os.utime(expfilename,(accesstime, modifiedtime))
 
 						filecount += 1
-						exportwhatlog+="<member>" + expfilename + "</member>\n"
+						exportwhatlog+="<member>" + escape(expfilename) + "</member>\n"
 					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 @@
 			self.__Raptor.PrintXML("<zipmarker>" + markerfilename +	"</zipmarker>\n")
 			self.__Raptor.PrintXML("</clean>\n")
 
-		except IOError:
+		except IOError, e:
 			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 @@
 			return	# feature variation does not run extensions at all
 		
 		if buildPlatform["TESTCODE"]:
-			extensions = componentNode.bldinf.getTestExtensions(buildPlatform)
+			extensions = componentNode.component.bldinf.getTestExtensions(buildPlatform)
 		else:
-			extensions = componentNode.bldinf.getExtensions(buildPlatform)
+			extensions = componentNode.component.bldinf.getExtensions(buildPlatform)
 
 		self.__Raptor.Debug("%i template extension makefiles for %s",
-							len(extensions), str(componentNode.bldinf.filename))
+							len(extensions), str(componentNode.component.bldinf.filename))
 
 		for i,extension in enumerate(extensions):
 			if self.__Raptor.projects:
@@ -2999,14 +3099,20 @@
 		gnuList = []
 		makefileList = []
 
+
+		component = componentNode.component
+
+
 		if buildPlatform["TESTCODE"]:
-			MMPList = componentNode.bldinf.getTestMMPList(buildPlatform)
+			MMPList = component.bldinf.getTestMMPList(buildPlatform)
 		else:
-			MMPList = componentNode.bldinf.getMMPList(buildPlatform)
+			MMPList = component.bldinf.getMMPList(buildPlatform)
 
-		bldInfFile = componentNode.bldinf.filename
+		bldInfFile = component.bldinf.filename
 
 		for mmpFileEntry in MMPList['mmpFileList']:
+			component.AddMMP(mmpFileEntry.filename) # Tell the component another mmp is specified (for this platform)
+
 			projectname = mmpFileEntry.filename.File().lower()
 
 			if self.__Raptor.projects:
@@ -3024,7 +3130,8 @@
 
 			mmpFile = MMPFile(foundmmpfile,
 								   self.__gnucpp,
-								   bldinf = componentNode.bldinf,
+								   component.bldinf,
+								   component.depfiles,
 								   log = self.__Raptor)
 
 			mmpFilename = mmpFile.filename
@@ -3058,7 +3165,7 @@
 				continue
 			
 			# now build the specification tree
-			mmpSpec = raptor_data.Specification(self.getSpecName(mmpFilename))
+			mmpSpec = raptor_data.Specification(generic_path.Path(getSpecName(mmpFilename)))
 			var = backend.BuildVariant
 
 			var.AddOperation(raptor_data.Set("PROJECT_META", str(mmpFilename)))
@@ -3094,7 +3201,7 @@
 
 			# Although not part of the MMP, some MMP-based build specs additionally require knowledge of their
 			# container bld.inf exported headers
-			for export in componentNode.bldinf.getExports(buildPlatform):
+			for export in componentNode.component.bldinf.getExports(buildPlatform):
 				destination = export.getDestination()
 				if isinstance(destination, list):
 					exportfile = str(destination[0])
@@ -3108,6 +3215,16 @@
 			mmpSpec.AddVariant(var)
 			componentNode.AddChild(mmpSpec)
 
+			# if there are APPLY variants then add them to the mmpSpec too
+			for applyVar in backend.ApplyVariants:
+				try:
+					mmpSpec.AddVariant(self.__Raptor.cache.FindNamedVariant(applyVar))
+				except KeyError:
+					self.__Raptor.Error("APPLY unknown variant '%s' in %s",
+								        applyVar,
+								        str(mmpFileEntry.filename),
+								        bldinf=str(bldInfFile))
+
 			# resources, stringtables and bitmaps are sub-nodes of this project
 			# (do not add these for feature variant builds)
 			
@@ -3150,7 +3267,7 @@
 					self.projectList.remove(projectname)
 
 			self.__Raptor.Debug("%i gnumakefile extension makefiles for %s",
-						len(gnuList), str(componentNode.bldinf.filename))
+						len(gnuList), str(componentNode.component.bldinf.filename))
 			var = raptor_data.Variant()
 			gnuSpec = raptor_data.Specification("gnumakefile " + str(g.getMakefileName()))
 			interface = buildPlatform["ext_makefile"]
@@ -3182,7 +3299,7 @@
 					projectList.remove(projectname)
 
 			self.__Raptor.Debug("%i makefile extension makefiles for %s",
-						len(makefileList), str(componentNode.bldinf.filename))
+						len(makefileList), str(componentNode.component.bldinf.filename))
 			var = raptor_data.Variant()
 			gnuSpec = raptor_data.Specification("makefile " + str(m.getMakefileName()))
 			interface = buildPlatform["ext_makefile"]
@@ -3203,17 +3320,6 @@
 			gnuSpec.AddVariant(var)
 			componentNode.AddChild(gnuSpec)
 
-	def getSpecName(self, aFileRoot, fullPath=False):
-		"""Returns a build spec name: this is the file root (full path
-		or simple file name) made safe for use as a file name."""
-
-		if fullPath:
-			specName = str(aFileRoot).replace("/","_")
-			specName = specName.replace(":","")
-		else:
-			specName = aFileRoot.File()
-
-		return specName.lower()
 
 	def ApplyOSVariant(self, aBuildUnit, aEpocroot):
 		# Form path to kif.xml and path to buildinfo.txt
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
@@ -1,5 +1,5 @@
 #
-# 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"
@@ -32,7 +32,9 @@
 import raptor_cli
 import raptor_data
 import raptor_make
+import raptor_makefile
 import raptor_meta
+import raptor_timing
 import raptor_utilities
 import raptor_version
 import raptor_xml
@@ -40,7 +42,6 @@
 import sys
 import types
 import time
-import re
 import traceback
 import pluginbox
 from xml.sax.saxutils import escape
@@ -54,15 +55,19 @@
 hostplatform_dir = os.environ["HOSTPLATFORM_DIR"]
 
 # defaults can use EPOCROOT
+
 if "EPOCROOT" in os.environ:
-	epocroot = os.environ["EPOCROOT"].replace("\\","/")
+	incoming_epocroot = os.environ["EPOCROOT"]
+	epocroot = incoming_epocroot.replace("\\","/")
 else:
-	if 'linux' in hostplatform:
-		epocroot=os.environ['HOME'] + os.sep + "epocroot"
-		os.environ["EPOCROOT"] = epocroot
-	else:
+	if 'win' in hostplatform:
+		incoming_epocroot = os.sep
 		epocroot = "/"
 		os.environ["EPOCROOT"] = os.sep
+	else:
+		epocroot=os.environ['HOME'] + os.sep + "epocroot"
+		os.environ["EPOCROOT"] = epocroot
+		incoming_epocroot = epocroot
 
 if "SBS_BUILD_DIR" in os.environ:
 	sbs_build_dir = os.environ["SBS_BUILD_DIR"]
@@ -70,7 +75,6 @@
 	sbs_build_dir = (epocroot + "/epoc32/build").replace("//","/")
 
 
-
 # only use default XML from the epoc32 tree if it exists
 defaultSystemConfig = "lib/config"
 epoc32UserConfigDir = generic_path.Join(epocroot, "epoc32/sbs_config")
@@ -105,91 +109,219 @@
 		}
 
 
-class ComponentGroup(object):
-	""" 	Some components that should be built togther 
-		e.g. a Layer in the system definition. 
+
+class ModelNode(object):
+	""" Represents any node in a a tree of build information
+	    e.g. a tree of bld.infs, mmps and finally things like resource blocks and string table blocks.
+	    This is before they are produced into "build" specs.
 	""" 
-	def __init__(self, name, componentlist=[]):
-		self.components = componentlist
-		self.name = name
+
+	def __init__(self, id, parent = None):
+		self.id = id
+		self.type = type
+		self.specs = []
+		self.deps = []
+		self.children = set()
+		self.unfurled = False
+		self.parent = parent
+
+	# Allow one to make a set
+	def __hash__(self):
+		return hash(self.id)
+
+	def __cmp__(self,other):
+		return cmp(self.id, other)
 
 	def __iter__(self):
-		return iter(self.components)
+		return iter(self.children)
 
 	def __getitem__(self,x):
 		if isinstance(x, slice):
-			return self.components[x.start:x.stop]
-		return self.components[x]
+			return self.children[x.start:x.stop]
+		return self.children[x]
 
 	def __setitem__(self,k, v):
-		self.components[k] = v
+		self.children[k] = v
 
 	def __len__(self):
-		return len(self.components)
+		return len(self.children)
+
+	def add(self, item):
+		return self.children.add(item)
+
+	def isunfurled(self, c):
+		return self.unfurled == False
+
+	def unfurl(self, build):
+		"""Find any children of this node by processing it, produces specs"""
+		pass
+
+	def unfurl_all(self, build):
+		"""Unfurl self and all children - preparatory e.g for realisation"""
+		if not self.unfurled:
+			self.unfurl(build)
+
+		self.realise_exports(build) # permit communication of dependencies between children
+
+		for c in self.children:
+			c.unfurl_all(build)
+
+
+	def realise_exports(self, build):
+		"""Do the things that are needed such that we can fully unfurl all
+		   sibling nodes.  i.e. this step is here to "take care" of the dependencies
+		   between siblings.
+		"""
+		pass
+
+	def realise_makefile(self, build, specs):
+		makefilename_base = build.topMakefile
+		if self.name is not None:
+			makefile = generic_path.Path(str(makefilename_base) + "_" + raptor_utilities.sanitise(self.name))
+		else:
+			makefile = generic_path.Path(str(makefilename_base))
+
+		# insert the start time into the Makefile name?
+		makefile.path = makefile.path.replace("%TIME", build.timestring)
+
+		build.InfoDiscovery(object_type = "layers", count = 1)
+		build.InfoStartTime(object_type = "layer", task = "parse",
+				key = str(makefile.path))
+		makefileset = build.maker.Write(makefile, specs, build.buildUnitsToBuild)
+		build.InfoEndTime(object_type = "layer", task = "parse",
+				key = str(makefile.path))
+
+		return makefileset
+
+
+
+	def realise(self, build):
+		"""Give the spec trees to the make engine and actually
+		"build" the product represented by this model node"""
+		# Must ensure that all children are unfurled at this point
+		self.unfurl_all(build)
+
+		sp = self.specs
 
-	def extend(self, c):
-		self.components.extend(c)
+		build.AssertBuildOK()
+
+		m = self.realise_makefile(build, sp)
+
+		build.InfoStartTime(object_type = "layer", task = "build",
+				key = (str(m.directory) + "/" + str(m.filenamebase)))
+		result = build.Make(m)
+		build.InfoEndTime(object_type = "layer", task = "build",
+				key = (str(m.directory) + "/" + str(m.filenamebase)))
+
+
+		return result
+
+
+
+class Project(ModelNode):
+	"""A project or, in symbian-speak, an MMP
+	"""
+	def __init__(self, filename, parent = None):
+		super(Project,self).__init__(filename, parent = parent)
+		# Assume that components are specified in mmp files for now
+		# One day that tyranny might end.
+		self.mmp_name = str(generic_path.Path.Absolute(filename))
+		self.id = self.mmp_name
+		self.unfurled = False
+
+	def makefile(self, makefilename_base, engine, named = False):
+		"""Makefiles for individual mmps not feasible at the moment"""
+		pass 
+		# Cannot, currently, "unfurl an mmp" directly but do want
+		# to be able to simulate the overall recursive unfurling of a build.
+
+class Component(ModelNode):
+	"""A group of projects or, in symbian-speak, a bld.inf.
+	"""
+	def __init__(self, filename, layername="", componentname=""):
+		super(Component,self).__init__(filename)
+		# Assume that components are specified in bld.inf files for now
+		# One day that tyranny might end.
+		self.bldinf = None # Slot for a bldinf object if we spot one later
+		self.bldinf_filename = generic_path.Path.Absolute(filename)
+
+		self.id = str(self.bldinf_filename)
+		self.exportspecs = []
+		self.depfiles = []
+		self.unfurled = False # We can parse this
+		
+		# Extra metadata optionally supplied with system definition file gathered components
+		self.layername = layername
+		self.componentname = componentname
+
+	def AddMMP(self, filename):
+		self.children.add(Project(filename))
+
+
+class Layer(ModelNode):
+	""" Some components that should be built togther
+		e.g. a Layer in the system definition.
+		
+		Components that come from system definition files can
+		have extra surrounding metadata that we need to pass
+		on for use in log output.
+	"""
+	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
+				self.children.add(Component(c, c.GetContainerName("layer"), c.GetContainerName("component")))
+			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.
 
-		Returns a tuple consisting of a list of specification objects and a list of dependency files
-		that relate to these specs.
+		We currently have parsers that work on collections of components/bld.infs and that cannot
+		parse at a "finer" level.  So one can't 'unfurl' an mmp at the moment.
+
+		Returns True if the object was successfully unfurled.
 		"""
 
-		self.specs = []
-		self.specs.extend(genericspecs)
-		self.configs = configs
-		self.dependencies = set()
+		# setup all our components
+		for c in self.children:
+			c.specs = []
+
+		self.configs = build.buildUnitsToBuild
+
 
 		metaReader = None
-		if len (self.components):
+		if len (self.children):
 			try:
 				# create a MetaReader that is aware of the list of
 				# configurations that we are trying to build.
-				metaReader = raptor_meta.MetaReader(build, configs)
+				metaReader = raptor_meta.MetaReader(build, build.buildUnitsToBuild)
 
 				# convert the list of bld.inf files into a specification
 				# hierarchy suitable for all the configurations we are using.
-				self.specs.extend(metaReader.ReadBldInfFiles(self.components,build.doExportOnly))
+				self.specs = list(build.generic_specs)
+				self.specs.extend(metaReader.ReadBldInfFiles(self.children, doexport = build.doExport, dobuild = not build.doExportOnly))
 
 			except raptor_meta.MetaDataError, e:
-				log.Error(e.Text)
-
-		log.Info("Buildable specification group '%s'", name)
-		build.AttachSpecs(self.specs)
-
-		# Get a unique list of the dependency files that were created
-		if metaReader:
-			for c in metaReader.BuildPlatforms:
-				self.dependencies.update(c["METADEPS"])
-
-
-	def CreateMakefile(self, makefilename_base, engine, named = False):
-		if len(self.specs) <= 0:
-			return None
-
-		if named:
-			makefile = generic_path.Path(str(makefilename_base) + "_" + raptor_utilities.sanitise(self.name))
-		else:
-			makefile = generic_path.Path(str(makefilename_base))
-
-		# 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?
 
-		self.configs = build.GetConfig("build").GenerateBuildUnits()
+		self.configs = build.buildUnitsToBuild
 
 		# Pass certain CLI flags through to the makefile-generating sbs calls
 		cli_options = ""
@@ -206,34 +338,53 @@
 		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.children)
+		number_blocks = build.jobs
 		block_size = (nc / number_blocks) + 1
 		component_blocks = []
 		spec_nodes = []
 		
 		b = 0
+		childlist = list(self.children)
 		while b < nc:
-			component_blocks.append(self.components[b:b+block_size])
+			component_blocks.append(childlist[b:b+block_size])
 			b += block_size
 			
-		if len(component_blocks[-1]) <= 0:
+		while len(component_blocks[-1]) <= 0:
 			component_blocks.pop()
+			number_blocks -= 1
+
+		build.Info("Parallel Parsing: bld.infs split into %d blocks\n", number_blocks)
+		# Cause the binding makefiles to have the toplevel makefile's
+		# name.  The bindee's have __pp appended.
+		tm = build.topMakefile.Absolute()
+		binding_makefiles = raptor_makefile.MakefileSet(str(tm.Dir()), build.maker.selectors, makefiles=None, filenamebase=str(tm.File()))
+		build.topMakefile = generic_path.Path(str(build.topMakefile) + "_pp")
 		
 		loop_number = 0
 		for block in component_blocks:
 			loop_number += 1
 			specNode = raptor_data.Specification("metadata_" + self.name)
 
-			componentList = " ".join([str(c) for c in block])
-			configList = " ".join([c.name for c in configs])
+			componentList = " ".join([str(c.bldinf_filename) for c in block])
+
+
+			configList = " ".join([c.name for c in self.configs if c.name != "build" ])
 			
 			makefile_path = str(build.topMakefile) + "_" + str(loop_number)
 			try:
 				os.unlink(makefile_path) # until we have dependencies working properly
-			except Exception,e:
-				# print "couldn't unlink %s: %s" %(componentMakefileName, str(e))
+			except Exception:
 				pass
 			
 			# add some basic data in a component-wide variant
@@ -242,13 +393,19 @@
 			var.AddOperation(raptor_data.Set("MAKEFILE_PATH", makefile_path))
 			var.AddOperation(raptor_data.Set("CONFIGS", configList))
 			var.AddOperation(raptor_data.Set("CLI_OPTIONS", cli_options))
+
+
+			# Allow the flm to skip exports. Note: this parameter
+			doexport_str = '1'
+			if not build.doExport:
+				doexport_str = ''
+			var.AddOperation(raptor_data.Set("DOEXPORT", doexport_str ))
+
 			# Pass on '-n' (if specified) to the makefile-generating sbs calls
 			if build.noBuild:
 				var.AddOperation(raptor_data.Set("NO_BUILD", "1"))
 			specNode.AddVariant(var)
 	
-	
-	
 			try:
 				interface = build.cache.FindNamedInterface("build.makefiles")
 				specNode.SetInterface(interface)
@@ -256,15 +413,30 @@
 				build.Error("Can't find flm interface 'build.makefiles' ")
 				
 			spec_nodes.append(specNode)
+			binding_makefiles.addInclude(str(makefile_path)+"_all")
 			
+		build.InfoDiscovery(object_type = "layers", count = 1)
+		build.InfoStartTime(object_type = "layer", task = "parse",
+				key = str(build.topMakefile))
+		m = self.realise_makefile(build, spec_nodes)
+		m.close()
+		gen_result = build.Make(m)
+
+		build.InfoEndTime(object_type = "layer", task = "parse",
+				key = str(build.topMakefile))
+		build.InfoStartTime(object_type = "layer", task = "build",
+				key = str(build.topMakefile))
+		build.Debug("Binding Makefile base name is %s ", binding_makefiles.filenamebase)
+		binding_makefiles.close()
+		b = build.Make(binding_makefiles)
+		build.InfoEndTime(object_type = "layer", task = "build",
+				key = str(build.topMakefile))
+		return b
 			
 
-		## possibly some error handling here?
-
-		self.specs = spec_nodes
 
 
-class BuildCompleteException(Exception):
+class BuildCannotProgressException(Exception):
 	pass
 
 # raptor module classes
@@ -326,8 +498,8 @@
 		# things to initialise
 		self.args = []
 
-		self.componentGroups = []
-		self.orderComponentGroups = False
+		self.layers = []
+		self.orderLayers = False
 		self.commandlineComponents = []
 
 		self.systemModel = None
@@ -343,8 +515,10 @@
 		self.maker = None
 		self.debugOutput = False
 		self.doExportOnly = False
+		self.doExport = True
 		self.noBuild = False
 		self.noDependInclude = False
+		self.noDependGenerate = False
 		self.projects = set()
 
 		self.cache = raptor_cache.Cache(self)
@@ -360,6 +534,7 @@
 		# what platform and filesystem are we running on?
 		self.filesystem = raptor_utilities.getOSFileSystem()
 
+		self.timing = False
 		self.toolset = None
 
 		self.starttime = time.time()
@@ -374,6 +549,9 @@
 		return True
 
 	def AddConfigName(self, name):
+		if name == "build":
+			traceback.print_stack((sys.stdout))
+			sys.exit(1)
 		self.configNames.append(name)
 		return True
 
@@ -439,6 +617,16 @@
 
 	def SetExportOnly(self, TrueOrFalse):
 		self.doExportOnly = TrueOrFalse
+		if not self.doExport:
+			self.Error("The --noexport and --export-only options are incompatible - won't to do anything useful")
+			return False
+		return True
+
+	def SetNoExport(self, TrueOrFalse):
+		self.doExport = not TrueOrFalse
+		if self.doExportOnly:
+			self.Error("The --noexport and --export-only options are incompatible - won't to do anything useful")
+			return False
 		return True
 
 	def SetNoBuild(self, TrueOrFalse):
@@ -449,6 +637,10 @@
 		self.noDependInclude = TrueOrFalse
 		return True
 		
+	def SetNoDependGenerate(self, TrueOrFalse):
+		self.noDependGenerate = TrueOrFalse
+		return True
+
 	def SetKeepGoing(self, TrueOrFalse):
 		self.keepGoing = TrueOrFalse
 		return True
@@ -503,10 +695,16 @@
 
 		return True
 
+	def SetTiming(self, TrueOrFalse):
+		self.timing = TrueOrFalse
+		return True
+
 	def SetParallelParsing(self, type):
 		type = type.lower()
 		if type == "on":
 			self.doParallelParsing = True
+		elif type == "slave":
+			self.isParallelParsingSlave = True
 		elif type == "off":
 			self.doParallelParsing = False
 		else:
@@ -529,7 +727,7 @@
 
 	def PrintVersion(self,dummy):
 		global name
-		print name, "version", raptor_version.Version()
+		print name, "version", raptor_version.fullversion()
 		self.mission = Raptor.M_VERSION
 		return False
 
@@ -538,7 +736,7 @@
 	def Introduction(self):
 		"""Print a header of useful information about Raptor"""
 
-		self.Info("%s: version %s\n", name, raptor_version.Version())
+		self.Info("%s: version %s\n", name, raptor_version.fullversion())
 
 		self.Info("%s %s", env, str(self.home))
 		self.Info("Set-up %s", str(self.raptorXML))
@@ -546,8 +744,8 @@
 		self.Info("Current working directory %s", os.getcwd())
 		
 		# the inherited environment
-		for e, value in os.environ.items():
-			self.Info("Environment %s=%s", e, value)
+		for e, value in sorted( os.environ.items() ):
+			self.Info("Environment %s=%s", e, value.replace("]]>", "]]&gt;"))
 
 		# and some general debug stuff
 		self.Debug("Platform %s", "-".join(hostplatform))
@@ -659,32 +857,6 @@
 
 		self.cache.Load(self.systemFLM)
 
-	def GetConfig(self, configname):
-		names = configname.split(".")
-
-		cache = self.cache
-
-		base = names[0]
-		mods = names[1:]
-
-		if base in cache.groups:
-			x = cache.FindNamedGroup(base)
-		elif base in cache.aliases:
-			x = cache.FindNamedAlias(base)
-		elif base in cache.variants:
-			x = cache.FindNamedVariant(base)
-		else:
-			raise Exception("Unknown build configuration '%s'" % configname)
-
-		x.ClearModifiers()
-
-
-		try:
-			for m in mods: x.AddModifier( cache.FindNamedVariant(m) )
-		except KeyError:
-			raise Exception("Unknown build configuration '%s'" % configname)
-		return x
-
 	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 @@
 			else:
 				configNames.append(self.defaultConfig)
 
-		buildUnitsToBuild = set()
-
-
-		for c in set(configNames):
-			try:		
-				x = self.GetConfig(c)
-				buildUnitsToBuild.update( x.GenerateBuildUnits() )
-			except Exception, e:
-				self.FatalError(str(e))
+		buildUnitsToBuild = raptor_data.GetBuildUnits(configNames, self.cache, self)
 
 		for b in buildUnitsToBuild:
 			self.Info("Buildable configuration '%s'", b.name)
@@ -770,13 +934,13 @@
 				systemModel.DumpLayerInfo(layer)
 
 				if systemModel.IsLayerBuildable(layer):
-					layersToBuild.append(ComponentGroup(layer,
+					layersToBuild.append(Layer(layer,
 							systemModel.GetLayerComponents(layer)))
 
 		return layersToBuild
 
 
-	# Add bld.inf or system definition xml to command line componentGroups (depending on preference)
+	# Add bld.inf or system definition xml to command line layers (depending on preference)
 	def FindSysDefIn(self, aDir = None):
 		# Find a system definition file
 
@@ -801,22 +965,12 @@
 			dir = generic_path.Path(aDir)
 
 		bldInf = dir.Append(self.buildInformation)
-		componentgroup = []
 
 		if bldInf.isFile():
 			return bldInf
 
 		return None
 
-	def AttachSpecs(self, groups):
-		# tell the specs which Raptor object they work for (so that they can
-		# access the cache and issue warnings and errors)
-		for spec in groups:
-			spec.SetOwner(self)
-			self.Info("Buildable specification '%s'", spec.name)
-			if self.debugOutput:
-				spec.DebugPrint()
-
 	def GenerateGenericSpecs(self, configsToBuild):
 		# if a Configuration has any config-wide interfaces
 		# then add a Specification node to call each of them.
@@ -832,7 +986,7 @@
 					filter.AddConfigCondition(c.name)
 				else:
 					# create a new node
-					filter = raptor_data.Filter("config_wide")
+					filter = raptor_data.Filter(name = "config_wide")
 					filter.AddConfigCondition(c.name)
 					for i in iface.split():
 						spec = raptor_data.Specification(i)
@@ -842,50 +996,25 @@
 					configWide[iface] = filter
 					genericSpecs.append(filter)
 
-		self.AttachSpecs(genericSpecs)
-
 		return genericSpecs
 
 
-	def WriteMetadataDepsMakefile(self, component_group):
-		""" Takes a list of (filename, target) tuples that indicate where """
-		# Create a Makefile that includes all the dependency information for this spec group
-		build_metamakefile_name = \
-				os.path.abspath(sbs_build_dir).replace('\\','/').rstrip('/') + \
-				'/metadata_%s.mk' % component_group.name.lower()
-		bmkmf = open(build_metamakefile_name, "w+")
-		bmkmf.write("# Build Metamakefile - Dependencies for metadata during the 'previous' build\n\n")
-		bmkmf.write("PARSETARGET:=%s\n" % build_metamakefile_name)
-		bmkmf.write("%s:  \n" % build_metamakefile_name)
-		bmkmf.write("\t@echo -e \"\\nRE-RUNNING SBS with previous parameters\"\n")
-		bmkmf.write("\t@echo pretend-sbs %s\n" % " ".join(self.args))
-		try:
-			for m in component_group.dependencies:
-				filename, target = m
-				bmkmf.write("-include %s\n\n" % filename)
-		finally:
-			bmkmf.close()
-
-		return build_metamakefile_name
-
-
 	def GetEvaluator(self, specification, configuration, gathertools=False):
 		""" this will perform some caching later """
-		return raptor_data.Evaluator(self, specification, configuration, gathertools=gathertools)
-
-
-	def areMakefilesUptodate(self):
-		return False
+		return raptor_data.Evaluator(specification, configuration, gathertools=gathertools, cache = self.cache)
 
 
-	def Make(self, makefile):
-
-		if self.maker.Make(makefile):
+	def Make(self, makefileset):
+		if not self.noBuild and makefileset is not None:
+			if self.maker.Make(makefileset):
 			self.Info("The make-engine exited successfully.")
 			return True
 		else:
 			self.Error("The make-engine exited with errors.")
 			return False
+		else:
+			self.Info("No build performed")
+
 
 
 	def Report(self):
@@ -898,10 +1027,10 @@
 		self.Info("Run time %s seconds" % self.runtime)
 
 	def AssertBuildOK(self):
-		"""Raise a BuildCompleteException if no further processing is required
+		"""Raise a BuildCannotProgressException if no further processing is required
 		"""
 		if self.Skip():
-			raise BuildCompleteException("")
+			raise BuildCannotProgressException("")
 
 		return True
 
@@ -934,17 +1063,17 @@
 			self.out.write("<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n")
 
 			namespace = "http://symbian.com/xml/build/log"
+			progress_namespace = "http://symbian.com/xml/build/log/progress"
 			schema = "http://symbian.com/xml/build/log/1_0.xsd"
 
-			self.out.write("<buildlog sbs_version=\"%s\" xmlns=\"%s\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"%s %s\">\n"
-						   % (raptor_version.Version(), namespace, namespace, schema))
+			self.out.write("<buildlog sbs_version=\"%s\" xmlns=\"%s\" xmlns:progress=\"%s\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"%s %s\">\n"
+						   % (raptor_version.fullversion(), namespace, progress_namespace, namespace, schema))
 			self.logOpen = True
 		except Exception,e:
 			self.out = sys.stdout # make sure that we can actually get errors out.
 			self.logOpen = False
 			self.FatalError("Unable to open the output logs: %s" % str(e))
 
-
 	def CloseLog(self):
 		if self.logOpen:
 			self.out.summary()
@@ -976,6 +1105,30 @@
 		self.out.write("<info" + self.attributeString(attributes) + ">" +
 		               escape(format % extras) + "</info>\n")
 
+	def InfoDiscovery(self, object_type, count):
+		if self.timing:
+			try:
+				self.out.write(raptor_timing.Timing.discovery_string(object_type = object_type,
+						count = count))
+			except Exception, exception:
+				self.Error(exception.Text, function = "InfoDiscoveryTime")
+
+	def InfoStartTime(self, object_type, task, key):
+		if self.timing:
+			try:
+				self.out.write(raptor_timing.Timing.start_string(object_type = object_type,
+						task = task, key = key))
+			except Exception, exception:
+				self.Error(exception.Text, function = "InfoStartTime")
+
+	def InfoEndTime(self, object_type, task, key):
+		if self.timing:
+			try:
+				self.out.write(raptor_timing.Timing.end_string(object_type = object_type,
+						task = task, key = key))
+			except Exception, exception:
+				self.Error(exception.Text, function = "InfoEndTime")
+
 	def Debug(self, format, *extras, **attributes):
 		"Send a debugging message to the configured channel"
 
@@ -1019,28 +1172,11 @@
 		if format:
 			self.out.write(format % extras)
 
-
-	def MakeComponentGroup(self, cg):
-		if not self.maker:
-			self.maker = raptor_make.MakeEngine(self)
-
-		if self.maker == None:
-			self.Error("No make engine present")
-			return None
-
-		makefile = cg.CreateMakefile(self.topMakefile, self.maker, self.systemDefinitionOrderLayers)
-		if (not self.noBuild and makefile is not None) \
-				or self.doParallelParsing:
-			# run the build for a single group of specs
-			self.Make(makefile)
-		else:
-			self.Info("No build performed for %s" % cg.name)
-
-	def GetComponentGroupsFromCLI(self):
-		"""Returns the list of componentGroups as specified by the
+	def GetLayersFromCLI(self):
+		"""Returns the list of layers as specified by the
 		   commandline interface to Raptor e.g. parameters
 		   or the current directory"""
-		componentGroups=[]
+		layers=[]
 		# Look for bld.infs or sysdefs in the current dir if none were specified
 		if self.systemDefinitionFile == None and len(self.commandlineComponents) == 0:
 			if not self.preferBuildInfoToSystemDefinition:
@@ -1049,38 +1185,39 @@
 				if self.systemDefinitionFile == None:
 					aComponent = self.FindComponentIn(cwd)
 					if aComponent:
-						componentGroups.append(ComponentGroup('default',[aComponent]))
+						layers.append(Layer('default',[aComponent]))
 			else:
 				aComponent = self.FindComponentIn(cwd)
 				if aComponent is None:
 					self.systemDefinitionFile = self.FindSysDefIn(cwd)
 				else:
-					componentGroups.append(ComponentGroup('default',[aComponent]))
+					layers.append(Layer('default',[aComponent]))
 
-			if len(componentGroups) <= 0 and  self.systemDefinitionFile == None:
+			if len(layers) <= 0 and  self.systemDefinitionFile == None:
 				self.Warn("No default bld.inf or system definition file found in current directory (%s)", cwd)
 
 		# If we now have a System Definition to parse then get the layers of components
 		if self.systemDefinitionFile != None:
 			systemModel = raptor_xml.SystemModel(self, self.systemDefinitionFile, self.systemDefinitionBase)
-			componentGroups = self.GatherSysModelLayers(systemModel, self.systemDefinitionRequestedLayers)
+			layers = self.GatherSysModelLayers(systemModel, self.systemDefinitionRequestedLayers)
 			
 		# Now get components specified on a commandline - build them after any
 		# layers in the system definition.
 		if len(self.commandlineComponents) > 0:
-			componentGroups.append(ComponentGroup('commandline',self.commandlineComponents))
+			layers.append(Layer('commandline',self.commandlineComponents))
 
 		# If we aren't building components in order then flatten down
 		# the groups
 		if not self.systemDefinitionOrderLayers:
 			# Flatten the layers into one group of components if
 			# we are not required to build them in order.
-			newcg = ComponentGroup("all")
-			for cg in componentGroups:
-				newcg.extend(cg)
-			componentGroups = [newcg]
+			newcg = Layer("all")
+			for cg in layers:
+				for c in cg:
+					newcg.add(c)
+			layers = [newcg]
 
-		return componentGroups
+		return layers
 
 	def Build(self):
 
@@ -1102,20 +1239,24 @@
 
 			# find out what configurations to build
 			self.AssertBuildOK()
-			buildUnitsToBuild = set()
 			buildUnitsToBuild = self.GetBuildUnitsToBuild(self.configNames)
 
+			if len(buildUnitsToBuild) == 0:
+				raise BuildCannotProgressException("No configurations to build.")
+			
+			self.buildUnitsToBuild = buildUnitsToBuild
+
 			# find out what components to build, and in what way
-			componentGroups = []
+			layers = []
 
 			self.AssertBuildOK()
 			if len(buildUnitsToBuild) >= 0:
-				componentGroups = self.GetComponentGroupsFromCLI()
+				layers = self.GetLayersFromCLI()
 
-			componentCount = reduce(lambda x,y : x + y, [len(cg) for cg in componentGroups])
+			componentCount = reduce(lambda x,y : x + y, [len(cg) for cg in layers])
 
 			if not componentCount > 0:
-				raise BuildCompleteException("No components to build.")
+				raise BuildCannotProgressException("No components to build.")
 
 			# check the configurations (tools versions)
 			self.AssertBuildOK()
@@ -1123,35 +1264,36 @@
 			if self.toolcheck != 'off':
 				self.CheckConfigs(buildUnitsToBuild)
 			else:
-				self.Info(" Not Checking Tool Versions")
+				self.Info("Not Checking Tool Versions")
 
 			self.AssertBuildOK()
 
+			# Setup a make engine.
+			if not self.maker:
+				try:
+					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):
 			if self.doParallelParsing:
 				# Create a Makefile to parse components in parallel and build them
-				for cg in componentGroups:
-					cg.GenerateMetadataSpecs(buildUnitsToBuild)
-					self.MakeComponentGroup(cg)
-				if self.noBuild:
-					self.Info("No build performed")
+				for l in layers:
+					l.meta_realise(self)
 			else:
 				# Parse components serially, creating one set of makefiles
 				# create non-component specs
-				self.AssertBuildOK()
-				generic_specs = self.GenerateGenericSpecs(buildUnitsToBuild)
+				self.generic_specs = self.GenerateGenericSpecs(buildUnitsToBuild)
 
 				self.AssertBuildOK()
-				for cg in componentGroups:
+				for l in layers:
 					# create specs for a specific group of components
-					cg.GenerateSpecs(generic_specs, buildUnitsToBuild)
-					self.WriteMetadataDepsMakefile(cg)	
+					l.realise(self)
 					
-					# generate the makefiles for one group of specs
-					self.MakeComponentGroup(cg)
-
-		except BuildCompleteException,b:
+		except BuildCannotProgressException,b:
 			if str(b) != "":
 				self.Info(str(b))
 
@@ -1185,6 +1327,8 @@
 class BuildStats(object):
 
 	def __init__(self, raptor_instance):
+		self.incoming_epocroot = incoming_epocroot
+		self.epocroot = epocroot
 		self.logFileName = raptor_instance.logFileName
 		self.quiet = raptor_instance.quiet
 		self.doCheck = raptor_instance.doCheck
@@ -1212,17 +1356,7 @@
 	# object which represents a build
 	b = Raptor.CreateCommandlineBuild(argv)
 
-	# allow all objects to log to the
-	# build they're being used in
-	global build
-	global log
-	build = b
-	log = b
-
-
-	result = b.Build()
-
-	return result
+	return b.Build()
 
 
 def DisplayBanner():
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_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
@@ -1,5 +1,5 @@
 #
-# 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"
@@ -13,8 +13,15 @@
 #
 # Description: 
 # raptor version information module
-#
 
-def Version():
+# replace CHANGESET with the Hg changeset for ANY release
+
+version=(2,13,0,"2010-04-12","symbian build system","CHANGESET")
+
+def numericversion():
+	"""Raptor version string"""
+	return "%d.%d.%d" % version[:3]
+
+def fullversion():
 	"""Raptor version string"""
-	return "2.10.1 [2009-10-27 sf prerelease]"
+	return "%d.%d.%d [%s %s %s]" % version
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
@@ -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"
@@ -144,9 +144,10 @@
 	"""Path sub-class that wraps up a component bld.inf file with
 	system_definition.xml context information."""
 
-	def __init__(self, aBldInfFile, aContainerNames, aSystemDefinitionFile, aSystemDefinitionBase, aSystemDefinitionVersion):
+	def __init__(self, aBldInfFile, aLayerName, aContainerNames, aSystemDefinitionFile, aSystemDefinitionBase, aSystemDefinitionVersion):
 		generic_path.Path.__init__(self, aBldInfFile.Absolute().path)
 		self.__ContainerNames = aContainerNames
+		self.__LayerName = aLayerName
 		self.__SystemDefinitionFile = aSystemDefinitionFile
 		self.__SystemDefinitionBase = aSystemDefinitionBase
 		self.__SystemDefinitionVersion = aSystemDefinitionVersion
@@ -157,9 +158,12 @@
 	def GetSystemDefinitionBase(self):
 		return self.__SystemDefinitionBase
 
-	def GetSystemDefinitionFile(self):
+	def GetSystemDefinitionVersion(self):
 		return self.__SystemDefinitionVersion
 
+	def GetLayerName(self):
+		return self.__LayerName
+
 	def GetContainerName(self, aContainerType):
 		if self.__ContainerNames.has_key(aContainerType):
 		  return self.__ContainerNames[aContainerType]
@@ -174,6 +178,7 @@
 		self.__SystemDefinitionFile = aSystemDefinitionFile.GetLocalString()
 		self.__SystemDefinitionBase = aSystemDefinitionBase.GetLocalString()
 		self.__Version = {'MAJOR':0,'MID':0,'MINOR':0}
+		self.__IdAttribute = "name"
 		self.__ComponentRoot = ""
 		self.__TotalComponents = 0
 		self.__LayerList = []
@@ -222,6 +227,10 @@
 	def DumpInfo(self):
 		self.__Logger.Info("Found %d bld.inf references in %s within %d layers:", len(self.GetAllComponents()), self.__SystemDefinitionFile, len(self.GetLayerNames()))
 		self.__Logger.Info("\t%s", ", ".join(self.GetLayerNames()))
+		self.__Logger.InfoDiscovery(object_type = "layers",
+				count = len(self.GetLayerNames()))
+		self.__Logger.InfoDiscovery(object_type = "bld.inf references",
+				count = len(self.GetAllComponents()))
 
 	def __Read(self):
 		if not os.path.exists(self.__SystemDefinitionFile):
@@ -259,42 +268,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
 			# 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'):
 				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'):
 					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"
+
 		return True
 
 	def __Parse(self):
-		# find the <systemModel> element (there can be 0 or 1) and search any <layer> elements for <unit> elements with "bldFile" attributes
+		# 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
+		# 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 == "systemModel":
+			if child.localName in ["systemModel", "layer", "package", "collection", "component"]:
 				self.__ProcessSystemModelElement(child)
 
 	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)
-		component = SystemModelComponent(aBldInfFile, containers, self.__SystemDefinitionFile, self.__SystemDefinitionBase, self.__Version)
+		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 __GetElementContainers(self, aElement, aContainers):
 		# take a <unit/> element and creates a type->name dictionary of all of its parent containers
 		# We're only interested in parent nodes if they're not the top-most node
 		if aElement.parentNode.parentNode:
 			parent = aElement.parentNode
-			name = parent.getAttribute("name")
+			name = parent.getAttribute(self.__IdAttribute)
 
 			if name:
 				aContainers[parent.tagName] = name
@@ -305,8 +334,9 @@
 		"""Search for XML <unit/> elements with 'bldFile' attributes and resolve concrete bld.inf locations
 		with an appreciation of different schema versions."""
 
-		if aElement.tagName == "layer":
-			currentLayer = aElement.getAttribute("name")
+		# 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)
 
 			if not self.__LayerDetails.has_key(currentLayer):
 				self.__LayerDetails[currentLayer] = []
@@ -320,10 +350,10 @@
 			if bldFileValue:
 				bldInfRoot = self.__ComponentRoot
 
-				if self.__Version['MAJOR'] == 1 and self.__Version['MID'] == 4:
-					# version 1.4.x schema paths can use DOS slashes
+				if self.__Version['MAJOR'] == 1:
+					# version 1.x schema paths can use DOS slashes
 					bldFileValue = raptor_utilities.convertToUnixSlash(bldFileValue)
-				elif self.__Version['MAJOR'] == 2:
+				elif self.__Version['MAJOR'] >= 2:
 					# 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 @@
 
 				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 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)
 
 				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)
 				else:
 					component = self.__CreateComponent(bldinf, aElement)
-					layer = component.GetContainerName("layer")
+					layer = component.GetLayerName()
 					if layer:
 						self.__LayerDetails[layer].append(component)
 						self.__TotalComponents += 1
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
@@ -3,7 +3,7 @@
 
 	<xsd:annotation>
 		<xsd:documentation xml:lang="en">
-			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
 			uunder the terms of the License "Eclipse Public License v1.0"
@@ -60,7 +60,8 @@
 					<xsd:attribute name="name" type="xsd:string"/>
 					<xsd:attribute name="project" type="xsd:string"/>
 					<xsd:attribute name="component" type="xsd:string"/>
-					<xsd:attribute name="forcesuccess" type="xsd:string"/>
+					<xsd:attribute name="flags" type="xsd:string"/>
+					<xsd:attribute name="reason" type="xsd:string"/>
 				</xsd:complexType>
 			</xsd:element>
 		</xsd:sequence>
Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor: test
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
@@ -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"
@@ -21,6 +21,7 @@
 #define HAS_GETCOMMANDLINE 1
 #define HAS_MILLISECONDSLEEP 1
 #define HAS_MSVCRT 1
+#define HAS_WINSOCK2 1
 #else
 #define HAS_POLL 1
 #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
@@ -1,5 +1,5 @@
 #
-# 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"
@@ -62,7 +62,7 @@
 $(foreach SOURCEFILE,$(SOURCES),$(c2obj))
 
 $(BINDIR)/$(TARGET)$(PROGRAMEXT): $$(OBJECTS)
-	gcc $(LDFLAGS) $$^ -o $$@
+	gcc  $$^ $(LDFLAGS) -o $$@
 	
 $$(shell mkdir -p $(OUTPUTPATH)/$(TARGET))
 
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
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# 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"
@@ -61,7 +61,7 @@
 fi
 
 
-   echo init.xml LICENSE.txt RELEASE-NOTES.txt; cd $SBS_HOME && find bin lib $BINARIES python test schema util |
+   cd $SBS_HOME && find license.txt RELEASE-NOTES.html bin lib notes $BINARIES python test schema util |
 	grep -v "$TMPSBS"'/python/\.py$' |
 	grep -v 'flm/test'  |
 	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
@@ -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"
@@ -30,40 +30,83 @@
 tempdir = ""
 
 parser = optparse.OptionParser()
-parser.add_option("-s", "--sbs_home", dest="sbs_home",
-                  help="Path to use as SBS_HOME environment variable. If not present the script exits.")
+
+parser.add_option("-s", "--sbs-home", dest="sbshome", help="Path to use as SBS_HOME environment variable. If not present the script exits.")
+
+parser.add_option("-w", "--win32-support", dest="win32support", help="Path to Win32 support directory. If not present the script exits.")
+
+parser.add_option("-b", "--bv", dest="bv", help="Path to Binary variation CPP \"root\" directory. Can be a full/relatitve path; prefix with \"WIN32SUPPORT\\\" to be relative to the Win32 support directory. Omitting this value will assume a default to a path inside the Win32 support directory.")
+
+parser.add_option("-c", "--cygwin", dest="cygwin", help="Path to Cygwin \"root\" directory. Can be a full/relatitve path; prefix with \"WIN32SUPPORT\\\" to be relative to the Win32 support directory. Omitting this value will assume a default to a path inside the Win32 support directory.")
+
+parser.add_option("-m", "--mingw", dest="mingw", help="Path to MinGW \"root\" directory. Can be a full/relatitve path; prefix with \"WIN32SUPPORT\\\" to be relative to the Win32 support directory. Omitting this value will assume a default to a path inside the Win32 support directory.")
+
+parser.add_option("-p", "--python", dest="python", help="Path to Python \"root\" directory. Can be a full/relatitve path; prefix with \"WIN32SUPPORT\\\" to be relative to the Win32 support directory. Omitting this value will assume a default to a path inside the Win32 support directory.")
+
+parser.add_option("--prefix", dest="versionprefix", help="A string to use as a prefix to the Raptor version string. This will be present in the Raptor installer's file name, the installer's pages as well as the in output from sbs -v.", type="string", default="")
+
+parser.add_option("--postfix", dest="versionpostfix", help="A string to use as a postfix to the Raptor version string. This will be present in the Raptor installer's file name, the installer's pages as well as the in output from sbs -v.", type="string", default="")
 
 (options, args) = parser.parse_args()
 
-if options.sbs_home == None:
+# Required directories inside the win32-support repository
+win32supportdirs = {"bv":"bv", "cygwin":"cygwin", "mingw":"mingw", "python":"python264"}
+
+if options.sbshome == None:
 	print "ERROR: no SBS_HOME passed in. Exiting..."
 	sys.exit(2)
 
+if options.win32support == None:
+	print "ERROR: no win32support directory specified. Unable to proceed. Exiting..."
+	sys.exit(2)
+else:
+	# Check for command line overrides to defaults
+	for directory in win32supportdirs:
+		print "TEST %s" % directory
+		value = getattr(options,directory)
+		print "value =  %s" % str(value)
+		if value != None: # Command line override
+			if value.lower().startswith("win32support"):
+				# Strip off "WIN32SUPPORT\" and join to Win32 support location
+				win32supportdirs[directory] = os.path.join(options.win32support, value[13:]) 
+			else:
+				# Relative to current directory
+				win32supportdirs[directory] = value
+
+		else: # Use default location
+			win32supportdirs[directory] = os.path.join(options.win32support, win32supportdirs[directory])
+	
+	print "\n\nwin32supportdirs = %s\n\n" % win32supportdirs
+
+	# Check that all the specified directories exist and exit if any of them is missing.
+	for directory in win32supportdirs:
+		dir = win32supportdirs[directory]
+		if os.path.isdir(dir):
+			print "Found directory %s" % dir
+		else:
+			print "ERROR: directory %s does not exist. Cannot build installer. Exiting..." % dir
+			sys.exit(2)
 
-def parseconfig(xmlFile="raptorinstallermaker.xml"):
-	pass
-
-def generateinstallerversionheader(sbs_home = None):
-	os.environ["SBS_HOME"] = sbs_home
-	os.environ["PATH"] = os.path.join(os.environ["SBS_HOME"], "bin") + os.pathsep + os.environ["PATH"]
+def generateinstallerversionheader(sbshome = None):
+	shellenv = os.environ.copy()
+	shellenv["PYTHONPATH"] = os.path.join(sbshome, "python")
 	
-	versioncommand = "sbs -v"
+	raptorversioncommand = "python -c \"import raptor_version; print raptor_version.numericversion()\""
 	
-	# Raptor version string looks like this
-	# sbs version 2.5.0 [2009-02-20 release]
+	# Raptor version is obtained from raptor_version module's numericversion function.
 	sbs_version_matcher = re.compile(".*(\d+\.\d+\.\d+).*", re.I)
 	
 	# Create Raptor subprocess
-	sbs = subprocess.Popen(versioncommand, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
-	
+	versioncommand = subprocess.Popen(raptorversioncommand, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=shellenv)
+	raptorversion = ""
 	# Get all the lines matching the RE
-	for line in sbs.stdout.readlines():
+	for line in versioncommand.stdout.readlines():
 		res = sbs_version_matcher.match(line)
 		if res:
 			raptorversion = res.group(1)
 			print "Successfully determined Raptor version %s" % raptorversion
 
-	sbs.wait() # Wait for process to end
+	versioncommand.wait() # Wait for process to end
 	
 	raptorversion_nsis_header_string = "# Raptor version file\n\n!define RAPTOR_VERSION %s\n" % raptorversion
 	
@@ -73,6 +116,29 @@
 	print "Wrote raptorversion.nsh"
 	return 0
 	
+def generateinstallerversion(sbshome = None):
+	shellenv = os.environ.copy()
+	shellenv["PYTHONPATH"] = os.path.join(sbshome, "python")
+	
+	raptorversioncommand = "python -c \"import raptor_version; print raptor_version.numericversion()\""
+	
+	# Raptor version is obtained from raptor_version module's numericversion function.
+	sbs_version_matcher = re.compile(".*(\d+\.\d+\.\d+).*", re.I)
+	
+	# Create Raptor subprocess
+	versioncommand = subprocess.Popen(raptorversioncommand, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=shellenv)
+	raptorversion = ""
+	# Get all the lines matching the RE
+	for line in versioncommand.stdout.readlines():
+		res = sbs_version_matcher.match(line)
+		if res:
+			raptorversion = res.group(1)
+			print "Successfully determined Raptor version %s" % raptorversion
+
+	versioncommand.wait() # Wait for process to end
+	
+	return raptorversion
+	
 def unzipnsis(pathtozip):
     global tempdir
     tempdir = tempfile.mkdtemp()
@@ -94,11 +160,22 @@
 	global tempdir
 	print "Cleaning up temporary directory %s" % tempdir
 	shutil.rmtree(tempdir,True)
+	try:
+		os.remove("raptorversion.nsh")
+		print "Successfully deleted raptorversion.nsh."
+	except:
+		print "ERROR: failed to remove raptorversion.nsh - remove manually if needed."
 	print "Done."
 
 makensispath = unzipnsis(".\\NSIS.zip")
-generateinstallerversionheader(options.sbs_home)
-nsiscommand = makensispath + " /DRAPTOR_LOCATION=%s raptorinstallerscript.nsi" % options.sbs_home
+# generateinstallerversionheader(options.sbshome)
+raptorversion = options.versionprefix + generateinstallerversion(options.sbshome) + options.versionpostfix
+nsiscommand = makensispath + " /DRAPTOR_LOCATION=%s /DBV_LOCATION=%s /DCYGWIN_LOCATION=%s /DMINGW_LOCATION=%s /DPYTHON_LOCATION=%s /DRAPTOR_VERSION=%s raptorinstallerscript.nsi" % (options.sbshome, 
+				win32supportdirs["bv"],
+				win32supportdirs["cygwin"],
+				win32supportdirs["mingw"],
+				win32supportdirs["python"],
+				raptorversion)
 print "nsiscommand = %s" % nsiscommand
 runmakensis(nsiscommand)
 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
@@ -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).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
@@ -44,10 +44,9 @@
 
 # Custom includes (depend on above variables so much be here)
 !include "raptorinstallerutils.nsh" # Functions and macros for handling environment variables
-!include "raptorversion.nsh" # Define the RAPTOR_VERSION variable
+# !include "raptorversion.nsh" # Define the RAPTOR_VERSION variable
 
 # Defines
-# !define /date DATE_STAMP "%Y-%m-%d-%H-%M-%S"
 !define INSTALLER_NAME "Raptor v${RAPTOR_VERSION}"
 !define RAPTOR "sbs"
 !define INSTALLER_FILENAME "${RAPTOR}-${RAPTOR_VERSION}.exe"
@@ -79,8 +78,7 @@
 
 ##################### Pages in the installer #####################
 !insertmacro MUI_PAGE_WELCOME
-# Temporarily useing RELEASE-NOTES.txt as there is not license.txt
-!insertmacro MUI_PAGE_LICENSE ${RAPTOR_LOCATION}\RELEASE-NOTES.txt
+!insertmacro MUI_PAGE_LICENSE ${RAPTOR_LOCATION}\license.txt
 !define MUI_PAGE_HEADER_TEXT "Installation type"
 Page custom UserOrSysInstall UserOrSysInstallLeave
 !define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirLeave # Directory page exit function - disallow spaces in $INSTDIR
@@ -103,20 +101,30 @@
 	
     # Install Raptor
     SetOutPath "$INSTDIR\bin"
-    File /r ${RAPTOR_LOCATION}\bin\*.* 
+    File /r /x distribution.policy.s60 ${RAPTOR_LOCATION}\bin\*.* 
     SetOutPath "$INSTDIR\examples"
-    File /r ${RAPTOR_LOCATION}\examples\*.*
+    File /r /x distribution.policy.s60 ${RAPTOR_LOCATION}\examples\*.*
     SetOutPath "$INSTDIR\lib"
-    File /r ${RAPTOR_LOCATION}\lib\*.*
+    File /r /x distribution.policy.s60 ${RAPTOR_LOCATION}\lib\*.*
     SetOutPath "$INSTDIR\python"
-    File /r ${RAPTOR_LOCATION}\python\*.*
+    File /r /x distribution.policy.s60 ${RAPTOR_LOCATION}\python\*.*
     SetOutPath "$INSTDIR\schema"
-    File /r ${RAPTOR_LOCATION}\schema\*.*
-    SetOutPath "$INSTDIR\win32"
-    File /r ${RAPTOR_LOCATION}\win32\*.*
+    File /r /x distribution.policy.s60 ${RAPTOR_LOCATION}\schema\*.*
+    SetOutPath "$INSTDIR\win32\bin"
+    File /r /x distribution.policy.s60 ${RAPTOR_LOCATION}\win32\bin\*.*
+    SetOutPath "$INSTDIR\win32\bv"
+    File /r /x distribution.policy.s60 /x .hg ${BV_LOCATION}\*.*
+    SetOutPath "$INSTDIR\win32\cygwin"
+    File /r /x distribution.policy.s60 /x .hg ${CYGWIN_LOCATION}\*.*
+    SetOutPath "$INSTDIR\win32\mingw"
+    File /r /x distribution.policy.s60 /x .hg ${MINGW_LOCATION}\*.*
+    SetOutPath "$INSTDIR\win32\python264"
+    File /r /x distribution.policy.s60 /x .hg ${PYTHON_LOCATION}\*.*
     
     SetOutPath "$INSTDIR"
-    File ${RAPTOR_LOCATION}\RELEASE-NOTES.txt
+    File ${RAPTOR_LOCATION}\RELEASE-NOTES.html
+    SetOutPath "$INSTDIR\notes"
+    File /r /x distribution.policy.s60 ${RAPTOR_LOCATION}\notes\*.*
     
     
     ${Unless} $INSTALL_TYPE == "NO_ENV"
@@ -180,6 +188,7 @@
 	
 	# Generate batch file to set environment variables for Raptor
 	StrCpy $RESULT "@REM Environment variables for ${INSTALLER_NAME}$\r$\nset SBS_HOME=$INSTDIR$\r$\nset PATH=%SBS_HOME%\bin;%PATH%$\r$\n"
+	SetOutPath "$INSTDIR"
 	!insertmacro WriteFile "RaptorEnv.bat" "$RESULT"
 SectionEnd
 
@@ -326,7 +335,8 @@
     RmDir /r $INSTDIR\python
     RmDir /r $INSTDIR\schema
     RmDir /r $INSTDIR\win32
-    Delete $INSTDIR\RELEASE-NOTES.txt
+    Delete $INSTDIR\RELEASE-NOTES.html
+    RmDir /r $INSTDIR\notes
     Delete $INSTDIR\RaptorEnv.bat
     Delete $INSTDIR\${UNINSTALLER_FILENAME}
     
Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon: chomp.c
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
@@ -12,7 +12,7 @@
 * Contributors:
 *
 * Description: 
-*
+* Test program for grabbing and releasing the talon output semaphore.
 */
 
 
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
@@ -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"
@@ -21,10 +21,17 @@
 include $(SBS_HOME:\=/)/util/gccprogram.mk
 
 ifeq ($(filter win,$(HOSTPLATFORM)),win)
+CHOMP_C:=chomp.c
 PROCESS_C:=process_win.c
 CFLAGS:=-DHOST_WIN
+ifeq ($(SBS_MINGW),)
 LDFLAGS:=$(subst \,/,$(SBS_HOME:\=/)\win32\mingw\lib\libiberty.a)
 else
+LDFLAGS:=$(subst \,/,$(SBS_MINGW:\=/)\lib\libiberty.a)
+endif
+LDFLAGS:=$(LDFLAGS) -Wl,-lws2_32
+else
+CHOMP_C:=
 PROCESS_C:=process.c
 CFLAGS:=-g
 linux_PTHREADLIBS:=-lpthread
@@ -39,8 +46,7 @@
 MANIFEST:=$(SOURCEDIR)/manifest
 
 TARGET:=talon
-SOURCES:=$(addprefix $(SOURCEDIR)/,talon.c buffer.c sema.c log.c $(PROCESS_C))
-#$(info $(cprogram))
+SOURCES:=$(addprefix $(SOURCEDIR)/,talon.c buffer.c sema.c log.c $(PROCESS_C) $(CHOMP_C)) 
 $(eval $(cprogram))
 
 TARGET:=talonctl
@@ -59,3 +65,7 @@
 SOURCES:=$(addprefix $(SOURCEDIR)/,lock.c sema.c log.c)
 $(eval $(cprogram))
 
+TARGET:=testchomp
+SOURCES:=$(addprefix $(SOURCEDIR)/,testchomp.c chomp.c log.c)
+$(eval $(cprogram))
+
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
@@ -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"
@@ -176,11 +176,15 @@
 		p->returncode = WEXITSTATUS(status);
 		DEBUG(("process exited normally \n"));
 	} else {
+		if (p->causeofdeath == PROC_TIMEOUTDEATH)
+			p->returncode = 128;
+		else {	
 		p->causeofdeath = PROC_SOMEODDDEATH;
 		if (WIFSIGNALED(status))
 			p->returncode = WTERMSIG(status);
 		else
 			p->returncode = 128;
+		}
 		DEBUG(("process terminated \n"));
 	}
 	
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
@@ -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"
@@ -16,6 +16,11 @@
 */
 
 
+#ifdef HAS_WINSOCK2
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#define WIN32_LEAN_AND_MEAN
+#endif
 
 
 #include <stdlib.h>
@@ -33,17 +38,23 @@
 #include "buffer.h"
 #include "../config.h"
 
+#ifdef HAS_GETCOMMANDLINE
+#include "chomp.h"
+#endif
+
 /* The output semaphore. */
 sbs_semaphore talon_sem;
 
 #define TALON_ATTEMPT_STRMAX 32
 #define RECIPETAG_STRMAX 2048
-#define STATUS_STRMAX 100
+#define STATUS_STRMAX 120
 
 #define TALONDELIMITER '|'
 #define VARNAMEMAX 100
 #define VARVALMAX 1024
 
+#define HOSTNAME_MAX 100
+
 
 #include "log.h"
 
@@ -125,7 +137,7 @@
 				att++;
 			} while ( e < (VARNAMEMAX-1) && (isalnum(*att) || *att == '_'));
 			envvarname[e] = '\0';
-/* DEBUG(("envvarname: %s\n", envvarname)); */
+			/* DEBUG(("envvarname: %s\n", envvarname));*/ 
 			v = talon_getenv(envvarname);
 			if (v)
 			{
@@ -229,9 +241,20 @@
 	char *recipe = NULL;
 	int talon_returncode = 0;
 
+#ifdef HAS_WINSOCK2
+	WSADATA wsaData;
+
+	WSAStartup(MAKEWORD(2,2), &wsaData);
+
+	/* We ignore the result as we are only doing this to use gethostname
+	   and if that fails then leaving the host attribute blank is perfectly
+	   acceptable.
+	*/
+
+#endif
+
 #ifdef HAS_GETCOMMANDLINE
 	char *commandline= GetCommandLine();
-	DEBUG(("talon: commandline: %s\n", commandline));
 	/*
 	 * The command line should be either,
 	 * talon -c "some shell commands"
@@ -240,20 +263,12 @@
 	 *
 	 * talon could be an absolute path and may have a .exe extension.
 	 */
-	recipe = strstr(commandline, "-c");
-	if (recipe)
-	{
-		/* there was a -c so extract the quoted commands */
 
-		while (*recipe != '"' && *recipe != '\0')
-			recipe++;
 
-		if (*recipe != '"')    /* we found -c but no following quote */
+	recipe = chompCommand(commandline);
+	if (recipe)
 		{
-			error("talon: error: unquoted recipe in shell call '%s'\n", commandline);
-			return 1;
-		}
-		recipe++;
+		/* there was a -c so extract the quoted commands */
 		
 		int recipelen = strlen(recipe);
 		if (recipelen > 0 && recipe[recipelen - 1] == '"')
@@ -337,6 +352,20 @@
 
 	DEBUG(("talon: recipe: %s\n", recipe));
 
+	/* Make sure that the agent's hostname can be put into the host attribute */
+	char hostname[HOSTNAME_MAX];
+	int hostresult=0;
+	
+	hostresult = gethostname(hostname, HOSTNAME_MAX-1);
+	if (0 != hostresult)
+	{
+		DEBUG(("talon: failed to get hostname: %d\n", hostresult));
+		hostname[0] = '\0';
+	}
+
+	talon_setenv("HOSTNAME", hostname);
+	DEBUG(("talon: setenv: hostname: %s\n", hostname));
+
 	
 	char varname[VARNAMEMAX];
 	char varval[VARVALMAX];
@@ -549,14 +578,18 @@
 
 			if (dotagging) 
 			{
-				char *forcesuccessstr = force_success == 0 ? "" : " forcesuccess='FORCESUCCESS'";
+				char *flagsstr = force_success == 0 ? "" : " flags='FORCESUCCESS'";
+				char *reasonstr = "" ;
+
+				if (p->causeofdeath == PROC_TIMEOUTDEATH)
+					reasonstr = " reason='timeout'";
 
 				if (p->returncode != 0)
 				{
-					char *exitstr = retries > 0 ? "retry" : "failed";
-					snprintf(status, STATUS_STRMAX - 1, "\n<status exit='%s' code='%d' attempt='%d'%s />", exitstr, p->returncode, attempt, forcesuccessstr );
+					char *exitstr = (force_success || retries <= 0) ? "failed" : "retry";
+					snprintf(status, STATUS_STRMAX - 1, "\n<status exit='%s' code='%d' attempt='%d'%s%s />", exitstr, p->returncode, attempt, flagsstr, reasonstr );
 				} else {
-					snprintf(status, STATUS_STRMAX - 1, "\n<status exit='ok' attempt='%d'%s />", attempt, forcesuccessstr );
+					snprintf(status, STATUS_STRMAX - 1, "\n<status exit='ok' attempt='%d'%s%s />", attempt, flagsstr, reasonstr );
 				}
 				status[STATUS_STRMAX-1] = '\0';
 	
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
@@ -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"
@@ -12,7 +12,10 @@
 * Contributors:
 *
 * Description: 
-*
+* This program reads from stdin into a "buffer" structure. It is designed to be
+* run from within valgrind to detect memory corruption errors.
+* The buffer is then written to /tmp/outfile where it can be compared
+* with the input to determine if they are the same
 */
 
 
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
@@ -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"
@@ -12,7 +12,11 @@
 * Contributors:
 *
 * Description: 
-*
+* This programs tests the process execution functions in talon.
+* it executes it's first argument with the following arguments 
+* as parameters to it.  Output is buffered and finally printed.
+* Should be run from within valgrind if possible to detect memory
+* corruption errors.
 */
 
 
Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/util/talon/tests: config.sh
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
@@ -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"
@@ -13,8 +13,8 @@
 #
 # Description: 
 #
+include settings.mk
 
-SHELL:=$(TALON)
 TALON_RECIPEATTRIBUTES:=name='$$RECIPENAME' host='$$HOSTNAME'
 export TALON_RECIPEATTRIBUTES
 
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
@@ -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"
@@ -14,7 +14,7 @@
 # Description: 
 #
 
-SHELL:=$(TALON)
+include settings.mk
 TALON_TIMEOUT:=4000
 TALON_RETRIES:=4
 TALON_RECIPEATTRIBUTES:=platform='$$PLATFORM' mmp='$$MMP' bldinf='$$BLDINF'
@@ -23,6 +23,11 @@
 $(info testing timeouts)
 $(info )
 
-all:
+.PHONY: all passed
+
+all: passed
+	@echo "t4-PASSED"
+
+passed:
 	@|PLATFORM=armv5;MMP=barney.mmp;BLDINF=somebld.inf;|echo "Started a slow command under talon (attempt $$TALON_ATTEMPT):";echo "SHELL=$$SHELL";if (( $$TALON_ATTEMPT <4 )); then echo sleeping 6; sleep 6; echo "hi"; else echo "Not sleeping this time"; fi; echo "this should not appear in the recipe tags unless you try 4 times."
 
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
@@ -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"
@@ -13,6 +13,7 @@
 #
 # Description: 
 #
+include settings.mk
 
 all:
 	||"echo this command should cause a bash error which should be visible"
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
@@ -14,6 +14,7 @@
 # Description: 
 #
 
+include settings.mk
 
 HOSTNAME:=fred
 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
@@ -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"
@@ -14,9 +14,7 @@
 # Description: 
 #
 
-SHELL:=$(SBS_HOME)/win32/bin/talon.exe
-TALON_SHELL:=$(SBS_HOME)/win32/cygwin/bin/bash.exe
-TALON_BUILDID:=1
+include settings.mk
 TALON_RECIPEATTRIBUTES:=123
 
 export
Binary files /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/win32/bin/ransleep.exe and /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/win32/bin/ransleep.exe differ
Binary files /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/win32/bin/talonctl.exe and /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/win32/bin/talonctl.exe differ
Binary files /home/imk/symbian/epocroot-pdk-3.0.i/latest_build/build/sbsv2/raptor/win32/bin/talon.exe and /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/win32/bin/talon.exe differ
Only in /home/imk/symbian/epocroot-pdk-3.0.i/linux_build/sbsv2/raptor/win32/bin: unhide_ci_refs.exe
