# HG changeset patch # User tnmurphy@4GBL06592.nokia.com # Date 1258364806 0 # Node ID e1eecf4d390db36d5bd76d0ba16f5c782838f103 # Parent be27ed110b50fb12348ad055d037632be8dcdf2d Team sf branch. Excluded win32 dir and also test epocroot Added test directory diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/RELEASE-NOTES.txt --- a/sbsv2/raptor/RELEASE-NOTES.txt Wed Oct 28 14:39:48 2009 +0000 +++ b/sbsv2/raptor/RELEASE-NOTES.txt Mon Nov 16 09:46:46 2009 +0000 @@ -1,662 +1,684 @@ - -Release Notes for Symbian Build System v2 - -version 2.10.0 - -New Features: -Support for GCCE compiler -More efficient Feature Variation support - - -version 2.9.3 - -Defect Fixes: -DPDEF142166 Raptor sometimes invokes checklib.exe with incorrect parameters -DPDEF141354 EXPORTUNFROZEN fails in target builds if .savespace is applied -DPDEF141533 Inconsistent log output -DPDEF141604 file winscw.auto.bat is released two times -DPDEF141787 Raptor treats EFREEZE info message as warnings - -Other Changes: -talon can read commands from a temporary file as well as with -c - - -version 2.9.2 - -Defect Fixes: -DPDEF141531 Incorrect RVCT variables passed to TEM -DPDEF141837 Some problems with dependency (.d) files -DEF140258 Aborting SBSv2 mid-build often leads to corrupt .d files which prevent rebuilds -DPDEF142049 Garbage in the Raptor log file -DPDEF141954 Raptor: "tools" config static libraries can have incorrect compilation macros -DPDEF141974 Raptor: "tools" builds can fail when done in combination with "tools2" builds - -Other Changes: -Static libraries cannot be feature variant -Option --no-depend-include for very big builds - - -version 2.9.1 - -Defect Fixes: -DPDEF141503 RMTPClient::StartTransport Panic when using emulated test tranport plugin -DPDEF141688 ARMV6 builds with SBSv2 have problems with missing DEF files - - -version 2.9.0 - -New Features: -Talon shell to reduce memory usage and improve stability. -Support for RVCT 4.0 advanced features. -Optionally use SBS_CYGWIN, SBS_MINGW and SBS_PYTHON to locate tools. -Makefile to build host tools on Linux. -Single-file compilation for IDE integration. -Splitlog and CheckSource filters. - -Defect Fixes: -DPDEF141523 Raptor links kernel-side components to scppnwdl.dso -DPDEF141418 Raptor turns echo on -DPDEF141495 Raptor doesn't deal correctly with SOURECEPATH beginning with '/' -DPDEF141388 raptor inserts epoc32\include at start of systeminclude path - - -version 2.8.6 - -DPDEF135505 Some TEMs have race conditions for simultaneous urel and udeb. cp fails. -DPDEF141498 If make crashes, Raptor exits with 0 errors -DPDEF141071 Raptor: GCCXML build does not support the VAR2 TARGETTYPE -DPDEF140816 STDCPP keyword in mmp file not interpreted by gccxml tool chain -DPDEF137727 [Raptor Rollout] Raptor fails to build certain .mbg and .rsg files -DPDEF137494 SBSv2: preprocessor warnings and errors might cause invalid XML in log -DPDEF140731 Missing dependency files when building from clean -DPDEF140540 [System Build]: Changes of Raptor cause 94_331 build failed -DPDEF141129 raptor generates unknown origin file - -Other Changes: -Fix to support trace compiler switch -Better message for duplicate objects, states which file overrides which. -Refactor to avoid "defects" of missing OS variants. - - -version 2.8.5 - -Defect Fixes: -DPDEF141102 SBS doesn't set the paging attribute of excutables correctly -DPDEF140731 Missing dependency files when building from clean -DPDEF135620 Workaround for broken static libraries - - -version 2.8.4 - -Defect Fixes: -DPDEF140839 RComp crashes if it's built with sbs -DPDEF140929 OPTION GCCE in MMP files generates a build warning -DPDEF135436 SBSv2 - Python traceback when illegal characters appear on command line - - -version 2.8.3 - -Defect Fixes: -DPDEF139904 Raptor: .def file FREEZE attempted for ARMV5 when it shouldn't be -DPDEF140589 Raptor: .def file FREEZE attempted for WINSCW when it shouldn't be -DPDEF140456 Raptor build error with -c tools_rel -DPDEF139759 Raptor warning regarding EXPORTSUNFROZEN is ambiguous -DPDEF135436 SBSv2 - Python traceback when illegal characters appear on command line -INC140156 SBSv2 crashes when build QtWebkit for ARMV5 - -Other Changes: -Add to show which variant.hrh file is used. -Replaced the corrupted awk.exe in cygwin distro. -Fix previous trace compiler auto run mechanism. -ROMFILE improvements. - - -version 2.8.2 - -Defect Fixes: -DPDEF140540 [System Build]: Changes of Raptor cause 94_331 build failed - -Other Changes: -Tolerate XML schema 1_0 files where possible. -Treat system definition schema 1.[3-9] files the same as schema 1.4 files. -Remove checksource and its python site-packages. - - -version 2.8.1 - -Defect Fixes: -DPDEF140165 SBS error when creating info.xml on component base_omaph2 -DPDEF132996 Location of generated auto.bat files is inconsistent - -Other Changes: -Feature variant "ln -f" fails intermittently in parallel builds. -Traceback when "group" elements are redefined in XML. -Trace compiler should run automatically if a trace path exists. -Need a workaround for Carbide Missing SDK problem. - - -version 2.8.0 - -New Features: -XML schema 2.0 with new alias and group elements. - -Removed: -XML config element (use var instead). -XML .first and .last mechanism (use alias or group instead). - -Defect Fixes: -DPDEF140082 SBS cause env to dirty state -DPDEF138565 SBSV2 doesn't define the correct macros for ARMV6 -DPDEF139950 SBSv2 Filter Handling not Robust enough - bad filters stop build. -DEF139686 [TCL Build] coredumpserver compile warnings in DP00458 - - -version 2.7.2 - -Defect Fixes: -DPDEF139420 Raptor config does not correctly handle mifconv causing resource build errors -DPDEF138679 Raptor does not create a DEFFILE when building for winscw_urel -DPDEF139692 SBSV2: 'virtual memory exhausted' when building multiple variants -DPDEF136321 SBSv2: Zip exports not cleaned -INC139622 OPTION_REPLACE does not work properly in SBSv2 - -Other Changes: -Added utility.prebuilt FLM. - - -version 2.7.1 - -Defect Fixes: -DPDEF138366 [T15379] Raptor raise some warnings when build Coredumpserver -DPDEF139405 SBSV2: Trace compilation fails with large numbers of files. -DPDEF139572 SBSV2: Changes to '--cpu' option syntax breaks existing MMP files. -DPDEF139456 Toolcheck file is not created if EPOCROOT is \ -DPDEF133766 Poor SBSv2 reallyclean performance -DPDEF135780 SBSV2: REALLYCLEAN is not cleaning all files - - -version 2.7.0 - -New Features: -DS.1744 Recognize LINKEROPTION in MMP file -DS.1744 Compiled objects on local filesystem (SBS_BUILD_DIR) - -Partial Deliveries: -DS.1744 CheckSource in Raptor - -Defect Fixes: -DPDEF138293 Carbide: Raptor doesn't resolve variant.cfg entries starting with "\" correctly - - -version 2.6.5 - -Defect Fixes: -DPDEF138930 Raptor needs to change to match new trace compiler interface - - -version 2.6.4 - -Defect Fixes: -DPDEF138527 [TCL Build] Miss tracecompiler.mk and exclude group for Raptor export -DPDEF138484 Raptor uses wrong guard causing trace compiler ignores some projects. -DPDEF138720 BV product folders have missing map files -DPDEF138721 Raptor uses wrong lib when mmp keyword FIRSTLIB presents. -DPDEF138053 SBSv2: tools platform: tools not installed by the time they need to be used. -DPDEF138164 Carbide: Raptor crashes on unrecognised buildinfo.txt content -DPDEF138296 SBSV2 disables all TOOLS2 compiler warnings -DPDEF138329 Raptor generates marker file for trace compiler when it's not done -DPDEF138352 SBSv2: rollout - unsplit EC makefiles not generating correct deps 4 missing .mbg -DPDEF138480 SBSv2: rollout. Created files sometimes have insufficient permissions on Windows -DPDEF137511 SBSv2 doesn't behave correctly with the default paging policy - - -version 2.6.3 - -Defect Fixes: -DPDEF133508 Number of errors is counted wrong -DPDEF138098 UID issue in Trace Compiler for Raptor -DPDEF138296 SBSV2 disables all TOOLS2 compiler warnings - - -version 2.6.2 - -Defect Fixes: -DPDEF135330 Raptor Rollout: bangalore messaging winscw udeb test code -DPDEF137726 Missing mscvr_readme.txt from the SBSv2 drop -DPDEF137739 SBSv2: rollout - .cia object files can conflict with .cpp object files - - -version 2.6.1 - -Defect Fixes: -DPDEF137239 raptor does not include the msvcr71 runtime library -DPDEF137489 BV builds try and write generated .s files in the wrong directory - - -version 2.6.0 - -New Features: -DS.1542 SBSv2 generates Open System Trace dictionaries -DS.1629 Resource autodependencies - - -version 2.5.5 - -Defect Fixes: -DPINC137379 Emulator: Cursor is missing on emulator buttons -DPDEF133640 SBSv2 usrt3_1.lib is missing from epocroot/epoc32/release/armv5/ - - -version 2.5.4 - -Defect Fixes: -DPDEF136719 Raptor: sbsv2cache.py cache file generation fails with very large log files -DPDEF136715 On Linux the shipped python 2.5.2 is not found -DPDEF132996 SBSv2 doesn't generate AUTO.BAT file -DPDEF136382 SBSv2: explicit dll versioning not supported on arm platforms -DPDEF135843 [Raptor Rollout] Raptor does not support OPTION_REPLACE ARMASM/OPTION ARMASM -DPDEF136693 makesis fails when multiple instances are run concurrently with the same target - - -version 2.5.3 - -Defect Fixes: -DPDEF136162 Raptor: resource dependencies require metadata workarounds -DPDEF128288 SBSv2 does not fully support build target customization. -DPDEF132880 BV builds cannot find system static libraries -DPDEF133835 SBSv2 cannot build for ARMV6 or ARM9E - - -version 2.5.2 - -Defect Fixes: -DPDEF135983 cpp-raptor crashes if source code contains builtin macro __FILE__ -DPDEF133808 Raptor does not support OPTION --no_rtti with mixed assembly/C++ projects -DPDEF135577 SBSv2: rollout - TOOLS/TOOLS2 exes sometimes not executable or writable. - - -version 2.5.1 - -Defect Fixes: -DPDEF135258 createvmap.py script can hang in BV builds -DPDEF135385 warnings in RunModeDebugger in M04816vFuture with ARMV7 - - -version 2.5.0 - -New Features: -DS.1568 User defined configuration file location(s) - - -version 2.4.3 - -Defect Fixes: -DPDEF134322 SBSV2 uses the wrong library when building STDCPP targets -DPDEF132923 SBSv2 freeze don't add Vtable and RTTI information into def file for arm dll -DPDEF133775 SBSv2: ARMFPU is not passed to compiler -DPDEF134023 case inconsistency with libOpenVG.lib - -Other Changes: -MINOR_CHANGE updated all copyright notices for SF delivery -MINOR_CHANGE added vtb91sf variant for SF Timebox 9:1 builds -MINOR_CHANGE added vtb92sf variant for SF Timebox 9:2 builds - - -version 2.4.2 - -Defect Fixes: -DPDEF133820 Raptor Rollout: EXPORTUNFROZEN processing incorrect in ARMV5 builds -DPDEF132033 Raptor picks up the wrong bld.inf macros when building for RVCT 3.1 -DPDEF133772 SBSv2: console log includes some winscw warnings that should be suppressed - - -version 2.4.1 - -Defect Fixes: -DPDEF133639 Raptor Rollout:TEF test server doesn't start under SBSv2 - OK with abld -DEF133255 [System Build]: Error in compiling NaviEngine Unistore on ARMV7 M04816 vFuture -DPDEF127973 Freeze fails with SBSv2 under some environments - - -version 2.4.0 - -New Features: -DS.1475 Pluggable Log Summariser -DS.1476 Use FLMs from the source tree - -Defect Fixes: -DPDEF133417 SBSv2: tmp mounting errors on startup - - -version 2.3.3 - -Defect Fixes: -DPDEF130261 sbs does not support explicit option to version keyword -DPDEF130598 sbs does not provide debug and nodebug variants -DPDEF131630 Raptor smoke tests break when EPOCROOT=\ on Windows -DPDEF132898 no TEM nbl2.lib dependencies for armv7 -DPDEF133035 SBSv2 - Tools2 build does not include -m32 option. Stlport flm also doesn't. -DPDEF133176 SBSv2 ignores compillation error for "unidentified identifier" for winscw build - - -version 2.3.2 - -Other Changes: -MINOR_CHANGE added vtb92 variant for Timebox 9:2 builds - - -version 2.3.1 - -Defect Fixes: -DPDEF132374 SBSv2: Directory creation can fail leading to build errors -DPDEF132070 SBSv2: stlport 5.2 build fails - library generated to wrong directory -DPDEF128378 SBSv2 help for global targets only shown when a target is given -DPDEF129634 ALWAYS_BUILD_AS_ARM does not suppress __MARM_THUMB__ with SBSv2 - - -version 2.3.0 - -New Features: -DS.1424 Support for ARMV5SMP platform - -Defect Fixes: -DPDEF129804 SBSv2 crashes when there are double \\ in prj_mmpfiles in bld.inf -DPDEF130892 SBSv2: Reallyclean fails on TEM files -DPDEF131619 SBSv2: ABIv1 .lib files aren't generated for -c armv5 -c armv5.smp -DPDEF131637 SBSv2: stlport can fail to build under Cygwin - "/tmp no such directory" -DPDEF131891 [System Build]: Errors in GT stage in Build M04774 vfuture - - -version 2.2.9 - -Defect Fixes: -DPDEF129804 SBSv2 crashes when there are double \\ in prj_mmpfiles in bld.inf -DPDEF131637 SBSv2: stlport can fail to build under Cygwin - "/tmp no such directory" -DPDEF130892 SBSv2: Reallyclean fails on TEM files - - -version 2.2.8 - -Defect Fixes: -DPDEF130569 .lib files for SSM targets build with different name compared to abld -DPDEF130571 libxml2 component contains GCCXML build errors -DPDEF131312 SBSv2 - DEBUGGABLE_UDEBONLY not supported by SBSv2 (Raptor) - - -version 2.2.7 - -Defect Fixes: -DPDEF130533 SBSv2 fails to run when installed from SITK -DPDEF130452 Some rcomp warnings need to be disabled -DPDEF130286 SBSv2: sbs freezes during CLEAN and REALLYCLEAN operations. -DPDEF127973 Freeze fails with SBSv2 under some environments -DPDEF128455 Error during freeze with SBSv2 -DPDEF127149 SBSv2 TEM/extension makefile build doesn't support the .savespace variant - - -version 2.2.6 - -Defect Fixes: -DPDEF130008 SBSv2 should recognize these new keywords: SMPSAFE, PAGEDCODE, PAGEDDATA, UN... -DPDEF127887 Current directory wrong when executing extension makefiles in SBSv2 -DPDEF128915 CCheckEnv ERROR: CBRPatch: Absent file -DPDEF127675 Raptor does not process stringtables correctly when HEADERONLY is on -DPDEF127878 give wrong mmp filename for -p option should cause error in SBSv2 - -Other Changes: -Uses cygwin instead of msys for improved stability. -Includes python 2.5.2 instead of using py2exe. - - -version 2.2.5 - -Defect Fixes: -DEF127329 OMAP H4 Unistore2 Failure in Raptor 9.5 GT build -DPDEF128632 SBSv2 : bld.inf ':zip' exports don't maintain timestamps, with an e32 impact -DPDEF127399 SBSv2 -p .mmp options also builds .mk files - - -version 2.2.4 - -Defect Fixes: -DPDEF129187 SBSv2: ABIv1 .lib files are required (again) - - -version 2.2.3 - -Defect Fixes: -DPDEF128916 C Standard Library failed on cia2cpp2o armv5 with 1 -DPDEF128503 sbs 2.2.0 produce malformed xml log on Linux with pvmgmake -DPDEF127604 SIS registry panics at startup on emulator if SWI is built with SBS -DPDEF128690 SBSv2 generates error when using emake on REALLYCLEAN target - -Other Changes: -MINOR_CHANGE log summariser updated to deal with errors starting "make.exe: ***" - - -version 2.2.2 - -Defect Fixes: -DPDEF127497 SBSv2 does not clean when -k or other switch is used with abld wrapper -DPDEF127829 'cannot open Meta file' warning with SBSv2 -DPDEF127371 abld -v not working correctly through sbsv2 -DPDEF127555 SBSv2 doesn't do "romfile" - -Other Changes: -MINOR_CHANGE made the default number of jobs 4 - - -version 2.2.1 - -Defect Fixes: -DPDEF128498 SBS creates paths with extra slashes which can cause problems - -Other Changes: -MINOR_CHANGE Removed temporary ABIv1 .lib generation -MINOR_CHANGE Added monty test data to the test folder - - -version 2.2.0 - -New Features: -DS.1347 SBSv2 Compiler Selection -DS.1348 SBSv2 allow mixed slashes - -Defect Fixes: -DPDEF127904 SBSv2 : recent installdefaultcommdb has broken the 9.4 build -DPDEF128022 SBSv2: Unrecognised Keyword ['romtarget .dll'] warnings -DPDEF127815 SBSv2: PAGED and EPOCCALLDLLENTRYPOINTS keywords not supported -DPDEF127890 SBSv2: TARGETPATH in mmps (also resources, bitmaps) must cope with backslashes -DPDEF128229 SBSv2: some command invocations can fail, but could be "re-tried" - - -version 2.1.10 - -Defect Fixes: -DPDEF126662 Intermittent networking_dhcp compilation failure in Raptor build GT phase -DPDEF127799 SBSv2: zip and unzip commands not found in some builds -DPDEF127665 ARMV7 libraries have wrong link order in Raptor - - -version 2.1.9 - -Defect Fixes: -DPDEF127498 SBSv2: importlibversioned_abiv1 intermittently fails in ARMV5 builds -DPDEF125483 CDB breaks due to Attribute values not matching expected values -DPDEF126335 Intermittent GT errors due to "make" not being found on the PATH -DPDEF127562 SBSv2 will not unzip the same file into more than one location -DPDEF127626 SBSv2: sed version on windows is out of date - - -version 2.1.8 - -Defect Fixes: -DPDEF125478 CDB breaks caused by file path/name mismatch -DPDEF125145 Incorrect file access permissions for sbs v2.0.14 in Linux distribution -DPDEF126126 Intermittent "Segmentation fault" error in Raptor GT phase -DPDEF124836 SBSv2 cannot build just a single .mmp file from a bld.inf file -DPDEF126675 Performance regression in SBSv2 python frontend caused by regex usage, -DPDEF126790 groupin10 is not used in artarget_func -DPDEF125639 TEM variables are reported incorrectly when building TEM for ARMV7 -DPDEF124273 abld help is ugly and hard to read -DPDEF126614 "Virtual memory exhausted. Stop" error when building with SBSV2 - - -version 2.1.7 - -Defect Fixes: -DPDEF124290 SBS -e pvmgmake -j 12 on Linux produces malformed xml log files -DPDEF126241 SBSv2 : SECURE_DATA error when building uiklaf toolkit in TechView -DPDEF126328 Performance regression and related excessive memory usage in daily Raptor builds - - -version 2.1.6 - -Defect Fixes: -DPDEF125740 SBSv2: Builds can hang during the GT stage in Windows builds when using "-j x" -DPDEF125145 Incorrect file access permissions for sbs v2.0.14 in Linux distribution - - -version 2.1.5 - -Defect Fixes: -DPDEF125812 There is no user created init.xml configuration file - - -version 2.1.4 - -Defect Fixes: -DPDEF124680 Raptor builds hang at "tools2" compilation phase -DPDEF125304 Raptor crashes when running abld - - -version 2.1.3 - -Defect Fixes: -DPDEF125394 sbs_2.1.0_(RC1) Building complete OS gives armasm errors on Windows -DPDEF122556 GT0367: CLEANEXPORT target is not cleaning files with a space in them -DPDEF124691 Raptor should ignore the new SMPSAFE keyword -DPDEF125031 SBSv2 Stringtable build fails when EXPORTPATH specified - - -version 2.1.2 - -Change Requests: -CR1413 Support for different toolchains to be called by SBSv1 and SBSv2 - - -version 2.1.1 - -Defect Fixes: -DEF124748 GCCXML errors in Raptor related to missing arm lib files -DEF124756 Raptor build : Orphan files reported in CBR phase -DEF124758 Raptor build CBR errors due to missing ".a" files -DEF124573 CDB breaks in Raptor build due to missing header,dll and lib files - - -version 2.1.0 - -Change Requests: -CR1479 Add Armv7 support into SBSv2 - -Defect Fixes: -DEF124543 Raptor does not handle the STDCPP keyword correctly -DEF124515 GT0367: 'bldmake plat' should now show ARMV7 - - -version 2.0.14 - -Defect Fixes: -DEF124705 CBR errors in raptor builds due to missing rpp files -DEF120328 SBS v2.0 configuration files cannot be validated -INC124096 Long list of MMP macros causes crashdump with .s files -DEF124702 GT0367: Semaphores need altering to correct possible hangs (on Linux) - - -version 2.0.13 - -Defect Fixes: -DEF123653 SBS -j 16 on Windows produces malformed xml log files - - -version 2.0.12 - -Defect Fixes: -DEF123987 Raptor does not build a lot of .lib files for ARMV5 -DEF123981 SBSv2 doesn't generate DSO when EXPORTUNFROZEN is specified. - - -version 2.0.11 - -Defect Fixes: -DEF123988 SBSv2 does not produce rpp files -DEF123766 SBSv2 log output does not match the specification -DEF122781 GT0367: 'bldmake bldfiles' output not going to stdout -DEF122885 GT0367: Need to stop sbs -abld functioning on Linux -DEF123354 GT0367: Incorrect output if the number of jobs provided is invalid - - -version 2.0.10 - -Defect Fixes: -DEF123984 SBSv2 generates more warnings than abld -DEF124139 GT0367: SBS causes a Python Traceback when a system_definition.xml error occurs -DEF123601 SBSv2 : Python traceback error is reported when try to build systemtest code -DEF123916 SBSv2 : "tools" build warns about overrides when "OPTION MSVC /w" in .mmp files - - -version 2.0.9 - -Defect Fixes: -PDEF124028 .GXP files not getting created when built for GCCXML target -DEF123653 SBS -j 16 on Windows produces malformed xml log files -DEF123586 dso file is not remade when def file changes -DEF122541 SBSv2 -what should report resource files -DEF123265 Incorrect file access permissions for sbs v2.0.7 in Linux dist -DEF123317 SBSv2 -what got error for whatexports if too much exports -DEF123439 SBSv2 : Exports not performed in total before .mmp processing in sysdef builds -DEF123552 STLport doesn't build with Raptor on Linux -DEF123260 GT0367: Circular references in config files not handled - - -version 2.0.8 - -Defect Fixes: -DEF122930 SBSv2:Target type exexp giving errors while building for winscw -DEF123028 Raptor generating double slashes in command files -DEF123048 SBSv2: build with -k (keep-going) stops when export makefile has a failure. -DEF123069 False 'missing mmp file' errors reported by SBSv2 -DEF122472 SBSv2 doesn't report content of unpacked zip files -DEF122534 SBSv2 -what should not report .sym files -DEF123181 SBSv2: Failure of one export in python aborts remaining exports for bld.inf -DEF123289 SBSv2 : Netcards doesn't build for "tools" in an SBSv2 build -DEF123418 SBSV2: stlport build can fail with "no rule to make target" -DEF123084 SBSv2: exits with an exception if -c option specifies non-existent configuration -INC122876 Electric Accelerator build fails with Raptor - - -version 2.0.7 - -Defect Fixes: -DEF122784 Large MMP files and GNUMAKEFILE causes shell to crash -DEF122760 Problems with bmconv command files preventing bitmap generation? -DEF122803 SBSv2 - Freeze doesnt work properly for OE target types -DEF122833 SBSV2 Performance is poor with -j16 using the GNU Make engine -DEF122535 GT0367: Invalid system_definition.xml causes SBSv2 layering crash -DEF122570 SBSv2 : certain "-m" values cause a crash at makefile generation -DEF122604 Errors in GT only build using sbsv2 on Windows -DEF122796 Wrong default value for PVMGMAKE in make.xml -DEF122783 SBSv2 WINSCW builds can produce incorrectly linked executables under emake -DEF122785 log summariser crashes if errors contain % characters -DEF122870 SBSv2 assembling .s files fails. -DEF120473 Enable Windows and Linux Tools to Cohabit -DEF121826 Pre-include HRH file directory from variant.cfg fails for template extension mak -DEF121907 Raptor crashes when exporting zip file that already exists -DEF122523 SBSv2 Logging output affected by bash version on Linux -DEF122788 SBSv2: We don't ensure correct version of Make for TEMs and for use in FLMs - - -version 2.0.6 - -The first release of SBSv2 in the SITK. - + +Release Notes for Symbian Build System v2 + +version 2.10.2 + +Defect Fixes: +DPDEF142958 regression - ARMV6 and __ARMV6__ are not defined for armv6_urel builds +DPDEF142730 Raptor crashes with improper VERSION syntax +DPDEF142928 RVCT 4.0: Linker error when the MMP files modifies the --cpu option + + +version 2.10.1 + +Defect Fixes: +DPDEF142666 Cannot remove frozen exports from EABI DEF file in SBSv2 +DPDEF142745 OPTION_REPLACE problems with RVCT 4.0 +DPDEF140622 feature variant configuration file with non exist file set to 'FEATURELISTFILES' +DPDEF141195 Raptor doesn't handle spaces in tool paths +DPDEF142616 Raptor: Variables can be set unnecessarily prior to TEM execution +DPDEF142455 Disable warning L6780W for certain components +DPDEF142447 GCC-E: Raptor compiles CIA files as Thumb +DPDEF142448 GCC-E: Raptor tries to build ABIV1 import libraries +DPDEF142451 GCC-E: Raptor treats C files as C++ files. + + +version 2.10.0 + +New Features: +Support for GCCE compiler +More efficient Feature Variation support + + +version 2.9.3 + +Defect Fixes: +DPDEF142166 Raptor sometimes invokes checklib.exe with incorrect parameters +DPDEF141354 EXPORTUNFROZEN fails in target builds if .savespace is applied +DPDEF141533 Inconsistent log output +DPDEF141604 file winscw.auto.bat is released two times +DPDEF141787 Raptor treats EFREEZE info message as warnings + +Other Changes: +talon can read commands from a temporary file as well as with -c + + +version 2.9.2 + +Defect Fixes: +DPDEF141531 Incorrect RVCT variables passed to TEM +DPDEF141837 Some problems with dependency (.d) files +DEF140258 Aborting SBSv2 mid-build often leads to corrupt .d files which prevent rebuilds +DPDEF142049 Garbage in the Raptor log file +DPDEF141954 Raptor: "tools" config static libraries can have incorrect compilation macros +DPDEF141974 Raptor: "tools" builds can fail when done in combination with "tools2" builds + +Other Changes: +Static libraries cannot be feature variant +Option --no-depend-include for very big builds + + +version 2.9.1 + +Defect Fixes: +DPDEF141503 RMTPClient::StartTransport Panic when using emulated test tranport plugin +DPDEF141688 ARMV6 builds with SBSv2 have problems with missing DEF files + + +version 2.9.0 + +New Features: +Talon shell to reduce memory usage and improve stability. +Support for RVCT 4.0 advanced features. +Optionally use SBS_CYGWIN, SBS_MINGW and SBS_PYTHON to locate tools. +Makefile to build host tools on Linux. +Single-file compilation for IDE integration. +Splitlog and CheckSource filters. + +Defect Fixes: +DPDEF141523 Raptor links kernel-side components to scppnwdl.dso +DPDEF141418 Raptor turns echo on +DPDEF141495 Raptor doesn't deal correctly with SOURECEPATH beginning with '/' +DPDEF141388 raptor inserts epoc32\include at start of systeminclude path + + +version 2.8.6 + +DPDEF135505 Some TEMs have race conditions for simultaneous urel and udeb. cp fails. +DPDEF141498 If make crashes, Raptor exits with 0 errors +DPDEF141071 Raptor: GCCXML build does not support the VAR2 TARGETTYPE +DPDEF140816 STDCPP keyword in mmp file not interpreted by gccxml tool chain +DPDEF137727 [Raptor Rollout] Raptor fails to build certain .mbg and .rsg files +DPDEF137494 SBSv2: preprocessor warnings and errors might cause invalid XML in log +DPDEF140731 Missing dependency files when building from clean +DPDEF140540 [System Build]: Changes of Raptor cause 94_331 build failed +DPDEF141129 raptor generates unknown origin file + +Other Changes: +Fix to support trace compiler switch +Better message for duplicate objects, states which file overrides which. +Refactor to avoid "defects" of missing OS variants. + + +version 2.8.5 + +Defect Fixes: +DPDEF141102 SBS doesn't set the paging attribute of excutables correctly +DPDEF140731 Missing dependency files when building from clean +DPDEF135620 Workaround for broken static libraries + + +version 2.8.4 + +Defect Fixes: +DPDEF140839 RComp crashes if it's built with sbs +DPDEF140929 OPTION GCCE in MMP files generates a build warning +DPDEF135436 SBSv2 - Python traceback when illegal characters appear on command line + + +version 2.8.3 + +Defect Fixes: +DPDEF139904 Raptor: .def file FREEZE attempted for ARMV5 when it shouldn't be +DPDEF140589 Raptor: .def file FREEZE attempted for WINSCW when it shouldn't be +DPDEF140456 Raptor build error with -c tools_rel +DPDEF139759 Raptor warning regarding EXPORTSUNFROZEN is ambiguous +DPDEF135436 SBSv2 - Python traceback when illegal characters appear on command line +INC140156 SBSv2 crashes when build QtWebkit for ARMV5 + +Other Changes: +Add to show which variant.hrh file is used. +Replaced the corrupted awk.exe in cygwin distro. +Fix previous trace compiler auto run mechanism. +ROMFILE improvements. + + +version 2.8.2 + +Defect Fixes: +DPDEF140540 [System Build]: Changes of Raptor cause 94_331 build failed + +Other Changes: +Tolerate XML schema 1_0 files where possible. +Treat system definition schema 1.[3-9] files the same as schema 1.4 files. +Remove checksource and its python site-packages. + + +version 2.8.1 + +Defect Fixes: +DPDEF140165 SBS error when creating info.xml on component base_omaph2 +DPDEF132996 Location of generated auto.bat files is inconsistent + +Other Changes: +Feature variant "ln -f" fails intermittently in parallel builds. +Traceback when "group" elements are redefined in XML. +Trace compiler should run automatically if a trace path exists. +Need a workaround for Carbide Missing SDK problem. + + +version 2.8.0 + +New Features: +XML schema 2.0 with new alias and group elements. + +Removed: +XML config element (use var instead). +XML .first and .last mechanism (use alias or group instead). + +Defect Fixes: +DPDEF140082 SBS cause env to dirty state +DPDEF138565 SBSV2 doesn't define the correct macros for ARMV6 +DPDEF139950 SBSv2 Filter Handling not Robust enough - bad filters stop build. +DEF139686 [TCL Build] coredumpserver compile warnings in DP00458 + + +version 2.7.2 + +Defect Fixes: +DPDEF139420 Raptor config does not correctly handle mifconv causing resource build errors +DPDEF138679 Raptor does not create a DEFFILE when building for winscw_urel +DPDEF139692 SBSV2: 'virtual memory exhausted' when building multiple variants +DPDEF136321 SBSv2: Zip exports not cleaned +INC139622 OPTION_REPLACE does not work properly in SBSv2 + +Other Changes: +Added utility.prebuilt FLM. + + +version 2.7.1 + +Defect Fixes: +DPDEF138366 [T15379] Raptor raise some warnings when build Coredumpserver +DPDEF139405 SBSV2: Trace compilation fails with large numbers of files. +DPDEF139572 SBSV2: Changes to '--cpu' option syntax breaks existing MMP files. +DPDEF139456 Toolcheck file is not created if EPOCROOT is \ +DPDEF133766 Poor SBSv2 reallyclean performance +DPDEF135780 SBSV2: REALLYCLEAN is not cleaning all files + + +version 2.7.0 + +New Features: +DS.1744 Recognize LINKEROPTION in MMP file +DS.1744 Compiled objects on local filesystem (SBS_BUILD_DIR) + +Partial Deliveries: +DS.1744 CheckSource in Raptor + +Defect Fixes: +DPDEF138293 Carbide: Raptor doesn't resolve variant.cfg entries starting with "\" correctly + + +version 2.6.5 + +Defect Fixes: +DPDEF138930 Raptor needs to change to match new trace compiler interface + + +version 2.6.4 + +Defect Fixes: +DPDEF138527 [TCL Build] Miss tracecompiler.mk and exclude group for Raptor export +DPDEF138484 Raptor uses wrong guard causing trace compiler ignores some projects. +DPDEF138720 BV product folders have missing map files +DPDEF138721 Raptor uses wrong lib when mmp keyword FIRSTLIB presents. +DPDEF138053 SBSv2: tools platform: tools not installed by the time they need to be used. +DPDEF138164 Carbide: Raptor crashes on unrecognised buildinfo.txt content +DPDEF138296 SBSV2 disables all TOOLS2 compiler warnings +DPDEF138329 Raptor generates marker file for trace compiler when it's not done +DPDEF138352 SBSv2: rollout - unsplit EC makefiles not generating correct deps 4 missing .mbg +DPDEF138480 SBSv2: rollout. Created files sometimes have insufficient permissions on Windows +DPDEF137511 SBSv2 doesn't behave correctly with the default paging policy + + +version 2.6.3 + +Defect Fixes: +DPDEF133508 Number of errors is counted wrong +DPDEF138098 UID issue in Trace Compiler for Raptor +DPDEF138296 SBSV2 disables all TOOLS2 compiler warnings + + +version 2.6.2 + +Defect Fixes: +DPDEF135330 Raptor Rollout: bangalore messaging winscw udeb test code +DPDEF137726 Missing mscvr_readme.txt from the SBSv2 drop +DPDEF137739 SBSv2: rollout - .cia object files can conflict with .cpp object files + + +version 2.6.1 + +Defect Fixes: +DPDEF137239 raptor does not include the msvcr71 runtime library +DPDEF137489 BV builds try and write generated .s files in the wrong directory + + +version 2.6.0 + +New Features: +DS.1542 SBSv2 generates Open System Trace dictionaries +DS.1629 Resource autodependencies + + +version 2.5.5 + +Defect Fixes: +DPINC137379 Emulator: Cursor is missing on emulator buttons +DPDEF133640 SBSv2 usrt3_1.lib is missing from epocroot/epoc32/release/armv5/ + + +version 2.5.4 + +Defect Fixes: +DPDEF136719 Raptor: sbsv2cache.py cache file generation fails with very large log files +DPDEF136715 On Linux the shipped python 2.5.2 is not found +DPDEF132996 SBSv2 doesn't generate AUTO.BAT file +DPDEF136382 SBSv2: explicit dll versioning not supported on arm platforms +DPDEF135843 [Raptor Rollout] Raptor does not support OPTION_REPLACE ARMASM/OPTION ARMASM +DPDEF136693 makesis fails when multiple instances are run concurrently with the same target + + +version 2.5.3 + +Defect Fixes: +DPDEF136162 Raptor: resource dependencies require metadata workarounds +DPDEF128288 SBSv2 does not fully support build target customization. +DPDEF132880 BV builds cannot find system static libraries +DPDEF133835 SBSv2 cannot build for ARMV6 or ARM9E + + +version 2.5.2 + +Defect Fixes: +DPDEF135983 cpp-raptor crashes if source code contains builtin macro __FILE__ +DPDEF133808 Raptor does not support OPTION --no_rtti with mixed assembly/C++ projects +DPDEF135577 SBSv2: rollout - TOOLS/TOOLS2 exes sometimes not executable or writable. + + +version 2.5.1 + +Defect Fixes: +DPDEF135258 createvmap.py script can hang in BV builds +DPDEF135385 warnings in RunModeDebugger in M04816vFuture with ARMV7 + + +version 2.5.0 + +New Features: +DS.1568 User defined configuration file location(s) + + +version 2.4.3 + +Defect Fixes: +DPDEF134322 SBSV2 uses the wrong library when building STDCPP targets +DPDEF132923 SBSv2 freeze don't add Vtable and RTTI information into def file for arm dll +DPDEF133775 SBSv2: ARMFPU is not passed to compiler +DPDEF134023 case inconsistency with libOpenVG.lib + +Other Changes: +MINOR_CHANGE updated all copyright notices for SF delivery +MINOR_CHANGE added vtb91sf variant for SF Timebox 9:1 builds +MINOR_CHANGE added vtb92sf variant for SF Timebox 9:2 builds + + +version 2.4.2 + +Defect Fixes: +DPDEF133820 Raptor Rollout: EXPORTUNFROZEN processing incorrect in ARMV5 builds +DPDEF132033 Raptor picks up the wrong bld.inf macros when building for RVCT 3.1 +DPDEF133772 SBSv2: console log includes some winscw warnings that should be suppressed + + +version 2.4.1 + +Defect Fixes: +DPDEF133639 Raptor Rollout:TEF test server doesn't start under SBSv2 - OK with abld +DEF133255 [System Build]: Error in compiling NaviEngine Unistore on ARMV7 M04816 vFuture +DPDEF127973 Freeze fails with SBSv2 under some environments + + +version 2.4.0 + +New Features: +DS.1475 Pluggable Log Summariser +DS.1476 Use FLMs from the source tree + +Defect Fixes: +DPDEF133417 SBSv2: tmp mounting errors on startup + + +version 2.3.3 + +Defect Fixes: +DPDEF130261 sbs does not support explicit option to version keyword +DPDEF130598 sbs does not provide debug and nodebug variants +DPDEF131630 Raptor smoke tests break when EPOCROOT=\ on Windows +DPDEF132898 no TEM nbl2.lib dependencies for armv7 +DPDEF133035 SBSv2 - Tools2 build does not include -m32 option. Stlport flm also doesn't. +DPDEF133176 SBSv2 ignores compillation error for "unidentified identifier" for winscw build + + +version 2.3.2 + +Other Changes: +MINOR_CHANGE added vtb92 variant for Timebox 9:2 builds + + +version 2.3.1 + +Defect Fixes: +DPDEF132374 SBSv2: Directory creation can fail leading to build errors +DPDEF132070 SBSv2: stlport 5.2 build fails - library generated to wrong directory +DPDEF128378 SBSv2 help for global targets only shown when a target is given +DPDEF129634 ALWAYS_BUILD_AS_ARM does not suppress __MARM_THUMB__ with SBSv2 + + +version 2.3.0 + +New Features: +DS.1424 Support for ARMV5SMP platform + +Defect Fixes: +DPDEF129804 SBSv2 crashes when there are double \\ in prj_mmpfiles in bld.inf +DPDEF130892 SBSv2: Reallyclean fails on TEM files +DPDEF131619 SBSv2: ABIv1 .lib files aren't generated for -c armv5 -c armv5.smp +DPDEF131637 SBSv2: stlport can fail to build under Cygwin - "/tmp no such directory" +DPDEF131891 [System Build]: Errors in GT stage in Build M04774 vfuture + + +version 2.2.9 + +Defect Fixes: +DPDEF129804 SBSv2 crashes when there are double \\ in prj_mmpfiles in bld.inf +DPDEF131637 SBSv2: stlport can fail to build under Cygwin - "/tmp no such directory" +DPDEF130892 SBSv2: Reallyclean fails on TEM files + + +version 2.2.8 + +Defect Fixes: +DPDEF130569 .lib files for SSM targets build with different name compared to abld +DPDEF130571 libxml2 component contains GCCXML build errors +DPDEF131312 SBSv2 - DEBUGGABLE_UDEBONLY not supported by SBSv2 (Raptor) + + +version 2.2.7 + +Defect Fixes: +DPDEF130533 SBSv2 fails to run when installed from SITK +DPDEF130452 Some rcomp warnings need to be disabled +DPDEF130286 SBSv2: sbs freezes during CLEAN and REALLYCLEAN operations. +DPDEF127973 Freeze fails with SBSv2 under some environments +DPDEF128455 Error during freeze with SBSv2 +DPDEF127149 SBSv2 TEM/extension makefile build doesn't support the .savespace variant + + +version 2.2.6 + +Defect Fixes: +DPDEF130008 SBSv2 should recognize these new keywords: SMPSAFE, PAGEDCODE, PAGEDDATA, UN... +DPDEF127887 Current directory wrong when executing extension makefiles in SBSv2 +DPDEF128915 CCheckEnv ERROR: CBRPatch: Absent file +DPDEF127675 Raptor does not process stringtables correctly when HEADERONLY is on +DPDEF127878 give wrong mmp filename for -p option should cause error in SBSv2 + +Other Changes: +Uses cygwin instead of msys for improved stability. +Includes python 2.5.2 instead of using py2exe. + + +version 2.2.5 + +Defect Fixes: +DEF127329 OMAP H4 Unistore2 Failure in Raptor 9.5 GT build +DPDEF128632 SBSv2 : bld.inf ':zip' exports don't maintain timestamps, with an e32 impact +DPDEF127399 SBSv2 -p .mmp options also builds .mk files + + +version 2.2.4 + +Defect Fixes: +DPDEF129187 SBSv2: ABIv1 .lib files are required (again) + + +version 2.2.3 + +Defect Fixes: +DPDEF128916 C Standard Library failed on cia2cpp2o armv5 with 1 +DPDEF128503 sbs 2.2.0 produce malformed xml log on Linux with pvmgmake +DPDEF127604 SIS registry panics at startup on emulator if SWI is built with SBS +DPDEF128690 SBSv2 generates error when using emake on REALLYCLEAN target + +Other Changes: +MINOR_CHANGE log summariser updated to deal with errors starting "make.exe: ***" + + +version 2.2.2 + +Defect Fixes: +DPDEF127497 SBSv2 does not clean when -k or other switch is used with abld wrapper +DPDEF127829 'cannot open Meta file' warning with SBSv2 +DPDEF127371 abld -v not working correctly through sbsv2 +DPDEF127555 SBSv2 doesn't do "romfile" + +Other Changes: +MINOR_CHANGE made the default number of jobs 4 + + +version 2.2.1 + +Defect Fixes: +DPDEF128498 SBS creates paths with extra slashes which can cause problems + +Other Changes: +MINOR_CHANGE Removed temporary ABIv1 .lib generation +MINOR_CHANGE Added monty test data to the test folder + + +version 2.2.0 + +New Features: +DS.1347 SBSv2 Compiler Selection +DS.1348 SBSv2 allow mixed slashes + +Defect Fixes: +DPDEF127904 SBSv2 : recent installdefaultcommdb has broken the 9.4 build +DPDEF128022 SBSv2: Unrecognised Keyword ['romtarget .dll'] warnings +DPDEF127815 SBSv2: PAGED and EPOCCALLDLLENTRYPOINTS keywords not supported +DPDEF127890 SBSv2: TARGETPATH in mmps (also resources, bitmaps) must cope with backslashes +DPDEF128229 SBSv2: some command invocations can fail, but could be "re-tried" + + +version 2.1.10 + +Defect Fixes: +DPDEF126662 Intermittent networking_dhcp compilation failure in Raptor build GT phase +DPDEF127799 SBSv2: zip and unzip commands not found in some builds +DPDEF127665 ARMV7 libraries have wrong link order in Raptor + + +version 2.1.9 + +Defect Fixes: +DPDEF127498 SBSv2: importlibversioned_abiv1 intermittently fails in ARMV5 builds +DPDEF125483 CDB breaks due to Attribute values not matching expected values +DPDEF126335 Intermittent GT errors due to "make" not being found on the PATH +DPDEF127562 SBSv2 will not unzip the same file into more than one location +DPDEF127626 SBSv2: sed version on windows is out of date + + +version 2.1.8 + +Defect Fixes: +DPDEF125478 CDB breaks caused by file path/name mismatch +DPDEF125145 Incorrect file access permissions for sbs v2.0.14 in Linux distribution +DPDEF126126 Intermittent "Segmentation fault" error in Raptor GT phase +DPDEF124836 SBSv2 cannot build just a single .mmp file from a bld.inf file +DPDEF126675 Performance regression in SBSv2 python frontend caused by regex usage, +DPDEF126790 groupin10 is not used in artarget_func +DPDEF125639 TEM variables are reported incorrectly when building TEM for ARMV7 +DPDEF124273 abld help is ugly and hard to read +DPDEF126614 "Virtual memory exhausted. Stop" error when building with SBSV2 + + +version 2.1.7 + +Defect Fixes: +DPDEF124290 SBS -e pvmgmake -j 12 on Linux produces malformed xml log files +DPDEF126241 SBSv2 : SECURE_DATA error when building uiklaf toolkit in TechView +DPDEF126328 Performance regression and related excessive memory usage in daily Raptor builds + + +version 2.1.6 + +Defect Fixes: +DPDEF125740 SBSv2: Builds can hang during the GT stage in Windows builds when using "-j x" +DPDEF125145 Incorrect file access permissions for sbs v2.0.14 in Linux distribution + + +version 2.1.5 + +Defect Fixes: +DPDEF125812 There is no user created init.xml configuration file + + +version 2.1.4 + +Defect Fixes: +DPDEF124680 Raptor builds hang at "tools2" compilation phase +DPDEF125304 Raptor crashes when running abld + + +version 2.1.3 + +Defect Fixes: +DPDEF125394 sbs_2.1.0_(RC1) Building complete OS gives armasm errors on Windows +DPDEF122556 GT0367: CLEANEXPORT target is not cleaning files with a space in them +DPDEF124691 Raptor should ignore the new SMPSAFE keyword +DPDEF125031 SBSv2 Stringtable build fails when EXPORTPATH specified + + +version 2.1.2 + +Change Requests: +CR1413 Support for different toolchains to be called by SBSv1 and SBSv2 + + +version 2.1.1 + +Defect Fixes: +DEF124748 GCCXML errors in Raptor related to missing arm lib files +DEF124756 Raptor build : Orphan files reported in CBR phase +DEF124758 Raptor build CBR errors due to missing ".a" files +DEF124573 CDB breaks in Raptor build due to missing header,dll and lib files + + +version 2.1.0 + +Change Requests: +CR1479 Add Armv7 support into SBSv2 + +Defect Fixes: +DEF124543 Raptor does not handle the STDCPP keyword correctly +DEF124515 GT0367: 'bldmake plat' should now show ARMV7 + + +version 2.0.14 + +Defect Fixes: +DEF124705 CBR errors in raptor builds due to missing rpp files +DEF120328 SBS v2.0 configuration files cannot be validated +INC124096 Long list of MMP macros causes crashdump with .s files +DEF124702 GT0367: Semaphores need altering to correct possible hangs (on Linux) + + +version 2.0.13 + +Defect Fixes: +DEF123653 SBS -j 16 on Windows produces malformed xml log files + + +version 2.0.12 + +Defect Fixes: +DEF123987 Raptor does not build a lot of .lib files for ARMV5 +DEF123981 SBSv2 doesn't generate DSO when EXPORTUNFROZEN is specified. + + +version 2.0.11 + +Defect Fixes: +DEF123988 SBSv2 does not produce rpp files +DEF123766 SBSv2 log output does not match the specification +DEF122781 GT0367: 'bldmake bldfiles' output not going to stdout +DEF122885 GT0367: Need to stop sbs -abld functioning on Linux +DEF123354 GT0367: Incorrect output if the number of jobs provided is invalid + + +version 2.0.10 + +Defect Fixes: +DEF123984 SBSv2 generates more warnings than abld +DEF124139 GT0367: SBS causes a Python Traceback when a system_definition.xml error occurs +DEF123601 SBSv2 : Python traceback error is reported when try to build systemtest code +DEF123916 SBSv2 : "tools" build warns about overrides when "OPTION MSVC /w" in .mmp files + + +version 2.0.9 + +Defect Fixes: +PDEF124028 .GXP files not getting created when built for GCCXML target +DEF123653 SBS -j 16 on Windows produces malformed xml log files +DEF123586 dso file is not remade when def file changes +DEF122541 SBSv2 -what should report resource files +DEF123265 Incorrect file access permissions for sbs v2.0.7 in Linux dist +DEF123317 SBSv2 -what got error for whatexports if too much exports +DEF123439 SBSv2 : Exports not performed in total before .mmp processing in sysdef builds +DEF123552 STLport doesn't build with Raptor on Linux +DEF123260 GT0367: Circular references in config files not handled + + +version 2.0.8 + +Defect Fixes: +DEF122930 SBSv2:Target type exexp giving errors while building for winscw +DEF123028 Raptor generating double slashes in command files +DEF123048 SBSv2: build with -k (keep-going) stops when export makefile has a failure. +DEF123069 False 'missing mmp file' errors reported by SBSv2 +DEF122472 SBSv2 doesn't report content of unpacked zip files +DEF122534 SBSv2 -what should not report .sym files +DEF123181 SBSv2: Failure of one export in python aborts remaining exports for bld.inf +DEF123289 SBSv2 : Netcards doesn't build for "tools" in an SBSv2 build +DEF123418 SBSV2: stlport build can fail with "no rule to make target" +DEF123084 SBSv2: exits with an exception if -c option specifies non-existent configuration +INC122876 Electric Accelerator build fails with Raptor + + +version 2.0.7 + +Defect Fixes: +DEF122784 Large MMP files and GNUMAKEFILE causes shell to crash +DEF122760 Problems with bmconv command files preventing bitmap generation? +DEF122803 SBSv2 - Freeze doesnt work properly for OE target types +DEF122833 SBSV2 Performance is poor with -j16 using the GNU Make engine +DEF122535 GT0367: Invalid system_definition.xml causes SBSv2 layering crash +DEF122570 SBSv2 : certain "-m" values cause a crash at makefile generation +DEF122604 Errors in GT only build using sbsv2 on Windows +DEF122796 Wrong default value for PVMGMAKE in make.xml +DEF122783 SBSv2 WINSCW builds can produce incorrectly linked executables under emake +DEF122785 log summariser crashes if errors contain % characters +DEF122870 SBSv2 assembling .s files fails. +DEF120473 Enable Windows and Linux Tools to Cohabit +DEF121826 Pre-include HRH file directory from variant.cfg fails for template extension mak +DEF121907 Raptor crashes when exporting zip file that already exists +DEF122523 SBSv2 Logging output affected by bash version on Linux +DEF122788 SBSv2: We don't ensure correct version of Make for TEMs and for use in FLMs + + +version 2.0.6 + +The first release of SBSv2 in the SITK. + diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/bin/buildstats.py --- a/sbsv2/raptor/bin/buildstats.py Wed Oct 28 14:39:48 2009 +0000 +++ b/sbsv2/raptor/bin/buildstats.py Mon Nov 16 09:46:46 2009 +0000 @@ -1,120 +1,120 @@ -# -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of the License "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# Generate some useful statistics from a Raptor build log -# - -import sys -from optparse import OptionParser -from raptorlog import * -import os -from stat import * -import time - -def genstats(file, logitems, logdate): - bytecount=0.0 - lastbytecount=0.0 - print """ - - """ - - if S_ISREG(os.stat(file.name)[ST_MODE]) > 0: - totalbytes = os.stat(file.name)[ST_SIZE]+0.0 - else: - totalbytes=0.0 - - print "" % (file.name,totalbytes,logdate) - for l in file.xreadlines(): - if totalbytes > 0.0: - bytecount += len(l) - if (bytecount-lastbytecount)/totalbytes > 0.05: - lastbytecount = bytecount - sys.stderr.write("%3.0f %%" % ((bytecount/totalbytes)*100.0)) - - for i in logitems: - i.match(l) - - for i in logitems: - print i.xml()+"\n" - - print "" - print "" - - - -## Command Line Interface #################################################### - -parser = OptionParser(prog = "buildstats", - usage = "%prog [-h | options] []") - -parser.add_option("-k", "--keep", default = False, - action="store_true", dest="keep", help="Retain matched log lines and display them.") -parser.add_option("-d", "--logdate", default = None, - action="store", dest="logdate", help="Specify the date on which the log was started (yyyymmdd).") - -(options, args) = parser.parse_args() - -logname="stdin" -if len(args) > 0: - logname=args[0] - file = open(logname,"r") - if options.logdate != None: - logdate = options.logdate - else: - logdate = time.strftime("%Y%m%d",time.localtime(os.stat(file.name)[ST_CTIME])) -else: - file = sys.stdin - logdate = time.strftime("%Y%m%d") - - -if options.keep != False: - LogItem.keep = True - - - -logitems = [ - LogItem("compile attempt", ""), - LogItem("compile success", ""), - LogItem("compile fail", ""), - LogItem('link attempt',''), - LogItem("link success", ""), - LogItem("link fail", ""), - LogItem('postlink attempt',''), - LogItem("postlink success", ""), - LogItem("postlink fail", ""), - LogItem('flmcalls', '"), - #LogItem('bldinf_processed', "Processing bld.inf:"), - LogItem('armar','armar'), - LogItem("failed stringtable export", ""), - LogItem("failed template extension makefile", ""), - LogItem("make error",'^make: \*\*\*.*$', True), - LogItem("make no rule",'^make: \*\*\*.* No rule to make target.*$', True), - LogItem("raptor error",'^ERROR: raptor:*$', True), - LogItem("armcc/armcpp error",'^.*line [0-9]+:.*Error: *#[0-9]+.*$', True), - LogItem("gcc/gcc-cpp error",'^[^ \t]+:[0-9]+:[0-9]+ .+:.+$', True), - LogItem("armlink error",'^Error: *L[0-9A-F]+:.*$', True), - LogItem("Resource File error",'[\t ]*Error:.*cannot open source input file.*\.[Rr][Ss][Gg]\".*$', True), - LogItem("String Table error",'[\t ]*Error:.*cannot open source input file.*[Ss]tr[^ ]*\.h\".*$', True), - LogItem("Armcc license fail",'^.*Error: C3397E: Cannot obtain license for Compiler.*'), - LogItem("Armlink license fail",'^.*Error: ......: Cannot obtain license for .*ink.*') - ] - -genstats(file,logitems,logdate) - -if file != sys.stdin: - file.close() +# +# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# Generate some useful statistics from a Raptor build log +# + +import sys +from optparse import OptionParser +from raptorlog import * +import os +from stat import * +import time + +def genstats(file, logitems, logdate): + bytecount=0.0 + lastbytecount=0.0 + print """ + + """ + + if S_ISREG(os.stat(file.name)[ST_MODE]) > 0: + totalbytes = os.stat(file.name)[ST_SIZE]+0.0 + else: + totalbytes=0.0 + + print "" % (file.name,totalbytes,logdate) + for l in file.xreadlines(): + if totalbytes > 0.0: + bytecount += len(l) + if (bytecount-lastbytecount)/totalbytes > 0.05: + lastbytecount = bytecount + sys.stderr.write("%3.0f %%" % ((bytecount/totalbytes)*100.0)) + + for i in logitems: + i.match(l) + + for i in logitems: + print i.xml()+"\n" + + print "" + print "" + + + +## Command Line Interface #################################################### + +parser = OptionParser(prog = "buildstats", + usage = "%prog [-h | options] []") + +parser.add_option("-k", "--keep", default = False, + action="store_true", dest="keep", help="Retain matched log lines and display them.") +parser.add_option("-d", "--logdate", default = None, + action="store", dest="logdate", help="Specify the date on which the log was started (yyyymmdd).") + +(options, args) = parser.parse_args() + +logname="stdin" +if len(args) > 0: + logname=args[0] + file = open(logname,"r") + if options.logdate != None: + logdate = options.logdate + else: + logdate = time.strftime("%Y%m%d",time.localtime(os.stat(file.name)[ST_CTIME])) +else: + file = sys.stdin + logdate = time.strftime("%Y%m%d") + + +if options.keep != False: + LogItem.keep = True + + + +logitems = [ + LogItem("compile attempt", ""), + LogItem("compile success", ""), + LogItem("compile fail", ""), + LogItem('link attempt',''), + LogItem("link success", ""), + LogItem("link fail", ""), + LogItem('postlink attempt',''), + LogItem("postlink success", ""), + LogItem("postlink fail", ""), + LogItem('flmcalls', '"), + #LogItem('bldinf_processed', "Processing bld.inf:"), + LogItem('armar','armar'), + LogItem("failed stringtable export", ""), + LogItem("failed template extension makefile", ""), + LogItem("make error",'^make: \*\*\*.*$', True), + LogItem("make no rule",'^make: \*\*\*.* No rule to make target.*$', True), + LogItem("raptor error",'^ERROR: raptor:*$', True), + LogItem("armcc/armcpp error",'^.*line [0-9]+:.*Error: *#[0-9]+.*$', True), + LogItem("gcc/gcc-cpp error",'^[^ \t]+:[0-9]+:[0-9]+ .+:.+$', True), + LogItem("armlink error",'^Error: *L[0-9A-F]+:.*$', True), + LogItem("Resource File error",'[\t ]*Error:.*cannot open source input file.*\.[Rr][Ss][Gg]\".*$', True), + LogItem("String Table error",'[\t ]*Error:.*cannot open source input file.*[Ss]tr[^ ]*\.h\".*$', True), + LogItem("Armcc license fail",'^.*Error: C3397E: Cannot obtain license for Compiler.*'), + LogItem("Armlink license fail",'^.*Error: ......: Cannot obtain license for .*ink.*') + ] + +genstats(file,logitems,logdate) + +if file != sys.stdin: + file.close() diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/bin/codetest_osbuild.sh --- a/sbsv2/raptor/bin/codetest_osbuild.sh Wed Oct 28 14:39:48 2009 +0000 +++ b/sbsv2/raptor/bin/codetest_osbuild.sh Mon Nov 16 09:46:46 2009 +0000 @@ -1,174 +1,174 @@ -#!/bin/sh - -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of the License "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# Build automation for Symbian OS with Raptor -# Author: Timothy N Murphy -# -# - -# You can edit these: -H=/home/tmurphy -export H - -export TESTBASE="$H/baselineos/codetest" - - -export LOGBASEDIR=~/public_html/buildlogs -export BUILDROOT="$H/baselineos" -export SOURCEROOT="$H/baselineos/fsupdate" -export SYSDEF="$H/baselineos/system_definition_fsupdate.xml" -export PREEXPORTSYSDEF="$SBS_HOME/test/envelope/preexport.xml" -export PARALLEL=28 - -genstats() { -if [ "$1.stats" -ot "$1.log" ]; then -python "$SBS_HOME/bin/buildstats.py" "$1.log" > "$1.stats" && -#python "$SBS_HOME/bin/failedstats.py" -m "$1.log" > "$1.failed"; -( - cd $EPOCROOT/epoc32 && find "release" > "$1.release_files" && find "build" > "$1.build_files" && find include > "$1.include_files" -) -fi; -} - -cd $BUILDROOT - - -# Don't edit the rest: -################################################### -export KEY=`date +%d_%m_%y` -export DAILYDIR="$LOGBASEDIR/$KEY" -export BUILDNAME="`basename \"$SYSDEF\" | sed 's#\.[^.][^.]*$##'`" -export LOGNAME="${BUILDNAME}_${KEY}" -export PLATFORM=armv5 -export TESTLOG="$DAILYDIR/parallel_codetest.log" - -for BUILDNUM in {1..50}; do - if [ ! -d "$DAILYDIR/$BUILDNUM" ]; then - break - fi - if [ ! -f "$DAILYDIR/$BUILDNUM/${LOGNAME}_$BUILDNUM.log" ]; then - break - fi -done - -# make the day's directory -mkdir -p "$DAILYDIR" - -echo "testrun: $TESTLOG, build $BUILDNUM of the day:" -echo '' > "$TESTLOG" - - -# Loop through different cluster loads -for CODEFACTOR in 1 2 3 4 5; do -export CODEFACTOR -echo "CODEFACTOR: $CODEFACTOR" -( - -export EPOCROOTS="" -j=1; -while [ $j -le $CODEFACTOR ]; do - EPOCROOTS=${EPOCROOTS}" $TESTBASE/epocroot$j" - j=$[ $j + 1 ] -done -MAKEFILE=$TESTBASE/test$CODEFACTOR.mk - - -echo "" -echo " " -echo " $DAILYDIR/$BUILDNUM/${LOGNAME}_$BUILDNUM.log" -echo " $EPOCROOTS" -echo " $MAKEFILE" -echo "" - -OUTDIR="$DAILYDIR/$BUILDNUM" -TIMELOG="$OUTDIR/${LOGNAME}_$BUILDNUM.time" - -echo " $OUTDIR/${LOGNAME}_$BUILDNUM.preexport 2>&1 || { - echo "Pre-export failed"; - exit 1 - } -done -) - -echo "Running Make" -( - set -x - echo "Running Make" - # The build process - - time /usr/local/raptor/make-pvm-381/pvmgmake -j$PARALLEL --debug=j -k -f $MAKEFILE > "$OUTDIR/${LOGNAME}_$BUILDNUM.log" 2>&1 - touch "$SIGNALTOSTOPFILE" -) > "$TIMELOG" 2>&1 & -( - set +x - # Concurrent process to continuously update statistics - echo "" - - while [ 1 -eq 1 ]; do - sleep 20 - echo -n "." - - if [ -e "$SIGNALTOSTOPFILE" ]; then - rm -f "$SIGNALTOSTOPFILE" - break - fi - done - echo "" -) -set +x -genstats "$OUTDIR/${LOGNAME}_$BUILDNUM" - -echo " ]]>" -echo "" -) >> "$TESTLOG" 2>&1 - -BUILDNUM=$[ $BUILDNUM + 1 ] -# use a new output directory -done # CODEFACTOR -echo -e "" >> "$TESTLOG" -echo "" >> "$TESTLOG" +#!/bin/sh + +# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# Build automation for Symbian OS with Raptor +# Author: Timothy N Murphy +# +# + +# You can edit these: +H=/home/tmurphy +export H + +export TESTBASE="$H/baselineos/codetest" + + +export LOGBASEDIR=~/public_html/buildlogs +export BUILDROOT="$H/baselineos" +export SOURCEROOT="$H/baselineos/fsupdate" +export SYSDEF="$H/baselineos/system_definition_fsupdate.xml" +export PREEXPORTSYSDEF="$SBS_HOME/test/envelope/preexport.xml" +export PARALLEL=28 + +genstats() { +if [ "$1.stats" -ot "$1.log" ]; then +python "$SBS_HOME/bin/buildstats.py" "$1.log" > "$1.stats" && +#python "$SBS_HOME/bin/failedstats.py" -m "$1.log" > "$1.failed"; +( + cd $EPOCROOT/epoc32 && find "release" > "$1.release_files" && find "build" > "$1.build_files" && find include > "$1.include_files" +) +fi; +} + +cd $BUILDROOT + + +# Don't edit the rest: +################################################### +export KEY=`date +%d_%m_%y` +export DAILYDIR="$LOGBASEDIR/$KEY" +export BUILDNAME="`basename \"$SYSDEF\" | sed 's#\.[^.][^.]*$##'`" +export LOGNAME="${BUILDNAME}_${KEY}" +export PLATFORM=armv5 +export TESTLOG="$DAILYDIR/parallel_codetest.log" + +for BUILDNUM in {1..50}; do + if [ ! -d "$DAILYDIR/$BUILDNUM" ]; then + break + fi + if [ ! -f "$DAILYDIR/$BUILDNUM/${LOGNAME}_$BUILDNUM.log" ]; then + break + fi +done + +# make the day's directory +mkdir -p "$DAILYDIR" + +echo "testrun: $TESTLOG, build $BUILDNUM of the day:" +echo '' > "$TESTLOG" + + +# Loop through different cluster loads +for CODEFACTOR in 1 2 3 4 5; do +export CODEFACTOR +echo "CODEFACTOR: $CODEFACTOR" +( + +export EPOCROOTS="" +j=1; +while [ $j -le $CODEFACTOR ]; do + EPOCROOTS=${EPOCROOTS}" $TESTBASE/epocroot$j" + j=$[ $j + 1 ] +done +MAKEFILE=$TESTBASE/test$CODEFACTOR.mk + + +echo "" +echo " " +echo " $DAILYDIR/$BUILDNUM/${LOGNAME}_$BUILDNUM.log" +echo " $EPOCROOTS" +echo " $MAKEFILE" +echo "" + +OUTDIR="$DAILYDIR/$BUILDNUM" +TIMELOG="$OUTDIR/${LOGNAME}_$BUILDNUM.time" + +echo " $OUTDIR/${LOGNAME}_$BUILDNUM.preexport 2>&1 || { + echo "Pre-export failed"; + exit 1 + } +done +) + +echo "Running Make" +( + set -x + echo "Running Make" + # The build process + + time /usr/local/raptor/make-pvm-381/pvmgmake -j$PARALLEL --debug=j -k -f $MAKEFILE > "$OUTDIR/${LOGNAME}_$BUILDNUM.log" 2>&1 + touch "$SIGNALTOSTOPFILE" +) > "$TIMELOG" 2>&1 & +( + set +x + # Concurrent process to continuously update statistics + echo "" + + while [ 1 -eq 1 ]; do + sleep 20 + echo -n "." + + if [ -e "$SIGNALTOSTOPFILE" ]; then + rm -f "$SIGNALTOSTOPFILE" + break + fi + done + echo "" +) +set +x +genstats "$OUTDIR/${LOGNAME}_$BUILDNUM" + +echo " ]]>" +echo "" +) >> "$TESTLOG" 2>&1 + +BUILDNUM=$[ $BUILDNUM + 1 ] +# use a new output directory +done # CODEFACTOR +echo -e "" >> "$TESTLOG" +echo "" >> "$TESTLOG" diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/bin/countbinaries.sh --- a/sbsv2/raptor/bin/countbinaries.sh Wed Oct 28 14:39:48 2009 +0000 +++ b/sbsv2/raptor/bin/countbinaries.sh Mon Nov 16 09:46:46 2009 +0000 @@ -1,29 +1,29 @@ -#!/bin/sh -# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of the License "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# Count the release binaries produced by a build -# armv5 only for the moment -# - -TYPES='agt ani cpm csy dll drv esy exe fsy fxt hlp jar ldd lib loc msy nif pdd pdl prt sc tsy wsy [0-9]+' - -echo "Countbinaries" -echo "" - -PATTERN='\.(('`echo "$TYPES" |sed 's# #)|(#g'`'))$' -echo "Searching for: $PATTERN" - - -echo -n "ARMv5 Binaries: " -find $EPOCROOT/epoc32/release/armv5 | egrep "$PATTERN" | wc +#!/bin/sh +# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# Count the release binaries produced by a build +# armv5 only for the moment +# + +TYPES='agt ani cpm csy dll drv esy exe fsy fxt hlp jar ldd lib loc msy nif pdd pdl prt sc tsy wsy [0-9]+' + +echo "Countbinaries" +echo "" + +PATTERN='\.(('`echo "$TYPES" |sed 's# #)|(#g'`'))$' +echo "Searching for: $PATTERN" + + +echo -n "ARMv5 Binaries: " +find $EPOCROOT/epoc32/release/armv5 | egrep "$PATTERN" | wc diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/bin/createrfifile.pl --- a/sbsv2/raptor/bin/createrfifile.pl Wed Oct 28 14:39:48 2009 +0000 +++ b/sbsv2/raptor/bin/createrfifile.pl Mon Nov 16 09:46:46 2009 +0000 @@ -1,114 +1,114 @@ -# -# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of the License "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - -use strict; -use File::Basename; -use Getopt::Long; - -my $verbose = 0; -my ($rfifile, $excludepath) = ""; -GetOptions ('v' => \$verbose, 'o=s' => \$rfifile, 'x=s' => \$excludepath); - -if (!$rfifile || @ARGV < 1) - { - print (STDERR "\ncreaterfifile.pl\n"); - print STDERR << 'END_OF_HELP'; - -Usage: createrfifile.pl [-v] -o outputfile.rfi [-x excludepath] rss_cpp_deps_file_1.d rss_cpp_deps_file_n.d - -Takes one or more files containing CPP dependency output from the preprocessing of a .rss file and -generates a "combined resource" .rfi that can be consumed by CDB. -Optionally takes an exclusion path under which "found" dependencies can be ignored. - -END_OF_HELP - exit(0); - } - -my @depfiles = @ARGV; - -my $exclude = $excludepath; -if ($exclude) - { - $exclude =~ s/\\/\//g; # Ensure consistent slashes - $exclude =~ s/\/\//\//g; # Remove double slashes - $exclude = quotemeta($exclude); # Convert for regex match - } - -print ("RFI : exclude under - \"$exclude\"\n") if ($verbose); - -my @resources; -my %loggedresources; -foreach my $depfile (@depfiles) - { - open DEPFILE, "< $depfile" or die "\nRFI : Cannot read \"$depfile\"!\n\n"; - while () - { - # .d file format - whitespace at front is key, path format varies depending on platform - # the aim is to get a list of the "real" files. Missing files can appear "unpathed" - # - #Audio.rsc: M:/src/common/techview/apps/audio/Src/Audio.rss \ - # M:/epoc32/include/variant/Symbian_OS.hrh \ - # M://epoc32/include/techview/eikon.rh \ - # M://epoc32/include/techview/eikon.hrh M://epoc32/include/uikon.hrh \ - # M://epoc32/include/techview/controls.hrh \ - # M://epoc32/include/eikcolor.hrh \ - # M://epoc32/include/techview/techview.hrh M://epoc32/include/uikon.rh \ - # M://epoc32/include/badef.rh M://epoc32/include/baerrrsvr.rh \ - # M://epoc32/include/techview/controls.rh M://epoc32/include/gulftflg.hrh \ - # M://epoc32/include/eikcore.rsg M://epoc32/include/eikcoctl.rsg \ - # M://epoc32/include/eikctl.rsg M://epoc32/include/eikfile.rsg \ - # M://epoc32/include/eikprint.rsg M://epoc32/include/audio.mbg \ - # M:/src/common/techview/apps/audio/Src/Audio.hrh \ - # M:/src/common/techview/apps/audio/Src/NewAudio.rls - - s/^.*\.\w+\://; - s/\\$//; - s/^\s+//; - s/\s+$//; - s/\/\//\//g; - chomp $_; - next if !/\S/; - - my @dependencies = split; - foreach my $dependency (@dependencies) - { - next if ($exclude && $dependency =~ /^$exclude/i); - print ("WARNING: Could not find dependency \"$dependency\" in \"$depfile\"\n") if (!-e $dependency and $verbose); - print ("RFI : processing - \"$dependency\"\n") if ($verbose); - - if (!defined $loggedresources{$dependency}) - { - push @resources, $dependency; - $loggedresources{$dependency} = 1; - } - } - } - close DEPFILE; - } - -open RFIFILE, "> $rfifile" or die "\nRFI : Cannot write \"$rfifile\"!\n\n"; -foreach my $resource (@resources) - { - print RFIFILE "\n\n/* GXP ***********************\n"; - print RFIFILE " * ".basename($resource)."\n"; - print RFIFILE " ****************************/\n\n"; - - open RESOURCE, "< $resource" or die "\nCannot read \"$resource\"!\n\n"; - print RFIFILE $_ while (); - close RESOURCE; - } -close RFIFILE; - +# +# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +use strict; +use File::Basename; +use Getopt::Long; + +my $verbose = 0; +my ($rfifile, $excludepath) = ""; +GetOptions ('v' => \$verbose, 'o=s' => \$rfifile, 'x=s' => \$excludepath); + +if (!$rfifile || @ARGV < 1) + { + print (STDERR "\ncreaterfifile.pl\n"); + print STDERR << 'END_OF_HELP'; + +Usage: createrfifile.pl [-v] -o outputfile.rfi [-x excludepath] rss_cpp_deps_file_1.d rss_cpp_deps_file_n.d + +Takes one or more files containing CPP dependency output from the preprocessing of a .rss file and +generates a "combined resource" .rfi that can be consumed by CDB. +Optionally takes an exclusion path under which "found" dependencies can be ignored. + +END_OF_HELP + exit(0); + } + +my @depfiles = @ARGV; + +my $exclude = $excludepath; +if ($exclude) + { + $exclude =~ s/\\/\//g; # Ensure consistent slashes + $exclude =~ s/\/\//\//g; # Remove double slashes + $exclude = quotemeta($exclude); # Convert for regex match + } + +print ("RFI : exclude under - \"$exclude\"\n") if ($verbose); + +my @resources; +my %loggedresources; +foreach my $depfile (@depfiles) + { + open DEPFILE, "< $depfile" or die "\nRFI : Cannot read \"$depfile\"!\n\n"; + while () + { + # .d file format - whitespace at front is key, path format varies depending on platform + # the aim is to get a list of the "real" files. Missing files can appear "unpathed" + # + #Audio.rsc: M:/src/common/techview/apps/audio/Src/Audio.rss \ + # M:/epoc32/include/variant/Symbian_OS.hrh \ + # M://epoc32/include/techview/eikon.rh \ + # M://epoc32/include/techview/eikon.hrh M://epoc32/include/uikon.hrh \ + # M://epoc32/include/techview/controls.hrh \ + # M://epoc32/include/eikcolor.hrh \ + # M://epoc32/include/techview/techview.hrh M://epoc32/include/uikon.rh \ + # M://epoc32/include/badef.rh M://epoc32/include/baerrrsvr.rh \ + # M://epoc32/include/techview/controls.rh M://epoc32/include/gulftflg.hrh \ + # M://epoc32/include/eikcore.rsg M://epoc32/include/eikcoctl.rsg \ + # M://epoc32/include/eikctl.rsg M://epoc32/include/eikfile.rsg \ + # M://epoc32/include/eikprint.rsg M://epoc32/include/audio.mbg \ + # M:/src/common/techview/apps/audio/Src/Audio.hrh \ + # M:/src/common/techview/apps/audio/Src/NewAudio.rls + + s/^.*\.\w+\://; + s/\\$//; + s/^\s+//; + s/\s+$//; + s/\/\//\//g; + chomp $_; + next if !/\S/; + + my @dependencies = split; + foreach my $dependency (@dependencies) + { + next if ($exclude && $dependency =~ /^$exclude/i); + print ("WARNING: Could not find dependency \"$dependency\" in \"$depfile\"\n") if (!-e $dependency and $verbose); + print ("RFI : processing - \"$dependency\"\n") if ($verbose); + + if (!defined $loggedresources{$dependency}) + { + push @resources, $dependency; + $loggedresources{$dependency} = 1; + } + } + } + close DEPFILE; + } + +open RFIFILE, "> $rfifile" or die "\nRFI : Cannot write \"$rfifile\"!\n\n"; +foreach my $resource (@resources) + { + print RFIFILE "\n\n/* GXP ***********************\n"; + print RFIFILE " * ".basename($resource)."\n"; + print RFIFILE " ****************************/\n\n"; + + open RESOURCE, "< $resource" or die "\nCannot read \"$resource\"!\n\n"; + print RFIFILE $_ while (); + close RESOURCE; + } +close RFIFILE; + diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/bin/createvmap.py --- a/sbsv2/raptor/bin/createvmap.py Wed Oct 28 14:39:48 2009 +0000 +++ b/sbsv2/raptor/bin/createvmap.py Mon Nov 16 09:46:46 2009 +0000 @@ -1,310 +1,310 @@ -# -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of the License "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# - -# Python Script to create the vmap file for Binary Variation support in SBSv2 - -import sys -import os -import re -import subprocess -import tempfile -import traceback -from optparse import OptionParser - -# the script will exit with 0 if there are no errors -global exitCode -exitCode = 0 - -# are we running on Windows? -onWindows = sys.platform.lower().startswith("win") - -# error messages go to stderr -def error(format, *extras): - sys.stderr.write("createvmap: error: " + (format % extras) + "\n") - global exitCode - exitCode = 1 - -# warning messages go to stderr -def warning(format, *extras): - sys.stderr.write("createvmap: warning: " + (format % extras) + "\n") - -# debug messages go to stderr -global printDebug -# -def debug(format, *extras): - if printDebug: - sys.stderr.write("createvmap: " + (format % extras) + "\n") - -# Return a dictionary with the feature names and values from the preinclude file, by running cpp over the source -def getVmapMacros(aPreInclude, aPreprocessedFile=None, aCPP="cpp", aDefines="", aIncludes = ""): - - validmacros = {} - # Run the pre-processor - command = aCPP + " -include " + os.path.abspath(aPreInclude) + " -dU " + aDefines + aIncludes - - # Feed in the file to stdin, because we must set the stdin to something - # other than the parent stdin anyway as that may not exist - for example - # when using Talon. - infile = open(aPreprocessedFile, "r") - - if onWindows: - p = subprocess.Popen(command, bufsize=65535, - stdin=infile, - stdout=subprocess.PIPE, - stderr=sys.stderr, - universal_newlines=True) - else: - p = subprocess.Popen(command, bufsize=65535, - stdin=infile, - stdout=subprocess.PIPE, - stderr=sys.stderr, - close_fds=True, shell=True) - stream = p.stdout - - # Parse the pre-processor output to look for - - # lines "#define NAME VALUE" and "#undef NAME" - defineRE = re.compile('^#define (?P\w+)(\s+(?P\w+))?') - undefRE = re.compile('^#undef (?P\w+)') - - data = " " - while data: - data = stream.readline() - - definedmacro = defineRE.match(data) - if definedmacro: - name = definedmacro.group('FEATURENAME') - value = definedmacro.group('VALUE') - if value: - validmacros[name] = value - else: - validmacros[name] = "defined" - - else: - undefinedmacro = undefRE.match(data) - if undefinedmacro: - validmacros[undefinedmacro.group('FEATURENAME')] = "undefined" - - if p.wait() != 0: - error("in command '%s'", command) - - infile.close() - - return validmacros - -# Extract the features from a featurelist file -def getFeatures(aFeatureList): - features = set() - for f in aFeatureList: - try: - file = open(os.path.abspath(f),'r') - - for data in file.readlines(): - data = data.strip() - features.add(data) - - file.close() - - except IOError: - error("Feature list file %s not found", f) - - return sorted(list(features)) - -# Returns a dictionary of the features to be put in the vmap file -def getVariationFeatures(aFeatureList = [] ,aPreinclude = None,aPreprocessedFile = None,aCPP = "cpp",aDefines="",aIncludes = ""): - - variation_features = {'FEATURENAME':[],'VALUE':[]} - macros = getVmapMacros(aPreinclude,aPreprocessedFile,aCPP,aDefines,aIncludes) - - # Co-relate the macros obtained from the pre-processor to the featurelist - for f in aFeatureList: - if f in macros: - variation_features['FEATURENAME'].append(f) - variation_features['VALUE'].append(macros[f]) - - return variation_features - -# Write to the vmap file, with the supplied dictionary containing the features -# The vmap path will be created if it doesn't exist -def createVmapFile(aMacroDictionary,aOutputfile): - if not os.path.exists(os.path.dirname(aOutputfile)): - os.makedirs(os.path.dirname(aOutputfile)) - try: - vmapfile = open(aOutputfile,'w') - except IOError: - error("Cannot write to " + aOutputfile) - i = 0 - while i < len(aMacroDictionary['FEATURENAME']): - vmapfile.write(aMacroDictionary['FEATURENAME'][i]+"="+aMacroDictionary['VALUE'][i]+"\n") - i += 1 - vmapfile.close() - -def check_exists(thing, filenames): - if not filenames: - error("No %s specified", thing) - return - - if not isinstance(filenames, list): - # we just have a single string - filenames = [filenames] - - for filename in filenames: - if not os.path.exists(filename): - error("The %s '%s' does not exist", thing, filename) - -# Main function, creates the vmap file -def main(): - - try: - global exitCode, printDebug - - # any exceptions make us traceback and exit - - parser = OptionParser(prog = "createvmap.py") - - parser.add_option("-c","--cpploc",action="store",dest="cpplocation",help="Full path of the preprocessor") - parser.add_option("-d","--debug",action="store_true",default=False,dest="debug",help="Turn debug information on") - parser.add_option("-D","--define",action="append",dest="defines",help="Macro definition") - parser.add_option("-f","--featurelist",action="append",dest="featurelistfile",help="List of featureslist files") - parser.add_option("-o","--output",action="store",dest="outputvmapfile",help="Output VMAP file name") - parser.add_option("-p","--preinclude",action="store",dest="preinclude",help="Pre-include file ") - parser.add_option("-s","--source",action="append",dest="sourcefiles",help="List of source files") - parser.add_option("-u","--userinc",action="append",dest="user_include",help="User Include Folders") - parser.add_option("-x","--systeminc",action="append",dest="system_include",help="System Include Folders") - - (options, leftover_args) = parser.parse_args(sys.argv[1:]) - - if leftover_args: - for invalids in leftover_args: - warning("Unknown parameter '%s'" % invalids) - - printDebug = options.debug - debug("Source Files -> %s", options.sourcefiles) - debug("Macro defines -> %s", options.defines) - debug("Features Files -> %s", options.featurelistfile) - debug("Pre-Include File -> %s", options.preinclude) - debug("User Includes -> %s", options.user_include) - debug("System Includes -> %s", options.system_include) - debug("CPP Location -> %s", options.cpplocation) - debug("VMAP Output name -> %s", options.outputvmapfile) - - featurelist = [] - definelist = "" - user_includeslist = "" - system_includeslist = "" - includeslist = "" - - # Some error checking code - if not options.outputvmapfile: - error("No output vmap file name supplied") - - # Source files must be supplied - check_exists("source file", options.sourcefiles) - - # A valid preinclude file must be supplied - check_exists("pre-include file", options.preinclude) - - # Some feature lists are required - check_exists("feature list", options.featurelistfile) - - # A cpp tool is required - check_exists("cpp tool", options.cpplocation) - - # if an essential option was missing then we should stop now - if exitCode != 0: - sys.exit(exitCode) - - # macro definitions - if options.defines: - for macro in options.defines: - definelist += " -D" + macro.replace('__SBS__QUOTE__', '\\"') - - # Note that we have to use -isystem for user includes and system - # includes to match what happens in the compiler. Long story. - - # Add each source directory as a user-include, so that our temporary - # concatenated source file can find includes that were next to the - # original source files. - # Check that all the specified source files exist - # and collect a set of all the source directories - sourcedirs = set() - for src in options.sourcefiles: - sourcedirs.add(os.path.dirname(src)) - - for srcdir in sourcedirs: - user_includeslist += " -isystem " + srcdir - - # Convert the include list to a string to be passed to cpp - if options.user_include: - for userinc in options.user_include: - user_includeslist += " -isystem " + userinc - if options.system_include: - for sysinc in options.system_include: - system_includeslist += " -isystem " + sysinc - - includeslist = user_includeslist + system_includeslist - - # Get a list of all the features, from all the featurelist files - featurelist = getFeatures(options.featurelistfile) - - # concatenate the source files together into a temporary file - try: - (tempfd, tempname) = tempfile.mkstemp() - temp = os.fdopen(tempfd, "w") - for src in options.sourcefiles: - sfile = open(src, "r") - for sline in sfile: - temp.write(sline) - sfile.close() - temp.close() - except Exception,e: - error("Could not write source files into temporary file %s : %s" % (tempname, str(e))) - return 1 - - debug("Temporary file name : " + tempname) - - # extract the macros from the concatenated source files - macro_dictionary = getVariationFeatures(featurelist, - options.preinclude, - tempname, - options.cpplocation, - definelist, - includeslist) - debug("Macros extracted:") - for key,values in macro_dictionary.iteritems(): - debug(key + " " + str(values)) - - # if there were no macros then the vmap file will be empty... - if not macro_dictionary['FEATURENAME']: - warning("No feature macros were found in the source") - - # Get rid of the temporary file - try: - os.remove(tempname) - except: - error("Could not delete temporary %s" % tempname) - - createVmapFile(macro_dictionary, options.outputvmapfile) - - # exit with 0 if OK - return exitCode - - except Exception,ex: - traceback.print_exc() - return 1 - -if __name__ == "__main__": - sys.exit(main()) - +# +# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +# Python Script to create the vmap file for Binary Variation support in SBSv2 + +import sys +import os +import re +import subprocess +import tempfile +import traceback +from optparse import OptionParser + +# the script will exit with 0 if there are no errors +global exitCode +exitCode = 0 + +# are we running on Windows? +onWindows = sys.platform.lower().startswith("win") + +# error messages go to stderr +def error(format, *extras): + sys.stderr.write("createvmap: error: " + (format % extras) + "\n") + global exitCode + exitCode = 1 + +# warning messages go to stderr +def warning(format, *extras): + sys.stderr.write("createvmap: warning: " + (format % extras) + "\n") + +# debug messages go to stderr +global printDebug +# +def debug(format, *extras): + if printDebug: + sys.stderr.write("createvmap: " + (format % extras) + "\n") + +# Return a dictionary with the feature names and values from the preinclude file, by running cpp over the source +def getVmapMacros(aPreInclude, aPreprocessedFile=None, aCPP="cpp", aDefines="", aIncludes = ""): + + validmacros = {} + # Run the pre-processor + command = aCPP + " -include " + os.path.abspath(aPreInclude) + " -dU " + aDefines + aIncludes + + # Feed in the file to stdin, because we must set the stdin to something + # other than the parent stdin anyway as that may not exist - for example + # when using Talon. + infile = open(aPreprocessedFile, "r") + + if onWindows: + p = subprocess.Popen(command, bufsize=65535, + stdin=infile, + stdout=subprocess.PIPE, + stderr=sys.stderr, + universal_newlines=True) + else: + p = subprocess.Popen(command, bufsize=65535, + stdin=infile, + stdout=subprocess.PIPE, + stderr=sys.stderr, + close_fds=True, shell=True) + stream = p.stdout + + # Parse the pre-processor output to look for - + # lines "#define NAME VALUE" and "#undef NAME" + defineRE = re.compile('^#define (?P\w+)(\s+(?P\w+))?') + undefRE = re.compile('^#undef (?P\w+)') + + data = " " + while data: + data = stream.readline() + + definedmacro = defineRE.match(data) + if definedmacro: + name = definedmacro.group('FEATURENAME') + value = definedmacro.group('VALUE') + if value: + validmacros[name] = value + else: + validmacros[name] = "defined" + + else: + undefinedmacro = undefRE.match(data) + if undefinedmacro: + validmacros[undefinedmacro.group('FEATURENAME')] = "undefined" + + if p.wait() != 0: + error("in command '%s'", command) + + infile.close() + + return validmacros + +# Extract the features from a featurelist file +def getFeatures(aFeatureList): + features = set() + for f in aFeatureList: + try: + file = open(os.path.abspath(f),'r') + + for data in file.readlines(): + data = data.strip() + features.add(data) + + file.close() + + except IOError: + error("Feature list file %s not found", f) + + return sorted(list(features)) + +# Returns a dictionary of the features to be put in the vmap file +def getVariationFeatures(aFeatureList = [] ,aPreinclude = None,aPreprocessedFile = None,aCPP = "cpp",aDefines="",aIncludes = ""): + + variation_features = {'FEATURENAME':[],'VALUE':[]} + macros = getVmapMacros(aPreinclude,aPreprocessedFile,aCPP,aDefines,aIncludes) + + # Co-relate the macros obtained from the pre-processor to the featurelist + for f in aFeatureList: + if f in macros: + variation_features['FEATURENAME'].append(f) + variation_features['VALUE'].append(macros[f]) + + return variation_features + +# Write to the vmap file, with the supplied dictionary containing the features +# The vmap path will be created if it doesn't exist +def createVmapFile(aMacroDictionary,aOutputfile): + if not os.path.exists(os.path.dirname(aOutputfile)): + os.makedirs(os.path.dirname(aOutputfile)) + try: + vmapfile = open(aOutputfile,'w') + except IOError: + error("Cannot write to " + aOutputfile) + i = 0 + while i < len(aMacroDictionary['FEATURENAME']): + vmapfile.write(aMacroDictionary['FEATURENAME'][i]+"="+aMacroDictionary['VALUE'][i]+"\n") + i += 1 + vmapfile.close() + +def check_exists(thing, filenames): + if not filenames: + error("No %s specified", thing) + return + + if not isinstance(filenames, list): + # we just have a single string + filenames = [filenames] + + for filename in filenames: + if not os.path.exists(filename): + error("The %s '%s' does not exist", thing, filename) + +# Main function, creates the vmap file +def main(): + + try: + global exitCode, printDebug + + # any exceptions make us traceback and exit + + parser = OptionParser(prog = "createvmap.py") + + parser.add_option("-c","--cpploc",action="store",dest="cpplocation",help="Full path of the preprocessor") + parser.add_option("-d","--debug",action="store_true",default=False,dest="debug",help="Turn debug information on") + parser.add_option("-D","--define",action="append",dest="defines",help="Macro definition") + parser.add_option("-f","--featurelist",action="append",dest="featurelistfile",help="List of featureslist files") + parser.add_option("-o","--output",action="store",dest="outputvmapfile",help="Output VMAP file name") + parser.add_option("-p","--preinclude",action="store",dest="preinclude",help="Pre-include file ") + parser.add_option("-s","--source",action="append",dest="sourcefiles",help="List of source files") + parser.add_option("-u","--userinc",action="append",dest="user_include",help="User Include Folders") + parser.add_option("-x","--systeminc",action="append",dest="system_include",help="System Include Folders") + + (options, leftover_args) = parser.parse_args(sys.argv[1:]) + + if leftover_args: + for invalids in leftover_args: + warning("Unknown parameter '%s'" % invalids) + + printDebug = options.debug + debug("Source Files -> %s", options.sourcefiles) + debug("Macro defines -> %s", options.defines) + debug("Features Files -> %s", options.featurelistfile) + debug("Pre-Include File -> %s", options.preinclude) + debug("User Includes -> %s", options.user_include) + debug("System Includes -> %s", options.system_include) + debug("CPP Location -> %s", options.cpplocation) + debug("VMAP Output name -> %s", options.outputvmapfile) + + featurelist = [] + definelist = "" + user_includeslist = "" + system_includeslist = "" + includeslist = "" + + # Some error checking code + if not options.outputvmapfile: + error("No output vmap file name supplied") + + # Source files must be supplied + check_exists("source file", options.sourcefiles) + + # A valid preinclude file must be supplied + check_exists("pre-include file", options.preinclude) + + # Some feature lists are required + check_exists("feature list", options.featurelistfile) + + # A cpp tool is required + check_exists("cpp tool", options.cpplocation) + + # if an essential option was missing then we should stop now + if exitCode != 0: + sys.exit(exitCode) + + # macro definitions + if options.defines: + for macro in options.defines: + definelist += " -D" + macro.replace('__SBS__QUOTE__', '\\"') + + # Note that we have to use -isystem for user includes and system + # includes to match what happens in the compiler. Long story. + + # Add each source directory as a user-include, so that our temporary + # concatenated source file can find includes that were next to the + # original source files. + # Check that all the specified source files exist + # and collect a set of all the source directories + sourcedirs = set() + for src in options.sourcefiles: + sourcedirs.add(os.path.dirname(src)) + + for srcdir in sourcedirs: + user_includeslist += " -isystem " + srcdir + + # Convert the include list to a string to be passed to cpp + if options.user_include: + for userinc in options.user_include: + user_includeslist += " -isystem " + userinc + if options.system_include: + for sysinc in options.system_include: + system_includeslist += " -isystem " + sysinc + + includeslist = user_includeslist + system_includeslist + + # Get a list of all the features, from all the featurelist files + featurelist = getFeatures(options.featurelistfile) + + # concatenate the source files together into a temporary file + try: + (tempfd, tempname) = tempfile.mkstemp() + temp = os.fdopen(tempfd, "w") + for src in options.sourcefiles: + sfile = open(src, "r") + for sline in sfile: + temp.write(sline) + sfile.close() + temp.close() + except Exception,e: + error("Could not write source files into temporary file %s : %s" % (tempname, str(e))) + return 1 + + debug("Temporary file name : " + tempname) + + # extract the macros from the concatenated source files + macro_dictionary = getVariationFeatures(featurelist, + options.preinclude, + tempname, + options.cpplocation, + definelist, + includeslist) + debug("Macros extracted:") + for key,values in macro_dictionary.iteritems(): + debug(key + " " + str(values)) + + # if there were no macros then the vmap file will be empty... + if not macro_dictionary['FEATURENAME']: + warning("No feature macros were found in the source") + + # Get rid of the temporary file + try: + os.remove(tempname) + except: + error("Could not delete temporary %s" % tempname) + + createVmapFile(macro_dictionary, options.outputvmapfile) + + # exit with 0 if OK + return exitCode + + except Exception,ex: + traceback.print_exc() + return 1 + +if __name__ == "__main__": + sys.exit(main()) + diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/bin/failedstats.py --- a/sbsv2/raptor/bin/failedstats.py Wed Oct 28 14:39:48 2009 +0000 +++ b/sbsv2/raptor/bin/failedstats.py Mon Nov 16 09:46:46 2009 +0000 @@ -1,161 +1,161 @@ -# -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of the License "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# Generate some useful statistics from a Raptor build log -# Work out what was specified to make but not built even if -# it was not mentioned in the make error output because some -# child's dependency was not satisfied. -# Needs raptor --tracking option to set make to use -debug=v -# An example bit of make output that can be analysed: -# - - File `fred.exe' does not exist. - Considering target file `fred.in'. - File `fred.in' does not exist. - Considering target file `a.o'. - File `a.o' does not exist. - Considering target file `a.c'. - Finished prerequisites of target file `a.c'. - No need to remake target `a.c'. - Pruning file `a.c'. - Finished prerequisites of target file `a.o'. - Must remake target `a.o'. -cc -c -o a.o a.c - Successfully remade target file `a.o'. - Considering target file `b.o'. - File `b.o' does not exist. - Considering target file `b.c'. - Finished prerequisites of target file `b.c'. - No need to remake target `b.c'. - Pruning file `b.c'. - Finished prerequisites of target file `b.o'. - Must remake target `b.o'. -cc -c -o b.o b.c - Successfully remade target file `b.o'. - Finished prerequisites of target file `fred.in'. - Must remake target `fred.in'. - Successfully remade target file `fred.in'. - Finished prerequisites of target file `fred.exe'. -Must remake target `fred.exe'. -Successfully remade target file `fred.exe'. -""" - -""" -Considering target file `/var/local/net/smb/tmurphy/pf/mcloverlay/common/generic/COMMS-INFRAS/ESOCK/commsdataobjects/src/provinfoqueryset.cpp'. - Finished prerequisites of target file `/var/local/net/smb/tmurphy/pf/mcloverlay/common/generic/COMMS-INFRAS/ESOC -K/commsdataobjects/src/provinfoqueryset.cpp'. -""" - -# The output is a filename followed by a number. If the number is 0 -# Then the prerequisites that file now exist. -# If > 0 then the prerequisites for that file could not be completed. - -import sys -from optparse import OptionParser -import re -import os -from stat import * - -def findfailed(file): - """ Find unbuilt files and prioritise them. - Higher numbers go to files that didn't fail because - of prerequisites. - - Rationale: files that failed because their prerequisites - failed are worth knowing about but cannot themselves be addressed. - """ - filecount = {} - extre = re.compile(".*\.(?P[^'\/\"]+)$", re.I) - startre = re.compile("[\t ]*File `(?P[^']*)\' does not exist.*", re.I) - zerore = re.compile("[\t ]*Successfully remade target file `(?P[^']*)'\..*", re.I) - #endre = re.compile("[\t ]*Finished prerequisites of target file `(?P[^']*)'\..*", re.I) - endre = re.compile("[\t ]*Giving up on target file `(?P[^']*)'\..*", re.I) - - for x in file.readlines(): - g = startre.match(x) - if g is not None: - filename = g.group('file').strip('"') - eg = extre.match(filename) - if eg is not None: - filecount[filename] = [1, eg.group('ext')] - else: - filecount[filename] = [1, "none"] - - else: - g = zerore.match(x) - if g is not None: - # Complete success - not interesting. - filename = g.group('file').strip('"') - if filename in filecount: - del filecount[filename] - else: - g = endre.match(x) - if g is not None: - # did manage to make the prerequisites, perhaps not the file - filename = g.group('file').strip('"') - if filename in filecount: - filecount[filename][0] = 2 - return filecount - -def showtargets(targets,prereq): - output=[] - for k in targets: - l = "%s\t%i\t%s" % (targets[k][1], targets[k][0], k) - if prereq: - if targets[k][0] == 2: - # There were missing pre-requisites - output.append(l) - else: - output.append(l) - output.sort() - for o in output: - sys.stdout.write("%s\n" % o) - -def readmake(file): - rule = re.compile("^[^ :$]*:[^=]", re.I) - for x in file.readlines(): - g = startre.match(x) - if g is not None: - filename = g.group('file').strip('"') - eg = extre.match(filename) - if eg is not None: - ext = eg.group('ext') - else: - ext = "none" - - - -parser = OptionParser(prog = "matchmade", - usage = "%prog [-h | options] [ -d make database filename ] logfile") - -parser.add_option("-m", "--missing-prerequistes", default = False, - action="store_true", dest="missing", help="List those targets whose pre-requisites could not be found or made") - -parser.add_option("-d","--make-db",action="store",dest="makedb", - help="name of make database") - -(options, args) = parser.parse_args() - -logname="stdin" -if len(args) > 0: - logname=args[0] - file = open(logname,"r") -else: - file = sys.stdin - -showtargets(findfailed(file),options.missing) -#assistmake(file,options.missing) - -if file != sys.stdin: - file.close() +# +# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# Generate some useful statistics from a Raptor build log +# Work out what was specified to make but not built even if +# it was not mentioned in the make error output because some +# child's dependency was not satisfied. +# Needs raptor --tracking option to set make to use -debug=v +# An example bit of make output that can be analysed: +# + + File `fred.exe' does not exist. + Considering target file `fred.in'. + File `fred.in' does not exist. + Considering target file `a.o'. + File `a.o' does not exist. + Considering target file `a.c'. + Finished prerequisites of target file `a.c'. + No need to remake target `a.c'. + Pruning file `a.c'. + Finished prerequisites of target file `a.o'. + Must remake target `a.o'. +cc -c -o a.o a.c + Successfully remade target file `a.o'. + Considering target file `b.o'. + File `b.o' does not exist. + Considering target file `b.c'. + Finished prerequisites of target file `b.c'. + No need to remake target `b.c'. + Pruning file `b.c'. + Finished prerequisites of target file `b.o'. + Must remake target `b.o'. +cc -c -o b.o b.c + Successfully remade target file `b.o'. + Finished prerequisites of target file `fred.in'. + Must remake target `fred.in'. + Successfully remade target file `fred.in'. + Finished prerequisites of target file `fred.exe'. +Must remake target `fred.exe'. +Successfully remade target file `fred.exe'. +""" + +""" +Considering target file `/var/local/net/smb/tmurphy/pf/mcloverlay/common/generic/COMMS-INFRAS/ESOCK/commsdataobjects/src/provinfoqueryset.cpp'. + Finished prerequisites of target file `/var/local/net/smb/tmurphy/pf/mcloverlay/common/generic/COMMS-INFRAS/ESOC +K/commsdataobjects/src/provinfoqueryset.cpp'. +""" + +# The output is a filename followed by a number. If the number is 0 +# Then the prerequisites that file now exist. +# If > 0 then the prerequisites for that file could not be completed. + +import sys +from optparse import OptionParser +import re +import os +from stat import * + +def findfailed(file): + """ Find unbuilt files and prioritise them. + Higher numbers go to files that didn't fail because + of prerequisites. + + Rationale: files that failed because their prerequisites + failed are worth knowing about but cannot themselves be addressed. + """ + filecount = {} + extre = re.compile(".*\.(?P[^'\/\"]+)$", re.I) + startre = re.compile("[\t ]*File `(?P[^']*)\' does not exist.*", re.I) + zerore = re.compile("[\t ]*Successfully remade target file `(?P[^']*)'\..*", re.I) + #endre = re.compile("[\t ]*Finished prerequisites of target file `(?P[^']*)'\..*", re.I) + endre = re.compile("[\t ]*Giving up on target file `(?P[^']*)'\..*", re.I) + + for x in file.readlines(): + g = startre.match(x) + if g is not None: + filename = g.group('file').strip('"') + eg = extre.match(filename) + if eg is not None: + filecount[filename] = [1, eg.group('ext')] + else: + filecount[filename] = [1, "none"] + + else: + g = zerore.match(x) + if g is not None: + # Complete success - not interesting. + filename = g.group('file').strip('"') + if filename in filecount: + del filecount[filename] + else: + g = endre.match(x) + if g is not None: + # did manage to make the prerequisites, perhaps not the file + filename = g.group('file').strip('"') + if filename in filecount: + filecount[filename][0] = 2 + return filecount + +def showtargets(targets,prereq): + output=[] + for k in targets: + l = "%s\t%i\t%s" % (targets[k][1], targets[k][0], k) + if prereq: + if targets[k][0] == 2: + # There were missing pre-requisites + output.append(l) + else: + output.append(l) + output.sort() + for o in output: + sys.stdout.write("%s\n" % o) + +def readmake(file): + rule = re.compile("^[^ :$]*:[^=]", re.I) + for x in file.readlines(): + g = startre.match(x) + if g is not None: + filename = g.group('file').strip('"') + eg = extre.match(filename) + if eg is not None: + ext = eg.group('ext') + else: + ext = "none" + + + +parser = OptionParser(prog = "matchmade", + usage = "%prog [-h | options] [ -d make database filename ] logfile") + +parser.add_option("-m", "--missing-prerequistes", default = False, + action="store_true", dest="missing", help="List those targets whose pre-requisites could not be found or made") + +parser.add_option("-d","--make-db",action="store",dest="makedb", + help="name of make database") + +(options, args) = parser.parse_args() + +logname="stdin" +if len(args) > 0: + logname=args[0] + file = open(logname,"r") +else: + file = sys.stdin + +showtargets(findfailed(file),options.missing) +#assistmake(file,options.missing) + +if file != sys.stdin: + file.close() diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/bin/fixmeta.py --- a/sbsv2/raptor/bin/fixmeta.py Wed Oct 28 14:39:48 2009 +0000 +++ b/sbsv2/raptor/bin/fixmeta.py Mon Nov 16 09:46:46 2009 +0000 @@ -1,81 +1,81 @@ -# -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of the License "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# fixmeta -# - -""" - Correct bld.infs, mmps etc to the point where it can be read by the build system - Currently it: - Corrects '\' in include statements to '/' - - Author: Tim Murphy, with a nod to Peter Harper's fixslashes.pl -""" - -import sys -import os -import re -from optparse import OptionParser - - -includeslash_re = re.compile('#include.*\\\\') -mmpfile_re = re.compile(".*\.mm[hp]$", re.I) -bldinf_re = re.compile(".*bld\.inf$", re.I) - -def fixincludeslash(m): - return m.group(0).replace('\\','/') - - -def checkconvert(dirname, filename): - tofilename=dirname + "/" + filename+".converted" - fromfilename = dirname + "/" + filename - fromfile = open(fromfilename,"r") - - conversions = False - fromtext = fromfile.read() - (totext, subcount) = re.subn(includeslash_re, fixincludeslash, fromtext) - - if subcount != 0: - print '"%s", %d backslash includes\n' % (fromfilename, subcount) - tofile = open( tofilename,"w") - tofile.write(totext) - tofile.close() - - fromfile.close() - if subcount != 0: - os.rename(fromfilename,fromfilename+".wrongslash") - os.rename(tofilename,fromfilename) - - - -def visit(arg, dirname, names): - #print "dir: %s\n" % (dirname) - for f in names: - m = mmpfile_re.match(f) - b = bldinf_re.match(f) - if m != None or b != None: - #print "\t"+f - checkconvert(dirname, f) - -parser = OptionParser(prog = "fixmeta", - usage = "%prog [-h | options] sourcepath containing files to be fixed.") - -(options, args) = parser.parse_args() - -if len(args) == 0: - print "Need at least one argument: a path to the source which is to be fixed." - sys.exit(-1) - -print "Walking\n" -os.path.walk(args[0],visit,None) +# +# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# fixmeta +# + +""" + Correct bld.infs, mmps etc to the point where it can be read by the build system + Currently it: + Corrects '\' in include statements to '/' + + Author: Tim Murphy, with a nod to Peter Harper's fixslashes.pl +""" + +import sys +import os +import re +from optparse import OptionParser + + +includeslash_re = re.compile('#include.*\\\\') +mmpfile_re = re.compile(".*\.mm[hp]$", re.I) +bldinf_re = re.compile(".*bld\.inf$", re.I) + +def fixincludeslash(m): + return m.group(0).replace('\\','/') + + +def checkconvert(dirname, filename): + tofilename=dirname + "/" + filename+".converted" + fromfilename = dirname + "/" + filename + fromfile = open(fromfilename,"r") + + conversions = False + fromtext = fromfile.read() + (totext, subcount) = re.subn(includeslash_re, fixincludeslash, fromtext) + + if subcount != 0: + print '"%s", %d backslash includes\n' % (fromfilename, subcount) + tofile = open( tofilename,"w") + tofile.write(totext) + tofile.close() + + fromfile.close() + if subcount != 0: + os.rename(fromfilename,fromfilename+".wrongslash") + os.rename(tofilename,fromfilename) + + + +def visit(arg, dirname, names): + #print "dir: %s\n" % (dirname) + for f in names: + m = mmpfile_re.match(f) + b = bldinf_re.match(f) + if m != None or b != None: + #print "\t"+f + checkconvert(dirname, f) + +parser = OptionParser(prog = "fixmeta", + usage = "%prog [-h | options] sourcepath containing files to be fixed.") + +(options, args) = parser.parse_args() + +if len(args) == 0: + print "Need at least one argument: a path to the source which is to be fixed." + sys.exit(-1) + +print "Walking\n" +os.path.walk(args[0],visit,None) diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/bin/install_raptor.sh --- a/sbsv2/raptor/bin/install_raptor.sh Wed Oct 28 14:39:48 2009 +0000 +++ b/sbsv2/raptor/bin/install_raptor.sh Mon Nov 16 09:46:46 2009 +0000 @@ -1,187 +1,187 @@ -#!/bin/bash -# raptor script - -# install sbsv2 - -chmod a+x "${PWD}/bin/gethost.sh" -export HOSTPLATFORM=$("$PWD/bin/gethost.sh") -export HOSTPLATFORM_DIR=$("$PWD/bin/gethost.sh" -d) - -export build_utils=no -if [[ ! -d "$PWD/$HOSTPLATFORM_DIR" ]]; then -cat << MSG - -The Raptor installer has determined that this computer is running: - $HOSTPLATFORM_DIR -This platform is not directly supported by the installer. - -If you proceed then the installation will attempt to build the Raptor tools for your platform. - -Your system must have some tools installed: -MSG - -if [ "$(which gcc)" ]; then - echo "You appear to have gcc" -else - echo "You DON'T appear to have gcc - please install it" -fi - -if [ "$(which g++)" ]; then - echo "You appear to have gcc-c++" -else - echo "You DON'T appear to have gcc-c++ (also called g++) - please install it" -fi - -if [ "$(which make)" ]; then - echo "You appear to have GNU make" -else - echo "You DON'T appear to have GNU make - please install it (version 3.81)" -fi - -if [ "$(which bison)" ]; then - echo "You appear to have GNU bison" -else - echo "You DON'T appear to have GNU bison - please install it " -fi - -if [ -f "/usr/include/ncurses.h" ]; then - echo "You appear to have the ncurses dev libraries" -else - echo "You DON'T appear to have the ncurses dev libraries - please install them (ncurses-dev or ncurses-devel)" -fi - -echo "Do you wish to continue (Y or y for 'yes' anything else for no)?" - -read X -if [[ "$X" != "y" && "$X" != "Y" ]]; then - exit 1 -else - build_utils=yes -fi - - -# Build the dialog utility so that we can get started -(export SBS_HOME=$PWD;cd "$SBS_HOME/util" && echo "Building dialog utility..." && (make -k -j2 dialog> dialog_util_build.log 2>&1 && echo -e "\nBuild Complete") || (echo "Dialog utility build failed, see $PWD/dialog_util_build.log for more details"; read X; exit 1)) || exit 1 - -fi - - -export DIALOG="$PWD/$HOSTPLATFORM_DIR/bin/dialog" -chmod a+x "$DIALOG" - -export SYMBIANHOME=/opt/symbian - -test -w "$SYMBIANHOME" -if [[ $? -ne 0 ]]; then -SYMBIANHOME=$(echo ~) -fi - -export TMPSBSDIR="$PWD" - -errorexit() { - echo -e "\nRaptor installation aborted: $1" 1>&2 - echo -e "\nInstall tmp dir is $TMPSBSDIR" 1>&2 - exit 1 - } - - -# get FULLVERSION and VERSION -export FULLVERSION="" -export VERSION="" -eval $(cat .version) - - -if [[ "$FULLVERSION" == "" || "$VERSION" == "" ]]; then - errorexit "Bad install package - no version found." -fi - - -export RESPONSEFILE=$PWD/.installdir -export MANIFEST=$PWD/.manifest -export SBS_HOME=$SYMBIANHOME/raptor-$(echo "$VERSION" | sed 's#\.##g') - -DIALOGVER=$($DIALOG --version) - -if ! expr match "$DIALOGVER" "Version:" 2>&1 >/dev/null; then - errorexit "Could not run the installation user interface on this version of Linux.\nPlease install the compat-glibc and compat-ncurses packages (RedHat) or the equivalent for your distribution and then try again.\n\nYou may also simply 'untar' raptor using the ' --target NewDirectory --noexec' options to this installer.\n" -fi - - -export DIALOGSBS=$DIALOG "--backtitle 'Installing $FULLVERSION'" - -$DIALOGSBS --msgbox "Symbian Build System Installer\n\n$FULLVERSION" 0 0 - -# check what SBS_HOME -$DIALOGSBS --title "Select Symbian Home Directory" --fselect "$SBS_HOME" 10 50 2> "$RESPONSEFILE" -SBS_HOME=$(cat "$RESPONSEFILE") - - -if [[ ! -d "$SBS_HOME" ]]; then - $DIALOGSBS --yesno "$SBS_HOME does not exist - should it be created?" 0 0; YESNO=$? - if [[ "$YESNO" -eq 0 ]]; then - mkdir -p "$SBS_HOME" || - ( - errorexit "Could not create directory $SBS_HOME" - ) - else - errorexit "SBSv2 Installation aborted: User chose not to create installation directory $SBS_HOME" - fi -else - # check if there's a previous install and give an option to stop - $DIALOGSBS --defaultno --yesno "$SBS_HOME already exists - should the installation be overwritten?" 0 0; YESNO=$? - if [[ "$YESNO" -eq 1 ]]; then - errorexit "Not replacing existing installation." - fi -fi - -# Install the software -echo "" >"$MANIFEST" -(tar -cf - *) | (cd $SBS_HOME && tar -xvf - > "$MANIFEST" && echo -e "\nCopying complete - press RETURN" >> "$MANIFEST") & -( -$DIALOGSBS --title "Copying SBS files" --tailbox "$MANIFEST" 20 60 -) - -# Build the utilities if needed -if [[ "$build_utils" == "yes" ]]; then -BUILDLOG=$SBS_HOME/util/util_build.log -(cd "$SBS_HOME/util" && echo "Building utilities ..." && make -k -j2 -if [[ $? -eq 0 ]]; then - echo -e "\nBuild Complete" -else - echo -e "\nUtility build failed, see $BUILDLOG for more details" - exit 1 -fi -) > "$BUILDLOG" 2>&1 & ( -$DIALOGSBS --title "Building utilities for $HOSTPLATFORM_DIR" --tailbox "$BUILDLOG" 20 60 -) -fi - - -# Force sbs to be executable: -chmod a+x "${SBS_HOME}/bin/sbs" -chmod a+x "${SBS_HOME}/bin/gethost.sh" -chmod a+x "${SBS_HOME}/bin/setup_user.sh" -chmod -R a+r "${SBS_HOME}" -chmod a+x "${SBS_HOME}/$HOSTPLATFORM_DIR/bin/"* -chmod a+x "${SBS_HOME}/$HOSTPLATFORM_DIR/bv/bin/"* -chmod a+x "${SBS_HOME}/$HOSTPLATFORM_DIR/bv/libexec/"*/*/* - - -# Prepare user scripts for bashrc and bash_profile -INSTALLER="${SBS_HOME}/util/install-linux" -sed "s#__SBS_HOME__#${SBS_HOME}#" < "${INSTALLER}/linux_bash_profile" > "${SBS_HOME}/bin/user.bash_profile" -sed "s#__SBS_HOME__#${SBS_HOME}#" < "${INSTALLER}/linux_bashrc" > "${SBS_HOME}/bin/user.bashrc" - -# Set symbolic Link -if [[ -L "$SYMBIANHOME/raptor" ]]; then - rm "$SYMBIANHOME/raptor" -fi - -if [[ ! -e "$SYMBIANHOME/raptor" ]]; then - ln -s "$SBS_HOME" "$SYMBIANHOME/raptor" -fi - - -$DIALOGSBS --msgbox "Raptor $VERSION\ninstallation complete" 0 0 - - +#!/bin/bash +# raptor script + +# install sbsv2 + +chmod a+x "${PWD}/bin/gethost.sh" +export HOSTPLATFORM=$("$PWD/bin/gethost.sh") +export HOSTPLATFORM_DIR=$("$PWD/bin/gethost.sh" -d) + +export build_utils=no +if [[ ! -d "$PWD/$HOSTPLATFORM_DIR" ]]; then +cat << MSG + +The Raptor installer has determined that this computer is running: + $HOSTPLATFORM_DIR +This platform is not directly supported by the installer. + +If you proceed then the installation will attempt to build the Raptor tools for your platform. + +Your system must have some tools installed: +MSG + +if [ "$(which gcc)" ]; then + echo "You appear to have gcc" +else + echo "You DON'T appear to have gcc - please install it" +fi + +if [ "$(which g++)" ]; then + echo "You appear to have gcc-c++" +else + echo "You DON'T appear to have gcc-c++ (also called g++) - please install it" +fi + +if [ "$(which make)" ]; then + echo "You appear to have GNU make" +else + echo "You DON'T appear to have GNU make - please install it (version 3.81)" +fi + +if [ "$(which bison)" ]; then + echo "You appear to have GNU bison" +else + echo "You DON'T appear to have GNU bison - please install it " +fi + +if [ -f "/usr/include/ncurses.h" ]; then + echo "You appear to have the ncurses dev libraries" +else + echo "You DON'T appear to have the ncurses dev libraries - please install them (ncurses-dev or ncurses-devel)" +fi + +echo "Do you wish to continue (Y or y for 'yes' anything else for no)?" + +read X +if [[ "$X" != "y" && "$X" != "Y" ]]; then + exit 1 +else + build_utils=yes +fi + + +# Build the dialog utility so that we can get started +(export SBS_HOME=$PWD;cd "$SBS_HOME/util" && echo "Building dialog utility..." && (make -k -j2 dialog> dialog_util_build.log 2>&1 && echo -e "\nBuild Complete") || (echo "Dialog utility build failed, see $PWD/dialog_util_build.log for more details"; read X; exit 1)) || exit 1 + +fi + + +export DIALOG="$PWD/$HOSTPLATFORM_DIR/bin/dialog" +chmod a+x "$DIALOG" + +export SYMBIANHOME=/opt/symbian + +test -w "$SYMBIANHOME" +if [[ $? -ne 0 ]]; then +SYMBIANHOME=$(echo ~) +fi + +export TMPSBSDIR="$PWD" + +errorexit() { + echo -e "\nRaptor installation aborted: $1" 1>&2 + echo -e "\nInstall tmp dir is $TMPSBSDIR" 1>&2 + exit 1 + } + + +# get FULLVERSION and VERSION +export FULLVERSION="" +export VERSION="" +eval $(cat .version) + + +if [[ "$FULLVERSION" == "" || "$VERSION" == "" ]]; then + errorexit "Bad install package - no version found." +fi + + +export RESPONSEFILE=$PWD/.installdir +export MANIFEST=$PWD/.manifest +export SBS_HOME=$SYMBIANHOME/raptor-$(echo "$VERSION" | sed 's#\.##g') + +DIALOGVER=$($DIALOG --version) + +if ! expr match "$DIALOGVER" "Version:" 2>&1 >/dev/null; then + errorexit "Could not run the installation user interface on this version of Linux.\nPlease install the compat-glibc and compat-ncurses packages (RedHat) or the equivalent for your distribution and then try again.\n\nYou may also simply 'untar' raptor using the ' --target NewDirectory --noexec' options to this installer.\n" +fi + + +export DIALOGSBS=$DIALOG "--backtitle 'Installing $FULLVERSION'" + +$DIALOGSBS --msgbox "Symbian Build System Installer\n\n$FULLVERSION" 0 0 + +# check what SBS_HOME +$DIALOGSBS --title "Select Symbian Home Directory" --fselect "$SBS_HOME" 10 50 2> "$RESPONSEFILE" +SBS_HOME=$(cat "$RESPONSEFILE") + + +if [[ ! -d "$SBS_HOME" ]]; then + $DIALOGSBS --yesno "$SBS_HOME does not exist - should it be created?" 0 0; YESNO=$? + if [[ "$YESNO" -eq 0 ]]; then + mkdir -p "$SBS_HOME" || + ( + errorexit "Could not create directory $SBS_HOME" + ) + else + errorexit "SBSv2 Installation aborted: User chose not to create installation directory $SBS_HOME" + fi +else + # check if there's a previous install and give an option to stop + $DIALOGSBS --defaultno --yesno "$SBS_HOME already exists - should the installation be overwritten?" 0 0; YESNO=$? + if [[ "$YESNO" -eq 1 ]]; then + errorexit "Not replacing existing installation." + fi +fi + +# Install the software +echo "" >"$MANIFEST" +(tar -cf - *) | (cd $SBS_HOME && tar -xvf - > "$MANIFEST" && echo -e "\nCopying complete - press RETURN" >> "$MANIFEST") & +( +$DIALOGSBS --title "Copying SBS files" --tailbox "$MANIFEST" 20 60 +) + +# Build the utilities if needed +if [[ "$build_utils" == "yes" ]]; then +BUILDLOG=$SBS_HOME/util/util_build.log +(cd "$SBS_HOME/util" && echo "Building utilities ..." && make -k -j2 +if [[ $? -eq 0 ]]; then + echo -e "\nBuild Complete" +else + echo -e "\nUtility build failed, see $BUILDLOG for more details" + exit 1 +fi +) > "$BUILDLOG" 2>&1 & ( +$DIALOGSBS --title "Building utilities for $HOSTPLATFORM_DIR" --tailbox "$BUILDLOG" 20 60 +) +fi + + +# Force sbs to be executable: +chmod a+x "${SBS_HOME}/bin/sbs" +chmod a+x "${SBS_HOME}/bin/gethost.sh" +chmod a+x "${SBS_HOME}/bin/setup_user.sh" +chmod -R a+r "${SBS_HOME}" +chmod a+x "${SBS_HOME}/$HOSTPLATFORM_DIR/bin/"* +chmod a+x "${SBS_HOME}/$HOSTPLATFORM_DIR/bv/bin/"* +chmod a+x "${SBS_HOME}/$HOSTPLATFORM_DIR/bv/libexec/"*/*/* + + +# Prepare user scripts for bashrc and bash_profile +INSTALLER="${SBS_HOME}/util/install-linux" +sed "s#__SBS_HOME__#${SBS_HOME}#" < "${INSTALLER}/linux_bash_profile" > "${SBS_HOME}/bin/user.bash_profile" +sed "s#__SBS_HOME__#${SBS_HOME}#" < "${INSTALLER}/linux_bashrc" > "${SBS_HOME}/bin/user.bashrc" + +# Set symbolic Link +if [[ -L "$SYMBIANHOME/raptor" ]]; then + rm "$SYMBIANHOME/raptor" +fi + +if [[ ! -e "$SYMBIANHOME/raptor" ]]; then + ln -s "$SBS_HOME" "$SYMBIANHOME/raptor" +fi + + +$DIALOGSBS --msgbox "Raptor $VERSION\ninstallation complete" 0 0 + + diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/bin/mkgetfailed.py --- a/sbsv2/raptor/bin/mkgetfailed.py Wed Oct 28 14:39:48 2009 +0000 +++ b/sbsv2/raptor/bin/mkgetfailed.py Mon Nov 16 09:46:46 2009 +0000 @@ -1,111 +1,111 @@ -# -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of the License "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# Generate some useful statistics from a Raptor build log -# Work out what was specified to make but not built even if -# it was not mentioned in the make error output because some -# child's dependency was not satisfied. -# Needs raptor --tracking option to set make to use -debug=v -# An example bit of make output that can be analysed: -# - - File `fred.exe' does not exist. - Considering target file `fred.in'. - File `fred.in' does not exist. - Considering target file `a.o'. - File `a.o' does not exist. - Considering target file `a.c'. - Finished prerequisites of target file `a.c'. - No need to remake target `a.c'. - Pruning file `a.c'. - Finished prerequisites of target file `a.o'. - Must remake target `a.o'. -cc -c -o a.o a.c - Successfully remade target file `a.o'. - Considering target file `b.o'. - File `b.o' does not exist. - Considering target file `b.c'. - Finished prerequisites of target file `b.c'. - No need to remake target `b.c'. - Pruning file `b.c'. - Finished prerequisites of target file `b.o'. - Must remake target `b.o'. -cc -c -o b.o b.c - Successfully remade target file `b.o'. - Finished prerequisites of target file `fred.in'. - Must remake target `fred.in'. - Successfully remade target file `fred.in'. - Finished prerequisites of target file `fred.exe'. -Must remake target `fred.exe'. -Successfully remade target file `fred.exe'. -""" - -# The output is a filename followed by a number. If the number is 0 -# Then the prerequisites that file now exist. -# If > 0 then the prerequisites for that file could not be completed. - -import sys -from optparse import OptionParser -import re -import os -from stat import * - -def genstats(file,showmissing): - filecount = {} - startre = re.compile("[\t ]*File `(?P[^']*)' does not exist") - endre = re.compile("[\t ]*Finished prerequisites of target file `(?P[^']*)'\..*") - for x in file.readlines(): - g = startre.match(x) - if g is not None: - filename = g.group('file') - try: - filecount[filename] += 1 - except KeyError: - filecount[filename] = 1 - else: - g = endre.match(x) - if g is not None: - filename = g.group('file') - try: - filecount[filename] -= 1 - except KeyError: - filecount[filename] = 0 - - for k in filecount: - if showmissing: - if filecount[k] > 0: - print "%s: %i" % (k,filecount[k]) - else: - print "%s: %i" % (k,filecount[k]) - - -parser = OptionParser(prog = "matchmade", - usage = "%prog [-h | options] logfile") - -parser.add_option("-m", "--missing-prerequistes", default = False, - action="store_true", dest="missing", help="List those targets whose pre-requisites could not be found or made") - -(options, args) = parser.parse_args() - -logname="stdin" -if len(args) > 0: - logname=args[0] - file = open(logname,"r") -else: - file = sys.stdin - -genstats(file,options.missing) - -if file != sys.stdin: - file.close() +# +# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# Generate some useful statistics from a Raptor build log +# Work out what was specified to make but not built even if +# it was not mentioned in the make error output because some +# child's dependency was not satisfied. +# Needs raptor --tracking option to set make to use -debug=v +# An example bit of make output that can be analysed: +# + + File `fred.exe' does not exist. + Considering target file `fred.in'. + File `fred.in' does not exist. + Considering target file `a.o'. + File `a.o' does not exist. + Considering target file `a.c'. + Finished prerequisites of target file `a.c'. + No need to remake target `a.c'. + Pruning file `a.c'. + Finished prerequisites of target file `a.o'. + Must remake target `a.o'. +cc -c -o a.o a.c + Successfully remade target file `a.o'. + Considering target file `b.o'. + File `b.o' does not exist. + Considering target file `b.c'. + Finished prerequisites of target file `b.c'. + No need to remake target `b.c'. + Pruning file `b.c'. + Finished prerequisites of target file `b.o'. + Must remake target `b.o'. +cc -c -o b.o b.c + Successfully remade target file `b.o'. + Finished prerequisites of target file `fred.in'. + Must remake target `fred.in'. + Successfully remade target file `fred.in'. + Finished prerequisites of target file `fred.exe'. +Must remake target `fred.exe'. +Successfully remade target file `fred.exe'. +""" + +# The output is a filename followed by a number. If the number is 0 +# Then the prerequisites that file now exist. +# If > 0 then the prerequisites for that file could not be completed. + +import sys +from optparse import OptionParser +import re +import os +from stat import * + +def genstats(file,showmissing): + filecount = {} + startre = re.compile("[\t ]*File `(?P[^']*)' does not exist") + endre = re.compile("[\t ]*Finished prerequisites of target file `(?P[^']*)'\..*") + for x in file.readlines(): + g = startre.match(x) + if g is not None: + filename = g.group('file') + try: + filecount[filename] += 1 + except KeyError: + filecount[filename] = 1 + else: + g = endre.match(x) + if g is not None: + filename = g.group('file') + try: + filecount[filename] -= 1 + except KeyError: + filecount[filename] = 0 + + for k in filecount: + if showmissing: + if filecount[k] > 0: + print "%s: %i" % (k,filecount[k]) + else: + print "%s: %i" % (k,filecount[k]) + + +parser = OptionParser(prog = "matchmade", + usage = "%prog [-h | options] logfile") + +parser.add_option("-m", "--missing-prerequistes", default = False, + action="store_true", dest="missing", help="List those targets whose pre-requisites could not be found or made") + +(options, args) = parser.parse_args() + +logname="stdin" +if len(args) > 0: + logname=args[0] + file = open(logname,"r") +else: + file = sys.stdin + +genstats(file,options.missing) + +if file != sys.stdin: + file.close() diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/bin/oby2linux.py --- a/sbsv2/raptor/bin/oby2linux.py Wed Oct 28 14:39:48 2009 +0000 +++ b/sbsv2/raptor/bin/oby2linux.py Mon Nov 16 09:46:46 2009 +0000 @@ -1,73 +1,73 @@ -# -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of the License "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# oby2linux -# - -""" - Convert an OBY file into a form that rombuild on Linux can use. - This involves converting paths etc. In addition it finds those target - files whose case may not match what exists on the filesystem - (a build must have been completed). - - It also fills in those items that weren't built from a directory - containing a prebuild epoc32 dir. -""" - - -import sys -import os -import re - -sys.path.append(os.environ['SBS_HOME']+'/python') -import generic_path - -epocroot = os.environ['EPOCROOT'] - -try: - romfillin_epocroot = os.environ['ROMFILLIN_EPOCROOT'] -except: - sys.stderr.write("Please set ROMFILLIN_EPOCROOT to a path with an epoc32 directory\n") - sys.exit(1) - -if not os.path.isdir(romfillin_epocroot+'/epoc32'): - sys.stderr.write("Please set ROMFILLIN_EPOCROOT to a path with an epoc32 directory\n") - sys.exit(1) - -filestatement_re=re.compile("^(?P
((((primary)|(secondary)|(extension)|(device)|(variant))(\[0x[0-9a-zA-Z]+\])?=)|((file)|(data)|(bootbinary))=))(?P\S+)(?P.*)$")
-
-for line in sys.stdin.xreadlines():
-	line = line.rstrip()
-	m = filestatement_re.search(line)
-	if m is not None:
-		fname =  m.groupdict()['filename'].replace('\\','/').strip('"')
-		filename = generic_path.Path(epocroot + fname)
-		filefound = filename.FindCaseless()
-		if filefound is not None:
-			print m.groupdict()['pre'] + str(filefound) + m.groupdict()['tail']
-			#print filefound
-		else:
-			fillinname = generic_path.Path(romfillin_epocroot+fname)
-			filefound =  fillinname.FindCaseless()
-			if filefound is not None:
-				sys.stderr.write("filledinmissing: %s\n" % str(filefound))
-				print m.groupdict()['pre'] + str(filefound) + m.groupdict()['tail']
-				#print filefound
-			else:
-				sys.stderr.write("filenotfound: %s\n" % str(filename))
-	else:
-		print line
-
-	
-
+#
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# oby2linux
+#
+
+"""
+  Convert an OBY file into a form that rombuild on Linux can use.
+  This involves converting paths etc.  In addition it finds those target
+  files whose case may not match what exists on the filesystem
+  (a build must have been completed).
+ 
+  It also fills in those items that weren't built from a directory 
+  containing a prebuild epoc32 dir.
+"""
+
+
+import sys
+import os
+import re
+
+sys.path.append(os.environ['SBS_HOME']+'/python')
+import generic_path
+
+epocroot = os.environ['EPOCROOT']
+
+try:
+	romfillin_epocroot = os.environ['ROMFILLIN_EPOCROOT']
+except:
+	sys.stderr.write("Please set ROMFILLIN_EPOCROOT to a path with an epoc32 directory\n")
+	sys.exit(1)
+
+if not os.path.isdir(romfillin_epocroot+'/epoc32'):
+	sys.stderr.write("Please set ROMFILLIN_EPOCROOT to a path with an epoc32 directory\n")
+	sys.exit(1)
+
+filestatement_re=re.compile("^(?P
((((primary)|(secondary)|(extension)|(device)|(variant))(\[0x[0-9a-zA-Z]+\])?=)|((file)|(data)|(bootbinary))=))(?P\S+)(?P.*)$")
+
+for line in sys.stdin.xreadlines():
+	line = line.rstrip()
+	m = filestatement_re.search(line)
+	if m is not None:
+		fname =  m.groupdict()['filename'].replace('\\','/').strip('"')
+		filename = generic_path.Path(epocroot + fname)
+		filefound = filename.FindCaseless()
+		if filefound is not None:
+			print m.groupdict()['pre'] + str(filefound) + m.groupdict()['tail']
+			#print filefound
+		else:
+			fillinname = generic_path.Path(romfillin_epocroot+fname)
+			filefound =  fillinname.FindCaseless()
+			if filefound is not None:
+				sys.stderr.write("filledinmissing: %s\n" % str(filefound))
+				print m.groupdict()['pre'] + str(filefound) + m.groupdict()['tail']
+				#print filefound
+			else:
+				sys.stderr.write("filenotfound: %s\n" % str(filename))
+	else:
+		print line
+
+	
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/bin/osbuild.sh
--- a/sbsv2/raptor/bin/osbuild.sh	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/bin/osbuild.sh	Mon Nov 16 09:46:46 2009 +0000
@@ -1,264 +1,264 @@
-#!/bin/sh
-
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# Build automation for Symbian OS with Raptor
-# Author: Timothy N Murphy
-# 
-#
-
-# Default settings.  You may override these by specifying a setup script
-# as the first commandline argument
-#
-H=$HOME
-export H
-export EPOCROOT="$H/baselineos"
-export LOGBASEDIR=~/public_html/buildlogs
-export BUILDROOT="$H/baselineos"
-export SOURCEROOT="$H/baselineos/fsupdate"
-export SYSDEF="$H/baselineos/system_definition_fsupdate.xml"
-export PREEXPORTSYSDEF="$SBS_HOME/test/envelope/preexport.xml"
-export PLATFORMS="-c armv5"
-export PARALLEL=46
-export SYNCSBSSOURCE=""
-export UNSPLITDIRS="$SBS_HOME/unsplitdirs.py"
-
-# Do we want to attempt to build a ROM?
-export DOROMBUILD=""
-export ROMFILLIN_EPOCROOT=$BUILDROOT/rom_fillin
-#  We need to specify the OBY file (must be generated on windows)
-export ROMOBYFILE="$BUILDROOT/h4hrp_001.techview.oby" 
-
-# Do you have server that runs evalid automatically?
-export SENDTOEVALIDSERVER=""
-#  The following should be mounted:
-export EVALIDSERVERMOUNT="/mnt/evalidserver"
-export USERBUILDID=""
-
-
-# Allow overrides to this default config
-if [ ! -z $1 ]; then 
-	if [ -f "$1" ]; then
-		. $1
-	else
-		echo "You must supply a build type as the first parameter - this should be a setup script"
-		exit 1
-	fi
-fi
-
-
-genstats() { 
-if [ "$1.stats"  -ot "$1.log" ]; then
-python "$SBS_HOME/bin/buildstats.py"  "$1.log" >  "$1.stats" && 
-#python "$SBS_HOME/bin/failedstats.py" -m  "$1.log" >  "$1.failed"; 
-(
-	cd $EPOCROOT/epoc32 && find "release" > "$1.release_files" && find "build" > "$1.build_files" && find include > "$1.include_files"
-)
-fi;
-}
-
-cd $BUILDROOT
-
-
-# Don't edit the rest:
-###################################################
-export KEY=`date +%d_%m_%y`
-export DAILYDIR="$LOGBASEDIR/$KEY"
-
-export BUILDNAME="`basename \"$SYSDEF\" | sed 's#\.[^.][^.]*$##'`"
-if [ ! -z "$USERBUILDID" ]; then
-	BUILDNAME="$USERBUILDID-$BUILDNAME"
-fi
-export LOGNAME="${BUILDNAME}_${KEY}"
-
-for BUILDNUM in {1..50}; do
-	if [ ! -d "$DAILYDIR/$BUILDNUM" ]; then
-		break
-	fi
-	if [ -z "`echo $DAILYDIR/$BUILDNUM/*_BUILDNUM.log*`" ]; then
-		break
-	fi
-done
-
-OUTDIR="$DAILYDIR/$BUILDNUM"
-export TESTLOG="$OUTDIR/test.log"
-
-# make the day's directory
-mkdir -p "$OUTDIR"
-
-echo "testrun: $TESTLOG, build $BUILDNUM of the day:"
-echo '' > "$TESTLOG"
-
-echo "Parallel: $PARALLEL"
-(
-echo ""
-echo "	"
-echo "	$DAILYDIR/$BUILDNUM/${LOGNAME}_$BUILDNUM.log"
-MAKEFILE=$EPOCROOT/epoc32/build/Makefile
-echo ""
-
-TIMELOG="$OUTDIR/${LOGNAME}_$BUILDNUM.time"
-
-echo "	 "$OUTDIR/unzip" &&
-chmod -R u+rw "$EPOCROOT/epoc32" &&
-echo "unzipped skeleton epoc32 tree" 
-)
-
-
-# (re)Initialise the cluster if required.
-(
-if [ ! -z "$PARALLEL" ]; then
-	echo "Setting up cluster"
-	echo "Parallel: $PARALLEL"
-	set -x
-	echo -e "halt\n" | pvm >/dev/null
-	echo -e "quit\n" | pvm $BUILDROOT/pvmhosts.$PARALLEL >/dev/null
-	set +x
-else
-	echo "Parallel: 0 - no cluster setup"
-	set -x
-	echo -e "halt\n" | pvm >/dev/null
-	set +x
-fi
-)
-
-
-set +x
-echo "Prepping makefiles"
-(
-	echo "\n"
-	export TIMEFORMAT="\n"
-	time $SBS_HOME/bin/sbs -d -k -s "$SYSDEF" -a "$SOURCEROOT" $PLATFORMS -n > $OUTDIR/${LOGNAME}_$BUILDNUM.meta 2>&1 
-	#time cp performance_Makefile $MAKEFILE
-)  > "$TIMELOG" 2>&1
-echo "Running Make"
-(
-	# The build process
-	export TIMEFORMAT="\n"
-
-	time /opt/symbian/make-pvm-381/pvmgmake -j$PARALLEL -k -f $MAKEFILE  > "$OUTDIR/${LOGNAME}_$BUILDNUM.log"  2>&1 
-	touch "$SIGNALTOSTOPFILE"
-	echo "\n"
-) >> "$TIMELOG" 2>&1 & 
-(
-	# Concurrent process to continuously update statistics
-	echo ""
-
-	while [ 1 -eq 1 ]; do
-		sleep 20 
-		echo -n "."
-
-		if [ -e "$SIGNALTOSTOPFILE" ]; then
-			rm -f "$SIGNALTOSTOPFILE"
-			break
-		fi
-	done
-	echo ""
-)
-#set +x
-#genstats "$OUTDIR/${LOGNAME}_$BUILDNUM"
-(
-	echo "UNSPLITTING DIRECTORIES"
-        set -x
-        cd $EPOCROOT/epoc32 &&
-        python $UNSPLITDIRS -l . &&
-        set +x
-
-) && (
-	if [ ! -z "$DOROMBUILD" ]; then
-		echo "Building ROM"
-		set -x
-		cd $EPOCROOT &&
-        	unzip -o $BUILDROOT/data.zip >/dev/null &&
-		python $BUILDROOT/oby_tolinux.py < "$ROMOBYFILE" >PROCESSED_H4HRP_001.TECHVIEW.OBY
-		$EPOCROOT/epoc32/tools/rombuild -type-safe-link PROCESSED_H4HRP_001.TECHVIEW.OBY
-		cp
-		set +x
-	else
-		echo "NOT Building ROM"
-	fi
-)
-
-(
-	if [ ! -z "$SENDTOEVALIDSERVER" ]; then
-        	echo "Sending epoc32/release and epoc32/data to the evalidserver"
-		set -x
-		ZIPFILE="$DAILYDIR/$BUILDNUM/${LOGNAME}_$BUILDNUM.zip"
-		cd $EPOCROOT &&
-		find epoc32/release epoc32/data | zip "$ZIPFILE" -@ >/dev/null 2>&1 &&
-		cp "$ZIPFILE" /mnt/evalidserver 
-		set +x
-	else
-        	echo "NOT sending epoc32/release and epoc32/data to the evalidserver"
-	fi
-)
-
-# Zip the logs - note that test.log should not be zipped since the output from the zip goes into it
-(
-	echo "Zipping logs..."
-	set -x
-	cd $OUTDIR &&
-	zip ${LOGNAME}_${BUILDNUM}_logs.zip *.time *.meta *.log *.preexport -x test.log
-	set +x
-)
-
-
-echo "	]]>"
-echo ""
-) >> "$TESTLOG" 2>&1
-
-BUILDNUM=$[ $BUILDNUM + 1 ]
-# use a new output directory
-echo -e "" >> "$TESTLOG"
-echo "" >> "$TESTLOG"
+#!/bin/sh
+
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Build automation for Symbian OS with Raptor
+# Author: Timothy N Murphy
+# 
+#
+
+# Default settings.  You may override these by specifying a setup script
+# as the first commandline argument
+#
+H=$HOME
+export H
+export EPOCROOT="$H/baselineos"
+export LOGBASEDIR=~/public_html/buildlogs
+export BUILDROOT="$H/baselineos"
+export SOURCEROOT="$H/baselineos/fsupdate"
+export SYSDEF="$H/baselineos/system_definition_fsupdate.xml"
+export PREEXPORTSYSDEF="$SBS_HOME/test/envelope/preexport.xml"
+export PLATFORMS="-c armv5"
+export PARALLEL=46
+export SYNCSBSSOURCE=""
+export UNSPLITDIRS="$SBS_HOME/unsplitdirs.py"
+
+# Do we want to attempt to build a ROM?
+export DOROMBUILD=""
+export ROMFILLIN_EPOCROOT=$BUILDROOT/rom_fillin
+#  We need to specify the OBY file (must be generated on windows)
+export ROMOBYFILE="$BUILDROOT/h4hrp_001.techview.oby" 
+
+# Do you have server that runs evalid automatically?
+export SENDTOEVALIDSERVER=""
+#  The following should be mounted:
+export EVALIDSERVERMOUNT="/mnt/evalidserver"
+export USERBUILDID=""
+
+
+# Allow overrides to this default config
+if [ ! -z $1 ]; then 
+	if [ -f "$1" ]; then
+		. $1
+	else
+		echo "You must supply a build type as the first parameter - this should be a setup script"
+		exit 1
+	fi
+fi
+
+
+genstats() { 
+if [ "$1.stats"  -ot "$1.log" ]; then
+python "$SBS_HOME/bin/buildstats.py"  "$1.log" >  "$1.stats" && 
+#python "$SBS_HOME/bin/failedstats.py" -m  "$1.log" >  "$1.failed"; 
+(
+	cd $EPOCROOT/epoc32 && find "release" > "$1.release_files" && find "build" > "$1.build_files" && find include > "$1.include_files"
+)
+fi;
+}
+
+cd $BUILDROOT
+
+
+# Don't edit the rest:
+###################################################
+export KEY=`date +%d_%m_%y`
+export DAILYDIR="$LOGBASEDIR/$KEY"
+
+export BUILDNAME="`basename \"$SYSDEF\" | sed 's#\.[^.][^.]*$##'`"
+if [ ! -z "$USERBUILDID" ]; then
+	BUILDNAME="$USERBUILDID-$BUILDNAME"
+fi
+export LOGNAME="${BUILDNAME}_${KEY}"
+
+for BUILDNUM in {1..50}; do
+	if [ ! -d "$DAILYDIR/$BUILDNUM" ]; then
+		break
+	fi
+	if [ -z "`echo $DAILYDIR/$BUILDNUM/*_BUILDNUM.log*`" ]; then
+		break
+	fi
+done
+
+OUTDIR="$DAILYDIR/$BUILDNUM"
+export TESTLOG="$OUTDIR/test.log"
+
+# make the day's directory
+mkdir -p "$OUTDIR"
+
+echo "testrun: $TESTLOG, build $BUILDNUM of the day:"
+echo '' > "$TESTLOG"
+
+echo "Parallel: $PARALLEL"
+(
+echo ""
+echo "	"
+echo "	$DAILYDIR/$BUILDNUM/${LOGNAME}_$BUILDNUM.log"
+MAKEFILE=$EPOCROOT/epoc32/build/Makefile
+echo ""
+
+TIMELOG="$OUTDIR/${LOGNAME}_$BUILDNUM.time"
+
+echo "	 "$OUTDIR/unzip" &&
+chmod -R u+rw "$EPOCROOT/epoc32" &&
+echo "unzipped skeleton epoc32 tree" 
+)
+
+
+# (re)Initialise the cluster if required.
+(
+if [ ! -z "$PARALLEL" ]; then
+	echo "Setting up cluster"
+	echo "Parallel: $PARALLEL"
+	set -x
+	echo -e "halt\n" | pvm >/dev/null
+	echo -e "quit\n" | pvm $BUILDROOT/pvmhosts.$PARALLEL >/dev/null
+	set +x
+else
+	echo "Parallel: 0 - no cluster setup"
+	set -x
+	echo -e "halt\n" | pvm >/dev/null
+	set +x
+fi
+)
+
+
+set +x
+echo "Prepping makefiles"
+(
+	echo "\n"
+	export TIMEFORMAT="\n"
+	time $SBS_HOME/bin/sbs -d -k -s "$SYSDEF" -a "$SOURCEROOT" $PLATFORMS -n > $OUTDIR/${LOGNAME}_$BUILDNUM.meta 2>&1 
+	#time cp performance_Makefile $MAKEFILE
+)  > "$TIMELOG" 2>&1
+echo "Running Make"
+(
+	# The build process
+	export TIMEFORMAT="\n"
+
+	time /opt/symbian/make-pvm-381/pvmgmake -j$PARALLEL -k -f $MAKEFILE  > "$OUTDIR/${LOGNAME}_$BUILDNUM.log"  2>&1 
+	touch "$SIGNALTOSTOPFILE"
+	echo "\n"
+) >> "$TIMELOG" 2>&1 & 
+(
+	# Concurrent process to continuously update statistics
+	echo ""
+
+	while [ 1 -eq 1 ]; do
+		sleep 20 
+		echo -n "."
+
+		if [ -e "$SIGNALTOSTOPFILE" ]; then
+			rm -f "$SIGNALTOSTOPFILE"
+			break
+		fi
+	done
+	echo ""
+)
+#set +x
+#genstats "$OUTDIR/${LOGNAME}_$BUILDNUM"
+(
+	echo "UNSPLITTING DIRECTORIES"
+        set -x
+        cd $EPOCROOT/epoc32 &&
+        python $UNSPLITDIRS -l . &&
+        set +x
+
+) && (
+	if [ ! -z "$DOROMBUILD" ]; then
+		echo "Building ROM"
+		set -x
+		cd $EPOCROOT &&
+        	unzip -o $BUILDROOT/data.zip >/dev/null &&
+		python $BUILDROOT/oby_tolinux.py < "$ROMOBYFILE" >PROCESSED_H4HRP_001.TECHVIEW.OBY
+		$EPOCROOT/epoc32/tools/rombuild -type-safe-link PROCESSED_H4HRP_001.TECHVIEW.OBY
+		cp
+		set +x
+	else
+		echo "NOT Building ROM"
+	fi
+)
+
+(
+	if [ ! -z "$SENDTOEVALIDSERVER" ]; then
+        	echo "Sending epoc32/release and epoc32/data to the evalidserver"
+		set -x
+		ZIPFILE="$DAILYDIR/$BUILDNUM/${LOGNAME}_$BUILDNUM.zip"
+		cd $EPOCROOT &&
+		find epoc32/release epoc32/data | zip "$ZIPFILE" -@ >/dev/null 2>&1 &&
+		cp "$ZIPFILE" /mnt/evalidserver 
+		set +x
+	else
+        	echo "NOT sending epoc32/release and epoc32/data to the evalidserver"
+	fi
+)
+
+# Zip the logs - note that test.log should not be zipped since the output from the zip goes into it
+(
+	echo "Zipping logs..."
+	set -x
+	cd $OUTDIR &&
+	zip ${LOGNAME}_${BUILDNUM}_logs.zip *.time *.meta *.log *.preexport -x test.log
+	set +x
+)
+
+
+echo "	]]>"
+echo ""
+) >> "$TESTLOG" 2>&1
+
+BUILDNUM=$[ $BUILDNUM + 1 ]
+# use a new output directory
+echo -e "" >> "$TESTLOG"
+echo "" >> "$TESTLOG"
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/bin/raptorlog.py
--- a/sbsv2/raptor/bin/raptorlog.py	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/bin/raptorlog.py	Mon Nov 16 09:46:46 2009 +0000
@@ -1,71 +1,71 @@
-#
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-
-	Raptor log parsing utilities.
-
-	Line-by-line based log reporting.
-"""
-
-import re
-
-
-class LogItem(object):
-	keep = False
-	def __init__(self, name, pattern, keep=False, subpattern=None):
-		self.name = name
-		self.matcher = re.compile(pattern, re.I)
-		self.count = 0
-
-		if subpattern:
-			self.subpattern = re.compile(subpattern,re.I)
-		else:
-			self.subpattern = None
-
-		if keep and LogItem.keep:
-			self.keep = {}
-		else:
-			self.keep = None
-
-		self.subpatterncount = 0
-
-	def xml(self):
-		xml = ""
-
-		xml += ">\n"
-
-		index = self.keep.keys()
-		index.sort(cmp=lambda y,x: self.keep[x] - self.keep[y])
-		for i in index:
-			xml += "\n"
-		
-		return xml + ""
-
-	def match(self, line):
-		result = self.matcher.search(line)
-		if result != None:
-			if self.keep != None:
-				try:
-					self.keep[result.group()] += 1
-				except:
-					self.keep[result.group()] = 1
-			if self.subpattern != None:
-				self.subpatterncount += len(self.subpattern.findall(line))
-				for i in self.subpattern.findall(line):
-					print i
-			self.count += 1
-
+#
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+
+	Raptor log parsing utilities.
+
+	Line-by-line based log reporting.
+"""
+
+import re
+
+
+class LogItem(object):
+	keep = False
+	def __init__(self, name, pattern, keep=False, subpattern=None):
+		self.name = name
+		self.matcher = re.compile(pattern, re.I)
+		self.count = 0
+
+		if subpattern:
+			self.subpattern = re.compile(subpattern,re.I)
+		else:
+			self.subpattern = None
+
+		if keep and LogItem.keep:
+			self.keep = {}
+		else:
+			self.keep = None
+
+		self.subpatterncount = 0
+
+	def xml(self):
+		xml = ""
+
+		xml += ">\n"
+
+		index = self.keep.keys()
+		index.sort(cmp=lambda y,x: self.keep[x] - self.keep[y])
+		for i in index:
+			xml += "\n"
+		
+		return xml + ""
+
+	def match(self, line):
+		result = self.matcher.search(line)
+		if result != None:
+			if self.keep != None:
+				try:
+					self.keep[result.group()] += 1
+				except:
+					self.keep[result.group()] = 1
+			if self.subpattern != None:
+				self.subpatterncount += len(self.subpattern.findall(line))
+				for i in self.subpattern.findall(line):
+					print i
+			self.count += 1
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/bin/readme.txt
--- a/sbsv2/raptor/bin/readme.txt	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/bin/readme.txt	Mon Nov 16 09:46:46 2009 +0000
@@ -1,32 +1,32 @@
-The distribution of the file is based on the follwing article ID:326922 Rev.5 from Microsoft Knowledge Base.
-
-http://support.microsoft.com/kb/326922
-
-
-Article ID: 326922 - Last Review: March 19, 2008 - Revision: 5.0
-Redistribution of the shared C runtime component in Visual C++
-
-
-SUMMARY
-
-When you build an application in Microsoft Visual Studio, and the application uses the C run-time libraries (CRT), distribute the appropriate CRT DLL from the following list with your application:
-
-    * Msvcr90.dll for Microsoft Visual C++ 2008
-    * Msvcr80.dll for Microsoft Visual C++ 2005
-    * Msvcr71.dll for Microsoft Visual C++ .NET 2003 with the Microsoft .NET Framework 1.1
-    * Msvcr70.dll for Microsoft Visual C++ .NET 2002 with the Microsoft .NET Framework 1.0
-
-For Msvcr70.dll or for Msvcr71.dll, you should install the CRT DLL into your application program files directory. You should not install these files into the Windows system directories. For Msvcr80.dll and for Msvcr90.dll, you should install the CRT as Windows side-by-side assemblies.
-
-MORE INFORMATION
-
-The shared CRT DLL has been distributed by Microsoft in the past as a shared system component. This may cause problems when you run applications that are linked to a different version of the CRT on computers that do not have the correct versions of the CRT DLL installed. This is commonly referred to as the "DLL Conflict" problem.
-
-To address this issue, the CRT DLL is no longer considered a system file, therefore, distribute the CRT DLL with any application that relies on it. Because it is no longer a system component, install it in your applications Program Files directory with other application-specific code. This prevents your application from using other versions of the CRT library that may be installed on the system paths.
-
-Visual C++ .NET 2003 or Visual C++ .NET 2002 installs the CRT DLL in the System32 directory on a development system. This is installed as a convenience for the developer. Otherwise, all projects that are built with Visual C++ that link with the shared CRT require a copy of the DLL in the build directory for debugging and execution. Visual C++ 2005 and Visual C++ 2008 install the CRT DLL as a Windows side-by-side assembly on Windows XP and later operating systems. Windows 2000 does not support side-by-side assemblies. On Windows 2000, the CRT DLL is installed in the System32 directory.
-
-When you distribute applications that require the Shared CRT library in the CRT DLL, we recommend that you use the CRT.msm merge module that is included with Visual C++ instead of directly distributing the DLL file.
-
-Windows side-by-side assemblies
-Msvcr80.dll with Visual C++ 2005 and Msvcr90.dll with Visual C++ 2008 are redistributed as Windows side-by-side assemblies except on Windows 2000. You should install these versions of the CRT on target computers by running the Vcredist_x86.exe application that is included with Visual Studio. There are installers for the x64 and IA-64 platforms also. Alternatively, you can use the CRT msm merge module that is supplied with Visual Studio to package the CRT installer into your own setup application. This will make the CRT available as a shared assembly to all applications because it is installed in the \windows\winsxs directory on supported operating systems. 
+The distribution of the file is based on the follwing article ID:326922 Rev.5 from Microsoft Knowledge Base.
+
+http://support.microsoft.com/kb/326922
+
+
+Article ID: 326922 - Last Review: March 19, 2008 - Revision: 5.0
+Redistribution of the shared C runtime component in Visual C++
+
+
+SUMMARY
+
+When you build an application in Microsoft Visual Studio, and the application uses the C run-time libraries (CRT), distribute the appropriate CRT DLL from the following list with your application:
+
+    * Msvcr90.dll for Microsoft Visual C++ 2008
+    * Msvcr80.dll for Microsoft Visual C++ 2005
+    * Msvcr71.dll for Microsoft Visual C++ .NET 2003 with the Microsoft .NET Framework 1.1
+    * Msvcr70.dll for Microsoft Visual C++ .NET 2002 with the Microsoft .NET Framework 1.0
+
+For Msvcr70.dll or for Msvcr71.dll, you should install the CRT DLL into your application program files directory. You should not install these files into the Windows system directories. For Msvcr80.dll and for Msvcr90.dll, you should install the CRT as Windows side-by-side assemblies.
+
+MORE INFORMATION
+
+The shared CRT DLL has been distributed by Microsoft in the past as a shared system component. This may cause problems when you run applications that are linked to a different version of the CRT on computers that do not have the correct versions of the CRT DLL installed. This is commonly referred to as the "DLL Conflict" problem.
+
+To address this issue, the CRT DLL is no longer considered a system file, therefore, distribute the CRT DLL with any application that relies on it. Because it is no longer a system component, install it in your applications Program Files directory with other application-specific code. This prevents your application from using other versions of the CRT library that may be installed on the system paths.
+
+Visual C++ .NET 2003 or Visual C++ .NET 2002 installs the CRT DLL in the System32 directory on a development system. This is installed as a convenience for the developer. Otherwise, all projects that are built with Visual C++ that link with the shared CRT require a copy of the DLL in the build directory for debugging and execution. Visual C++ 2005 and Visual C++ 2008 install the CRT DLL as a Windows side-by-side assembly on Windows XP and later operating systems. Windows 2000 does not support side-by-side assemblies. On Windows 2000, the CRT DLL is installed in the System32 directory.
+
+When you distribute applications that require the Shared CRT library in the CRT DLL, we recommend that you use the CRT.msm merge module that is included with Visual C++ instead of directly distributing the DLL file.
+
+Windows side-by-side assemblies
+Msvcr80.dll with Visual C++ 2005 and Msvcr90.dll with Visual C++ 2008 are redistributed as Windows side-by-side assemblies except on Windows 2000. You should install these versions of the CRT on target computers by running the Vcredist_x86.exe application that is included with Visual Studio. There are installers for the x64 and IA-64 platforms also. Alternatively, you can use the CRT msm merge module that is supplied with Visual Studio to package the CRT installer into your own setup application. This will make the CRT available as a shared assembly to all applications because it is installed in the \windows\winsxs directory on supported operating systems. 
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/bin/sbs.bat
--- a/sbsv2/raptor/bin/sbs.bat	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/bin/sbs.bat	Mon Nov 16 09:46:46 2009 +0000
@@ -1,60 +1,60 @@
-@rem
-@rem Copyright (c) 2005-2009 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"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description: 
-@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
-
-@REM Run Raptor with all the arguments.
-@%__PYTHON__% %SBS_HOME%\python\raptor_start.py %*
-
-@ENDLOCAL
-@cmd /c exit /b %ERRORLEVEL%
+@rem
+@rem Copyright (c) 2005-2009 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"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description: 
+@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
+
+@REM Run Raptor with all the arguments.
+@%__PYTHON__% %SBS_HOME%\python\raptor_start.py %*
+
+@ENDLOCAL
+@cmd /c exit /b %ERRORLEVEL%
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/bin/sbsv2cache.py
--- a/sbsv2/raptor/bin/sbsv2cache.py	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/bin/sbsv2cache.py	Mon Nov 16 09:46:46 2009 +0000
@@ -1,311 +1,311 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# Creates CBR tool compatible cache files from SBSv2 .whatlog variant output
-#
-
-
-import sys
-import os
-from optparse import OptionParser
-import xml.parsers.expat
-import re
-
-
-# Global dictionary of ComponentReleasable objects, keyed on bld.inf file
-BuildReleasables = {}
-
-# Provide a means to form  "traditional" ABLD-like build platforms and variants from SBSv2 configurations
-ConfigMatch = re.compile(r'^(?P\w+)_(?P\w+)(\.((?Psmp)|\w+))*')
-
-WinscwTreeMatch = re.compile(r'[\\|\/]epoc32[\\|\/]release[\\|\/]winscw[\\|\/](?P(urel|udeb))[\\|\/]', re.IGNORECASE)
-WinDriveMatch = re.compile(r'[A-Za-z]:')
-
-# $self->{abldcache}->{' export -what'} =
-# $self->{abldcache}->{'    -what'} =
-# $self->{abldcache}->{'plats'} =
-CacheGroupPrefix = "$self->{abldcache}->{\'"
-CacheGroupSuffix = "\'} =\n"
-CacheExportGroup = CacheGroupPrefix+"%s export -what"+CacheGroupSuffix
-CacheBuildOutputGroup = CacheGroupPrefix+"%s %s %s %s -what"+CacheGroupSuffix
-CachePlatsGroup = CacheGroupPrefix+"plats"+CacheGroupSuffix
-CacheListOpen = "\t[\n"
-CacheListItem = "\t\'%s\'"
-CacheListItemPair = "\t[\'%s\', \'%s\']"
-CacheListClose = "\t];\n\n"
-
-
-class ComponentReleasable(object):
-	"""Wraps up a bld.inf file in terms of its packagable releasable output."""
-	
-	# If EPOCROOT is set, provide a means to confirm that potentially publishable releasables live under EPOCROOT/epoc32
-	ReleaseTreeMatch = None
-	if os.environ.has_key("EPOCROOT"):
-		ReleaseTreeMatch = re.compile(r'\"*'+os.path.abspath(os.path.join(os.environ["EPOCROOT"],"epoc32")).replace('\\',r'\/').replace('\/',r'[\\|\/]+')+r'[\\|\/]+', re.IGNORECASE)
-		
-	def __init__(self, aBldInfFile, aVerbose=False):
-		self.__BldInfFile = aBldInfFile
-		self.__Verbose = aVerbose
-		self.__Exports = {}
-		self.__BuildOutput = {}
-		self.__Platforms = {}
-		
-	def __IsReleasableItem(self, aBuildItem):
-		if self.ReleaseTreeMatch and self.ReleaseTreeMatch.match(aBuildItem):
-			return True
-		
-		if self.__Verbose:
-			print "Discarding: \'%s\' from \'%s\' as not in the release tree." % (aBuildItem, self.__BldInfFile)
-		return False
-
-	def __StoreBuildItem(self, aPlatform, aVariant, aBuildItem):
-		if not self.__BuildOutput.has_key(aPlatform):
-			self.__BuildOutput[aPlatform] = {}
-			if aPlatform != "ALL":
-				self.__Platforms[aPlatform.upper()] = 1
-		if not self.__BuildOutput[aPlatform].has_key(aVariant):
-			self.__BuildOutput[aPlatform][aVariant] = {}
-		
-		if aBuildItem:
-			self.__BuildOutput[aPlatform][aVariant][aBuildItem] = 1
-		
-	def AddExport(self, aDestination, aSource):
-		if not self.__IsReleasableItem(aDestination):
-			return
-		self.__Exports[aDestination] = aSource
-
-	def AddBuildOutput(self, aBuildItem, aPlatform="ALL", aVariant="ALL"):
-		if not self.__IsReleasableItem(aBuildItem):
-			return
-		if aPlatform != "ALL" and aVariant == "ALL":
-			self.__StoreBuildItem(aPlatform, "urel", aBuildItem)
-			self.__StoreBuildItem(aPlatform, "udeb", aBuildItem)
-		else:
-			self.__StoreBuildItem(aPlatform, aVariant, aBuildItem)
-		
-	def Finalise(self):
-		# Re-visit the stored build items and, in the context of all build platforms having been processed for the
-		# component, copy platform-generic "ALL" output to the concrete build platform outputs
-		if self.__BuildOutput.has_key("ALL"):
-			allItems = self.__BuildOutput["ALL"]["ALL"].keys()		
-			for platform in self.__BuildOutput.keys():
-				for variant in self.__BuildOutput[platform].keys():
-					for allItem in allItems:
-						self.__StoreBuildItem(platform, variant, allItem)			
-			del self.__BuildOutput["ALL"]
-	
-	def GetBldInf(self):
-		return self.__BldInfFile
-
-	def GetExports(self):
-		return self.__Exports
-
-	def GetBuildOutput(self):
-		return self.__BuildOutput
-
-	def GetPlatforms(self):
-		return self.__Platforms
-
-	def HasReleasables(self):
-		return (self.__BuildOutput or self.__Exports)
-							
-
-def error(aMessage):
-	sys.stderr.write("ERROR: sbsv2cache.py : %s\n" % aMessage)
-	sys.exit(1)
-	
-def processReleasableElement(aContext, aName, aValue, aVerbose):
-	bldinf = aContext["bldinf"]
-	mmp = aContext["mmp"]
-	config = aContext["config"]
-
-	platform = ""
-	variant = ""
-	configMatchResults = ConfigMatch.match(config)
-	if configMatchResults:
-		platform = configMatchResults.group('PLATFORM')
-		variant = configMatchResults.group('VARIANT')	
-		if configMatchResults.group('PLATFORMADD'):
-			platform += configMatchResults.group('PLATFORMADD')
-	
-	if not BuildReleasables.has_key(bldinf):
-		BuildReleasables[bldinf] = ComponentReleasable(bldinf, aVerbose)
-	
-	componentReleasable = BuildReleasables[bldinf]
-	
-	if aName == "export" :
-		componentReleasable.AddExport(aValue["destination"], aValue["source"])
-	elif aName == "member":
-		componentReleasable.AddExport(aValue.keys()[0], aContext["zipfile"])
-	elif aName == "build":
-		componentReleasable.AddBuildOutput(aValue.keys()[0], platform, variant)
-	elif aName == "resource" or aName == "bitmap":
-		item = aValue.keys()[0]
-		# Identify winscw urel/udeb specific resources, and store accordingly
-		winscwTreeMatchResult = WinscwTreeMatch.search(item)
-		if platform == "winscw" and winscwTreeMatchResult:
-			componentReleasable.AddBuildOutput(item, platform, winscwTreeMatchResult.group("VARIANT").lower())
-		else:
-			componentReleasable.AddBuildOutput(item, platform)
-	elif aName == "stringtable":
-		componentReleasable.AddBuildOutput(aValue.keys()[0])			
-
-def parseLog(aLog, aVerbose):
-	if not os.path.exists(aLog):
-		error("Log file %s does not exist." % aLog)
-		
-	parser = xml.parsers.expat.ParserCreate()
-	parser.buffer_text = True
-	
-	elementContext = {}
-	currentElement = []
-		
-	def start_element(name, attributes):
-		if name == "whatlog" or name == "archive":
-			elementContext.update(attributes)
-		elif elementContext.has_key("bldinf"):
-			if name == "export":
-				# Exports are all attributes, so deal with them directly
-				processReleasableElement(elementContext, name, attributes, aVerbose)
-			else:
-				# Other elements wrap values, get these later
-				currentElement.append(name)
-						
-	def end_element(name):
-		if name == "whatlog":
-			elementContext.clear()
-		elif name == "archive":
-			del elementContext["zipfile"]
-	
-	def char_data(data):
-		if elementContext.has_key("bldinf") and currentElement:
-			processReleasableElement(elementContext, currentElement.pop(), {str(data):1}, aVerbose)
-	
-	parser.StartElementHandler = start_element
-	parser.EndElementHandler = end_element
-	parser.CharacterDataHandler = char_data
-
-	try:
-		if aVerbose:
-			print "Parsing: " + aLog
-			
-		parser.ParseFile(open(aLog, "r"))
-	except xml.parsers.expat.ExpatError, e:	
-		error("Failure parsing log file \'%s\' (line %s)" % (aLog, e.lineno))
-
-def normFileForCache(aFile):
-	normedFile = WinDriveMatch.sub("",aFile)
-	normedFile = normedFile.replace("/", "\\")
-	normedFile = normedFile.replace("\\", "\\\\")
-	normedFile = normedFile.replace("\\\\\\\\", "\\\\")
-	normedFile = normedFile.replace("\"", "")
-	return normedFile
-	
-def dumpCacheFileList(aCacheFileObject, aItems, aPairs=False):	
-	numItems = len(aItems)
-	suffix = ",\n"
-	
-	aCacheFileObject.write(CacheListOpen)
-	for item in aItems:
-		if aItems.index(item) == numItems-1:
-			suffix = "\n"			
-		if aPairs:
-			aCacheFileObject.write((CacheListItemPair % (normFileForCache(item[0]), normFileForCache(item[1]))) + suffix)
-		else:
-			aCacheFileObject.write((CacheListItem % normFileForCache(item)) + suffix)
-	aCacheFileObject.write(CacheListClose)
-	
-def createCacheFile(aComponentReleasable, aOutputPath, aSourceExports, aVerbose):	
-	if not aComponentReleasable.HasReleasables():
-		return
-	
-	cacheFileDir = os.path.normpath(\
-				os.path.join(aOutputPath, \
-	            WinDriveMatch.sub("",os.path.dirname(aComponentReleasable.GetBldInf())).lstrip(r'/').lstrip(r'\\')))
-	cacheFile = os.path.join(cacheFileDir, "cache")
-	
-	bldInfLoc = WinDriveMatch.sub("",os.path.dirname(aComponentReleasable.GetBldInf())).replace("/", "\\")
-
-	if aVerbose:
-		print "Creating: " + cacheFile
-	
-	if not os.path.exists(cacheFileDir):
-		os.makedirs(cacheFileDir)
-	
-	try:
-		cacheFileObject = open(cacheFile, 'w')
-	
-		exports = aComponentReleasable.GetExports()
-		if exports:
-			cacheFileObject.write(CacheExportGroup % bldInfLoc)
-			if aSourceExports:
-				dumpCacheFileList(cacheFileObject, exports.items(), True)
-			else:
-				dumpCacheFileList(cacheFileObject, exports.keys())
-	
-		buildOutput = aComponentReleasable.GetBuildOutput()		
-		if buildOutput:
-			for plat in buildOutput.keys():
-				# Most cache output is represented as if performed for the "abld target" phase, but tools platforms
-				# are presented as if performed by "abld build", and so must additionally replicate any exports
-				# performed for the component in their variant output
-				phase = "target"
-				additionalOutput = []
-				if plat == "tools" or plat == "tools2":
-					phase = "build"
-					if exports:
-						additionalOutput = exports.keys()
-				
-				for variant in buildOutput[plat].keys():
-					cacheFileObject.write(CacheBuildOutputGroup % (bldInfLoc, phase, plat, variant))
-					dumpCacheFileList(cacheFileObject, buildOutput[plat][variant].keys() + additionalOutput)
-	
-		cacheFileObject.write(CachePlatsGroup)
-		dumpCacheFileList(cacheFileObject, aComponentReleasable.GetPlatforms().keys())
-		
-		cacheFileObject.close()
-	except IOError:
-		error("Failure creating cache file %s." % cacheFile)
-
-
-def main():
-	parser = OptionParser(prog="sbsv2cache.py")
-	parser.add_option("-l", "--log", action="append", dest="logs", help="log file to parse for  wrapped content.")
-	parser.add_option("-o", "--outputpath", action="store", dest="outputpath", help="root location to generate cache files.")
-	parser.add_option("-s", "--sourceexports", action="store_true", default=False, dest="sourceexports", help="generate cache files where each element in the export array is a ['destination', 'source'] array rather than just a 'destination' element.")
-	parser.add_option("-v", "--verbose", action="store_true", default=False, dest="verbose", help="provide more information as things happen.")
-	
-	(options, leftover_args) = parser.parse_args(sys.argv[1:])
-
-	if leftover_args or not options.logs or not options.outputpath:
-		parser.print_help()
-		sys.exit(1)
-		
-	print "sbsv2cache: started"
-	
-	# Parse build logs to populate the BuildReleasables dictionary
-	for log in options.logs:
-		parseLog(os.path.abspath(log), options.verbose)
-	
-	# Finalise components in BuildReleasables and create cache files as we go
-	for component in BuildReleasables.keys():
-		BuildReleasables[component].Finalise()
-		createCacheFile(BuildReleasables[component], os.path.abspath(options.outputpath), options.sourceexports, options.verbose)
-		
-	print "sbsv2cache: finished"
-	
-if __name__ == "__main__":
-	main()
-	
-
+#
+# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# Creates CBR tool compatible cache files from SBSv2 .whatlog variant output
+#
+
+
+import sys
+import os
+from optparse import OptionParser
+import xml.parsers.expat
+import re
+
+
+# Global dictionary of ComponentReleasable objects, keyed on bld.inf file
+BuildReleasables = {}
+
+# Provide a means to form  "traditional" ABLD-like build platforms and variants from SBSv2 configurations
+ConfigMatch = re.compile(r'^(?P\w+)_(?P\w+)(\.((?Psmp)|\w+))*')
+
+WinscwTreeMatch = re.compile(r'[\\|\/]epoc32[\\|\/]release[\\|\/]winscw[\\|\/](?P(urel|udeb))[\\|\/]', re.IGNORECASE)
+WinDriveMatch = re.compile(r'[A-Za-z]:')
+
+# $self->{abldcache}->{' export -what'} =
+# $self->{abldcache}->{'    -what'} =
+# $self->{abldcache}->{'plats'} =
+CacheGroupPrefix = "$self->{abldcache}->{\'"
+CacheGroupSuffix = "\'} =\n"
+CacheExportGroup = CacheGroupPrefix+"%s export -what"+CacheGroupSuffix
+CacheBuildOutputGroup = CacheGroupPrefix+"%s %s %s %s -what"+CacheGroupSuffix
+CachePlatsGroup = CacheGroupPrefix+"plats"+CacheGroupSuffix
+CacheListOpen = "\t[\n"
+CacheListItem = "\t\'%s\'"
+CacheListItemPair = "\t[\'%s\', \'%s\']"
+CacheListClose = "\t];\n\n"
+
+
+class ComponentReleasable(object):
+	"""Wraps up a bld.inf file in terms of its packagable releasable output."""
+	
+	# If EPOCROOT is set, provide a means to confirm that potentially publishable releasables live under EPOCROOT/epoc32
+	ReleaseTreeMatch = None
+	if os.environ.has_key("EPOCROOT"):
+		ReleaseTreeMatch = re.compile(r'\"*'+os.path.abspath(os.path.join(os.environ["EPOCROOT"],"epoc32")).replace('\\',r'\/').replace('\/',r'[\\|\/]+')+r'[\\|\/]+', re.IGNORECASE)
+		
+	def __init__(self, aBldInfFile, aVerbose=False):
+		self.__BldInfFile = aBldInfFile
+		self.__Verbose = aVerbose
+		self.__Exports = {}
+		self.__BuildOutput = {}
+		self.__Platforms = {}
+		
+	def __IsReleasableItem(self, aBuildItem):
+		if self.ReleaseTreeMatch and self.ReleaseTreeMatch.match(aBuildItem):
+			return True
+		
+		if self.__Verbose:
+			print "Discarding: \'%s\' from \'%s\' as not in the release tree." % (aBuildItem, self.__BldInfFile)
+		return False
+
+	def __StoreBuildItem(self, aPlatform, aVariant, aBuildItem):
+		if not self.__BuildOutput.has_key(aPlatform):
+			self.__BuildOutput[aPlatform] = {}
+			if aPlatform != "ALL":
+				self.__Platforms[aPlatform.upper()] = 1
+		if not self.__BuildOutput[aPlatform].has_key(aVariant):
+			self.__BuildOutput[aPlatform][aVariant] = {}
+		
+		if aBuildItem:
+			self.__BuildOutput[aPlatform][aVariant][aBuildItem] = 1
+		
+	def AddExport(self, aDestination, aSource):
+		if not self.__IsReleasableItem(aDestination):
+			return
+		self.__Exports[aDestination] = aSource
+
+	def AddBuildOutput(self, aBuildItem, aPlatform="ALL", aVariant="ALL"):
+		if not self.__IsReleasableItem(aBuildItem):
+			return
+		if aPlatform != "ALL" and aVariant == "ALL":
+			self.__StoreBuildItem(aPlatform, "urel", aBuildItem)
+			self.__StoreBuildItem(aPlatform, "udeb", aBuildItem)
+		else:
+			self.__StoreBuildItem(aPlatform, aVariant, aBuildItem)
+		
+	def Finalise(self):
+		# Re-visit the stored build items and, in the context of all build platforms having been processed for the
+		# component, copy platform-generic "ALL" output to the concrete build platform outputs
+		if self.__BuildOutput.has_key("ALL"):
+			allItems = self.__BuildOutput["ALL"]["ALL"].keys()		
+			for platform in self.__BuildOutput.keys():
+				for variant in self.__BuildOutput[platform].keys():
+					for allItem in allItems:
+						self.__StoreBuildItem(platform, variant, allItem)			
+			del self.__BuildOutput["ALL"]
+	
+	def GetBldInf(self):
+		return self.__BldInfFile
+
+	def GetExports(self):
+		return self.__Exports
+
+	def GetBuildOutput(self):
+		return self.__BuildOutput
+
+	def GetPlatforms(self):
+		return self.__Platforms
+
+	def HasReleasables(self):
+		return (self.__BuildOutput or self.__Exports)
+							
+
+def error(aMessage):
+	sys.stderr.write("ERROR: sbsv2cache.py : %s\n" % aMessage)
+	sys.exit(1)
+	
+def processReleasableElement(aContext, aName, aValue, aVerbose):
+	bldinf = aContext["bldinf"]
+	mmp = aContext["mmp"]
+	config = aContext["config"]
+
+	platform = ""
+	variant = ""
+	configMatchResults = ConfigMatch.match(config)
+	if configMatchResults:
+		platform = configMatchResults.group('PLATFORM')
+		variant = configMatchResults.group('VARIANT')	
+		if configMatchResults.group('PLATFORMADD'):
+			platform += configMatchResults.group('PLATFORMADD')
+	
+	if not BuildReleasables.has_key(bldinf):
+		BuildReleasables[bldinf] = ComponentReleasable(bldinf, aVerbose)
+	
+	componentReleasable = BuildReleasables[bldinf]
+	
+	if aName == "export" :
+		componentReleasable.AddExport(aValue["destination"], aValue["source"])
+	elif aName == "member":
+		componentReleasable.AddExport(aValue.keys()[0], aContext["zipfile"])
+	elif aName == "build":
+		componentReleasable.AddBuildOutput(aValue.keys()[0], platform, variant)
+	elif aName == "resource" or aName == "bitmap":
+		item = aValue.keys()[0]
+		# Identify winscw urel/udeb specific resources, and store accordingly
+		winscwTreeMatchResult = WinscwTreeMatch.search(item)
+		if platform == "winscw" and winscwTreeMatchResult:
+			componentReleasable.AddBuildOutput(item, platform, winscwTreeMatchResult.group("VARIANT").lower())
+		else:
+			componentReleasable.AddBuildOutput(item, platform)
+	elif aName == "stringtable":
+		componentReleasable.AddBuildOutput(aValue.keys()[0])			
+
+def parseLog(aLog, aVerbose):
+	if not os.path.exists(aLog):
+		error("Log file %s does not exist." % aLog)
+		
+	parser = xml.parsers.expat.ParserCreate()
+	parser.buffer_text = True
+	
+	elementContext = {}
+	currentElement = []
+		
+	def start_element(name, attributes):
+		if name == "whatlog" or name == "archive":
+			elementContext.update(attributes)
+		elif elementContext.has_key("bldinf"):
+			if name == "export":
+				# Exports are all attributes, so deal with them directly
+				processReleasableElement(elementContext, name, attributes, aVerbose)
+			else:
+				# Other elements wrap values, get these later
+				currentElement.append(name)
+						
+	def end_element(name):
+		if name == "whatlog":
+			elementContext.clear()
+		elif name == "archive":
+			del elementContext["zipfile"]
+	
+	def char_data(data):
+		if elementContext.has_key("bldinf") and currentElement:
+			processReleasableElement(elementContext, currentElement.pop(), {str(data):1}, aVerbose)
+	
+	parser.StartElementHandler = start_element
+	parser.EndElementHandler = end_element
+	parser.CharacterDataHandler = char_data
+
+	try:
+		if aVerbose:
+			print "Parsing: " + aLog
+			
+		parser.ParseFile(open(aLog, "r"))
+	except xml.parsers.expat.ExpatError, e:	
+		error("Failure parsing log file \'%s\' (line %s)" % (aLog, e.lineno))
+
+def normFileForCache(aFile):
+	normedFile = WinDriveMatch.sub("",aFile)
+	normedFile = normedFile.replace("/", "\\")
+	normedFile = normedFile.replace("\\", "\\\\")
+	normedFile = normedFile.replace("\\\\\\\\", "\\\\")
+	normedFile = normedFile.replace("\"", "")
+	return normedFile
+	
+def dumpCacheFileList(aCacheFileObject, aItems, aPairs=False):	
+	numItems = len(aItems)
+	suffix = ",\n"
+	
+	aCacheFileObject.write(CacheListOpen)
+	for item in aItems:
+		if aItems.index(item) == numItems-1:
+			suffix = "\n"			
+		if aPairs:
+			aCacheFileObject.write((CacheListItemPair % (normFileForCache(item[0]), normFileForCache(item[1]))) + suffix)
+		else:
+			aCacheFileObject.write((CacheListItem % normFileForCache(item)) + suffix)
+	aCacheFileObject.write(CacheListClose)
+	
+def createCacheFile(aComponentReleasable, aOutputPath, aSourceExports, aVerbose):	
+	if not aComponentReleasable.HasReleasables():
+		return
+	
+	cacheFileDir = os.path.normpath(\
+				os.path.join(aOutputPath, \
+	            WinDriveMatch.sub("",os.path.dirname(aComponentReleasable.GetBldInf())).lstrip(r'/').lstrip(r'\\')))
+	cacheFile = os.path.join(cacheFileDir, "cache")
+	
+	bldInfLoc = WinDriveMatch.sub("",os.path.dirname(aComponentReleasable.GetBldInf())).replace("/", "\\")
+
+	if aVerbose:
+		print "Creating: " + cacheFile
+	
+	if not os.path.exists(cacheFileDir):
+		os.makedirs(cacheFileDir)
+	
+	try:
+		cacheFileObject = open(cacheFile, 'w')
+	
+		exports = aComponentReleasable.GetExports()
+		if exports:
+			cacheFileObject.write(CacheExportGroup % bldInfLoc)
+			if aSourceExports:
+				dumpCacheFileList(cacheFileObject, exports.items(), True)
+			else:
+				dumpCacheFileList(cacheFileObject, exports.keys())
+	
+		buildOutput = aComponentReleasable.GetBuildOutput()		
+		if buildOutput:
+			for plat in buildOutput.keys():
+				# Most cache output is represented as if performed for the "abld target" phase, but tools platforms
+				# are presented as if performed by "abld build", and so must additionally replicate any exports
+				# performed for the component in their variant output
+				phase = "target"
+				additionalOutput = []
+				if plat == "tools" or plat == "tools2":
+					phase = "build"
+					if exports:
+						additionalOutput = exports.keys()
+				
+				for variant in buildOutput[plat].keys():
+					cacheFileObject.write(CacheBuildOutputGroup % (bldInfLoc, phase, plat, variant))
+					dumpCacheFileList(cacheFileObject, buildOutput[plat][variant].keys() + additionalOutput)
+	
+		cacheFileObject.write(CachePlatsGroup)
+		dumpCacheFileList(cacheFileObject, aComponentReleasable.GetPlatforms().keys())
+		
+		cacheFileObject.close()
+	except IOError:
+		error("Failure creating cache file %s." % cacheFile)
+
+
+def main():
+	parser = OptionParser(prog="sbsv2cache.py")
+	parser.add_option("-l", "--log", action="append", dest="logs", help="log file to parse for  wrapped content.")
+	parser.add_option("-o", "--outputpath", action="store", dest="outputpath", help="root location to generate cache files.")
+	parser.add_option("-s", "--sourceexports", action="store_true", default=False, dest="sourceexports", help="generate cache files where each element in the export array is a ['destination', 'source'] array rather than just a 'destination' element.")
+	parser.add_option("-v", "--verbose", action="store_true", default=False, dest="verbose", help="provide more information as things happen.")
+	
+	(options, leftover_args) = parser.parse_args(sys.argv[1:])
+
+	if leftover_args or not options.logs or not options.outputpath:
+		parser.print_help()
+		sys.exit(1)
+		
+	print "sbsv2cache: started"
+	
+	# Parse build logs to populate the BuildReleasables dictionary
+	for log in options.logs:
+		parseLog(os.path.abspath(log), options.verbose)
+	
+	# Finalise components in BuildReleasables and create cache files as we go
+	for component in BuildReleasables.keys():
+		BuildReleasables[component].Finalise()
+		createCacheFile(BuildReleasables[component], os.path.abspath(options.outputpath), options.sourceexports, options.verbose)
+		
+	print "sbsv2cache: finished"
+	
+if __name__ == "__main__":
+	main()
+	
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/bin/setup_user.sh
--- a/sbsv2/raptor/bin/setup_user.sh	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/bin/setup_user.sh	Mon Nov 16 09:46:46 2009 +0000
@@ -1,41 +1,41 @@
-#!/bin/bash
-
-# Add environment settings to user's 
-# .bashrc
-# .bash_profile
-
-# Add a .pvmrc
-
-. `dirname $0`/user.bash_profile
-
-
-echo "Configuring user account $USER for sbsv2 in: $SBS_HOME"
-
-if [ ! -d "$SBS_HOME" ]; then
-	echo "SBS_HOME appears to not be set correctly: $SBS_HOME" 1>&2
-	exit 1
-fi
-
-patchfile()
-{
-echo "Adding '$2' to $1"
-grep -q '# SBS_SETTINGS' "$1"
-if [ $? -eq 0 ]; then 
-	sed "s%.* # SBS_SETTINGS (do not edit this line).*%$2 # SBS_SETTINGS (do not edit this line)%"  "$1" > "$1.sbsv2" &&
-	mv "$1" "$1.orig" &&
-	mv "$1.sbsv2" "$1"
-else
-	cp "$1" "$1.orig" &&
-	echo "$2 # SBS_SETTINGS (do not edit this line)" >> "$1"
-fi
-}
-
-# Patch the bash profile
-patchfile ~/.bash_profile ". $SBS_HOME/bin/user.bash_profile"
-patchfile ~/.bashrc ". $SBS_HOME/bin/user.bashrc"
-
-if [ -f ~/.pvmrc ]; then
-       cp ~/.pvmrc ~/.pvmrc.orig
-fi
-
-cp $SBS_HOME/util/install-linux/linux_pvmrc ~/.pvmrc
+#!/bin/bash
+
+# Add environment settings to user's 
+# .bashrc
+# .bash_profile
+
+# Add a .pvmrc
+
+. `dirname $0`/user.bash_profile
+
+
+echo "Configuring user account $USER for sbsv2 in: $SBS_HOME"
+
+if [ ! -d "$SBS_HOME" ]; then
+	echo "SBS_HOME appears to not be set correctly: $SBS_HOME" 1>&2
+	exit 1
+fi
+
+patchfile()
+{
+echo "Adding '$2' to $1"
+grep -q '# SBS_SETTINGS' "$1"
+if [ $? -eq 0 ]; then 
+	sed "s%.* # SBS_SETTINGS (do not edit this line).*%$2 # SBS_SETTINGS (do not edit this line)%"  "$1" > "$1.sbsv2" &&
+	mv "$1" "$1.orig" &&
+	mv "$1.sbsv2" "$1"
+else
+	cp "$1" "$1.orig" &&
+	echo "$2 # SBS_SETTINGS (do not edit this line)" >> "$1"
+fi
+}
+
+# Patch the bash profile
+patchfile ~/.bash_profile ". $SBS_HOME/bin/user.bash_profile"
+patchfile ~/.bashrc ". $SBS_HOME/bin/user.bashrc"
+
+if [ -f ~/.pvmrc ]; then
+       cp ~/.pvmrc ~/.pvmrc.orig
+fi
+
+cp $SBS_HOME/util/install-linux/linux_pvmrc ~/.pvmrc
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/bin/speedtest_osbuild.sh
--- a/sbsv2/raptor/bin/speedtest_osbuild.sh	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/bin/speedtest_osbuild.sh	Mon Nov 16 09:46:46 2009 +0000
@@ -1,166 +1,166 @@
-#!/bin/sh
-
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# Build automation for Symbian OS with Raptor
-# Author: Timothy N Murphy
-# 
-#
-
-# You can edit these:
-H=/home/tmurphy
-export H
-export EPOCROOT="$H/baselineos"
-export LOGBASEDIR=~/public_html/buildlogs
-export BUILDROOT="$H/baselineos"
-export SOURCEROOT="$H/baselineos/fsupdate"
-export SYSDEF="$H/baselineos/system_definition_fsupdate.xml"
-export PREEXPORTSYSDEF="$SBS_HOME/test/envelope/preexport.xml"
-#export PARALLEL=0
-
-genstats() { 
-if [ "$1.stats"  -ot "$1.log" ]; then
-python "$SBS_HOME/bin/buildstats.py"  "$1.log" >  "$1.stats" && 
-#python "$SBS_HOME/bin/failedstats.py" -m  "$1.log" >  "$1.failed"; 
-(
-	cd $EPOCROOT/epoc32 && find "release" > "$1.release_files" && find "build" > "$1.build_files" && find include > "$1.include_files"
-)
-fi;
-}
-
-cd $BUILDROOT
-
-
-# Don't edit the rest:
-###################################################
-export KEY=`date +%d_%m_%y`
-export DAILYDIR="$LOGBASEDIR/$KEY"
-export BUILDNAME="`basename \"$SYSDEF\" | sed 's#\.[^.][^.]*$##'`"
-export LOGNAME="${BUILDNAME}_${KEY}"
-export PLATFORM=armv5
-export TESTLOG="$DAILYDIR/parallel_speedtest.log"
-
-for BUILDNUM in {1..50}; do
-	if [ ! -d "$DAILYDIR/$BUILDNUM" ]; then
-		break
-	fi
-	if [ ! -f "$DAILYDIR/$BUILDNUM/${LOGNAME}_$BUILDNUM.log" ]; then
-		break
-	fi
-done
-
-# make the day's directory
-mkdir -p "$DAILYDIR"
-
-echo "testrun: $TESTLOG, build $BUILDNUM of the day:"
-echo '' > "$TESTLOG"
-
-
-# Loop through different cluster loads
-#for PARALLEL in 52 48 44 40 36 32 28 24 20 16 8 4; do
-for PARALLEL in 44 40 36 32 28 24 20 16 8 4; do
-export PARALLEL  i
-echo "Parallel: $PARALLEL"
-(
-echo ""
-echo "	"
-echo "	$DAILYDIR/$BUILDNUM/${LOGNAME}_$BUILDNUM.log"
-MAKEFILE=$TESTBASE/test$CODEFACTOR.mk
-echo ""
-
-OUTDIR="$DAILYDIR/$BUILDNUM"
-TIMELOG="$OUTDIR/${LOGNAME}_$BUILDNUM.time"
-
-echo "	 "$OUTDIR/unzip" &&
-chmod -R u+rw "$EPOCROOT/epoc32" &&
-echo "unzipped skeleton epoc32 tree" 
-) && (
-echo "Pre-export"
-$SBS_HOME/bin/sbs  -d -k -s "$PREEXPORTSYSDEF" -a "$SOURCEROOT" -c $PLATFORM EXPORT > $OUTDIR/${LOGNAME}_$BUILDNUM.preexport 2>&1 || {
-	echo "Pre-export failed";
-	exit 1
-}
-)
-
-echo "Prepping makefiles"
-(
-	echo "\n"
-	export TIMEFORMAT=$'\n'
-	time cp performance_Makefile $EPOCROOT/epoc32/build/Makefile
-)  > "$TIMELOG" 2>&1
-
-echo "Running Make"
-(
-	# The build process
-	 export TIMEFORMAT=$'\n'
-
-	time /usr/local/raptor/make-pvm-381/pvmgmake -j$PARALLEL --debug=j -k -f $MAKEFILE  > "$OUTDIR/${LOGNAME}_$BUILDNUM.log" 2>&1 
-	touch "$SIGNALTOSTOPFILE"
-	echo "\n"
-) >> "$TIMELOG" 2>&1 & 
-(
-	set +x
-	# Concurrent process to continuously update statistics
-	echo ""
-
-	while [ 1 -eq 1 ]; do
-		sleep 20 
-		echo -n "."
-
-		if [ -e "$SIGNALTOSTOPFILE" ]; then
-			rm -f "$SIGNALTOSTOPFILE"
-			break
-		fi
-	done
-	echo ""
-)
-set +x
-genstats "$OUTDIR/${LOGNAME}_$BUILDNUM"
-
-echo "	]]>"
-echo ""
-) >> "$TESTLOG" 2>&1
-
-BUILDNUM=$[ $BUILDNUM + 1 ]
-# use a new output directory
-done # PARALLEL
-echo -e "" >> "$TESTLOG"
-echo "" >> "$TESTLOG"
+#!/bin/sh
+
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Build automation for Symbian OS with Raptor
+# Author: Timothy N Murphy
+# 
+#
+
+# You can edit these:
+H=/home/tmurphy
+export H
+export EPOCROOT="$H/baselineos"
+export LOGBASEDIR=~/public_html/buildlogs
+export BUILDROOT="$H/baselineos"
+export SOURCEROOT="$H/baselineos/fsupdate"
+export SYSDEF="$H/baselineos/system_definition_fsupdate.xml"
+export PREEXPORTSYSDEF="$SBS_HOME/test/envelope/preexport.xml"
+#export PARALLEL=0
+
+genstats() { 
+if [ "$1.stats"  -ot "$1.log" ]; then
+python "$SBS_HOME/bin/buildstats.py"  "$1.log" >  "$1.stats" && 
+#python "$SBS_HOME/bin/failedstats.py" -m  "$1.log" >  "$1.failed"; 
+(
+	cd $EPOCROOT/epoc32 && find "release" > "$1.release_files" && find "build" > "$1.build_files" && find include > "$1.include_files"
+)
+fi;
+}
+
+cd $BUILDROOT
+
+
+# Don't edit the rest:
+###################################################
+export KEY=`date +%d_%m_%y`
+export DAILYDIR="$LOGBASEDIR/$KEY"
+export BUILDNAME="`basename \"$SYSDEF\" | sed 's#\.[^.][^.]*$##'`"
+export LOGNAME="${BUILDNAME}_${KEY}"
+export PLATFORM=armv5
+export TESTLOG="$DAILYDIR/parallel_speedtest.log"
+
+for BUILDNUM in {1..50}; do
+	if [ ! -d "$DAILYDIR/$BUILDNUM" ]; then
+		break
+	fi
+	if [ ! -f "$DAILYDIR/$BUILDNUM/${LOGNAME}_$BUILDNUM.log" ]; then
+		break
+	fi
+done
+
+# make the day's directory
+mkdir -p "$DAILYDIR"
+
+echo "testrun: $TESTLOG, build $BUILDNUM of the day:"
+echo '' > "$TESTLOG"
+
+
+# Loop through different cluster loads
+#for PARALLEL in 52 48 44 40 36 32 28 24 20 16 8 4; do
+for PARALLEL in 44 40 36 32 28 24 20 16 8 4; do
+export PARALLEL  i
+echo "Parallel: $PARALLEL"
+(
+echo ""
+echo "	"
+echo "	$DAILYDIR/$BUILDNUM/${LOGNAME}_$BUILDNUM.log"
+MAKEFILE=$TESTBASE/test$CODEFACTOR.mk
+echo ""
+
+OUTDIR="$DAILYDIR/$BUILDNUM"
+TIMELOG="$OUTDIR/${LOGNAME}_$BUILDNUM.time"
+
+echo "	 "$OUTDIR/unzip" &&
+chmod -R u+rw "$EPOCROOT/epoc32" &&
+echo "unzipped skeleton epoc32 tree" 
+) && (
+echo "Pre-export"
+$SBS_HOME/bin/sbs  -d -k -s "$PREEXPORTSYSDEF" -a "$SOURCEROOT" -c $PLATFORM EXPORT > $OUTDIR/${LOGNAME}_$BUILDNUM.preexport 2>&1 || {
+	echo "Pre-export failed";
+	exit 1
+}
+)
+
+echo "Prepping makefiles"
+(
+	echo "\n"
+	export TIMEFORMAT=$'\n'
+	time cp performance_Makefile $EPOCROOT/epoc32/build/Makefile
+)  > "$TIMELOG" 2>&1
+
+echo "Running Make"
+(
+	# The build process
+	 export TIMEFORMAT=$'\n'
+
+	time /usr/local/raptor/make-pvm-381/pvmgmake -j$PARALLEL --debug=j -k -f $MAKEFILE  > "$OUTDIR/${LOGNAME}_$BUILDNUM.log" 2>&1 
+	touch "$SIGNALTOSTOPFILE"
+	echo "\n"
+) >> "$TIMELOG" 2>&1 & 
+(
+	set +x
+	# Concurrent process to continuously update statistics
+	echo ""
+
+	while [ 1 -eq 1 ]; do
+		sleep 20 
+		echo -n "."
+
+		if [ -e "$SIGNALTOSTOPFILE" ]; then
+			rm -f "$SIGNALTOSTOPFILE"
+			break
+		fi
+	done
+	echo ""
+)
+set +x
+genstats "$OUTDIR/${LOGNAME}_$BUILDNUM"
+
+echo "	]]>"
+echo ""
+) >> "$TESTLOG" 2>&1
+
+BUILDNUM=$[ $BUILDNUM + 1 ]
+# use a new output directory
+done # PARALLEL
+echo -e "" >> "$TESTLOG"
+echo "" >> "$TESTLOG"
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/bin/squashlog.py
--- a/sbsv2/raptor/bin/squashlog.py	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/bin/squashlog.py	Mon Nov 16 09:46:46 2009 +0000
@@ -1,62 +1,62 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# squash a raptor log file by removing commands from successful recipes
-#
-
-import sys
-
-inRecipe = False
-
-for line in sys.stdin.readlines():
-	# escape % characters otherwise print will fail
-	line = line.replace("%", "%%")
-		
-	# detect the start of a recipe
-	if line.startswith(""):
-		# print the recipe
-		if squashRecipe:
-			for text in recipeLines:
-				if not text.startswith("+"):
-					print text,
-		else:
-			for text in recipeLines:
-				print text,
-		print line,
-		continue
-		
-	# remember the lines during a recipe
-	if inRecipe:
-		recipeLines.append(line)	
-	else:
-	# print all lines outside a recipe 
-		print line,
-	
-# end
-
+#
+# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# squash a raptor log file by removing commands from successful recipes
+#
+
+import sys
+
+inRecipe = False
+
+for line in sys.stdin.readlines():
+	# escape % characters otherwise print will fail
+	line = line.replace("%", "%%")
+		
+	# detect the start of a recipe
+	if line.startswith(""):
+		# print the recipe
+		if squashRecipe:
+			for text in recipeLines:
+				if not text.startswith("+"):
+					print text,
+		else:
+			for text in recipeLines:
+				print text,
+		print line,
+		continue
+		
+	# remember the lines during a recipe
+	if inRecipe:
+		recipeLines.append(line)	
+	else:
+	# print all lines outside a recipe 
+		print line,
+	
+# end
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/bin/statcollate.py
--- a/sbsv2/raptor/bin/statcollate.py	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/bin/statcollate.py	Mon Nov 16 09:46:46 2009 +0000
@@ -1,112 +1,112 @@
-#
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# statcollate
-#
-
-"""
-	Produce output for a graphing program or spreadsheet from
-	the statistic logs produced by buildstats.py from Raptor logs.
-	e.g. by analysing several logs we can see how
-	"number of successful compiles" improves over time.
-"""
-
-import sys
-from optparse import OptionParser
-import os
-import xml.dom.minidom
-from stat import *
-
-namespace = "http://symbian.com/2007/xml/build/raptor/stats"
-
-class StatsFail(Exception):
-	pass
-
-def pullStats(statnames, file):
-	"""Load a Statistics document and pull stats for a graph"""
-
-	# try to read and parse the XML file
-	try:
-	    dom = xml.dom.minidom.parse(file)
-
-	except Exception,e: # a whole bag of exceptions can be raised here
-		print "pullStats: %s" % str(e)
-		raise StatsFail
-
-	#  is always the root element
-	stats = dom.documentElement
-	objects = []
-	build = stats.childNodes[1]
-	
-	# create a Data Model object from each sub-element
-	output = {}
-	output['date'] = build.getAttribute('date')
-	#print "statnames %s\n" % str(statnames)   #test
-	for child in build.childNodes:
-	    if child.namespaceURI == namespace \
-        and child.nodeType == child.ELEMENT_NODE \
-        and child.hasAttributes():
-                #print "child node %s\n" % child.getAttribute('name')   #test
-                name = child.getAttribute('name')
-                if name in statnames:
-                    #print "1"  #test
-                    output[name] = child.getAttribute('count')
-
-	return output
-
-statnames = ['postlink success', 'compile success', 'compile fail']
-
-## Command Line Interface ################################################
-
-parser = OptionParser(prog = "statgraph",
-        usage = "%prog [-h | options] [] [[] ...]")
-
-(options, args) = parser.parse_args()
-
-statfilename = "stdin"
-
-table = sys.stdout
-print >> table, 'Date,',  # add 'Date' in front of names
-
-comma=""
-for name in statnames:
-    print >> table, comma+name, #! this order is not the order in dictionary
-    comma=', '
-    #print 'test,',  #test
-
-print >> table, ""
-
-if len(args) > 0:
-    for statfilename in args:
-        sys.__stderr__.write("Loading %s\n" % statfilename)
-        file = open(statfilename, "r")
-        try:
-            stats = pullStats(statnames, file)
-        except StatsFail,e:
-            sys.__stderr__.write("Can't process file %s\n" % statfilename)
-            sys.exit(1)
-        #print stats.items()  # test
-        file.close()
-        
-	comma=""
-        print >> table, stats['date'] + ",",
-        for name in statnames:
-            print >> table, comma+stats[name],
-    	    comma=', '
-            #print 'test,',  # test
-        print >> table, ""
-
-else:
-    sys.stderr.write("No files specified")
-    #pullStats(statnames,sys.stdin)
+#
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# statcollate
+#
+
+"""
+	Produce output for a graphing program or spreadsheet from
+	the statistic logs produced by buildstats.py from Raptor logs.
+	e.g. by analysing several logs we can see how
+	"number of successful compiles" improves over time.
+"""
+
+import sys
+from optparse import OptionParser
+import os
+import xml.dom.minidom
+from stat import *
+
+namespace = "http://symbian.com/2007/xml/build/raptor/stats"
+
+class StatsFail(Exception):
+	pass
+
+def pullStats(statnames, file):
+	"""Load a Statistics document and pull stats for a graph"""
+
+	# try to read and parse the XML file
+	try:
+	    dom = xml.dom.minidom.parse(file)
+
+	except Exception,e: # a whole bag of exceptions can be raised here
+		print "pullStats: %s" % str(e)
+		raise StatsFail
+
+	#  is always the root element
+	stats = dom.documentElement
+	objects = []
+	build = stats.childNodes[1]
+	
+	# create a Data Model object from each sub-element
+	output = {}
+	output['date'] = build.getAttribute('date')
+	#print "statnames %s\n" % str(statnames)   #test
+	for child in build.childNodes:
+	    if child.namespaceURI == namespace \
+        and child.nodeType == child.ELEMENT_NODE \
+        and child.hasAttributes():
+                #print "child node %s\n" % child.getAttribute('name')   #test
+                name = child.getAttribute('name')
+                if name in statnames:
+                    #print "1"  #test
+                    output[name] = child.getAttribute('count')
+
+	return output
+
+statnames = ['postlink success', 'compile success', 'compile fail']
+
+## Command Line Interface ################################################
+
+parser = OptionParser(prog = "statgraph",
+        usage = "%prog [-h | options] [] [[] ...]")
+
+(options, args) = parser.parse_args()
+
+statfilename = "stdin"
+
+table = sys.stdout
+print >> table, 'Date,',  # add 'Date' in front of names
+
+comma=""
+for name in statnames:
+    print >> table, comma+name, #! this order is not the order in dictionary
+    comma=', '
+    #print 'test,',  #test
+
+print >> table, ""
+
+if len(args) > 0:
+    for statfilename in args:
+        sys.__stderr__.write("Loading %s\n" % statfilename)
+        file = open(statfilename, "r")
+        try:
+            stats = pullStats(statnames, file)
+        except StatsFail,e:
+            sys.__stderr__.write("Can't process file %s\n" % statfilename)
+            sys.exit(1)
+        #print stats.items()  # test
+        file.close()
+        
+	comma=""
+        print >> table, stats['date'] + ",",
+        for name in statnames:
+            print >> table, comma+stats[name],
+    	    comma=', '
+            #print 'test,',  # test
+        print >> table, ""
+
+else:
+    sys.stderr.write("No files specified")
+    #pullStats(statnames,sys.stdin)
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/bin/unsplitdirs.py
--- a/sbsv2/raptor/bin/unsplitdirs.py	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/bin/unsplitdirs.py	Mon Nov 16 09:46:46 2009 +0000
@@ -1,101 +1,101 @@
-#
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# unsplitdirs utility
-# This utility converts a directory tree which may contain "splits" due to case inconsistencies into
-# a combined form.  This is best illustrated as follows:
-# epoc32/RELEASE/ARMV5/urel
-# epoc32/Release/armv5/UREL
-# epoc32/RELEASE/armv5/Urel
-# are "healed by this script into:
-# epoc32/RELEASE/ARMV5/urel  (i.e. the first occurrence.
-#
-
-#
-# Files within these directories are maintained. i.e. it is possible to fix 
-# a directory tree with files already left in it.
-#
- 
-
-import os
-import os.path
-import re
-import sys
-import shutil
-from  optparse import OptionParser
-
-def mergetwo(firstdir, seconddir):
-# Move files from firstdir into seconddir.  If firstdir and seconddir both have 
-# a directory "X" then combines the contents of theses
-	for d in os.listdir(firstdir):
-		fileitem = os.path.join(firstdir,d)
-		dest = os.path.join(seconddir,d)
-		print "moving %s, %s to %s " % (d, fileitem, dest)
-		if os.path.isdir(dest) and os.path.isdir(fileitem):
-			mergetwo(fileitem, dest)
-			try:
-				os.rmdir(fileitem)
-			except:
-				print "\tfailed rmdir %s" % fileitem
-		else:
-			shutil.move(fileitem, dest)
-	try:
-		os.rmdir(firstdir)
-	except:
-		print "\tfailed rmdir %s" % firstdir
-	
-	
-
-def visit(dirname, link = False):
-# Find directories with names that differ only in case
-	nameclash = {}
-#	print "dir %s\n" %(dirname)
-	for f in os.listdir(dirname):
-		fullpath = os.path.join(dirname,f)
-		if os.path.isdir(fullpath) and not os.path.islink(fullpath):
-		#	print "\tmergeable %s" %(f)
-			fl = f.lower()
-			if nameclash.has_key(fl):
-				mergetwo(fullpath, os.path.join(dirname, nameclash[fl]))
-				if link:
-					print "\tlinking %s <- %s" %(nameclash[fl], fullpath)
-					os.symlink(nameclash[fl], fullpath)
-			else:
-				nameclash[fl] = f
-		else:
-			pass
-		#	print "%s is not a dir\n" %(f)
-
-	for d in nameclash.values():
-	#	print "\tVisiting %s" %(d)
-		visit(os.path.join(dirname, d))
-
-
-dirname = sys.argv[1]
-
-parser = OptionParser(prog = "unsplitdirs",
-        usage = "%prog [-h | options] []")
-
-parser.add_option("-l", "--link", default = False,
-         action="store_true", dest="link", help="Turn mismatched-case directories into symbolic links e.g. if armv5 is the default then make the link ARMV5->armv5")
-
-(options, args) = parser.parse_args()
-
-logname="stdin"
-if len(args) > 0:
-        dirname = args[0]
-else:
-	dirname ='.'
-
-visit(dirname, options.link)
+#
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# unsplitdirs utility
+# This utility converts a directory tree which may contain "splits" due to case inconsistencies into
+# a combined form.  This is best illustrated as follows:
+# epoc32/RELEASE/ARMV5/urel
+# epoc32/Release/armv5/UREL
+# epoc32/RELEASE/armv5/Urel
+# are "healed by this script into:
+# epoc32/RELEASE/ARMV5/urel  (i.e. the first occurrence.
+#
+
+#
+# Files within these directories are maintained. i.e. it is possible to fix 
+# a directory tree with files already left in it.
+#
+ 
+
+import os
+import os.path
+import re
+import sys
+import shutil
+from  optparse import OptionParser
+
+def mergetwo(firstdir, seconddir):
+# Move files from firstdir into seconddir.  If firstdir and seconddir both have 
+# a directory "X" then combines the contents of theses
+	for d in os.listdir(firstdir):
+		fileitem = os.path.join(firstdir,d)
+		dest = os.path.join(seconddir,d)
+		print "moving %s, %s to %s " % (d, fileitem, dest)
+		if os.path.isdir(dest) and os.path.isdir(fileitem):
+			mergetwo(fileitem, dest)
+			try:
+				os.rmdir(fileitem)
+			except:
+				print "\tfailed rmdir %s" % fileitem
+		else:
+			shutil.move(fileitem, dest)
+	try:
+		os.rmdir(firstdir)
+	except:
+		print "\tfailed rmdir %s" % firstdir
+	
+	
+
+def visit(dirname, link = False):
+# Find directories with names that differ only in case
+	nameclash = {}
+#	print "dir %s\n" %(dirname)
+	for f in os.listdir(dirname):
+		fullpath = os.path.join(dirname,f)
+		if os.path.isdir(fullpath) and not os.path.islink(fullpath):
+		#	print "\tmergeable %s" %(f)
+			fl = f.lower()
+			if nameclash.has_key(fl):
+				mergetwo(fullpath, os.path.join(dirname, nameclash[fl]))
+				if link:
+					print "\tlinking %s <- %s" %(nameclash[fl], fullpath)
+					os.symlink(nameclash[fl], fullpath)
+			else:
+				nameclash[fl] = f
+		else:
+			pass
+		#	print "%s is not a dir\n" %(f)
+
+	for d in nameclash.values():
+	#	print "\tVisiting %s" %(d)
+		visit(os.path.join(dirname, d))
+
+
+dirname = sys.argv[1]
+
+parser = OptionParser(prog = "unsplitdirs",
+        usage = "%prog [-h | options] []")
+
+parser.add_option("-l", "--link", default = False,
+         action="store_true", dest="link", help="Turn mismatched-case directories into symbolic links e.g. if armv5 is the default then make the link ARMV5->armv5")
+
+(options, args) = parser.parse_args()
+
+logname="stdin"
+if len(args) > 0:
+        dirname = args[0]
+else:
+	dirname ='.'
+
+visit(dirname, options.link)
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/bin/vartoxml.py
--- a/sbsv2/raptor/bin/vartoxml.py	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/bin/vartoxml.py	Mon Nov 16 09:46:46 2009 +0000
@@ -1,207 +1,207 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# Raptor Binary Variation var file to xml spec generator
-# Given a set of .var files, this script will generate an xml specification file
-#
-
-
-import sys,os,re,fnmatch
-import xml.dom.minidom 
-from optparse import OptionParser
-
-doc = xml.dom.minidom.Document()
-class VarFile:
-
-	def __init__(self,aFile):
-		self.virtual = False
-		self.varname = ""
-		self.varhrh = ""
-		self.build_include = ""
-		self.rom_include = ""
-		self.extends = ""
-		self.file = aFile
-
-	# Parse the var file
-	def ParseVarFile(self):
-		file = open(self.file)
-		vardata = file.readlines()
-		for var in vardata:
-			if re.match('VARIANT\s+(?P\w+)',var):
-				self.varname = re.match('VARIANT\s+(?P\w+)',var)
-			elif re.match('VARIANT_HRH\s+(?P.+)',var):
-				self.varhrh  = re.match('VARIANT_HRH\s+(?P.+)',var)
-			elif re.match('VIRTUAL\s+$',var):
-				self.virtual = True
-			elif re.match('BUILD_INCLUDE\s+.+',var):
-				self.build_include = re.match('BUILD_INCLUDE\s+(?P\w+)\s+(?P.+)',var)
-			elif re.match('ROM_INCLUDE\s+.+',var):
-				self.rom_include = re.match('ROM_INCLUDE\s+(?P\w+)\s+(?P.+)',var)
-			elif re.match('EXTENDS\s+(?P\w+)',var):
-				self.extends = re.match('EXTENDS\s+(?P\w+)',var)
-		if self.varname:
-			self.varname = self.varname.group('VARIANTNAME')
-		if self.varhrh:
-			self.varhrh  = self.varhrh.group('VARIANTHRH')
-		if self.extends:
-			self.extends = self.extends.group('EXTENDSNODE')
-		file.close()
-	
-	# Write the specs for a variant object and attach it to a parent node
-	def CreateSpec(self,parentNode):
-	
-		var = doc.createElement("var")
-		parentNode.appendChild(var)
-
-		# Set the FEATUREVARIANT name
-		vname = doc.createElement("set")
-		vname.setAttribute("name","FEATUREVARIANT")
-		vname.setAttribute("value",self.varname)
-		if self.virtual:
-			vname.setAttribute("abstract","true")
-		var.appendChild(vname)
-
-		# Set the VARIANT_HRH name
-		hrhname = doc.createElement("set")
-		hrhname.setAttribute("name","VARIANT_HRH")
-		hrhname.setAttribute("value",self.varhrh)
-		var.appendChild(hrhname)
-
-		# Set the build includes
-		if self.build_include:
-			buildincs = doc.createElement(self.build_include.group('PROPERTY'))
-			buildincs.setAttribute("name","BUILD_INCLUDE")
-			buildincs.setAttribute("value",self.build_include.group('LOCATION'))
-			var.appendChild(buildincs)
-
-		# Set the rom includes
-		if self.rom_include:
-			buildincs = doc.createElement(self.rom_include.group('PROPERTY'))
-			buildincs.setAttribute("name","ROM_INCLUDE")
-			buildincs.setAttribute("value",self.rom_include.group('LOCATION'))
-			var.appendChild(buildincs)
-
-# Main function
-def main():
-
-	parser = OptionParser(prog = "vartoxml.py")
-	parser.add_option("-s","--sourcefile",action="append",dest="varfile",help="List of var files")
-	parser.add_option("-o","--output",action="store",dest="outputxml",help="Output xml file")
-	parser.add_option("-d","--folder",action="store",dest="folder",help="Folder names to search for var files")
-
-	(options, leftover_args) = parser.parse_args(sys.argv[1:])
-	
-	childlist = [] 
-	addedlist = []
-	nodesList = []
-	childnames = []
-	i = 0
-	
-	# Get the list of .var file from the specified folder(s)
-	if options.folder:
-		for folder in options.folder:
-			for fileName in os.listdir (folder):
-				if fnmatch.fnmatch (fileName,'*.var'):
-					if options.varfile:
-						options.varfile.append(fileName)
-					else:
-						options.varfile = []
-						options.varfile.append(fileName)
-	
-	# We need some source files for this script to work
-	if not options.varfile:
-		print "Error: No source files specified "
-		sys.exit()
-		
-	# Set parent node to gibberish
-	parentNode = doc.createElement("build")
-	doc.appendChild(parentNode)
-	newparentNode = ""
-	
-	# Removes duplicate elements in the arguments and iterate through them
-	# to find the top-level abstract parent node
-	for arg in list(set(options.varfile)):
-		varobj = VarFile(arg)
-		varobj.ParseVarFile()
-		if varobj.extends:
-			childlist.append(varobj)
-		else:
-			addedlist.append(varobj)
-			conf = doc.createElement("config")
-			conf.setAttribute("name",varobj.varname)
-			parentNode.appendChild(conf)
-			varobj.CreateSpec(conf)
-			nodesList.append(conf)
-	
-	# Names of all the children need to be stored separately
-	for c in childlist:
-		childnames.append(c.varname)
-
-	childlist2 = list(childlist)
-
-	# Check the list is correct, and append orphan nodes to master BUILD node
-	for ch in childlist2:
-		if addedlist:
-			if not ch.extends in addedlist[0].varname:
-				if not ch.extends in childnames:
-					conf = doc.createElement("config")
-					conf.setAttribute("name",ch.varname)
-					parentNode.appendChild(conf)
-					varobj.CreateSpec(conf)
-					nodesList.append(conf)
-					addedlist.append(ch)
-					childlist.remove(ch)
-		else:
-			if not ch.extends in childnames:
-				conf = doc.createElement("config")
-				conf.setAttribute("name",ch.varname)
-				parentNode.appendChild(conf)
-				varobj.CreateSpec(conf)
-				nodesList.append(conf)
-				addedlist.append(ch)
-				childlist.remove(ch)
-				
-	# Make a copy of the new childlist
-	childlist2 = list(childlist)
-
-	# Go through all the children, and add them to the xml spec
-	while (childlist2):
-		# Refactor the childlist to remove elements which have been added
-		for add in addedlist:
-			if add in childlist:
-				childlist.remove(add)
-		for ch in childlist:
-			if ch.extends == addedlist[i].varname:
-				addedlist.append(ch)
-				childlist2.remove(ch)
-				conf = doc.createElement("config")
-				conf.setAttribute("name",ch.varname)
-				nodesList[i].appendChild(conf)
-				nodesList.append(conf)
-				ch.CreateSpec(conf)
-			else:
-				pass
-		i = i + 1
-	
-	# If output xml file is specified, write to it otherwise print the xml to screen
-	if options.outputxml:
-		file = open(options.outputxml,"w")
-		file.writelines(doc.toprettyxml(indent="  "))
-		file.close()
-	else:
-		print doc.toprettyxml(indent="  ")
-
-
-if __name__ == "__main__":
-    main()
+#
+# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# Raptor Binary Variation var file to xml spec generator
+# Given a set of .var files, this script will generate an xml specification file
+#
+
+
+import sys,os,re,fnmatch
+import xml.dom.minidom 
+from optparse import OptionParser
+
+doc = xml.dom.minidom.Document()
+class VarFile:
+
+	def __init__(self,aFile):
+		self.virtual = False
+		self.varname = ""
+		self.varhrh = ""
+		self.build_include = ""
+		self.rom_include = ""
+		self.extends = ""
+		self.file = aFile
+
+	# Parse the var file
+	def ParseVarFile(self):
+		file = open(self.file)
+		vardata = file.readlines()
+		for var in vardata:
+			if re.match('VARIANT\s+(?P\w+)',var):
+				self.varname = re.match('VARIANT\s+(?P\w+)',var)
+			elif re.match('VARIANT_HRH\s+(?P.+)',var):
+				self.varhrh  = re.match('VARIANT_HRH\s+(?P.+)',var)
+			elif re.match('VIRTUAL\s+$',var):
+				self.virtual = True
+			elif re.match('BUILD_INCLUDE\s+.+',var):
+				self.build_include = re.match('BUILD_INCLUDE\s+(?P\w+)\s+(?P.+)',var)
+			elif re.match('ROM_INCLUDE\s+.+',var):
+				self.rom_include = re.match('ROM_INCLUDE\s+(?P\w+)\s+(?P.+)',var)
+			elif re.match('EXTENDS\s+(?P\w+)',var):
+				self.extends = re.match('EXTENDS\s+(?P\w+)',var)
+		if self.varname:
+			self.varname = self.varname.group('VARIANTNAME')
+		if self.varhrh:
+			self.varhrh  = self.varhrh.group('VARIANTHRH')
+		if self.extends:
+			self.extends = self.extends.group('EXTENDSNODE')
+		file.close()
+	
+	# Write the specs for a variant object and attach it to a parent node
+	def CreateSpec(self,parentNode):
+	
+		var = doc.createElement("var")
+		parentNode.appendChild(var)
+
+		# Set the FEATUREVARIANT name
+		vname = doc.createElement("set")
+		vname.setAttribute("name","FEATUREVARIANT")
+		vname.setAttribute("value",self.varname)
+		if self.virtual:
+			vname.setAttribute("abstract","true")
+		var.appendChild(vname)
+
+		# Set the VARIANT_HRH name
+		hrhname = doc.createElement("set")
+		hrhname.setAttribute("name","VARIANT_HRH")
+		hrhname.setAttribute("value",self.varhrh)
+		var.appendChild(hrhname)
+
+		# Set the build includes
+		if self.build_include:
+			buildincs = doc.createElement(self.build_include.group('PROPERTY'))
+			buildincs.setAttribute("name","BUILD_INCLUDE")
+			buildincs.setAttribute("value",self.build_include.group('LOCATION'))
+			var.appendChild(buildincs)
+
+		# Set the rom includes
+		if self.rom_include:
+			buildincs = doc.createElement(self.rom_include.group('PROPERTY'))
+			buildincs.setAttribute("name","ROM_INCLUDE")
+			buildincs.setAttribute("value",self.rom_include.group('LOCATION'))
+			var.appendChild(buildincs)
+
+# Main function
+def main():
+
+	parser = OptionParser(prog = "vartoxml.py")
+	parser.add_option("-s","--sourcefile",action="append",dest="varfile",help="List of var files")
+	parser.add_option("-o","--output",action="store",dest="outputxml",help="Output xml file")
+	parser.add_option("-d","--folder",action="store",dest="folder",help="Folder names to search for var files")
+
+	(options, leftover_args) = parser.parse_args(sys.argv[1:])
+	
+	childlist = [] 
+	addedlist = []
+	nodesList = []
+	childnames = []
+	i = 0
+	
+	# Get the list of .var file from the specified folder(s)
+	if options.folder:
+		for folder in options.folder:
+			for fileName in os.listdir (folder):
+				if fnmatch.fnmatch (fileName,'*.var'):
+					if options.varfile:
+						options.varfile.append(fileName)
+					else:
+						options.varfile = []
+						options.varfile.append(fileName)
+	
+	# We need some source files for this script to work
+	if not options.varfile:
+		print "Error: No source files specified "
+		sys.exit()
+		
+	# Set parent node to gibberish
+	parentNode = doc.createElement("build")
+	doc.appendChild(parentNode)
+	newparentNode = ""
+	
+	# Removes duplicate elements in the arguments and iterate through them
+	# to find the top-level abstract parent node
+	for arg in list(set(options.varfile)):
+		varobj = VarFile(arg)
+		varobj.ParseVarFile()
+		if varobj.extends:
+			childlist.append(varobj)
+		else:
+			addedlist.append(varobj)
+			conf = doc.createElement("config")
+			conf.setAttribute("name",varobj.varname)
+			parentNode.appendChild(conf)
+			varobj.CreateSpec(conf)
+			nodesList.append(conf)
+	
+	# Names of all the children need to be stored separately
+	for c in childlist:
+		childnames.append(c.varname)
+
+	childlist2 = list(childlist)
+
+	# Check the list is correct, and append orphan nodes to master BUILD node
+	for ch in childlist2:
+		if addedlist:
+			if not ch.extends in addedlist[0].varname:
+				if not ch.extends in childnames:
+					conf = doc.createElement("config")
+					conf.setAttribute("name",ch.varname)
+					parentNode.appendChild(conf)
+					varobj.CreateSpec(conf)
+					nodesList.append(conf)
+					addedlist.append(ch)
+					childlist.remove(ch)
+		else:
+			if not ch.extends in childnames:
+				conf = doc.createElement("config")
+				conf.setAttribute("name",ch.varname)
+				parentNode.appendChild(conf)
+				varobj.CreateSpec(conf)
+				nodesList.append(conf)
+				addedlist.append(ch)
+				childlist.remove(ch)
+				
+	# Make a copy of the new childlist
+	childlist2 = list(childlist)
+
+	# Go through all the children, and add them to the xml spec
+	while (childlist2):
+		# Refactor the childlist to remove elements which have been added
+		for add in addedlist:
+			if add in childlist:
+				childlist.remove(add)
+		for ch in childlist:
+			if ch.extends == addedlist[i].varname:
+				addedlist.append(ch)
+				childlist2.remove(ch)
+				conf = doc.createElement("config")
+				conf.setAttribute("name",ch.varname)
+				nodesList[i].appendChild(conf)
+				nodesList.append(conf)
+				ch.CreateSpec(conf)
+			else:
+				pass
+		i = i + 1
+	
+	# If output xml file is specified, write to it otherwise print the xml to screen
+	if options.outputxml:
+		file = open(options.outputxml,"w")
+		file.writelines(doc.toprettyxml(indent="  "))
+		file.close()
+	else:
+		print doc.toprettyxml(indent="  ")
+
+
+if __name__ == "__main__":
+    main()
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/bin/whatsource.py
--- a/sbsv2/raptor/bin/whatsource.py	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/bin/whatsource.py	Mon Nov 16 09:46:46 2009 +0000
@@ -1,57 +1,57 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-
-#!/bin/env python
-# What source files did the build try to build?
-
-import sys
-import re
-from  optparse import OptionParser
-from raptorlog import *
-
-
-def genstats(file, logitems):
-	linecount=0
-	print ""
-	for l in file.xreadlines():
-		for i in logitems:
-			i.match(l)
-	print ""
-
-
-## Command Line Interface ####################################################
-
-parser = OptionParser(prog = "whatsource",
-	usage = "%prog [-h | options] logfile\nFind out what source files the compiler tried to build")
-
-(options, args) = parser.parse_args()
-
-logname="stdin"
-if len(args) > 0:
-	logname=args[0]
-	file = open(logname,"r")
-else:
-	file = sys.stdin
-
-
-compiler_invocations = [ 
-	LogItem("armcc usage",'\+ .*armcc.*-c', True, '[A-Za-z0-9_/\-\.]+\.cpp'),
-	] 
-
-genstats(file, compiler_invocations)
-
-if file != sys.stdin:
-	file.close()
+#
+# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+
+#!/bin/env python
+# What source files did the build try to build?
+
+import sys
+import re
+from  optparse import OptionParser
+from raptorlog import *
+
+
+def genstats(file, logitems):
+	linecount=0
+	print ""
+	for l in file.xreadlines():
+		for i in logitems:
+			i.match(l)
+	print ""
+
+
+## Command Line Interface ####################################################
+
+parser = OptionParser(prog = "whatsource",
+	usage = "%prog [-h | options] logfile\nFind out what source files the compiler tried to build")
+
+(options, args) = parser.parse_args()
+
+logname="stdin"
+if len(args) > 0:
+	logname=args[0]
+	file = open(logname,"r")
+else:
+	file = sys.stdin
+
+
+compiler_invocations = [ 
+	LogItem("armcc usage",'\+ .*armcc.*-c', True, '[A-Za-z0-9_/\-\.]+\.cpp'),
+	] 
+
+genstats(file, compiler_invocations)
+
+if file != sys.stdin:
+	file.close()
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/examples/os_properties.xml
--- a/sbsv2/raptor/examples/os_properties.xml	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/examples/os_properties.xml	Mon Nov 16 09:46:46 2009 +0000
@@ -1,23 +1,23 @@
-
-
-	
-	
-	
-	
-		 
-	
-		
-		
-		
-	
-	
-
+
+
+	
+	
+	
+	
+		 
+	
+		
+		
+		
+	
+	
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/examples/sbs_init.xml
--- a/sbsv2/raptor/examples/sbs_init.xml	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/examples/sbs_init.xml	Mon Nov 16 09:46:46 2009 +0000
@@ -1,127 +1,127 @@
-
-
-
-
-	
-
-	
-		
-		
-
-		
-
-		
-		
-
-		
-		
-
-		
-		
-
-		
-		
-
-		
-		
-		
-
-		
-		
-		
-		
-		
-
-		
-		
-
-		
-		
-
-		
-		
-
-		
-		
-
-		
-		
-
-		
-		
-
-		
-		
-
-	
-
-	
-	
-	
-		
-	
-	
-	
-	
-	
-	
-
-	
-	
-	
-	
-	
-	
-		
-		
-	
-	
-
+
+
+
+
+	
+
+	
+		
+		
+
+		
+
+		
+		
+
+		
+		
+
+		
+		
+
+		
+		
+
+		
+		
+		
+
+		
+		
+		
+		
+		
+
+		
+		
+
+		
+		
+
+		
+		
+
+		
+		
+
+		
+		
+
+		
+		
+
+		
+		
+
+	
+
+	
+	
+	
+		
+	
+	
+	
+	
+	
+	
+
+	
+	
+	
+	
+	
+	
+		
+		
+	
+	
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/group/bld.inf
--- a/sbsv2/raptor/group/bld.inf	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/group/bld.inf	Mon Nov 16 09:46:46 2009 +0000
@@ -1,24 +1,24 @@
-/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-
-PRJ_PLATFORMS
-TOOLS TOOLS2
-
-PRJ_EXPORTS
-#include "exports.inf"
-
+/*
+* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+PRJ_PLATFORMS
+TOOLS TOOLS2
+
+PRJ_EXPORTS
+#include "exports.inf"
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/group/checkexports.sh
--- a/sbsv2/raptor/group/checkexports.sh	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/group/checkexports.sh	Mon Nov 16 09:46:46 2009 +0000
@@ -1,7 +1,7 @@
-#!/bin/bash
-
-for dir in . cpp-raptor cygwin-1.5.25 mingw-5.1.4 python-2.5.2; do
-	echo testing exports.inf in $dir
-	(cd $dir; ./exports.sh2; sort exports.inf > t1; sort exports.inf2 > t2; diff t1 t2)
-done
-
+#!/bin/bash
+
+for dir in . cpp-raptor cygwin-1.5.25 mingw-5.1.4 python-2.5.2; do
+	echo testing exports.inf in $dir
+	(cd $dir; ./exports.sh2; sort exports.inf > t1; sort exports.inf2 > t2; diff t1 t2)
+done
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/group/exports.inf
--- a/sbsv2/raptor/group/exports.inf	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/group/exports.inf	Mon Nov 16 09:46:46 2009 +0000
@@ -1,223 +1,223 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-../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
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+../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 -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/group/exports.sh
--- a/sbsv2/raptor/group/exports.sh	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/group/exports.sh	Mon Nov 16 09:46:46 2009 +0000
@@ -1,12 +1,12 @@
-#!/bin/bash
-
-# script to generate exports for this component
-
-# copy ../* to /tools/sbs
-
-find .. -maxdepth 1 -type f -not -name "distribution.policy*" -print | sed 's!\.\.\(.*\)!\.\.\1 /tools/sbs\1!' > exports.inf
-
-for i in bin lib python schema util; do
-    find ../$i -type f -not -name "distribution.policy*" -not -name "*.pyc" -print | sed 's!\.\.\(.*\)!\.\.\1 /tools/sbs\1!' >> exports.inf
-done
-
+#!/bin/bash
+
+# script to generate exports for this component
+
+# copy ../* to /tools/sbs
+
+find .. -maxdepth 1 -type f -not -name "distribution.policy*" -print | sed 's!\.\.\(.*\)!\.\.\1 /tools/sbs\1!' > exports.inf
+
+for i in bin lib python schema util; do
+    find ../$i -type f -not -name "distribution.policy*" -not -name "*.pyc" -print | sed 's!\.\.\(.*\)!\.\.\1 /tools/sbs\1!' >> exports.inf
+done
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/group/exports.sh2
--- a/sbsv2/raptor/group/exports.sh2	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/group/exports.sh2	Mon Nov 16 09:46:46 2009 +0000
@@ -1,12 +1,12 @@
-#!/bin/bash
-
-# script to generate exports for this component to compare with the existing exports.inf
-
-# copy ../* to /tools/sbs
-
-find .. -maxdepth 1 -type f -not -name "distribution.policy*" -print | sed 's!\.\.\(.*\)!\.\.\1 /tools/sbs\1!' > exports.inf2
-
-for i in bin examples lib python schema win32/bin; do
-    find ../$i -type f -not -name "distribution.policy*" -not -name "*.pyc" -print | sed 's!\.\.\(.*\)!\.\.\1 /tools/sbs\1!' >> exports.inf2
-done
-
+#!/bin/bash
+
+# script to generate exports for this component to compare with the existing exports.inf
+
+# copy ../* to /tools/sbs
+
+find .. -maxdepth 1 -type f -not -name "distribution.policy*" -print | sed 's!\.\.\(.*\)!\.\.\1 /tools/sbs\1!' > exports.inf2
+
+for i in bin examples lib python schema win32/bin; do
+    find ../$i -type f -not -name "distribution.policy*" -not -name "*.pyc" -print | sed 's!\.\.\(.*\)!\.\.\1 /tools/sbs\1!' >> exports.inf2
+done
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/group/raptor.mrp
--- a/sbsv2/raptor/group/raptor.mrp	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/group/raptor.mrp	Mon Nov 16 09:46:46 2009 +0000
@@ -1,11 +1,11 @@
-component dev_build_sbsv2_raptor
-
-
-source /src/tools/dev/build/sbsv2/raptor
-exports /src/tools/dev/build/sbsv2/raptor/group
-
-ipr T
-ipr B ../python/pyparsing.py
-
-notes_source release.txt
-
+component dev_build_sbsv2_raptor
+
+
+source /src/tools/dev/build/sbsv2/raptor
+exports /src/tools/dev/build/sbsv2/raptor/group
+
+ipr T
+ipr B ../python/pyparsing.py
+
+notes_source release.txt
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/group/release.txt
--- a/sbsv2/raptor/group/release.txt	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/group/release.txt	Mon Nov 16 09:46:46 2009 +0000
@@ -1,5 +1,5 @@
-NOTESRC_RELEASER
-Symbian Software Ltd. (kits.notify@symbian.com)
-
-NOTESRC_RELEASE_REASON
-Symbian Build System release.
+NOTESRC_RELEASER
+Symbian Software Ltd. (kits.notify@symbian.com)
+
+NOTESRC_RELEASE_REASON
+Symbian Build System release.
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/config/arm.xml
--- a/sbsv2/raptor/lib/config/arm.xml	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/config/arm.xml	Mon Nov 16 09:46:46 2009 +0000
@@ -1,156 +1,155 @@
-
-
-	
-	
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-			
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-	
-		
-		
-		
-		
-		
-		
-		
-		
-	
-	
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-	
-		
-		
-		
-		
-		
-		
-		
-		
-	
-	
-		
-		
-		
-		
-		
-	
-
-	
-	
-	
-	
-	
-
-	
-	
-	
-
-	
-	
-	
-	
-	
-	
-	
-	
-
-	
-	
-
-	
-		
-		
-	
-
-	
-		
-		
-	
-	
-		
-		
-	
-
-	
-		
-		
-	
-	
-	
-		
-		
-	
-	
-
+
+
+	
+	
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+			
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+	
+		
+		
+		
+		
+		
+		
+		
+	
+	
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+	
+		
+		
+		
+		
+		
+		
+		
+		
+	
+	
+		
+		
+		
+		
+		
+	
+
+	
+	
+	
+	
+	
+
+	
+	
+	
+
+	
+	
+	
+	
+	
+	
+	
+	
+
+	
+	
+
+	
+		
+		
+	
+
+	
+		
+		
+	
+	
+		
+		
+	
+
+	
+		
+		
+	
+	
+	
+		
+		
+	
+	
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/config/build.xml
--- a/sbsv2/raptor/lib/config/build.xml	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/config/build.xml	Mon Nov 16 09:46:46 2009 +0000
@@ -1,8 +1,8 @@
-
-
-	
-
-	
-		
-	
-
+
+
+	
+
+	
+		
+	
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/config/carbide.xml
--- a/sbsv2/raptor/lib/config/carbide.xml	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/config/carbide.xml	Mon Nov 16 09:46:46 2009 +0000
@@ -1,37 +1,37 @@
-
-
-
-
-	
-	
-	
-		
-			
-			
-		
-		
-			
-			
-		
-		
-			
-			
-		
-		
-			
-			
-		
-	
-
-	
-		
-		
-	
-
-
+
+
+
+
+	
+	
+	
+		
+			
+			
+		
+		
+			
+			
+		
+		
+			
+			
+		
+		
+			
+			
+		
+	
+
+	
+		
+		
+	
+
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/config/coverity.xml
--- a/sbsv2/raptor/lib/config/coverity.xml	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/config/coverity.xml	Mon Nov 16 09:46:46 2009 +0000
@@ -1,10 +1,10 @@
-
-
-
-
-
-	
-	
-		
-	
-
+
+
+
+
+
+	
+	
+		
+	
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/config/default.xml
--- a/sbsv2/raptor/lib/config/default.xml	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/config/default.xml	Mon Nov 16 09:46:46 2009 +0000
@@ -1,32 +1,32 @@
-
-
-
-	
-
-	
-		
-		
-	
-
-	
-		
-		
-	
-
-	
-		
-		
-	
-
-	
-
-	
-		
-		
-		
-		
-		
-		
-	
-
-
+
+
+
+	
+
+	
+		
+		
+	
+
+	
+		
+		
+	
+
+	
+		
+		
+	
+
+	
+
+	
+		
+		
+		
+		
+		
+		
+	
+
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/config/gcc.xml
--- a/sbsv2/raptor/lib/config/gcc.xml	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/config/gcc.xml	Mon Nov 16 09:46:46 2009 +0000
@@ -1,106 +1,106 @@
-
-
-
-	
-	
-
-		
-		
-		
-		
-		
-		
-
-		
-		
-		
-
-		
-		
-		
-
-		
-		
-		
-
-		
-		
-
-		
-
-		
-		
-		
-
-		
-
-		
-		
-
-
-		
-		
-		
-
-		
-
-		
-		
-		
-		
-		
-		
-		
-
-		
-		
-
-		
-		
-		
-		
-		
-		
-
-		
-		
-
-		
-		
-
-		
-		
-		
-		
-
-		
-		
-	
-
-	
-		 
-		
-
-		
-		
-		
-	
-
-	
-		 
-		
-
-		
-		
-		
-	
-
-	
-		
-		
-	
-
-
+
+
+
+	
+	
+
+		
+		
+		
+		
+		
+		
+
+		
+		
+		
+
+		
+		
+		
+
+		
+		
+		
+
+		
+		
+
+		
+
+		
+		
+		
+
+		
+
+		
+		
+
+
+		
+		
+		
+
+		
+
+		
+		
+		
+		
+		
+		
+		
+
+		
+		
+
+		
+		
+		
+		
+		
+		
+
+		
+		
+
+		
+		
+
+		
+		
+		
+		
+
+		
+		
+	
+
+	
+		 
+		
+
+		
+		
+		
+	
+
+	
+		 
+		
+
+		
+		
+		
+	
+
+	
+		
+		
+	
+
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/config/gcce.xml
--- a/sbsv2/raptor/lib/config/gcce.xml	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/config/gcce.xml	Mon Nov 16 09:46:46 2009 +0000
@@ -1,108 +1,104 @@
-
-
-	
-	
-	
-		
-		
-		
-		
-				
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-				
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-			
-		
-		
-		
-		
-		
-				
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-
+
+
+	
+	
+	
+		
+		
+		
+		
+		
+				
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+				
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+			
+		
+		
+		
+		
+		
+				
+		
+		
+		
+		
+		
+		
+		
+	
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/config/gccxml.xml
--- a/sbsv2/raptor/lib/config/gccxml.xml	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/config/gccxml.xml	Mon Nov 16 09:46:46 2009 +0000
@@ -1,115 +1,115 @@
-
-
-	
-	
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-
-		
-		
-
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-
-		
-		
-		
-
-		
-		
-		
-		
-
-		
-		
-		
-		
-
-		
-
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-
-	
-		
-		
-
-		
-		
-	
-
-	
-		
-		
-
-		
-		
-	
-
-	
-		
-		
-	
-
-
+
+
+	
+	
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+
+		
+		
+
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+
+		
+		
+		
+
+		
+		
+		
+		
+
+		
+		
+		
+		
+
+		
+
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+
+	
+		
+		
+
+		
+		
+	
+
+	
+		
+		
+
+		
+		
+	
+
+	
+		
+		
+	
+
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/config/interfaces.xml
--- a/sbsv2/raptor/lib/config/interfaces.xml	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/config/interfaces.xml	Mon Nov 16 09:46:46 2009 +0000
@@ -1,42 +1,42 @@
-
-
-	
-
-	
-		
-
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-
-		
-		
-	
-
-
+
+
+	
+
+	
+		
+
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+
+		
+		
+	
+
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/config/locations.xml
--- a/sbsv2/raptor/lib/config/locations.xml	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/config/locations.xml	Mon Nov 16 09:46:46 2009 +0000
@@ -1,116 +1,116 @@
-
-
-	
-
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-	
-		
-		
-		
-		
-		
-		
-		 
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-
-	
-		
-		
-		
-
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-
-		
-		
-		
-
-		
-		
-		
-		
-		
-	
-
-
+
+
+	
+
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+	
+		
+		
+		
+		
+		
+		
+		 
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+
+	
+		
+		
+		
+
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+
+		
+		
+		
+
+		
+		
+		
+		
+		
+	
+
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/config/make.xml
--- a/sbsv2/raptor/lib/config/make.xml	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/config/make.xml	Mon Nov 16 09:46:46 2009 +0000
@@ -1,92 +1,92 @@
-
-
-	
-	
-	
-	
-		
-
-		
-		
-		
-		
-		
-		
-		
-		
-		
-
-		
-		
-
-		
-		
-
-		
-		
-		
-		
-		
-		
-		
-
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-
-		
-		
-	
-	
-	
-
-	
-	
-	        
-	        
-	
-
-	
-
-	
-
-	
-	
-		
-		
-		
-		
-	
-
-	
-	
-	
-	
-	        
-	        
-	
-
-	
-	
-	
-	
-		
-		
-		
-		
-	
-
-	
-
-
+
+
+	
+	
+	
+	
+		
+
+		
+		
+		
+		
+		
+		
+		
+		
+		
+
+		
+		
+
+		
+		
+
+		
+		
+		
+		
+		
+		
+		
+
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+
+		
+		
+	
+	
+	
+
+	
+	
+	        
+	        
+	
+
+	
+
+	
+
+	
+	
+		
+		
+		
+		
+	
+
+	
+	
+	
+	
+	        
+	        
+	
+
+	
+	
+	
+	
+		
+		
+		
+		
+	
+
+	
+
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/config/meta.xml
--- a/sbsv2/raptor/lib/config/meta.xml	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/config/meta.xml	Mon Nov 16 09:46:46 2009 +0000
@@ -1,8 +1,8 @@
-
-
-	
-
-	
-		
-	
-
+
+
+	
+
+	
+		
+	
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/config/msvc.xml
--- a/sbsv2/raptor/lib/config/msvc.xml	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/config/msvc.xml	Mon Nov 16 09:46:46 2009 +0000
@@ -1,102 +1,102 @@
-
-
-	
-	
-		
-		
-
-		
-		
-		
-		
-		
-
-		
-		
-		
-
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-
-		
-		
-
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-
-	
-		
-		
-		 
-		
-		
-		
-		
-	
-
-	
-		
-		
-		
-		
-		
-		
-		
-	
-
-	
-		
-		
-	
-
+
+
+	
+	
+		
+		
+
+		
+		
+		
+		
+		
+
+		
+		
+		
+
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+
+		
+		
+
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+
+	
+		
+		
+		 
+		
+		
+		
+		
+	
+
+	
+		
+		
+		
+		
+		
+		
+		
+	
+
+	
+		
+		
+	
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/config/root.xml
--- a/sbsv2/raptor/lib/config/root.xml	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/config/root.xml	Mon Nov 16 09:46:46 2009 +0000
@@ -1,53 +1,53 @@
-
-
-
-	
-
-	
-		
-		
-		
-		
-		
-	
-
-	
-	
-		
-		
-		
-		
-
-		
-		 
-
-		
-		
-		
-		
-		
-	
-	
-	
-	
-		
-		
-		
-	
-	
-	
-	
-	
-
+
+
+
+	
+
+	
+		
+		
+		
+		
+		
+	
+
+	
+	
+		
+		
+		
+		
+
+		
+		 
+
+		
+		
+		
+		
+		
+	
+	
+	
+	
+		
+		
+		
+	
+	
+	
+	
+	
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/config/rvct.xml
--- a/sbsv2/raptor/lib/config/rvct.xml	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/config/rvct.xml	Mon Nov 16 09:46:46 2009 +0000
@@ -1,107 +1,104 @@
-
-
-	
-	
-		
-		
-		
-		
-			
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-			
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-				
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-				
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-
+
+
+	
+	
+		
+		
+		
+		
+		
+			
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+			
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+				
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+				
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/config/variants.xml
--- a/sbsv2/raptor/lib/config/variants.xml	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/config/variants.xml	Mon Nov 16 09:46:46 2009 +0000
@@ -1,265 +1,256 @@
-
-
-	
-  
-	
-	
-		
-	
-	
-	
-		
-		
-		
-		
-	
-
-    
-    
-        
-    
-	
-	
-
-	
-		
-	
-
-	
-		
-	
-
-  
-   
-   
-
-   
-    
-   
-   
-
-   
-	   
-	   
-   
-
-   
-	   
-	   
-   
-
-   
-    
-   
-
-  
-  
-    
-  
-
-	
-	
-		
-		
-		
-		
-		
-		
-	
-
-	
-	
-		
-	
-
-	
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-
-	
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-
-	
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-
-	
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-
-	
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-
-	
-		
-		
-		
-		
-	
-
-	
-		
-		
-		
-		
-	
-
-	
-		
-	
-
-	
-
-	
-	
-		
-		
-		
-	
-
-	
-	
-	
-
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-		
-	
-
-
+
+
+	
+  
+	
+	
+		
+	
+	
+	
+		
+		
+		
+		
+	
+
+    
+    
+        
+    
+	
+	
+
+	
+		
+	
+
+	
+		
+	
+
+  
+   
+   
+
+   
+    
+   
+   
+
+   
+	   
+	   
+   
+
+   
+	   
+	   
+   
+
+   
+    
+   
+
+  
+  
+    
+  
+
+	
+	
+		
+		
+		
+		
+		
+		
+	
+
+	
+	
+		
+	
+
+	
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+
+	
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+
+	
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+
+	
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+
+	
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+
+	
+		
+		
+		
+		
+	
+
+	
+		
+		
+		
+		
+	
+
+	
+		
+	
+
+	
+
+	
+	
+		
+		
+		
+	
+
+	
+	
+	
+
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+		
+	
+
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/config/winscw.xml
--- a/sbsv2/raptor/lib/config/winscw.xml	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/config/winscw.xml	Mon Nov 16 09:46:46 2009 +0000
@@ -1,143 +1,143 @@
-
-
-	
-	
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-
-		
-		
-			
-		
-		
-		
-
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-
-	
-		
-		
-
-		
-		
-		
-	
-
-	
-		
-		
-
-		
-		
-	
-
-	
-		
-		
-	
-
+
+
+	
+	
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+
+		
+		
+			
+		
+		
+		
+
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+
+	
+		
+		
+
+		
+		
+		
+	
+
+	
+		
+		
+
+		
+		
+	
+
+	
+		
+		
+	
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/analysis.xml
--- a/sbsv2/raptor/lib/flm/analysis.xml	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/analysis.xml	Mon Nov 16 09:46:46 2009 +0000
@@ -1,199 +1,199 @@
-
-
-	
-
-	
-
-		
-
-		
-		
-
-		
-
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-
-	
-		
-		
-		
-		
-					
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-
-	
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-
-	
-
-	
-		
-		
-	
-
-	
-		
-		
-	
-
-	
-		
-		
-	
-
-	
-
-	
-		
-	
-
-	
-	
-
-	
-		
-	
-
-	
-		
-				
-		
-	
-
-	
-		
-			
-		
-	
-
-	
-		
-	
-
-	
-		
-			
-		
-		
-	
-
-	
-		
-			
-		
-		
-	
-
-	
-		
-	
-
-	
-		
-	
-
-	
-		
-		
-		
-		
-		
-		
-	
-
-	
-		
-		
-	
-
-	
-		
-		
-	
-
-	
-		
-	
-
-	
-		
-	
-
-	
-		
-			
-		
-	
-	
-	
-		
-			
-		
-	
-
-	
-	
-
-	
-
-	
-		
-		
-		
-	
-
-	
-
-	
-	
-
-
-
+
+
+	
+
+	
+
+		
+
+		
+		
+
+		
+
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+
+	
+		
+		
+		
+		
+					
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+
+	
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+
+	
+
+	
+		
+		
+	
+
+	
+		
+		
+	
+
+	
+		
+		
+	
+
+	
+
+	
+		
+	
+
+	
+	
+
+	
+		
+	
+
+	
+		
+				
+		
+	
+
+	
+		
+			
+		
+	
+
+	
+		
+	
+
+	
+		
+			
+		
+		
+	
+
+	
+		
+			
+		
+		
+	
+
+	
+		
+	
+
+	
+		
+	
+
+	
+		
+		
+		
+		
+		
+		
+	
+
+	
+		
+		
+	
+
+	
+		
+		
+	
+
+	
+		
+	
+
+	
+		
+	
+
+	
+		
+			
+		
+	
+	
+	
+		
+			
+		
+	
+
+	
+	
+
+	
+
+	
+		
+		
+		
+	
+
+	
+
+	
+	
+
+
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/base.xml
--- a/sbsv2/raptor/lib/flm/base.xml	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/base.xml	Mon Nov 16 09:46:46 2009 +0000
@@ -1,127 +1,127 @@
-
-
-	
-
-	
-		
-	
-	
-	
-		  
-		  
-		 
-		     
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		 
-		   
-		 
-		
-	
-	
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-	
-		
-		
-		
-		
-		
-		
-		
-	
-	
-		
-		
-		
-		
-		
-		
-		
-		
-	
-	
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-	
-		
-	
-	
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-
-
+
+
+	
+
+	
+		
+	
+	
+	
+		  
+		  
+		 
+		     
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		 
+		   
+		 
+		
+	
+	
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+	
+		
+		
+		
+		
+		
+		
+		
+	
+	
+		
+		
+		
+		
+		
+		
+		
+		
+	
+	
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+	
+		
+	
+	
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/bitmap.flm
--- a/sbsv2/raptor/lib/flm/bitmap.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/bitmap.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,182 +1,182 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# Header file exporting Function Like Makefile (FLM)
-# The file destinations  relative to EPOCROOT
-# 
-#
-
-## Parameters that are expected:
-# BMCONV
-# EPOCROOT
-# HEADER
-# OUTPUTPATH
-# SOURCE
-# BMTARGET
-# TARGETPATH
-# BINCOPYDIRS
-
-ifneq ($(TARGETPATH),)
-DATAPATH:=$(subst //,/,$(EPOCROOT)/epoc32/data/z/$(TARGETPATH))
-else
-DATAPATH:=$(subst //,/,$(EPOCROOT)/epoc32/data)
-endif
-CREATABLEPATHS:=$(DATAPATH) $(OUTPUTPATH)
-
-BITMAPFILE:=$(subst //,/,$(DATAPATH)/$(BMTARGET))
-
-# additional binary resource copies performed based on BINCOPYDIRS
-MBMCOPYDIRS:=
-MBMCOPYFILES:=
-ifneq ($(BINCOPYDIRS),)
-  MBMCOPYDIRS:=$(subst //,/,$(patsubst %,%/$(if $(TARGETPATH),/z/$(TARGETPATH),),$(BINCOPYDIRS)))
-  CREATABLEPATHS:=$(CREATABLEPATHS) $(MBMCOPYDIRS)
-  MBMCOPYFILES:=$(subst //,/,$(patsubst %, %/$(notdir $(BITMAPFILE)),$(MBMCOPYDIRS)))
-endif
-
-
-ifneq ($(HEADER),)
-BITMAPHEADER:=$(subst //,/,$(EPOCROOT)/epoc32/include/$(basename $(BMTARGET)).mbg)
-else
-BITMAPHEADER:=
-endif
-
-
-# SOURCE is something like "DEPTH=2 FILE=/var/local/fred.bmp"
-# Extract the file parts for the dependencies.
-# Generate -2/var/local/fred.bmp for the command-line argument.
-SOURCEDEPS:=$(subst //,/,$(subst FILE=,,$(filter FILE=%,$(SOURCE))))
-SOURCEARGS:=$(subst //,/,$(subst DEPTH=,-,$(subst $(CHAR_SPACE)FILE=,,$(SOURCE))))
-
-BMCONVCMDFILE:=$(OUTPUTPATH)/$(BMTARGET)_bmconvcommands
-RELEASEABLES:=$(BITMAPHEADER) $(BITMAPFILE)
-CLEANTARGETS:=$(BITMAPHEADER) $(BITMAPFILE) $(BMCONVCMDFILE)
-
-# The groupbmpin10 macro allows us to construct a command file, 10 
-# bitmap objects at a time to avoid limits on argument lengths and 
-# sizes on Windows.
-define groupbmpin10
-	$(if $1,$(shell echo -e $(foreach L,$(wordlist 1,10,$1),"$(L)\\n") >>$(BMCONVCMDFILE)),)
-	$(if $1,$(call groupbmpin10,$(wordlist 11,$(words $1),$1)))
-endef
-
-GUARD:=$(call sanitise,TARGET_$(BITMAPFILE))
-define generatebitmap
-$(GUARD):=1
-
-BITMAP:: $(RELEASEABLES)
-
-ifneq ($(BITMAPHEADER),)
-$(BITMAPHEADER): $(BITMAPFILE)
-endif
-
-# Create commandfile during parse so that the log is not littered with 
-# these commands in parallel builds.
-$(info )
-$(info $(BMCONVCMDFILE))
-$(shell $(GNUMKDIR) -p "$(dir $(BMCONVCMDFILE))")
-$(if $(BITMAPHEADER),$(shell echo -e "-h$(BITMAPHEADER)\n$(BITMAPFILE)" >$(BMCONVCMDFILE)),$(shell echo "$(BITMAPFILE)" >$(BMCONVCMDFILE)) )
-$(call groupbmpin10, $(SOURCEARGS))
-$(info )
-
-$(BITMAPFILE): $(SOURCEDEPS) $(BMCONV) 
-	$(call startrule,bitmapcompile,FORCESUCCESS) \
-	$(BMCONV) $(BMCONVCMDFILE) \
-	$(call endrule,bitmapcompile)
-
-endef
-
-
-# Some builds require further copies of the generated mbm binaries
-define copybitmap
-
-BITMAP:: $(MBMCOPYFILES)
-
-$(MBMCOPYFILES): $(BITMAPFILE) 
-	$(call startrule,bitmapcopy,FORCESUCCESS) \
-	$(GNUCP) $$< $$@ \
-	$(call endrule,bitmapcopy)
-
-CLEANTARGETS:=$(CLEANTARGETS) $(MBMCOPYFILES)
-endef
-
-
-ifeq ($($(GUARD)),)
-$(eval $(call generatebitmap))
-endif
-
-ifneq ($(MBMCOPYFILES),)
-$(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 makepath,$(CREATABLEPATHS))
-$(call makepathfor,$(BITMAPHEADER))
-
-# for the abld -what target
-BMPRELEASEABLES:=$(RELEASEABLES) $(MBMCOPYFILES) $(BMPCOPYFILES) $(INFOFILE)
-$(eval $(call whatmacro,$(BMPRELEASEABLES),WHATBITMAP))
-
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Header file exporting Function Like Makefile (FLM)
+# The file destinations  relative to EPOCROOT
+# 
+#
+
+## Parameters that are expected:
+# BMCONV
+# EPOCROOT
+# HEADER
+# OUTPUTPATH
+# SOURCE
+# BMTARGET
+# TARGETPATH
+# BINCOPYDIRS
+
+ifneq ($(TARGETPATH),)
+DATAPATH:=$(subst //,/,$(EPOCROOT)/epoc32/data/z/$(TARGETPATH))
+else
+DATAPATH:=$(subst //,/,$(EPOCROOT)/epoc32/data)
+endif
+CREATABLEPATHS:=$(DATAPATH) $(OUTPUTPATH)
+
+BITMAPFILE:=$(subst //,/,$(DATAPATH)/$(BMTARGET))
+
+# additional binary resource copies performed based on BINCOPYDIRS
+MBMCOPYDIRS:=
+MBMCOPYFILES:=
+ifneq ($(BINCOPYDIRS),)
+  MBMCOPYDIRS:=$(subst //,/,$(patsubst %,%/$(if $(TARGETPATH),/z/$(TARGETPATH),),$(BINCOPYDIRS)))
+  CREATABLEPATHS:=$(CREATABLEPATHS) $(MBMCOPYDIRS)
+  MBMCOPYFILES:=$(subst //,/,$(patsubst %, %/$(notdir $(BITMAPFILE)),$(MBMCOPYDIRS)))
+endif
+
+
+ifneq ($(HEADER),)
+BITMAPHEADER:=$(subst //,/,$(EPOCROOT)/epoc32/include/$(basename $(BMTARGET)).mbg)
+else
+BITMAPHEADER:=
+endif
+
+
+# SOURCE is something like "DEPTH=2 FILE=/var/local/fred.bmp"
+# Extract the file parts for the dependencies.
+# Generate -2/var/local/fred.bmp for the command-line argument.
+SOURCEDEPS:=$(subst //,/,$(subst FILE=,,$(filter FILE=%,$(SOURCE))))
+SOURCEARGS:=$(subst //,/,$(subst DEPTH=,-,$(subst $(CHAR_SPACE)FILE=,,$(SOURCE))))
+
+BMCONVCMDFILE:=$(OUTPUTPATH)/$(BMTARGET)_bmconvcommands
+RELEASEABLES:=$(BITMAPHEADER) $(BITMAPFILE)
+CLEANTARGETS:=$(BITMAPHEADER) $(BITMAPFILE) $(BMCONVCMDFILE)
+
+# The groupbmpin10 macro allows us to construct a command file, 10 
+# bitmap objects at a time to avoid limits on argument lengths and 
+# sizes on Windows.
+define groupbmpin10
+	$(if $1,$(shell echo -e $(foreach L,$(wordlist 1,10,$1),"$(L)\\n") >>$(BMCONVCMDFILE)),)
+	$(if $1,$(call groupbmpin10,$(wordlist 11,$(words $1),$1)))
+endef
+
+GUARD:=$(call sanitise,TARGET_$(BITMAPFILE))
+define generatebitmap
+$(GUARD):=1
+
+BITMAP:: $(RELEASEABLES)
+
+ifneq ($(BITMAPHEADER),)
+$(BITMAPHEADER): $(BITMAPFILE)
+endif
+
+# Create commandfile during parse so that the log is not littered with 
+# these commands in parallel builds.
+$(info )
+$(info $(BMCONVCMDFILE))
+$(shell $(GNUMKDIR) -p "$(dir $(BMCONVCMDFILE))")
+$(if $(BITMAPHEADER),$(shell echo -e "-h$(BITMAPHEADER)\n$(BITMAPFILE)" >$(BMCONVCMDFILE)),$(shell echo "$(BITMAPFILE)" >$(BMCONVCMDFILE)) )
+$(call groupbmpin10, $(SOURCEARGS))
+$(info )
+
+$(BITMAPFILE): $(SOURCEDEPS) $(BMCONV) 
+	$(call startrule,bitmapcompile,FORCESUCCESS) \
+	$(BMCONV) $(BMCONVCMDFILE) \
+	$(call endrule,bitmapcompile)
+
+endef
+
+
+# Some builds require further copies of the generated mbm binaries
+define copybitmap
+
+BITMAP:: $(MBMCOPYFILES)
+
+$(MBMCOPYFILES): $(BITMAPFILE) 
+	$(call startrule,bitmapcopy,FORCESUCCESS) \
+	$(GNUCP) $$< $$@ \
+	$(call endrule,bitmapcopy)
+
+CLEANTARGETS:=$(CLEANTARGETS) $(MBMCOPYFILES)
+endef
+
+
+ifeq ($($(GUARD)),)
+$(eval $(call generatebitmap))
+endif
+
+ifneq ($(MBMCOPYFILES),)
+$(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 makepath,$(CREATABLEPATHS))
+$(call makepathfor,$(BITMAPHEADER))
+
+# for the abld -what target
+BMPRELEASEABLES:=$(RELEASEABLES) $(MBMCOPYFILES) $(BMPCOPYFILES) $(INFOFILE)
+$(eval $(call whatmacro,$(BMPRELEASEABLES),WHATBITMAP))
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/booleanlogic.mk
--- a/sbsv2/raptor/lib/flm/booleanlogic.mk	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/booleanlogic.mk	Mon Nov 16 09:46:46 2009 +0000
@@ -1,61 +1,61 @@
-#
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# operators for boolean logic, including a case 
-# sensitive equality operator
-#
-
-
-define not
-$(if $1,,1)
-endef
-
-define xor
-$(and $(or $1,$2),$(call not,$1,$2))
-endef
-
-define equal
-$(if $(1:$(2)=),,$(if $(2:$(1)=),,1))
-endef
-
-define equal_debug
-$(info equal $1 $2 )$(if $(1:$(2)=),,$(if $(2:$(1)=),,1))
-endef
-
-# $(call isoneof,fred, alice bob james fred joe)  # returns 1
-define isoneof
-$(if $2,$(or $(call equal,$1,$(word 1,$2)),$(call isoneof,$(1),$(wordlist 2,$(words $(2)),$(2)))),)
-endef
-
-define isoneof_debug
-$(info one:$1 LIST: $2 nextCAR: $(word 1,$2) nextCDR: $(wordlist 2,$(words $2),$2))$(if $2,$(or $(call equal,$1,$(word 1,$2)),$(call isoneof,$(1),$(wordlist 2,$(words $(2)),$(2)))),)
-endef
-
-#testboolean::
-#	@echo -e "(call equal,dll,dll)            :  $(call equal,dll,dll)"
-#	@echo -e "(call equal,,dll)               :  $(call equal,,dll)"
-#	@echo -e "(call equal,thingdllthing,dll)  :  $(call equal,thingdllthing,dll)"
-#	@echo -e "(call equal,dll,thingdllthing)  :  $(call equal,dll,thingdllthing)"
-#	@echo -e "(call equal,dll,)               :  $(call equal,dll,)"
-#	@echo -e "(call equal,,)                  :  $(call equal,,)"
-#	@echo -e "(call equal,dlldlldll,dll)      :  $(call equal,dlldlldll,dll)"
-#	@echo -e "(call equal,dll,dlldlldll)      :  $(call equal,dll,dlldlldll)"
-#	@echo ""
-#	@echo -e '(call isoneof,fred, nobby cheery fred detritus ) :  $(call isoneof,fred, nobby cheery fred detritus) '
-#	@echo -e '(call isoneof,nobby, cheery fred carrot angiur)  :  $(call isoneof,nobby, cheery fred carrot angiur) '
-#	@echo -e '(call isoneof,vimes,vetinari) :  $(call isoneof,vimes,vetinari) '
-#	@echo -e '(call isoneof,vetinari,) :  $(call isoneof,vetinari,) '
-#	@echo -e '(call isoneof,vetinari,vetinari) :  $(call isoneof,vetinari,vetinari) '
-
-
+#
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# operators for boolean logic, including a case 
+# sensitive equality operator
+#
+
+
+define not
+$(if $1,,1)
+endef
+
+define xor
+$(and $(or $1,$2),$(call not,$1,$2))
+endef
+
+define equal
+$(if $(1:$(2)=),,$(if $(2:$(1)=),,1))
+endef
+
+define equal_debug
+$(info equal $1 $2 )$(if $(1:$(2)=),,$(if $(2:$(1)=),,1))
+endef
+
+# $(call isoneof,fred, alice bob james fred joe)  # returns 1
+define isoneof
+$(if $2,$(or $(call equal,$1,$(word 1,$2)),$(call isoneof,$(1),$(wordlist 2,$(words $(2)),$(2)))),)
+endef
+
+define isoneof_debug
+$(info one:$1 LIST: $2 nextCAR: $(word 1,$2) nextCDR: $(wordlist 2,$(words $2),$2))$(if $2,$(or $(call equal,$1,$(word 1,$2)),$(call isoneof,$(1),$(wordlist 2,$(words $(2)),$(2)))),)
+endef
+
+#testboolean::
+#	@echo -e "(call equal,dll,dll)            :  $(call equal,dll,dll)"
+#	@echo -e "(call equal,,dll)               :  $(call equal,,dll)"
+#	@echo -e "(call equal,thingdllthing,dll)  :  $(call equal,thingdllthing,dll)"
+#	@echo -e "(call equal,dll,thingdllthing)  :  $(call equal,dll,thingdllthing)"
+#	@echo -e "(call equal,dll,)               :  $(call equal,dll,)"
+#	@echo -e "(call equal,,)                  :  $(call equal,,)"
+#	@echo -e "(call equal,dlldlldll,dll)      :  $(call equal,dlldlldll,dll)"
+#	@echo -e "(call equal,dll,dlldlldll)      :  $(call equal,dll,dlldlldll)"
+#	@echo ""
+#	@echo -e '(call isoneof,fred, nobby cheery fred detritus ) :  $(call isoneof,fred, nobby cheery fred detritus) '
+#	@echo -e '(call isoneof,nobby, cheery fred carrot angiur)  :  $(call isoneof,nobby, cheery fred carrot angiur) '
+#	@echo -e '(call isoneof,vimes,vetinari) :  $(call isoneof,vimes,vetinari) '
+#	@echo -e '(call isoneof,vetinari,) :  $(call isoneof,vetinari,) '
+#	@echo -e '(call isoneof,vetinari,vetinari) :  $(call isoneof,vetinari,vetinari) '
+
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/build.flm
--- a/sbsv2/raptor/lib/flm/build.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/build.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,75 +1,75 @@
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-#
-
-# Parameters:
-# COMPONENT_PATHS
-# CONFIGS
-#
-
-CREATABLEPATHS:=
-CLEANTARGETS:=
-
-.PHONY:: PP_EXPORTS
-
-
-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#' \
-	$(call endrule,makefile_generation_exports)
-
-CLEANTARGETS:=$$(CLEANTARGETS) $(SBS_BUILD_DIR)/makefiles_export.mk
-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 
-	$(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 \
-	$(call endrule,makefile_generation)
-
-CLEANTARGETS:=$$(CLEANTARGETS) $(MAKEFILE_PATH) 
-
-endef
-
-# Create config list for commands
-config_list:=$(addprefix -c ,$(CONFIGS))
-component_list:=$(addprefix -b ,$(COMPONENT_PATHS))
-$(info COMFIG_LIST: $(config_list))
-
-$(eval $(doexports))
-
-# Create the Makefiles
-$(eval $(call generate_makefiles))
-
-$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS),$(CREATABLEPATHS),))
-$(call makepath,$(CREATABLEPATHS))
-
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+#
+
+# Parameters:
+# COMPONENT_PATHS
+# CONFIGS
+#
+
+CREATABLEPATHS:=
+CLEANTARGETS:=
+
+.PHONY:: PP_EXPORTS
+
+
+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#' \
+	$(call endrule,makefile_generation_exports)
+
+CLEANTARGETS:=$$(CLEANTARGETS) $(SBS_BUILD_DIR)/makefiles_export.mk
+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 
+	$(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 \
+	$(call endrule,makefile_generation)
+
+CLEANTARGETS:=$$(CLEANTARGETS) $(MAKEFILE_PATH) 
+
+endef
+
+# Create config list for commands
+config_list:=$(addprefix -c ,$(CONFIGS))
+component_list:=$(addprefix -b ,$(COMPONENT_PATHS))
+$(info COMFIG_LIST: $(config_list))
+
+$(eval $(doexports))
+
+# Create the Makefiles
+$(eval $(call generate_makefiles))
+
+$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS),$(CREATABLEPATHS),))
+$(call makepath,$(CREATABLEPATHS))
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/build.xml
--- a/sbsv2/raptor/lib/flm/build.xml	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/build.xml	Mon Nov 16 09:46:46 2009 +0000
@@ -1,14 +1,14 @@
-
-
-
-	
-		 
-		 
-		
-		
-		
-		
-		
-	
-
-
+
+
+
+	
+		 
+		 
+		
+		
+		
+		
+		
+	
+
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/config.xml
--- a/sbsv2/raptor/lib/flm/config.xml	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/config.xml	Mon Nov 16 09:46:46 2009 +0000
@@ -1,13 +1,13 @@
-
-
-	
-
-	
-		
-		
-		
-	
-
-
+
+
+	
+
+	
+		
+		
+		
+	
+
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/config/default.flm
--- a/sbsv2/raptor/lib/flm/config/default.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/config/default.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,61 +1,61 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# config/default.flm
-# Default build-configuration-wide rules and dependencies.
-# 
-#
-
-# put things in here that depend on EPOCROOT and 
-# therefore cannot go in globals.mk
-
-# metaflm depends on variables set in the configuration
-include $(FLMHOME)/metaflm.mk
-
-# TEM dependencies
-EPOC32BUILD:=$(EPOCROOT)/epoc32/build
-
-.PHONY:: $(EPOC32BUILD)/TEM_MAKMAKE
-.PHONY:: $(EPOC32BUILD)/TEM_RESOURCE
-.PHONY:: $(EPOC32BUILD)/TEM_BLD
-.PHONY:: $(EPOC32BUILD)/TEM_FINAL
-
-$(EPOC32BUILD)/TEM_MAKMAKE:: EXPORT
-$(EPOC32BUILD)/TEM_RESOURCE:: $(EPOC32BUILD)/TEM_MAKMAKE
-$(EPOC32BUILD)/TEM_BLD:: $(EPOC32BUILD)/TEM_LIB
-$(EPOC32BUILD)/TEM_FINAL:: $(EPOC32BUILD)/TEM_BLD
-
-# Make engines with order only prerequisites should use them
-# other engines can use a simulation
-#
-ifneq ($(HAVE_ORDERONLY),)
-.PHONY:: $(EPOC32BUILD)/TEM_LIB
-
-$(EPOC32BUILD)/TEM_LIB:: $(EPOC32BUILD)/TEM_RESOURCE
-
-else
-# Set up some rules that will simulate order only behaviour on all
-# make engines:
-
-define predatedupdate
-	@touch --date='10 years ago' "$1"
-endef
-
-# This one is non-phony because it's the only one that 
-# anything actually depends upon in a purely incremental build.
-$(EPOC32BUILD)/TEM_LIB:: $(EPOC32BUILD)/TEM_RESOURCE
-	$(call predatedupdate,$@)
-endif
-
-# Optionally include user configuration if it exists.
--include $(FLMHOME)/user/default.flm
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# config/default.flm
+# Default build-configuration-wide rules and dependencies.
+# 
+#
+
+# put things in here that depend on EPOCROOT and 
+# therefore cannot go in globals.mk
+
+# metaflm depends on variables set in the configuration
+include $(FLMHOME)/metaflm.mk
+
+# TEM dependencies
+EPOC32BUILD:=$(EPOCROOT)/epoc32/build
+
+.PHONY:: $(EPOC32BUILD)/TEM_MAKMAKE
+.PHONY:: $(EPOC32BUILD)/TEM_RESOURCE
+.PHONY:: $(EPOC32BUILD)/TEM_BLD
+.PHONY:: $(EPOC32BUILD)/TEM_FINAL
+
+$(EPOC32BUILD)/TEM_MAKMAKE:: EXPORT
+$(EPOC32BUILD)/TEM_RESOURCE:: $(EPOC32BUILD)/TEM_MAKMAKE
+$(EPOC32BUILD)/TEM_BLD:: $(EPOC32BUILD)/TEM_LIB
+$(EPOC32BUILD)/TEM_FINAL:: $(EPOC32BUILD)/TEM_BLD
+
+# Make engines with order only prerequisites should use them
+# other engines can use a simulation
+#
+ifneq ($(HAVE_ORDERONLY),)
+.PHONY:: $(EPOC32BUILD)/TEM_LIB
+
+$(EPOC32BUILD)/TEM_LIB:: $(EPOC32BUILD)/TEM_RESOURCE
+
+else
+# Set up some rules that will simulate order only behaviour on all
+# make engines:
+
+define predatedupdate
+	@touch --date='10 years ago' "$1"
+endef
+
+# This one is non-phony because it's the only one that 
+# anything actually depends upon in a purely incremental build.
+$(EPOC32BUILD)/TEM_LIB:: $(EPOC32BUILD)/TEM_RESOURCE
+	$(call predatedupdate,$@)
+endif
+
+# Optionally include user configuration if it exists.
+-include $(FLMHOME)/user/default.flm
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/converged-comms/createcommdbs.flm
--- a/sbsv2/raptor/lib/flm/converged-comms/createcommdbs.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/converged-comms/createcommdbs.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,60 +1,60 @@
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-# FLM to build CommDB databases using CED.
-
-DBDONE:=$(EPOCBLD)/CommDb_$(PLATFORM)_$(CFG).done
-$(call makepathfor,$(DBDONE))
-
-# remember the name of the .done file so that we can make the FINAL stage of
-# installdefaultcommdb.flm depend on it
-CommDb_$(PLATFORM)_$(CFG)_done:=$(DBDONE)
-
-# macro for all the rules
-define createcommdbs
-
-FINAL:: $(DBDONE)
-
-$(DBDONE): TARGET
-	$(call startrule,createcommdbs) \
-	$(PERL) $(EXTENSION_ROOT)/createcommdbs.pl --command=build --platform=$(PLATFORM) --variant=$(CFG) --sourceDir=$(EXTENSION_ROOT)/$(SRCDIR) --platsec && \
-	touch $(DBDONE) \
-	$(call endrule,createcommdbs)
-
-CLEAN:: 
-	$(call startrule,clean) \
-	$(PERL) $(EXTENSION_ROOT)/createcommdbs.pl --command=clean --platform=$(PLATFORM) --variant=$(CFG) --sourceDir=$(EXTENSION_ROOT)/$(SRCDIR) --platsec && \
-	rm -f $(DBDONE) \
-	$(call endrule,clean)
-
-RELEASABLES:: 
-	@$(PERL) $(EXTENSION_ROOT)/createcommdbs.pl --command=releasables --platform=$(PLATFORM) --variant=$(CFG) --sourceDir=$(EXTENSION_ROOT)/$(SRCDIR) --platsec
-
-ifeq ($(WHATLOG),TRUE)
-FINAL::
-	@ { echo "" ; \
-	$(PERL) $(EXTENSION_ROOT)/createcommdbs.pl --command=releasables --platform=$(PLATFORM) --variant=$(CFG) --sourceDir=$(EXTENSION_ROOT)/$(SRCDIR) --platsec | \
-	(read -r LINE; while [ $$$$? -eq 0 ]; do \
-	echo "$$$$LINE"; \
-	read -r LINE; done; ); \
-	echo ""; } \
-	$(if $(DESCRAMBLE),2>&1 | $(DESCRAMBLE))
-endif
-
-endef
-
-# expand
-$(eval $(createcommdbs))
-
+# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+# FLM to build CommDB databases using CED.
+
+DBDONE:=$(EPOCBLD)/CommDb_$(PLATFORM)_$(CFG).done
+$(call makepathfor,$(DBDONE))
+
+# remember the name of the .done file so that we can make the FINAL stage of
+# installdefaultcommdb.flm depend on it
+CommDb_$(PLATFORM)_$(CFG)_done:=$(DBDONE)
+
+# macro for all the rules
+define createcommdbs
+
+FINAL:: $(DBDONE)
+
+$(DBDONE): TARGET
+	$(call startrule,createcommdbs) \
+	$(PERL) $(EXTENSION_ROOT)/createcommdbs.pl --command=build --platform=$(PLATFORM) --variant=$(CFG) --sourceDir=$(EXTENSION_ROOT)/$(SRCDIR) --platsec && \
+	touch $(DBDONE) \
+	$(call endrule,createcommdbs)
+
+CLEAN:: 
+	$(call startrule,clean) \
+	$(PERL) $(EXTENSION_ROOT)/createcommdbs.pl --command=clean --platform=$(PLATFORM) --variant=$(CFG) --sourceDir=$(EXTENSION_ROOT)/$(SRCDIR) --platsec && \
+	rm -f $(DBDONE) \
+	$(call endrule,clean)
+
+RELEASABLES:: 
+	@$(PERL) $(EXTENSION_ROOT)/createcommdbs.pl --command=releasables --platform=$(PLATFORM) --variant=$(CFG) --sourceDir=$(EXTENSION_ROOT)/$(SRCDIR) --platsec
+
+ifeq ($(WHATLOG),TRUE)
+FINAL::
+	@ { echo "" ; \
+	$(PERL) $(EXTENSION_ROOT)/createcommdbs.pl --command=releasables --platform=$(PLATFORM) --variant=$(CFG) --sourceDir=$(EXTENSION_ROOT)/$(SRCDIR) --platsec | \
+	(read -r LINE; while [ $$$$? -eq 0 ]; do \
+	echo "$$$$LINE"; \
+	read -r LINE; done; ); \
+	echo ""; } \
+	$(if $(DESCRAMBLE),2>&1 | $(DESCRAMBLE))
+endif
+
+endef
+
+# expand
+$(eval $(createcommdbs))
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/converged-comms/installdefaultcommdb.flm
--- a/sbsv2/raptor/lib/flm/converged-comms/installdefaultcommdb.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/converged-comms/installdefaultcommdb.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,49 +1,49 @@
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-# FLM to install CommDB databases created using CED.
-
-# macro for all the rules
-define installdefaultcommdb
-
-FINAL:: $(CommDb_$(PLATFORM)_$(CFG)_done)
-	$(call startrule,installdefaultcommdb) \
-	$(PERL) $(EXTENSION_ROOT)/installdefaultcommdb.pl --command=build --platform=$(PLATFORM) --variant=$(CFG) --platsec \
-	$(call endrule,installdefaultcommdb)
-
-CLEAN:: 
-	$(call startrule,clean) \
-	$(PERL) $(EXTENSION_ROOT)/installdefaultcommdb.pl --command=clean --platform=$(PLATFORM) --variant=$(CFG) --platsec \
-	$(call endrule,clean)
-
-RELEASABLES::
-	@$(PERL) $(EXTENSION_ROOT)/installdefaultcommdb.pl --command=releasables --platform=$(PLATFORM) --variant=$(CFG) --platsec
-
-ifeq ($(WHATLOG),TRUE)
-FINAL::
-	@ { echo "" ; \
-	$(PERL) $(EXTENSION_ROOT)/installdefaultcommdb.pl --command=releasables --platform=$(PLATFORM) --variant=$(CFG) --platsec | \
-	(read -r LINE; while [ $$$$? -eq 0 ]; do \
-	echo "$$$$LINE"; \
-	read -r LINE; done; ); \
-	echo ""; } \
-	$(if $(DESCRAMBLE),2>&1 | $(DESCRAMBLE))
-endif
-
-endef
-
-# expand
-$(eval $(installdefaultcommdb))
-
+# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+# FLM to install CommDB databases created using CED.
+
+# macro for all the rules
+define installdefaultcommdb
+
+FINAL:: $(CommDb_$(PLATFORM)_$(CFG)_done)
+	$(call startrule,installdefaultcommdb) \
+	$(PERL) $(EXTENSION_ROOT)/installdefaultcommdb.pl --command=build --platform=$(PLATFORM) --variant=$(CFG) --platsec \
+	$(call endrule,installdefaultcommdb)
+
+CLEAN:: 
+	$(call startrule,clean) \
+	$(PERL) $(EXTENSION_ROOT)/installdefaultcommdb.pl --command=clean --platform=$(PLATFORM) --variant=$(CFG) --platsec \
+	$(call endrule,clean)
+
+RELEASABLES::
+	@$(PERL) $(EXTENSION_ROOT)/installdefaultcommdb.pl --command=releasables --platform=$(PLATFORM) --variant=$(CFG) --platsec
+
+ifeq ($(WHATLOG),TRUE)
+FINAL::
+	@ { echo "" ; \
+	$(PERL) $(EXTENSION_ROOT)/installdefaultcommdb.pl --command=releasables --platform=$(PLATFORM) --variant=$(CFG) --platsec | \
+	(read -r LINE; while [ $$$$? -eq 0 ]; do \
+	echo "$$$$LINE"; \
+	read -r LINE; done; ); \
+	echo ""; } \
+	$(if $(DESCRAMBLE),2>&1 | $(DESCRAMBLE))
+endif
+
+endef
+
+# expand
+$(eval $(installdefaultcommdb))
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/e32abiv2.flm
--- a/sbsv2/raptor/lib/flm/e32abiv2.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,1178 +1,1194 @@
-# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# ARMv5 EXE/DLL ABIv2 Function Like Makefile (FLM)
-# Knows how to build all possible ABIV2 executables for ARM
-#
-#
-
-# Only build feature invariant binaries in non-product builds *and*
-# Only build feature variant binaries in product builds.
-#
-# FEATUREVARIANTNAME != "" implies product build
-# FEATUREVARIANT == 1 implies a feature variant binary
-#
-# test FEATUREVARIANTNAME=="" or FEATUREVARIANT==1
-#
-ifneq ($(or $(call equal,$(FEATUREVARIANTNAME),),$(call equal,$(FEATUREVARIANT),1)),)
-
-$(if $(FLMDEBUG),$(info ))
-
-# Strip switch-type parameters
-#
-POSTLINKTARGETTYPE:=$(strip $(POSTLINKTARGETTYPE))
-UID1:=$(strip $(UID1))
-UID2:=$(strip $(UID2))
-UID3:=$(strip $(UID3))
-SID:=$(strip $(SECUREID))
-VENDORID:=$(strip $(VENDORID))
-AUTOEXPORTS:=$(strip $(AUTOEXPORTS))
-DEFFILE:=$(strip $(DEFFILE))
-IMPORTLIBRARYREQUIRED:=$(strip $(IMPORTLIBRARYREQUIRED))
-EPOCALLOWDLLDATA:=$(strip $(EPOCALLOWDLLDATA))
-PAGED:=$(strip $(PAGED))
-
-# the output directories
-VARIANTPLATFORM:=$(VARIANTPLATFORM)$(FEATUREVARIANTNAME)
-RELEASABLEPATH:=$(RELEASEPATH)/$(VARIANTPLATFORM)/$(VARIANTTYPE)
-INTERMEDIATEPATH:=$(OUTPUTPATH)/$(VARIANTPLATFORM)/$(VARIANTTYPE)
-INTERMEDIATE_PLATFORM_PATH:=$(OUTPUTPATH)/$(VARIANTPLATFORM)
-TRACE_MARKER_PATH:=$(OUTPUTPATH)
-IMPORTLIBPATH:=$(RUNTIME_LIBS_PATH)
-
-# LOCALLY USED VARIABLES
-CLEANTARGETS:=
-WHATRELEASE:=
-
-# Work out which new/delete library to use for binaries.
-CHECKLIB_TYPE:=symc++
-STDCPPTAGFILE:=
-ifeq ($(NOSTDCPP),1)
-  ifeq ($(STDCPP),1)
-    $(info STDCPP and NOSTDCPP both specified in $(PROJECT_META))
-  else
-    ifeq ($(HAS_DEDICATED_OP_NEWDEL_LIB),1)
-      DEFAULT_NEWLIB:=$(DEFAULT_SYMBIAN_NEWLIB)
-    endif
-  endif
-else
-  ifeq ($(STDCPP),1)
-    CDEFS:=$(CDEFS) __SYMBIAN_STDCPP_SUPPORT__
-    ifneq ($(SUPPORTS_STDCPP_NEWLIB),)
-      ifeq ($(HAS_DEDICATED_OP_NEWDEL_LIB),1)
-        DEFAULT_NEWLIB:=$(DEFAULT_STDCPP_NEWLIB)
-      endif
-      CHECKLIB_TYPE:=stdc++
-      STDCPPTAGFILE:=$(EPOCROOT)/epoc32/tools/tag/tag_elf
-    endif
-  endif
-endif
-
-# If NEWLIB is specified in the MMP file, it overrides all the past stuff.
-ifeq ($(NEWLIB),)
-  NEWLIB:=$(DEFAULT_NEWLIB)
-endif
-
-
-##########################################################################
-## OUTPUTS - externally relevant targets that this FLM generates
-
-
-ifeq ($(EXPORTLIBRARY),)
-  EXPORTLIBRARY:=$(TARGET)
-endif
-
-# This will insert the file version between the name and the extension.
-# If there is more than one dot in generated filename the inserted position will be
-# BEFORE the last but two dot. E.g name1.name2.name3.dll to name1.name2{version}.name3.dll
-LIBEXT:=$(lastword $(subst .,$(CHAR_SPACE) ,$(EXPORTLIBRARY)))
-LIBBASE:=$(patsubst %.$(LIBEXT),%,$(EXPORTLIBRARY))
-ifneq ($(findstring .,$(EXPORTLIBRARY)),)
-  # Please note $(EXPORTLIBRARY) doesn't include target type.
-  VER_E32IMPORTLIBBASE:=$(IMPORTLIBPATH)/$(LIBBASE){$(VERSIONHEX)}.$(LIBEXT)
-else
-  VER_E32IMPORTLIBBASE:=$(IMPORTLIBPATH)/$(EXPORTLIBRARY){$(VERSIONHEX)}
-endif
-
-# Postlinkable targets need to be linked and elf2e32'd
-ifneq ($(DOPOSTLINK),)
-    E32TARGET:=$(RELEASABLEPATH)/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE))
-    LINK_TARGET:=$(RELEASABLEPATH)/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE)).sym
-    MAPFILE:=$(RELEASABLEPATH)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE)).map
-else
-  E32TARGET:=
-  LINK_TARGET:=
-  MAPFILE:=
-endif
-
-# libs and klibs, on the other hand need to be archived
-ifneq ($(call isoneof,$(TARGETTYPE),lib klib stdlib),)
-  ARTARGET:=$(RELEASABLEPATH)/$(TARGET).lib
-  # We need libs and klibs before we can link stuff with them:
-  LIBRARY:: $(ARTARGET)
-else
-  ARTARGET:=
-endif
-
-
-ifneq ($(IMPORTLIBRARYREQUIRED),) # no dso files for plugins, animation dlls etc
-  # make sure we don't build import libraries more than once for UDEB and UREL
-  # Without this, wierd target-specific variable problems happen with LIBRARY in particular
-
-  TMP_IMPORTLIBTARGET_ROOT:=$(IMPORTLIBPATH)/$(EXPORTLIBRARY)
-
-  # ABIv2 .dso
-  IMPORTLIBTARGET_DSO:=
-  IMPORTLIBTARGETVERSIONED_DSO:=
-
-  BUILDMARKER_IMPORTLIBTARGET_DSO:=TARGET_$(subst :,,$(VER_E32IMPORTLIBBASE)).dso
-  WHATRELEASE:=$(WHATRELEASE) $(if $(EXPLICITVERSION),,$(TMP_IMPORTLIBTARGET_ROOT).dso)
-  WHATRELEASE:=$(WHATRELEASE) $(VER_E32IMPORTLIBBASE).dso
-  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)
-  IMPORTLIBTARGET_LIB:=
-  IMPORTLIBTARGETVERSIONED_LIB:=
-  BUILDMARKER_IMPORTLIBTARGET_LIB:=TARGET_$(subst :,,$(VER_E32IMPORTLIBBASE)).lib
-  # Only for builds that require and support them, and only on windows
-  ifeq ($(OSTYPE),cygwin)
-  ifeq ($(GENERATE_ABIV1_IMPLIBS),1)
-    WHATRELEASE:=$(WHATRELEASE) $(if $(EXPLICITVERSION),,$(TMP_IMPORTLIBTARGET_ROOT).lib)
-    WHATRELEASE:=$(WHATRELEASE) $(VER_E32IMPORTLIBBASE).lib
-    ifeq ($($(BUILDMARKER_IMPORTLIBTARGET_LIB)),)
-      IMPORTLIBTARGET_LIB:=$(TMP_IMPORTLIBTARGET_ROOT).lib
-      IMPORTLIBTARGETVERSIONED_LIB:=$(VER_E32IMPORTLIBBASE).lib
-      $(eval $(BUILDMARKER_IMPORTLIBTARGET_LIB):=1)
-    endif
-  endif
-  endif
-endif
-
-# Try to make sure that we get the right linkas name
-# If linkas is specified then split it up and
-# put the hex version number in the right place
-ifeq ($(LINKAS),)
-  LINKASNAME=$(TARGET)
-  LINKASTYPE=$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE))
-else
-  SPLIT_LINKAS=$(subst ., ,$(LINKAS))
-  LINKASNAME=$(word 1,$(SPLIT_LINKAS))
-  LINKASTYPE=$(word 2,$(SPLIT_LINKAS))
-endif
-
-# ignore UID3 if it is zero
-ifeq ($(UID3),00000000)
-  LINKASVERSIONED=$(LINKASNAME){$(VERSIONHEX)}.$(LINKASTYPE)
-else
-  LINKASVERSIONED=$(LINKASNAME){$(VERSIONHEX)}$(if $(UID3),[$(UID3)],).$(LINKASTYPE)
-endif
-
-##########################################################################
-## TARGET GROUPS ##
-RELEASABLES:=$(strip $(E32TARGET) $(ARTARGET) $(LINK_TARGET) $(MAPFILE))
-# More targets to be added later
-TARGETS:=$(strip $(E32TARGET) $(IMPORTLIBTARGET) $(LINK_TARGET) $(ARTARGET))
-
-CREATABLEPATHS:=$(OUTPUTPATH)
-CREATABLEPATHS:=$(CREATABLEPATHS) $(INTERMEDIATE_PLATFORM_PATH)
-CREATABLEPATHS:=$(CREATABLEPATHS) $(INTERMEDIATEPATH)
-CREATABLEPATHS:=$(CREATABLEPATHS) $(RELEASABLEPATH)
-CREATABLEPATHS:=$(CREATABLEPATHS) $(RUNTIME_LIBS_PATH)
-CREATABLEPATHS:=$(CREATABLEPATHS) $(IMPORTLIBPATH)
-WHATRELEASE:=$(WHATRELEASE) $(RELEASABLES)
-
-
-
-## HIGH LEVEL Targets ##
-.PHONY:: $(ALLTARGET)
-
-## GLOBAL TARGETS ############################################################
-$(ALLTARGET):: $(RELEASABLES)
-TARGET:: $(RELEASABLES)
-
-## Internal targets ##
-
-# Determine the name of the generated DSO file ###############################
-# This is to generate the dso with the Some{Versionhex}.file.dso
-# It reproduces what appears to be a problem in the current build system
-# that affects messageintercept{000a0000}.esockdebug.dso whose
-# filename differs from it's "linkas" name.
-E32VAR:=$(subst .,$(CHAR_SPACE) ,$(TARGET))
-E32SOME:=$(word 1,$(E32VAR))
-E32VAR2:=$(patsubst $(E32SOME).%,%,$(TARGET))
-
-# Separate '_SH' variables created for output into bash - Preserves '{' and '}'
-
-ifneq ($(findstring .,$(TARGET)),)
-	DSODEFFILENAMEBASE:=$(E32SOME){$(VERSIONHEX)}.$(E32VAR2)
-else
-	DSODEFFILENAMEBASE:=$(TARGET){$(VERSIONHEX)}
-endif
-GENERATED_DSO:=$(call dblquote,$(INTERMEDIATEPATH)/$(DSODEFFILENAMEBASE).dso)
-GENERATED_DEFFILE:=$(call dblquote,$(INTERMEDIATEPATH)/$(DSODEFFILENAMEBASE).def)
-
-## IMPORT LIBRARY  ###########################################################
-
-# Static libraries will be postlinked when they are used so don't try to postlink them
-
-ifneq ($(IMPORTLIBRARYREQUIRED),)
-ifneq ($(or $(DEFFILE),$(EXPORTUNFROZEN)),)
-# Both ABIv2 .dso and ABIv1 .lib import library generation require a processed .def file,
-# unless EXPORTUNFROZEN is being used
-PREPPEDDEFFILE:=
-ifneq ($(DEFFILE),)
-  ifeq ($(EXPORTUNFROZEN),)
-    PREPPEDDEFFILE:=$(INTERMEDIATEPATH)/$(TARGET).prep
-    CLEANTARGETS:=$(CLEANTARGETS) $(PREPPEDDEFFILE)
-    define importlibtarget_prepfile
-      $(PREPPEDDEFFILE): $(DEFFILE)
-		$(call startrule,importlibtarget_prepfile,FORCESUCCESS) \
-		$(PREPDEF) $(call dblquote,$(DEFFILE)) $(call dblquote,$(PREPPEDDEFFILE)) \
-		$(call endrule,importlibtarget_prepfile)
-    endef
-    $(eval $(importlibtarget_prepfile))
-  endif
-endif
-
-# ABIv2 .dso
-ifneq ($(IMPORTLIBTARGET_DSO),) # check that we haven't tried to specify this target already
-
-  ifneq ($(EXPLICITVERSION),)
-    TARGETS:=$(strip $(TARGETS) $(IMPORTLIBTARGETVERSIONED_DSO))
-
-    # Add this importlibrary to our global targets
-    LIBRARY:: $(IMPORTLIBTARGETVERSIONED_DSO)
-    $(ALLTARGET):: $(IMPORTLIBTARGETVERSIONED_DSO)
-    TARGET:: $(IMPORTLIBTARGETVERSIONED_DSO)
-
-  else
-    TARGETS:=$(strip $(TARGETS) $(IMPORTLIBTARGETVERSIONED_DSO) $(IMPORTLIBTARGET_DSO))
-
-    # Add this importlibrary to our global targets
-    LIBRARY:: $(IMPORTLIBTARGET_DSO)
-    $(ALLTARGET):: $(IMPORTLIBTARGETVERSIONED_DSO) $(IMPORTLIBTARGET_DSO)
-    TARGET:: $(IMPORTLIBTARGETVERSIONED_DSO) $(IMPORTLIBTARGET_DSO)
-
-
-  endif
-
-
-
-  ifneq ($(EXPORTUNFROZEN),) # Unfrozen  - warn and create .dso as side-effect of the final postlink
-    $(info EXPORTUNFROZEN present in $(PROJECT_META) - unfrozen exports will be represented in import library. )
-    define importlibtarget_unfrozen
-      $(IMPORTLIBTARGET_DSO): $(IMPORTLIBTARGETVERSIONED_DSO)
-		$(call startrule,importlibtarget_unfrozen,FORCESUCCESS) \
-		$(GNUCP) $$(call dblquote,$$<) $$(call dblquote,$$@) \
-		$(call endrule,importlibtarget_unfrozen)
-
-       CLEANTARGETS:=$$(CLEANTARGETS) $(IMPORTLIBTARGET_DSO)
-
-    endef
-
-    define importlibtarget_unfrozen_ver
-      $(IMPORTLIBTARGETVERSIONED_DSO): $(E32TARGET)
-		$(call startrule,importlibversioned_unfrozen,FORCESUCCESS) \
-		$(GNUCP) "$(GENERATED_DSO)" "$$@" \
-		$(call endrule,importlibversioned_unfrozen)
-
-      CLEANTARGETS:=$$(CLEANTARGETS) $(IMPORTLIBTARGET_DSO)
-    endef
-
-    ifeq ($(EXPLICITVERSION),)
-      # Generate the general dso if we aren't
-      # being asked to make just the specific version.
-      $(eval $(importlibtarget_unfrozen))
-    endif
-
-    $(eval $(importlibtarget_unfrozen_ver))
-  else
-    ifneq ($(DEFFILE),) # Frozen - use the def file and create .dso directly
-      define importlibtarget_func
-       $(IMPORTLIBTARGET_DSO): $(IMPORTLIBTARGETVERSIONED_DSO)
-	   $(call startrule,importlibtarget,FORCESUCCESS) \
-	   $(GNUCP) "$$<" "$$@" \
-	   $(call endrule,importlibtarget)
-
-          CLEANTARGETS:=$$(CLEANTARGETS) $(IMPORTLIBTARGET_DSO)
-      endef
-
-      ifeq ($(EXPLICITVERSION),)
-          # Generate the general dso if we aren't
-          # being asked to make just the specific version.
-          $(eval $(importlibtarget_func))
-      endif
-
-      define importlibtargetversioned_func
-        $(IMPORTLIBTARGETVERSIONED_DSO): $(ELF2E32) $(PREPPEDDEFFILE)
-	      $(call startrule,importlibversioned,FORCESUCCESS) \
-	      $(ELF2E32) --sid=0x$(if $(SID),$(SID),$(if $(UID3),$(UID3),0))  --version=$(VERSION)  	   \
-	 	  --definput="$(PREPPEDDEFFILE)" 				   \
-	 	  --dso=$$(call dblquote,$$@) 				   \
-	 	  --linkas=$(call dblquote,$(LINKASVERSIONED)) \
-	      $(call endrule,importlibversioned)
-
-              CLEANTARGETS:=$$(CLEANTARGETS) $(IMPORTLIBTARGETVERSIONED_DSO)
-      endef
-      $(eval $(importlibtargetversioned_func))
-    endif #  ifneq ($(DEFFILE),)
-  endif #  ifneq ($(EXPORTUNFROZEN),)
-endif #  ifneq ($(IMPORTLIBTARGET_DSO),)
-
-# ABIv1 .lib
-ifneq ($(IMPORTLIBTARGETVERSIONED_LIB),) # check that we haven't tried to specify this target already
-  CLEANTARGETS:=$(CLEANTARGETS) $(IMPORTLIBTARGETVERSIONED_LIB) $(IMPORTLIBTARGET_LIB)
-
-  define abiv1_generatelib
-
-    ifeq ($(EXPLICITVERSION),)
-      LIBRARY:: $(IMPORTLIBTARGETVERSIONED_LIB) $(IMPORTLIBTARGET_LIB)
-
-    else
-      LIBRARY:: $(IMPORTLIBTARGETVERSIONED_LIB)
-
-    endif
-
-    # If frozen, a prepped .def file is used as the basis for .lib creation
-    # 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 \
-                 $(PERL) $(EPOCROOT)/epoc32/tools/def2dll.pl \
-		--path=$(IMPORTLIBPATH) \
-		--bldpath=$(INTERMEDIATEPATH) \
-		--import=$(notdir $(basename $(IMPORTLIBTARGETVERSIONED_LIB))) \
-		--deffile="$(if $(EXPORTUNFROZEN),$(GENERATED_DEFFILE),$(PREPPEDDEFFILE))" \
-		--linkAs=$(call dblquote,$(LINKASVERSIONED)) \
-		--inter ; fi \
-	$(call endrule,importlibversioned_abiv1)
-
-    ifeq ($(EXPLICITVERSION),)
-      $(IMPORTLIBTARGET_LIB): $(IMPORTLIBTARGETVERSIONED_LIB)
-	$(call startrule,importlibtarget_abiv1) \
-	if [ -f $(EPOCROOT)/epoc32/tools/def2dll.pl ]; then $(GNUCP) "$$<" "$$@" ; fi \
-	$(call endrule,importlibtarget_abiv1)
-    endif
-  endef
-
-  $(eval $(abiv1_generatelib))
-endif #  ifneq ($(IMPORTLIBTARGET_LIB),)
-endif #  ($(or $(DEFFILE),$(EXPORTUNFROZEN)),)
-endif #  ifneq ($(IMPORTLIBRARYREQUIRED),)
-
-
-## POSTLINK ##################################################################
-
-# Set up the name of the exports file if this is a customdll
-EXPTARGET:=
-ifneq ($(DOPOSTLINK),)
-  ifneq ($(and $(or $(STATICLIBRARY),$(ARMLIBS),$(ARMRT)),$(DEFFILE)),)
-    EXPTARGET:=$(INTERMEDIATE_PLATFORM_PATH)/$(notdir $(VER_E32IMPORTLIBBASE)).exp
-  endif
-endif
-
-# Generating the import library is enough if TARGETTYPE=implib #############
-
-ifneq ($(DOPOSTLINK),)
-include $(FLMHOME)/e32postlink.mk
-endif # ifneq ($(DOPOSTLINK),)
-
-ifneq ($(TARGETTYPE),implib)
-
-## CUSTOM DLLS ###############################################################
-# exp file
-#
-# This tends to help getting exported objects
-# out of the arm libs and into custom dlls.
-
-ifneq ($(EXPTARGET),)
-ifeq ($(TARGET_$(EXPTARGET)),)
-# We only need one of these exptargets for UDEB and UREL
-TARGET_$(EXPTARGET):=1
-
-EXPTARGETASMFILE:=$(INTERMEDIATE_PLATFORM_PATH)/$(notdir $(VER_E32IMPORTLIBBASE)).s
-
-define e32expgen_func
-$(EXPTARGET): $(DEFFILE) $(ELF2E32)
-	$(call startrule,expgen) \
-	$(ELF2E32) \
-	   --definput=$$(call dblquote,$(DEFFILE)) \
-	   --dump=a \
-	   --output=$(call dblquote,$(EXPTARGETASMFILE)) && \
-	$(ASM) $(TARGET_ARCH_OPTION) $(AAPCS_OPTION) $(ASM_OUTPUT_OPTION) $$(call dblquote, $$@) $(EXPTARGETASMFILE) \
-	$(call endrule,expgen)
-endef
-
-$(eval $(e32expgen_func))
-CLEANTARGETS:=$(CLEANTARGETS) $(EXPTARGET) $(EXPTARGETASMFILE)
-endif
-endif
-
-
-
-
-## SOURCE FILES ##############################################################
-
-# Source files can be either C++ files (.cpp) or Assmbler-in-C++ files (.cia)
-# We have to split the two because they have the same link stage, the compile
-# stage is different for each.
-
-CPPFILEEXTENSIONS:=.cpp .CPP .Cpp .CPp .CpP .cPP .cpP .cPp .cc .CC \
-	.Cc .c++ .C++ .cxx .CXX .Cxx .cXx .CxX .CXx .cC .cXX .cxX
-CFILEEXTENSIONS:=.c .C
-CIAFILEEXTENSIONS:=.CIA .cia .Cia .cIa .cIA .ciA .CIa .CiA
-ASMFILEEXTENSIONS:=.s .S
-
-
-# Extract the CPP files from our sources
-CPPFILES:=$(call extractfilesoftype,$(CPPFILEEXTENSIONS),$(SOURCE))
-CFILES:=$(call extractfilesoftype,$(CFILEEXTENSIONS),$(SOURCE))
-ASMFILES:=$(call extractfilesoftype,$(ASMFILEEXTENSIONS),$(SOURCE))
-
-# Find out what assember-in-c files there are
-# If appropriate, work out what CPP files will be created from the assembler files
-CIAFILES:=$(call extractfilesoftype,$(CIAFILEEXTENSIONS),$(SOURCE))
-CIA_CPPFILES:=
-ifeq ($(TRANSFORM_CIA),1)
-  CIA_CPPFILES:=$(call relocatefiles,$(INTERMEDIATEPATH),$(call extractandmap,$(CIAFILEEXTENSIONS),_.cpp,$(CIAFILES)))
-else
-
-endif
-
-## LINK ######################################################################
-# Bring together all the .o files compiled from  .cpp, .c, .s and .cia files.
-# These files are stored in the "non-releasable" output diretory.
-
-define mapcpp2object
-$(call relocatefiles,$(INTERMEDIATEPATH),$(call extractandmap,$(CPPFILEEXTENSIONS),.o,$1))
-endef
-
-define mapc2object
-$(call relocatefiles,$(INTERMEDIATEPATH),$(call extractandmap,$(CFILEEXTENSIONS),.o,$1))
-endef
-
-define mapasm2object
-$(call relocatefiles,$(INTERMEDIATEPATH),$(call extractandmap,$(ASMFILEEXTENSIONS),.o,$1))
-endef
-
-define mapcia2object
-$(call relocatefiles,$(INTERMEDIATEPATH),$(call extractandmap,$(CIAFILEEXTENSIONS),_.o,$1))
-endef
-
-# Determine what object files will be linked by using the source files.
-CPPFILES_LINKOBJECTS:=$(call mapcpp2object,$(CPPFILES))
-CFILES_LINKOBJECTS:=$(call mapc2object,$(CFILES))
-ifeq ($(TRANSFORM_CIA),1) 
-  CIAFILES_LINKOBJECTS:=$(patsubst %_.cpp,%_.o,$(CIA_CPPFILES))
-else
-  CIAFILES_LINKOBJECTS:=$(call mapcia2object,$(CIAFILES))
-endif
-ASMFILES_LINKOBJECTS:=$(call mapasm2object,$(ASMFILES))
-
-# Try to link object files in the order in which the source files were specified.
-# This makes BC comparisons with non-Raptor builds easier.
-# Use the order of the source list to establish the order of the object files:
-LINKOBJECTS:=$(call relocatefiles,$(INTERMEDIATEPATH),$(SOURCE))
-# Replace the file extensions of the Source files with .o (or _.o for cia files) now
-# the list will contain the object files in the same order as the list of source files.
-LINKOBJECTS:=$(foreach FILE,$(LINKOBJECTS),$(basename $(FILE))$(if $(filter $(addprefix %,$(CIAFILEEXTENSIONS)),$(FILE)),_).o)
-
-ifneq ($(MULTIFILE_ENABLED),)
-MULTIFILEOBJECT:=$(INTERMEDIATEPATH)/$(TARGET).$(POSTLINKFILETYPE)_$(VARIANTTYPE)_multifileobject.o
-MULTIFILE_VIAFILE:=$(INTERMEDIATEPATH)/$(TARGET)_$(VARIANTTYPE)_multifile.via
-endif
-
-## Via file ####################################
-# list of all objects to be linked
-#
-VIAFILE:=$(INTERMEDIATEPATH)/$(TARGET)_$(VARIANTTYPE)_objects.via
-ifneq ($(GENERATELINKERFEEDBACK),)
-FEEDBACKFILE:=$(INTERMEDIATEPATH)/$(TARGET)_$(VARIANTTYPE)_feedback.fdb
-endif
-
-# The groupin10 macro allows us to construct a via file, 10 objects at a time
-# to avoid limits on argument lengths and sizes on Windows.
-# It expands to a list of commands, each of which is on a separate line.
-# This causes the shell to be invoked once for each line but each line should
-# be shorter than the maximum allowed by windows.
-define groupin10
-	$(if $1,@echo -e $(foreach L,$(wordlist 1,10,$1),"$(L)\\n") >>$(VIAFILE),)
-	$(if $1,$(call groupin10,$(wordlist 11,$(words $1),$1)),@true)
-endef
-
-################################################
-
-
-## Link-type selection:
-#	runtime static libraries link via AR
-ifneq ($(ARTARGET),)
-# Assuming that there are no libdeps in this case because this is probably one of the
-# Runtime libraries which has no deps.
-
-define artarget_func
-$(ARTARGET): $(if $(MULTIFILE_ENABLED),$(MULTIFILEOBJECT),$(LINKOBJECTS)) $(STDCPPTAGFILE)
-	$(if $(MULTIFILE_ENABLED),,@echo "$(STDCPPTAGFILE)" > $(VIAFILE);
-	$(call groupin10,$(LINKOBJECTS)) ;)
-	$(call startrule,ar,FORCESUCCESS) \
-	$$(call dblquote,$(AR)) $(ARCHIVER_CREATE_OPTION) $$@ $(if $(MULTIFILE_ENABLED),$(MULTIFILEOBJECT),$(COMMANDFILE_OPTION)$(VIAFILE)) \
-	$(if $(DUMPBCINFO),&& $(FROMELF) -v $$@  > $$@.elfdump,)  \
-	$(call endrule,ar)
-endef
-$(eval $(artarget_func))
-
-CLEANTARGETS:=$(CLEANTARGETS) $(VIAFILE) $(ARTARGET) $(if $(DUMPBCINFO),$(ARTARGET).elfdump,)
-endif
-
-
-
-# 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_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
-ifeq ($(ARMRT),)
-# Some of the runtime libraries do not set ARMRT because of a circular reference
-# problem; we need to stop these from linking to their own dso and not link to
-# the STATIC_LIBS_LIST.
-ifneq ($(findstring $(TARGET).dso,$(RUNTIME_LIBS_LIST)),)
-# (almost) ARM RUNTIME LIBS
-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)) 
-else
-  e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY)) $(addprefix $(RUNTIME_LIBS_PATH)/,$(REDUCED_RUNTIME_LIBS_LIST)) 
-endif
-quoted_e32abiv2_LIBS=$(e32abiv2_LIBS) $(quoted_located_ARMLIBS)
-escaped_e32abiv2_LIBS=$(e32abiv2_LIBS) $(escaped_located_ARMLIBS)
-
-else
-# NORMAL
-#
-ifeq ($(VARIANTTYPE),udeb)
-  e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY_DEBUG))
-else
-  e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY))
-endif
-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)
-
-endif
-else
-# ARM RUNTIME LIBS
-ifeq ($(VARIANTTYPE),udeb)
-  e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY_DEBUG)) 
-else
-  e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY))
-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
-# because the code between startrule and endrule is packaged up into one
-# commandline which would defeat the purpose of groupin10.
-# This is undesirable because viafile generation commands appear
-# 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),)
-	$(if $(MULTIFILE_ENABLED),,@echo -n "" > $(VIAFILE);
-	$(call groupin10,$(LINKOBJECTS)) ;)
-	$(call startrule,link) \
-	$(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)) \
-	  $(SHARED_OBJECT_OPTION) $(SPLIT_OPTION) \
-	  $(RW_BASE_OPTION) 0x400000 \
-	  $(LINKER_ARCH_OPTION) \
-	  $(SYMVER_OPTION) $(SO_NAME_OPTION) $(call dblquote,$(LINKASVERSIONED)) \
-	  $(LINKER_ENTRYPOINT_SETTING) \
-	  -o $$(call dblquote,$$@) \
-	  $(if $(LTCG),$(LTCG_OPTION),) \
-	  $(LINKER_SYMBOLS_OPTION) $(LINKER_SYMBOLS_FILE_OPTION) \
-	  $(call dblquote,$(MAPFILE)) \
-  	  $(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)
-
-$(MAPFILE): $(LINK_TARGET)
-endef
-$(eval $(linktarget_func))
-
-CLEANTARGETS:=$(CLEANTARGETS) $(LINK_TARGET) $(if $(GENERATELINKERFEEDBACK),$(FEEDBACKFILE)) $(if $(MULTIFILE_ENABLED),$(MULTIFILEOBJECT))
-CLEANTARGETS:=$(CLEANTARGETS) $(VIAFILE)
-CLEANTARGETS:=$(CLEANTARGETS) $(MAPFILE)
-WHATRELEASE:=$(WHATRELEASE) $(MAPFILE)
-
-endif # if TARGETTYPE lib
-
-
-## Run trace compiler ##############################################
-ifeq ($(UID3),)
- ifeq ($(UID2),)
-  USE_TRACE_COMPILER:=
- else
-  UID_TC:=$(UID2)
- endif
-else
- UID_TC:=$(UID3)
-endif
-
-# USE_TRACE_COMPILER defaults to blank in Raptor config.
-# Users can turn TC on by setting it to 1 in user config.
-ifneq ($(USE_TRACE_COMPILER),)
-  include $(FLMHOME)/tracecompiler.mk
-endif
-
-CC_CPPONLY_ARGS:=$(SYMBIAN_CCFLAGS) $(if $(DEBUG_INFO),-g) $(DEBUG_FORMAT) \
-  $(RUNTIME_SYMBOL_VISIBILITY_OPTION) $(EXCEPTIONS) \
-  $(CC_WARNINGS_CONTROL_OPTION) $(CC_ERRORS_CONTROL_OPTION) \
-  $(TARGET_ARCH_OPTION) $(ENUM_OPTION) $(OWN_LIBRARY_OPTION) $(FPMODE_OPTION) \
-  $(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)
-
-## COMPILE CPP Files #################################################################
-
-# For ARMCC we can compile all sourcefiles with one invocation
-# The pathprep macro is used to make sure that forward slashes in options
-# are not interpreted as being paths by CYGWIN on Windows.  On windows
-# pathprep makes a forward slash into two.
-
-# The majority of ARMCC arguments are common across all compiler invocations
-# Order is significant here in that OPTION_REPLACE here and in ABLD should
-# have the same impact
-CC_CORE_ARGS:=$(SYMBIAN_CCFLAGS) $(if $(DEBUG_INFO),-g) $(DEBUG_FORMAT) \
-  $(RUNTIME_SYMBOL_VISIBILITY_OPTION) $(EXCEPTIONS) \
-  $(CC_WARNINGS_CONTROL_OPTION) $(CC_ERRORS_CONTROL_OPTION) \
-  $(TARGET_ARCH_OPTION) $(ENUM_OPTION) $(OWN_LIBRARY_OPTION) $(FPMODE_OPTION) \
-  $(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)
-
-ifeq ($(STDCPP),1)
-SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$(call dblquote,$(STDCPP_INCLUDE)))
-endif
-
-define option_replace
-  # Process a single, combined, item of the form 'search<->replace' in order to modify the command line tool call
-  # We split this into its component arguments for use in substitutions
-  # Spaces will have been escaped elsewhere to maintain distinct words, so we resurrect these
-  # after the split.
-  SEARCH:=$(subst %20,$(CHAR_SPACE),$(word 1,$(subst <->,$(CHAR_SPACE),$(1))))
-  REPLACE:=$(subst %20,$(CHAR_SPACE),$(word 2,$(subst <->,$(CHAR_SPACE),$(1))))
-
-  # Depending on whether there's a wildcard in the search, we may require either a normal $(subst) or a $(patsubst)
-  PATSUBST:=$$(if $$(findstring %,$$(SEARCH)),1,)
-
-  ifeq ($$(PATSUBST),1)
-    CC_CORE_ARGS:=$$(patsubst $$(SEARCH),$$(REPLACE),$$(CC_CORE_ARGS))
-  else
-    CC_CORE_ARGS:=$$(subst $$(SEARCH),$$(REPLACE),$$(CC_CORE_ARGS))
-  endif
-endef
-$(foreach ITEM,$(OPTION_REPLACE_COMPILER),$(eval $(call option_replace,$(ITEM))))
-
-define e32abiv2_compile
-
-$(eval DEPENDFILENAME:=$(1).d)
-$(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),)
-	$(call startrule,compile,,$(2))		\
-		$(if $(PERTURBSTARTTIME), $(RANSLEEP) $(PERTURBMSECS) ;,) \
-		$(if $(MULTIFILE_ENABLED), echo $(2) $(3) > $(MULTIFILE_VIAFILE) ;,) \
-		$(CC) $(LICENSERETRY_OPTION) \
-			$(CC_CORE_ARGS) \
-			$(OPTION_COMPILER) $(if $(MULTIFILE_ENABLED),$(4),$(3)) \
-			$(if $(LTCG),$(LTCG_OPTION),) \
-			$(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)),),)       \
-			$(COMPILER_SYSTEM_INCLUDE_OPTION)$$(call dblquote,$$( $(call dblquote,$(e32abiv2_PREFILE).d) \
-	$(call endrule,cia2cpp)
-
-CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
-ifneq "$(DEPENDFILE)" ""
-ifeq ($(NO_DEPEND_INCLUDE),)
-  ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" ""
-    -include $(DEPENDFILE)
-  endif
-endif
-endif
-
-endef
-
-# Create a rule for each cia file
-ifeq ($(TRANSFORM_CIA),1)
-  $(eval $(foreach e32abiv2_RULE,$(CIAFILES),$(call e32abiv2_CIA2CPP,$(e32abiv2_RULE))))
-endif
-
-# Pure assembler (.s files) ################################
-
-e32abiv2_asm_OPTIONS:=$(LICENSERETRY_OPTION) \
-  $(CC_CORE_ARGS) \
-  $(OPTION_COMPILER) \
-  $(call makemacrodef,-D,$(COMPILER_INTERWORK_DEFINES) $(CDEFS)) \
-  $(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)))
-
-# note that the --no_rtti option cannot be passed with the -M option
-# so forcibly remove it when generating ASM dependencies.
-#
-define e32abiv2_asm
-
-$(eval DEPENDFILENAME:=$(1).d)
-$(eval DEPENDFILE:=$(wildcard $(DEPENDFILENAME)))
-
-$(1): $(2) $(PROJECT_META) $(if $(DEPENDFILE),,RESOURCE BITMAP EXPORT)
-	$(call startrule,asmcompile,,$(2)) \
-		$(if $(PERTURBSTARTTIME),$(RANSLEEP) $(PERTURBMSECS) ;,) \
-		$(CC) $(e32abiv2_asm_OPTIONS) \
-		$(DEPEND_OPTION) $(call dblquote,$(DEPENDFILENAME)) \
-	 	$$(call dblquote, $$<) $(OUTPUT_OPTION) $$@ \
-	$(call endrule,asmcompile)
-	$(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)
-
-CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
-ifneq "$(DEPENDFILE)" ""
-ifeq ($(NO_DEPEND_INCLUDE),)
-  ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" ""
-    -include $(DEPENDFILE)
-  endif
-endif
-endif
-
-CREATABLEPATHS:=$$(CREATABLEPATHS) $(INTERMEDIATEPATH)
-
-endef
-
-$(eval $(foreach F,$(ASMFILES), $(call e32abiv2_asm,$(call mapasm2object,$(F)),$(F))))
-CLEANTARGETS:=$(CLEANTARGETS) $(ASMFILES_LINKOBJECTS)
-
-endif # ifneq ($(TARGETTYPE),implib)
-
-
-########################## Build ROMFILE target ############################
-EPOC_ROOT:=$(patsubst %/,%,$(EPOCROOT))
-TOBLDINF:=$(dir $(subst :,,$(subst $(EPOC_ROOT)/,,$(COMPONENT_META))))
-
-# Only build ROMFILE if asked
-ifneq ($(filter ROMFILE,$(call uppercase,$(MAKECMDGOALS))),)
-    ifeq ($(ROMFILE_$(call sanitise,$(TARGET).$(REQUESTEDTARGETEXT))),)
-        ROMFILE_$(call sanitise,$(TARGET).$(REQUESTEDTARGETEXT)):=1
-        ROMDIR:=$(EPOC_ROOT)/epoc32/rom/$(TOBLDINF)
-
-        # Default values
-        ROMFILETYPE:=file
-        ROMFILE:=$(TARGET).$(REQUESTEDTARGETEXT)
-        ROMPATH:=sys/bin/
-        ROMDECORATIONS:=
-        ROMFILETYPE_RAM:=data
-        ROMFILE_RAM:=$(TARGET).$(REQUESTEDTARGETEXT)
-        ROMPATH_RAM:=sys/bin/
-        BUILDROMTARGET:=1
-        ABIDIR:=MAIN
-
-        $(eval $(call DoRomSet))
-
-        ifneq ($(EPOCFIXEDPROCESS),)
-            ROMDECORATIONS:=$(ROMDECORATIONS) fixed
-        endif
-        ifeq ($(PAGED),1)
-            ROMDECORATIONS:=$(ROMDECORATIONS) paged
-        endif
-        ifeq ($(PAGED),0)
-            ROMDECORATIONS:=$(ROMDECORATIONS) unpaged
-        endif
-
-
-        ifeq ($(TESTCODE),TRUE)
-        	# Add 'TEST' to the .iby filename
-        	ROMTEST:=test
-            ifeq ($(TEST_OPTION),BOTH)
-                DATATEXT:="data=/epoc32/data/z/test/$(MODULE)/$(VARIANTPLATFORM).auto.bat test/$(MODULE).auto.bat"\n"data=/epoc32/data/z/test/$(MODULE)/$(VARIANTPLATFORM).manual.bat test/$(MODULE).manual.bat"
-            else
-                ifneq ($(TEST_OPTION),NONE)
-                    DATATEXT:="data=/epoc32/data/z/test/$(MODULE)/$(VARIANTPLATFORM).$(TEST_OPTION).bat test/$(MODULE).$(TEST_OPTION).bat"
-                endif
-            endif
-        else
-        	DATATEXT:=
-        endif
-
-        # ROMTARGET
-        ifneq ($(ROMTARGET),)
-            ifneq ($(words $(ROMTARGET)),1)
-                ROMTARGETALL:=$(ROMTARGET)
-                ROMTARGET:=$(word 1,$(ROMTARGET))
-            endif
-
-            ifeq ($(ROMTARGET),)
-                BUILDROMTARGET:=
-            else
-                ifneq ($(ROMTARGET),+)
-                    ifneq ($(notdir $(ROMTARGET)),)
-                        ROMFILE:=$(notdir $(ROMTARGET))
-                    endif
-                    ifneq ($(dir $(ROMTARGET)),./)
-                        ROMPATH:=$(dir $(ROMTARGET))
-                    endif
-                endif
-            endif
-        endif
-    endif
-
-    ROMFILENAME:=$(ROMDIR)$(PLATFORM)$(ROMTEST).iby
-
-    # RAMTARGET
-    ifneq ($(RAMTARGET),)
-        ROMDECORATIONS_RAM:=" attrib=r"
-        ifneq ($(RAMTARGET),+)
-            ifneq ($(notdir $(RAMTARGET)),)
-                ROMFILE_RAM:=$(notdir $(RAMTARGET))
-            endif
-            ifneq ($(dir $(RAMTARGET)),./)
-                ROMPATH_RAM:=$(dir $(RAMTARGET))
-            endif
-        endif
-    endif
-
-    define BuildRomfileTarget
-        $(ALLTARGET)::ROMFILE
-        ROMFILE::
-	        $(call startrule,rombuild)	\
-	        $(GNUMKDIR) -p $(ROMDIR) \
-            $(if $(ROMFILE_CREATED_$(TOBLDINF)),,&& echo -e "// $(subst $(EPOC_ROOT)/,,$(ROMFILENAME))\n//\n$(DATATEXT)" > $(ROMFILENAME)) \
-            $(if $(BUILDROMTARGET),&& echo "$(ROMFILETYPE)=/epoc32/release/##$(ABIDIR)##/##BUILD##/$(TARGET).$(REQUESTEDTARGETEXT)   $(1)$(ROMDECORATIONS)" >> $(ROMFILENAME))	\
-	        $(if $(RAMTARGET),&& echo "$(ROMFILETYPE_RAM)=/epoc32/release/##$(ABIDIR)##/##BUILD##/$(TARGET).$(REQUESTEDTARGETEXT)   $(ROMPATH_RAM)$(ROMFILE_RAM)$(ROMDECORATIONS_RAM)" >> $(ROMFILENAME))	\
-	        $(call endrule,buildromfiletarget)
-    endef
-
-    # When VARIANTTYPE changes, romfile is finished,
-    # apart from if this is a new component......
-    ifneq ($(PREVIOUSVARIANTTYPE),)
-        ifneq ($(VARIANTTYPE),$(PREVIOUSVARIANTTYPE))
-            ifneq ($(ROMFILE_CREATED_$(TOBLDINF)),)
-                ROMFILEFINISHED:=1
-            else
-                ROMFILEFINISHED:=
-            endif
-        endif
-    endif
-
-    # When romfile is finished, don't continue to add to it
-    ifeq ($(ROMFILEFINISHED),)
-        $(eval $(call BuildRomfileTarget,$(ROMPATH)$(ROMFILE)))
-    endif
-
-    # Don't allow romfile to be recreated for every MMP
-    ifeq ($(ROMFILE_CREATED_$(TOBLDINF)),)
-        ROMFILE_CREATED_$(TOBLDINF):=1
-    endif
-
-    # Build other ROMTARGETs if there is more than one
-    ifneq ($(ROMTARGETALL),)
-        RAMTARGET:=
-        $(foreach ROMTARGET,$(wordlist 2,$(words $(ROMTARGETALL)),$(ROMTARGETALL)),$(eval $(call BuildRomfileTarget,$(ROMTARGET))))
-        ROMTARGETALL:=
-    endif
-
-    # Keep track of variant type while romfile is being created
-    PREVIOUSVARIANTTYPE:=$(VARIANTTYPE)
-
-    WHATRELEASE:=$(WHATRELEASE) $(ROMFILENAME)
-    CLEANTARGETS:=$(CLEANTARGETS) $(ROMFILENAME)
-endif
-
-# Deal with test code batch files generation.
-ifneq ($(TESTPATH),)
-
-    CREATABLEPATHS:=$(CREATABLEPATHS) $(EPOCROOT)/epoc32/data/z/test/
-    $(eval $(call MakeTestBatchFiles,$(TARGET),$(EPOCROOT)/epoc32/data/z/test/$(MODULE)/$(VARIANTPLATFORM).$(TESTPATH)))
-    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 ######################
-
-# Feature Variation requires a .vmap file to be created for each binary
-#
-ifneq ($(FEATUREVARIANTNAME),)
-ifneq ($(E32TARGET),)
-
-OUTPUTVMAP:=$(E32TARGET).vmap
-WHATRELEASE:=$(WHATRELEASE) $(OUPUTVMAP)
-
-TARGET:: $(OUTPUTVMAP)
-VMAPNEEDS:=$(E32TARGET) $(SOURCE) $(PROJECT_META)
-
-BV_SOURCELIST:=$(addprefix -s ,$(SOURCE) $(PROJECT_META))
-BV_FEATURELIST:=$(addprefix -f ,$(FEATURELISTFILES))
-BV_USER_INCLUDES:=$(addprefix -u ,$(USERINCLUDE))
-BV_SYSTEM_INCLUDES:=$(addprefix -x ,$(SYSTEMINCLUDE))
-
-# translate double quoted macros because $(shell) messes them up in some make engines
-BV_MACROLIST:=$(COMPILER_INTERWORK_DEFINES) $(CDEFS) $(if $(ALWAYS_BUILD_AS_ARM),,$(COMPILER_THUMB_DEFINES))
-BV_DEFINES:=$(call makemacrodef,-D,$(subst ",__SBS__QUOTE__,$(BV_MACROLIST)))
-
-# the script to generate our .vmap file and hash value
-VMAPCOMMAND:=$(CREATEVMAP) -o $(OUTPUTVMAP) $(BV_FEATURELIST) $(BV_DEFINES) -p $(PREINCLUDE) $(BV_SOURCELIST) $(BV_USER_INCLUDES) $(BV_SYSTEM_INCLUDES) -c $(CREATEVMAPCPP)
-
-# a recipe to create the .vmap from the "sources" with the createvmap script
-$(call raptor_recipe,createvmap,$(OUTPUTVMAP),$(VMAPNEEDS),$(VMAPCOMMAND))
-
-endif # E32TARGET != ""
-endif # FEATUREVARIANTNAME != ""
-
-########################### CONCLUSION ###################################
-
-# make the output directories while reading makefile - some build engines prefer this
-$(call makepath,$(CREATABLEPATHS))
-
-## Clean up
-$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS) ,$(CREATABLEPATHS),))
-
-# For the abld -what target
-$(eval $(call whatmacro,$(filter-out %.sym,$(WHATRELEASE)),WHATARMV5))
-
-endif # FEATUREVARIANTNAME=="" or FEATUREVARIANT==1
-
-## The End
-
+# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# ARMv5 EXE/DLL ABIv2 Function Like Makefile (FLM)
+# Knows how to build all possible ABIV2 executables for ARM
+#
+#
+
+# Only build feature invariant binaries in non-product builds *and*
+# Only build feature variant binaries in product builds.
+#
+# FEATUREVARIANTNAME != "" implies product build
+# FEATUREVARIANT == 1 implies a feature variant binary
+#
+# test FEATUREVARIANTNAME=="" or FEATUREVARIANT==1
+#
+ifneq ($(or $(call equal,$(FEATUREVARIANTNAME),),$(call equal,$(FEATUREVARIANT),1)),)
+
+$(if $(FLMDEBUG),$(info ))
+
+# Strip switch-type parameters
+#
+POSTLINKTARGETTYPE:=$(strip $(POSTLINKTARGETTYPE))
+UID1:=$(strip $(UID1))
+UID2:=$(strip $(UID2))
+UID3:=$(strip $(UID3))
+SID:=$(strip $(SECUREID))
+VENDORID:=$(strip $(VENDORID))
+AUTOEXPORTS:=$(strip $(AUTOEXPORTS))
+DEFFILE:=$(strip $(DEFFILE))
+IMPORTLIBRARYREQUIRED:=$(strip $(IMPORTLIBRARYREQUIRED))
+EPOCALLOWDLLDATA:=$(strip $(EPOCALLOWDLLDATA))
+PAGED:=$(strip $(PAGED))
+
+# the output directories
+VARIANTPLATFORM:=$(VARIANTPLATFORM)$(FEATUREVARIANTNAME)
+RELEASABLEPATH:=$(RELEASEPATH)/$(VARIANTPLATFORM)/$(VARIANTTYPE)
+INTERMEDIATEPATH:=$(OUTPUTPATH)/$(VARIANTPLATFORM)/$(VARIANTTYPE)
+INTERMEDIATE_PLATFORM_PATH:=$(OUTPUTPATH)/$(VARIANTPLATFORM)
+TRACE_MARKER_PATH:=$(OUTPUTPATH)
+IMPORTLIBPATH:=$(RUNTIME_LIBS_PATH)
+
+# LOCALLY USED VARIABLES
+CLEANTARGETS:=
+WHATRELEASE:=
+
+# Work out which new/delete library to use for binaries.
+CHECKLIB_TYPE:=symc++
+STDCPPTAGFILE:=
+ifeq ($(NOSTDCPP),1)
+  ifeq ($(STDCPP),1)
+    $(info STDCPP and NOSTDCPP both specified in $(PROJECT_META))
+  else
+    ifeq ($(HAS_DEDICATED_OP_NEWDEL_LIB),1)
+      DEFAULT_NEWLIB:=$(DEFAULT_SYMBIAN_NEWLIB)
+    endif
+  endif
+else
+  ifeq ($(STDCPP),1)
+    CDEFS:=$(CDEFS) __SYMBIAN_STDCPP_SUPPORT__
+    ifneq ($(SUPPORTS_STDCPP_NEWLIB),)
+      ifeq ($(HAS_DEDICATED_OP_NEWDEL_LIB),1)
+        DEFAULT_NEWLIB:=$(DEFAULT_STDCPP_NEWLIB)
+      endif
+      CHECKLIB_TYPE:=stdc++
+      STDCPPTAGFILE:=$(EPOCROOT)/epoc32/tools/tag/tag_elf
+    endif
+  endif
+endif
+
+# If NEWLIB is specified in the MMP file, it overrides all the past stuff.
+ifeq ($(NEWLIB),)
+  NEWLIB:=$(DEFAULT_NEWLIB)
+endif
+
+
+##########################################################################
+## OUTPUTS - externally relevant targets that this FLM generates
+
+
+ifeq ($(EXPORTLIBRARY),)
+  EXPORTLIBRARY:=$(TARGET)
+endif
+
+# This will insert the file version between the name and the extension.
+# If there is more than one dot in generated filename the inserted position will be
+# BEFORE the last but two dot. E.g name1.name2.name3.dll to name1.name2{version}.name3.dll
+LIBEXT:=$(lastword $(subst .,$(CHAR_SPACE) ,$(EXPORTLIBRARY)))
+LIBBASE:=$(patsubst %.$(LIBEXT),%,$(EXPORTLIBRARY))
+ifneq ($(findstring .,$(EXPORTLIBRARY)),)
+  # Please note $(EXPORTLIBRARY) doesn't include target type.
+  VER_E32IMPORTLIBBASE:=$(IMPORTLIBPATH)/$(LIBBASE){$(VERSIONHEX)}.$(LIBEXT)
+else
+  VER_E32IMPORTLIBBASE:=$(IMPORTLIBPATH)/$(EXPORTLIBRARY){$(VERSIONHEX)}
+endif
+
+# Postlinkable targets need to be linked and elf2e32'd
+ifneq ($(DOPOSTLINK),)
+    E32TARGET:=$(RELEASABLEPATH)/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE))
+    LINK_TARGET:=$(RELEASABLEPATH)/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE)).sym
+    MAPFILE:=$(RELEASABLEPATH)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE)).map
+else
+  E32TARGET:=
+  LINK_TARGET:=
+  MAPFILE:=
+endif
+
+# libs and klibs, on the other hand need to be archived
+ifneq ($(call isoneof,$(TARGETTYPE),lib klib stdlib),)
+  ARTARGET:=$(RELEASABLEPATH)/$(TARGET).lib
+  # We need libs and klibs before we can link stuff with them:
+  LIBRARY:: $(ARTARGET)
+else
+  ARTARGET:=
+endif
+
+
+ifneq ($(IMPORTLIBRARYREQUIRED),) # no dso files for plugins, animation dlls etc
+  # make sure we don't build import libraries more than once for UDEB and UREL
+  # Without this, wierd target-specific variable problems happen with LIBRARY in particular
+
+  TMP_IMPORTLIBTARGET_ROOT:=$(IMPORTLIBPATH)/$(EXPORTLIBRARY)
+
+  # ABIv2 .dso
+  IMPORTLIBTARGET_DSO:=
+  IMPORTLIBTARGETVERSIONED_DSO:=
+
+  BUILDMARKER_IMPORTLIBTARGET_DSO:=TARGET_$(subst :,,$(VER_E32IMPORTLIBBASE)).dso
+  WHATRELEASE:=$(WHATRELEASE) $(if $(EXPLICITVERSION),,$(TMP_IMPORTLIBTARGET_ROOT).dso)
+  WHATRELEASE:=$(WHATRELEASE) $(VER_E32IMPORTLIBBASE).dso
+  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)
+  IMPORTLIBTARGET_LIB:=
+  IMPORTLIBTARGETVERSIONED_LIB:=
+  BUILDMARKER_IMPORTLIBTARGET_LIB:=TARGET_$(subst :,,$(VER_E32IMPORTLIBBASE)).lib
+  # Only for builds that require and support them, and only on windows
+  ifeq ($(OSTYPE),cygwin)
+  ifeq ($(GENERATE_ABIV1_IMPLIBS),1)
+    WHATRELEASE:=$(WHATRELEASE) $(if $(EXPLICITVERSION),,$(TMP_IMPORTLIBTARGET_ROOT).lib)
+    WHATRELEASE:=$(WHATRELEASE) $(VER_E32IMPORTLIBBASE).lib
+    ifeq ($($(BUILDMARKER_IMPORTLIBTARGET_LIB)),)
+      IMPORTLIBTARGET_LIB:=$(TMP_IMPORTLIBTARGET_ROOT).lib
+      IMPORTLIBTARGETVERSIONED_LIB:=$(VER_E32IMPORTLIBBASE).lib
+      $(eval $(BUILDMARKER_IMPORTLIBTARGET_LIB):=1)
+    endif
+  endif
+  endif
+endif
+
+# Try to make sure that we get the right linkas name
+# If linkas is specified then split it up and
+# put the hex version number in the right place
+ifeq ($(LINKAS),)
+  LINKASNAME=$(TARGET)
+  LINKASTYPE=$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(POSTLINKFILETYPE))
+else
+  SPLIT_LINKAS=$(subst ., ,$(LINKAS))
+  LINKASNAME=$(word 1,$(SPLIT_LINKAS))
+  LINKASTYPE=$(word 2,$(SPLIT_LINKAS))
+endif
+
+# ignore UID3 if it is zero
+ifeq ($(UID3),00000000)
+  LINKASVERSIONED=$(LINKASNAME){$(VERSIONHEX)}.$(LINKASTYPE)
+else
+  LINKASVERSIONED=$(LINKASNAME){$(VERSIONHEX)}$(if $(UID3),[$(UID3)],).$(LINKASTYPE)
+endif
+
+##########################################################################
+## TARGET GROUPS ##
+RELEASABLES:=$(strip $(E32TARGET) $(ARTARGET) $(LINK_TARGET) $(MAPFILE))
+# More targets to be added later
+TARGETS:=$(strip $(E32TARGET) $(IMPORTLIBTARGET) $(LINK_TARGET) $(ARTARGET))
+
+CREATABLEPATHS:=$(OUTPUTPATH)
+CREATABLEPATHS:=$(CREATABLEPATHS) $(INTERMEDIATE_PLATFORM_PATH)
+CREATABLEPATHS:=$(CREATABLEPATHS) $(INTERMEDIATEPATH)
+CREATABLEPATHS:=$(CREATABLEPATHS) $(RELEASABLEPATH)
+CREATABLEPATHS:=$(CREATABLEPATHS) $(RUNTIME_LIBS_PATH)
+CREATABLEPATHS:=$(CREATABLEPATHS) $(IMPORTLIBPATH)
+WHATRELEASE:=$(WHATRELEASE) $(RELEASABLES)
+
+
+
+## HIGH LEVEL Targets ##
+.PHONY:: $(ALLTARGET)
+
+## GLOBAL TARGETS ############################################################
+$(ALLTARGET):: $(RELEASABLES)
+TARGET:: $(RELEASABLES)
+
+## Internal targets ##
+
+# Determine the name of the generated DSO file ###############################
+# This is to generate the dso with the Some{Versionhex}.file.dso
+# It reproduces what appears to be a problem in the current build system
+# that affects messageintercept{000a0000}.esockdebug.dso whose
+# filename differs from it's "linkas" name.
+E32VAR:=$(subst .,$(CHAR_SPACE) ,$(TARGET))
+E32SOME:=$(word 1,$(E32VAR))
+E32VAR2:=$(patsubst $(E32SOME).%,%,$(TARGET))
+
+# Separate '_SH' variables created for output into bash - Preserves '{' and '}'
+
+ifneq ($(findstring .,$(TARGET)),)
+	DSODEFFILENAMEBASE:=$(E32SOME){$(VERSIONHEX)}.$(E32VAR2)
+else
+	DSODEFFILENAMEBASE:=$(TARGET){$(VERSIONHEX)}
+endif
+GENERATED_DSO:=$(call dblquote,$(INTERMEDIATEPATH)/$(DSODEFFILENAMEBASE).dso)
+GENERATED_DEFFILE:=$(INTERMEDIATEPATH)/$(DSODEFFILENAMEBASE).def
+
+## IMPORT LIBRARY  ###########################################################
+
+# Static libraries will be postlinked when they are used so don't try to postlink them
+
+ifneq ($(IMPORTLIBRARYREQUIRED),)
+ifneq ($(or $(DEFFILE),$(EXPORTUNFROZEN)),)
+# Both ABIv2 .dso and ABIv1 .lib import library generation require a processed .def file,
+# unless EXPORTUNFROZEN is being used
+PREPPEDDEFFILE:=
+ifneq ($(DEFFILE),)
+  ifeq ($(EXPORTUNFROZEN),)
+    PREPPEDDEFFILE:=$(INTERMEDIATEPATH)/$(TARGET).prep
+    CLEANTARGETS:=$(CLEANTARGETS) $(PREPPEDDEFFILE)
+    define importlibtarget_prepfile
+      $(PREPPEDDEFFILE): $(DEFFILE)
+		$(call startrule,importlibtarget_prepfile,FORCESUCCESS) \
+		$(PREPDEF) $(call dblquote,$(DEFFILE)) $(call dblquote,$(PREPPEDDEFFILE)) \
+		$(call endrule,importlibtarget_prepfile)
+    endef
+    $(eval $(importlibtarget_prepfile))
+  endif
+endif
+
+# ABIv2 .dso
+ifneq ($(IMPORTLIBTARGET_DSO),) # check that we haven't tried to specify this target already
+
+  ifneq ($(EXPLICITVERSION),)
+    TARGETS:=$(strip $(TARGETS) $(IMPORTLIBTARGETVERSIONED_DSO))
+
+    # Add this importlibrary to our global targets
+    LIBRARY:: $(IMPORTLIBTARGETVERSIONED_DSO)
+    $(ALLTARGET):: $(IMPORTLIBTARGETVERSIONED_DSO)
+    TARGET:: $(IMPORTLIBTARGETVERSIONED_DSO)
+
+  else
+    TARGETS:=$(strip $(TARGETS) $(IMPORTLIBTARGETVERSIONED_DSO) $(IMPORTLIBTARGET_DSO))
+
+    # Add this importlibrary to our global targets
+    LIBRARY:: $(IMPORTLIBTARGET_DSO)
+    $(ALLTARGET):: $(IMPORTLIBTARGETVERSIONED_DSO) $(IMPORTLIBTARGET_DSO)
+    TARGET:: $(IMPORTLIBTARGETVERSIONED_DSO) $(IMPORTLIBTARGET_DSO)
+
+
+  endif
+
+
+
+  ifneq ($(EXPORTUNFROZEN),) # Unfrozen  - warn and create .dso as side-effect of the final postlink
+    $(info EXPORTUNFROZEN present in $(PROJECT_META) - unfrozen exports will be represented in import library. )
+    define importlibtarget_unfrozen
+      $(IMPORTLIBTARGET_DSO): $(IMPORTLIBTARGETVERSIONED_DSO)
+		$(call startrule,importlibtarget_unfrozen,FORCESUCCESS) \
+		$(GNUCP) $$(call dblquote,$$<) $$(call dblquote,$$@) \
+		$(call endrule,importlibtarget_unfrozen)
+
+       CLEANTARGETS:=$$(CLEANTARGETS) $(IMPORTLIBTARGET_DSO)
+
+    endef
+
+    define importlibtarget_unfrozen_ver
+      $(IMPORTLIBTARGETVERSIONED_DSO): $(E32TARGET)
+		$(call startrule,importlibversioned_unfrozen,FORCESUCCESS) \
+		$(GNUCP) "$(GENERATED_DSO)" "$$@" \
+		$(call endrule,importlibversioned_unfrozen)
+
+      CLEANTARGETS:=$$(CLEANTARGETS) $(IMPORTLIBTARGET_DSO)
+    endef
+
+    ifeq ($(EXPLICITVERSION),)
+      # Generate the general dso if we aren't
+      # being asked to make just the specific version.
+      $(eval $(importlibtarget_unfrozen))
+    endif
+
+    $(eval $(importlibtarget_unfrozen_ver))
+  else
+    ifneq ($(DEFFILE),) # Frozen - use the def file and create .dso directly
+      define importlibtarget_func
+       $(IMPORTLIBTARGET_DSO): $(IMPORTLIBTARGETVERSIONED_DSO)
+	   $(call startrule,importlibtarget,FORCESUCCESS) \
+	   $(GNUCP) "$$<" "$$@" \
+	   $(call endrule,importlibtarget)
+
+          CLEANTARGETS:=$$(CLEANTARGETS) $(IMPORTLIBTARGET_DSO)
+      endef
+
+      ifeq ($(EXPLICITVERSION),)
+          # Generate the general dso if we aren't
+          # being asked to make just the specific version.
+          $(eval $(importlibtarget_func))
+      endif
+
+      define importlibtargetversioned_func
+        $(IMPORTLIBTARGETVERSIONED_DSO): $(ELF2E32) $(PREPPEDDEFFILE)
+	      $(call startrule,importlibversioned,FORCESUCCESS) \
+	      $(ELF2E32) --sid=0x$(if $(SID),$(SID),$(if $(UID3),$(UID3),0))  --version=$(VERSION)  	   \
+	 	  --definput="$(PREPPEDDEFFILE)" 				   \
+	 	  --dso=$$(call dblquote,$$@) 				   \
+	 	  --linkas=$(call dblquote,$(LINKASVERSIONED)) \
+	      $(call endrule,importlibversioned)
+
+              CLEANTARGETS:=$$(CLEANTARGETS) $(IMPORTLIBTARGETVERSIONED_DSO)
+      endef
+      $(eval $(importlibtargetversioned_func))
+    endif #  ifneq ($(DEFFILE),)
+  endif #  ifneq ($(EXPORTUNFROZEN),)
+endif #  ifneq ($(IMPORTLIBTARGET_DSO),)
+
+# ABIv1 .lib
+ifneq ($(IMPORTLIBTARGETVERSIONED_LIB),) # check that we haven't tried to specify this target already
+  CLEANTARGETS:=$(CLEANTARGETS) $(IMPORTLIBTARGETVERSIONED_LIB) $(IMPORTLIBTARGET_LIB)
+
+  define abiv1_generatelib
+
+    ifeq ($(EXPLICITVERSION),)
+      LIBRARY:: $(IMPORTLIBTARGETVERSIONED_LIB) $(IMPORTLIBTARGET_LIB)
+
+    else
+      LIBRARY:: $(IMPORTLIBTARGETVERSIONED_LIB)
+
+    endif
+
+    # If frozen, a prepped .def file is used as the basis for .lib creation
+    # 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),$(call dblquote,$(GENERATED_DEFFILE)),$(PREPPEDDEFFILE))" ]; then \
+                 $(PERL) $(EPOCROOT)/epoc32/tools/def2dll.pl \
+		--path=$(IMPORTLIBPATH) \
+		--bldpath=$(INTERMEDIATEPATH) \
+		--import=$(notdir $(basename $(IMPORTLIBTARGETVERSIONED_LIB))) \
+		--deffile="$(if $(EXPORTUNFROZEN),$(call dblquote,$(GENERATED_DEFFILE)),$(PREPPEDDEFFILE))" \
+		--linkAs=$(call dblquote,$(LINKASVERSIONED)) \
+		--inter ; fi \
+	$(call endrule,importlibversioned_abiv1)
+
+    ifeq ($(EXPLICITVERSION),)
+      $(IMPORTLIBTARGET_LIB): $(IMPORTLIBTARGETVERSIONED_LIB)
+	$(call startrule,importlibtarget_abiv1) \
+	if [ -f $(EPOCROOT)/epoc32/tools/def2dll.pl ]; then $(GNUCP) "$$<" "$$@" ; fi \
+	$(call endrule,importlibtarget_abiv1)
+    endif
+  endef
+
+  $(eval $(abiv1_generatelib))
+endif #  ifneq ($(IMPORTLIBTARGET_LIB),)
+endif #  ($(or $(DEFFILE),$(EXPORTUNFROZEN)),)
+endif #  ifneq ($(IMPORTLIBRARYREQUIRED),)
+
+
+## POSTLINK ##################################################################
+
+# Set up the name of the exports file if this is a customdll
+EXPTARGET:=
+ifneq ($(DOPOSTLINK),)
+  ifneq ($(and $(or $(STATICLIBRARY),$(ARMLIBS),$(ARMRT)),$(DEFFILE)),)
+    EXPTARGET:=$(INTERMEDIATE_PLATFORM_PATH)/$(notdir $(VER_E32IMPORTLIBBASE)).exp
+  endif
+endif
+
+# Generating the import library is enough if TARGETTYPE=implib #############
+
+ifneq ($(DOPOSTLINK),)
+include $(FLMHOME)/e32postlink.mk
+endif # ifneq ($(DOPOSTLINK),)
+
+ifneq ($(TARGETTYPE),implib)
+
+## CUSTOM DLLS ###############################################################
+# exp file
+#
+# This tends to help getting exported objects
+# out of the arm libs and into custom dlls.
+
+ifneq ($(EXPTARGET),)
+ifeq ($(TARGET_$(EXPTARGET)),)
+# We only need one of these exptargets for UDEB and UREL
+TARGET_$(EXPTARGET):=1
+
+EXPTARGETASMFILE:=$(INTERMEDIATE_PLATFORM_PATH)/$(notdir $(VER_E32IMPORTLIBBASE)).s
+
+define e32expgen_func
+$(EXPTARGET): $(DEFFILE) $(ELF2E32)
+	$(call startrule,expgen) \
+	$(ELF2E32) \
+	   --definput=$$(call dblquote,$(DEFFILE)) \
+	   --dump=a \
+	   --output=$(call dblquote,$(EXPTARGETASMFILE)) && \
+	$(ASM) $(TARGET_ARCH_OPTION) $(AAPCS_OPTION) $(ASM_OUTPUT_OPTION) $$(call dblquote, $$@) $(EXPTARGETASMFILE) \
+	$(call endrule,expgen)
+endef
+
+$(eval $(e32expgen_func))
+CLEANTARGETS:=$(CLEANTARGETS) $(EXPTARGET) $(EXPTARGETASMFILE)
+endif
+endif
+
+
+
+
+## SOURCE FILES ##############################################################
+
+# Source files can be either C++ files (.cpp) or Assmbler-in-C++ files (.cia)
+# We have to split the two because they have the same link stage, the compile
+# stage is different for each.
+
+CPPFILEEXTENSIONS:=.cpp .CPP .Cpp .CPp .CpP .cPP .cpP .cPp .cc .CC \
+	.Cc .c++ .C++ .cxx .CXX .Cxx .cXx .CxX .CXx .cC .cXX .cxX
+CFILEEXTENSIONS:=.c .C
+CIAFILEEXTENSIONS:=.CIA .cia .Cia .cIa .cIA .ciA .CIa .CiA
+ASMFILEEXTENSIONS:=.s .S
+
+
+# Extract the CPP files from our sources
+CPPFILES:=$(call extractfilesoftype,$(CPPFILEEXTENSIONS),$(SOURCE))
+CFILES:=$(call extractfilesoftype,$(CFILEEXTENSIONS),$(SOURCE))
+ASMFILES:=$(call extractfilesoftype,$(ASMFILEEXTENSIONS),$(SOURCE))
+
+# Find out what assember-in-c files there are
+# If appropriate, work out what CPP files will be created from the assembler files
+CIAFILES:=$(call extractfilesoftype,$(CIAFILEEXTENSIONS),$(SOURCE))
+CIA_CPPFILES:=
+ifeq ($(TRANSFORM_CIA),1)
+  CIA_CPPFILES:=$(call relocatefiles,$(INTERMEDIATEPATH),$(call extractandmap,$(CIAFILEEXTENSIONS),_.cpp,$(CIAFILES)))
+else
+
+endif
+
+## LINK ######################################################################
+# Bring together all the .o files compiled from  .cpp, .c, .s and .cia files.
+# These files are stored in the "non-releasable" output diretory.
+
+define mapcpp2object
+$(call relocatefiles,$(INTERMEDIATEPATH),$(call extractandmap,$(CPPFILEEXTENSIONS),.o,$1))
+endef
+
+define mapc2object
+$(call relocatefiles,$(INTERMEDIATEPATH),$(call extractandmap,$(CFILEEXTENSIONS),.o,$1))
+endef
+
+define mapasm2object
+$(call relocatefiles,$(INTERMEDIATEPATH),$(call extractandmap,$(ASMFILEEXTENSIONS),.o,$1))
+endef
+
+define mapcia2object
+$(call relocatefiles,$(INTERMEDIATEPATH),$(call extractandmap,$(CIAFILEEXTENSIONS),_.o,$1))
+endef
+
+# Determine what object files will be linked by using the source files.
+CPPFILES_LINKOBJECTS:=$(call mapcpp2object,$(CPPFILES))
+CFILES_LINKOBJECTS:=$(call mapc2object,$(CFILES))
+ifeq ($(TRANSFORM_CIA),1) 
+  CIAFILES_LINKOBJECTS:=$(patsubst %_.cpp,%_.o,$(CIA_CPPFILES))
+else
+  CIAFILES_LINKOBJECTS:=$(call mapcia2object,$(CIAFILES))
+endif
+ASMFILES_LINKOBJECTS:=$(call mapasm2object,$(ASMFILES))
+
+# Try to link object files in the order in which the source files were specified.
+# This makes BC comparisons with non-Raptor builds easier.
+# Use the order of the source list to establish the order of the object files:
+LINKOBJECTS:=$(call relocatefiles,$(INTERMEDIATEPATH),$(SOURCE))
+# Replace the file extensions of the Source files with .o (or _.o for cia files) now
+# the list will contain the object files in the same order as the list of source files.
+LINKOBJECTS:=$(foreach FILE,$(LINKOBJECTS),$(basename $(FILE))$(if $(filter $(addprefix %,$(CIAFILEEXTENSIONS)),$(FILE)),_).o)
+
+ifneq ($(MULTIFILE_ENABLED),)
+MULTIFILEOBJECT:=$(INTERMEDIATEPATH)/$(TARGET).$(POSTLINKFILETYPE)_$(VARIANTTYPE)_multifileobject.o
+MULTIFILE_VIAFILE:=$(INTERMEDIATEPATH)/$(TARGET)_$(VARIANTTYPE)_multifile.via
+endif
+
+## Via file ####################################
+# list of all objects to be linked
+#
+VIAFILE:=$(INTERMEDIATEPATH)/$(TARGET)_$(VARIANTTYPE)_objects.via
+ifneq ($(GENERATELINKERFEEDBACK),)
+FEEDBACKFILE:=$(INTERMEDIATEPATH)/$(TARGET)_$(VARIANTTYPE)_feedback.fdb
+endif
+
+# The groupin10 macro allows us to construct a via file, 10 objects at a time
+# to avoid limits on argument lengths and sizes on Windows.
+# It expands to a list of commands, each of which is on a separate line.
+# This causes the shell to be invoked once for each line but each line should
+# be shorter than the maximum allowed by windows.
+define groupin10
+	$(if $1,@echo -e $(foreach L,$(wordlist 1,10,$1),"$(L)\\n") >>$(VIAFILE),)
+	$(if $1,$(call groupin10,$(wordlist 11,$(words $1),$1)),@true)
+endef
+
+################################################
+
+
+## Link-type selection:
+#	runtime static libraries link via AR
+ifneq ($(ARTARGET),)
+# Assuming that there are no libdeps in this case because this is probably one of the
+# Runtime libraries which has no deps.
+
+define artarget_func
+$(ARTARGET): $(if $(MULTIFILE_ENABLED),$(MULTIFILEOBJECT),$(LINKOBJECTS)) $(STDCPPTAGFILE)
+	$(if $(MULTIFILE_ENABLED),,@echo "$(STDCPPTAGFILE)" > $(VIAFILE);
+	$(call groupin10,$(LINKOBJECTS)) ;)
+	$(call startrule,ar,FORCESUCCESS) \
+	$$(call dblquote,$(AR)) $(ARCHIVER_CREATE_OPTION) $$@ $(if $(MULTIFILE_ENABLED),$(MULTIFILEOBJECT),$(COMMANDFILE_OPTION)$(VIAFILE)) \
+	$(if $(DUMPBCINFO),&& $(FROMELF) -v $$@  > $$@.elfdump,)  \
+	$(call endrule,ar)
+endef
+$(eval $(artarget_func))
+
+CLEANTARGETS:=$(CLEANTARGETS) $(VIAFILE) $(ARTARGET) $(if $(DUMPBCINFO),$(ARTARGET).elfdump,)
+endif
+
+
+
+# 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_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
+ifeq ($(ARMRT),)
+# Some of the runtime libraries do not set ARMRT because of a circular reference
+# problem; we need to stop these from linking to their own dso and not link to
+# the STATIC_LIBS_LIST.
+ifneq ($(findstring $(TARGET).dso,$(RUNTIME_LIBS_LIST)),)
+# (almost) ARM RUNTIME LIBS
+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)) 
+else
+  e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY)) $(addprefix $(RUNTIME_LIBS_PATH)/,$(REDUCED_RUNTIME_LIBS_LIST)) 
+endif
+quoted_e32abiv2_LIBS=$(e32abiv2_LIBS) $(quoted_located_ARMLIBS)
+escaped_e32abiv2_LIBS=$(e32abiv2_LIBS) $(escaped_located_ARMLIBS)
+
+else
+# NORMAL
+#
+ifeq ($(VARIANTTYPE),udeb)
+  e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY_DEBUG))
+else
+  e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY))
+endif
+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)
+
+endif
+else
+# ARM RUNTIME LIBS
+ifeq ($(VARIANTTYPE),udeb)
+  e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY_DEBUG)) 
+else
+  e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY))
+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
+# because the code between startrule and endrule is packaged up into one
+# commandline which would defeat the purpose of groupin10.
+# This is undesirable because viafile generation commands appear
+# 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),)
+	$(if $(MULTIFILE_ENABLED),,@echo -n "" > $(VIAFILE);
+	$(call groupin10,$(LINKOBJECTS)) ;)
+	$(call startrule,link) \
+	$(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 \
+	  $(LINKER_ARCH_OPTION) \
+	  $(SYMVER_OPTION) $(SO_NAME_OPTION) $(call dblquote,$(LINKASVERSIONED)) \
+	  $(LINKER_ENTRYPOINT_SETTING) \
+	  -o $$(call dblquote,$$@) \
+	  $(if $(LTCG),$(LTCG_OPTION),) \
+	  $(LINKER_SYMBOLS_OPTION) $(LINKER_SYMBOLS_FILE_OPTION) \
+	  $(call dblquote,$(MAPFILE)) \
+  	  $(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)
+
+$(MAPFILE): $(LINK_TARGET)
+endef
+$(eval $(linktarget_func))
+
+CLEANTARGETS:=$(CLEANTARGETS) $(LINK_TARGET) $(if $(GENERATELINKERFEEDBACK),$(FEEDBACKFILE)) $(if $(MULTIFILE_ENABLED),$(MULTIFILEOBJECT))
+CLEANTARGETS:=$(CLEANTARGETS) $(VIAFILE)
+CLEANTARGETS:=$(CLEANTARGETS) $(MAPFILE)
+WHATRELEASE:=$(WHATRELEASE) $(MAPFILE)
+
+endif # if TARGETTYPE lib
+
+
+## Run trace compiler ##############################################
+ifeq ($(UID3),)
+ ifeq ($(UID2),)
+  USE_TRACE_COMPILER:=
+ else
+  UID_TC:=$(UID2)
+ endif
+else
+ UID_TC:=$(UID3)
+endif
+
+# USE_TRACE_COMPILER defaults to blank in Raptor config.
+# Users can turn TC on by setting it to 1 in user config.
+ifneq ($(USE_TRACE_COMPILER),)
+  include $(FLMHOME)/tracecompiler.mk
+endif
+
+CC_CPPONLY_ARGS:=$(SYMBIAN_CCFLAGS) $(if $(DEBUG_INFO),-g) $(DEBUG_FORMAT) \
+  $(RUNTIME_SYMBOL_VISIBILITY_OPTION) $(EXCEPTIONS) \
+  $(CC_WARNINGS_CONTROL_OPTION) $(CC_ERRORS_CONTROL_OPTION) \
+  $(TARGET_ARCH_OPTION) $(ENUM_OPTION) $(OWN_LIBRARY_OPTION) $(FPMODE_OPTION) \
+  $(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)
+
+## COMPILE CPP Files #################################################################
+
+# For ARMCC we can compile all sourcefiles with one invocation
+# The pathprep macro is used to make sure that forward slashes in options
+# are not interpreted as being paths by CYGWIN on Windows.  On windows
+# pathprep makes a forward slash into two.
+
+# The majority of ARMCC arguments are common across all compiler invocations
+# Order is significant here in that OPTION_REPLACE here and in ABLD should
+# have the same impact
+CC_CORE_ARGS:=$(SYMBIAN_CCFLAGS) $(if $(DEBUG_INFO),-g) $(DEBUG_FORMAT) \
+  $(RUNTIME_SYMBOL_VISIBILITY_OPTION) $(EXCEPTIONS) \
+  $(CC_WARNINGS_CONTROL_OPTION) $(CC_ERRORS_CONTROL_OPTION) \
+  $(TARGET_ARCH_OPTION) $(ENUM_OPTION) $(OWN_LIBRARY_OPTION) $(FPMODE_OPTION) \
+  $(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)
+
+ifeq ($(STDCPP),1)
+SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$(call dblquote,$(STDCPP_INCLUDE)))
+endif
+
+define option_replace
+  # Process a single, combined, item of the form 'search<->replace' in order to modify the command line tool call
+  # We split this into its component arguments for use in substitutions
+  # Spaces will have been escaped elsewhere to maintain distinct words, so we resurrect these
+  # after the split.
+  SEARCH:=$(subst %20,$(CHAR_SPACE),$(word 1,$(subst <->,$(CHAR_SPACE),$(1))))
+  REPLACE:=$(subst %20,$(CHAR_SPACE),$(word 2,$(subst <->,$(CHAR_SPACE),$(1))))
+
+  # Depending on whether there's a wildcard in the search, we may require either a normal $(subst) or a $(patsubst)
+  PATSUBST:=$$(if $$(findstring %,$$(SEARCH)),1,)
+
+  ifeq ($$(PATSUBST),1)
+    CC_CORE_ARGS:=$$(patsubst $$(SEARCH),$$(REPLACE),$$(CC_CORE_ARGS))
+  else
+    CC_CORE_ARGS:=$$(subst $$(SEARCH),$$(REPLACE),$$(CC_CORE_ARGS))
+  endif
+endef
+$(foreach ITEM,$(OPTION_REPLACE_COMPILER),$(eval $(call option_replace,$(ITEM))))
+
+define e32abiv2_compile
+
+$(eval DEPENDFILENAME:=$(1).d)
+$(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),)
+	$(call startrule,compile,,$(2))		\
+		$(if $(PERTURBSTARTTIME), $(RANSLEEP) $(PERTURBMSECS) ;,) \
+		$(if $(MULTIFILE_ENABLED), echo $(2) $(3) > $(MULTIFILE_VIAFILE) ;,) \
+		$(CC) $(LICENSERETRY_OPTION) \
+			$(CC_CORE_ARGS) \
+			$(OPTION_COMPILER) $(if $(MULTIFILE_ENABLED),$(4),$(3)) \
+			$(if $(LTCG),$(LTCG_OPTION),) \
+			$(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)),),)       \
+			$(COMPILER_SYSTEM_INCLUDE_OPTION)$$(call dblquote,$$( $(call dblquote,$(e32abiv2_PREFILE).d) \
+	$(call endrule,cia2cpp)
+
+CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
+ifneq "$(DEPENDFILE)" ""
+ifeq ($(NO_DEPEND_INCLUDE),)
+  ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" ""
+    -include $(DEPENDFILE)
+  endif
+endif
+endif
+
+endef
+
+# Create a rule for each cia file
+ifeq ($(TRANSFORM_CIA),1)
+  $(eval $(foreach e32abiv2_RULE,$(CIAFILES),$(call e32abiv2_CIA2CPP,$(e32abiv2_RULE))))
+endif
+
+# Pure assembler (.s files) ################################
+
+e32abiv2_asm_OPTIONS:=$(LICENSERETRY_OPTION) \
+  $(CC_CORE_ARGS) \
+  $(OPTION_COMPILER) \
+  $(call makemacrodef,-D,$(COMPILER_INTERWORK_DEFINES) $(CDEFS)) \
+  $(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)))
+
+# note that the --no_rtti option cannot be passed with the -M option
+# so forcibly remove it when generating ASM dependencies.
+#
+define e32abiv2_asm
+
+$(eval DEPENDFILENAME:=$(1).d)
+$(eval DEPENDFILE:=$(wildcard $(DEPENDFILENAME)))
+
+$(1): $(2) $(PROJECT_META) $(if $(DEPENDFILE),,RESOURCE BITMAP EXPORT)
+	$(call startrule,asmcompile,,$(2)) \
+		$(if $(PERTURBSTARTTIME),$(RANSLEEP) $(PERTURBMSECS) ;,) \
+		$(CC) $(e32abiv2_asm_OPTIONS) \
+		$(DEPEND_OPTION) $(call dblquote,$(DEPENDFILENAME)) \
+	 	$$(call dblquote, $$<) $(OUTPUT_OPTION) $$@ \
+	$(call endrule,asmcompile)
+	$(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)
+
+CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
+ifneq "$(DEPENDFILE)" ""
+ifeq ($(NO_DEPEND_INCLUDE),)
+  ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" ""
+    -include $(DEPENDFILE)
+  endif
+endif
+endif
+
+CREATABLEPATHS:=$$(CREATABLEPATHS) $(INTERMEDIATEPATH)
+
+endef
+
+$(eval $(foreach F,$(ASMFILES), $(call e32abiv2_asm,$(call mapasm2object,$(F)),$(F))))
+CLEANTARGETS:=$(CLEANTARGETS) $(ASMFILES_LINKOBJECTS)
+
+endif # ifneq ($(TARGETTYPE),implib)
+
+
+########################## Build ROMFILE target ############################
+EPOC_ROOT:=$(patsubst %/,%,$(EPOCROOT))
+TOBLDINF:=$(dir $(subst :,,$(subst $(EPOC_ROOT)/,,$(COMPONENT_META))))
+
+# Only build ROMFILE if asked
+ifneq ($(filter ROMFILE,$(call uppercase,$(MAKECMDGOALS))),)
+    ifeq ($(ROMFILE_$(call sanitise,$(TARGET).$(REQUESTEDTARGETEXT))),)
+        ROMFILE_$(call sanitise,$(TARGET).$(REQUESTEDTARGETEXT)):=1
+        ROMDIR:=$(EPOC_ROOT)/epoc32/rom/$(TOBLDINF)
+
+        # Default values
+        ROMFILETYPE:=file
+        ROMFILE:=$(TARGET).$(REQUESTEDTARGETEXT)
+        ROMPATH:=sys/bin/
+        ROMDECORATIONS:=
+        ROMFILETYPE_RAM:=data
+        ROMFILE_RAM:=$(TARGET).$(REQUESTEDTARGETEXT)
+        ROMPATH_RAM:=sys/bin/
+        BUILDROMTARGET:=1
+        ABIDIR:=MAIN
+
+        $(eval $(call DoRomSet))
+
+        ifneq ($(EPOCFIXEDPROCESS),)
+            ROMDECORATIONS:=$(ROMDECORATIONS) fixed
+        endif
+        ifeq ($(PAGED),1)
+            ROMDECORATIONS:=$(ROMDECORATIONS) paged
+        endif
+        ifeq ($(PAGED),0)
+            ROMDECORATIONS:=$(ROMDECORATIONS) unpaged
+        endif
+
+
+        ifeq ($(TESTCODE),TRUE)
+        	# Add 'TEST' to the .iby filename
+        	ROMTEST:=test
+            ifeq ($(TEST_OPTION),BOTH)
+                DATATEXT:="data=/epoc32/data/z/test/$(MODULE)/$(VARIANTPLATFORM).auto.bat test/$(MODULE).auto.bat"\n"data=/epoc32/data/z/test/$(MODULE)/$(VARIANTPLATFORM).manual.bat test/$(MODULE).manual.bat"
+            else
+                ifneq ($(TEST_OPTION),NONE)
+                    DATATEXT:="data=/epoc32/data/z/test/$(MODULE)/$(VARIANTPLATFORM).$(TEST_OPTION).bat test/$(MODULE).$(TEST_OPTION).bat"
+                endif
+            endif
+        else
+        	DATATEXT:=
+        endif
+
+        # ROMTARGET
+        ifneq ($(ROMTARGET),)
+            ifneq ($(words $(ROMTARGET)),1)
+                ROMTARGETALL:=$(ROMTARGET)
+                ROMTARGET:=$(word 1,$(ROMTARGET))
+            endif
+
+            ifeq ($(ROMTARGET),)
+                BUILDROMTARGET:=
+            else
+                ifneq ($(ROMTARGET),+)
+                    ifneq ($(notdir $(ROMTARGET)),)
+                        ROMFILE:=$(notdir $(ROMTARGET))
+                    endif
+                    ifneq ($(dir $(ROMTARGET)),./)
+                        ROMPATH:=$(dir $(ROMTARGET))
+                    endif
+                endif
+            endif
+        endif
+    endif
+
+    ROMFILENAME:=$(ROMDIR)$(PLATFORM)$(ROMTEST).iby
+
+    # RAMTARGET
+    ifneq ($(RAMTARGET),)
+        ROMDECORATIONS_RAM:=" attrib=r"
+        ifneq ($(RAMTARGET),+)
+            ifneq ($(notdir $(RAMTARGET)),)
+                ROMFILE_RAM:=$(notdir $(RAMTARGET))
+            endif
+            ifneq ($(dir $(RAMTARGET)),./)
+                ROMPATH_RAM:=$(dir $(RAMTARGET))
+            endif
+        endif
+    endif
+
+    define BuildRomfileTarget
+        $(ALLTARGET)::ROMFILE
+        ROMFILE::
+	        $(call startrule,rombuild)	\
+	        $(GNUMKDIR) -p $(ROMDIR) \
+            $(if $(ROMFILE_CREATED_$(TOBLDINF)),,&& echo -e "// $(subst $(EPOC_ROOT)/,,$(ROMFILENAME))\n//\n$(DATATEXT)" > $(ROMFILENAME)) \
+            $(if $(BUILDROMTARGET),&& echo "$(ROMFILETYPE)=/epoc32/release/##$(ABIDIR)##/##BUILD##/$(TARGET).$(REQUESTEDTARGETEXT)   $(1)$(ROMDECORATIONS)" >> $(ROMFILENAME))	\
+	        $(if $(RAMTARGET),&& echo "$(ROMFILETYPE_RAM)=/epoc32/release/##$(ABIDIR)##/##BUILD##/$(TARGET).$(REQUESTEDTARGETEXT)   $(ROMPATH_RAM)$(ROMFILE_RAM)$(ROMDECORATIONS_RAM)" >> $(ROMFILENAME))	\
+	        $(call endrule,buildromfiletarget)
+    endef
+
+    # When VARIANTTYPE changes, romfile is finished,
+    # apart from if this is a new component......
+    ifneq ($(PREVIOUSVARIANTTYPE),)
+        ifneq ($(VARIANTTYPE),$(PREVIOUSVARIANTTYPE))
+            ifneq ($(ROMFILE_CREATED_$(TOBLDINF)),)
+                ROMFILEFINISHED:=1
+            else
+                ROMFILEFINISHED:=
+            endif
+        endif
+    endif
+
+    # When romfile is finished, don't continue to add to it
+    ifeq ($(ROMFILEFINISHED),)
+        $(eval $(call BuildRomfileTarget,$(ROMPATH)$(ROMFILE)))
+    endif
+
+    # Don't allow romfile to be recreated for every MMP
+    ifeq ($(ROMFILE_CREATED_$(TOBLDINF)),)
+        ROMFILE_CREATED_$(TOBLDINF):=1
+    endif
+
+    # Build other ROMTARGETs if there is more than one
+    ifneq ($(ROMTARGETALL),)
+        RAMTARGET:=
+        $(foreach ROMTARGET,$(wordlist 2,$(words $(ROMTARGETALL)),$(ROMTARGETALL)),$(eval $(call BuildRomfileTarget,$(ROMTARGET))))
+        ROMTARGETALL:=
+    endif
+
+    # Keep track of variant type while romfile is being created
+    PREVIOUSVARIANTTYPE:=$(VARIANTTYPE)
+
+    WHATRELEASE:=$(WHATRELEASE) $(ROMFILENAME)
+    CLEANTARGETS:=$(CLEANTARGETS) $(ROMFILENAME)
+endif
+
+# Deal with test code batch files generation.
+ifneq ($(TESTPATH),)
+
+    CREATABLEPATHS:=$(CREATABLEPATHS) $(EPOCROOT)/epoc32/data/z/test/
+    $(eval $(call MakeTestBatchFiles,$(TARGET),$(EPOCROOT)/epoc32/data/z/test/$(MODULE)/$(VARIANTPLATFORM).$(TESTPATH)))
+    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 ######################
+
+# Feature Variation requires a .vmap file to be created for each binary
+#
+ifneq ($(FEATUREVARIANTNAME),)
+ifneq ($(E32TARGET),)
+
+OUTPUTVMAP:=$(E32TARGET).vmap
+WHATRELEASE:=$(WHATRELEASE) $(OUPUTVMAP)
+
+TARGET:: $(OUTPUTVMAP)
+VMAPNEEDS:=$(E32TARGET) $(SOURCE) $(PROJECT_META)
+
+BV_SOURCELIST:=$(addprefix -s ,$(SOURCE) $(PROJECT_META))
+BV_FEATURELIST:=$(addprefix -f ,$(FEATURELISTFILES))
+BV_USER_INCLUDES:=$(addprefix -u ,$(USERINCLUDE))
+BV_SYSTEM_INCLUDES:=$(addprefix -x ,$(SYSTEMINCLUDE))
+
+# translate double quoted macros because $(shell) messes them up in some make engines
+BV_MACROLIST:=$(COMPILER_INTERWORK_DEFINES) $(CDEFS) $(if $(ALWAYS_BUILD_AS_ARM),,$(COMPILER_THUMB_DEFINES))
+BV_DEFINES:=$(call makemacrodef,-D,$(subst ",__SBS__QUOTE__,$(BV_MACROLIST)))
+
+# the script to generate our .vmap file and hash value
+VMAPCOMMAND:=$(CREATEVMAP) -o $(OUTPUTVMAP) $(BV_FEATURELIST) $(BV_DEFINES) -p $(PREINCLUDE) $(BV_SOURCELIST) $(BV_USER_INCLUDES) $(BV_SYSTEM_INCLUDES) -c $(CREATEVMAPCPP)
+
+# a recipe to create the .vmap from the "sources" with the createvmap script
+$(call raptor_recipe,createvmap,$(OUTPUTVMAP),$(VMAPNEEDS),$(VMAPCOMMAND))
+
+endif # E32TARGET != ""
+endif # FEATUREVARIANTNAME != ""
+
+########################### CONCLUSION ###################################
+
+# make the output directories while reading makefile - some build engines prefer this
+$(call makepath,$(CREATABLEPATHS))
+
+## Clean up
+$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS) ,$(CREATABLEPATHS),))
+
+# For the abld -what target
+$(eval $(call whatmacro,$(filter-out %.sym,$(WHATRELEASE)),WHATARMV5))
+
+endif # FEATUREVARIANTNAME=="" or FEATUREVARIANT==1
+
+## The End
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/e32abiv2ani.flm
--- a/sbsv2/raptor/lib/flm/e32abiv2ani.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2ani.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,56 +1,56 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# ARMv5 EXE/DLL ABIv2 Function Like Makefile (FLM)
-# Build a window server animation DLL. 
-# 
-#
-
-ifeq ($(TARGETTYPE),ani)
-include $(FLMHOME)/e32abiv2defaults.mk
-
-# What we need to build a DLL
-CANHAVEEXPORTS:=1
-POSTLINKTARGETTYPE:=ANI
-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))
-
-ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
-endif
-
-LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib
-STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB)
-CANIGNORENONCALLABLE:=1
-
-UID2:=10003b22
-
-
-# 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
-# and restore it afterwards
-$(call vsave,CDEFS)
-CDEFS:=$(CDEFS) __DLL__
-include $(FLMHOME)/e32abiv2.flm
-$(call vrestore)
-
-else
-$(error $e32abiv2dll.flm called with wrong TARGETTYPE (should be 'ani' but is '$(TARGETTYPE)'))
-endif
-
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# ARMv5 EXE/DLL ABIv2 Function Like Makefile (FLM)
+# Build a window server animation DLL. 
+# 
+#
+
+ifeq ($(TARGETTYPE),ani)
+include $(FLMHOME)/e32abiv2defaults.mk
+
+# What we need to build a DLL
+CANHAVEEXPORTS:=1
+POSTLINKTARGETTYPE:=ANI
+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))
+
+ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
+endif
+
+LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib
+STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB)
+CANIGNORENONCALLABLE:=1
+
+UID2:=10003b22
+
+
+# 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
+# and restore it afterwards
+$(call vsave,CDEFS)
+CDEFS:=$(CDEFS) __DLL__
+include $(FLMHOME)/e32abiv2.flm
+$(call vrestore)
+
+else
+$(error $e32abiv2dll.flm called with wrong TARGETTYPE (should be 'ani' but is '$(TARGETTYPE)'))
+endif
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/e32abiv2defaults.mk
--- a/sbsv2/raptor/lib/flm/e32abiv2defaults.mk	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2defaults.mk	Mon Nov 16 09:46:46 2009 +0000
@@ -1,91 +1,91 @@
-#
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# e32abiv2defaults.flm
-# ARMv5 EXE/DLL ABIv2 Function Like Makefile (FLM)
-#
-
-# This is for variables that are not set in an FLM call but
-# only in e32abiv2 flms.  
-
-AUTOEXPORTS:=
-CANHAVEEXPORTS:=
-CANIGNORENONCALLABLE:=
-DOPOSTLINK:=
-IMPORTLIBRARYREQUIRED:=
-LINKER_ENTRYPOINT_LIBDEP:=
-LINKER_ENTRYPOINT_SETTING:=
-LINKER_STUB_LIBRARY:=
-NAMEDSYMLKUP:=
-POSTLINKDEFFILE:=
-POSTLINKFILETYPE:=
-POSTLINKTARGETTYPE:=
-STATIC_RUNTIME_LIB:=
-SUPPORT_FREEZE:=
-NOHIDEALL:=
-DEFAULT_NEWLIB:=$(DEFAULT_SYMBIAN_NEWLIB)
-
-
-# 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_ENTRYPOINT_ADORNMENT:=
-LINKER_ENTRYPOINT_DECORATION:=
-
-# For GCCE
-ifeq ($(TOOLCHAIN),GCCE)
-LINKER_ENTRYPOINT_DECORATION:=$(if $(call isoneof,$(TARGETTYPE),exexp exe),-u _E32Startup,-u _E32Dll)
-endif
-
-# For RVCT
-ifeq ($(TOOLCHAIN),RVCT)
-  ifeq ($(call isoneof,$(TARGETTYPE),exe stdexe),1) # isoneof returns 1 if true, empty string if false
-	LINKER_ENTRYPOINT_ADORNMENT:=(uc_exe_.o)
-  endif
-
-  ifeq ($(call isoneof,$(TARGETTYPE),ani textnotifier2 stddll plugin fsy pdl dll),1)
-	LINKER_ENTRYPOINT_ADORNMENT:=(uc_dll_.o)
-  endif
-
-  ifeq ($(call isoneof,$(TARGETTYPE),var var2),1)
-	LINKER_ENTRYPOINT_ADORNMENT:=(v_entry_.o)
-  endif
-
-  ifeq ($(call isoneof,$(TARGETTYPE),ldd pdd),1)
-	LINKER_ENTRYPOINT_ADORNMENT:=(D_ENTRY_.o)
-  endif
-
-  ifeq ($(TARGETTYPE),kext)
-	LINKER_ENTRYPOINT_ADORNMENT:=(X_ENTRY_.o)
-  endif
-
-  ifeq ($(TARGETTYPE),kdll)
-	LINKER_ENTRYPOINT_ADORNMENT:=(L_ENTRY_.o)
-  endif
-endif
-
-# "OPTION" metadata from the front-end can potentially be supplied simultaneously for both GCCE and RVCT,
-# so we need to make a decision on what we make use of based on the TOOLCHAIN in use.
-# Currently we only support changes to RVCT tool calls.
-
-LINKEROPTION:=
-OPTION_COMPILER:=
-OPTION_REPLACE_COMPILER:=
-
-ifeq ($(TOOLCHAIN),RVCT)
-  LINKEROPTION:=$(LINKEROPTION_ARMCC)
-  OPTION_COMPILER:=$(OPTION_ARMCC)
-  OPTION_REPLACE_COMPILER:=$(OPTION_REPLACE_ARMCC)
-endif
+#
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# e32abiv2defaults.flm
+# ARMv5 EXE/DLL ABIv2 Function Like Makefile (FLM)
+#
+
+# This is for variables that are not set in an FLM call but
+# only in e32abiv2 flms.  
+
+AUTOEXPORTS:=
+CANHAVEEXPORTS:=
+CANIGNORENONCALLABLE:=
+DOPOSTLINK:=
+IMPORTLIBRARYREQUIRED:=
+LINKER_ENTRYPOINT_LIBDEP:=
+LINKER_ENTRYPOINT_SETTING:=
+LINKER_STUB_LIBRARY:=
+NAMEDSYMLKUP:=
+POSTLINKDEFFILE:=
+POSTLINKFILETYPE:=
+POSTLINKTARGETTYPE:=
+STATIC_RUNTIME_LIB:=
+SUPPORT_FREEZE:=
+NOHIDEALL:=
+DEFAULT_NEWLIB:=$(DEFAULT_SYMBIAN_NEWLIB)
+
+
+# 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_ENTRYPOINT_ADORNMENT:=
+LINKER_ENTRYPOINT_DECORATION:=
+
+# For GCCE
+ifeq ($(TOOLCHAIN),GCCE)
+LINKER_ENTRYPOINT_DECORATION:=$(if $(call isoneof,$(TARGETTYPE),exexp exe),-u _E32Startup,-u _E32Dll)
+endif
+
+# For RVCT
+ifeq ($(TOOLCHAIN),RVCT)
+  ifeq ($(call isoneof,$(TARGETTYPE),exe stdexe),1) # isoneof returns 1 if true, empty string if false
+	LINKER_ENTRYPOINT_ADORNMENT:=(uc_exe_.o)
+  endif
+
+  ifeq ($(call isoneof,$(TARGETTYPE),ani textnotifier2 stddll plugin fsy pdl dll),1)
+	LINKER_ENTRYPOINT_ADORNMENT:=(uc_dll_.o)
+  endif
+
+  ifeq ($(call isoneof,$(TARGETTYPE),var var2),1)
+	LINKER_ENTRYPOINT_ADORNMENT:=(v_entry_.o)
+  endif
+
+  ifeq ($(call isoneof,$(TARGETTYPE),ldd pdd),1)
+	LINKER_ENTRYPOINT_ADORNMENT:=(D_ENTRY_.o)
+  endif
+
+  ifeq ($(TARGETTYPE),kext)
+	LINKER_ENTRYPOINT_ADORNMENT:=(X_ENTRY_.o)
+  endif
+
+  ifeq ($(TARGETTYPE),kdll)
+	LINKER_ENTRYPOINT_ADORNMENT:=(L_ENTRY_.o)
+  endif
+endif
+
+# "OPTION" metadata from the front-end can potentially be supplied simultaneously for both GCCE and RVCT,
+# so we need to make a decision on what we make use of based on the TOOLCHAIN in use.
+# Currently we only support changes to RVCT tool calls.
+
+LINKEROPTION:=
+OPTION_COMPILER:=
+OPTION_REPLACE_COMPILER:=
+
+ifeq ($(TOOLCHAIN),RVCT)
+  LINKEROPTION:=$(LINKEROPTION_ARMCC)
+  OPTION_COMPILER:=$(OPTION_ARMCC)
+  OPTION_REPLACE_COMPILER:=$(OPTION_REPLACE_ARMCC)
+endif
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/e32abiv2dll.flm
--- a/sbsv2/raptor/lib/flm/e32abiv2dll.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2dll.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,60 +1,60 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# ARMv5 EXE/DLL ABIv2 Function Like Makefile (FLM)
-# Build an e32 DLL (Dynamic Link Library)
-# 
-#
-
-ifeq ($(TARGETTYPE),dll)
-include $(FLMHOME)/e32abiv2defaults.mk
-
-# What we need to build a DLL
-ifeq ($(NOEXPORTLIBRARY),)
-IMPORTLIBRARYREQUIRED:=1
-endif
-POSTLINKDEFFILE:=$(DEFFILE)
-SUPPORT_FREEZE:=1
-
-# 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))
-
-ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
-endif
-
-LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib
-STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB)
-
-
-# Default Postlinker settings
-CANHAVEEXPORTS:=1
-POSTLINKTARGETTYPE:=DLL
-POSTLINKFILETYPE:=dll
-DOPOSTLINK:=1
-CANIGNORENONCALLABLE:=1
-
-# Use the general EABI FLM 
-# 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
-# and restore it afterwards
-$(call vsave,CDEFS)
-CDEFS:=$(CDEFS) __DLL__
-include $(FLMHOME)/e32abiv2.flm
-$(call vrestore)
-
-else
-$(error $e32abiv2dll.flm called with wrong TARGETTYPE (should be 'dll' but is '$(TARGETTYPE)'))
-endif
-
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# ARMv5 EXE/DLL ABIv2 Function Like Makefile (FLM)
+# Build an e32 DLL (Dynamic Link Library)
+# 
+#
+
+ifeq ($(TARGETTYPE),dll)
+include $(FLMHOME)/e32abiv2defaults.mk
+
+# What we need to build a DLL
+ifeq ($(NOEXPORTLIBRARY),)
+IMPORTLIBRARYREQUIRED:=1
+endif
+POSTLINKDEFFILE:=$(DEFFILE)
+SUPPORT_FREEZE:=1
+
+# 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))
+
+ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
+endif
+
+LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib
+STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB)
+
+
+# Default Postlinker settings
+CANHAVEEXPORTS:=1
+POSTLINKTARGETTYPE:=DLL
+POSTLINKFILETYPE:=dll
+DOPOSTLINK:=1
+CANIGNORENONCALLABLE:=1
+
+# Use the general EABI FLM 
+# 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
+# and restore it afterwards
+$(call vsave,CDEFS)
+CDEFS:=$(CDEFS) __DLL__
+include $(FLMHOME)/e32abiv2.flm
+$(call vrestore)
+
+else
+$(error $e32abiv2dll.flm called with wrong TARGETTYPE (should be 'dll' but is '$(TARGETTYPE)'))
+endif
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/e32abiv2exe.flm
--- a/sbsv2/raptor/lib/flm/e32abiv2exe.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2exe.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,49 +1,47 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# ARMv5 EXE/DLL ABIv2 Function Like Makefile (FLM)
-# Build an e32 EXE
-# 
-#
-
-# What we need to build an EXE
-
-ifeq ($(TARGETTYPE),exe)
-include $(FLMHOME)/e32abiv2defaults.mk
-
-POSTLINKTARGETTYPE:=EXE
-POSTLINKFILETYPE:=exe
-DOPOSTLINK:=1
-# Determine what kind of entrypoint option to set
-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)) 
-
-ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
-endif
-
-STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB)
-
-MAKEDEFFILE:=
-
-$(call vsave,CDEFS)
-CDEFS:=$(CDEFS) __EXE__
-include $(FLMHOME)/e32abiv2.flm
-$(call vrestore)
-
-else
-$(error $e32abiv2exe.flm called with wrong TARGETTYPE (should be 'exe' but is '$(TARGETTYPE)'))
-endif
-
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# ARMv5 EXE/DLL ABIv2 Function Like Makefile (FLM)
+# Build an e32 EXE
+# 
+#
+
+# What we need to build an EXE
+
+ifeq ($(TARGETTYPE),exe)
+include $(FLMHOME)/e32abiv2defaults.mk
+
+POSTLINKTARGETTYPE:=EXE
+POSTLINKFILETYPE:=exe
+DOPOSTLINK:=1
+# Determine what kind of entrypoint option to set
+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)) 
+
+ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
+endif
+
+STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB)
+
+$(call vsave,CDEFS)
+CDEFS:=$(CDEFS) __EXE__
+include $(FLMHOME)/e32abiv2.flm
+$(call vrestore)
+
+else
+$(error $e32abiv2exe.flm called with wrong TARGETTYPE (should be 'exe' but is '$(TARGETTYPE)'))
+endif
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/e32abiv2exexp.flm
--- a/sbsv2/raptor/lib/flm/e32abiv2exexp.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2exexp.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,83 +1,83 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# ARMv5 EXE/DLL ABIv2 Function Like Makefile (FLM)
-# Build an e32 EXE with exports
-# 
-#
-
-ifeq ($(TARGETTYPE),exexp)
-include $(FLMHOME)/e32abiv2defaults.mk
-
-# What we need to build an EXEXP
-CANHAVEEXPORTS:=1
-POSTLINKTARGETTYPE:=EXEXP
-POSTLINKFILETYPE:=exe
-DOPOSTLINK:=1
-EPOCALLOWDLLDATA:=1
-CANIGNORENONCALLABLE:=1
-
-$(call vsave,CDEFS)
-# Determine what kind of entrypoint option to set
-FIRSTLIB_OBJECTFILE=uc_exe_.o
-STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB)
-
-ifeq ($(FIRSTLIB),)
-FIRSTLIB:=eexe.lib
-else
-ifneq ($(findstring kc_exe,$(FIRSTLIB))$(findstring KC_EXE,$(FIRSTLIB)),)
-STATIC_RUNTIME_LIB:=$(KERNEL_STATIC_RUNTIME_LIB)
-CDEFS:=$(CDEFS) __KERNEL_MODE__
-FIRSTLIB_OBJECTFILE=k_entry_.o
-# Kernel code builds as arm
-ALWAYS_BUILD_AS_ARM:=1
-# No exception support for kernel code
-EXCEPTIONS:=$(NO_EXCEPTIONS)
-# No dedicated library for operator new/delete functions.
-HAS_DEDICATED_OP_NEWDEL_LIB:=
-
-endif
-endif
-
-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)))
-else
-# GCCE
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Startup -u _E32Startup  $(call dblquote,$(STATIC_RUNTIME_DIR)/$(FIRSTLIB))
-endif
-
-ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
-endif
-
-
-POSTLINKDEFFILE:=$(DEFFILE)
-SUPPORT_FREEZE:=1
-ifeq ($(NOEXPORTLIBRARY),)
-IMPORTLIBRARYREQUIRED:=1
-else
-IMPORTLIBRARYREQUIRED:=
-endif
-
-
-CDEFS:=$(CDEFS) __EXE__
-include $(FLMHOME)/e32abiv2.flm
-$(call vrestore)
-
-
-else
-$(error $e32abiv2exexp.flm called with wrong TARGETTYPE (should be 'exexp' but is '$(TARGETTYPE)'))
-endif
-
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# ARMv5 EXE/DLL ABIv2 Function Like Makefile (FLM)
+# Build an e32 EXE with exports
+# 
+#
+
+ifeq ($(TARGETTYPE),exexp)
+include $(FLMHOME)/e32abiv2defaults.mk
+
+# What we need to build an EXEXP
+CANHAVEEXPORTS:=1
+POSTLINKTARGETTYPE:=EXEXP
+POSTLINKFILETYPE:=exe
+DOPOSTLINK:=1
+EPOCALLOWDLLDATA:=1
+CANIGNORENONCALLABLE:=1
+
+$(call vsave,CDEFS)
+# Determine what kind of entrypoint option to set
+FIRSTLIB_OBJECTFILE=uc_exe_.o
+STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB)
+
+ifeq ($(FIRSTLIB),)
+FIRSTLIB:=eexe.lib
+else
+ifneq ($(findstring kc_exe,$(FIRSTLIB))$(findstring KC_EXE,$(FIRSTLIB)),)
+STATIC_RUNTIME_LIB:=$(KERNEL_STATIC_RUNTIME_LIB)
+CDEFS:=$(CDEFS) __KERNEL_MODE__
+FIRSTLIB_OBJECTFILE=k_entry_.o
+# Kernel code builds as arm
+ALWAYS_BUILD_AS_ARM:=1
+# No exception support for kernel code
+EXCEPTIONS:=$(NO_EXCEPTIONS)
+# No dedicated library for operator new/delete functions.
+HAS_DEDICATED_OP_NEWDEL_LIB:=
+
+endif
+endif
+
+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)))
+else
+# GCCE
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION) _E32Startup -u _E32Startup  $(call dblquote,$(STATIC_RUNTIME_DIR)/$(FIRSTLIB))
+endif
+
+ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
+endif
+
+
+POSTLINKDEFFILE:=$(DEFFILE)
+SUPPORT_FREEZE:=1
+ifeq ($(NOEXPORTLIBRARY),)
+IMPORTLIBRARYREQUIRED:=1
+else
+IMPORTLIBRARYREQUIRED:=
+endif
+
+
+CDEFS:=$(CDEFS) __EXE__
+include $(FLMHOME)/e32abiv2.flm
+$(call vrestore)
+
+
+else
+$(error $e32abiv2exexp.flm called with wrong TARGETTYPE (should be 'exexp' but is '$(TARGETTYPE)'))
+endif
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/e32abiv2fsy.flm
--- a/sbsv2/raptor/lib/flm/e32abiv2fsy.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2fsy.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,55 +1,55 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# ARMv5 EXE/DLL ABIv2 Function Like Makefile (FLM)
-# Build an e32 fsy - a filesystem driver
-# 
-#
-
-ifeq ($(TARGETTYPE),fsy)
-include $(FLMHOME)/e32abiv2defaults.mk
-
-# What we need to build a DLL
-CANHAVEEXPORTS:=1
-POSTLINKTARGETTYPE:=FSY
-POSTLINKFILETYPE:=fsy
-DOPOSTLINK:=1
-
-# 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))
-
-ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
-endif
-
-LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib
-
-UID2:=100039df
-STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB)
-CANIGNORENONCALLABLE:=1
-
-
-# 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
-# and restore it afterwards
-$(call vsave,CDEFS)
-CDEFS:=$(CDEFS) __DLL__
-include $(FLMHOME)/e32abiv2.flm
-$(call vrestore)
-
-else
-$(error $e32abiv2fsy.flm called with wrong TARGETTYPE (should be 'fsy' but is '$(TARGETTYPE)'))
-endif
-
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# ARMv5 EXE/DLL ABIv2 Function Like Makefile (FLM)
+# Build an e32 fsy - a filesystem driver
+# 
+#
+
+ifeq ($(TARGETTYPE),fsy)
+include $(FLMHOME)/e32abiv2defaults.mk
+
+# What we need to build a DLL
+CANHAVEEXPORTS:=1
+POSTLINKTARGETTYPE:=FSY
+POSTLINKFILETYPE:=fsy
+DOPOSTLINK:=1
+
+# 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))
+
+ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
+endif
+
+LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib
+
+UID2:=100039df
+STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB)
+CANIGNORENONCALLABLE:=1
+
+
+# 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
+# and restore it afterwards
+$(call vsave,CDEFS)
+CDEFS:=$(CDEFS) __DLL__
+include $(FLMHOME)/e32abiv2.flm
+$(call vrestore)
+
+else
+$(error $e32abiv2fsy.flm called with wrong TARGETTYPE (should be 'fsy' but is '$(TARGETTYPE)'))
+endif
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/e32abiv2implib.flm
--- a/sbsv2/raptor/lib/flm/e32abiv2implib.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2implib.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,46 +1,46 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# ARMv5 LIB ABIv2 Function Like Makefile (FLM)
-# Build an e32 static library
-# 
-#
-
-ifeq ($(TARGETTYPE),implib)
-include $(FLMHOME)/e32abiv2defaults.mk
-
-# What we need to build an import library
-POSTLINKFILETYPE:=dll
-# Determine what kind of entrypoint option to set
-IMPORTLIBRARYREQUIRED:=1
-POSTLINKDEFFILE:=$(DEFFILE)
-SUPPORT_FREEZE:=1
-
-# Import libraries are always built as .dso but
-# in their --linkas option they are meant to
-# "front" a dll.  So:
-REQUESTEDTARGETEXT:=dll
-# if there is a LINKAS variable then this won't matter
-
-
-# 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
-# and restore it afterwards
-$(call vsave,CDEFS)
-CDEFS:=$(CDEFS) __DLL__
-include $(FLMHOME)/e32abiv2.flm
-$(call vrestore)
-
-else
-$(error $e32abiv2implib.flm called with wrong TARGETTYPE (should be 'implib' but is '$(TARGETTYPE)'))
-endif
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# ARMv5 LIB ABIv2 Function Like Makefile (FLM)
+# Build an e32 static library
+# 
+#
+
+ifeq ($(TARGETTYPE),implib)
+include $(FLMHOME)/e32abiv2defaults.mk
+
+# What we need to build an import library
+POSTLINKFILETYPE:=dll
+# Determine what kind of entrypoint option to set
+IMPORTLIBRARYREQUIRED:=1
+POSTLINKDEFFILE:=$(DEFFILE)
+SUPPORT_FREEZE:=1
+
+# Import libraries are always built as .dso but
+# in their --linkas option they are meant to
+# "front" a dll.  So:
+REQUESTEDTARGETEXT:=dll
+# if there is a LINKAS variable then this won't matter
+
+
+# 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
+# and restore it afterwards
+$(call vsave,CDEFS)
+CDEFS:=$(CDEFS) __DLL__
+include $(FLMHOME)/e32abiv2.flm
+$(call vrestore)
+
+else
+$(error $e32abiv2implib.flm called with wrong TARGETTYPE (should be 'implib' but is '$(TARGETTYPE)'))
+endif
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/e32abiv2kdll.flm
--- a/sbsv2/raptor/lib/flm/e32abiv2kdll.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2kdll.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,69 +1,69 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# ARMv5 KDLL ABIv2 Function Like Makefile (FLM)
-# Build an e32 KDLL (Kernel DLL)
-# 
-#
-
-ifeq ($(TARGETTYPE),kdll)
-include $(FLMHOME)/e32abiv2defaults.mk
-
-# What we need to build a Kernel DLL
-CANHAVEEXPORTS:=1
-POSTLINKTARGETTYPE:=DLL
-POSTLINKFILETYPE:=dll
-DOPOSTLINK:=1
-
-# 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))
-
-ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
-endif
-
-LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib
-STATIC_RUNTIME_LIB:=$(KERNEL_STATIC_RUNTIME_LIB)
-RUNTIME_LIBS_LIST:=
-
-# Kernel code builds as arm
-ALWAYS_BUILD_AS_ARM:=1
-
-# No dedicated library for operator new/delete functions.
-HAS_DEDICATED_OP_NEWDEL_LIB:=
-
-BASELIBS:=ekll.lib
-ifeq ($(NOEXPORTLIBRARY),)
-IMPORTLIBRARYREQUIRED:=1
-endif
-POSTLINKDEFFILE:=$(DEFFILE)
-
-# No exception support for kernel code?
-EXCEPTIONS:=$(NO_EXCEPTIONS)
-
-
-
-# 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
-# and restore it afterwards
-$(call vsave,CDEFS SYSTEMINCLUDE)
-SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(EPOCROOT)/epoc32/include/nkern $(EPOCROOT)/epoc32/include/kernel/arm $(EPOCROOT)/epoc32/include/memmodel/epoc $(EPOCROOT)/epoc32/include/kernel  $(EPOCROOT)/epoc32/include/nkern/arm
-CDEFS:=$(CDEFS) __DLL__ __KERNEL_MODE__
-include $(FLMHOME)/e32abiv2.flm
-$(call vrestore)
-
-else
-$(error $e32abiv2kdll.flm called with wrong TARGETTYPE (should be 'kdll' but is '$(TARGETTYPE)'))
-endif
-
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# ARMv5 KDLL ABIv2 Function Like Makefile (FLM)
+# Build an e32 KDLL (Kernel DLL)
+# 
+#
+
+ifeq ($(TARGETTYPE),kdll)
+include $(FLMHOME)/e32abiv2defaults.mk
+
+# What we need to build a Kernel DLL
+CANHAVEEXPORTS:=1
+POSTLINKTARGETTYPE:=DLL
+POSTLINKFILETYPE:=dll
+DOPOSTLINK:=1
+
+# 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))
+
+ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
+endif
+
+LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib
+STATIC_RUNTIME_LIB:=$(KERNEL_STATIC_RUNTIME_LIB)
+RUNTIME_LIBS_LIST:=
+
+# Kernel code builds as arm
+ALWAYS_BUILD_AS_ARM:=1
+
+# No dedicated library for operator new/delete functions.
+HAS_DEDICATED_OP_NEWDEL_LIB:=
+
+BASELIBS:=ekll.lib
+ifeq ($(NOEXPORTLIBRARY),)
+IMPORTLIBRARYREQUIRED:=1
+endif
+POSTLINKDEFFILE:=$(DEFFILE)
+
+# No exception support for kernel code?
+EXCEPTIONS:=$(NO_EXCEPTIONS)
+
+
+
+# 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
+# and restore it afterwards
+$(call vsave,CDEFS SYSTEMINCLUDE)
+SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(EPOCROOT)/epoc32/include/nkern $(EPOCROOT)/epoc32/include/kernel/arm $(EPOCROOT)/epoc32/include/memmodel/epoc $(EPOCROOT)/epoc32/include/kernel  $(EPOCROOT)/epoc32/include/nkern/arm
+CDEFS:=$(CDEFS) __DLL__ __KERNEL_MODE__
+include $(FLMHOME)/e32abiv2.flm
+$(call vrestore)
+
+else
+$(error $e32abiv2kdll.flm called with wrong TARGETTYPE (should be 'kdll' but is '$(TARGETTYPE)'))
+endif
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/e32abiv2kext.flm
--- a/sbsv2/raptor/lib/flm/e32abiv2kext.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2kext.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,78 +1,78 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# ARMv5 KEXT ABIv2 Function Like Makefile (FLM)
-# Build an e32 KEXT (Kernel Extension)
-# 
-#
-
-ifeq ($(TARGETTYPE),kext)
-include $(FLMHOME)/e32abiv2defaults.mk
-
-
-# What we need to build a Kernel Extension
-# an import library isn't strictly required, apparently. So only try to
-# generate one if the def file exists.
-ifeq ($(NOEXPORTLIBRARY),)
-ifneq ($(DEFFILE),)
-IMPORTLIBRARYREQUIRED:=1
-endif
-endif
-
-POSTLINKDEFFILE:=$(DEFFILE)
-SUPPORT_FREEZE:=1
-
-# 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))
-
-ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
-endif
-
-LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib
-STATIC_RUNTIME_LIB:=$(KERNEL_STATIC_RUNTIME_LIB)
-RUNTIME_LIBS_LIST:=
-CANIGNORENONCALLABLE:=1
-
-# Kernel code builds as arm
-ALWAYS_BUILD_AS_ARM:=1
-CANHAVEEXPORTS:=1
-POSTLINKTARGETTYPE:=KEXT
-POSTLINKFILETYPE:=dll
-DOPOSTLINK:=1
-
-# No dedicated library for operator new/delete functions.
-HAS_DEDICATED_OP_NEWDEL_LIB:=
-
-# No exception support for kernel code?
-EXCEPTIONS:=$(NO_EXCEPTIONS)
-
-
-BASELIBS:=eext.lib
-
-
-# Use the general EABI FLM 
-# We are appending to CDEFS and SYSTEMINCLUDE but we don't want this to affect
-# other invocations so we are going to save it on a stack
-# and restore it afterwards
-$(call vsave,CDEFS SYSTEMINCLUDE)
-SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(EPOCROOT)/epoc32/include/nkern $(EPOCROOT)/epoc32/include/kernel/arm $(EPOCROOT)/epoc32/include/memmodel/epoc $(EPOCROOT)/epoc32/include/kernel  $(EPOCROOT)/epoc32/include/nkern/arm
-CDEFS:=$(CDEFS) __DLL__ __KERNEL_MODE__
-include $(FLMHOME)/e32abiv2.flm
-$(call vrestore)
-
-else
-$(error $e32abiv2kext.flm called with wrong TARGETTYPE (should be 'kext' but is '$(TARGETTYPE)'))
-endif
-
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# ARMv5 KEXT ABIv2 Function Like Makefile (FLM)
+# Build an e32 KEXT (Kernel Extension)
+# 
+#
+
+ifeq ($(TARGETTYPE),kext)
+include $(FLMHOME)/e32abiv2defaults.mk
+
+
+# What we need to build a Kernel Extension
+# an import library isn't strictly required, apparently. So only try to
+# generate one if the def file exists.
+ifeq ($(NOEXPORTLIBRARY),)
+ifneq ($(DEFFILE),)
+IMPORTLIBRARYREQUIRED:=1
+endif
+endif
+
+POSTLINKDEFFILE:=$(DEFFILE)
+SUPPORT_FREEZE:=1
+
+# 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))
+
+ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
+endif
+
+LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib
+STATIC_RUNTIME_LIB:=$(KERNEL_STATIC_RUNTIME_LIB)
+RUNTIME_LIBS_LIST:=
+CANIGNORENONCALLABLE:=1
+
+# Kernel code builds as arm
+ALWAYS_BUILD_AS_ARM:=1
+CANHAVEEXPORTS:=1
+POSTLINKTARGETTYPE:=KEXT
+POSTLINKFILETYPE:=dll
+DOPOSTLINK:=1
+
+# No dedicated library for operator new/delete functions.
+HAS_DEDICATED_OP_NEWDEL_LIB:=
+
+# No exception support for kernel code?
+EXCEPTIONS:=$(NO_EXCEPTIONS)
+
+
+BASELIBS:=eext.lib
+
+
+# Use the general EABI FLM 
+# We are appending to CDEFS and SYSTEMINCLUDE but we don't want this to affect
+# other invocations so we are going to save it on a stack
+# and restore it afterwards
+$(call vsave,CDEFS SYSTEMINCLUDE)
+SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(EPOCROOT)/epoc32/include/nkern $(EPOCROOT)/epoc32/include/kernel/arm $(EPOCROOT)/epoc32/include/memmodel/epoc $(EPOCROOT)/epoc32/include/kernel  $(EPOCROOT)/epoc32/include/nkern/arm
+CDEFS:=$(CDEFS) __DLL__ __KERNEL_MODE__
+include $(FLMHOME)/e32abiv2.flm
+$(call vrestore)
+
+else
+$(error $e32abiv2kext.flm called with wrong TARGETTYPE (should be 'kext' but is '$(TARGETTYPE)'))
+endif
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/e32abiv2klib.flm
--- a/sbsv2/raptor/lib/flm/e32abiv2klib.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2klib.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,41 +1,41 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# ARMv5 LIB ABIv2 Function Like Makefile (FLM)
-# Build an e32 static library for kernel code
-# 
-#
-
-ifeq ($(TARGETTYPE),klib)
-include $(FLMHOME)/e32abiv2defaults.mk
-
-# What we need to build a kernel LIB
-POSTLINKFILETYPE:=lib
-
-# Kernel code builds as arm
-ALWAYS_BUILD_AS_ARM:=1
-
-# No exception support for kernel code?
-EXCEPTIONS:=$(NO_EXCEPTIONS)
-
-# 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
-# and restore it afterwards
-$(call vsave,CDEFS)
-CDEFS:=$(CDEFS) __KERNEL_MODE__
-include $(FLMHOME)/e32abiv2.flm
-$(call vrestore)
-
-else
-$(error $e32abiv2klib.flm called with wrong TARGETTYPE (should be 'klib' but is '$(TARGETTYPE)'))
-endif
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# ARMv5 LIB ABIv2 Function Like Makefile (FLM)
+# Build an e32 static library for kernel code
+# 
+#
+
+ifeq ($(TARGETTYPE),klib)
+include $(FLMHOME)/e32abiv2defaults.mk
+
+# What we need to build a kernel LIB
+POSTLINKFILETYPE:=lib
+
+# Kernel code builds as arm
+ALWAYS_BUILD_AS_ARM:=1
+
+# No exception support for kernel code?
+EXCEPTIONS:=$(NO_EXCEPTIONS)
+
+# 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
+# and restore it afterwards
+$(call vsave,CDEFS)
+CDEFS:=$(CDEFS) __KERNEL_MODE__
+include $(FLMHOME)/e32abiv2.flm
+$(call vrestore)
+
+else
+$(error $e32abiv2klib.flm called with wrong TARGETTYPE (should be 'klib' but is '$(TARGETTYPE)'))
+endif
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/e32abiv2ldd.flm
--- a/sbsv2/raptor/lib/flm/e32abiv2ldd.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2ldd.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,80 +1,80 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# ARMv5 ldd ABIv2 Function Like Makefile (FLM)
-# Build an e32 ldd (Logical Device Driver)
-# 
-#
-
-ifeq ($(TARGETTYPE),ldd)
-include $(FLMHOME)/e32abiv2defaults.mk
-
-
-# What we need to build a Logical Device Driver
-CANHAVEEXPORTS:=1
-POSTLINKTARGETTYPE:=LDD
-POSTLINKFILETYPE:=ldd
-DOPOSTLINK:=1
-AUTOEXPORTS:=_Z19CreateLogicalDevicev,1;
-
-# 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))
-
-ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
-endif
-
-LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib
-STATIC_RUNTIME_LIB:=$(KERNEL_STATIC_RUNTIME_LIB)
-RUNTIME_LIBS_LIST:=
-CANIGNORENONCALLABLE:=1
-
-# Kernel code builds as arm
-ALWAYS_BUILD_AS_ARM:=1
-
-# No dedicated library for operator new/delete functions.
-HAS_DEDICATED_OP_NEWDEL_LIB:=
-
-BASELIBS:=edev
-UID2:=100000af
-
-# No exception support for kernel code?
-EXCEPTIONS:=$(NO_EXCEPTIONS)
-
-# Only process a def file if it's specified
-# in the MMP - not if it's merely the frontend's guess
-# at what the def file name might be
-IMPORTLIBRARYREQUIRED:=
-
-ifeq ($(NOEXPORTLIBRARY),)
-ifneq ($(DEFFILE),)
-IMPORTLIBRARYREQUIRED:=1
-endif
-endif
-POSTLINKDEFFILE:=$(DEFFILE)
-SUPPORT_FREEZE:=1
-
-# 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
-# and restore it afterwards
-$(call vsave,CDEFS SYSTEMINCLUDE)
-SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(EPOCROOT)/epoc32/include/nkern $(EPOCROOT)/epoc32/include/kernel/arm $(EPOCROOT)/epoc32/include/memmodel/epoc $(EPOCROOT)/epoc32/include/kernel  $(EPOCROOT)/epoc32/include/nkern/arm
-CDEFS:=$(CDEFS) __DLL__ __KERNEL_MODE__
-include $(FLMHOME)/e32abiv2.flm
-$(call vrestore)
-
-else
-$(error $e32abiv2ldd.flm called with wrong TARGETTYPE (should be 'ldd' but is '$(TARGETTYPE)'))
-endif
-
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# ARMv5 ldd ABIv2 Function Like Makefile (FLM)
+# Build an e32 ldd (Logical Device Driver)
+# 
+#
+
+ifeq ($(TARGETTYPE),ldd)
+include $(FLMHOME)/e32abiv2defaults.mk
+
+
+# What we need to build a Logical Device Driver
+CANHAVEEXPORTS:=1
+POSTLINKTARGETTYPE:=LDD
+POSTLINKFILETYPE:=ldd
+DOPOSTLINK:=1
+AUTOEXPORTS:=_Z19CreateLogicalDevicev,1;
+
+# 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))
+
+ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
+endif
+
+LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib
+STATIC_RUNTIME_LIB:=$(KERNEL_STATIC_RUNTIME_LIB)
+RUNTIME_LIBS_LIST:=
+CANIGNORENONCALLABLE:=1
+
+# Kernel code builds as arm
+ALWAYS_BUILD_AS_ARM:=1
+
+# No dedicated library for operator new/delete functions.
+HAS_DEDICATED_OP_NEWDEL_LIB:=
+
+BASELIBS:=edev
+UID2:=100000af
+
+# No exception support for kernel code?
+EXCEPTIONS:=$(NO_EXCEPTIONS)
+
+# Only process a def file if it's specified
+# in the MMP - not if it's merely the frontend's guess
+# at what the def file name might be
+IMPORTLIBRARYREQUIRED:=
+
+ifeq ($(NOEXPORTLIBRARY),)
+ifneq ($(DEFFILE),)
+IMPORTLIBRARYREQUIRED:=1
+endif
+endif
+POSTLINKDEFFILE:=$(DEFFILE)
+SUPPORT_FREEZE:=1
+
+# 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
+# and restore it afterwards
+$(call vsave,CDEFS SYSTEMINCLUDE)
+SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(EPOCROOT)/epoc32/include/nkern $(EPOCROOT)/epoc32/include/kernel/arm $(EPOCROOT)/epoc32/include/memmodel/epoc $(EPOCROOT)/epoc32/include/kernel  $(EPOCROOT)/epoc32/include/nkern/arm
+CDEFS:=$(CDEFS) __DLL__ __KERNEL_MODE__
+include $(FLMHOME)/e32abiv2.flm
+$(call vrestore)
+
+else
+$(error $e32abiv2ldd.flm called with wrong TARGETTYPE (should be 'ldd' but is '$(TARGETTYPE)'))
+endif
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/e32abiv2lib.flm
--- a/sbsv2/raptor/lib/flm/e32abiv2lib.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2lib.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,32 +1,32 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# ARMv5 LIB ABIv2 Function Like Makefile (FLM)
-# Build an e32 static library
-# 
-#
-
-ifeq ($(TARGETTYPE),lib)
-include $(FLMHOME)/e32abiv2defaults.mk
-
-ifeq ($(FEATUREVARIANT),1)
-$(error TARGETTYPE lib cannot be FEATUREVARIANT (in $(PROJECT_META) from $(COMPONENT_META)))
-endif
-
-POSTLINKFILETYPE:=lib
-MULTIFILE_ENABLED:=
-include $(FLMHOME)/e32abiv2.flm
-
-else
-$(error $e32abiv2dll.flm called with wrong TARGETTYPE (should be 'lib' but is '$(TARGETTYPE)'))
-endif
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# ARMv5 LIB ABIv2 Function Like Makefile (FLM)
+# Build an e32 static library
+# 
+#
+
+ifeq ($(TARGETTYPE),lib)
+include $(FLMHOME)/e32abiv2defaults.mk
+
+ifeq ($(FEATUREVARIANT),1)
+$(error TARGETTYPE lib cannot be FEATUREVARIANT (in $(PROJECT_META) from $(COMPONENT_META)))
+endif
+
+POSTLINKFILETYPE:=lib
+MULTIFILE_ENABLED:=
+include $(FLMHOME)/e32abiv2.flm
+
+else
+$(error $e32abiv2dll.flm called with wrong TARGETTYPE (should be 'lib' but is '$(TARGETTYPE)'))
+endif
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/e32abiv2none.flm
--- a/sbsv2/raptor/lib/flm/e32abiv2none.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2none.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,36 +1,36 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# ARMv5 EXE/DLL ABIv2 Function Like Makefile (FLM)
-# Build Resources only
-# 
-#
-
-ifeq ($(TARGETTYPE),none)
-include $(FLMHOME)/e32abiv2defaults.mk
-POSTLINKTARGETTYPE:=NONE
-POSTLINKFILETYPE:=none
-
-
-# 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
-# and restore it afterwards
-$(call vsave,CDEFS)
-CDEFS:=$(CDEFS) __DLL__
-include $(FLMHOME)/e32abiv2.flm
-$(call vrestore)
-
-else
-$(error $e32abiv2none.flm called with wrong TARGETTYPE (should be 'none' but is '$(TARGETTYPE)'))
-endif
-
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# ARMv5 EXE/DLL ABIv2 Function Like Makefile (FLM)
+# Build Resources only
+# 
+#
+
+ifeq ($(TARGETTYPE),none)
+include $(FLMHOME)/e32abiv2defaults.mk
+POSTLINKTARGETTYPE:=NONE
+POSTLINKFILETYPE:=none
+
+
+# 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
+# and restore it afterwards
+$(call vsave,CDEFS)
+CDEFS:=$(CDEFS) __DLL__
+include $(FLMHOME)/e32abiv2.flm
+$(call vrestore)
+
+else
+$(error $e32abiv2none.flm called with wrong TARGETTYPE (should be 'none' but is '$(TARGETTYPE)'))
+endif
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/e32abiv2pdd.flm
--- a/sbsv2/raptor/lib/flm/e32abiv2pdd.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2pdd.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,77 +1,77 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# ARMv5 pdd ABIv2 Function Like Makefile (FLM)
-# Build an e32 pdd (Physical Device Driver)
-# 
-#
-
-ifeq ($(TARGETTYPE),pdd)
-include $(FLMHOME)/e32abiv2defaults.mk
-
-# What we need to build a Logical Device Driver
-CANHAVEEXPORTS:=1
-POSTLINKTARGETTYPE:=PDD
-POSTLINKFILETYPE:=pdd
-DOPOSTLINK:=1
-AUTOEXPORTS:=_Z20CreatePhysicalDevicev,1;
-
-# 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))
-
-ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
-endif
-
-LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib
-STATIC_RUNTIME_LIB:=$(KERNEL_STATIC_RUNTIME_LIB)
-RUNTIME_LIBS_LIST:=
-CANIGNORENONCALLABLE:=1
-
-# Kernel code builds as arm
-ALWAYS_BUILD_AS_ARM:=1
-
-# No dedicated library for operator new/delete functions.
-HAS_DEDICATED_OP_NEWDEL_LIB:=
-
-
-BASELIBS:=edev
-UID2:=100039d0
-
-IMPORTLIBRARYREQUIRED:=
-# This is basically a DLL with some tweaks
-ifneq ($(DEFFILE),)
-IMPORTLIBRARYREQUIRED:=1
-endif
-POSTLINKDEFFILE:=$(DEFFILE)
-SUPPORT_FREEZE:=1
-
-# No exception support for kernel code?
-EXCEPTIONS:=$(NO_EXCEPTIONS)
-
-
-
-# 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
-# and restore it afterwards
-$(call vsave,CDEFS SYSTEMINCLUDE)
-SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(EPOCROOT)/epoc32/include/nkern $(EPOCROOT)/epoc32/include/kernel/arm $(EPOCROOT)/epoc32/include/memmodel/epoc $(EPOCROOT)/epoc32/include/kernel  $(EPOCROOT)/epoc32/include/nkern/arm
-CDEFS:=$(CDEFS) __DLL__ __KERNEL_MODE__
-include $(FLMHOME)/e32abiv2.flm
-$(call vrestore)
-
-else
-$(error $e32abiv2pdd.flm called with wrong TARGETTYPE (should be 'pdd' but is '$(TARGETTYPE)'))
-endif
-
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# ARMv5 pdd ABIv2 Function Like Makefile (FLM)
+# Build an e32 pdd (Physical Device Driver)
+# 
+#
+
+ifeq ($(TARGETTYPE),pdd)
+include $(FLMHOME)/e32abiv2defaults.mk
+
+# What we need to build a Logical Device Driver
+CANHAVEEXPORTS:=1
+POSTLINKTARGETTYPE:=PDD
+POSTLINKFILETYPE:=pdd
+DOPOSTLINK:=1
+AUTOEXPORTS:=_Z20CreatePhysicalDevicev,1;
+
+# 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))
+
+ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
+endif
+
+LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib
+STATIC_RUNTIME_LIB:=$(KERNEL_STATIC_RUNTIME_LIB)
+RUNTIME_LIBS_LIST:=
+CANIGNORENONCALLABLE:=1
+
+# Kernel code builds as arm
+ALWAYS_BUILD_AS_ARM:=1
+
+# No dedicated library for operator new/delete functions.
+HAS_DEDICATED_OP_NEWDEL_LIB:=
+
+
+BASELIBS:=edev
+UID2:=100039d0
+
+IMPORTLIBRARYREQUIRED:=
+# This is basically a DLL with some tweaks
+ifneq ($(DEFFILE),)
+IMPORTLIBRARYREQUIRED:=1
+endif
+POSTLINKDEFFILE:=$(DEFFILE)
+SUPPORT_FREEZE:=1
+
+# No exception support for kernel code?
+EXCEPTIONS:=$(NO_EXCEPTIONS)
+
+
+
+# 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
+# and restore it afterwards
+$(call vsave,CDEFS SYSTEMINCLUDE)
+SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(EPOCROOT)/epoc32/include/nkern $(EPOCROOT)/epoc32/include/kernel/arm $(EPOCROOT)/epoc32/include/memmodel/epoc $(EPOCROOT)/epoc32/include/kernel  $(EPOCROOT)/epoc32/include/nkern/arm
+CDEFS:=$(CDEFS) __DLL__ __KERNEL_MODE__
+include $(FLMHOME)/e32abiv2.flm
+$(call vrestore)
+
+else
+$(error $e32abiv2pdd.flm called with wrong TARGETTYPE (should be 'pdd' but is '$(TARGETTYPE)'))
+endif
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/e32abiv2pdl.flm
--- a/sbsv2/raptor/lib/flm/e32abiv2pdl.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2pdl.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,56 +1,56 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# ARMv5 pdl ABIv2 Function Like Makefile (FLM)
-# Build an e32 pdl (Printer Device)
-# 
-#
-
-ifeq ($(TARGETTYPE),pdl)
-include $(FLMHOME)/e32abiv2defaults.mk
-
-# What we need to build a Printer Device
-CANHAVEEXPORTS:=1
-POSTLINKTARGETTYPE:=PDL
-POSTLINKFILETYPE:=pdl
-DOPOSTLINK:=1
-AUTOEXPORTS:=_Z17NewPrinterDeviceLv,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))
-
-ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
-endif
-
-LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib
-STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB)
-CANIGNORENONCALLABLE:=1
-
-BASELIBS:=
-UID2:=10003b1c
-RESOURCEPATH:=Resource\Printers
-
-# 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
-# and restore it afterwards
-$(call vsave,CDEFS)
-CDEFS:=$(CDEFS) __DLL__
-include $(FLMHOME)/e32abiv2.flm
-$(call vrestore)
-
-else
-$(error $e32abiv2pdl.flm called with wrong TARGETTYPE (should be 'pdl' but is '$(TARGETTYPE)'))
-endif
-
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# ARMv5 pdl ABIv2 Function Like Makefile (FLM)
+# Build an e32 pdl (Printer Device)
+# 
+#
+
+ifeq ($(TARGETTYPE),pdl)
+include $(FLMHOME)/e32abiv2defaults.mk
+
+# What we need to build a Printer Device
+CANHAVEEXPORTS:=1
+POSTLINKTARGETTYPE:=PDL
+POSTLINKFILETYPE:=pdl
+DOPOSTLINK:=1
+AUTOEXPORTS:=_Z17NewPrinterDeviceLv,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))
+
+ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
+endif
+
+LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib
+STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB)
+CANIGNORENONCALLABLE:=1
+
+BASELIBS:=
+UID2:=10003b1c
+RESOURCEPATH:=Resource\Printers
+
+# 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
+# and restore it afterwards
+$(call vsave,CDEFS)
+CDEFS:=$(CDEFS) __DLL__
+include $(FLMHOME)/e32abiv2.flm
+$(call vrestore)
+
+else
+$(error $e32abiv2pdl.flm called with wrong TARGETTYPE (should be 'pdl' but is '$(TARGETTYPE)'))
+endif
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/e32abiv2plugin.flm
--- a/sbsv2/raptor/lib/flm/e32abiv2plugin.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2plugin.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,69 +1,69 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# ARMv5 EXE/DLL ABIv2 Function Like Makefile (FLM)
-# Build an ECOM plugin
-# 
-#
-
-ifeq ($(TARGETTYPE),plugin)
-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))
-
-ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
-endif
-
-LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib
-STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB)
-
-# Default Postlinker settings
-CANHAVEEXPORTS:=1
-POSTLINKTARGETTYPE:=PLUGIN
-POSTLINKFILETYPE:=dll
-DOPOSTLINK:=1
-AUTOEXPORTS:=_Z24ImplementationGroupProxyRi,1;
-CANIGNORENONCALLABLE:=1
-
-# We could check the UID rather than forcing it
-# but there seems to be no point in that.
-UID2:=10009D8D
-
-
-RESOURCEPATH:=Resource/Plugins
-
-# Use the general EABI FLM 
-# 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
-# and restore it afterwards
-$(call vsave,CDEFS)
-CDEFS:=$(CDEFS) __DLL__
-include $(FLMHOME)/e32abiv2.flm
-$(call vrestore)
-
-else
-$(error $e32abiv2plugin.flm called with wrong TARGETTYPE (should be 'plugin' but is '$(TARGETTYPE)'))
-endif
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# ARMv5 EXE/DLL ABIv2 Function Like Makefile (FLM)
+# Build an ECOM plugin
+# 
+#
+
+ifeq ($(TARGETTYPE),plugin)
+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))
+
+ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
+endif
+
+LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib
+STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB)
+
+# Default Postlinker settings
+CANHAVEEXPORTS:=1
+POSTLINKTARGETTYPE:=PLUGIN
+POSTLINKFILETYPE:=dll
+DOPOSTLINK:=1
+AUTOEXPORTS:=_Z24ImplementationGroupProxyRi,1;
+CANIGNORENONCALLABLE:=1
+
+# We could check the UID rather than forcing it
+# but there seems to be no point in that.
+UID2:=10009D8D
+
+
+RESOURCEPATH:=Resource/Plugins
+
+# Use the general EABI FLM 
+# 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
+# and restore it afterwards
+$(call vsave,CDEFS)
+CDEFS:=$(CDEFS) __DLL__
+include $(FLMHOME)/e32abiv2.flm
+$(call vrestore)
+
+else
+$(error $e32abiv2plugin.flm called with wrong TARGETTYPE (should be 'plugin' but is '$(TARGETTYPE)'))
+endif
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/e32abiv2stddll.flm
--- a/sbsv2/raptor/lib/flm/e32abiv2stddll.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2stddll.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,69 +1,69 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# e32abiv2dll.flm
-# ARMv5 EXE/DLL ABIv2 Function Like Makefile (FLM)
-# Build an e32 DLL (Dynamic Link Library)
-# 
-#
-
-ifeq ($(TARGETTYPE),stddll)
-include $(FLMHOME)/e32abiv2defaults.mk
-
-# What we need to build a DLL
-ifeq ($(NOEXPORTLIBRARY),)
-IMPORTLIBRARYREQUIRED:=1
-endif
-POSTLINKDEFFILE:=$(DEFFILE)
-SUPPORT_FREEZE:=1
-
-# 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))
-DEFAULT_NEWLIB:=$(DEFAULT_STDCPP_NEWLIB)
-
-ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
-endif
-
-LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib
-STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB)
-LIBRARY:=$(LIBRARY) euser.dso
-
-
-# Default Postlinker settings
-CANHAVEEXPORTS:=1
-POSTLINKTARGETTYPE:=STDDLL
-POSTLINKFILETYPE:=dll
-DOPOSTLINK:=1
-CANIGNORENONCALLABLE:=1
-NAMEDSYMLKUP:=1
-
-# Use the general EABI FLM 
-# 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
-# and restore it afterwards
-$(call vsave,CDEFS SYSTEMINCLUDE)
-
-#compile options
-SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(EPOCROOT)/epoc32/include/stdapis
-NOHIDEALL:=1
-CDEFS:=$(CDEFS) __DLL__
-
-include $(FLMHOME)/e32abiv2.flm
-$(call vrestore)
-
-else
-$(error e32abiv2stddll.flm called with wrong TARGETTYPE (should be 'stddll' but is '$(TARGETTYPE)'))
-endif
-
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# e32abiv2dll.flm
+# ARMv5 EXE/DLL ABIv2 Function Like Makefile (FLM)
+# Build an e32 DLL (Dynamic Link Library)
+# 
+#
+
+ifeq ($(TARGETTYPE),stddll)
+include $(FLMHOME)/e32abiv2defaults.mk
+
+# What we need to build a DLL
+ifeq ($(NOEXPORTLIBRARY),)
+IMPORTLIBRARYREQUIRED:=1
+endif
+POSTLINKDEFFILE:=$(DEFFILE)
+SUPPORT_FREEZE:=1
+
+# 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))
+DEFAULT_NEWLIB:=$(DEFAULT_STDCPP_NEWLIB)
+
+ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
+endif
+
+LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib
+STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB)
+LIBRARY:=$(LIBRARY) euser.dso
+
+
+# Default Postlinker settings
+CANHAVEEXPORTS:=1
+POSTLINKTARGETTYPE:=STDDLL
+POSTLINKFILETYPE:=dll
+DOPOSTLINK:=1
+CANIGNORENONCALLABLE:=1
+NAMEDSYMLKUP:=1
+
+# Use the general EABI FLM 
+# 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
+# and restore it afterwards
+$(call vsave,CDEFS SYSTEMINCLUDE)
+
+#compile options
+SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(EPOCROOT)/epoc32/include/stdapis
+NOHIDEALL:=1
+CDEFS:=$(CDEFS) __DLL__
+
+include $(FLMHOME)/e32abiv2.flm
+$(call vrestore)
+
+else
+$(error e32abiv2stddll.flm called with wrong TARGETTYPE (should be 'stddll' but is '$(TARGETTYPE)'))
+endif
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/e32abiv2stdexe.flm
--- a/sbsv2/raptor/lib/flm/e32abiv2stdexe.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2stdexe.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,63 +1,61 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# e32abiv2exe.flm
-# ARMv5 STDEXE/DLL ABIv2 Function Like Makefile (FLM)
-# Build an e32 STDEXE
-# 
-#
-
-# What we need to build a STDEXE
-
-ifeq ($(TARGETTYPE),stdexe)
-include $(FLMHOME)/e32abiv2defaults.mk
-
-POSTLINKTARGETTYPE:=STDEXE
-POSTLINKFILETYPE:=exe
-DOPOSTLINK:=1
-# 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))
-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)
-NAMEDSYMLKUP:=1
-LIBRARY:=$(LIBRARY) euser.dso
-
-MAKEDEFFILE:=
-
-$(call vsave,CDEFS SYSTEMINCLUDE STATICLIBRARY)
-
-# STDEXEs need the c runtime library
-ifneq ($(WCHARENTRYPOINT),)
-STATICLIBRARY:=$(STATICLIBRARY) libwcrt0
-else
-STATICLIBRARY:=$(STATICLIBRARY) libcrt0
-endif
-
-SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(EPOCROOT)/epoc32/include/stdapis
-CDEFS:=$(CDEFS) __EXE__
-NOHIDEALL:=1
-
-include $(FLMHOME)/e32abiv2.flm
-$(call vrestore)
-
-else
-$(error e32abiv2stdexe.flm called with wrong TARGETTYPE (should be 'stdexe' but is '$(TARGETTYPE)'))
-endif
-
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# e32abiv2exe.flm
+# ARMv5 STDEXE/DLL ABIv2 Function Like Makefile (FLM)
+# Build an e32 STDEXE
+# 
+#
+
+# What we need to build a STDEXE
+
+ifeq ($(TARGETTYPE),stdexe)
+include $(FLMHOME)/e32abiv2defaults.mk
+
+POSTLINKTARGETTYPE:=STDEXE
+POSTLINKFILETYPE:=exe
+DOPOSTLINK:=1
+# 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))
+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)
+NAMEDSYMLKUP:=1
+LIBRARY:=$(LIBRARY) euser.dso
+
+$(call vsave,CDEFS SYSTEMINCLUDE STATICLIBRARY)
+
+# STDEXEs need the c runtime library
+ifneq ($(WCHARENTRYPOINT),)
+STATICLIBRARY:=$(STATICLIBRARY) libwcrt0
+else
+STATICLIBRARY:=$(STATICLIBRARY) libcrt0
+endif
+
+SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(EPOCROOT)/epoc32/include/stdapis
+CDEFS:=$(CDEFS) __EXE__
+NOHIDEALL:=1
+
+include $(FLMHOME)/e32abiv2.flm
+$(call vrestore)
+
+else
+$(error e32abiv2stdexe.flm called with wrong TARGETTYPE (should be 'stdexe' but is '$(TARGETTYPE)'))
+endif
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/e32abiv2stdlib.flm
--- a/sbsv2/raptor/lib/flm/e32abiv2stdlib.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2stdlib.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,32 +1,32 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# e32abiv2lib.flm
-# ARMv5 LIB ABIv2 Function Like Makefile (FLM)
-# Build an e32 static library
-# 
-#
-
-ifeq ($(TARGETTYPE),stdlib)
-include $(FLMHOME)/e32abiv2defaults.mk
-
-# What we need to build a LIB 
-POSTLINKFILETYPE:=lib
-
-NOHIDEALL:=1
-
-include $(FLMHOME)/e32abiv2.flm
-
-else
-$(error e32abiv2stdlib.flm called with wrong TARGETTYPE (should be 'stdlib' but is '$(TARGETTYPE)'))
-endif
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# e32abiv2lib.flm
+# ARMv5 LIB ABIv2 Function Like Makefile (FLM)
+# Build an e32 static library
+# 
+#
+
+ifeq ($(TARGETTYPE),stdlib)
+include $(FLMHOME)/e32abiv2defaults.mk
+
+# What we need to build a LIB 
+POSTLINKFILETYPE:=lib
+
+NOHIDEALL:=1
+
+include $(FLMHOME)/e32abiv2.flm
+
+else
+$(error e32abiv2stdlib.flm called with wrong TARGETTYPE (should be 'stdlib' but is '$(TARGETTYPE)'))
+endif
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/e32abiv2textnotifier2.flm
--- a/sbsv2/raptor/lib/flm/e32abiv2textnotifier2.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2textnotifier2.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,57 +1,57 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# e32abiv2textnotifier.flm
-# ARMv5 EXE/DLL ABIv2 Function Like Makefile (FLM)
-# Build an e32 textnotifier DLL
-# 
-#
-
-ifeq ($(TARGETTYPE),textnotifier2)
-include $(FLMHOME)/e32abiv2defaults.mk
-
-# What we need to build a DLL
-CANHAVEEXPORTS:=1
-POSTLINKTARGETTYPE:=TEXTNOTIFIER2
-POSTLINKFILETYPE:=dll
-DOPOSTLINK:=1
-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))
-
-ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
-endif
-
-LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib
-STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB)
-CANIGNORENONCALLABLE:=1
-
-RESOURCEPATH:=System/Notifiers
-UID2:=101fe38b
-POSTLINKDEFFILE:=$(DEFFILE)
-SUPPORT_FREEZE:=1
-
-# 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
-# and restore it afterwards
-$(call vsave,CDEFS)
-CDEFS:=$(CDEFS) __DLL__
-include $(FLMHOME)/e32abiv2.flm
-$(call vrestore)
-
-else
-$(error $e32abiv2textnotifier.flm called with wrong TARGETTYPE (should be 'textnotifier2' but is '$(TARGETTYPE)'))
-endif
-
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# e32abiv2textnotifier.flm
+# ARMv5 EXE/DLL ABIv2 Function Like Makefile (FLM)
+# Build an e32 textnotifier DLL
+# 
+#
+
+ifeq ($(TARGETTYPE),textnotifier2)
+include $(FLMHOME)/e32abiv2defaults.mk
+
+# What we need to build a DLL
+CANHAVEEXPORTS:=1
+POSTLINKTARGETTYPE:=TEXTNOTIFIER2
+POSTLINKFILETYPE:=dll
+DOPOSTLINK:=1
+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))
+
+ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
+endif
+
+LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib
+STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB)
+CANIGNORENONCALLABLE:=1
+
+RESOURCEPATH:=System/Notifiers
+UID2:=101fe38b
+POSTLINKDEFFILE:=$(DEFFILE)
+SUPPORT_FREEZE:=1
+
+# 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
+# and restore it afterwards
+$(call vsave,CDEFS)
+CDEFS:=$(CDEFS) __DLL__
+include $(FLMHOME)/e32abiv2.flm
+$(call vrestore)
+
+else
+$(error $e32abiv2textnotifier.flm called with wrong TARGETTYPE (should be 'textnotifier2' but is '$(TARGETTYPE)'))
+endif
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/e32abiv2var.flm
--- a/sbsv2/raptor/lib/flm/e32abiv2var.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2var.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,72 +1,72 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# ARMv5 EXE/DLL ABIv2 Function Like Makefile (FLM)
-# Build an e32 Variant DLL
-# 
-#
-
-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))
-
-ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
-endif
-
-LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib
-STATIC_RUNTIME_LIB:=$(KERNEL_STATIC_RUNTIME_LIB)
-RUNTIME_LIBS_LIST:=
-
-# Kernel code builds as arm
-ALWAYS_BUILD_AS_ARM:=1
-
-# No dedicated library for operator new/delete functions.
-HAS_DEDICATED_OP_NEWDEL_LIB:=
-
-# Default Postlinker settings
-CANHAVEEXPORTS:=1
-POSTLINKTARGETTYPE:=VAR
-POSTLINKFILETYPE:=dll
-DOPOSTLINK:=1
-AUTOEXPORTS:=_Z17VariantInitialisev,1;
-
-# No exception support for kernel code?
-EXCEPTIONS:=$(NO_EXCEPTIONS)
-
-
-
-# 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
-# and restore it afterwards
-$(call vsave,CDEFS SYSTEMINCLUDE)
-SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(EPOCROOT)/epoc32/include/nkern $(EPOCROOT)/epoc32/include/kernel/arm $(EPOCROOT)/epoc32/include/memmodel/epoc $(EPOCROOT)/epoc32/include/kernel $(EPOCROOT)/epoc32/include/nkern/arm
-CDEFS:=$(CDEFS) __DLL__ __KERNEL_MODE__
-include $(FLMHOME)/e32abiv2.flm
-$(call vrestore)
-
-else
-$(error $e32abiv2var.flm called with wrong TARGETTYPE (should be 'var' but is '$(TARGETTYPE)'))
-endif
-
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# ARMv5 EXE/DLL ABIv2 Function Like Makefile (FLM)
+# Build an e32 Variant DLL
+# 
+#
+
+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))
+
+ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
+endif
+
+LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib
+STATIC_RUNTIME_LIB:=$(KERNEL_STATIC_RUNTIME_LIB)
+RUNTIME_LIBS_LIST:=
+
+# Kernel code builds as arm
+ALWAYS_BUILD_AS_ARM:=1
+
+# No dedicated library for operator new/delete functions.
+HAS_DEDICATED_OP_NEWDEL_LIB:=
+
+# Default Postlinker settings
+CANHAVEEXPORTS:=1
+POSTLINKTARGETTYPE:=VAR
+POSTLINKFILETYPE:=dll
+DOPOSTLINK:=1
+AUTOEXPORTS:=_Z17VariantInitialisev,1;
+
+# No exception support for kernel code?
+EXCEPTIONS:=$(NO_EXCEPTIONS)
+
+
+
+# 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
+# and restore it afterwards
+$(call vsave,CDEFS SYSTEMINCLUDE)
+SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(EPOCROOT)/epoc32/include/nkern $(EPOCROOT)/epoc32/include/kernel/arm $(EPOCROOT)/epoc32/include/memmodel/epoc $(EPOCROOT)/epoc32/include/kernel $(EPOCROOT)/epoc32/include/nkern/arm
+CDEFS:=$(CDEFS) __DLL__ __KERNEL_MODE__
+include $(FLMHOME)/e32abiv2.flm
+$(call vrestore)
+
+else
+$(error $e32abiv2var.flm called with wrong TARGETTYPE (should be 'var' but is '$(TARGETTYPE)'))
+endif
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/e32abiv2var2.flm
--- a/sbsv2/raptor/lib/flm/e32abiv2var2.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2var2.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,72 +1,72 @@
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# ARMv5 EXE/DLL ABIv2 Function Like Makefile (FLM)
-# Build an e32 Variant DLL (version 2)
-# 
-#
-
-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))
-
-ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
-LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
-endif
-
-LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib
-STATIC_RUNTIME_LIB:=$(KERNEL_STATIC_RUNTIME_LIB)
-RUNTIME_LIBS_LIST:=
-
-# Kernel code builds as arm
-ALWAYS_BUILD_AS_ARM:=1
-
-# No dedicated library for operator new/delete functions.
-HAS_DEDICATED_OP_NEWDEL_LIB:=
-
-# Default Postlinker settings
-CANHAVEEXPORTS:=1
-POSTLINKTARGETTYPE:=VAR2
-POSTLINKFILETYPE:=dll
-DOPOSTLINK:=1
-AUTOEXPORTS:=VariantInitialise,1;
-
-# No exception support for kernel code?
-EXCEPTIONS:=$(NO_EXCEPTIONS)
-
-
-
-# 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
-# and restore it afterwards
-$(call vsave,CDEFS SYSTEMINCLUDE)
-SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(EPOCROOT)/epoc32/include/nkern $(EPOCROOT)/epoc32/include/kernel/arm $(EPOCROOT)/epoc32/include/memmodel/epoc $(EPOCROOT)/epoc32/include/kernel $(EPOCROOT)/epoc32/include/nkern/arm
-CDEFS:=$(CDEFS) __DLL__ __KERNEL_MODE__
-include $(FLMHOME)/e32abiv2.flm
-$(call vrestore)
-
-else
-$(error $e32abiv2var2.flm called with wrong TARGETTYPE (should be 'var2' but is '$(TARGETTYPE)'))
-endif
-
+# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# ARMv5 EXE/DLL ABIv2 Function Like Makefile (FLM)
+# Build an e32 Variant DLL (version 2)
+# 
+#
+
+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))
+
+ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
+endif
+
+LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib
+STATIC_RUNTIME_LIB:=$(KERNEL_STATIC_RUNTIME_LIB)
+RUNTIME_LIBS_LIST:=
+
+# Kernel code builds as arm
+ALWAYS_BUILD_AS_ARM:=1
+
+# No dedicated library for operator new/delete functions.
+HAS_DEDICATED_OP_NEWDEL_LIB:=
+
+# Default Postlinker settings
+CANHAVEEXPORTS:=1
+POSTLINKTARGETTYPE:=VAR2
+POSTLINKFILETYPE:=dll
+DOPOSTLINK:=1
+AUTOEXPORTS:=VariantInitialise,1;
+
+# No exception support for kernel code?
+EXCEPTIONS:=$(NO_EXCEPTIONS)
+
+
+
+# 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
+# and restore it afterwards
+$(call vsave,CDEFS SYSTEMINCLUDE)
+SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(EPOCROOT)/epoc32/include/nkern $(EPOCROOT)/epoc32/include/kernel/arm $(EPOCROOT)/epoc32/include/memmodel/epoc $(EPOCROOT)/epoc32/include/kernel $(EPOCROOT)/epoc32/include/nkern/arm
+CDEFS:=$(CDEFS) __DLL__ __KERNEL_MODE__
+include $(FLMHOME)/e32abiv2.flm
+$(call vrestore)
+
+else
+$(error $e32abiv2var2.flm called with wrong TARGETTYPE (should be 'var2' but is '$(TARGETTYPE)'))
+endif
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/e32postlink.mk
--- a/sbsv2/raptor/lib/flm/e32postlink.mk	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32postlink.mk	Mon Nov 16 09:46:46 2009 +0000
@@ -1,135 +1,135 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# ARMv5 e32 postlinking FLM
-# Knows how to postlink all possible ABIV2 executables for ARM
-#
-
-# Interface
-#
-#  Metadata supplied (or deduced from)
-#
-#   BYTEPAIRCOMPRESS
-#   CAPABILITY
-#   DEBUGGABLE                     Can be "udeb" or "urel" or "udeb urel" or ""
-#   E32TARGET
-#   EPOCALLOWDLLDATA
-#   EPOCFIXEDPROCESS
-#   EPOCHEAPSIZEMAX
-#   EPOCHEAPSIZEMIN
-#   EPOCPROCESSPRIORITY
-#   EPOCSTACKSIZE
-#   EXPORTUNFROZEN
-#   INFLATECOMPRESS
-#   POSTLINKFPU
-#   POSTLINKTARGETTYPE
-#   SID
-#   SMPSAFE
-#   UID2
-#   UID3
-#   VERSION
-#   VENDORID
-#
-#  Other
-#
-#   ARMLIBS
-#   AUTOEXPORTS                    Symbols that must be assumed to exist for this TARGETTYPE in the format: export,ordinal;export,ordinal;..
-#   CANIGNORENONCALLABLE           If the TARGETTYPE allows it, disregard non-callable exports (v-tables, type information, etc.)
-#   CANHAVEEXPORTS
-#   CLEANTARGETS
-#   ELF2E32
-#   EPOCDATALINKADDRESS            Redundant?
-#   EPOCROOT
-#   EXPTARGET
-#   GENERATED_DEFFILE
-#   GENERATED_DSO
-#   HAVE_ORDERONLY
-#   IMPORTLIBRARYREQUIRED
-#   INTERMEDIATEPATH
-#   LINKASVERSIONED
-#   LINK_TARGET                    Postlinker elf input
-#   NAMEDSYMLKUP
-#   PAGEDCODE_OPTION
-#   POSTLINKDEFFILE
-#   POSTLINKER_SUPPORTS_WDP
-#   RUNTIME_LIBS_PATH
-#   SAVESPACE
-#   STATIC_LIBS_PATH
-#   UID1
-#   VARIANTTYPE
-
-
-# Capabilities
-ADDED_CAPABILITIES:=$(subst $(CHAR_SPACE),+,$(filter-out -%,$(CAPABILITY)))
-SUBTRACTED_CAPABILITIES:=$(subst $(CHAR_SPACE),,$(filter -%,$(CAPABILITY)))
-FINAL_CAPABILITIES:=$(if $(ADDED_CAPABILITIES),$(ADDED_CAPABILITIES)$(SUBTRACTED_CAPABILITIES),NONE)
-
-# Paging options for the old postlinker
-POSTLINKER_PAGEDOPTION:=--defaultpaged
-ifeq ($(PAGED),1)
-  POSTLINKER_PAGEDOPTION:=--paged
-endif
-ifeq ($(PAGED),0)
-  POSTLINKER_PAGEDOPTION:--unpaged
-endif
-
-# Postlink target
-define e32postlink
-$(E32TARGET): $(LINK_TARGET) $(POSTLINKDEFFILE) $(ELF2E32) $(if $(HAVE_ORDERONLY),|,) $(EPOCROOT)/epoc32/build/TEM_LIB
-	$(call startrule,postlink) \
-	$(ELF2E32) \
-	  --sid=0x$(if $(SID),$(SID),$(if $(UID3),$(UID3),0)) \
-	  --version=$(VERSION) \
-	  --capability=$(FINAL_CAPABILITIES) \
-	  --linkas=$(call dblquote,$(LINKASVERSIONED)) \
-	  --fpu=$(POSTLINKFPU) \
-	  --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="$(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 $(INFLATECOMPRESS),--compressionmethod inflate,$(if $(BYTEPAIRCOMPRESS),--compressionmethod bytepair,))) \
-	  --libpath="$(call concat,$(PATHSEP)$(CHAR_SEMIC),$(strip $(RUNTIME_LIBS_PATH) $(STATIC_LIBS_PATH)))" \
-	  $(if $(SAVESPACE),$(if $(EXPORTUNFROZEN),,;$(GNURM) -rf $(INTERMEDIATEPATH); true)) \
-	$(call endrule,postlink)
-endef
-$(eval $(e32postlink))
-
-CLEANTARGETS:=$(CLEANTARGETS) $(E32TARGET)
-CLEANTARGETS:=$(CLEANTARGETS) $(GENERATED_DEFFILE)
-CLEANTARGETS:=$(CLEANTARGETS) $(GENERATED_DSO)
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# ARMv5 e32 postlinking FLM
+# Knows how to postlink all possible ABIV2 executables for ARM
+#
+
+# Interface
+#
+#  Metadata supplied (or deduced from)
+#
+#   BYTEPAIRCOMPRESS
+#   CAPABILITY
+#   DEBUGGABLE                     Can be "udeb" or "urel" or "udeb urel" or ""
+#   E32TARGET
+#   EPOCALLOWDLLDATA
+#   EPOCFIXEDPROCESS
+#   EPOCHEAPSIZEMAX
+#   EPOCHEAPSIZEMIN
+#   EPOCPROCESSPRIORITY
+#   EPOCSTACKSIZE
+#   EXPORTUNFROZEN
+#   INFLATECOMPRESS
+#   POSTLINKFPU
+#   POSTLINKTARGETTYPE
+#   SID
+#   SMPSAFE
+#   UID2
+#   UID3
+#   VERSION
+#   VENDORID
+#
+#  Other
+#
+#   ARMLIBS
+#   AUTOEXPORTS                    Symbols that must be assumed to exist for this TARGETTYPE in the format: export,ordinal;export,ordinal;..
+#   CANIGNORENONCALLABLE           If the TARGETTYPE allows it, disregard non-callable exports (v-tables, type information, etc.)
+#   CANHAVEEXPORTS
+#   CLEANTARGETS
+#   ELF2E32
+#   EPOCDATALINKADDRESS            Redundant?
+#   EPOCROOT
+#   EXPTARGET
+#   GENERATED_DEFFILE
+#   GENERATED_DSO
+#   HAVE_ORDERONLY
+#   IMPORTLIBRARYREQUIRED
+#   INTERMEDIATEPATH
+#   LINKASVERSIONED
+#   LINK_TARGET                    Postlinker elf input
+#   NAMEDSYMLKUP
+#   PAGEDCODE_OPTION
+#   POSTLINKDEFFILE
+#   POSTLINKER_SUPPORTS_WDP
+#   RUNTIME_LIBS_PATH
+#   SAVESPACE
+#   STATIC_LIBS_PATH
+#   UID1
+#   VARIANTTYPE
+
+
+# Capabilities
+ADDED_CAPABILITIES:=$(subst $(CHAR_SPACE),+,$(filter-out -%,$(CAPABILITY)))
+SUBTRACTED_CAPABILITIES:=$(subst $(CHAR_SPACE),,$(filter -%,$(CAPABILITY)))
+FINAL_CAPABILITIES:=$(if $(ADDED_CAPABILITIES),$(ADDED_CAPABILITIES)$(SUBTRACTED_CAPABILITIES),NONE)
+
+# Paging options for the old postlinker
+POSTLINKER_PAGEDOPTION:=--defaultpaged
+ifeq ($(PAGED),1)
+  POSTLINKER_PAGEDOPTION:=--paged
+endif
+ifeq ($(PAGED),0)
+  POSTLINKER_PAGEDOPTION:--unpaged
+endif
+
+# Postlink target
+define e32postlink
+$(E32TARGET): $(LINK_TARGET) $(POSTLINKDEFFILE) $(ELF2E32) $(if $(HAVE_ORDERONLY),|,) $(EPOCROOT)/epoc32/build/TEM_LIB
+	$(call startrule,postlink) \
+	$(ELF2E32) \
+	  --sid=0x$(if $(SID),$(SID),$(if $(UID3),$(UID3),0)) \
+	  --version=$(VERSION) \
+	  --capability=$(FINAL_CAPABILITIES) \
+	  --linkas=$(call dblquote,$(LINKASVERSIONED)) \
+	  --fpu=$(POSTLINKFPU) \
+	  --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 $(INFLATECOMPRESS),--compressionmethod inflate,$(if $(BYTEPAIRCOMPRESS),--compressionmethod bytepair,))) \
+	  --libpath="$(call concat,$(PATHSEP)$(CHAR_SEMIC),$(strip $(RUNTIME_LIBS_PATH) $(STATIC_LIBS_PATH)))" \
+	  $(if $(SAVESPACE),$(if $(EXPORTUNFROZEN),,;$(GNURM) -rf $(INTERMEDIATEPATH); true)) \
+	$(call endrule,postlink)
+endef
+$(eval $(e32postlink))
+
+CLEANTARGETS:=$(CLEANTARGETS) $(E32TARGET)
+CLEANTARGETS:=$(CLEANTARGETS) $(GENERATED_DEFFILE)
+CLEANTARGETS:=$(CLEANTARGETS) $(GENERATED_DSO)
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/emulator.xml
--- a/sbsv2/raptor/lib/flm/emulator.xml	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/emulator.xml	Mon Nov 16 09:46:46 2009 +0000
@@ -1,226 +1,226 @@
-
-
-	
-
-	
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-
-	
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-
-	
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-
-	
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-
-	
-		
-		
-	
-
-	
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-
-	
-		
-		
-		
-		
-	
-
-	
-		
-		
-		
-	
-
-	
-		
-		
-		
-		
-		
-	
-
-	
-		
-	
-
-	
-	
-
-	
-	
-
-	
-	
-
-	
-	
-
-	
-	
-
-	
-	
-
-	
-	
-
-	
-	
-
-	
-	
-
-	
-	
-
-	
-	
-
-	
-	
-
-	
-	
-
-	
-	
-
-	
-	
-
-	
-	
-
+
+
+	
+
+	
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+
+	
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+
+	
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+
+	
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+
+	
+		
+		
+	
+
+	
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+
+	
+		
+		
+		
+		
+	
+
+	
+		
+		
+		
+	
+
+	
+		
+		
+		
+		
+		
+	
+
+	
+		
+	
+
+	
+	
+
+	
+	
+
+	
+	
+
+	
+	
+
+	
+	
+
+	
+	
+
+	
+	
+
+	
+	
+
+	
+	
+
+	
+	
+
+	
+	
+
+	
+	
+
+	
+	
+
+	
+	
+
+	
+	
+
+	
+	
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/extensions.xml
--- a/sbsv2/raptor/lib/flm/extensions.xml	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/extensions.xml	Mon Nov 16 09:46:46 2009 +0000
@@ -1,47 +1,47 @@
-
-
-	
-
-	
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-
-	
-		
-		
-		
-				
-	
-	
-	
-		
-		
-		
-		
-	
-
-	
-		
-	
-	
-		
-		
-	
-	
-	
-	
-
-	
-
-	
-
-
+
+
+	
+
+	
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+
+	
+		
+		
+		
+				
+	
+	
+	
+		
+		
+		
+		
+	
+
+	
+		
+	
+	
+		
+		
+	
+	
+	
+	
+
+	
+
+	
+
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/final.mk
--- a/sbsv2/raptor/lib/flm/final.mk	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/final.mk	Mon Nov 16 09:46:46 2009 +0000
@@ -1,30 +1,30 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# final include file : this is included at the end of
-# all generated makefiles
-# INPUTS : assumes OSTYPE and FLMHOME are set.
-#
-
-# The final makefile is not a once-per-build file
-# if the make tree is split into many files then
-# final must be "included" many times
-
-# Create all remaining buffered directories
-#
-$(call makepathfinalise)
-
-# For users of SBSv2 who wish to add in their own final settings
-# without modifying this file:
--include $(FLMHOME)/user/final.mk
+#
+# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# final include file : this is included at the end of
+# all generated makefiles
+# INPUTS : assumes OSTYPE and FLMHOME are set.
+#
+
+# The final makefile is not a once-per-build file
+# if the make tree is split into many files then
+# final must be "included" many times
+
+# Create all remaining buffered directories
+#
+$(call makepathfinalise)
+
+# For users of SBSv2 who wish to add in their own final settings
+# without modifying this file:
+-include $(FLMHOME)/user/final.mk
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/flmtools.mk
--- a/sbsv2/raptor/lib/flm/flmtools.mk	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/flmtools.mk	Mon Nov 16 09:46:46 2009 +0000
@@ -1,300 +1,300 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# Tools for use in FLMs - common macros and variables
-#
-
-ifeq ($(FLMTOOLS.MK),)
-FLMTOOLS.MK:=included
-
-CHAR_COMMA:=,
-CHAR_SEMIC:=;
-CHAR_COLON:=:
-CHAR_BLANK:=
-#the BLANK BLANK trick saves us from clever text editrors that remove spaces at the end of a line
-CHAR_SPACE:=$(BLANK) $(BLANK)
-CHAR_DQUOTE:="
-CHAR_QUOTE:='
-CHAR_LBRACKET:=(
-CHAR_RBRACKET:=)
-CHAR_DOLLAR:=$
-
-#'" # This comment makes syntax highlighting work again. Leave it here please!
-
-# A macro to ensure that the shell does not 
-# interpret brackets in a command
-define shEscapeBrackets
-$(subst $(CHAR_LBRACKET),\$(CHAR_LBRACKET),$(subst $(CHAR_RBRACKET),\$(CHAR_RBRACKET),$(1)))
-endef
-
-# A macro to protect quotes from shell expansion
-define shEscapeQuotes
-$(subst $(CHAR_QUOTE),\$(CHAR_QUOTE),$(subst $(CHAR_DQUOTE),\$(CHAR_DQUOTE),$(1)))
-endef
-
-# Protect against shell expansion
-define shEscape
-$(call shEscapeBrackets,$(call shEscapeQuotes,$(1)))
-endef
-
-# A macro to escape spaces for use in rule targets or dependencies
-define ruleEscape
-$(subst $(CHAR_SPACE),\$(CHAR_SPACE),$(1))
-endef
-
-# A macro for turning a list into a concatenated string
-# 1st parameter is the separator to use, second is the list
-# e.g. $(call concat,:,/sbin /usr/sbin /usr/local/sbin /bin /usr/bin /usr/local/bin)
-# would create the string
-#   /sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin
-# It has to be recursive to manage to create a string from a list
-define concat
-$(if $(word 2,$(2)),$(firstword $(2))$(1)$(call concat,$(1),$(wordlist 2,$(words $(2)),$(2))),$(2))
-endef
-
-# A macro for converting a string to lowercase
-lowercase_TABLE:=A,a B,b C,c D,d E,e F,f G,g H,h I,i J,j K,k L,l M,m N,n O,o P,p Q,q R,r S,s T,t U,u V,v W,w X,x Y,y Z,z
-
-define lowercase_internal
-$(if $1,$$(subst $(firstword $1),$(call lowercase_internal,$(wordlist 2,$(words $1),$1),$2)),$2)
-endef
-
-define lowercase
-$(eval lowercase_RESULT:=$(call lowercase_internal,$(lowercase_TABLE),$1))$(lowercase_RESULT)
-endef
-
-# A macro for converting a string to uppercase
-uppercase_TABLE:=a,A b,B c,C d,D e,E f,F g,G h,H i,I j,J k,K l,L m,M n,N o,O p,P q,Q r,R s,S t,T u,U v,V w,W x,X y,Y z,Z
-
-define uppercase_internal
-$(if $1,$$(subst $(firstword $1),$(call uppercase_internal,$(wordlist 2,$(words $1),$1),$2)),$2)
-endef
-
-define uppercase
-$(eval uppercase_RESULT:=$(call uppercase_internal,$(uppercase_TABLE),$1))$(uppercase_RESULT)
-endef
-
-# A macro for removing duplicate tokens from a list 
-# whilst retaining the list's order
-define uniq
-$(if $(1),$(info $(words $(1)) $(1))\
-$(firstword $(1))$(call uniq,$(filter-out $(firstword $(1)),$(wordlist 2,$(words $(1)),$(1))))\
-,)
-endef
-
-# A macro for enclosing all list elements in some kind of quote or bracket
-define enclose
-$(foreach ITEM,$(2),$(1)$(ITEM)$(1))
-endef
-
-# A macro enclosing all list elements in double quotes and removing escapes
-define dblquote
-$(subst \,,$(call enclose,$(CHAR_DQUOTE),$(1)))
-endef
-
-# A macro enclosing a single item in double quotes, so that spaces can be quoted
-define dblquoteitem
-$(if $(1),$(CHAR_DQUOTE)$(1)$(CHAR_DQUOTE),)
-endef
-
-# A macro to add a prefix to a list of items, while putting quotes around each
-# item so prefixed, to allow spaces in the prefix.
-define addquotedprefix
-$(addprefix $(CHAR_DQUOTE)$(1),$(addsuffix $(CHAR_DQUOTE),$(2)))
-endef
-
-# A macro enclosing all list elements in single quotes and prepending a string
-# basically to turn a list like:
-#    LINUX TOOLS EXP=_declspec(export) NODEBUG
-# into:
-#    -D'LINUX' -D'TOOLS' -D'EXP=_declspec(export)' -DNODEBUG
-define makemacrodef
-$(strip $(patsubst %,$1'%',$2))
-endef
-
-# Make a (filename) string safe for use as a variable name
-define sanitise
-$(subst /,_,$(subst :,_,$(1)))
-endef
-
-# A variation on several macros implemented directly in FLMs, this takes a filename and a list
-# of "words" and pumps groups of 10 words at a time into the file.  Its main use is the creation
-# of command/response files for tools that need to avoid blowing command line length limits
-# when referencing long lists of absolutely pathed files.
-define groupin10infile
-	$(if $2,@echo -e $(foreach L,$(wordlist 1,10,$2),"$(L)\\n") >>$1,)
-	$(if $2,$(call groupin10infile,$1,$(wordlist 11,$(words $2),$2)),@true)
-endef
-
-## DEBUGGING Macros ######################################
-
-# A macro to help with debugging FLMs by printing out variables specified in the FLMDEBUG variable
-define flmdebug
-$(if $(FLMDEBUG),@echo -e "\\n $(foreach VAR,$(FLMDEBUG),$(VAR):=$($(VAR))\\n)",)
-endef
-
-define flmdebug2
-flmdebug2_OUT:=$(if $(FLMDEBUG),$(shell echo -e "\\n $(foreach VAR,$(FLMDEBUG),$(VAR):=$($(VAR))\\n)" 1>&2),)
-endef
-
-## Path handling tools ###################################
-
-ifeq ($(OSTYPE),cygwin)
-
-SPACESLASH:=$(CHAR_SPACE)/
-SPACESLASH2:=$(CHAR_SPACE)\/
-SPACEDSLASH:=$(CHAR_SPACE)//
-# How lists of directories are separated on this OS:
-DIRSEP:=$(CHAR_SEMIC)
-
-define slashprotect
-$(subst $(SPACESLASH),$(SPACESLASH2),$(1))
-endef
-
-define pathprep
-$(subst $(SPACESLASH),$(SPACEDSLASH),$(1))
-endef
-
-else
-
-# How lists of directories are separated on this OS:
-DIRSEP:=$(CHAR_COLON)
-
-define slashprotect
-$(1)
-endef
-
-define pathprep
-$(1)
-endef
-
-endif
-
-# Path separator (always / in make)
-PATHSEP=/
-
-## Source to object file mapping #########################
-
-## Converting a list of source files to a list of object files without altering their
-## relative order.  Also deals with multiple file types mapping to the same object type
-## e.g. .CPP and .cpp and .c++ all map to .o
-define allsuffixsubst_internal
-$(if $1,$$(patsubst %$(firstword $1),%$2,$(call allsuffixsubst_internal,$(wordlist 2,$(words $1),$1),$2,$3)),$3)
-endef
-
-# $1 - the list of suffixes to replace
-# $2 - the suffix to replace them with
-# $3 - the list of strings to perform the replacement on
-define allsuffixsubst
-$(eval allsuffixsubst_RESULT:=$(call allsuffixsubst_internal,$1,$2,$3))$(allsuffixsubst_RESULT)
-endef
-
-## extractfilesoftype ##
-# $(1) is the list of types to extract e.g. cpp cxx CPP
-# $(2) is the list of files to select from
-define extractfilesoftype
-$(foreach EXT,$(1),$(filter %$(EXT),$(2)))
-endef
-
-## extractandmap ##
-# $(1) is the list of types e.g. cpp cxx CPP
-# $(2) is the extension to map to e.g. .o or .ARMV5.lst oe _.cpp
-# $(3) is the list of files to select from
-# This functon turns a list like 'fred.cpp bob.c++' into 'fred.o bob.o'
-define extractandmap
-$(foreach EXT,$(1),$(patsubst %$(EXT),%$(2),$(filter %$(EXT),$(3))))
-endef
-
-## relocatefiles ##
-# $(1) directory to relocate them in
-# $(2) list of files to relocate
-define relocatefiles
-$(patsubst %,$(1)/%,$(notdir $(2)))
-endef
-
-
-## Get stack handling code (for calls to FLMS which don't destroy variables)
-include $(FLMHOME)/stack.mk
-
-## Allow flm rules to be tagged and enable FORCESUCCESS feature etc
-include $(FLMHOME)/taggedrules.mk
-
-## Get boolean tools e.g. that implement the equals macro.
-include $(FLMHOME)/booleanlogic.mk
-
-## Macros for writing recipes without needing to know eval
-#
-# an ordinary recipe, for example,
-#
-# $(call raptor_recipe,name,$(TARGET),$(PREREQUISITES),$(COMMAND))
-#
-define raptor_recipe
-$(eval $2: $3
-	$(call startrule,$1) $4 $(call endrule,$1)
-)
-endef
-#
-# a phony recipe (double colon rule). Making a separate macro with an uglier
-# name will hopefully discourage people from using this unless they need to,
-# for example,
-#
-# $(call raptor_phony_recipe,name,ALL,,$(COMMAND))
-#
-define raptor_phony_recipe
-$(eval $2:: $3
-	$(call startrule,$1) $4 $(call endrule,$1)
-)
-endef
-
-################################################################################
-## Test code to allow this makefile fragment to be tested in a standalone manner
-##
-## example:
-##   FLMHOME=./ make -f flmtools.mk  STANDALONE_TEST=1 
-##
-
-ifneq ($(STANDALONE_TEST),)
-
-test::
-	@echo "macros"
-	test  "$(call concat,:,CON CAT EN ATED)" == "CON:CAT:EN:ATED" 
-	test  "$(call enclose,$(CHAR_QUOTE),THESE WORDS ARE QUOTED)" == "'THESE' 'WORDS' 'ARE' 'QUOTED'" 
-	echo $(SHELL)
-	test  '$(call dblquote,THESE WORDS ARE DOUBLEQUOTED)' == '"THESE" "WORDS" "ARE" "DOUBLEQUOTED"'
-	echo  $(call dqnp,/c/fred /d/alice /blah/blah)
-	@echo ""
-
-
-test::
-	@echo lowercase macro
-	test '$(call lowercase,ABCDEFGHIJKLMNOPQRSTUVWXYZ AA BB CC)' == 'abcdefghijklmnopqrstuvwxyz aa bb cc'
-
-define lowercase_internal
-$(if $1,$$(subst $(firstword $1),$(call lowercase_internal,$(wordlist 2,$(words $1),$1),$2)),$2)
-endef
-
-define lowercase
-$(eval lowercase_RESULT:=$(call lowercase_internal,$(lowercase_TABLE),$1))$(lowercase_RESULT)
-endef
-
-	test '$(call pathprep,--apcs /inter)' == '--apcs //inter'
-	
-test::
-	@echo "pathprep macro"
-	test '$(call pathprep,--apcs /inter)' == '--apcs //inter'
-	test '$(call pathprep,blah theone/or/theother)' == 'blah theone/or/theother'
-
-endif
-endif
-
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# Tools for use in FLMs - common macros and variables
+#
+
+ifeq ($(FLMTOOLS.MK),)
+FLMTOOLS.MK:=included
+
+CHAR_COMMA:=,
+CHAR_SEMIC:=;
+CHAR_COLON:=:
+CHAR_BLANK:=
+#the BLANK BLANK trick saves us from clever text editrors that remove spaces at the end of a line
+CHAR_SPACE:=$(BLANK) $(BLANK)
+CHAR_DQUOTE:="
+CHAR_QUOTE:='
+CHAR_LBRACKET:=(
+CHAR_RBRACKET:=)
+CHAR_DOLLAR:=$
+
+#'" # This comment makes syntax highlighting work again. Leave it here please!
+
+# A macro to ensure that the shell does not 
+# interpret brackets in a command
+define shEscapeBrackets
+$(subst $(CHAR_LBRACKET),\$(CHAR_LBRACKET),$(subst $(CHAR_RBRACKET),\$(CHAR_RBRACKET),$(1)))
+endef
+
+# A macro to protect quotes from shell expansion
+define shEscapeQuotes
+$(subst $(CHAR_QUOTE),\$(CHAR_QUOTE),$(subst $(CHAR_DQUOTE),\$(CHAR_DQUOTE),$(1)))
+endef
+
+# Protect against shell expansion
+define shEscape
+$(call shEscapeBrackets,$(call shEscapeQuotes,$(1)))
+endef
+
+# A macro to escape spaces for use in rule targets or dependencies
+define ruleEscape
+$(subst $(CHAR_SPACE),\$(CHAR_SPACE),$(1))
+endef
+
+# A macro for turning a list into a concatenated string
+# 1st parameter is the separator to use, second is the list
+# e.g. $(call concat,:,/sbin /usr/sbin /usr/local/sbin /bin /usr/bin /usr/local/bin)
+# would create the string
+#   /sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin
+# It has to be recursive to manage to create a string from a list
+define concat
+$(if $(word 2,$(2)),$(firstword $(2))$(1)$(call concat,$(1),$(wordlist 2,$(words $(2)),$(2))),$(2))
+endef
+
+# A macro for converting a string to lowercase
+lowercase_TABLE:=A,a B,b C,c D,d E,e F,f G,g H,h I,i J,j K,k L,l M,m N,n O,o P,p Q,q R,r S,s T,t U,u V,v W,w X,x Y,y Z,z
+
+define lowercase_internal
+$(if $1,$$(subst $(firstword $1),$(call lowercase_internal,$(wordlist 2,$(words $1),$1),$2)),$2)
+endef
+
+define lowercase
+$(eval lowercase_RESULT:=$(call lowercase_internal,$(lowercase_TABLE),$1))$(lowercase_RESULT)
+endef
+
+# A macro for converting a string to uppercase
+uppercase_TABLE:=a,A b,B c,C d,D e,E f,F g,G h,H i,I j,J k,K l,L m,M n,N o,O p,P q,Q r,R s,S t,T u,U v,V w,W x,X y,Y z,Z
+
+define uppercase_internal
+$(if $1,$$(subst $(firstword $1),$(call uppercase_internal,$(wordlist 2,$(words $1),$1),$2)),$2)
+endef
+
+define uppercase
+$(eval uppercase_RESULT:=$(call uppercase_internal,$(uppercase_TABLE),$1))$(uppercase_RESULT)
+endef
+
+# A macro for removing duplicate tokens from a list 
+# whilst retaining the list's order
+define uniq
+$(if $(1),$(info $(words $(1)) $(1))\
+$(firstword $(1))$(call uniq,$(filter-out $(firstword $(1)),$(wordlist 2,$(words $(1)),$(1))))\
+,)
+endef
+
+# A macro for enclosing all list elements in some kind of quote or bracket
+define enclose
+$(foreach ITEM,$(2),$(1)$(ITEM)$(1))
+endef
+
+# A macro enclosing all list elements in double quotes and removing escapes
+define dblquote
+$(subst \,,$(call enclose,$(CHAR_DQUOTE),$(1)))
+endef
+
+# A macro enclosing a single item in double quotes, so that spaces can be quoted
+define dblquoteitem
+$(if $(1),$(CHAR_DQUOTE)$(1)$(CHAR_DQUOTE),)
+endef
+
+# A macro to add a prefix to a list of items, while putting quotes around each
+# item so prefixed, to allow spaces in the prefix.
+define addquotedprefix
+$(addprefix $(CHAR_DQUOTE)$(1),$(addsuffix $(CHAR_DQUOTE),$(2)))
+endef
+
+# A macro enclosing all list elements in single quotes and prepending a string
+# basically to turn a list like:
+#    LINUX TOOLS EXP=_declspec(export) NODEBUG
+# into:
+#    -D'LINUX' -D'TOOLS' -D'EXP=_declspec(export)' -DNODEBUG
+define makemacrodef
+$(strip $(patsubst %,$1'%',$2))
+endef
+
+# Make a (filename) string safe for use as a variable name
+define sanitise
+$(subst /,_,$(subst :,_,$(1)))
+endef
+
+# A variation on several macros implemented directly in FLMs, this takes a filename and a list
+# of "words" and pumps groups of 10 words at a time into the file.  Its main use is the creation
+# of command/response files for tools that need to avoid blowing command line length limits
+# when referencing long lists of absolutely pathed files.
+define groupin10infile
+	$(if $2,@echo -e $(foreach L,$(wordlist 1,10,$2),"$(L)\\n") >>$1,)
+	$(if $2,$(call groupin10infile,$1,$(wordlist 11,$(words $2),$2)),@true)
+endef
+
+## DEBUGGING Macros ######################################
+
+# A macro to help with debugging FLMs by printing out variables specified in the FLMDEBUG variable
+define flmdebug
+$(if $(FLMDEBUG),@echo -e "\\n $(foreach VAR,$(FLMDEBUG),$(VAR):=$($(VAR))\\n)",)
+endef
+
+define flmdebug2
+flmdebug2_OUT:=$(if $(FLMDEBUG),$(shell echo -e "\\n $(foreach VAR,$(FLMDEBUG),$(VAR):=$($(VAR))\\n)" 1>&2),)
+endef
+
+## Path handling tools ###################################
+
+ifeq ($(OSTYPE),cygwin)
+
+SPACESLASH:=$(CHAR_SPACE)/
+SPACESLASH2:=$(CHAR_SPACE)\/
+SPACEDSLASH:=$(CHAR_SPACE)//
+# How lists of directories are separated on this OS:
+DIRSEP:=$(CHAR_SEMIC)
+
+define slashprotect
+$(subst $(SPACESLASH),$(SPACESLASH2),$(1))
+endef
+
+define pathprep
+$(subst $(SPACESLASH),$(SPACEDSLASH),$(1))
+endef
+
+else
+
+# How lists of directories are separated on this OS:
+DIRSEP:=$(CHAR_COLON)
+
+define slashprotect
+$(1)
+endef
+
+define pathprep
+$(1)
+endef
+
+endif
+
+# Path separator (always / in make)
+PATHSEP=/
+
+## Source to object file mapping #########################
+
+## Converting a list of source files to a list of object files without altering their
+## relative order.  Also deals with multiple file types mapping to the same object type
+## e.g. .CPP and .cpp and .c++ all map to .o
+define allsuffixsubst_internal
+$(if $1,$$(patsubst %$(firstword $1),%$2,$(call allsuffixsubst_internal,$(wordlist 2,$(words $1),$1),$2,$3)),$3)
+endef
+
+# $1 - the list of suffixes to replace
+# $2 - the suffix to replace them with
+# $3 - the list of strings to perform the replacement on
+define allsuffixsubst
+$(eval allsuffixsubst_RESULT:=$(call allsuffixsubst_internal,$1,$2,$3))$(allsuffixsubst_RESULT)
+endef
+
+## extractfilesoftype ##
+# $(1) is the list of types to extract e.g. cpp cxx CPP
+# $(2) is the list of files to select from
+define extractfilesoftype
+$(foreach EXT,$(1),$(filter %$(EXT),$(2)))
+endef
+
+## extractandmap ##
+# $(1) is the list of types e.g. cpp cxx CPP
+# $(2) is the extension to map to e.g. .o or .ARMV5.lst oe _.cpp
+# $(3) is the list of files to select from
+# This functon turns a list like 'fred.cpp bob.c++' into 'fred.o bob.o'
+define extractandmap
+$(foreach EXT,$(1),$(patsubst %$(EXT),%$(2),$(filter %$(EXT),$(3))))
+endef
+
+## relocatefiles ##
+# $(1) directory to relocate them in
+# $(2) list of files to relocate
+define relocatefiles
+$(patsubst %,$(1)/%,$(notdir $(2)))
+endef
+
+
+## Get stack handling code (for calls to FLMS which don't destroy variables)
+include $(FLMHOME)/stack.mk
+
+## Allow flm rules to be tagged and enable FORCESUCCESS feature etc
+include $(FLMHOME)/taggedrules.mk
+
+## Get boolean tools e.g. that implement the equals macro.
+include $(FLMHOME)/booleanlogic.mk
+
+## Macros for writing recipes without needing to know eval
+#
+# an ordinary recipe, for example,
+#
+# $(call raptor_recipe,name,$(TARGET),$(PREREQUISITES),$(COMMAND))
+#
+define raptor_recipe
+$(eval $2: $3
+	$(call startrule,$1) $4 $(call endrule,$1)
+)
+endef
+#
+# a phony recipe (double colon rule). Making a separate macro with an uglier
+# name will hopefully discourage people from using this unless they need to,
+# for example,
+#
+# $(call raptor_phony_recipe,name,ALL,,$(COMMAND))
+#
+define raptor_phony_recipe
+$(eval $2:: $3
+	$(call startrule,$1) $4 $(call endrule,$1)
+)
+endef
+
+################################################################################
+## Test code to allow this makefile fragment to be tested in a standalone manner
+##
+## example:
+##   FLMHOME=./ make -f flmtools.mk  STANDALONE_TEST=1 
+##
+
+ifneq ($(STANDALONE_TEST),)
+
+test::
+	@echo "macros"
+	test  "$(call concat,:,CON CAT EN ATED)" == "CON:CAT:EN:ATED" 
+	test  "$(call enclose,$(CHAR_QUOTE),THESE WORDS ARE QUOTED)" == "'THESE' 'WORDS' 'ARE' 'QUOTED'" 
+	echo $(SHELL)
+	test  '$(call dblquote,THESE WORDS ARE DOUBLEQUOTED)' == '"THESE" "WORDS" "ARE" "DOUBLEQUOTED"'
+	echo  $(call dqnp,/c/fred /d/alice /blah/blah)
+	@echo ""
+
+
+test::
+	@echo lowercase macro
+	test '$(call lowercase,ABCDEFGHIJKLMNOPQRSTUVWXYZ AA BB CC)' == 'abcdefghijklmnopqrstuvwxyz aa bb cc'
+
+define lowercase_internal
+$(if $1,$$(subst $(firstword $1),$(call lowercase_internal,$(wordlist 2,$(words $1),$1),$2)),$2)
+endef
+
+define lowercase
+$(eval lowercase_RESULT:=$(call lowercase_internal,$(lowercase_TABLE),$1))$(lowercase_RESULT)
+endef
+
+	test '$(call pathprep,--apcs /inter)' == '--apcs //inter'
+	
+test::
+	@echo "pathprep macro"
+	test '$(call pathprep,--apcs /inter)' == '--apcs //inter'
+	test '$(call pathprep,blah theone/or/theother)' == 'blah theone/or/theother'
+
+endif
+endif
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/gccxml.flm
--- a/sbsv2/raptor/lib/flm/gccxml.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/gccxml.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,257 +1,257 @@
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# All targets Function Like Makefile (FLM) supporting the execution of
-# gccxml_cc1plus on source, the creation of project and resource descriptive XML files
-# and packaging into an appropriate archive for CDB processing.
-#
-#
-
-
-# passed in values, stripped of whitespace
-DEFFILE:=$(strip $(DEFFILE))
-LINKAS:=$(strip $(LINKAS))
-UID1:=$(strip $(UID1))
-UID2:=$(strip $(UID2))
-UID3:=$(strip $(UID3))
-
-# local variables
-CREATABLEPATHS:=
-CLEANTARGETS:=
-RELEASABLES:=
-STDCPP_BUILD:=
-CIAFILEEXTENSIONS:=%.CIA %.cia %.Cia %.cIa %.cIA %.ciA %.CIa %.CiA
-
-ROOTBLDPATH:=$(OUTPUTPATH)/gccxml
-VARIANTBLDPATH:=$(OUTPUTPATH)/$(FULLVARIANTPATH)
-ROOTRELEASEPATH:=$(RELEASEPATH)/gccxml
-VARIANTRELEASEPATH:=$(RELEASEPATH)/$(FULLVARIANTPATH)
-
-CREATABLEPATHS:=$(CREATABLEPATHS) $(VARIANTBLDPATH) $(VARIANTRELEASEPATH) $(ROOTBLDPATH) $(ROOTRELEASEPATH)
-
-# type-specific definitions
-BASE_TYPE:=dll
-TARGET_MACRO:=__DLL__
-ifneq ($(findstring exe,$(TARGETTYPE)),)
-  BASE_TYPE:=exe
-  TARGET_MACRO:=__EXE__
-endif
-ifneq ($(findstring lib,$(TARGETTYPE)),)
-  BASE_TYPE:=lib
-  TARGET_MACRO:=
-endif
-
-# utility functions
-# returns absolutely-pathed temporary build filenames based solely on the basename of the source file, but with an additional "_" for .cia files
-# $(1) input source file list
-# $(2) output file extension
-define mapsource2output
-  $(foreach SOURCEFILE,$(1),$(patsubst %, $(VARIANTBLDPATH)/%, $(basename $(notdir $(SOURCEFILE)))$(if $(filter $(CIAFILEEXTENSIONS),$(SOURCEFILE)),_,)$(2)))
-endef
-
-# returns absolutely-pathed temporary build filenames based on the full resource filename
-# $(1) input resource file list
-# $(2) output file extension
-define mapresource2output
-  $(patsubst %, $(ROOTBLDPATH)/%, $(addsuffix $(2),$(notdir $(1))))
-endef
-
-# calls a tool multiple times with grouped arguments
-# $(1) tool to call with any non-variable arguments
-# $(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)
-endef
-
-# echos content to a file in groups performing optional search/replace based on passed args
-# $(1) template line with optional __VERBATIM__, __PATH__, __FILENAME__ replacements
-# $(2) list of pathed filenames to be batch processed and that can be used for template replacements
-# $(3) output file
-define groupreplacein50infile
-	$(if $2,@echo -e $(foreach L,$(wordlist 1,50,$2),"$(subst __VERBATIM__,$(L),$(subst __PATH__,$(dir $(L)),$(subst __FILENAME__,$(notdir $(L)),$1)))\\n") >>$3,)
-	$(if $2,$(call groupreplacein50infile,$1,$(wordlist 51,$(words $2),$2),$3),@true)
-endef
-
-# targets
-INCLUDESFILE:=$(ROOTRELEASEPATH)/includeheaders.txt
-MMPXMLFILE:=$(ROOTBLDPATH)/$(notdir $(PROJECT_META)).xml
-SRCXMLFILES:=$(call mapsource2output,$(SOURCE),.xml)
-RFIFILES:=$(call mapresource2output,$(RESOURCEFILES),.rfi)
-DEPFILES:=$(call mapsource2output,$(SOURCE),.xml.d)
-TEMPGXPARCHIVE:=$(VARIANTBLDPATH)/$(TARGET)$(BASE_TYPE).gxp
-GXPARCHIVE:=$(VARIANTRELEASEPATH)/$(TARGET)$(BASE_TYPE).gxp
-
-CLEANTARGETS:=$(CLEANTARGETS) $(MMPXMLFILE) $(SRCXMLFILES) $(DEPFILES) $(TEMPGXPARCHIVE) $(GXPARCHIVE)
-RELEASABLES:=$(RELEASABLES) $(GXPARCHIVE)
-
-# Deduce whether we should be performing a build with standard CPP characteristics
-# This operates differently per-OS release, although OE TARGETTYPEs always build with standard CPP traits
-ifeq ($(OPEN_ENVIRONMENT),1)
-  STDCPP_BUILD:=1
-endif
-
-ifeq ($(SUPPORTS_STDCPP_NEWLIB),1)
-  ifeq ($(NOSTDCPP),1)
-    STDCPP_BUILD:=
-  else
-    ifeq ($(STDCPP),1)
-      STDCPP_BUILD:=1
-    endif
-  endif
-endif
-
-ifeq ($(STDCPP_BUILD),1)
-  CDEFS:=$(CDEFS) $(STDCPP_DEF)
-  SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(STDCPP_INCLUDE)
-endif
-
-CDEFS:=$(CDEFS) $(TARGET_DEFS)
-SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(TARGET_INCLUDES)
-
-# include paths
-UINCLUDE:=$(patsubst %,$(OPT.USERINCLUDE)%,$(USERINCLUDE))
-SINCLUDE:=$(patsubst %,$(OPT.SYSINCLUDE)%,$(SYSTEMINCLUDE))
-PINCLUDE:=$(OPT.PREINCLUDE)$(PRODUCT_INCLUDE)
-INCLUDES:=$(UINCLUDE) $(OPT.SPLITINCLUDE) $(SINCLUDE) $(PINCLUDE)
-
-DEFINES:=$(call makemacrodef,$(OPT.DEFINE),$(CDEFS) $(TARGET_MACRO))
-
-
-# .mmp XML description file
-ifneq ($(PROCESSED_$(call sanitise,$(MMPXMLFILE))),1)
-
-  ifeq ($(LINKAS),)
-    LINKASBASE:=$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
-  else
-    LINKASBASE:=$(LINKAS)
-  endif
-
-  LINKASVERSIONED:=$(basename $(LINKASBASE)){$(VERSIONHEX)}$(suffix $(LINKASBASE))
-
-  ADDED_CAPABILITIES:=$(subst $(CHAR_SPACE),+,$(filter-out -%,$(CAPABILITY)))
-  SUBTRACTED_CAPABILITIES:=$(subst $(CHAR_SPACE),,$(filter -%,$(CAPABILITY)))
-  FINAL_CAPABILITIES:=$(if $(ADDED_CAPABILITIES),$(ADDED_CAPABILITIES)$(SUBTRACTED_CAPABILITIES),none)
-
-  ifeq ($(UID2),00000000)
-    UID2:=$(if $(UID2_ZERO_OVERRIDE),$(UID2_ZERO_OVERRIDE),00000000)
-  endif
-
-  define gccxmlmeta2xml
-  # note: we jump through some rather awkward hoops here in an attempt to not cause issues for the Bash shell
-  # with gargantuan concatenated "echo" statements.  This includes not being wrapped by start/endrule and
-  # using grouping functions where appropriate.
-    $(1):
-	  $(call startrule,gccxmlmeta2xml) \
-	    echo creating $(1) quietly \
-	  $(call endrule,gccxmlmeta2xml)
-	  @echo -e \
-	    "\n" \
-	    "\n" \
-	    "\t\n" \
-	    "\t\n" \
-	    "\t\n" \
-	    "\t\n" \
-	    "\t\n" \
-	    "\t\n" \
-	    "\t\n" \
-	    "\t\n" \
-	    "\t\n" \
-	    "\t\n" \
-	    "\t\n" \
-	    "\t\n" \
-	    "\t\t" \
-	    > $(1)
-	  $(call groupreplacein50infile,\t\t,$(subst .dso,.lib,$(LIBRARY)),$(1))
-	  $(call groupreplacein50infile,\t\t,$(STATICLIBRARY),$(1))
-	  @echo -e \
-	    "\t\n" \
-	    "\t" \
-	    >> $(1)
-	  $(call groupreplacein50infile,\t\t,$(RFIFILES),$(1))
-	  @echo -e \
-	    "\t" \
-	    >> $(1)
-	  $(call groupreplacein50infile,\t,$(SOURCE),$(1))
-	  $(call groupreplacein50infile,\t,$(EXPORTHEADERS),$(1))
-	  @echo -e \
-	    "\n" \
-	    >> $(1)
-  endef
-
-  $(eval $(call gccxmlmeta2xml,$(MMPXMLFILE)))
-  $(eval PROCESSED_$(call sanitise,$(MMPXMLFILE)):=1)
-endif
-
-
-# process straight source files into .xml files, generating .d dependency files and updating includeheaders.txt
-# note: includeheaders.txt is neither tracked as a formal dependency, nor deleted during a clean.  This mirrors
-# the situation with ABLD where the GCCXML build continually updates the file as it finds it.
-define gccxmlprocesssource
-
-  $(eval DEPENDFILENAME:=$(call mapsource2output,$(1),.xml.d))
-  $(eval DEPENDFILE:=$(DEPENDFILENAME))
-
-  $(call mapsource2output,$(1),.xml): $(1) $(if $(DEPENDFILE),,RESOURCE BITMAP EXPORT)
-	$(call startrule,gccxmlprocesssource) \
-	$(CC) $(CFLAGS) $(OPTION_GCCXML) \
-	$(if $(filter $(CIAFILEEXTENSIONS),$(1)),$(call makemacrodef,$(OPT.DEFINE),__CIA__),) \
-	$(DEFINES) \
-	$(OPT.USERINCLUDE)$(patsubst %/,%,$(dir $(1))) \
-	$(INCLUDES) \
-	-fxml="$$@" -MD "$$@.d" -MT "$$@" $(OPT.OUT) nul "$(1)" && \
-	$(GNUSED) '/^.*\.xml:.*$$$$/d;/^ [a-zA-Z].*$$$$/d;s/^  //;s/ \\\$$$$//;s/\/\//\//g;/^s*$$$$/d' < $$@.d | $(GNUAWK) '{sub(/ /,"\n")};1' >> $(INCLUDESFILE) \
-	$(call endrule,gccxmlprocesssource)
-
-    CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
-    ifneq "$(DEPENDFILE)" ""
-    ifeq ($(NO_DEPEND_INCLUDE),)
-      ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" ""
-        -include $(DEPENDFILE)
-      endif
-    endif
-    endif
-
-endef
-$(foreach SRCFILE,$(SOURCE),$(eval $(call gccxmlprocesssource,$(SRCFILE))))
-
-
-# package output
-# this is done in a slightly indirect way in order to work around the fact that the ABLD GCCXML build doesn't always pick
-# a unique name for .gxp files for some components with multiple .mmp files i.e. it deletes/generates the same name
-# .gxp file over, and over, again.  What follows ensures that the build tree .gxp file is always unique, and that
-# we just publish that last one that is built.  This mirrors what ABLD achieves, and avoids "overriding" warnings in
-# makefile processing.
-# 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 startrule,gccxmlpackage) \
-	  $(GNURM) -f $(GXPARCHIVE) && \
-	  $(GNUCP) $$@ $(GXPARCHIVE) \
-	  $(if $(SAVESPACE),; $(GNURM) -rf $(VARIANTBLDPATH); true,) \
-	  $(call endrule,gccxmlpackage)
-
-  $(GXPARCHIVE): $(TEMPGXPARCHIVE)
-endef
-$(eval $(gccxmlpackage))
-
-# Global targets
-.PHONY:: $(ALLTARGET)
-$(ALLTARGET):: $(RELEASABLES)
-TARGET:: $(RELEASABLES)
-
-# clean up
-$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS),$(CREATABLEPATHS),))
-$(call makepath, $(CREATABLEPATHS))
-
+# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# All targets Function Like Makefile (FLM) supporting the execution of
+# gccxml_cc1plus on source, the creation of project and resource descriptive XML files
+# and packaging into an appropriate archive for CDB processing.
+#
+#
+
+
+# passed in values, stripped of whitespace
+DEFFILE:=$(strip $(DEFFILE))
+LINKAS:=$(strip $(LINKAS))
+UID1:=$(strip $(UID1))
+UID2:=$(strip $(UID2))
+UID3:=$(strip $(UID3))
+
+# local variables
+CREATABLEPATHS:=
+CLEANTARGETS:=
+RELEASABLES:=
+STDCPP_BUILD:=
+CIAFILEEXTENSIONS:=%.CIA %.cia %.Cia %.cIa %.cIA %.ciA %.CIa %.CiA
+
+ROOTBLDPATH:=$(OUTPUTPATH)/gccxml
+VARIANTBLDPATH:=$(OUTPUTPATH)/$(FULLVARIANTPATH)
+ROOTRELEASEPATH:=$(RELEASEPATH)/gccxml
+VARIANTRELEASEPATH:=$(RELEASEPATH)/$(FULLVARIANTPATH)
+
+CREATABLEPATHS:=$(CREATABLEPATHS) $(VARIANTBLDPATH) $(VARIANTRELEASEPATH) $(ROOTBLDPATH) $(ROOTRELEASEPATH)
+
+# type-specific definitions
+BASE_TYPE:=dll
+TARGET_MACRO:=__DLL__
+ifneq ($(findstring exe,$(TARGETTYPE)),)
+  BASE_TYPE:=exe
+  TARGET_MACRO:=__EXE__
+endif
+ifneq ($(findstring lib,$(TARGETTYPE)),)
+  BASE_TYPE:=lib
+  TARGET_MACRO:=
+endif
+
+# utility functions
+# returns absolutely-pathed temporary build filenames based solely on the basename of the source file, but with an additional "_" for .cia files
+# $(1) input source file list
+# $(2) output file extension
+define mapsource2output
+  $(foreach SOURCEFILE,$(1),$(patsubst %, $(VARIANTBLDPATH)/%, $(basename $(notdir $(SOURCEFILE)))$(if $(filter $(CIAFILEEXTENSIONS),$(SOURCEFILE)),_,)$(2)))
+endef
+
+# returns absolutely-pathed temporary build filenames based on the full resource filename
+# $(1) input resource file list
+# $(2) output file extension
+define mapresource2output
+  $(patsubst %, $(ROOTBLDPATH)/%, $(addsuffix $(2),$(notdir $(1))))
+endef
+
+# calls a tool multiple times with grouped arguments
+# $(1) tool to call with any non-variable arguments
+# $(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)
+endef
+
+# echos content to a file in groups performing optional search/replace based on passed args
+# $(1) template line with optional __VERBATIM__, __PATH__, __FILENAME__ replacements
+# $(2) list of pathed filenames to be batch processed and that can be used for template replacements
+# $(3) output file
+define groupreplacein50infile
+	$(if $2,@echo -e $(foreach L,$(wordlist 1,50,$2),"$(subst __VERBATIM__,$(L),$(subst __PATH__,$(dir $(L)),$(subst __FILENAME__,$(notdir $(L)),$1)))\\n") >>$3,)
+	$(if $2,$(call groupreplacein50infile,$1,$(wordlist 51,$(words $2),$2),$3),@true)
+endef
+
+# targets
+INCLUDESFILE:=$(ROOTRELEASEPATH)/includeheaders.txt
+MMPXMLFILE:=$(ROOTBLDPATH)/$(notdir $(PROJECT_META)).xml
+SRCXMLFILES:=$(call mapsource2output,$(SOURCE),.xml)
+RFIFILES:=$(call mapresource2output,$(RESOURCEFILES),.rfi)
+DEPFILES:=$(call mapsource2output,$(SOURCE),.xml.d)
+TEMPGXPARCHIVE:=$(VARIANTBLDPATH)/$(TARGET)$(BASE_TYPE).gxp
+GXPARCHIVE:=$(VARIANTRELEASEPATH)/$(TARGET)$(BASE_TYPE).gxp
+
+CLEANTARGETS:=$(CLEANTARGETS) $(MMPXMLFILE) $(SRCXMLFILES) $(DEPFILES) $(TEMPGXPARCHIVE) $(GXPARCHIVE)
+RELEASABLES:=$(RELEASABLES) $(GXPARCHIVE)
+
+# Deduce whether we should be performing a build with standard CPP characteristics
+# This operates differently per-OS release, although OE TARGETTYPEs always build with standard CPP traits
+ifeq ($(OPEN_ENVIRONMENT),1)
+  STDCPP_BUILD:=1
+endif
+
+ifeq ($(SUPPORTS_STDCPP_NEWLIB),1)
+  ifeq ($(NOSTDCPP),1)
+    STDCPP_BUILD:=
+  else
+    ifeq ($(STDCPP),1)
+      STDCPP_BUILD:=1
+    endif
+  endif
+endif
+
+ifeq ($(STDCPP_BUILD),1)
+  CDEFS:=$(CDEFS) $(STDCPP_DEF)
+  SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(STDCPP_INCLUDE)
+endif
+
+CDEFS:=$(CDEFS) $(TARGET_DEFS)
+SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(TARGET_INCLUDES)
+
+# include paths
+UINCLUDE:=$(patsubst %,$(OPT.USERINCLUDE)%,$(USERINCLUDE))
+SINCLUDE:=$(patsubst %,$(OPT.SYSINCLUDE)%,$(SYSTEMINCLUDE))
+PINCLUDE:=$(OPT.PREINCLUDE)$(PRODUCT_INCLUDE)
+INCLUDES:=$(UINCLUDE) $(OPT.SPLITINCLUDE) $(SINCLUDE) $(PINCLUDE)
+
+DEFINES:=$(call makemacrodef,$(OPT.DEFINE),$(CDEFS) $(TARGET_MACRO))
+
+
+# .mmp XML description file
+ifneq ($(PROCESSED_$(call sanitise,$(MMPXMLFILE))),1)
+
+  ifeq ($(LINKAS),)
+    LINKASBASE:=$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
+  else
+    LINKASBASE:=$(LINKAS)
+  endif
+
+  LINKASVERSIONED:=$(basename $(LINKASBASE)){$(VERSIONHEX)}$(suffix $(LINKASBASE))
+
+  ADDED_CAPABILITIES:=$(subst $(CHAR_SPACE),+,$(filter-out -%,$(CAPABILITY)))
+  SUBTRACTED_CAPABILITIES:=$(subst $(CHAR_SPACE),,$(filter -%,$(CAPABILITY)))
+  FINAL_CAPABILITIES:=$(if $(ADDED_CAPABILITIES),$(ADDED_CAPABILITIES)$(SUBTRACTED_CAPABILITIES),none)
+
+  ifeq ($(UID2),00000000)
+    UID2:=$(if $(UID2_ZERO_OVERRIDE),$(UID2_ZERO_OVERRIDE),00000000)
+  endif
+
+  define gccxmlmeta2xml
+  # note: we jump through some rather awkward hoops here in an attempt to not cause issues for the Bash shell
+  # with gargantuan concatenated "echo" statements.  This includes not being wrapped by start/endrule and
+  # using grouping functions where appropriate.
+    $(1):
+	  $(call startrule,gccxmlmeta2xml) \
+	    echo creating $(1) quietly \
+	  $(call endrule,gccxmlmeta2xml)
+	  @echo -e \
+	    "\n" \
+	    "\n" \
+	    "\t\n" \
+	    "\t\n" \
+	    "\t\n" \
+	    "\t\n" \
+	    "\t\n" \
+	    "\t\n" \
+	    "\t\n" \
+	    "\t\n" \
+	    "\t\n" \
+	    "\t\n" \
+	    "\t\n" \
+	    "\t\n" \
+	    "\t\t" \
+	    > $(1)
+	  $(call groupreplacein50infile,\t\t,$(subst .dso,.lib,$(LIBRARY)),$(1))
+	  $(call groupreplacein50infile,\t\t,$(STATICLIBRARY),$(1))
+	  @echo -e \
+	    "\t\n" \
+	    "\t" \
+	    >> $(1)
+	  $(call groupreplacein50infile,\t\t,$(RFIFILES),$(1))
+	  @echo -e \
+	    "\t" \
+	    >> $(1)
+	  $(call groupreplacein50infile,\t,$(SOURCE),$(1))
+	  $(call groupreplacein50infile,\t,$(EXPORTHEADERS),$(1))
+	  @echo -e \
+	    "\n" \
+	    >> $(1)
+  endef
+
+  $(eval $(call gccxmlmeta2xml,$(MMPXMLFILE)))
+  $(eval PROCESSED_$(call sanitise,$(MMPXMLFILE)):=1)
+endif
+
+
+# process straight source files into .xml files, generating .d dependency files and updating includeheaders.txt
+# note: includeheaders.txt is neither tracked as a formal dependency, nor deleted during a clean.  This mirrors
+# the situation with ABLD where the GCCXML build continually updates the file as it finds it.
+define gccxmlprocesssource
+
+  $(eval DEPENDFILENAME:=$(call mapsource2output,$(1),.xml.d))
+  $(eval DEPENDFILE:=$(DEPENDFILENAME))
+
+  $(call mapsource2output,$(1),.xml): $(1) $(if $(DEPENDFILE),,RESOURCE BITMAP EXPORT)
+	$(call startrule,gccxmlprocesssource) \
+	$(CC) $(CFLAGS) $(OPTION_GCCXML) \
+	$(if $(filter $(CIAFILEEXTENSIONS),$(1)),$(call makemacrodef,$(OPT.DEFINE),__CIA__),) \
+	$(DEFINES) \
+	$(OPT.USERINCLUDE)$(patsubst %/,%,$(dir $(1))) \
+	$(INCLUDES) \
+	-fxml="$$@" -MD "$$@.d" -MT "$$@" $(OPT.OUT) nul "$(1)" && \
+	$(GNUSED) '/^.*\.xml:.*$$$$/d;/^ [a-zA-Z].*$$$$/d;s/^  //;s/ \\\$$$$//;s/\/\//\//g;/^s*$$$$/d' < $$@.d | $(GNUAWK) '{sub(/ /,"\n")};1' >> $(INCLUDESFILE) \
+	$(call endrule,gccxmlprocesssource)
+
+    CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
+    ifneq "$(DEPENDFILE)" ""
+    ifeq ($(NO_DEPEND_INCLUDE),)
+      ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" ""
+        -include $(DEPENDFILE)
+      endif
+    endif
+    endif
+
+endef
+$(foreach SRCFILE,$(SOURCE),$(eval $(call gccxmlprocesssource,$(SRCFILE))))
+
+
+# package output
+# this is done in a slightly indirect way in order to work around the fact that the ABLD GCCXML build doesn't always pick
+# a unique name for .gxp files for some components with multiple .mmp files i.e. it deletes/generates the same name
+# .gxp file over, and over, again.  What follows ensures that the build tree .gxp file is always unique, and that
+# we just publish that last one that is built.  This mirrors what ABLD achieves, and avoids "overriding" warnings in
+# makefile processing.
+# 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 startrule,gccxmlpackage) \
+	  $(GNURM) -f $(GXPARCHIVE) && \
+	  $(GNUCP) $$@ $(GXPARCHIVE) \
+	  $(if $(SAVESPACE),; $(GNURM) -rf $(VARIANTBLDPATH); true,) \
+	  $(call endrule,gccxmlpackage)
+
+  $(GXPARCHIVE): $(TEMPGXPARCHIVE)
+endef
+$(eval $(gccxmlpackage))
+
+# Global targets
+.PHONY:: $(ALLTARGET)
+$(ALLTARGET):: $(RELEASABLES)
+TARGET:: $(RELEASABLES)
+
+# clean up
+$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS),$(CREATABLEPATHS),))
+$(call makepath, $(CREATABLEPATHS))
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/gccxmlresource.flm
--- a/sbsv2/raptor/lib/flm/gccxmlresource.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/gccxmlresource.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,37 +1,37 @@
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# Thin Function Like Makefile (FLM) wrapper to general resource building FLM
-# for gccxml builds.
-# 
-#
-
-
-# .rfi files need to be generated to a known location that is determined by the "core" GCCXML wrapper build
-RFIFILE:=$(MAIN_OUTPUTPATH)/$(OUTPUTPATHOFFSET)/$(MAIN_TARGET_lower)_$(MAIN_REQUESTEDTARGETEXT)/gccxml/$(notdir $(SOURCE)).rfi
-
-define generaterfifile
-# $(1) is the .rfi filename
-# $(2) is the list of .rpp files
-# $(3) is the list of dependency files
-
-   $(1): $(2)
-	$(call startrule,generaterfifile,FORCESUCCESS) \
-	$(CREATERFIFILE) -o $(1) -x "$(EPOCROOT)/epoc32" $(3) \
-	$(call endrule,generaterfifile)
-endef
-
-# Main (and mostly generic) resource building FLM
-include $(FLMHOME)/resource.flm
-
-
+# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Thin Function Like Makefile (FLM) wrapper to general resource building FLM
+# for gccxml builds.
+# 
+#
+
+
+# .rfi files need to be generated to a known location that is determined by the "core" GCCXML wrapper build
+RFIFILE:=$(MAIN_OUTPUTPATH)/$(OUTPUTPATHOFFSET)/$(MAIN_TARGET_lower)_$(MAIN_REQUESTEDTARGETEXT)/gccxml/$(notdir $(SOURCE)).rfi
+
+define generaterfifile
+# $(1) is the .rfi filename
+# $(2) is the list of .rpp files
+# $(3) is the list of dependency files
+
+   $(1): $(2)
+	$(call startrule,generaterfifile,FORCESUCCESS) \
+	$(CREATERFIFILE) -o $(1) -x "$(EPOCROOT)/epoc32" $(3) \
+	$(call endrule,generaterfifile)
+endef
+
+# Main (and mostly generic) resource building FLM
+include $(FLMHOME)/resource.flm
+
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/globals.mk
--- a/sbsv2/raptor/lib/flm/globals.mk	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/globals.mk	Mon Nov 16 09:46:46 2009 +0000
@@ -1,158 +1,158 @@
-#
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# global include file : this is included by all generated makefiles
-# 1) include all the common tools
-# 2) add global targets such as CLEAN and REALLYCLEAN
-# 3) specify the top level dependencies between targets
-# INPUTS : assumes OSTYPE and FLMHOME are set.
-#
-
-ifeq ($(SYMBIAN_FLM_GLOBALS_MK),)
-SYMBIAN_FLM_GLOBALS_MK:=1
-
-# get the common tools
-include $(FLMHOME)/flmtools.mk
-
-# initialise the list of created directories
-makepathLIST:=
-
-# set the variables TOOLPLATFORMDIR and DOTEXE
-ifeq ($(filter win,$(HOSTPLATFORM)),win)
-DOTEXE:=.exe
-TOOLPLATFORMDIR:=
-else
-DOTEXE:=
-TOOLPLATFORMDIR:=/$(HOSTPLATFORM_DIR)
-endif
-
-# addglobal(GlobalTargetName)
-SYMBIAN_GLOBAL_TARGETS:=
-
-define sgt_addcmds
-.PHONY:: $1
-
-$(if $(filter win,$(HOSTPLATFORM)),,$(call lowercase,$1):: $1)
-
-SYMBIAN_GLOBAL_TARGETS:=$$(SYMBIAN_GLOBAL_TARGETS) $(1)
-endef
-
-define addglobal
-$(eval $(call sgt_addcmds,$(1)))
-endef
-
-ALLTARGET:=ALL
-
-.PHONY:: $(ALLTARGET)
-$(ALLTARGET):: BUILD
-
-# Global targets should generally be double colon rules because
-# they allow horizontal states to be placed into the build system.
-# e.g the "EXPORTED" state.
-$(call addglobal,BUILD)
-$(call addglobal,CLEAN)
-$(call addglobal,CLEANEXPORT)
-$(call addglobal,EXPORT)
-$(call addglobal,FINAL)
-$(call addglobal,FREEZE)
-$(call addglobal,LIBRARY)
-$(call addglobal,LISTING)
-$(call addglobal,MAKEFILE)
-$(call addglobal,REALLYCLEAN)
-$(call addglobal,BITMAP)
-$(call addglobal,RESOURCE)
-$(call addglobal,ROMFILE)
-$(call addglobal,TARGET)
-$(call addglobal,WHAT)
-$(call addglobal,WHATEXPORTS)
-$(call addglobal,WHATARMV5)
-$(call addglobal,WHATWINSCW)
-$(call addglobal,WHATTOOLS2)
-$(call addglobal,WHATTOOLS)
-$(call addglobal,WHATTEM)
-$(call addglobal,WHATRESOURCES)
-$(call addglobal,WHATBITMAP)
-$(call addglobal,WHATGNUEM)
-$(call addglobal,WHATSTRINGTABLE)
-
-# Ignore errors in some rules so as to "keep going"
-# so if one export fails then that won't stop unrelated
-# .cpp files from building. (.cpp files must all depend on EXPORT
-# so that parallel builds work)
-.IGNORE: EXPORT BITMAP RESOURCE LIBRARY
-# dependencies between top-level targets
-BUILD:: EXPORT MAKEFILE BITMAP RESOURCE LIBRARY TARGET FINAL
-
-MAKEFILE:: EXPORT
-BITMAP:: MAKEFILE
-RESOURCE:: BITMAP
-LIBRARY:: RESOURCE 
-TARGET:: LIBRARY
-FINAL:: TARGET
-
-.PHONY:: EXPORT
-
-
-WHAT:: WHATEXPORTS WHATARMV5 WHATWINSCW WHATTOOLS2 WHATTEM WHATGNUEM WHATRESOURCES WHATBITMAP WHATSTRINGTABLE
-
-REALLYCLEAN:: CLEAN CLEANEXPORT
-
-# Create one of every double colon rule
-WHATBITMAP::
-
-WHATRESOURCES::
-
-WHATSTRINGTABLE::
-
-WHATTEM::
-
-WHATGNUEM::
-
-WHATTOOLS2::
-
-WHATWINSCW::
-
-WHATARMV5::
-
-WHATEXPORTS::
-
-LISTING::
-
-CLEAN::
-
-CLEANEXPORT::
-
-REALLYCLEAN::
-
-EXPORT::
-
-RESOURCE::
-
-BITMAP::
-
-# put known resource header to resource header dependencies here
-
-eikcdlg_DEPENDS:=eikcore.rsg eikcoctl.rsg
-eikmisc_DEPENDS:=eikcore.rsg
-eikfile_DEPENDS:=eikcoctl.rsg
-eikir_DEPENDS:=eikcoctl.rsg
-eikprint_DEPENDS:=eikcoctl.rsg
-
-
-# For users of SBSv2 who wish to add in their own global settings
-# without modifying this file:
--include $(FLMHOME)/user/globals.mk
-
-endif
-
+#
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# global include file : this is included by all generated makefiles
+# 1) include all the common tools
+# 2) add global targets such as CLEAN and REALLYCLEAN
+# 3) specify the top level dependencies between targets
+# INPUTS : assumes OSTYPE and FLMHOME are set.
+#
+
+ifeq ($(SYMBIAN_FLM_GLOBALS_MK),)
+SYMBIAN_FLM_GLOBALS_MK:=1
+
+# get the common tools
+include $(FLMHOME)/flmtools.mk
+
+# initialise the list of created directories
+makepathLIST:=
+
+# set the variables TOOLPLATFORMDIR and DOTEXE
+ifeq ($(filter win,$(HOSTPLATFORM)),win)
+DOTEXE:=.exe
+TOOLPLATFORMDIR:=
+else
+DOTEXE:=
+TOOLPLATFORMDIR:=/$(HOSTPLATFORM_DIR)
+endif
+
+# addglobal(GlobalTargetName)
+SYMBIAN_GLOBAL_TARGETS:=
+
+define sgt_addcmds
+.PHONY:: $1
+
+$(if $(filter win,$(HOSTPLATFORM)),,$(call lowercase,$1):: $1)
+
+SYMBIAN_GLOBAL_TARGETS:=$$(SYMBIAN_GLOBAL_TARGETS) $(1)
+endef
+
+define addglobal
+$(eval $(call sgt_addcmds,$(1)))
+endef
+
+ALLTARGET:=ALL
+
+.PHONY:: $(ALLTARGET)
+$(ALLTARGET):: BUILD
+
+# Global targets should generally be double colon rules because
+# they allow horizontal states to be placed into the build system.
+# e.g the "EXPORTED" state.
+$(call addglobal,BUILD)
+$(call addglobal,CLEAN)
+$(call addglobal,CLEANEXPORT)
+$(call addglobal,EXPORT)
+$(call addglobal,FINAL)
+$(call addglobal,FREEZE)
+$(call addglobal,LIBRARY)
+$(call addglobal,LISTING)
+$(call addglobal,MAKEFILE)
+$(call addglobal,REALLYCLEAN)
+$(call addglobal,BITMAP)
+$(call addglobal,RESOURCE)
+$(call addglobal,ROMFILE)
+$(call addglobal,TARGET)
+$(call addglobal,WHAT)
+$(call addglobal,WHATEXPORTS)
+$(call addglobal,WHATARMV5)
+$(call addglobal,WHATWINSCW)
+$(call addglobal,WHATTOOLS2)
+$(call addglobal,WHATTOOLS)
+$(call addglobal,WHATTEM)
+$(call addglobal,WHATRESOURCES)
+$(call addglobal,WHATBITMAP)
+$(call addglobal,WHATGNUEM)
+$(call addglobal,WHATSTRINGTABLE)
+
+# Ignore errors in some rules so as to "keep going"
+# so if one export fails then that won't stop unrelated
+# .cpp files from building. (.cpp files must all depend on EXPORT
+# so that parallel builds work)
+.IGNORE: EXPORT BITMAP RESOURCE LIBRARY
+# dependencies between top-level targets
+BUILD:: EXPORT MAKEFILE BITMAP RESOURCE LIBRARY TARGET FINAL
+
+MAKEFILE:: EXPORT
+BITMAP:: MAKEFILE
+RESOURCE:: BITMAP
+LIBRARY:: RESOURCE 
+TARGET:: LIBRARY
+FINAL:: TARGET
+
+.PHONY:: EXPORT
+
+
+WHAT:: WHATEXPORTS WHATARMV5 WHATWINSCW WHATTOOLS2 WHATTEM WHATGNUEM WHATRESOURCES WHATBITMAP WHATSTRINGTABLE
+
+REALLYCLEAN:: CLEAN CLEANEXPORT
+
+# Create one of every double colon rule
+WHATBITMAP::
+
+WHATRESOURCES::
+
+WHATSTRINGTABLE::
+
+WHATTEM::
+
+WHATGNUEM::
+
+WHATTOOLS2::
+
+WHATWINSCW::
+
+WHATARMV5::
+
+WHATEXPORTS::
+
+LISTING::
+
+CLEAN::
+
+CLEANEXPORT::
+
+REALLYCLEAN::
+
+EXPORT::
+
+RESOURCE::
+
+BITMAP::
+
+# put known resource header to resource header dependencies here
+
+eikcdlg_DEPENDS:=eikcore.rsg eikcoctl.rsg
+eikmisc_DEPENDS:=eikcore.rsg
+eikfile_DEPENDS:=eikcoctl.rsg
+eikir_DEPENDS:=eikcoctl.rsg
+eikprint_DEPENDS:=eikcoctl.rsg
+
+
+# For users of SBSv2 who wish to add in their own global settings
+# without modifying this file:
+-include $(FLMHOME)/user/globals.mk
+
+endif
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/gnumakefile.flm
--- a/sbsv2/raptor/lib/flm/gnumakefile.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/gnumakefile.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,191 +1,191 @@
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# Gnumakefile FLM -> Knows how to run gnumakefiles
-# Will only work on Windows
-# 
-#
-
-TMPROOT:=$(subst \,/,$(EPOCROOT))
-OLD_EPOCROOT:=$(patsubst %/,%,$(TMPROOT))/
-OLDSTYLE_EPOCROOT:=$(subst /,\,$(OLD_EPOCROOT))
-
-# Set up the correct make to be invoked
-MAKEVAR:=
-ifeq ($(USENMAKE),1)
-MAKEVAR:=$(NMAKE) $(NMAKEFLAGS)
-else
-MAKEVAR:="$(SBSV1MAKE)"
-endif
-
-################################# FLM Parameter description ##
-# Parameters:
-#   EPOCROOT:=
-#   PLATFORM:=$(VARIANTPLATFORM)
-# The current configuration either UREL or UDEB:
-#   CFG:=$(VARIANTTYPE)
-# Relative path to EPOCROOT. (to where?):
-#   TO_ROOT:=
-# The path to the top-level bld.inf.
-# Note: if a bld.inf file #includes another bld.inf, this variable will
-# always contain the directory of that top-level file. If you require
-# the directory of the bld.inf which actually references the makefile,
-# use $(EXTENSION_ROOT) instead.
-#   TO_BLDINF:=
-# The project's working build directory under \epoc32\build\..
-#   EPOCBLD:=
-
-
-################################ Standard Variables ##
-# We may set the following 
-# for the sake of gnumakefiles which
-# need to know them:
-
-## Path element separator.
-/:=/
-## PATH environment variable separator.
-;:=:
-
-####
-# Various file and directory manipulation tools.
-# We are using the standard GNU coretools.
-# On Windows these are supplied by CYGWIN
-RMDIR:=$(GNURMDIR)
-RM:=$(GNURM)
-ERASE:=$(GNURM)
-MKDIR:=$(GNUMKDIR)
-CP:=$(GNUCP)
-
-# Targets:
-# We need to hook the BLD, LIB, ..., targets in the gnumakefile into the
-# global phony TARGET, LIBRARY, ..., targets in the overall Makefile.
-#
-# Additionally we need a specific name for each gnumakefile's targets so
-# that we can create dependencies between, say, the FINAL target of one
-# extension and the FINAL target of another. Ideally this name would be
-# unique but that would require the full path to be used so we compromise
-# and use a unique name and a portable reference that is relatively "unique".
-
-UNIQ:=$(DIRECTORY)$(EXTMAKEFILENAME)$(TO_ROOT)$(EPOCBLD)$(TO_BLDINF)$(PLATFORM)$(CFG)$(MAKEVAR)
-UNIQ:=$(word 1,$(shell echo $(UNIQ) | $(GNUMD5SUM)))
-gmake_$(notdir $(EXTMAKEFILENAME))_$(PLATFORM)_$(CFG):=$(UNIQ)
-CFG_uppercase:=$(call uppercase,$(CFG))
-
-RVCT22BIN:=$(RVCTBIN)
-RVCT22LIB:=$(RVCTLIB)
-RVCT22INC:=$(RVCTINC)
-
-EXTMAKEFILEPARAMETERS:= \
-	EPOCROOT PLATFORM TO_ROOT TO_BLDINF \
-	EPOCBLD CFG RMDIR RM ERASE MKDIR CP  \
-	MAKEFILENAME DIRECTORY EXTMAKEFILENAME            \
-	DEPENDENCIES TOOL RVCT22LIB RVCT22INC RVCT22BIN MAKEVAR
-
-# The standard gnumakefile Targets
-# These will be implemented in terms of double colon
-# rules - such that make FREEZE will cause all FREEZE 
-# targets to be evaluated.
-# For each call of this FLM we also need
-# to create unique versions of each of these targets
-# so that there is something to attach
-# the current FLM parameters to using target-specific 
-# variable declarations.
-
-EXTMAKETARGETS:= \
-	MAKMAKE     \
-	BLD         \
-	FREEZE      \
-	LIB         \
-	CLEANLIB    \
-	RESOURCE    \
-	CLEAN       \
-	RELEASABLES \
-	FINAL
-#	DO_NOTHING  
-
-# Hook into global targets
-#
-MAKEFILE::    $(UNIQ)_MAKMAKE
-BITMAP::      $(UNIQ)_MAKMAKE
-TARGET::      $(UNIQ)_BLD
-FREEZE::      $(UNIQ)_FREEZE
-LIBRARY::     $(UNIQ)_LIB
-CLEAN::       $(UNIQ)_CLEAN $(UNIQ)_CLEANLIB
-RESOURCE::    $(UNIQ)_RESOURCE
-FINAL::       $(UNIQ)_FINAL
-RELEASABLES:: $(UNIQ)_RELEASABLES
-
-# make sure gnumakefiles happen at the right stages
-MAKMAKE_DEPS:=EXPORT
-RESOURCE_DEPS:=BITMAP 
-LIB_DEPS:=RESOURCE
-BLD_DEPS:=LIBRARY
-FINAL_DEPS:=TARGET
-
-export /
-export ;
-
-#################################### Global Targets ##
-## All the global targets for the gnumakefiles
-# gnumakes are called as sub-makes, using make 3.79 from abld (passed through $(SBSV1MAKE)). 
-# makefile and nmakefile are called using nmake.
-
-define callgnumake
-.PHONY:: $(UNIQ)_$(1)
-
-$(EPOCROOT)/epoc32/build/TEM_$(1):: $(UNIQ)_$(1)
-
-$(UNIQ)_$(1): $($(1)_DEPS)
-	$(call startrule,extension_makefile,FORCESUCCESS) \
-	$(foreach V,$(EXTMAKEFILEPARAMETERS),$(V)='$($(V))') EXTMAKEFILETARGET='$(1)' \
-	$(if $(USENMAKE),export MAKEFLAGS="";cd "$(subst /,\,$(DIRECTORY))";,) export EPOCROOT="$(strip $(OLDSTYLE_EPOCROOT))\"; export CFG=$(CFG_uppercase); \
-	$(MAKEVAR) $(if $(USENMAKE),,-C "$(subst /,\,$(DIRECTORY))") -f "$(EXTMAKEFILENAME)" \
-	CFG=$(CFG_uppercase) EPOCBLD="$(subst /,\,$(EPOCBLD))" TO_BLDINF="$(subst /,\,$(TO_BLDINF))" PLATFORM=$(PLATFORM) $(if $(SAVESPACE),$(subst BLD,SAVESPACE,$(1)),$(1)) \
-	$(call endrule,extension_makefile) 
-ifneq ($(call isoneof,$(1),RELEASABLES FINAL),)
-	$(call startrawoutput) \
-	echo "$(call whatLogOpen)" ; \
-	$(foreach V,$(EXTMAKEFILEPARAMETERS),$(V)='$($(V))') EXTMAKEFILETARGET='RELEASABLES' \
-	$(if $(USENMAKE),export MAKEFLAGS="";cd "$(subst /,\,$(DIRECTORY))";,) export EPOCROOT="$(strip $(OLDSTYLE_EPOCROOT))\"; export CFG=$(CFG_uppercase); \
-	$(MAKEVAR) $(if $(USENMAKE),-C -S,-C "$(subst /,\,$(DIRECTORY))" --no-print-directory) -f "$(EXTMAKEFILENAME)" \
-	CFG=$(CFG_uppercase) EPOCBLD="$(subst /,\,$(EPOCBLD))" TO_BLDINF="$(subst /,\,$(TO_BLDINF))" PLATFORM=$(PLATFORM) RELEASABLES | \
-	(read -r LINE; while [ $$$$? -eq 0 ]; do \
-	if [[ ! $$$$LINE =~ "Nothing to be done for"  ]] ; then echo "$(call whatLogItem,EM,$$$$LINE)"; fi; \
-	read -r LINE; done; ); \
-	echo "$(call whatLogClose)" \
-	$(call endrawoutput)
-
-
-WHATGNUEM:: $(UNIQ)_RELEASABLES
-
-endif
-endef
-
-DO_NOTHING:: $(UNIQ)_DO_NOTHING 
-$(UNIQ)_DO_NOTHING: ;
-
-$(foreach EXTTRG,$(EXTMAKETARGETS),$(eval $(call callgnumake,$(EXTTRG))))
-
-## Do ROMFILE target in romstuff.mke
-ifeq ($(ROMFILE_$(call sanitise,$(EXTMAKEFILENAME))),)
-ROMFILE_$(call sanitise,$(EXTMAKEFILENAME)):=1
-
-ROMDIR:=$(subst $(OLD_EPOCROOT),$(OLD_EPOCROOT)epoc32/rom/,$(TO_BLDINF))
-
-define RomfileRomstuff
-ROMFILE::
-	@$(MAKEVAR) --no-print-directory $(if $(USENMAKE),,-C "$(subst /,\,$(DIRECTORY))") -f "$(EXTMAKEFILENAME)" ROMFILE >> $(ROMDIR)/ARMV5TEST.IBY
-endef
-
-$(eval $(call RomfileRomstuff))
-endif
+# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Gnumakefile FLM -> Knows how to run gnumakefiles
+# Will only work on Windows
+# 
+#
+
+TMPROOT:=$(subst \,/,$(EPOCROOT))
+OLD_EPOCROOT:=$(patsubst %/,%,$(TMPROOT))/
+OLDSTYLE_EPOCROOT:=$(subst /,\,$(OLD_EPOCROOT))
+
+# Set up the correct make to be invoked
+MAKEVAR:=
+ifeq ($(USENMAKE),1)
+MAKEVAR:=$(NMAKE) $(NMAKEFLAGS)
+else
+MAKEVAR:="$(SBSV1MAKE)"
+endif
+
+################################# FLM Parameter description ##
+# Parameters:
+#   EPOCROOT:=
+#   PLATFORM:=$(VARIANTPLATFORM)
+# The current configuration either UREL or UDEB:
+#   CFG:=$(VARIANTTYPE)
+# Relative path to EPOCROOT. (to where?):
+#   TO_ROOT:=
+# The path to the top-level bld.inf.
+# Note: if a bld.inf file #includes another bld.inf, this variable will
+# always contain the directory of that top-level file. If you require
+# the directory of the bld.inf which actually references the makefile,
+# use $(EXTENSION_ROOT) instead.
+#   TO_BLDINF:=
+# The project's working build directory under \epoc32\build\..
+#   EPOCBLD:=
+
+
+################################ Standard Variables ##
+# We may set the following 
+# for the sake of gnumakefiles which
+# need to know them:
+
+## Path element separator.
+/:=/
+## PATH environment variable separator.
+;:=:
+
+####
+# Various file and directory manipulation tools.
+# We are using the standard GNU coretools.
+# On Windows these are supplied by CYGWIN
+RMDIR:=$(GNURMDIR)
+RM:=$(GNURM)
+ERASE:=$(GNURM)
+MKDIR:=$(GNUMKDIR)
+CP:=$(GNUCP)
+
+# Targets:
+# We need to hook the BLD, LIB, ..., targets in the gnumakefile into the
+# global phony TARGET, LIBRARY, ..., targets in the overall Makefile.
+#
+# Additionally we need a specific name for each gnumakefile's targets so
+# that we can create dependencies between, say, the FINAL target of one
+# extension and the FINAL target of another. Ideally this name would be
+# unique but that would require the full path to be used so we compromise
+# and use a unique name and a portable reference that is relatively "unique".
+
+UNIQ:=$(DIRECTORY)$(EXTMAKEFILENAME)$(TO_ROOT)$(EPOCBLD)$(TO_BLDINF)$(PLATFORM)$(CFG)$(MAKEVAR)
+UNIQ:=$(word 1,$(shell echo $(UNIQ) | $(GNUMD5SUM)))
+gmake_$(notdir $(EXTMAKEFILENAME))_$(PLATFORM)_$(CFG):=$(UNIQ)
+CFG_uppercase:=$(call uppercase,$(CFG))
+
+RVCT22BIN:=$(RVCTBIN)
+RVCT22LIB:=$(RVCTLIB)
+RVCT22INC:=$(RVCTINC)
+
+EXTMAKEFILEPARAMETERS:= \
+	EPOCROOT PLATFORM TO_ROOT TO_BLDINF \
+	EPOCBLD CFG RMDIR RM ERASE MKDIR CP  \
+	MAKEFILENAME DIRECTORY EXTMAKEFILENAME            \
+	DEPENDENCIES TOOL RVCT22LIB RVCT22INC RVCT22BIN MAKEVAR
+
+# The standard gnumakefile Targets
+# These will be implemented in terms of double colon
+# rules - such that make FREEZE will cause all FREEZE 
+# targets to be evaluated.
+# For each call of this FLM we also need
+# to create unique versions of each of these targets
+# so that there is something to attach
+# the current FLM parameters to using target-specific 
+# variable declarations.
+
+EXTMAKETARGETS:= \
+	MAKMAKE     \
+	BLD         \
+	FREEZE      \
+	LIB         \
+	CLEANLIB    \
+	RESOURCE    \
+	CLEAN       \
+	RELEASABLES \
+	FINAL
+#	DO_NOTHING  
+
+# Hook into global targets
+#
+MAKEFILE::    $(UNIQ)_MAKMAKE
+BITMAP::      $(UNIQ)_MAKMAKE
+TARGET::      $(UNIQ)_BLD
+FREEZE::      $(UNIQ)_FREEZE
+LIBRARY::     $(UNIQ)_LIB
+CLEAN::       $(UNIQ)_CLEAN $(UNIQ)_CLEANLIB
+RESOURCE::    $(UNIQ)_RESOURCE
+FINAL::       $(UNIQ)_FINAL
+RELEASABLES:: $(UNIQ)_RELEASABLES
+
+# make sure gnumakefiles happen at the right stages
+MAKMAKE_DEPS:=EXPORT
+RESOURCE_DEPS:=BITMAP 
+LIB_DEPS:=RESOURCE
+BLD_DEPS:=LIBRARY
+FINAL_DEPS:=TARGET
+
+export /
+export ;
+
+#################################### Global Targets ##
+## All the global targets for the gnumakefiles
+# gnumakes are called as sub-makes, using make 3.79 from abld (passed through $(SBSV1MAKE)). 
+# makefile and nmakefile are called using nmake.
+
+define callgnumake
+.PHONY:: $(UNIQ)_$(1)
+
+$(EPOCROOT)/epoc32/build/TEM_$(1):: $(UNIQ)_$(1)
+
+$(UNIQ)_$(1): $($(1)_DEPS)
+	$(call startrule,extension_makefile,FORCESUCCESS) \
+	$(foreach V,$(EXTMAKEFILEPARAMETERS),$(V)='$($(V))') EXTMAKEFILETARGET='$(1)' \
+	$(if $(USENMAKE),export MAKEFLAGS="";cd "$(subst /,\,$(DIRECTORY))";,) export EPOCROOT="$(strip $(OLDSTYLE_EPOCROOT))\"; export CFG=$(CFG_uppercase); \
+	$(MAKEVAR) $(if $(USENMAKE),,-C "$(subst /,\,$(DIRECTORY))") -f "$(EXTMAKEFILENAME)" \
+	CFG=$(CFG_uppercase) EPOCBLD="$(subst /,\,$(EPOCBLD))" TO_BLDINF="$(subst /,\,$(TO_BLDINF))" PLATFORM=$(PLATFORM) $(if $(SAVESPACE),$(subst BLD,SAVESPACE,$(1)),$(1)) \
+	$(call endrule,extension_makefile) 
+ifneq ($(call isoneof,$(1),RELEASABLES FINAL),)
+	$(call startrawoutput) \
+	echo "$(call whatLogOpen)" ; \
+	$(foreach V,$(EXTMAKEFILEPARAMETERS),$(V)='$($(V))') EXTMAKEFILETARGET='RELEASABLES' \
+	$(if $(USENMAKE),export MAKEFLAGS="";cd "$(subst /,\,$(DIRECTORY))";,) export EPOCROOT="$(strip $(OLDSTYLE_EPOCROOT))\"; export CFG=$(CFG_uppercase); \
+	$(MAKEVAR) $(if $(USENMAKE),-C -S,-C "$(subst /,\,$(DIRECTORY))" --no-print-directory) -f "$(EXTMAKEFILENAME)" \
+	CFG=$(CFG_uppercase) EPOCBLD="$(subst /,\,$(EPOCBLD))" TO_BLDINF="$(subst /,\,$(TO_BLDINF))" PLATFORM=$(PLATFORM) RELEASABLES | \
+	(read -r LINE; while [ $$$$? -eq 0 ]; do \
+	if [[ ! $$$$LINE =~ "Nothing to be done for"  ]] ; then echo "$(call whatLogItem,EM,$$$$LINE)"; fi; \
+	read -r LINE; done; ); \
+	echo "$(call whatLogClose)" \
+	$(call endrawoutput)
+
+
+WHATGNUEM:: $(UNIQ)_RELEASABLES
+
+endif
+endef
+
+DO_NOTHING:: $(UNIQ)_DO_NOTHING 
+$(UNIQ)_DO_NOTHING: ;
+
+$(foreach EXTTRG,$(EXTMAKETARGETS),$(eval $(call callgnumake,$(EXTTRG))))
+
+## Do ROMFILE target in romstuff.mke
+ifeq ($(ROMFILE_$(call sanitise,$(EXTMAKEFILENAME))),)
+ROMFILE_$(call sanitise,$(EXTMAKEFILENAME)):=1
+
+ROMDIR:=$(subst $(OLD_EPOCROOT),$(OLD_EPOCROOT)epoc32/rom/,$(TO_BLDINF))
+
+define RomfileRomstuff
+ROMFILE::
+	@$(MAKEVAR) --no-print-directory $(if $(USENMAKE),,-C "$(subst /,\,$(DIRECTORY))") -f "$(EXTMAKEFILENAME)" ROMFILE >> $(ROMDIR)/ARMV5TEST.IBY
+endef
+
+$(eval $(call RomfileRomstuff))
+endif
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/grouping.flm
--- a/sbsv2/raptor/lib/flm/grouping.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/grouping.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,29 +1,29 @@
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-
-$(ALLTARGET): /:=$(/)
-$(ALLTARGET): FLMHOME:=$(FLMHOME)
-$(ALLTARGET): COMPONENT_ALLTARGETS:=$(COMPONENT_ALLTARGETS)
-$(ALLTARGET): COMPONENT_GLUEMAKEFILES:=$(COMPONENT_GLUEMAKEFILES)
-
-
-.PHONY:: $(ALLTARGET)
-$(ALLTARGET):: $(COMPONENT_ALLTARGETS)
-
-
-$(foreach COMPONENT_INC,$(COMPONENT_GLUEMAKEFILES),$(eval include $(COMPONENT_INC)))
-
-
+# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+
+$(ALLTARGET): /:=$(/)
+$(ALLTARGET): FLMHOME:=$(FLMHOME)
+$(ALLTARGET): COMPONENT_ALLTARGETS:=$(COMPONENT_ALLTARGETS)
+$(ALLTARGET): COMPONENT_GLUEMAKEFILES:=$(COMPONENT_GLUEMAKEFILES)
+
+
+.PHONY:: $(ALLTARGET)
+$(ALLTARGET):: $(COMPONENT_ALLTARGETS)
+
+
+$(foreach COMPONENT_INC,$(COMPONENT_GLUEMAKEFILES),$(eval include $(COMPONENT_INC)))
+
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/metaflm.mk
--- a/sbsv2/raptor/lib/flm/metaflm.mk	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/metaflm.mk	Mon Nov 16 09:46:46 2009 +0000
@@ -1,224 +1,224 @@
-#
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-
-
-# Macros for creating Standard targets
-
-ifeq ($(_METAFLM_MK_),)
-_METAFLM_MK_:=1
-
-# GENERATE STANDARD CLEAN TARGET 
-# example usage:
-# $(eval $(call GenerateStandardCleanTarget,$(FILE_LIST),$(DIRECTORY_LIST)))
-
-## CLEAN macros #####################################
-# The clean macro does not generate a target but extension makefiles do have
-# CLEAN targets that need to be attached to something.
-.PHONY:: CLEAN
-
-define GenerateStandardCleanTarget
-$(info )
-$(foreach ITEM,$(1),$(info $(ITEM)))
-$(foreach ITEM,$(2),$(info $(ITEM)))
-$(info )
-endef
-
-## End CLEAN macros #####################################
-
-
-## WHAT macros #####################################
-
-
-## Begin --what Macros #####
-define outputWhat
-ifeq ($(OSTYPE),cygwin)
-$(2)::
-	@for FILE in $(subst %20,$(CHAR_SPACE),$(subst /,\\,$(call dblquote,$(1)))); do \
-		echo $$$$FILE; \
-	done;
-else
-$(2)::
-	@for FILE in $(subst %20,$(CHAR_SPACE),$(1)); do \
-		echo $$$$FILE; \
-	done
-endif
-endef
-
-## End --what Macros #####
-
-## Begin .whatlog Macros #####
-define whatLogOpen
-
-endef
-
-define whatLogItem
-$(if $(findstring EXPORT,$(1)),,$(if $(findstring BITMAP,$(1)),,$(if $(findstring STRINGTABLE,$(1)),,$(if $(findstring ARCHIVE,$(1)),,)))))$(subst %20,$(CHAR_SPACE),$(2))$(if $(findstring EXPORT,$(1)),/>,$(if $(findstring RESOURCE,$(1)),,$(if $(findstring BITMAP,$(1)),,$(if $(findstring STRINGTABLE,$(1)),,$(if $(findstring ARCHIVE,$(1)),,)))))
-endef
-
-define whatLogClose
-
-endef
-
-define outputWhatLog
-$(info $(call whatLogOpen))
-$(foreach ITEM,$(1),$(info $(call whatLogItem,$(2),$(ITEM))))
-$(info $(call whatLogClose))
-endef
-
-## End .whatlog Macros #####
-
-# General FLM entry points for what-related processing
-define WhatExports
-endef
-
-define whatmacro
-$(call outputWhatLog,$(1),$(2))
-endef
-
-define whatUnzip
-endef	
-## END WHAT UNZIP MACRO 
-
-## End WHAT macros #####################################
-
-# Macro for creating the test BATCH files.
-# Arguments: $(1) -> Target Name $(2) -> Output Batch file path
-define MakeTestBatchFiles
-    $(if $(BATCHFILE_CREATED_$(2))
-        ,
-            $(if $(TARGET_CREATED_$(2)_$(TARGET))
-                ,
-                ,
-                    $$(shell echo -e "$(1)\r" >> $(2))
-            )
-       	,
-       	    $$(shell $(GNUMKDIR) -p $(dir $(2)))
-       	    $$(shell echo -e "$(1)\r" > $(2))
-    )
-endef
-
-## path creation #########################
-# Make the destination directory if neccessary.  For some
-# make engines we must do this outside the rule or they
-# get confused by the apparent way in which different rules
-# can create a particular directory and they infer some kind
-# of dependency.
-
-# Makepath. Copyright (C) 2008 Symbian Software Ltd.
-# buffering with repeat prevention, makes directories after every 30 calls. Any more might overload 
-# the createprocess limit on arguments.
-#
-# makepathLIST is initialised in globals.mk
-define makepath_single
-$(if $(findstring $1,$(makepathLIST)),,$(eval makepathLIST:=$(makepathLIST) $1))
-$(if $(subst 30,,$(words $(makepathLIST))),,$(shell $(GNUMKDIR) -p $(makepathLIST))$(eval makepathLIST:=))
-endef
-
-# The following turns out to be extremely slow - something to do with using eval 
-# or to do with creating huge numbers of TARGET_ variables? BTW, this is an attempt
-# to not make things that we have already made.
-# define makepath
-# $(info makepath_start)$(foreach DIR,$1,$(if $(TARGET_$(1)),,$(call makepath_single,$(DIR))$(eval TARGET_$(1):=1)))$(info makepath_end)
-# endef
-
-# In general, makepath creates directories during FLM evaluation.
-# However, if the WHAT target is being processed then it should do nothing.
-ifeq ($(filter WHAT,$(call uppercase,$(MAKECMDGOALS))),)
-define makepath
-$(strip $(foreach DIR,$(sort $1),$(call makepath_single,$(DIR))))
-endef
-else
-define makepath
-endef
-endif
-
-
-define makepathfor
-$(call makepath,$(dir $1))
-endef
-
-# Make any remaining paths in the path buffer
-define makepathfinalise
-$(strip $(if $(makepathLIST),$(shell $(GNUMKDIR) -p $(makepathLIST))$(eval makepathLIST:=),))
-endef
-
-## ROMFILE macro #####################################
-define DoRomSet
-
-ifeq ($(call uppercase,$(TARGETTYPE)),LIB)
-BUILDROMTARGET:=
-endif
-
-ifeq ($(call uppercase,$(TARGETTYPE)),KEXT)
-ROMFILETYPE:=extension[MAGIC]
-ABIDIR:=KMAIN
-endif
-ifeq ($(call uppercase,$(TARGETTYPE)),LDD)
-ROMFILETYPE:=device[MAGIC]
-ABIDIR:=KMAIN
-endif
-ifeq ($(call uppercase,$(TARGETTYPE)),PDD)
-ROMFILETYPE:=device[MAGIC]
-ABIDIR:=KMAIN
-endif
-ifeq ($(call uppercase,$(TARGETTYPE)),VAR)
-ROMFILETYPE:=variant[MAGIC]
-ABIDIR:=KMAIN
-endif
-ifeq ($(call uppercase,$(TARGETTYPE)),KDLL)
-ABIDIR:=KMAIN
-endif
-
-ifneq ($(CALLDLLENTRYPOINTS),)
-ROMFILETYPE:=dll
-endif
-ifeq ($(ROMFILETYPE),primary)
-ABIDIR:=KMAIN
-endif
-
-endef
-
-## End of ROMFILE macro ##############################
-
-## Macros for writing FLMs without needing to know eval
-
-# declaring targets as RELEASABLE, for example,
-#
-# $(call raptor_release,$(TARGET1) $(TARGET2),RESOURCE)
-#
-# the optional type (RESOURCE) can be one of,
-# EXPORT RESOURCE BITMAP STRINGTABLE ARCHIVE
-#
-# no argument means just a default (binary) releasable.
-#
-define raptor_release
-$(eval $(call outputWhatLog,$1,$2))
-endef
-
-# declaring things that need to be cleaned.
-#
-# any files which are generated but are not RELEASABLE should be listed
-# using this macro, for example,
-#
-# $(call raptor_clean,$(OBJECT_FILES))
-#
-define raptor_clean
-$(eval $(call GenerateStandardCleanTarget,$1))
-endef
-
-endif 
-# end of metaflm
-## END TEST BATCH FILES MACRO
+#
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+
+
+# Macros for creating Standard targets
+
+ifeq ($(_METAFLM_MK_),)
+_METAFLM_MK_:=1
+
+# GENERATE STANDARD CLEAN TARGET 
+# example usage:
+# $(eval $(call GenerateStandardCleanTarget,$(FILE_LIST),$(DIRECTORY_LIST)))
+
+## CLEAN macros #####################################
+# The clean macro does not generate a target but extension makefiles do have
+# CLEAN targets that need to be attached to something.
+.PHONY:: CLEAN
+
+define GenerateStandardCleanTarget
+$(info )
+$(foreach ITEM,$(1),$(info $(ITEM)))
+$(foreach ITEM,$(2),$(info $(ITEM)))
+$(info )
+endef
+
+## End CLEAN macros #####################################
+
+
+## WHAT macros #####################################
+
+
+## Begin --what Macros #####
+define outputWhat
+ifeq ($(OSTYPE),cygwin)
+$(2)::
+	@for FILE in $(subst %20,$(CHAR_SPACE),$(subst /,\\,$(call dblquote,$(1)))); do \
+		echo $$$$FILE; \
+	done;
+else
+$(2)::
+	@for FILE in $(subst %20,$(CHAR_SPACE),$(1)); do \
+		echo $$$$FILE; \
+	done
+endif
+endef
+
+## End --what Macros #####
+
+## Begin .whatlog Macros #####
+define whatLogOpen
+
+endef
+
+define whatLogItem
+$(if $(findstring EXPORT,$(1)),,$(if $(findstring BITMAP,$(1)),,$(if $(findstring STRINGTABLE,$(1)),,$(if $(findstring ARCHIVE,$(1)),,)))))$(subst %20,$(CHAR_SPACE),$(2))$(if $(findstring EXPORT,$(1)),/>,$(if $(findstring RESOURCE,$(1)),,$(if $(findstring BITMAP,$(1)),,$(if $(findstring STRINGTABLE,$(1)),,$(if $(findstring ARCHIVE,$(1)),,)))))
+endef
+
+define whatLogClose
+
+endef
+
+define outputWhatLog
+$(info $(call whatLogOpen))
+$(foreach ITEM,$(1),$(info $(call whatLogItem,$(2),$(ITEM))))
+$(info $(call whatLogClose))
+endef
+
+## End .whatlog Macros #####
+
+# General FLM entry points for what-related processing
+define WhatExports
+endef
+
+define whatmacro
+$(call outputWhatLog,$(1),$(2))
+endef
+
+define whatUnzip
+endef	
+## END WHAT UNZIP MACRO 
+
+## End WHAT macros #####################################
+
+# Macro for creating the test BATCH files.
+# Arguments: $(1) -> Target Name $(2) -> Output Batch file path
+define MakeTestBatchFiles
+    $(if $(BATCHFILE_CREATED_$(2))
+        ,
+            $(if $(TARGET_CREATED_$(2)_$(TARGET))
+                ,
+                ,
+                    $$(shell echo -e "$(1)\r" >> $(2))
+            )
+       	,
+       	    $$(shell $(GNUMKDIR) -p $(dir $(2)))
+       	    $$(shell echo -e "$(1)\r" > $(2))
+    )
+endef
+
+## path creation #########################
+# Make the destination directory if neccessary.  For some
+# make engines we must do this outside the rule or they
+# get confused by the apparent way in which different rules
+# can create a particular directory and they infer some kind
+# of dependency.
+
+# Makepath. Copyright (C) 2008 Symbian Software Ltd.
+# buffering with repeat prevention, makes directories after every 30 calls. Any more might overload 
+# the createprocess limit on arguments.
+#
+# makepathLIST is initialised in globals.mk
+define makepath_single
+$(if $(findstring $1,$(makepathLIST)),,$(eval makepathLIST:=$(makepathLIST) $1))
+$(if $(subst 30,,$(words $(makepathLIST))),,$(shell $(GNUMKDIR) -p $(makepathLIST))$(eval makepathLIST:=))
+endef
+
+# The following turns out to be extremely slow - something to do with using eval 
+# or to do with creating huge numbers of TARGET_ variables? BTW, this is an attempt
+# to not make things that we have already made.
+# define makepath
+# $(info makepath_start)$(foreach DIR,$1,$(if $(TARGET_$(1)),,$(call makepath_single,$(DIR))$(eval TARGET_$(1):=1)))$(info makepath_end)
+# endef
+
+# In general, makepath creates directories during FLM evaluation.
+# However, if the WHAT target is being processed then it should do nothing.
+ifeq ($(filter WHAT,$(call uppercase,$(MAKECMDGOALS))),)
+define makepath
+$(strip $(foreach DIR,$(sort $1),$(call makepath_single,$(DIR))))
+endef
+else
+define makepath
+endef
+endif
+
+
+define makepathfor
+$(call makepath,$(dir $1))
+endef
+
+# Make any remaining paths in the path buffer
+define makepathfinalise
+$(strip $(if $(makepathLIST),$(shell $(GNUMKDIR) -p $(makepathLIST))$(eval makepathLIST:=),))
+endef
+
+## ROMFILE macro #####################################
+define DoRomSet
+
+ifeq ($(call uppercase,$(TARGETTYPE)),LIB)
+BUILDROMTARGET:=
+endif
+
+ifeq ($(call uppercase,$(TARGETTYPE)),KEXT)
+ROMFILETYPE:=extension[MAGIC]
+ABIDIR:=KMAIN
+endif
+ifeq ($(call uppercase,$(TARGETTYPE)),LDD)
+ROMFILETYPE:=device[MAGIC]
+ABIDIR:=KMAIN
+endif
+ifeq ($(call uppercase,$(TARGETTYPE)),PDD)
+ROMFILETYPE:=device[MAGIC]
+ABIDIR:=KMAIN
+endif
+ifeq ($(call uppercase,$(TARGETTYPE)),VAR)
+ROMFILETYPE:=variant[MAGIC]
+ABIDIR:=KMAIN
+endif
+ifeq ($(call uppercase,$(TARGETTYPE)),KDLL)
+ABIDIR:=KMAIN
+endif
+
+ifneq ($(CALLDLLENTRYPOINTS),)
+ROMFILETYPE:=dll
+endif
+ifeq ($(ROMFILETYPE),primary)
+ABIDIR:=KMAIN
+endif
+
+endef
+
+## End of ROMFILE macro ##############################
+
+## Macros for writing FLMs without needing to know eval
+
+# declaring targets as RELEASABLE, for example,
+#
+# $(call raptor_release,$(TARGET1) $(TARGET2),RESOURCE)
+#
+# the optional type (RESOURCE) can be one of,
+# EXPORT RESOURCE BITMAP STRINGTABLE ARCHIVE
+#
+# no argument means just a default (binary) releasable.
+#
+define raptor_release
+$(eval $(call outputWhatLog,$1,$2))
+endef
+
+# declaring things that need to be cleaned.
+#
+# any files which are generated but are not RELEASABLE should be listed
+# using this macro, for example,
+#
+# $(call raptor_clean,$(OBJECT_FILES))
+#
+define raptor_clean
+$(eval $(call GenerateStandardCleanTarget,$1))
+endef
+
+endif 
+# end of metaflm
+## END TEST BATCH FILES MACRO
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/msvctools.flm
--- a/sbsv2/raptor/lib/flm/msvctools.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/msvctools.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,212 +1,212 @@
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# MSVC TOOLS EXE/LIB Function Like Makefile (FLM)
-# Knows how to build all possible executables for the TOOLS build
-# 
-#
-
-CLEANTARGETS:=
-RELEASABLES:=
-INSTALLTARGET:=
-
-RELEASEPATH:=$(RELEASEPATHROOT)/$(FULLVARIANTPATH)
-BUILDPATH:=$(OUTPUTPATH)/$(FULLVARIANTPATH)
-RELEASETARGET:=$(RELEASEPATH)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
-
-# make the output directories while reading makefile - some build engines prefer this
-$(call makepath,$(RELEASEPATH))
-$(call makepath,$(BUILDPATH))
-
-CLEANTARGETS:=$(CLEANTARGETS) $(RELEASETARGET)
-RELEASEABLES:=$(RELEASEABLES) $(RELEASETARGET)
-
-GENDEBUGINFO:=$(if $(findstring deb,$(VARIANTTYPE)),1,)
-
-# MSVC "no space" arguments must take the form / e.g.
-# 	/FoF:\object\file\to\be\created.obj
-define msvcformatarg
-	$(1)$(subst /,\\\,$(2))
-endef
-
-#############
-## COMPILE ##
-#############
-
-# object files and related
-OBJFILES:=$(patsubst %,$(BUILDPATH)/%.obj,$(basename $(notdir $(SOURCE))))
-SBRFILES:=$(addsuffix .sbr, $(basename $(OBJFILES)))
-LISFILES:=$(addsuffix .lis, $(basename $(OBJFILES)))
-LSTFILES:=$(addsuffix .tools.lst, $(basename $(SOURCE)))
-CLEANTARGETS:=$(CLEANTARGETS) $(OBJFILES) $(SBRFILES) $(LISFILES) $(LSTFILES)
-
-# include paths and preinclude file
-UINCLUDE:=$(patsubst %,$(OPT.USERINCLUDE)%,$(USERINCLUDE))
-SINCLUDE:=$(patsubst %,$(OPT.SYSINCLUDE)%,$(SYSTEMINCLUDE))
-PINCLUDE:=$(OPT.PREINCLUDE)$(notdir $(PRODUCT_INCLUDE))
-INCLUDES:=$(PINCLUDE) $(UINCLUDE) $(SINCLUDE)
-
-# 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
-	$(call startrule,msvctoolscompile,,$(1)) \
-	$(CC) \
-	$(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) \
-	$(call endrule,msvctoolscompile)
-endef
-# make the output directories while reading makefile - some build engines prefer this
-$(call makepath,$(BUILDPATH))
-$(foreach SRCFILE,$(SOURCE),$(eval $(call msvctoolscompile,$(SRCFILE))))
-
-# assembler listing
-define msvctoolslisting
-  LISTING:: $(BUILDPATH)/$(basename $(notdir $(1))).lis
-	$(GNUCP) $$< $(basename $(1)).tools.lst
-  
-  $(BUILDPATH)/$(basename $(notdir $(1))).lis: $(1)
-	$(call startrule,msvctoolslisting) \
-	$(CC) \
-	$(if $(findstring staticlib,$(BASE_TYPE)),,$(CFLAGS.LIB)) \
-	$(CFLAGS) $$(subst /,-,$(OPTION_MSVC)) \
-	$(if $(findstring /W,$(OPTION_MSVC)),,$(CFLAGS.DEFAULT.WARNLEVEL)) \
-	$(DEFINES) $(INCLUDES) \
-	$$(call msvcformatarg,$(OPT.LISTING),$(BUILDPATH)/$(basename $(notdir $(1))).lis) \
-	$(1) \
-	$(call endrule,msvctoolslisting)
-
-  endef
-$(foreach SRCFILE,$(SOURCE),$(eval $(call msvctoolslisting,$(SRCFILE))))
-
-
-ifeq ($(BASE_TYPE),staticlib)
-
-  #############
-  ## ARCHIVE ##
-  #############
-
-  ARCHIVERRESPONSEFILE:=$(BUILDPATH)/$(TARGET).arf
-  CLEANTARGETS:=$(CLEANTARGETS) $(ARCHIVERRESPONSEFILE)
-
-  define msvctoolsarchive
-    $(RELEASETARGET): $(OBJFILES)
-	  @echo "" > $(ARCHIVERRESPONSEFILE);
-	  $(call groupin10infile,$(ARCHIVERRESPONSEFILE),$(OBJFILES)) ;
-	  $(call startrule,msvctoolsarchive) \
-	  $(AR) $(ARFLAGS) $(OPT.SUBSYSTEM)$(SUBSYSTEM) $$(call msvcformatarg,$(OPT.OUTFILE),$$@) \
-	  $$(call msvcformatarg,$(PREFIX.RESPONSEFILE),$(ARCHIVERRESPONSEFILE)) \
-	  $(if $(SAVESPACE),; $(GNURM) -f $(OBJFILES); true,) \
-	  $(call endrule,msvctoolsarchive)
-
-  endef
-  $(eval $(msvctoolsarchive))
-
-else
-
-  ##########
-  ## LINK ##
-  ##########
-
-  STATICLIBS:=$(patsubst %,$(RELEASEPATH)/%.lib,$(STATICLIBRARY))
-  IMPORTLIBS:=$(patsubst %.dso,$(IMPORTLIBPATH)/%.lib,$(LIBRARY))
-  LINKERRESPONSEFILE:=$(BUILDPATH)/$(TARGET).lrf
-  CLEANTARGETS:=$(CLEANTARGETS) $(RELEASETARGET).lib $(LINKERRESPONSEFILE)
-  
-  define msvctoolslink
-    $(RELEASETARGET): $(OBJFILES) $(STATICLIBS) $(IMPORTLIBS)
-	  @echo "" > $(LINKERRESPONSEFILE);
-	  $(call groupin10infile,$(LINKERRESPONSEFILE),$(STATICLIBS) $(IMPORTLIBS) $(OBJFILES)) ;
-	  $(call startrule,msvctoolslink) \
-	  $(LD) $(LFLAGS) $(WIN32_LIBRARY) $(OPT.SUBSYSTEM)$(SUBSYSTEM) \
-	  $$(call msvcformatarg,$(OPT.OUTFILE),$$@) \
-	  $$(call msvcformatarg,$(OPT.IMPLIB),$(RELEASETARGET).lib) \
-	  $$(call msvcformatarg,$(PREFIX.RESPONSEFILE),$(LINKERRESPONSEFILE)) \
-	  $(if $(SAVESPACE),; $(GNURM) -f $(OBJFILES); true,) \
-	  $(call endrule,msvctoolslink)
-  endef
-  $(eval $(msvctoolslink)) 
-
-endif
-
-
-#############
-## INSTALL ##
-#############
-
-ifneq ($(INSTALLPATH),)
-  INSTALLTARGET:=$(INSTALLPATH)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
-  CLEANTARGETS:=$(CLEANTARGETS) $(INSTALLTARGET)
-  RELEASEABLES:=$(RELEASEABLES) $(INSTALLTARGET)
-
-  define msvctoolsinstall
-    $(INSTALLTARGET): $(RELEASETARGET)
-	  $(call startrule,msvctoolsinstall) \
-	  $(GNUCP) $$< $$@ && \
-	  $(GNUCHMOD) a+rwx $$@ \
-	  $(call endrule,msvctoolsinstall)
-  endef
-  # make the output directories while reading makefile - some build engines prefer this
-  $(call makepath,$(INSTALLPATH))
-  $(eval $(msvctoolsinstall))
-endif
-
-
-##########################
-## BROWSE DB GENERATION ##
-##########################
-
-ifneq ($(GENDEBUGINFO),)
-  BSCFILE:=$(RELEASEPATH)/$(TARGET).bsc
-  BSCRESPONSEFILE:=$(BUILDPATH)/$(TARGET).brf
-  CLEANTARGETS:=$(CLEANTARGETS) $(BSCFILE) $(BSCRESPONSEFILE)
-  RELEASEABLES:=$(RELEASEABLES) $(BSCFILE)
-
-  define msvctoolsgenbrowse  
-    $(BSCFILE): $(OBJFILES)
-	  @echo "" > $(BSCRESPONSEFILE);
-	  $(call groupin10infile,$(BSCRESPONSEFILE),$(SBRFILES)) ;
-	  $(call startrule,msvctoolsgenbrowse) \
-	  $(BROWSETOOL) $(BROWSEFLAGS) $$(call msvcformatarg,$(OPT.BROWSEDB),$$@) \
-	  $$(call msvcformatarg,$(PREFIX.RESPONSEFILE),$(BSCRESPONSEFILE)) \
-	  $(if $(SAVESPACE),; $(GNURM) -f $(SBRFILES); true,) \
-	  $(call endrule,msvctoolsgenbrowse)
-  endef
-  $(eval $(msvctoolsgenbrowse)) 
-endif
-
-
-# Global targets
-.PHONY:: $(ALLTARGET)
-$(ALLTARGET):: $(RELEASEABLES)
-TARGET:: $(RELEASEABLES)
-
-ifeq ($(BASE_TYPE),staticlib)
-  LIBRARY:: $(RELEASETARGET) $(INSTALLTARGET)
-endif
-
-# clean up
-$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS),,))
-# for the abld -what target
-$(eval $(call whatmacro,$(INSTALLTARGET),WHATTOOLS))
+# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# MSVC TOOLS EXE/LIB Function Like Makefile (FLM)
+# Knows how to build all possible executables for the TOOLS build
+# 
+#
+
+CLEANTARGETS:=
+RELEASABLES:=
+INSTALLTARGET:=
+
+RELEASEPATH:=$(RELEASEPATHROOT)/$(FULLVARIANTPATH)
+BUILDPATH:=$(OUTPUTPATH)/$(FULLVARIANTPATH)
+RELEASETARGET:=$(RELEASEPATH)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
+
+# make the output directories while reading makefile - some build engines prefer this
+$(call makepath,$(RELEASEPATH))
+$(call makepath,$(BUILDPATH))
+
+CLEANTARGETS:=$(CLEANTARGETS) $(RELEASETARGET)
+RELEASEABLES:=$(RELEASEABLES) $(RELEASETARGET)
+
+GENDEBUGINFO:=$(if $(findstring deb,$(VARIANTTYPE)),1,)
+
+# MSVC "no space" arguments must take the form / e.g.
+# 	/FoF:\object\file\to\be\created.obj
+define msvcformatarg
+	$(1)$(subst /,\\\,$(2))
+endef
+
+#############
+## COMPILE ##
+#############
+
+# object files and related
+OBJFILES:=$(patsubst %,$(BUILDPATH)/%.obj,$(basename $(notdir $(SOURCE))))
+SBRFILES:=$(addsuffix .sbr, $(basename $(OBJFILES)))
+LISFILES:=$(addsuffix .lis, $(basename $(OBJFILES)))
+LSTFILES:=$(addsuffix .tools.lst, $(basename $(SOURCE)))
+CLEANTARGETS:=$(CLEANTARGETS) $(OBJFILES) $(SBRFILES) $(LISFILES) $(LSTFILES)
+
+# include paths and preinclude file
+UINCLUDE:=$(patsubst %,$(OPT.USERINCLUDE)%,$(USERINCLUDE))
+SINCLUDE:=$(patsubst %,$(OPT.SYSINCLUDE)%,$(SYSTEMINCLUDE))
+PINCLUDE:=$(OPT.PREINCLUDE)$(notdir $(PRODUCT_INCLUDE))
+INCLUDES:=$(PINCLUDE) $(UINCLUDE) $(SINCLUDE)
+
+# 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
+	$(call startrule,msvctoolscompile,,$(1)) \
+	$(CC) \
+	$(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) \
+	$(call endrule,msvctoolscompile)
+endef
+# make the output directories while reading makefile - some build engines prefer this
+$(call makepath,$(BUILDPATH))
+$(foreach SRCFILE,$(SOURCE),$(eval $(call msvctoolscompile,$(SRCFILE))))
+
+# assembler listing
+define msvctoolslisting
+  LISTING:: $(BUILDPATH)/$(basename $(notdir $(1))).lis
+	$(GNUCP) $$< $(basename $(1)).tools.lst
+  
+  $(BUILDPATH)/$(basename $(notdir $(1))).lis: $(1)
+	$(call startrule,msvctoolslisting) \
+	$(CC) \
+	$(if $(findstring staticlib,$(BASE_TYPE)),,$(CFLAGS.LIB)) \
+	$(CFLAGS) $$(subst /,-,$(OPTION_MSVC)) \
+	$(if $(findstring /W,$(OPTION_MSVC)),,$(CFLAGS.DEFAULT.WARNLEVEL)) \
+	$(DEFINES) $(INCLUDES) \
+	$$(call msvcformatarg,$(OPT.LISTING),$(BUILDPATH)/$(basename $(notdir $(1))).lis) \
+	$(1) \
+	$(call endrule,msvctoolslisting)
+
+  endef
+$(foreach SRCFILE,$(SOURCE),$(eval $(call msvctoolslisting,$(SRCFILE))))
+
+
+ifeq ($(BASE_TYPE),staticlib)
+
+  #############
+  ## ARCHIVE ##
+  #############
+
+  ARCHIVERRESPONSEFILE:=$(BUILDPATH)/$(TARGET).arf
+  CLEANTARGETS:=$(CLEANTARGETS) $(ARCHIVERRESPONSEFILE)
+
+  define msvctoolsarchive
+    $(RELEASETARGET): $(OBJFILES)
+	  @echo "" > $(ARCHIVERRESPONSEFILE);
+	  $(call groupin10infile,$(ARCHIVERRESPONSEFILE),$(OBJFILES)) ;
+	  $(call startrule,msvctoolsarchive) \
+	  $(AR) $(ARFLAGS) $(OPT.SUBSYSTEM)$(SUBSYSTEM) $$(call msvcformatarg,$(OPT.OUTFILE),$$@) \
+	  $$(call msvcformatarg,$(PREFIX.RESPONSEFILE),$(ARCHIVERRESPONSEFILE)) \
+	  $(if $(SAVESPACE),; $(GNURM) -f $(OBJFILES); true,) \
+	  $(call endrule,msvctoolsarchive)
+
+  endef
+  $(eval $(msvctoolsarchive))
+
+else
+
+  ##########
+  ## LINK ##
+  ##########
+
+  STATICLIBS:=$(patsubst %,$(RELEASEPATH)/%.lib,$(STATICLIBRARY))
+  IMPORTLIBS:=$(patsubst %.dso,$(IMPORTLIBPATH)/%.lib,$(LIBRARY))
+  LINKERRESPONSEFILE:=$(BUILDPATH)/$(TARGET).lrf
+  CLEANTARGETS:=$(CLEANTARGETS) $(RELEASETARGET).lib $(LINKERRESPONSEFILE)
+  
+  define msvctoolslink
+    $(RELEASETARGET): $(OBJFILES) $(STATICLIBS) $(IMPORTLIBS)
+	  @echo "" > $(LINKERRESPONSEFILE);
+	  $(call groupin10infile,$(LINKERRESPONSEFILE),$(STATICLIBS) $(IMPORTLIBS) $(OBJFILES)) ;
+	  $(call startrule,msvctoolslink) \
+	  $(LD) $(LFLAGS) $(WIN32_LIBRARY) $(OPT.SUBSYSTEM)$(SUBSYSTEM) \
+	  $$(call msvcformatarg,$(OPT.OUTFILE),$$@) \
+	  $$(call msvcformatarg,$(OPT.IMPLIB),$(RELEASETARGET).lib) \
+	  $$(call msvcformatarg,$(PREFIX.RESPONSEFILE),$(LINKERRESPONSEFILE)) \
+	  $(if $(SAVESPACE),; $(GNURM) -f $(OBJFILES); true,) \
+	  $(call endrule,msvctoolslink)
+  endef
+  $(eval $(msvctoolslink)) 
+
+endif
+
+
+#############
+## INSTALL ##
+#############
+
+ifneq ($(INSTALLPATH),)
+  INSTALLTARGET:=$(INSTALLPATH)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
+  CLEANTARGETS:=$(CLEANTARGETS) $(INSTALLTARGET)
+  RELEASEABLES:=$(RELEASEABLES) $(INSTALLTARGET)
+
+  define msvctoolsinstall
+    $(INSTALLTARGET): $(RELEASETARGET)
+	  $(call startrule,msvctoolsinstall) \
+	  $(GNUCP) $$< $$@ && \
+	  $(GNUCHMOD) a+rwx $$@ \
+	  $(call endrule,msvctoolsinstall)
+  endef
+  # make the output directories while reading makefile - some build engines prefer this
+  $(call makepath,$(INSTALLPATH))
+  $(eval $(msvctoolsinstall))
+endif
+
+
+##########################
+## BROWSE DB GENERATION ##
+##########################
+
+ifneq ($(GENDEBUGINFO),)
+  BSCFILE:=$(RELEASEPATH)/$(TARGET).bsc
+  BSCRESPONSEFILE:=$(BUILDPATH)/$(TARGET).brf
+  CLEANTARGETS:=$(CLEANTARGETS) $(BSCFILE) $(BSCRESPONSEFILE)
+  RELEASEABLES:=$(RELEASEABLES) $(BSCFILE)
+
+  define msvctoolsgenbrowse  
+    $(BSCFILE): $(OBJFILES)
+	  @echo "" > $(BSCRESPONSEFILE);
+	  $(call groupin10infile,$(BSCRESPONSEFILE),$(SBRFILES)) ;
+	  $(call startrule,msvctoolsgenbrowse) \
+	  $(BROWSETOOL) $(BROWSEFLAGS) $$(call msvcformatarg,$(OPT.BROWSEDB),$$@) \
+	  $$(call msvcformatarg,$(PREFIX.RESPONSEFILE),$(BSCRESPONSEFILE)) \
+	  $(if $(SAVESPACE),; $(GNURM) -f $(SBRFILES); true,) \
+	  $(call endrule,msvctoolsgenbrowse)
+  endef
+  $(eval $(msvctoolsgenbrowse)) 
+endif
+
+
+# Global targets
+.PHONY:: $(ALLTARGET)
+$(ALLTARGET):: $(RELEASEABLES)
+TARGET:: $(RELEASEABLES)
+
+ifeq ($(BASE_TYPE),staticlib)
+  LIBRARY:: $(RELEASETARGET) $(INSTALLTARGET)
+endif
+
+# clean up
+$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS),,))
+# for the abld -what target
+$(eval $(call whatmacro,$(INSTALLTARGET),WHATTOOLS))
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/msvctools.xml
--- a/sbsv2/raptor/lib/flm/msvctools.xml	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/msvctools.xml	Mon Nov 16 09:46:46 2009 +0000
@@ -1,79 +1,79 @@
-
-
-	
-
-	
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-
-	
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-
-	
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-
-	
-		
-		
-		
-		
-		
-		
-		
-	
-
-	
-		
-		
-		
-		
-		
-		
-	
-
-
+
+
+	
+
+	
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+
+	
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+
+	
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+
+	
+		
+		
+		
+		
+		
+		
+		
+	
+
+	
+		
+		
+		
+		
+		
+		
+	
+
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/none.flm
--- a/sbsv2/raptor/lib/flm/none.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/none.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,27 +1,27 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# ARMv5 EXE/DLL ABIv2 Function Like Makefile (FLM)
-# Build Resources only
-# 
-#
-
-ifeq ($(TARGETTYPE),none)
-
-# Nothing to do here at the moment.  Perhaps later 
-# this will contain "all" rules to tie resources together
-
-else
-$(error none.flm called with wrong TARGETTYPE (should be 'none' but is '$(TARGETTYPE)'))
-endif
-
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# ARMv5 EXE/DLL ABIv2 Function Like Makefile (FLM)
+# Build Resources only
+# 
+#
+
+ifeq ($(TARGETTYPE),none)
+
+# Nothing to do here at the moment.  Perhaps later 
+# this will contain "all" rules to tie resources together
+
+else
+$(error none.flm called with wrong TARGETTYPE (should be 'none' but is '$(TARGETTYPE)'))
+endif
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/null.flm
--- a/sbsv2/raptor/lib/flm/null.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/null.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,16 +1,16 @@
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# An empty FLM, for cases where no action is required
-# 
-#
+# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# An empty FLM, for cases where no action is required
+# 
+#
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/readme.txt
--- a/sbsv2/raptor/lib/flm/readme.txt	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/readme.txt	Mon Nov 16 09:46:46 2009 +0000
@@ -1,42 +1,42 @@
-Function-Like Makefiles
-------------------------
-
-Tests may be run from the "test" subdirectory.  Simply change into it and type 'make'.
-
-CHECKING YOUR BUILD ENVIRONMENT
---------------------------------
-In the test directory type "make envcheck" to see if you have correct path
-settings and determine if critical tools are available.
-
-FLMS
-----
-
-e32abiv2.flm    # PARENT FLM for building ARMv5 ABIv2 binaries
-e32abiv2.mk     # defaults makefile for building ARMv5 ABIv2 binaries 
-e32abiv2exe.flm # derived FLM (from e32abiv2.flm) for building ARMv5 ABIv2 exes
-e32abiv2dll.flm # derived FLM (from e32abiv2.flm) for building ARMv5 ABIv2 dlls
-example_exedll.flm # example flm
-extend_exe.flm  # example flm
-flmtools.mk     # utility functions for use in flms
-grouping.flm    # FLM for creating components
-metaflm.mk      # FLM for manipulating and working with other FLMS
-readme.txt	# This file
-rvct_armv5.mk   # defaults for ARMv5 ABIv2 parameters, used by e32abiv2.mk
-standard.xml	# interface file for e32abiv2.flm
-test		# ===== Base directory for all tests =====
-	Makefile # Glue makefile.  calls grouping.flm to bind all tests
-		 # together into a top-level target
-	basiclibs
-	dllabiv2_1
-	dllabiv2_defaults.mk
-	exeabiv2_1	# Test building a basic EXE
-	exeabiv2_2
-	exeabiv2_3
-	exeabiv2_defaults.mk
-tools			# ======= FLM related tools =======
-	command_diff.py # compare two commandlines to find what options are
-different
-	flm2if.py	# Produce an interface file from an FLM
-	flmcheck.py	# Check FLM for errors
-	flm.py		# Parse and manipulate flms
-	test_command_diff.sh
+Function-Like Makefiles
+------------------------
+
+Tests may be run from the "test" subdirectory.  Simply change into it and type 'make'.
+
+CHECKING YOUR BUILD ENVIRONMENT
+--------------------------------
+In the test directory type "make envcheck" to see if you have correct path
+settings and determine if critical tools are available.
+
+FLMS
+----
+
+e32abiv2.flm    # PARENT FLM for building ARMv5 ABIv2 binaries
+e32abiv2.mk     # defaults makefile for building ARMv5 ABIv2 binaries 
+e32abiv2exe.flm # derived FLM (from e32abiv2.flm) for building ARMv5 ABIv2 exes
+e32abiv2dll.flm # derived FLM (from e32abiv2.flm) for building ARMv5 ABIv2 dlls
+example_exedll.flm # example flm
+extend_exe.flm  # example flm
+flmtools.mk     # utility functions for use in flms
+grouping.flm    # FLM for creating components
+metaflm.mk      # FLM for manipulating and working with other FLMS
+readme.txt	# This file
+rvct_armv5.mk   # defaults for ARMv5 ABIv2 parameters, used by e32abiv2.mk
+standard.xml	# interface file for e32abiv2.flm
+test		# ===== Base directory for all tests =====
+	Makefile # Glue makefile.  calls grouping.flm to bind all tests
+		 # together into a top-level target
+	basiclibs
+	dllabiv2_1
+	dllabiv2_defaults.mk
+	exeabiv2_1	# Test building a basic EXE
+	exeabiv2_2
+	exeabiv2_3
+	exeabiv2_defaults.mk
+tools			# ======= FLM related tools =======
+	command_diff.py # compare two commandlines to find what options are
+different
+	flm2if.py	# Produce an interface file from an FLM
+	flmcheck.py	# Check FLM for errors
+	flm.py		# Parse and manipulate flms
+	test_command_diff.sh
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/resource.flm
--- a/sbsv2/raptor/lib/flm/resource.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/resource.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,301 +1,301 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# Function Like Makefile (FLM) to create a resource header (.rsg)
-# and resource files (.rsc, .r01, .r02 etc.)
-#
-#
-
-## Parameters that are expected:
-# TARGET
-# TARGETPATH
-# LANGUAGES
-# HEADER
-# HEADERONLY
-# EPOCROOT
-# MMPDEFS
-# PRODUCT_INCLUDE
-# SYSTEMINCLUDE
-# USERINCLUDE
-# GNUCPP
-# GNUSED
-# RCOMP
-# OUTPUTPATH
-# SOURCE
-# BINCOPYDIRS
-
-
-# The rss is pre-processed once for each language and results
-# in a file with extension r$(LANGUAGE) where $(LANGUAGE) is
-# either "sc" or a 2 (or more) digit number.
-ifneq ($(TARGETPATH),)
-RSCDIR:=$(subst //,/,$(EPOCROOT)/epoc32/data/z/$(TARGETPATH))
-else
-RSCDIR:=$(subst //,/,$(EPOCROOT)/epoc32/data)
-endif
-RESBASE:=$(RSCDIR)/$(TARGET_lower)
-
-# Ensure that RELEASABLES and CLEANTARGETS cannot expand indefinitely in successive calls to this flm:
-CLEANTARGETS:=
-RELEASABLES:=
-
-# There is only one resource header (.rsg) file and we only
-# make that if we are asked.
-RSGDIR:=$(EPOCROOT)/epoc32/include
-ifneq ($(or $(HEADER),$(HEADERONLY)),)
-        RESOURCEHEADER:=$(RSGDIR)/$(HEADER)
-
-        # If there are multiple LANGUAGES then it is the last one in the list
-        # which produces the header.
-        HEADLANG:=$(lastword $(LANGUAGES:SC=sc))
-else
-	HEADLANG:=
-    RESOURCEHEADER:=
-endif
-
-# we create intermediate .rpp and .d files
-INTERBASE:=$(OUTPUTPATH)/$(TARGET_lower)$(if $(TARGETPATH),_$(subst /,_,$(TARGETPATH)),)
-
-################################## localisation ###########################$(GNUMKDIR)#############
-# Only make copies for full resource builds
-
-# Initialise to prevent RELEASABLES spill-over between calls
-DESTRPP:=
-INFOFILE:=
-
-ifeq ($(HEADERONLY),)
-
-RSSBASENAME:=$(call lowercase,$(basename $(notdir $(SOURCE))))
-DESTRPP:=$(EPOCROOT)/epoc32/localisation/$(RSSBASENAME)/rsc/$(RSSBASENAME).rpp
-$(call makepath,$(EPOCROOT)/epoc32/localisation/$(RSSBASENAME)/rsc)
-
-INFOFILE:=$(EPOCROOT)/epoc32/localisation/group/$(RSSBASENAME).info
-# If there are MULTIPLE languages then copy the .rpp for the last one
-RPPLANG:=$(lastword $(LANGUAGES:SC=sc))
-
-# Copy .rpp files from epoc32/build/ to epoc32/localisation/x/rsc/x.rpp and create .info files in localisation
-define CreateRppAndInfo
-
-ifeq ($(RESOURCE_$(call sanitise,$(SOURCE))),)
-RESOURCE_$(call sanitise,$(SOURCE)):=1
-
-RESOURCE:: $(DESTRPP) $(INFOFILE)
-
-$(DESTRPP): $(INTERBASE)_$(RPPLANG).rpp
-	$(call startrule,rppfilecopy,FORCESUCCESS) \
-	$(GNUCP) $$< $$@ \
-	$(call endrule,rppfilecopy)
-
-$(INFOFILE)::
-	@if [ ! -d $(EPOCROOT)/epoc32/localisation/group ]; then $(GNUMKDIR) -p $(EPOCROOT)/epoc32/localisation/group; fi
-	@if [ ! -f $$@ ]; then echo "DATADIR: /$(RSSBASENAME)" > $$@ ; fi
-	@echo -e "\n/z$(TARGETPATH)/$(TARGET_lower).rsc : $(RSSBASENAME).rpp" >> $$@
-
-CLEANTARGETS:=$$(CLEANTARGETS) $(DESTRPP) $(INFOFILE)
-
-endif
-endef
-
-$(eval $(call CreateRppAndInfo))
-endif
-################################# end of localisation ###################################
-
-# make the output directories while reading makefile - some build engines prefer this
-$(call makepath,$(INTERBASE))
-
-# common pre-processor options
-CPPOPT:=-nostdinc -undef -D_UNICODE -include $(PRODUCT_INCLUDE)\
- -I$(dir $(SOURCE)) $(foreach I, $(USERINCLUDE),-I$(I) ) -I- $(foreach J,$(SYSTEMINCLUDE),-I$(J) )
-
-CREATABLEPATHS:=$(RSCDIR) $(RSGDIR) $(OUTPUTPATH)
-
-# additional binary resource copies performed based on BINCOPYDIRS
-RSCCOPYDIRS:=
-ifneq ($(BINCOPYDIRS),)
-        RSCCOPYDIRS:=$(subst //,/,$(patsubst %,%/$(if $(TARGETPATH),/z/$(TARGETPATH),),$(BINCOPYDIRS)))
-        CREATABLEPATHS:=$(CREATABLEPATHS) $(RSCCOPYDIRS)
-endif
-
-###############################################################################
-define preprocessresource
-# $(1) is the RPPFILE		(eg. /epoc32/build/xxx/b_sc.rpp)
-# $(2) is the related RESOURCEFILE if any (eg. /a/b.rsc)
-# $(3) is the LANGUAGE		(eg. sc or 01 or 02 ...)
-
-  ifeq ($(TARGET_$(call sanitise,$1)),)
-    TARGET_$(call sanitise,$1):=1
-    $(if $(FLMDEBUG),$(info preprocessresource: $(1) for $(2) LANG:$(3)))
-
-    RESOURCE_DEPS:: $(1).d
-    $(1).d: $(SOURCE)
-	  $(call startrule,resourcedependencies,FORCESUCCESS) \
-	  $(GNUCPP) -C -DLANGUAGE_$(3) -DLANGUAGE_$(subst sc,SC,$(3)) $(call makemacrodef,-D,$(MMPDEFS))\
-	  $(CPPOPT) $(SOURCE) -M -MG -MT"$(1)" | \
-	  $(GNUSED)  -r 's# ([^ \/]+\.((rsg)|(mbg)))# $(EPOCROOT)\/epoc32\/include\/\1#ig' > $(1).d \
-	  $(call endrule,resourcedependencies)
-
-    $(1): $(1).d
-	  $(call startrule,resourcepreprocess,FORCESUCCESS) \
-	  $(GNUCPP) -C -DLANGUAGE_$(3) -DLANGUAGE_$(subst sc,SC,$(3)) $(call makemacrodef,-D,$(MMPDEFS))\
-	  $(CPPOPT) $(SOURCE) -o $$@ \
-	  $(call endrule,resourcepreprocess)
-
-    CLEANTARGETS:= $$(CLEANTARGETS) $(1)
-
-    $(eval DEPENDFILENAME:=$(1).d)
-    $(eval DEPENDFILE:=$(wildcard $(DEPENDFILENAME)))
-
-    CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
-    ifneq "$(DEPENDFILE)" ""
-      ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" ""
-        -include $(DEPENDFILE)
-      endif
-    endif
-
-  endif
-endef # preprocessresource #
-
-###############################################################################
-define copyresource
-# $(1) is the source
-# $(2) is the destination
-
-RELEASABLES:=$$(RELEASABLES) $(2)
-
-   ifeq ($(TARGET_$(call sanitise,$2)),)
-           TARGET_$(call sanitise,$2):=1
-        CLEANTARGETS:=$$(CLEANTARGETS) $2
-
-        RESOURCE:: $2
-        ## perform additional copies of binaries
-        #
-        # Only certain builds require further copies of the generated resource binaries
-        #
-        $(2): $(1)
-		$(call startrule,resourcecopy,FORCESUCCESS) \
-		$(GNUCP) $$< $$@ \
-		$(call endrule,resourcecopy)
-
-   endif
-
-endef # copyresource #
-
-###############################################################################
-define generateresource
-
-# $(1) is the resource filename e.g. /a/b/resource.rsc
-# $(2) is the preprocessed resource to make it from
-# $(3) is the language e.g. sc or 01 or 02
-
-    RELEASABLES:=$$(RELEASABLES) $(1)
-
-        ifeq ($(TARGET_$(call sanitise,$1)),)
-                TARGET_$(call sanitise,$1):=1
-            CLEANTARGETS:=$$(CLEANTARGETS) $(1)
-
-            $(if $(FLMDEBUG),$(info generateresource: $(1) from $(2) LANG:$(3)),)
-
-
-            RESOURCE:: $(1)
-
-            $(1): $(2) $(RCOMP)
-			$(call startrule,resourcecompile,FORCESUCCESS) \
-			$(RCOMP) -m045,046,047 -u -o$(1) -s$(2) \
-			$(call endrule,resourcecompile)
-
-        endif
-#	Whether or not we have generated this resource for some other variant, check if there
-#       are any new copies to be made for this variant. e.g. winscw requires that we make
-#       some extra copies.
-
-        $(foreach F,$(sort $(patsubst %,%/$(notdir $(1)),$(RSCCOPYDIRS))),$(call copyresource,$(1),$(F)))
-
-        # individual source file compilation
-        SOURCETARGET_$(call sanitise,$(SOURCE)): $(1)
-
-endef # generateresource
-
-
-###############################################################################
-define generateresourceheader
-# $(1) is the resource header	(eg. /epoc32/include/a.rsg)
-# $(2) is the preprocessed resource to make it from
-# $(3) is the language to use	(eg. sc)
-
-		RELEASABLES:= $$(RELEASABLES) $(1)
-
-        ifeq ($(TARGET_$(call sanitise,$1)),)
-                TARGET_$(call sanitise,$1):=1
-                CLEANTARGETS:= $$(CLEANTARGETS) $(1)
-                $(if $(FLMDEBUG),$(info resourceheader: $(1) from $(2) LANG:$(3)))
-
-                RESOURCE:: $(1)
-
-                $(1): $(2) $(RCOMP)
-			$(call startrule,resourceheader,FORCESUCCESS) \
-			$(RCOMP) -m045,046,047 -u -h$(1) -s$(2) \
-			$(call endrule,resourceheader)
-
-        endif
-
-
-        # individual source file compilation
-        SOURCETARGET_$(call sanitise,$(SOURCE)): $(1)
-
-endef
-
-###############################################################################
-## call the generator
-
-# We always create at least the header
-# even if we sometimes don't create the resources
-ifneq ($(RESOURCEHEADER),)
-        $(eval $(call generateresourceheader,$(RESOURCEHEADER),$(INTERBASE)_$(HEADLANG).rpp,$(HEADLANG)))
-endif
-
-ifeq ($(HEADERONLY),)
-        # generate a resource file for each language
-        # For sc we generate $(RESBASE).rsc and define LANGUAGE_SC and LANGUAGE_sc.
-        $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call preprocessresource,$(INTERBASE)_$(L).rpp,$(RESBASE).r$(L),$(L))))
-        $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call generateresource,$(RESBASE).r$(L),$(INTERBASE)_$(L).rpp,$(L))))
-else
-        # No resources are going to be made so unless we specifically ask for it, there will be no
-        # preprocessed file from which to create the header:
-
-        $(eval $(call preprocessresource,$(INTERBASE)_$(HEADLANG).rpp,,$(HEADLANG)))
-
-endif
-
-###############################################################################
-## .rfi generation in support of the gccxml build
-## Note that .rfi files are created from the dependency files generated from preprocessing resources to create .rpp files
-ifneq ($(RFIFILE),)
-  RESOURCE:: $(RFIFILE)
-  RELEASABLES:=$(RELEASABLES) $(RFIFILE)
-  CLEANTARGETS:=$(CLEANTARGETS) $(RFIFILE)
-  CREATABLEPATHS:=$(CREATABLEPATHS) $(dir $(RFIFILE))
-
-  RPPFILES:=$(foreach L,$(LANGUAGES:SC=sc),$(INTERBASE)_$(L).rpp)
-  $(eval $(call generaterfifile,$(RFIFILE),$(RPPFILES),$(addsuffix .d,$(RPPFILES))))
-endif
-
-
-## Clean up
-$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS),$(CREATABLEPATHS),))
-# make the output directories while reading makefile - some build engines prefer this
-$(call makepath,$(CREATABLEPATHS))
-
-# for the abld -what target
-RELEASABLES:=$(RELEASABLES) $(DESTRPP) $(INFOFILE)
-$(eval $(call whatmacro,$(RELEASABLES),WHATRESOURCES))
-
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Function Like Makefile (FLM) to create a resource header (.rsg)
+# and resource files (.rsc, .r01, .r02 etc.)
+#
+#
+
+## Parameters that are expected:
+# TARGET
+# TARGETPATH
+# LANGUAGES
+# HEADER
+# HEADERONLY
+# EPOCROOT
+# MMPDEFS
+# PRODUCT_INCLUDE
+# SYSTEMINCLUDE
+# USERINCLUDE
+# GNUCPP
+# GNUSED
+# RCOMP
+# OUTPUTPATH
+# SOURCE
+# BINCOPYDIRS
+
+
+# The rss is pre-processed once for each language and results
+# in a file with extension r$(LANGUAGE) where $(LANGUAGE) is
+# either "sc" or a 2 (or more) digit number.
+ifneq ($(TARGETPATH),)
+RSCDIR:=$(subst //,/,$(EPOCROOT)/epoc32/data/z/$(TARGETPATH))
+else
+RSCDIR:=$(subst //,/,$(EPOCROOT)/epoc32/data)
+endif
+RESBASE:=$(RSCDIR)/$(TARGET_lower)
+
+# Ensure that RELEASABLES and CLEANTARGETS cannot expand indefinitely in successive calls to this flm:
+CLEANTARGETS:=
+RELEASABLES:=
+
+# There is only one resource header (.rsg) file and we only
+# make that if we are asked.
+RSGDIR:=$(EPOCROOT)/epoc32/include
+ifneq ($(or $(HEADER),$(HEADERONLY)),)
+        RESOURCEHEADER:=$(RSGDIR)/$(HEADER)
+
+        # If there are multiple LANGUAGES then it is the last one in the list
+        # which produces the header.
+        HEADLANG:=$(lastword $(LANGUAGES:SC=sc))
+else
+	HEADLANG:=
+    RESOURCEHEADER:=
+endif
+
+# we create intermediate .rpp and .d files
+INTERBASE:=$(OUTPUTPATH)/$(TARGET_lower)$(if $(TARGETPATH),_$(subst /,_,$(TARGETPATH)),)
+
+################################## localisation ###########################$(GNUMKDIR)#############
+# Only make copies for full resource builds
+
+# Initialise to prevent RELEASABLES spill-over between calls
+DESTRPP:=
+INFOFILE:=
+
+ifeq ($(HEADERONLY),)
+
+RSSBASENAME:=$(call lowercase,$(basename $(notdir $(SOURCE))))
+DESTRPP:=$(EPOCROOT)/epoc32/localisation/$(RSSBASENAME)/rsc/$(RSSBASENAME).rpp
+$(call makepath,$(EPOCROOT)/epoc32/localisation/$(RSSBASENAME)/rsc)
+
+INFOFILE:=$(EPOCROOT)/epoc32/localisation/group/$(RSSBASENAME).info
+# If there are MULTIPLE languages then copy the .rpp for the last one
+RPPLANG:=$(lastword $(LANGUAGES:SC=sc))
+
+# Copy .rpp files from epoc32/build/ to epoc32/localisation/x/rsc/x.rpp and create .info files in localisation
+define CreateRppAndInfo
+
+ifeq ($(RESOURCE_$(call sanitise,$(SOURCE))),)
+RESOURCE_$(call sanitise,$(SOURCE)):=1
+
+RESOURCE:: $(DESTRPP) $(INFOFILE)
+
+$(DESTRPP): $(INTERBASE)_$(RPPLANG).rpp
+	$(call startrule,rppfilecopy,FORCESUCCESS) \
+	$(GNUCP) $$< $$@ \
+	$(call endrule,rppfilecopy)
+
+$(INFOFILE)::
+	@if [ ! -d $(EPOCROOT)/epoc32/localisation/group ]; then $(GNUMKDIR) -p $(EPOCROOT)/epoc32/localisation/group; fi
+	@if [ ! -f $$@ ]; then echo "DATADIR: /$(RSSBASENAME)" > $$@ ; fi
+	@echo -e "\n/z$(TARGETPATH)/$(TARGET_lower).rsc : $(RSSBASENAME).rpp" >> $$@
+
+CLEANTARGETS:=$$(CLEANTARGETS) $(DESTRPP) $(INFOFILE)
+
+endif
+endef
+
+$(eval $(call CreateRppAndInfo))
+endif
+################################# end of localisation ###################################
+
+# make the output directories while reading makefile - some build engines prefer this
+$(call makepath,$(INTERBASE))
+
+# common pre-processor options
+CPPOPT:=-nostdinc -undef -D_UNICODE -include $(PRODUCT_INCLUDE)\
+ -I$(dir $(SOURCE)) $(foreach I, $(USERINCLUDE),-I$(I) ) -I- $(foreach J,$(SYSTEMINCLUDE),-I$(J) )
+
+CREATABLEPATHS:=$(RSCDIR) $(RSGDIR) $(OUTPUTPATH)
+
+# additional binary resource copies performed based on BINCOPYDIRS
+RSCCOPYDIRS:=
+ifneq ($(BINCOPYDIRS),)
+        RSCCOPYDIRS:=$(subst //,/,$(patsubst %,%/$(if $(TARGETPATH),/z/$(TARGETPATH),),$(BINCOPYDIRS)))
+        CREATABLEPATHS:=$(CREATABLEPATHS) $(RSCCOPYDIRS)
+endif
+
+###############################################################################
+define preprocessresource
+# $(1) is the RPPFILE		(eg. /epoc32/build/xxx/b_sc.rpp)
+# $(2) is the related RESOURCEFILE if any (eg. /a/b.rsc)
+# $(3) is the LANGUAGE		(eg. sc or 01 or 02 ...)
+
+  ifeq ($(TARGET_$(call sanitise,$1)),)
+    TARGET_$(call sanitise,$1):=1
+    $(if $(FLMDEBUG),$(info preprocessresource: $(1) for $(2) LANG:$(3)))
+
+    RESOURCE_DEPS:: $(1).d
+    $(1).d: $(SOURCE)
+	  $(call startrule,resourcedependencies,FORCESUCCESS) \
+	  $(GNUCPP) -C -DLANGUAGE_$(3) -DLANGUAGE_$(subst sc,SC,$(3)) $(call makemacrodef,-D,$(MMPDEFS))\
+	  $(CPPOPT) $(SOURCE) -M -MG -MT"$(1)" | \
+	  $(GNUSED)  -r 's# ([^ \/]+\.((rsg)|(mbg)))# $(EPOCROOT)\/epoc32\/include\/\1#ig' > $(1).d \
+	  $(call endrule,resourcedependencies)
+
+    $(1): $(1).d
+	  $(call startrule,resourcepreprocess,FORCESUCCESS) \
+	  $(GNUCPP) -C -DLANGUAGE_$(3) -DLANGUAGE_$(subst sc,SC,$(3)) $(call makemacrodef,-D,$(MMPDEFS))\
+	  $(CPPOPT) $(SOURCE) -o $$@ \
+	  $(call endrule,resourcepreprocess)
+
+    CLEANTARGETS:= $$(CLEANTARGETS) $(1)
+
+    $(eval DEPENDFILENAME:=$(1).d)
+    $(eval DEPENDFILE:=$(wildcard $(DEPENDFILENAME)))
+
+    CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
+    ifneq "$(DEPENDFILE)" ""
+      ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" ""
+        -include $(DEPENDFILE)
+      endif
+    endif
+
+  endif
+endef # preprocessresource #
+
+###############################################################################
+define copyresource
+# $(1) is the source
+# $(2) is the destination
+
+RELEASABLES:=$$(RELEASABLES) $(2)
+
+   ifeq ($(TARGET_$(call sanitise,$2)),)
+           TARGET_$(call sanitise,$2):=1
+        CLEANTARGETS:=$$(CLEANTARGETS) $2
+
+        RESOURCE:: $2
+        ## perform additional copies of binaries
+        #
+        # Only certain builds require further copies of the generated resource binaries
+        #
+        $(2): $(1)
+		$(call startrule,resourcecopy,FORCESUCCESS) \
+		$(GNUCP) $$< $$@ \
+		$(call endrule,resourcecopy)
+
+   endif
+
+endef # copyresource #
+
+###############################################################################
+define generateresource
+
+# $(1) is the resource filename e.g. /a/b/resource.rsc
+# $(2) is the preprocessed resource to make it from
+# $(3) is the language e.g. sc or 01 or 02
+
+    RELEASABLES:=$$(RELEASABLES) $(1)
+
+        ifeq ($(TARGET_$(call sanitise,$1)),)
+                TARGET_$(call sanitise,$1):=1
+            CLEANTARGETS:=$$(CLEANTARGETS) $(1)
+
+            $(if $(FLMDEBUG),$(info generateresource: $(1) from $(2) LANG:$(3)),)
+
+
+            RESOURCE:: $(1)
+
+            $(1): $(2) $(RCOMP)
+			$(call startrule,resourcecompile,FORCESUCCESS) \
+			$(RCOMP) -m045,046,047 -u -o$(1) -s$(2) \
+			$(call endrule,resourcecompile)
+
+        endif
+#	Whether or not we have generated this resource for some other variant, check if there
+#       are any new copies to be made for this variant. e.g. winscw requires that we make
+#       some extra copies.
+
+        $(foreach F,$(sort $(patsubst %,%/$(notdir $(1)),$(RSCCOPYDIRS))),$(call copyresource,$(1),$(F)))
+
+        # individual source file compilation
+        SOURCETARGET_$(call sanitise,$(SOURCE)): $(1)
+
+endef # generateresource
+
+
+###############################################################################
+define generateresourceheader
+# $(1) is the resource header	(eg. /epoc32/include/a.rsg)
+# $(2) is the preprocessed resource to make it from
+# $(3) is the language to use	(eg. sc)
+
+		RELEASABLES:= $$(RELEASABLES) $(1)
+
+        ifeq ($(TARGET_$(call sanitise,$1)),)
+                TARGET_$(call sanitise,$1):=1
+                CLEANTARGETS:= $$(CLEANTARGETS) $(1)
+                $(if $(FLMDEBUG),$(info resourceheader: $(1) from $(2) LANG:$(3)))
+
+                RESOURCE:: $(1)
+
+                $(1): $(2) $(RCOMP)
+			$(call startrule,resourceheader,FORCESUCCESS) \
+			$(RCOMP) -m045,046,047 -u -h$(1) -s$(2) \
+			$(call endrule,resourceheader)
+
+        endif
+
+
+        # individual source file compilation
+        SOURCETARGET_$(call sanitise,$(SOURCE)): $(1)
+
+endef
+
+###############################################################################
+## call the generator
+
+# We always create at least the header
+# even if we sometimes don't create the resources
+ifneq ($(RESOURCEHEADER),)
+        $(eval $(call generateresourceheader,$(RESOURCEHEADER),$(INTERBASE)_$(HEADLANG).rpp,$(HEADLANG)))
+endif
+
+ifeq ($(HEADERONLY),)
+        # generate a resource file for each language
+        # For sc we generate $(RESBASE).rsc and define LANGUAGE_SC and LANGUAGE_sc.
+        $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call preprocessresource,$(INTERBASE)_$(L).rpp,$(RESBASE).r$(L),$(L))))
+        $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call generateresource,$(RESBASE).r$(L),$(INTERBASE)_$(L).rpp,$(L))))
+else
+        # No resources are going to be made so unless we specifically ask for it, there will be no
+        # preprocessed file from which to create the header:
+
+        $(eval $(call preprocessresource,$(INTERBASE)_$(HEADLANG).rpp,,$(HEADLANG)))
+
+endif
+
+###############################################################################
+## .rfi generation in support of the gccxml build
+## Note that .rfi files are created from the dependency files generated from preprocessing resources to create .rpp files
+ifneq ($(RFIFILE),)
+  RESOURCE:: $(RFIFILE)
+  RELEASABLES:=$(RELEASABLES) $(RFIFILE)
+  CLEANTARGETS:=$(CLEANTARGETS) $(RFIFILE)
+  CREATABLEPATHS:=$(CREATABLEPATHS) $(dir $(RFIFILE))
+
+  RPPFILES:=$(foreach L,$(LANGUAGES:SC=sc),$(INTERBASE)_$(L).rpp)
+  $(eval $(call generaterfifile,$(RFIFILE),$(RPPFILES),$(addsuffix .d,$(RPPFILES))))
+endif
+
+
+## Clean up
+$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS),$(CREATABLEPATHS),))
+# make the output directories while reading makefile - some build engines prefer this
+$(call makepath,$(CREATABLEPATHS))
+
+# for the abld -what target
+RELEASABLES:=$(RELEASABLES) $(DESTRPP) $(INFOFILE)
+$(eval $(call whatmacro,$(RELEASABLES),WHATRESOURCES))
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/romfile.mk
--- a/sbsv2/raptor/lib/flm/romfile.mk	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/romfile.mk	Mon Nov 16 09:46:46 2009 +0000
@@ -1,42 +1,42 @@
-# romfile.mk
-#
-# Copyright (c) 2008 : Symbian Software Limited. All rights reserved.
-#
-# define macros that are needed by romfile creation
-
-define DoRomSet
-
-ifeq ($(call uppercase,$(TARGETTYPE)),LIB)
-BUILDROMTARGET:=
-endif
-
-ifeq ($(call uppercase,$(TARGETTYPE)),KEXT)
-ROMFILETYPE:=extension[MAGIC]
-ABIDIR:=KMAIN
-endif
-ifeq ($(call uppercase,$(TARGETTYPE)),LDD)
-ROMFILETYPE:=device[MAGIC]
-ABIDIR:=KMAIN
-endif
-ifeq ($(call uppercase,$(TARGETTYPE)),PDD)
-ROMFILETYPE:=device[MAGIC]
-ABIDIR:=KMAIN
-endif
-ifeq ($(call uppercase,$(TARGETTYPE)),VAR)
-ROMFILETYPE:=variant[MAGIC]
-ABIDIR:=KMAIN
-endif
-ifeq ($(call uppercase,$(TARGETTYPE)),KDLL)
-ABIDIR:=KMAIN
-endif
-
-ifneq ($(CALLDLLENTRYPOINTS),)
-ROMFILETYPE:=dll
-endif
-ifeq ($(ROMFILETYPE),primary)
-ABIDIR:=KMAIN
-endif
-
-endef
-
-
+# romfile.mk
+#
+# Copyright (c) 2008 : Symbian Software Limited. All rights reserved.
+#
+# define macros that are needed by romfile creation
+
+define DoRomSet
+
+ifeq ($(call uppercase,$(TARGETTYPE)),LIB)
+BUILDROMTARGET:=
+endif
+
+ifeq ($(call uppercase,$(TARGETTYPE)),KEXT)
+ROMFILETYPE:=extension[MAGIC]
+ABIDIR:=KMAIN
+endif
+ifeq ($(call uppercase,$(TARGETTYPE)),LDD)
+ROMFILETYPE:=device[MAGIC]
+ABIDIR:=KMAIN
+endif
+ifeq ($(call uppercase,$(TARGETTYPE)),PDD)
+ROMFILETYPE:=device[MAGIC]
+ABIDIR:=KMAIN
+endif
+ifeq ($(call uppercase,$(TARGETTYPE)),VAR)
+ROMFILETYPE:=variant[MAGIC]
+ABIDIR:=KMAIN
+endif
+ifeq ($(call uppercase,$(TARGETTYPE)),KDLL)
+ABIDIR:=KMAIN
+endif
+
+ifneq ($(CALLDLLENTRYPOINTS),)
+ROMFILETYPE:=dll
+endif
+ifeq ($(ROMFILETYPE),primary)
+ABIDIR:=KMAIN
+endif
+
+endef
+
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/stack.mk
--- a/sbsv2/raptor/lib/flm/stack.mk	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/stack.mk	Mon Nov 16 09:46:46 2009 +0000
@@ -1,76 +1,76 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# # Implements a stack mechanism for FLMS
-# # Author: Timothy Murphy
-# # CHANGE THIS FILE AT YOUR PERIL! :-)
-# # It is very sensitive to spaces on the end of variables.
-# # It took a lot of trouble to get this exactly right so 
-# # be careful about changing it.
-# # A "call stack" is necessary for variables which are used
-# # in an append-manner by glue makefiles.  This behavior
-# # is only needed where and FLM call has the form:
-# # 	OUTPUTPATH:=$(OUTPUTPATH)/subdir
-# #	include $(FLMHOME)/exefile.flm
-# # This is because the outputpath setting must be undone
-# # before the next call to an FLM that uses OUTPUTPATH (otherwise it keeps growing)
-# # USAGE:
-# # $(call vsave,VARIABLE1 VARIABLE2)
-# # $(call vrestore)
-#
-
-ifeq ($(VARIABLE_STACK_NAME),)
-VARIABLE_STACK_NAME:=STACK
-endif
-# $(1) should list the variables 
-
-# vadd must be exactly of the form of 3 lines, the middle one containing "$(1)"
-# Otherwise the extra return will be treated like a character rather than as whitespace
-
-define LINEFEED
-
-
-endef
-
-define vadd
-$(1):=$(2)
-
-endef
-
-#
-# Create a kind of stack "frame"
-# The parameters are names of variables whose values are to be stored in the frame
-# so that these values may be restored later.
-#
-# use thus:
-# $(call vsave,OUTPUTPATH SOURCEPATH CDEFS)
-#
-define vsave
-$(eval 
-VARIABLE_STACK_NAME:=$(VARIABLE_STACK_NAME).F
-$$(VARIABLE_STACK_NAME):=$$(foreach VAR,$(1),$$(call vadd,$$(VAR),$$($$(VAR)))))
-endef
-
-#
-# Pop the top stack frame.
-#
-# use thus:
-# $(call vrestore)
-#
-define vrestore
-$(eval $($(VARIABLE_STACK_NAME))
-VARIABLE_STACK_NAME:=$(patsubst %.F,%,$(VARIABLE_STACK_NAME))
-)
-endef
-
+#
+# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# # Implements a stack mechanism for FLMS
+# # Author: Timothy Murphy
+# # CHANGE THIS FILE AT YOUR PERIL! :-)
+# # It is very sensitive to spaces on the end of variables.
+# # It took a lot of trouble to get this exactly right so 
+# # be careful about changing it.
+# # A "call stack" is necessary for variables which are used
+# # in an append-manner by glue makefiles.  This behavior
+# # is only needed where and FLM call has the form:
+# # 	OUTPUTPATH:=$(OUTPUTPATH)/subdir
+# #	include $(FLMHOME)/exefile.flm
+# # This is because the outputpath setting must be undone
+# # before the next call to an FLM that uses OUTPUTPATH (otherwise it keeps growing)
+# # USAGE:
+# # $(call vsave,VARIABLE1 VARIABLE2)
+# # $(call vrestore)
+#
+
+ifeq ($(VARIABLE_STACK_NAME),)
+VARIABLE_STACK_NAME:=STACK
+endif
+# $(1) should list the variables 
+
+# vadd must be exactly of the form of 3 lines, the middle one containing "$(1)"
+# Otherwise the extra return will be treated like a character rather than as whitespace
+
+define LINEFEED
+
+
+endef
+
+define vadd
+$(1):=$(2)
+
+endef
+
+#
+# Create a kind of stack "frame"
+# The parameters are names of variables whose values are to be stored in the frame
+# so that these values may be restored later.
+#
+# use thus:
+# $(call vsave,OUTPUTPATH SOURCEPATH CDEFS)
+#
+define vsave
+$(eval 
+VARIABLE_STACK_NAME:=$(VARIABLE_STACK_NAME).F
+$$(VARIABLE_STACK_NAME):=$$(foreach VAR,$(1),$$(call vadd,$$(VAR),$$($$(VAR)))))
+endef
+
+#
+# Pop the top stack frame.
+#
+# use thus:
+# $(call vrestore)
+#
+define vrestore
+$(eval $($(VARIABLE_STACK_NAME))
+VARIABLE_STACK_NAME:=$(patsubst %.F,%,$(VARIABLE_STACK_NAME))
+)
+endef
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/standard.xml
--- a/sbsv2/raptor/lib/flm/standard.xml	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/standard.xml	Mon Nov 16 09:46:46 2009 +0000
@@ -1,260 +1,260 @@
-
-
-	
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-	
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-				
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-				
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-				
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-	
-		
-		
-	
-	
-		
-		
-		
-		
-	
-	
-		
-		
-	
-	
-		
-		
-		
-	
-	
-		
-		
-		
-	
-	
-		
-	
-	
-		
-		
-		
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-
+
+
+	
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+	
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+				
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+				
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+				
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+	
+		
+		
+	
+	
+		
+		
+		
+		
+	
+	
+		
+		
+	
+	
+		
+		
+		
+	
+	
+		
+		
+		
+	
+	
+		
+	
+	
+		
+		
+		
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/stringtable.flm
--- a/sbsv2/raptor/lib/flm/stringtable.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/stringtable.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,106 +1,106 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# Header file exporting Function Like Makefile (FLM)
-# The file destinations  relative to EPOCROOT
-# 
-#
-
-## Parameters that are expected:
-# SOURCE
-# HEADERONLY
-# OUTPUTPATH
-# EPOCROOT
-# EXPORTPATH
-
-## GLOBAL TARGETS ###############################################
-.PHONY:: $(ALLTARGET)
-$(ALLTARGET):: $(RELEASEABLES)
-
-
-# StringTable FLM
-
-
-EXPORT::
-
-
-CLEANTARGETS:=
-CLEANEXPORTS:=
-RELEASEEXPORTS:=
-CREATABLEPATHS:=$(OUTPUTPATH) $(EXPORTPATH)
-
-# Work out the names of the various output files before
-# trying to use them in rules and dependencies. Cuts repetition
-# and avoids mistakes.
-EXPORTEDSTRINGTABLEHEADER:=$(EXPORTPATH)/$(TARGET).h
-STRINGTABLECPP:=$(OUTPUTPATH)/$(TARGET).cpp
-STRINGTABLEHEADER:=$(OUTPUTPATH)/$(TARGET).h
-STRINGTABLEPHONYTARGET:=$(OUTPUTPATH)_$(TARGET)
-TEMPSOURCE:=$(OUTPUTPATH)/$(TARGET).st
-
-# Macro to generate string table targets and rules
-# Always return true if the make engine doesn't support 
-# the .IGNORE:: target.
-define exportstringtableheader
-
-EXPORT:: $(EXPORTEDSTRINGTABLEHEADER)
-
-$(EXPORTEDSTRINGTABLEHEADER): $(STRINGTABLEHEADER) 
-	$(call startrule,exportstringtableheader,FORCESUCCESS) \
-	$(GNUCP) '$(STRINGTABLEHEADER)' '$$@'  \
-	$(call endrule,exportstringtableheader) 
-
-CLEANEXPORTS:=$(EXPORTEDSTRINGTABLEHEADER)
-RELEASEEXPORTS:=$(EXPORTEDSTRINGTABLEHEADER)
-endef
-
-define genstringtable
-$(STRINGTABLECPP) : $(STRINGTABLEHEADER)
-
-$(STRINGTABLEHEADER): $(SOURCE) 
-	$(call startrule,stringtable,FORCESUCCESS) \
-	$(GNUCP) --no-preserve=mode $(SOURCE) $(TEMPSOURCE)  && $(GNUCHMOD) a+w $(TEMPSOURCE) &&  \
-	$(STRINGTABLE) $(TEMPSOURCE)  \
-	$(call endrule,stringtable)
-
-CLEANTARGETS:=$(STRINGTABLEHEADER) $(STRINGTABLECPP)
-
-endef
-
-
-$(if $(EXPORTPATH),$(eval $(exportstringtableheader)),)
-$(if $(EXPORTPATH),,$(eval EXPORT:: $(STRINGTABLEHEADER)))
-$(eval $(genstringtable))
-
-
-## Clean up and log releasables (using eval to avoid target specific variables)
-$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS),$(CREATABLEPATHS),))
-$(eval $(call GenerateStandardCleanTarget,$(CLEANEXPORTS),,CLEANEXPORT))
-# make the output directories while reading makefile - some build engines prefer this
-$(call makepath,$(CREATABLEPATHS))
-$(eval $(call whatmacro,$(RELEASEEXPORTS),WHATSTRINGTABLE))
-
-########################
-# 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
-# 
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Header file exporting Function Like Makefile (FLM)
+# The file destinations  relative to EPOCROOT
+# 
+#
+
+## Parameters that are expected:
+# SOURCE
+# HEADERONLY
+# OUTPUTPATH
+# EPOCROOT
+# EXPORTPATH
+
+## GLOBAL TARGETS ###############################################
+.PHONY:: $(ALLTARGET)
+$(ALLTARGET):: $(RELEASEABLES)
+
+
+# StringTable FLM
+
+
+EXPORT::
+
+
+CLEANTARGETS:=
+CLEANEXPORTS:=
+RELEASEEXPORTS:=
+CREATABLEPATHS:=$(OUTPUTPATH) $(EXPORTPATH)
+
+# Work out the names of the various output files before
+# trying to use them in rules and dependencies. Cuts repetition
+# and avoids mistakes.
+EXPORTEDSTRINGTABLEHEADER:=$(EXPORTPATH)/$(TARGET).h
+STRINGTABLECPP:=$(OUTPUTPATH)/$(TARGET).cpp
+STRINGTABLEHEADER:=$(OUTPUTPATH)/$(TARGET).h
+STRINGTABLEPHONYTARGET:=$(OUTPUTPATH)_$(TARGET)
+TEMPSOURCE:=$(OUTPUTPATH)/$(TARGET).st
+
+# Macro to generate string table targets and rules
+# Always return true if the make engine doesn't support 
+# the .IGNORE:: target.
+define exportstringtableheader
+
+EXPORT:: $(EXPORTEDSTRINGTABLEHEADER)
+
+$(EXPORTEDSTRINGTABLEHEADER): $(STRINGTABLEHEADER) 
+	$(call startrule,exportstringtableheader,FORCESUCCESS) \
+	$(GNUCP) '$(STRINGTABLEHEADER)' '$$@'  \
+	$(call endrule,exportstringtableheader) 
+
+CLEANEXPORTS:=$(EXPORTEDSTRINGTABLEHEADER)
+RELEASEEXPORTS:=$(EXPORTEDSTRINGTABLEHEADER)
+endef
+
+define genstringtable
+$(STRINGTABLECPP) : $(STRINGTABLEHEADER)
+
+$(STRINGTABLEHEADER): $(SOURCE) 
+	$(call startrule,stringtable,FORCESUCCESS) \
+	$(GNUCP) --no-preserve=mode $(SOURCE) $(TEMPSOURCE)  && $(GNUCHMOD) a+w $(TEMPSOURCE) &&  \
+	$(STRINGTABLE) $(TEMPSOURCE)  \
+	$(call endrule,stringtable)
+
+CLEANTARGETS:=$(STRINGTABLEHEADER) $(STRINGTABLECPP)
+
+endef
+
+
+$(if $(EXPORTPATH),$(eval $(exportstringtableheader)),)
+$(if $(EXPORTPATH),,$(eval EXPORT:: $(STRINGTABLEHEADER)))
+$(eval $(genstringtable))
+
+
+## Clean up and log releasables (using eval to avoid target specific variables)
+$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS),$(CREATABLEPATHS),))
+$(eval $(call GenerateStandardCleanTarget,$(CLEANEXPORTS),,CLEANEXPORT))
+# make the output directories while reading makefile - some build engines prefer this
+$(call makepath,$(CREATABLEPATHS))
+$(eval $(call whatmacro,$(RELEASEEXPORTS),WHATSTRINGTABLE))
+
+########################
+# 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 -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/taggedrules.mk
--- a/sbsv2/raptor/lib/flm/taggedrules.mk	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/taggedrules.mk	Mon Nov 16 09:46:46 2009 +0000
@@ -1,138 +1,138 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# Tools for use in FLMs - enabling the output from
-# rules to be logged with start and end tags.
-# This is a place where one might to permit various information to
-# be logged, such as timestamps and host names or process ids
-#
-
-ifndef _TAGGEDRULES_FLM_
-_TAGGEDRULES_FLM_:=1
-
-# only run recipes once by default
-RECIPETRIES?=1
-
-ifeq ($(USE_TALON),)
-
-##
-##  Example usage:
-##
-#   define func
-#	auto_ok:
-#		$(call startrule,auto) \
-#		true && \
-#		true && \
-#		true    \
-#		$(call endrule,auto)
-#	
-#	auto_fail:
-#		$(call startrule,auto) \
-#		find /usr >/dev/null 2>&1 && \
-#		false && \
-#		true    \
-#		$(call endrule,auto)
-#   endef
-#   $(eval $(func))
-
-# $(1) is the name of the FLM function
-# $(2) indicates whether the failure of this rule should be ignored (but still logged)
-#      FORCESUCCESS indicates "on"
-define startrule
-  @set -o pipefail; RV=0; ATTEMPT=1; \
-  { while (( $$$$ATTEMPT <= $(RECIPETRIES) )); do \
-    echo -e "\n"; \
-       break; \
-    else  \
-       if (( $$$$ATTEMPT < $(RECIPETRIES) )); then \
-         echo ""; \
-         sleep 1; \
-       else \
-         if [ ! "$$$${FLM_RECIPE_FLAGS//FORCESUCCESS/}" == "$$$${FLM_RECIPE_FLAGS}" ]; then \
-             echo ""; \
-             RV=0; \
-         else \
-             echo ""; \
-         fi; \
-       fi; \
-    fi; \
-    echo ""; \
-    (( ATTEMPT=$$$$ATTEMPT + 1 )); \
-  done ; exit $$$${RV}; } $(if $(DESCRAMBLE),2>&1 | $(DESCRAMBLE) -k $$$$$$$$) 
-endef
-
-
-define startrawoutput
-  @ set -o pipefail; { 
-endef
-
-define endrawoutput
-  ; exit 0; } $(if $(DESCRAMBLE),2>&1 | $(DESCRAMBLE) -k $$$$$$$$) 
-endef
-
-
-else
-TALON_RECIPEATTRIBUTES:=\
- name='$$RECIPE'\
- target='$$TARGET'\
- host='$$HOSTNAME'\
- layer='$$COMPONENT_LAYER'\
- component='$$COMPONENT_NAME'\
- bldinf='$$COMPONENT_META' mmp='$$PROJECT_META'\
- config='$$SBS_CONFIGURATION' platform='$$PLATFORM'\
- phase='$$MAKEFILE_GROUP' source='$$SOURCE'
-
-export TALON_RECIPEATTRIBUTES
-export TALON_RETRIES
-export TALON_DESCRAMBLE
-
-define startrule
-	@|RECIPE=$1;TARGET=$$@;COMPONENT_LAYER=$(COMPONENT_LAYER);COMPONENT_NAME=$(COMPONENT_NAME);COMPONENT_META=$(COMPONENT_META);PROJECT_META=$(PROJECT_META);SBS_CONFIGURATION=$(SBS_CONFIGURATION);PLATFORM=$(PLATFORM);MAKEFILE_GROUP=$(MAKEFILE_GROUP);SOURCE=$3;TALON_FLAGS=$2;|
-endef
-
-define endrule
-endef
-
-
-define startrawoutput
-	@|TALON_FLAGS=forcesuccess rawoutput;|
-endef
-
-define endrawoutput
-endef
-
-
-
-endif
-
-
-
-
-endif
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# Tools for use in FLMs - enabling the output from
+# rules to be logged with start and end tags.
+# This is a place where one might to permit various information to
+# be logged, such as timestamps and host names or process ids
+#
+
+ifndef _TAGGEDRULES_FLM_
+_TAGGEDRULES_FLM_:=1
+
+# only run recipes once by default
+RECIPETRIES?=1
+
+ifeq ($(USE_TALON),)
+
+##
+##  Example usage:
+##
+#   define func
+#	auto_ok:
+#		$(call startrule,auto) \
+#		true && \
+#		true && \
+#		true    \
+#		$(call endrule,auto)
+#	
+#	auto_fail:
+#		$(call startrule,auto) \
+#		find /usr >/dev/null 2>&1 && \
+#		false && \
+#		true    \
+#		$(call endrule,auto)
+#   endef
+#   $(eval $(func))
+
+# $(1) is the name of the FLM function
+# $(2) indicates whether the failure of this rule should be ignored (but still logged)
+#      FORCESUCCESS indicates "on"
+define startrule
+  @set -o pipefail; RV=0; ATTEMPT=1; \
+  { while (( $$$$ATTEMPT <= $(RECIPETRIES) )); do \
+    echo -e "\n"; \
+       break; \
+    else  \
+       if (( $$$$ATTEMPT < $(RECIPETRIES) )); then \
+         echo ""; \
+         sleep 1; \
+       else \
+         if [ ! "$$$${FLM_RECIPE_FLAGS//FORCESUCCESS/}" == "$$$${FLM_RECIPE_FLAGS}" ]; then \
+             echo ""; \
+             RV=0; \
+         else \
+             echo ""; \
+         fi; \
+       fi; \
+    fi; \
+    echo ""; \
+    (( ATTEMPT=$$$$ATTEMPT + 1 )); \
+  done ; exit $$$${RV}; } $(if $(DESCRAMBLE),2>&1 | $(DESCRAMBLE) -k $$$$$$$$) 
+endef
+
+
+define startrawoutput
+  @ set -o pipefail; { 
+endef
+
+define endrawoutput
+  ; exit 0; } $(if $(DESCRAMBLE),2>&1 | $(DESCRAMBLE) -k $$$$$$$$) 
+endef
+
+
+else
+TALON_RECIPEATTRIBUTES:=\
+ name='$$RECIPE'\
+ target='$$TARGET'\
+ host='$$HOSTNAME'\
+ layer='$$COMPONENT_LAYER'\
+ component='$$COMPONENT_NAME'\
+ bldinf='$$COMPONENT_META' mmp='$$PROJECT_META'\
+ config='$$SBS_CONFIGURATION' platform='$$PLATFORM'\
+ phase='$$MAKEFILE_GROUP' source='$$SOURCE'
+
+export TALON_RECIPEATTRIBUTES
+export TALON_RETRIES
+export TALON_DESCRAMBLE
+
+define startrule
+	@|RECIPE=$1;TARGET=$$@;COMPONENT_LAYER=$(COMPONENT_LAYER);COMPONENT_NAME=$(COMPONENT_NAME);COMPONENT_META=$(COMPONENT_META);PROJECT_META=$(PROJECT_META);SBS_CONFIGURATION=$(SBS_CONFIGURATION);PLATFORM=$(PLATFORM);MAKEFILE_GROUP=$(MAKEFILE_GROUP);SOURCE=$3;TALON_FLAGS=$2;|
+endef
+
+define endrule
+endef
+
+
+define startrawoutput
+	@|TALON_FLAGS=forcesuccess rawoutput;|
+endef
+
+define endrawoutput
+endef
+
+
+
+endif
+
+
+
+
+endif
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/template_ext.flm
--- a/sbsv2/raptor/lib/flm/template_ext.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/template_ext.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,230 +1,230 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# Template Extension Makefile  (TEM) FLM
-# Knows how to run TEMs
-# 
-#
-
-################################# FLM Parameter description ##
-# Parameters:
-#   TEMPLATE_EXTENSION_MAKEFILE
-#   PRODUCT_INCLUDE
-#   EPOCROOT:=
-#   PLATFORM:=$(VARIANTPLATFORM)
-# The current configuration either UREL or UDEB:
-#   CFG:=$(VARIANTTYPE)
-# Relative path to EPOCROOT. (to where?):
-#   TO_ROOT:=
-# The path to the top-level bld.inf.
-# Note: if a bld.inf file #includes another bld.inf, this variable will
-# always contain the directory of that top-level file. If you require
-# the directory of the bld.inf which actually references the makefile,
-# use $(EXTENSION_ROOT) instead.
-#   TO_BLDINF:=
-# The project's working build directory under \epoc32\build\..
-#   EPOCBLD:=
-# The path to the directory containing the bld.inf in which the extension makefile was called:
-#   EXTENSION_ROOT:=
-# The path of the host-platform specific (i.e. the shell) makefile containing the above definitions:
-#   HOST_SHELL:=
-# The current platform in lower case to be used as part of path
-# names.
-#   PLATFORM_PATH:=
-# The current configuration in lower case to be used as part of
-# path names.
-#   CFG_PATH:=
-# A list of options passed from a bld.inf to this
-# Template Extension Makefile
-#  O._MEMBERS:=
-# Options should have the name specifed in the bld.inf 
-# but with a prefix of "O." e.g. O.PATH or O.FILENAME
-# (in which case O._MEMBERS:=PATH FILENAME)
-
-# create the working directory for the TEM
-$(shell $(GNUMKDIR) -p $(EPOCBLD))
-
-################################ Standard Variables ##
-# We may set the following 
-# for the sake of template
-# extension makefiles which
-# need to know them:
-
-## Path element separator.
-/:=/
-## PATH environment variable separator.
-;:=:
-
-####
-# Various file and directory manipulation tools.
-# We are using the standard GNU coretools.
-# On Windows these are supplied by CYGWIN
-RMDIR:=$(GNURMDIR)
-RM:=$(GNURM)
-ERASE:=$(GNURM)
-MKDIR:=$(GNUMKDIR)
-CP:=$(GNUCP)
-ARMV7BUILD:=
-
-######################## Target Specific Parameters ##
-# We need to declare the parameters for the TEM 
-# 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:=$(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
-endif
-ifeq ($(CFG),udeb)
-OTHER_CFG:=urel
-endif
-ifeq ($(CFG),rel)
-OTHER_CFG:=deb
-endif
-ifeq ($(CFG),deb)
-OTHER_CFG:=rel
-endif
-
-OTHER_MAKMAKE:=$(UNIQ)_$(OTHER_CFG)_MAKMAKE
-OTHER_BLD:=$(UNIQ)_$(OTHER_CFG)_BLD
-OTHER_FREEZE:=$(UNIQ)_$(OTHER_CFG)_FREEZE
-OTHER_LIB:=$(UNIQ)_$(OTHER_CFG)_LIB
-OTHER_CLEANLIB:=$(UNIQ)_$(OTHER_CFG)_CLEANLIB
-OTHER_RESOURCE:=$(UNIQ)_$(OTHER_CFG)_RESOURCE
-OTHER_CLEAN:=$(UNIQ)_$(OTHER_CFG)_CLEAN
-OTHER_FINAL:=$(UNIQ)_$(OTHER_CFG)_FINAL
-endif # ifneq ($($(UNIQ)),)
-
-# Set $($(UNIQ)) so it can be detected if we're run again
-$(UNIQ):=1
-
-tem_$(notdir $(TEMPLATE_EXTENSION_MAKEFILE))_$(PLATFORM)_$(CFG):=$(tem_$(notdir $(TEMPLATE_EXTENSION_MAKEFILE))_$(PLATFORM)_$(CFG)) $(UNIQ)_$(CFG)
-
-TEPARAMETERS:= \
-	EPOCROOT PLATFORM CFG TO_ROOT TO_BLDINF \
-	EPOCBLD EXTENSION_ROOT HOST_SHELL       \
-	RMDIR RM ERASE MKDIR CP                 \
-	PLATFORM_PATH CFG_PATH                  \
-	TEMPLATE_EXTENSION_MAKEFILE             \
-	TARGET SOURCE DEPENDENCIES TOOL PRODUCT_INCLUDE \
-	RVCTBIN RVCTINC RVCTLIB
-
-
-# The standard Template Extension Makefile Targets
-# These will be implemented in terms of double colon
-# rules - such that make FREEZE will cause all FREEZE 
-# targets to be evaluated.
-# For each call of this FLM we also need
-# to create unique versions of each of these targets
-# so that there is something to attach
-# the current FLM parameters to using target-specific 
-# variable declarations.
-
-TETARGETS:= \
-	MAKMAKE     \
-	BLD         \
-	FREEZE      \
-	LIB         \
-	CLEANLIB    \
-	RESOURCE    \
-	CLEAN       \
-	RELEASABLES \
-	FINAL
-
-# If we split the makefiles then only use a subset of
-# the targets for each group makefile.
-#
-ifeq ($(MAKEFILE_GROUP),BITMAP)
-TETARGETS:=MAKMAKE
-endif
-#
-ifeq ($(MAKEFILE_GROUP),RESOURCE)
-TETARGETS:=RESOURCE
-endif
-#
-ifeq ($(MAKEFILE_GROUP),ALL)
-TETARGETS:=BLD FREEZE LIB CLEANLIB CLEAN RELEASABLES FINAL
-endif
-
-# Hook into global targets
-#
-MAKMAKE_HOOK:=BITMAP
-BLD_HOOK:=TARGET
-FREEZE_HOOK:=FREEZE
-LIB_HOOK:=LIBRARY
-CLEAN_HOOK:=CLEAN
-CLEANLIB_HOOK:=CLEAN
-RESOURCE_HOOK:=RESOURCE
-FINAL_HOOK:=FINAL
-RELEASABLES_HOOK:=RELEASABLES
-
-# make sure TEMS happen at the right stages
-# OTHER_$(STAGE) only set if running udeb+urel
-MAKMAKE_DEPS:=EXPORT $(OTHER_MAKMAKE)
-RESOURCE_DEPS:=BITMAP $(OTHER_RESOURCE)
-LIB_DEPS:=RESOURCE $(OTHER_LIB)
-BLD_DEPS:=LIBRARY $(OTHER_BLD)
-FINAL_DEPS:=TARGET $(OTHER_FINAL)
-FREEZE_DEPS:=$(OTHER_FREEZE)
-CLEANLIB_DEPS:=$(OTHER_CLEANLIB)
-CLEAN_DEPS:=$(OTHER_CLEAN)
-
-export /
-export ;
-export SHELL
-
-#################################### Global Targets ##
-## All the global targets for the TEM
-# TEMs are called as sub-makes.
-
-define getMember
-$(subst $$,$$$$,$(O.$(1)))
-endef
-
-define callTEM
-.PHONY:: $(UNIQ)_$(CFG)_$(1) 
-$($(1)_HOOK):: $(UNIQ)_$(CFG)_$(1)
-
-$(EPOCROOT)/epoc32/build/TEM_$(1):: $(UNIQ)_$(CFG)_$(1)
-
-$(UNIQ)_$(CFG)_$(1) : $($(1)_DEPS)
-	$(call startrule,tem,FORCESUCCESS,$(notdir $(TEMPLATE_EXTENSION_MAKEFILE))_$(1)) \
-	$(foreach V,$(TEPARAMETERS),$(V)='$($(V))') TEMTARGET='$(1)' $(foreach V,$(O._MEMBERS),$(V)='$(call getMember,$(V))')  $(TEMMAKE) -C $(EPOCBLD) -f $(TEMPLATE_EXTENSION_MAKEFILE) $(if $(SAVESPACE),$(subst BLD,SAVESPACE,$(1)),$(1)) \
-	$(call endrule,tem)
-ifneq ($(call isoneof,$(1),RELEASABLES FINAL),)
-	$(call startrawoutput) \
-	echo "$(call whatLogOpen)" ; \
-	$(foreach V,$(TEPARAMETERS),$(V)='$($(V))') TEMTARGET='$(1)' \
-	$(foreach V,$(O._MEMBERS),$(V)='$(call getMember,$(V))')  \
-	$(TEMMAKE) -s --no-print-directory -C $(EPOCBLD) -f $(TEMPLATE_EXTENSION_MAKEFILE) RELEASABLES | \
-	(read -r LINE; while [ $$$$? -eq 0 ]; do \
-	if [[ ! $$$$LINE =~ "Nothing to be done for"  ]] ; then echo "$(call whatLogItem,TEM,$$$$LINE)"; fi; \
-	read -r LINE; done; ); \
-	echo "$(call whatLogClose)" \
-	$(call endrawoutput) 
-
-WHATTEM:: $(UNIQ)_$(CFG)_RELEASABLES
-
-endif
-
-
-tem_debug::
-	@echo "TEM_DEBUG: O._MEMBERS=$(O._MEMBERS)"
-endef
-
-$(foreach TETRG,$(TETARGETS),$(eval $(call callTEM,$(TETRG))))
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Template Extension Makefile  (TEM) FLM
+# Knows how to run TEMs
+# 
+#
+
+################################# FLM Parameter description ##
+# Parameters:
+#   TEMPLATE_EXTENSION_MAKEFILE
+#   PRODUCT_INCLUDE
+#   EPOCROOT:=
+#   PLATFORM:=$(VARIANTPLATFORM)
+# The current configuration either UREL or UDEB:
+#   CFG:=$(VARIANTTYPE)
+# Relative path to EPOCROOT. (to where?):
+#   TO_ROOT:=
+# The path to the top-level bld.inf.
+# Note: if a bld.inf file #includes another bld.inf, this variable will
+# always contain the directory of that top-level file. If you require
+# the directory of the bld.inf which actually references the makefile,
+# use $(EXTENSION_ROOT) instead.
+#   TO_BLDINF:=
+# The project's working build directory under \epoc32\build\..
+#   EPOCBLD:=
+# The path to the directory containing the bld.inf in which the extension makefile was called:
+#   EXTENSION_ROOT:=
+# The path of the host-platform specific (i.e. the shell) makefile containing the above definitions:
+#   HOST_SHELL:=
+# The current platform in lower case to be used as part of path
+# names.
+#   PLATFORM_PATH:=
+# The current configuration in lower case to be used as part of
+# path names.
+#   CFG_PATH:=
+# A list of options passed from a bld.inf to this
+# Template Extension Makefile
+#  O._MEMBERS:=
+# Options should have the name specifed in the bld.inf 
+# but with a prefix of "O." e.g. O.PATH or O.FILENAME
+# (in which case O._MEMBERS:=PATH FILENAME)
+
+# create the working directory for the TEM
+$(shell $(GNUMKDIR) -p $(EPOCBLD))
+
+################################ Standard Variables ##
+# We may set the following 
+# for the sake of template
+# extension makefiles which
+# need to know them:
+
+## Path element separator.
+/:=/
+## PATH environment variable separator.
+;:=:
+
+####
+# Various file and directory manipulation tools.
+# We are using the standard GNU coretools.
+# On Windows these are supplied by CYGWIN
+RMDIR:=$(GNURMDIR)
+RM:=$(GNURM)
+ERASE:=$(GNURM)
+MKDIR:=$(GNUMKDIR)
+CP:=$(GNUCP)
+ARMV7BUILD:=
+
+######################## Target Specific Parameters ##
+# We need to declare the parameters for the TEM 
+# 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:=$(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
+endif
+ifeq ($(CFG),udeb)
+OTHER_CFG:=urel
+endif
+ifeq ($(CFG),rel)
+OTHER_CFG:=deb
+endif
+ifeq ($(CFG),deb)
+OTHER_CFG:=rel
+endif
+
+OTHER_MAKMAKE:=$(UNIQ)_$(OTHER_CFG)_MAKMAKE
+OTHER_BLD:=$(UNIQ)_$(OTHER_CFG)_BLD
+OTHER_FREEZE:=$(UNIQ)_$(OTHER_CFG)_FREEZE
+OTHER_LIB:=$(UNIQ)_$(OTHER_CFG)_LIB
+OTHER_CLEANLIB:=$(UNIQ)_$(OTHER_CFG)_CLEANLIB
+OTHER_RESOURCE:=$(UNIQ)_$(OTHER_CFG)_RESOURCE
+OTHER_CLEAN:=$(UNIQ)_$(OTHER_CFG)_CLEAN
+OTHER_FINAL:=$(UNIQ)_$(OTHER_CFG)_FINAL
+endif # ifneq ($($(UNIQ)),)
+
+# Set $($(UNIQ)) so it can be detected if we're run again
+$(UNIQ):=1
+
+tem_$(notdir $(TEMPLATE_EXTENSION_MAKEFILE))_$(PLATFORM)_$(CFG):=$(tem_$(notdir $(TEMPLATE_EXTENSION_MAKEFILE))_$(PLATFORM)_$(CFG)) $(UNIQ)_$(CFG)
+
+TEPARAMETERS:= \
+	EPOCROOT PLATFORM CFG TO_ROOT TO_BLDINF \
+	EPOCBLD EXTENSION_ROOT HOST_SHELL       \
+	RMDIR RM ERASE MKDIR CP                 \
+	PLATFORM_PATH CFG_PATH                  \
+	TEMPLATE_EXTENSION_MAKEFILE             \
+	TARGET SOURCE DEPENDENCIES TOOL PRODUCT_INCLUDE \
+	RVCTBIN RVCTINC RVCTLIB
+
+
+# The standard Template Extension Makefile Targets
+# These will be implemented in terms of double colon
+# rules - such that make FREEZE will cause all FREEZE 
+# targets to be evaluated.
+# For each call of this FLM we also need
+# to create unique versions of each of these targets
+# so that there is something to attach
+# the current FLM parameters to using target-specific 
+# variable declarations.
+
+TETARGETS:= \
+	MAKMAKE     \
+	BLD         \
+	FREEZE      \
+	LIB         \
+	CLEANLIB    \
+	RESOURCE    \
+	CLEAN       \
+	RELEASABLES \
+	FINAL
+
+# If we split the makefiles then only use a subset of
+# the targets for each group makefile.
+#
+ifeq ($(MAKEFILE_GROUP),BITMAP)
+TETARGETS:=MAKMAKE
+endif
+#
+ifeq ($(MAKEFILE_GROUP),RESOURCE)
+TETARGETS:=RESOURCE
+endif
+#
+ifeq ($(MAKEFILE_GROUP),ALL)
+TETARGETS:=BLD FREEZE LIB CLEANLIB CLEAN RELEASABLES FINAL
+endif
+
+# Hook into global targets
+#
+MAKMAKE_HOOK:=BITMAP
+BLD_HOOK:=TARGET
+FREEZE_HOOK:=FREEZE
+LIB_HOOK:=LIBRARY
+CLEAN_HOOK:=CLEAN
+CLEANLIB_HOOK:=CLEAN
+RESOURCE_HOOK:=RESOURCE
+FINAL_HOOK:=FINAL
+RELEASABLES_HOOK:=RELEASABLES
+
+# make sure TEMS happen at the right stages
+# OTHER_$(STAGE) only set if running udeb+urel
+MAKMAKE_DEPS:=EXPORT $(OTHER_MAKMAKE)
+RESOURCE_DEPS:=BITMAP $(OTHER_RESOURCE)
+LIB_DEPS:=RESOURCE $(OTHER_LIB)
+BLD_DEPS:=LIBRARY $(OTHER_BLD)
+FINAL_DEPS:=TARGET $(OTHER_FINAL)
+FREEZE_DEPS:=$(OTHER_FREEZE)
+CLEANLIB_DEPS:=$(OTHER_CLEANLIB)
+CLEAN_DEPS:=$(OTHER_CLEAN)
+
+export /
+export ;
+export SHELL
+
+#################################### Global Targets ##
+## All the global targets for the TEM
+# TEMs are called as sub-makes.
+
+define getMember
+$(subst $$,$$$$,$(O.$(1)))
+endef
+
+define callTEM
+.PHONY:: $(UNIQ)_$(CFG)_$(1) 
+$($(1)_HOOK):: $(UNIQ)_$(CFG)_$(1)
+
+$(EPOCROOT)/epoc32/build/TEM_$(1):: $(UNIQ)_$(CFG)_$(1)
+
+$(UNIQ)_$(CFG)_$(1) : $($(1)_DEPS)
+	$(call startrule,tem,FORCESUCCESS,$(notdir $(TEMPLATE_EXTENSION_MAKEFILE))_$(1)) \
+	$(foreach V,$(TEPARAMETERS),$(V)='$($(V))') TEMTARGET='$(1)' $(foreach V,$(O._MEMBERS),$(V)='$(call getMember,$(V))')  $(TEMMAKE) -C $(EPOCBLD) -f $(TEMPLATE_EXTENSION_MAKEFILE) $(if $(SAVESPACE),$(subst BLD,SAVESPACE,$(1)),$(1)) \
+	$(call endrule,tem)
+ifneq ($(call isoneof,$(1),RELEASABLES FINAL),)
+	$(call startrawoutput) \
+	echo "$(call whatLogOpen)" ; \
+	$(foreach V,$(TEPARAMETERS),$(V)='$($(V))') TEMTARGET='$(1)' \
+	$(foreach V,$(O._MEMBERS),$(V)='$(call getMember,$(V))')  \
+	$(TEMMAKE) -s --no-print-directory -C $(EPOCBLD) -f $(TEMPLATE_EXTENSION_MAKEFILE) RELEASABLES | \
+	(read -r LINE; while [ $$$$? -eq 0 ]; do \
+	if [[ ! $$$$LINE =~ "Nothing to be done for"  ]] ; then echo "$(call whatLogItem,TEM,$$$$LINE)"; fi; \
+	read -r LINE; done; ); \
+	echo "$(call whatLogClose)" \
+	$(call endrawoutput) 
+
+WHATTEM:: $(UNIQ)_$(CFG)_RELEASABLES
+
+endif
+
+
+tem_debug::
+	@echo "TEM_DEBUG: O._MEMBERS=$(O._MEMBERS)"
+endef
+
+$(foreach TETRG,$(TETARGETS),$(eval $(call callTEM,$(TETRG))))
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/Makefile
--- a/sbsv2/raptor/lib/flm/test/Makefile	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/Makefile	Mon Nov 16 09:46:46 2009 +0000
@@ -1,66 +1,66 @@
-##
-# Create and check test environment.
-# build all tests.
-
-## Purpose: Run test makefiles in parallel to ensure that they all work
-## Postconditions: All postconditions for all the makefiles are satisfied
-
-# Parameters which may be overridden by the environment:
-RAPTOR_HOME?=/localhome/tmurphy/pf/EPOC/development/tools/personal/tmurphy/tools/raptor
-# Need elf2e32 etc.
-RAPTOOLS?=/localhome/tmurphy/raptools/linux86
-EPOCROOT?=/tmp/tim-epocroot
-# End of Environment-overridable parameters.
-
-#Where are flms located?
-FLMHOME:=$(RAPTOR_HOME)/lib/flm
-FLMTESTHOME:=$(FLMHOME)/test
-SOURCEPATH:=$(FLMHOME)/test
-
-
-.PHONY:: all
-
-#### Call all the test makefiles ##############
-ALLTARGET:=all
-
-OUTPUTPATH=$(EPOCROOT)/epoc32/build
-RELEASEPATH:=$(EPOCROOT)/epoc32/release
-FULLVARIANTPATH:=ARMV5/UREL
-
-include $(FLMHOME)/test/exebasictests.mk
-
-include $(FLMHOME)/test/ciatests.mk
-
-include $(FLMHOME)/test/exeperftests.mk
-
-include $(FLMHOME)/test/dllbasictests.mk
-
-###############################################
-
-#EPOCROOT:=
-SYSTEMSOURCEPATH:=/c/p4_Perforce011666_LON-TIMOTHYM01/EPOC/development/tools/personal/tmurphy/EPOC/master
-OSNAME:=cedar
-#include $(FLMHOME)/system.flm
-
-flmcheck:: flmtoolscheck
-	@ERRCOUNT=0; for i in $(FLMHOME)/*.flm; do \
-		$(FLMHOME)/tools/flmcheck.py  $$i; ERRCOUNT=$$[ $$ERRCOUNT + $$?];  done;  \
-		echo "flmcheck issued warnings for $$ERRCOUNT  FLMS.";
-		@true # For the time being this is not a sufficient condition to stop the tests
-
-# Run through the flmtools tests to make sure thye work
-flmtoolscheck::
-	make -f ../flmtools.mk STANDALONE_TEST:=1 FLMHOME:=$(FLMHOME) test
-
-envcheck::
-	@echo ""
-	@echo -n ""; ELF2E32=`which elf2e32`; if [ "$$ELF2E32" == "" ]; then echo -n "elf2e32 not available in the path."; else echo -n "$$ELF2E32"; fi; echo ""
-	@echo -n ""; make -v | egrep '^.*GNU Make 3.81.*$$' ; if [ $$? -ne 0 ]; then echo -n "Version of make in the path appears not to be 3.81."; fi; echo ""
-	@echo -n ""; $$TRANASM | egrep 'tranasm' ; if [ $$? -ne 0 ]; then echo -n "tranasm not found"; fi; echo ""
-	@echo -n ""; if [ ! -d "$$EPOCROOT" ]; then echo -n "EPOCROOT='$$EPOCROOT' directory not found."; else echo -n "$$EPOCROOT"; fi; echo ""
-	@echo -n ""; if [ ! -d "$$RAPTOR_HOME" ]; then echo -n "RAPTOR_HOME='$$RAPTOR_HOME' directory not found."; else echo -n "$$RAPTOR_HOME"; fi; echo ""
-	@echo ""
-
-	
-	
-# END TEST - Check FLMS
+##
+# Create and check test environment.
+# build all tests.
+
+## Purpose: Run test makefiles in parallel to ensure that they all work
+## Postconditions: All postconditions for all the makefiles are satisfied
+
+# Parameters which may be overridden by the environment:
+RAPTOR_HOME?=/localhome/tmurphy/pf/EPOC/development/tools/personal/tmurphy/tools/raptor
+# Need elf2e32 etc.
+RAPTOOLS?=/localhome/tmurphy/raptools/linux86
+EPOCROOT?=/tmp/tim-epocroot
+# End of Environment-overridable parameters.
+
+#Where are flms located?
+FLMHOME:=$(RAPTOR_HOME)/lib/flm
+FLMTESTHOME:=$(FLMHOME)/test
+SOURCEPATH:=$(FLMHOME)/test
+
+
+.PHONY:: all
+
+#### Call all the test makefiles ##############
+ALLTARGET:=all
+
+OUTPUTPATH=$(EPOCROOT)/epoc32/build
+RELEASEPATH:=$(EPOCROOT)/epoc32/release
+FULLVARIANTPATH:=ARMV5/UREL
+
+include $(FLMHOME)/test/exebasictests.mk
+
+include $(FLMHOME)/test/ciatests.mk
+
+include $(FLMHOME)/test/exeperftests.mk
+
+include $(FLMHOME)/test/dllbasictests.mk
+
+###############################################
+
+#EPOCROOT:=
+SYSTEMSOURCEPATH:=/c/p4_Perforce011666_LON-TIMOTHYM01/EPOC/development/tools/personal/tmurphy/EPOC/master
+OSNAME:=cedar
+#include $(FLMHOME)/system.flm
+
+flmcheck:: flmtoolscheck
+	@ERRCOUNT=0; for i in $(FLMHOME)/*.flm; do \
+		$(FLMHOME)/tools/flmcheck.py  $$i; ERRCOUNT=$$[ $$ERRCOUNT + $$?];  done;  \
+		echo "flmcheck issued warnings for $$ERRCOUNT  FLMS.";
+		@true # For the time being this is not a sufficient condition to stop the tests
+
+# Run through the flmtools tests to make sure thye work
+flmtoolscheck::
+	make -f ../flmtools.mk STANDALONE_TEST:=1 FLMHOME:=$(FLMHOME) test
+
+envcheck::
+	@echo ""
+	@echo -n ""; ELF2E32=`which elf2e32`; if [ "$$ELF2E32" == "" ]; then echo -n "elf2e32 not available in the path."; else echo -n "$$ELF2E32"; fi; echo ""
+	@echo -n ""; make -v | egrep '^.*GNU Make 3.81.*$$' ; if [ $$? -ne 0 ]; then echo -n "Version of make in the path appears not to be 3.81."; fi; echo ""
+	@echo -n ""; $$TRANASM | egrep 'tranasm' ; if [ $$? -ne 0 ]; then echo -n "tranasm not found"; fi; echo ""
+	@echo -n ""; if [ ! -d "$$EPOCROOT" ]; then echo -n "EPOCROOT='$$EPOCROOT' directory not found."; else echo -n "$$EPOCROOT"; fi; echo ""
+	@echo -n ""; if [ ! -d "$$RAPTOR_HOME" ]; then echo -n "RAPTOR_HOME='$$RAPTOR_HOME' directory not found."; else echo -n "$$RAPTOR_HOME"; fi; echo ""
+	@echo ""
+
+	
+	
+# END TEST - Check FLMS
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/ciaabiv2_1/ciaabiv2_1.mk
--- a/sbsv2/raptor/lib/flm/test/ciaabiv2_1/ciaabiv2_1.mk	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/ciaabiv2_1/ciaabiv2_1.mk	Mon Nov 16 09:46:46 2009 +0000
@@ -1,42 +1,42 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-##
-## Test 1 - build an ARM E32 EXE on Linux
-## parameters relevant to the test.
-
-## Purpose: To demonstrate use of 1 call to a basic flm with one input file
-## Postconditions: test1.cia is written to the output directory $OUTPUTPATH/test1/test1.cia:
-
-# Pull tools
-include $(FLMHOME)/flmtools.mk
-
-
-$(call vsave,OUTPUTPATH SOURCEPATH CDEFS SYSTEMINCLUDE)
-# Pull in defaults for building test ciacutables
-include $(FLMTESTHOME)/dllabiv2_defaults.mk
-
-TARGET:=ciaabiv2_1
-CDEFS:=$(CDEFS) __TESTNAME__=\"ciaabiv2_1\"
-OUTPUTPATH:=$(OUTPUTPATH)/$(TARGET)
-SOURCEPATH:=$(SOURCEPATH)/ciaabiv2_1
-SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(FLMTESTHOME)/include
-SOURCEFILES:=$(SOURCEPATH)/uc_exe.cia  $(SOURCEPATH)/uc_exe.cpp
-UID3:=0x000001
-
-
-include $(FLMHOME)/$(FLM)
-
-$(call vrestore)
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+##
+## Test 1 - build an ARM E32 EXE on Linux
+## parameters relevant to the test.
+
+## Purpose: To demonstrate use of 1 call to a basic flm with one input file
+## Postconditions: test1.cia is written to the output directory $OUTPUTPATH/test1/test1.cia:
+
+# Pull tools
+include $(FLMHOME)/flmtools.mk
+
+
+$(call vsave,OUTPUTPATH SOURCEPATH CDEFS SYSTEMINCLUDE)
+# Pull in defaults for building test ciacutables
+include $(FLMTESTHOME)/dllabiv2_defaults.mk
+
+TARGET:=ciaabiv2_1
+CDEFS:=$(CDEFS) __TESTNAME__=\"ciaabiv2_1\"
+OUTPUTPATH:=$(OUTPUTPATH)/$(TARGET)
+SOURCEPATH:=$(SOURCEPATH)/ciaabiv2_1
+SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(FLMTESTHOME)/include
+SOURCEFILES:=$(SOURCEPATH)/uc_exe.cia  $(SOURCEPATH)/uc_exe.cpp
+UID3:=0x000001
+
+
+include $(FLMHOME)/$(FLM)
+
+$(call vrestore)
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/ciaabiv2_1/uc_exe.cia
--- a/sbsv2/raptor/lib/flm/test/ciaabiv2_1/uc_exe.cia	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/ciaabiv2_1/uc_exe.cia	Mon Nov 16 09:46:46 2009 +0000
@@ -1,128 +1,128 @@
-/*
-* Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-* e32\euser\epoc\arm\uc_exe.cia
-*
-*/
-
-
-#include 
-#include 
-// Include this to get imports from User (i.e. User::Invariant and User::HandleException). 
-// This sets VISIBILITY to DEFAULT for BPABI builds.
-#include 
-
-extern "C" {
-
-void _xxxx_call_user_invariant();
-void _xxxx_call_user_handle_exception(void *);
-
-extern void RunThread(TBool aNotFirst, SThreadCreateInfo& aInfo);
-
-// NOTE: This MUST be the first function in this module
-__NAKED__ TInt _E32Startup()
-	{
-	// Process entry point
-	// R4 = entry reason
-	// SP points to information block
-	EKA2_ENTRY_POINT_VERSION_IDENTIFIER;	// DUMMY INSTRUCTION TO INDICATE EKA2 ENTRY POINT
-	asm("cmp r4, #%a0" : : "i" ((TInt)KModuleEntryReasonThreadInit) );
-	asm("b 1f ");				// branch over space for unique ID
-
-	asm(".word 0 ");			// loader will replace with code seg unique ID
-								// for RAM-loaded code segment
-								// MUST BE AT OFFSET 12 FROM ENTRY POINT
-
-	asm("1: ");
-	asm("movls r0, r4 ");		// r0 = aNotFirst
-	asm("movls r1, sp ");		// r1 -> parameter block
-	asm("bls RunThread ");		// process or thread init
-	asm("cmp r4, #%a0" : : "i" ((TInt)KModuleEntryReasonException) );
-//  	asm("bne " CSM_ZN4User9InvariantEv );	// invalid entry reason
-  	asm("bne _xxxx_call_user_invariant " );	// invalid entry reason
-
-	// exception entry
-	// NOTE: THUMB only works on ARMv5 and above
-	asm("mov r0, sp ");			// r0->parameter block
-	asm("ldr r4, [sp, #16]");	// r4 = saved CPSR
-	asm("tst r4, #0x20 ");		// test for THUMB
-	asm("ldrne r1, [sp, #80] ");	// r1 = saved return addr
-	asm("orrne r1, r1, #1 ");
-	asm("strne r1, [sp, #80] ");	// if THUMB, set bit 0 of return addr
-
-	asm("mov r11, sp ");		// save stack pointer
-
-	// The frame starts 84 bytes (up) from r11 i.e. CFA is r11 + 84
-	__EH_FRAME_ADDRESS(r11, 84)
-	// we can only restore callee-save values, but that's what we want if we 'leave'
-	// saved link is -8 bytes from CFA (= r11 + 0x24 + 0x20 + 0x8)
-	__EH_FRAME_SAVE1(lr, -8)
-
-	// the other callee saves start at -48 from CFA (= r11 + 0x24)
-#if 0
-	// would like to say this 
-	__EH_FRAME_SAVE1(r4-r11, -48)
-	// but the macro expansion gives rise to odd code so we do what follows
-#endif
-#ifdef __ARMCC__
-	FRAME SAVE {r4-r11}, -48
-#endif
-
-	asm("bic sp, sp, #4 ");		// align stack to 8 byte boundary
-//  	asm("bl " CSM_ZN4User15HandleExceptionEPv );
-  	asm("bl _xxxx_call_user_handle_exception ");
-	asm("add sp, r11, #16 ");	// skip exc type, exc code, FAR, FSR
-	asm("ldr r4, [sp], #4 ");	// r4 = saved CPSR
-	asm("bic r4, r4, #0x20 ");	// clear THUMB bit
-	asm("msr cpsr, r4 ");		// restore flags
-	asm("ldmia sp, {r0-r15} ");	// restore r0-r15
-
-#ifdef __ARMCC__
-#ifdef __SUPPORT_CPP_EXCEPTIONS__
-
-
-  /* It is possible no functions included in the image require
-   * a handler table. Therefore make only a weak reference to
-   * the handler table base symbol, which may be absent.
-   */
-  extern |.ARM.exidx$$Base|;
-  extern |.ARM.exidx$$Limit|;
-  extern |.ARM.extab$$Base| [WEAK];
-  extern |Image$$ER_RO$$Base|;
-  extern |Image$$ER_RO$$Limit|;
-  export |Symbian$$CPP$$Exception$$Descriptor|;
-
-|Symbian$$CPP$$Exception$$Descriptor|
-#ifdef __LEAVE_EQUALS_THROW__
-|Symbian$$eit_base|  		dcd |.ARM.exidx$$Base|;   /* index table base */
-|Symbian$$eit_limit|  		dcd |.ARM.exidx$$Limit| ;  /* index table limit */
-#endif
-#if __ARMCC_VERSION > 220000
-|Symbian$$code_seg_base| 	dcd |Image$$ER_RO$$Base| + 1 ; /* RO segment base + mark as ehabi v2 */
-|Symbian$$code_seg_limit| 	dcd |Image$$ER_RO$$Limit| ;/* RO segment limit */
-|Symbian$$reserved|		dcd 0 ; /* reserved for future use */
-#else
-|Symbian$$code_seg_base| 	dcd |Image$$ER_RO$$Base| ; /* RO segment base */
-|Symbian$$code_seg_limit| 	dcd |Image$$ER_RO$$Limit| ;/* RO segment limit */
-#endif
-
-#endif
-#endif
-
-	}
-void _xxxx_call_user_invariant() { User::Invariant(); }
-void _xxxx_call_user_handle_exception(void * arg) { User::HandleException(arg); }
-
-}
-
+/*
+* Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* e32\euser\epoc\arm\uc_exe.cia
+*
+*/
+
+
+#include 
+#include 
+// Include this to get imports from User (i.e. User::Invariant and User::HandleException). 
+// This sets VISIBILITY to DEFAULT for BPABI builds.
+#include 
+
+extern "C" {
+
+void _xxxx_call_user_invariant();
+void _xxxx_call_user_handle_exception(void *);
+
+extern void RunThread(TBool aNotFirst, SThreadCreateInfo& aInfo);
+
+// NOTE: This MUST be the first function in this module
+__NAKED__ TInt _E32Startup()
+	{
+	// Process entry point
+	// R4 = entry reason
+	// SP points to information block
+	EKA2_ENTRY_POINT_VERSION_IDENTIFIER;	// DUMMY INSTRUCTION TO INDICATE EKA2 ENTRY POINT
+	asm("cmp r4, #%a0" : : "i" ((TInt)KModuleEntryReasonThreadInit) );
+	asm("b 1f ");				// branch over space for unique ID
+
+	asm(".word 0 ");			// loader will replace with code seg unique ID
+								// for RAM-loaded code segment
+								// MUST BE AT OFFSET 12 FROM ENTRY POINT
+
+	asm("1: ");
+	asm("movls r0, r4 ");		// r0 = aNotFirst
+	asm("movls r1, sp ");		// r1 -> parameter block
+	asm("bls RunThread ");		// process or thread init
+	asm("cmp r4, #%a0" : : "i" ((TInt)KModuleEntryReasonException) );
+//  	asm("bne " CSM_ZN4User9InvariantEv );	// invalid entry reason
+  	asm("bne _xxxx_call_user_invariant " );	// invalid entry reason
+
+	// exception entry
+	// NOTE: THUMB only works on ARMv5 and above
+	asm("mov r0, sp ");			// r0->parameter block
+	asm("ldr r4, [sp, #16]");	// r4 = saved CPSR
+	asm("tst r4, #0x20 ");		// test for THUMB
+	asm("ldrne r1, [sp, #80] ");	// r1 = saved return addr
+	asm("orrne r1, r1, #1 ");
+	asm("strne r1, [sp, #80] ");	// if THUMB, set bit 0 of return addr
+
+	asm("mov r11, sp ");		// save stack pointer
+
+	// The frame starts 84 bytes (up) from r11 i.e. CFA is r11 + 84
+	__EH_FRAME_ADDRESS(r11, 84)
+	// we can only restore callee-save values, but that's what we want if we 'leave'
+	// saved link is -8 bytes from CFA (= r11 + 0x24 + 0x20 + 0x8)
+	__EH_FRAME_SAVE1(lr, -8)
+
+	// the other callee saves start at -48 from CFA (= r11 + 0x24)
+#if 0
+	// would like to say this 
+	__EH_FRAME_SAVE1(r4-r11, -48)
+	// but the macro expansion gives rise to odd code so we do what follows
+#endif
+#ifdef __ARMCC__
+	FRAME SAVE {r4-r11}, -48
+#endif
+
+	asm("bic sp, sp, #4 ");		// align stack to 8 byte boundary
+//  	asm("bl " CSM_ZN4User15HandleExceptionEPv );
+  	asm("bl _xxxx_call_user_handle_exception ");
+	asm("add sp, r11, #16 ");	// skip exc type, exc code, FAR, FSR
+	asm("ldr r4, [sp], #4 ");	// r4 = saved CPSR
+	asm("bic r4, r4, #0x20 ");	// clear THUMB bit
+	asm("msr cpsr, r4 ");		// restore flags
+	asm("ldmia sp, {r0-r15} ");	// restore r0-r15
+
+#ifdef __ARMCC__
+#ifdef __SUPPORT_CPP_EXCEPTIONS__
+
+
+  /* It is possible no functions included in the image require
+   * a handler table. Therefore make only a weak reference to
+   * the handler table base symbol, which may be absent.
+   */
+  extern |.ARM.exidx$$Base|;
+  extern |.ARM.exidx$$Limit|;
+  extern |.ARM.extab$$Base| [WEAK];
+  extern |Image$$ER_RO$$Base|;
+  extern |Image$$ER_RO$$Limit|;
+  export |Symbian$$CPP$$Exception$$Descriptor|;
+
+|Symbian$$CPP$$Exception$$Descriptor|
+#ifdef __LEAVE_EQUALS_THROW__
+|Symbian$$eit_base|  		dcd |.ARM.exidx$$Base|;   /* index table base */
+|Symbian$$eit_limit|  		dcd |.ARM.exidx$$Limit| ;  /* index table limit */
+#endif
+#if __ARMCC_VERSION > 220000
+|Symbian$$code_seg_base| 	dcd |Image$$ER_RO$$Base| + 1 ; /* RO segment base + mark as ehabi v2 */
+|Symbian$$code_seg_limit| 	dcd |Image$$ER_RO$$Limit| ;/* RO segment limit */
+|Symbian$$reserved|		dcd 0 ; /* reserved for future use */
+#else
+|Symbian$$code_seg_base| 	dcd |Image$$ER_RO$$Base| ; /* RO segment base */
+|Symbian$$code_seg_limit| 	dcd |Image$$ER_RO$$Limit| ;/* RO segment limit */
+#endif
+
+#endif
+#endif
+
+	}
+void _xxxx_call_user_invariant() { User::Invariant(); }
+void _xxxx_call_user_handle_exception(void * arg) { User::HandleException(arg); }
+
+}
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/ciaabiv2_1/uc_exe.cpp
--- a/sbsv2/raptor/lib/flm/test/ciaabiv2_1/uc_exe.cpp	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/ciaabiv2_1/uc_exe.cpp	Mon Nov 16 09:46:46 2009 +0000
@@ -1,73 +1,73 @@
-/*
-* Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-* e32\euser\epoc\arm\uc_exe.cpp
-*
-*/
-
-
-#include 
-
-
-GLREF_C TInt E32Main();
-
-extern "C" {
-
-#if defined(__GCC32__)
-typedef void (*PFV)();
-extern PFV __CTOR_LIST__[];
-extern PFV __DTOR_LIST__[];
-
-void RunThread(TBool aNotFirst, SThreadCreateInfo& aInfo)
-	{
-	SStdEpocThreadCreateInfo& cinfo = (SStdEpocThreadCreateInfo&)aInfo;
-	TInt r = UserHeap::SetupThreadHeap(aNotFirst, cinfo);
-	if (r==KErrNone)
-		{
-		if (aNotFirst)
-			r = (*cinfo.iFunction)(cinfo.iPtr);
-		else
-			{
-			// Init statics for implicitly linked DLLs
-			User::InitProcess();
-
-			// Init statics for EXE
-			TUint i=1;
-			while (__CTOR_LIST__[i])
-				(*__CTOR_LIST__[i++])();
-
-			r = E32Main();
-			}
-		}
-	User::Exit(r);
-	}
-}
-
-#elif defined(__ARMCC__)
-
-TInt CallThrdProcEntry(TInt (*aFn)(void*), void* aPtr, TInt aNotFirst);
-
-void RunThread(TBool aNotFirst, SThreadCreateInfo& aInfo)
-	{
-	SStdEpocThreadCreateInfo& cinfo = (SStdEpocThreadCreateInfo&)aInfo;
-	TInt r = UserHeap::SetupThreadHeap(aNotFirst, cinfo);
-	if (r==KErrNone)
-		r = CallThrdProcEntry(cinfo.iFunction, cinfo.iPtr, aNotFirst);
-	User::Exit(r);
-	}
-}
-
-#else
-#error not supported
-#endif
+/*
+* Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* e32\euser\epoc\arm\uc_exe.cpp
+*
+*/
+
+
+#include 
+
+
+GLREF_C TInt E32Main();
+
+extern "C" {
+
+#if defined(__GCC32__)
+typedef void (*PFV)();
+extern PFV __CTOR_LIST__[];
+extern PFV __DTOR_LIST__[];
+
+void RunThread(TBool aNotFirst, SThreadCreateInfo& aInfo)
+	{
+	SStdEpocThreadCreateInfo& cinfo = (SStdEpocThreadCreateInfo&)aInfo;
+	TInt r = UserHeap::SetupThreadHeap(aNotFirst, cinfo);
+	if (r==KErrNone)
+		{
+		if (aNotFirst)
+			r = (*cinfo.iFunction)(cinfo.iPtr);
+		else
+			{
+			// Init statics for implicitly linked DLLs
+			User::InitProcess();
+
+			// Init statics for EXE
+			TUint i=1;
+			while (__CTOR_LIST__[i])
+				(*__CTOR_LIST__[i++])();
+
+			r = E32Main();
+			}
+		}
+	User::Exit(r);
+	}
+}
+
+#elif defined(__ARMCC__)
+
+TInt CallThrdProcEntry(TInt (*aFn)(void*), void* aPtr, TInt aNotFirst);
+
+void RunThread(TBool aNotFirst, SThreadCreateInfo& aInfo)
+	{
+	SStdEpocThreadCreateInfo& cinfo = (SStdEpocThreadCreateInfo&)aInfo;
+	TInt r = UserHeap::SetupThreadHeap(aNotFirst, cinfo);
+	if (r==KErrNone)
+		r = CallThrdProcEntry(cinfo.iFunction, cinfo.iPtr, aNotFirst);
+	User::Exit(r);
+	}
+}
+
+#else
+#error not supported
+#endif
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/ciatests.mk
--- a/sbsv2/raptor/lib/flm/test/ciatests.mk	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/ciatests.mk	Mon Nov 16 09:46:46 2009 +0000
@@ -1,31 +1,31 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-##
-# A grouping glue makefile that runs all tests
-
-## Purpose: Run test makefiles in parallel to ensure that they all work
-## Postconditions: All postconditions for all the makefiles are satisfied
-
-include $(FLMHOME)/flmtools.mk
-
-$(call vsave,ALLTARGET)
-COMPONENT_ALLTARGETS:=$(RELEASEPATH)/$(FULLVARIANTPATH)/ciaabiv2_1.dll
-COMPONENT_GLUEMAKEFILES:=ciaabiv2_1/ciaabiv2_1.mk
-$(ALLTARGET):: ciatests
-ALLTARGET:=ciatests
-
-include $(FLMHOME)/grouping.flm
-$(call vrestore)
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+##
+# A grouping glue makefile that runs all tests
+
+## Purpose: Run test makefiles in parallel to ensure that they all work
+## Postconditions: All postconditions for all the makefiles are satisfied
+
+include $(FLMHOME)/flmtools.mk
+
+$(call vsave,ALLTARGET)
+COMPONENT_ALLTARGETS:=$(RELEASEPATH)/$(FULLVARIANTPATH)/ciaabiv2_1.dll
+COMPONENT_GLUEMAKEFILES:=ciaabiv2_1/ciaabiv2_1.mk
+$(ALLTARGET):: ciatests
+ALLTARGET:=ciatests
+
+include $(FLMHOME)/grouping.flm
+$(call vrestore)
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/dllabiv2_1/dllabiv2_1.mk
--- a/sbsv2/raptor/lib/flm/test/dllabiv2_1/dllabiv2_1.mk	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/dllabiv2_1/dllabiv2_1.mk	Mon Nov 16 09:46:46 2009 +0000
@@ -1,40 +1,40 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-##
-## Test 1 - build an ARM E32 DLL
-## parameters relevant to the test.
-
-## Purpose: To demonstrate the building of a trivial library
-## Postconditions: dllabiv2_1.dll is written to the releasables directory
-
-# Pull in defaults for building test executables
-
-#Get the tools so we can save some variables
-include $(FLMHOME)/flmtools.mk
-
-$(call vsave,OUTPUTPATH SOURCEPATH CDEFS SYSTEMINCLUDE)
-include $(FLMTESTHOME)/dllabiv2_defaults.mk
-
-TARGET:=dllabiv2_1
-CDEFS:=$(CDEFS) __TESTNAME__=\"dllabiv2_1\"
-OUTPUTPATH:=$(OUTPUTPATH)/$(TARGET)
-SOURCEPATH:=$(SOURCEPATH)/dllabiv2_1
-SOURCEFILES:=$(SOURCEPATH)/test.cpp
-
-include $(FLMHOME)/$(FLM)
-
-# Restore the variables we modified
-$(call vrestore)
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+##
+## Test 1 - build an ARM E32 DLL
+## parameters relevant to the test.
+
+## Purpose: To demonstrate the building of a trivial library
+## Postconditions: dllabiv2_1.dll is written to the releasables directory
+
+# Pull in defaults for building test executables
+
+#Get the tools so we can save some variables
+include $(FLMHOME)/flmtools.mk
+
+$(call vsave,OUTPUTPATH SOURCEPATH CDEFS SYSTEMINCLUDE)
+include $(FLMTESTHOME)/dllabiv2_defaults.mk
+
+TARGET:=dllabiv2_1
+CDEFS:=$(CDEFS) __TESTNAME__=\"dllabiv2_1\"
+OUTPUTPATH:=$(OUTPUTPATH)/$(TARGET)
+SOURCEPATH:=$(SOURCEPATH)/dllabiv2_1
+SOURCEFILES:=$(SOURCEPATH)/test.cpp
+
+include $(FLMHOME)/$(FLM)
+
+# Restore the variables we modified
+$(call vrestore)
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/dllabiv2_1/test.cpp
--- a/sbsv2/raptor/lib/flm/test/dllabiv2_1/test.cpp	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/dllabiv2_1/test.cpp	Mon Nov 16 09:46:46 2009 +0000
@@ -1,24 +1,24 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-#include "e32def.h" // intentional  include
-
-char test[]=__TESTNAME__;
-
-TInt E32Main()
-{
-	return 0;
-}
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+#include "e32def.h" // intentional  include
+
+char test[]=__TESTNAME__;
+
+TInt E32Main()
+{
+	return 0;
+}
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/dllabiv2_defaults.mk
--- a/sbsv2/raptor/lib/flm/test/dllabiv2_defaults.mk	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/dllabiv2_defaults.mk	Mon Nov 16 09:46:46 2009 +0000
@@ -1,45 +1,45 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-##
-# Defaults for ABIv2 EXE build tests
-
-## Purpose: To enable all test makefiles to be updated rapidly
-
-
-include $(FLMHOME)/e32abiv2.mk
-
-DEBUG:=1
-
-CAPABILITY:=LocalServices ReadDeviceData ReadUserData
-UID1:=0x1000007a
-UID2:=0x100039ce
-UID3:=0x000001
-SID:=0x10003a5c
-EXETARGET:=
-MAPFILENAME:=
-BMPS:=
-EPOCDATA:=
-
-VARIANTARCH:=ARMV5
-FULLVARIANTPATH=$(VARIANTARCH)/$(VARIANTTYPE)
-STATIC_LIBS_PATH:=/usr/local/ARM/RVCT/Data/2.2/308/lib/armlib
-RUNTIME_LIBS_PATH=$(RELEASEPATH)/$(VARIANTARCH)/LIB
-RELEASEPATH:=$(EPOCROOT)/epoc32/release
-FLM:=e32abiv2dll.flm
-CDEFS:=$(CDEFS) __DLL__
-
-
-
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+##
+# Defaults for ABIv2 EXE build tests
+
+## Purpose: To enable all test makefiles to be updated rapidly
+
+
+include $(FLMHOME)/e32abiv2.mk
+
+DEBUG:=1
+
+CAPABILITY:=LocalServices ReadDeviceData ReadUserData
+UID1:=0x1000007a
+UID2:=0x100039ce
+UID3:=0x000001
+SID:=0x10003a5c
+EXETARGET:=
+MAPFILENAME:=
+BMPS:=
+EPOCDATA:=
+
+VARIANTARCH:=ARMV5
+FULLVARIANTPATH=$(VARIANTARCH)/$(VARIANTTYPE)
+STATIC_LIBS_PATH:=/usr/local/ARM/RVCT/Data/2.2/308/lib/armlib
+RUNTIME_LIBS_PATH=$(RELEASEPATH)/$(VARIANTARCH)/LIB
+RELEASEPATH:=$(EPOCROOT)/epoc32/release
+FLM:=e32abiv2dll.flm
+CDEFS:=$(CDEFS) __DLL__
+
+
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/dllbasictests.mk
--- a/sbsv2/raptor/lib/flm/test/dllbasictests.mk	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/dllbasictests.mk	Mon Nov 16 09:46:46 2009 +0000
@@ -1,31 +1,31 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-##
-# A grouping glue makefile that runs all tests
-
-## Purpose: Run test makefiles in parallel to ensure that they all work
-## Postconditions: All postconditions for all the makefiles are satisfied
-
-include $(FLMHOME)/flmtools.mk
-
-$(call vsave,ALLTARGET OUTPUTPATH)
-COMPONENT_ALLTARGETS:=$(RELEASEPATH)/$(FULLVARIANTPATH)/dllabiv2_1.dll
-COMPONENT_GLUEMAKEFILES:=dllabiv2_1/dllabiv2_1.mk 
-$(ALLTARGET):: dllbasictests
-ALLTARGET:=dllbasictests
-
-include $(FLMHOME)/grouping.flm
-$(call vrestore)
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+##
+# A grouping glue makefile that runs all tests
+
+## Purpose: Run test makefiles in parallel to ensure that they all work
+## Postconditions: All postconditions for all the makefiles are satisfied
+
+include $(FLMHOME)/flmtools.mk
+
+$(call vsave,ALLTARGET OUTPUTPATH)
+COMPONENT_ALLTARGETS:=$(RELEASEPATH)/$(FULLVARIANTPATH)/dllabiv2_1.dll
+COMPONENT_GLUEMAKEFILES:=dllabiv2_1/dllabiv2_1.mk 
+$(ALLTARGET):: dllbasictests
+ALLTARGET:=dllbasictests
+
+include $(FLMHOME)/grouping.flm
+$(call vrestore)
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/environment/make/test_variable_restore.mk
--- a/sbsv2/raptor/lib/flm/test/environment/make/test_variable_restore.mk	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/environment/make/test_variable_restore.mk	Mon Nov 16 09:46:46 2009 +0000
@@ -1,97 +1,97 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-# Makefile that demonstrates the effect of state saving macros
-# when used across multiple FLM calls
-
-#
-# basically for testing the stack.mk amkefile fragmemt
-# Which chould be inluded by flmtools.mk
-#
-
-
-.PHONY: stack-debug
-
-OUTPUTPATH:=_PRE_OUTPUTPATH_
-SOURCEPATH:=_PRE_SOURCEPATH_
-
-COMMA:= ,
-EMPTY:=
-SPACE:= $(EMPTY) $(EMPTY)
-
-
-include $(FLMHOME)/flmtools.mk
-
-OUTPUTPATH:=ORIGINAL_OUTPUTPATH OP2 OP3
-SOURCEPATH:=ORIGINAL_SOURCEPATH SP2 SP3
-
-###############################################################################
-# Rules for testing
-.PHONY: all
-
-all: stack-debug stack-debug2 stack-debug3
-	@echo "FLM stack TEST SUCCEEDED"
-
-.PHONY: stack-debug
-stack-debug: VARIABLE_STACK_NAME:=$(VARIABLE_STACK_NAME)
-stack-debug: OUTPUTPATH:=$(OUTPUTPATH)
-stack-debug: SOURCEPATH:=$(SOURCEPATH)
-
-stack-debug:
-	@echo NAME=\"$(VARIABLE_STACK_NAME)\"
-	@echo "	Stack Name: \"$(VARIABLE_STACK_NAME)\""
-	@echo "	Stack contents: \"$($(VARIABLE_STACK_NAME)$)\""
-	@echo "Original Parameters iprior to 'FLM Call': "
-	@echo "	OUTPUTPATH: "$(OUTPUTPATH)
-	@echo "	SOURCEPATH: "$(SOURCEPATH)
-	[ "$(OUTPUTPATH)" == "ORIGINAL_OUTPUTPATH OP2 OP3" ]
-	[ "$(SOURCEPATH)" == "ORIGINAL_SOURCEPATH SP2 SP3" ]
-
-
-$(call vsave,OUTPUTPATH SOURCEPATH)
-OUTPUTPATH:=MODIFIED OUTPUTPATH
-SOURCEPATH:=MODIFIED OUTPUTPATH
-
-
-
-.PHONY: stack-debug2
-stack-debug2: VARIABLE_STACK_NAME:=$(VARIABLE_STACK_NAME)
-stack-debug2: OUTPUTPATH:=$(OUTPUTPATH)
-stack-debug2: SOURCEPATH:=$(SOURCEPATH)
-stack-debug2:
-	@echo "--------------------"
-	@echo "	Stack Name: \"$(VARIABLE_STACK_NAME)\""
-	@echo "Parameters after 'FLM Call': "
-	@echo "	OUTPUTPATH: "$(OUTPUTPATH)
-	@echo "	SOURCEPATH: "$(SOURCEPATH)
-	[ "$(OUTPUTPATH)" == "MODIFIED OUTPUTPATH" ]
-	[ "$(SOURCEPATH)" == "MODIFIED OUTPUTPATH" ]
-
-
-$(call vrestore)
-
-
-.PHONY: stack-debug3
-stack-debug3: VARIABLE_STACK_NAME:=$(VARIABLE_STACK_NAME)
-stack-debug3: OUTPUTPATH:=$(OUTPUTPATH)
-stack-debug3: SOURCEPATH:=$(SOURCEPATH)
-stack-debug3:
-	@echo "--------------------"
-	@echo "	Stack Name: \"$(VARIABLE_STACK_NAME)\""
-	@echo "Parameters after restore: "
-	@echo "	OUTPUTPATH: "$(OUTPUTPATH)
-	@echo "	SOURCEPATH: "$(SOURCEPATH)
-	[ "$(OUTPUTPATH)" == "ORIGINAL_OUTPUTPATH OP2 OP3" ]
-	[ "$(SOURCEPATH)" == "ORIGINAL_SOURCEPATH SP2 SP3" ]
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+# Makefile that demonstrates the effect of state saving macros
+# when used across multiple FLM calls
+
+#
+# basically for testing the stack.mk amkefile fragmemt
+# Which chould be inluded by flmtools.mk
+#
+
+
+.PHONY: stack-debug
+
+OUTPUTPATH:=_PRE_OUTPUTPATH_
+SOURCEPATH:=_PRE_SOURCEPATH_
+
+COMMA:= ,
+EMPTY:=
+SPACE:= $(EMPTY) $(EMPTY)
+
+
+include $(FLMHOME)/flmtools.mk
+
+OUTPUTPATH:=ORIGINAL_OUTPUTPATH OP2 OP3
+SOURCEPATH:=ORIGINAL_SOURCEPATH SP2 SP3
+
+###############################################################################
+# Rules for testing
+.PHONY: all
+
+all: stack-debug stack-debug2 stack-debug3
+	@echo "FLM stack TEST SUCCEEDED"
+
+.PHONY: stack-debug
+stack-debug: VARIABLE_STACK_NAME:=$(VARIABLE_STACK_NAME)
+stack-debug: OUTPUTPATH:=$(OUTPUTPATH)
+stack-debug: SOURCEPATH:=$(SOURCEPATH)
+
+stack-debug:
+	@echo NAME=\"$(VARIABLE_STACK_NAME)\"
+	@echo "	Stack Name: \"$(VARIABLE_STACK_NAME)\""
+	@echo "	Stack contents: \"$($(VARIABLE_STACK_NAME)$)\""
+	@echo "Original Parameters iprior to 'FLM Call': "
+	@echo "	OUTPUTPATH: "$(OUTPUTPATH)
+	@echo "	SOURCEPATH: "$(SOURCEPATH)
+	[ "$(OUTPUTPATH)" == "ORIGINAL_OUTPUTPATH OP2 OP3" ]
+	[ "$(SOURCEPATH)" == "ORIGINAL_SOURCEPATH SP2 SP3" ]
+
+
+$(call vsave,OUTPUTPATH SOURCEPATH)
+OUTPUTPATH:=MODIFIED OUTPUTPATH
+SOURCEPATH:=MODIFIED OUTPUTPATH
+
+
+
+.PHONY: stack-debug2
+stack-debug2: VARIABLE_STACK_NAME:=$(VARIABLE_STACK_NAME)
+stack-debug2: OUTPUTPATH:=$(OUTPUTPATH)
+stack-debug2: SOURCEPATH:=$(SOURCEPATH)
+stack-debug2:
+	@echo "--------------------"
+	@echo "	Stack Name: \"$(VARIABLE_STACK_NAME)\""
+	@echo "Parameters after 'FLM Call': "
+	@echo "	OUTPUTPATH: "$(OUTPUTPATH)
+	@echo "	SOURCEPATH: "$(SOURCEPATH)
+	[ "$(OUTPUTPATH)" == "MODIFIED OUTPUTPATH" ]
+	[ "$(SOURCEPATH)" == "MODIFIED OUTPUTPATH" ]
+
+
+$(call vrestore)
+
+
+.PHONY: stack-debug3
+stack-debug3: VARIABLE_STACK_NAME:=$(VARIABLE_STACK_NAME)
+stack-debug3: OUTPUTPATH:=$(OUTPUTPATH)
+stack-debug3: SOURCEPATH:=$(SOURCEPATH)
+stack-debug3:
+	@echo "--------------------"
+	@echo "	Stack Name: \"$(VARIABLE_STACK_NAME)\""
+	@echo "Parameters after restore: "
+	@echo "	OUTPUTPATH: "$(OUTPUTPATH)
+	@echo "	SOURCEPATH: "$(SOURCEPATH)
+	[ "$(OUTPUTPATH)" == "ORIGINAL_OUTPUTPATH OP2 OP3" ]
+	[ "$(SOURCEPATH)" == "ORIGINAL_SOURCEPATH SP2 SP3" ]
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/environment/pvm/pvmtest.mk
--- a/sbsv2/raptor/lib/flm/test/environment/pvm/pvmtest.mk	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/environment/pvm/pvmtest.mk	Mon Nov 16 09:46:46 2009 +0000
@@ -1,25 +1,25 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-
-.PHONY: all one two
-
-all: one two
-
-one:
-	@echo ARCH=`$(PVM_ROOT)/lib/pvmgetarch`/`hostname`; hostname; /usr/local/ARM/RVCT/Programs/2.2/308/linux-pentium/armcc 
-
-two:
-	@echo ARCH=`$(PVM_ROOT)/lib/pvmgetarch`/`hostname`; hostname; /usr/local/ARM/RVCT/Programs/2.2/308/linux-pentium/armcc
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+
+.PHONY: all one two
+
+all: one two
+
+one:
+	@echo ARCH=`$(PVM_ROOT)/lib/pvmgetarch`/`hostname`; hostname; /usr/local/ARM/RVCT/Programs/2.2/308/linux-pentium/armcc 
+
+two:
+	@echo ARCH=`$(PVM_ROOT)/lib/pvmgetarch`/`hostname`; hostname; /usr/local/ARM/RVCT/Programs/2.2/308/linux-pentium/armcc
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/exeabiv2_1/exeabiv2_1.mk
--- a/sbsv2/raptor/lib/flm/test/exeabiv2_1/exeabiv2_1.mk	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/exeabiv2_1/exeabiv2_1.mk	Mon Nov 16 09:46:46 2009 +0000
@@ -1,42 +1,42 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-##
-## Test 1 - build an ARM E32 EXE on Linux
-## parameters relevant to the test.
-
-## Purpose: To demonstrate use of 1 call to a basic flm with one input file
-## Postconditions: test1.exe is written to the output directory $OUTPUTPATH/test1/test1.exe:
-
-# Pull tools
-include $(FLMHOME)/flmtools.mk
-
-
-$(call vsave,OUTPUTPATH SOURCEPATH CDEFS SYSTEMINCLUDE)
-# Pull in defaults for building test executables
-include $(FLMTESTHOME)/exeabiv2_defaults.mk
-
-TARGET:=exeabiv2_1
-CDEFS:=$(CDEFS) __TESTNAME__=\"exeabiv2_1\"
-OUTPUTPATH:=$(OUTPUTPATH)/$(TARGET)
-SOURCEPATH:=$(SOURCEPATH)/exeabiv2_1
-SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(FLMTESTHOME)/include
-SOURCEFILES:=$(SOURCEPATH)/test.cpp
-UID3:=0x000001
-
-
-include $(FLMHOME)/$(FLM)
-
-$(call vrestore)
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+##
+## Test 1 - build an ARM E32 EXE on Linux
+## parameters relevant to the test.
+
+## Purpose: To demonstrate use of 1 call to a basic flm with one input file
+## Postconditions: test1.exe is written to the output directory $OUTPUTPATH/test1/test1.exe:
+
+# Pull tools
+include $(FLMHOME)/flmtools.mk
+
+
+$(call vsave,OUTPUTPATH SOURCEPATH CDEFS SYSTEMINCLUDE)
+# Pull in defaults for building test executables
+include $(FLMTESTHOME)/exeabiv2_defaults.mk
+
+TARGET:=exeabiv2_1
+CDEFS:=$(CDEFS) __TESTNAME__=\"exeabiv2_1\"
+OUTPUTPATH:=$(OUTPUTPATH)/$(TARGET)
+SOURCEPATH:=$(SOURCEPATH)/exeabiv2_1
+SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(FLMTESTHOME)/include
+SOURCEFILES:=$(SOURCEPATH)/test.cpp
+UID3:=0x000001
+
+
+include $(FLMHOME)/$(FLM)
+
+$(call vrestore)
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/exeabiv2_1/test.cpp
--- a/sbsv2/raptor/lib/flm/test/exeabiv2_1/test.cpp	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/exeabiv2_1/test.cpp	Mon Nov 16 09:46:46 2009 +0000
@@ -1,24 +1,24 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-#include "e32def.h" // intentional  include
-
-char test[]=__TESTNAME__;
-
-TInt E32Main()
-{
-	return 0;
-}
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+#include "e32def.h" // intentional  include
+
+char test[]=__TESTNAME__;
+
+TInt E32Main()
+{
+	return 0;
+}
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/exeabiv2_2/exeabiv2_2.mk
--- a/sbsv2/raptor/lib/flm/test/exeabiv2_2/exeabiv2_2.mk	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/exeabiv2_2/exeabiv2_2.mk	Mon Nov 16 09:46:46 2009 +0000
@@ -1,47 +1,47 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-##
-## Test 1 - build an ARM E32 EXE on Linux
-## parameters relevant to the test.
-##
-
-
-## Purpose:
-## to demonstrate use of 1 call to a basic flm with two input files
-## postconditions:
-## test2.exe is written to the output directory $OUTPUTPATH/test2/test2.exe
-## test1.o and test2.o are generated in $OUTPUTPATH/test1/test1.o and $OUTPUTPATH/test2/test2.exe
-
-
-# Pull tools
-include $(FLMHOME)/flmtools.mk
-
-$(call vsave,OUTPUTPATH SOURCEPATH CDEFS SYSTEMINCLUDE)
-# Pull in defaults for building test executables
-include $(FLMTESTHOME)/exeabiv2_defaults.mk
-
-
-TARGET:=exeabiv2_2
-CDEFS:=$(CDEFS) __TESTNAME__=\"exeabiv2_2\"
-OUTPUTPATH:=$(OUTPUTPATH)/$(TARGET)
-SOURCEPATH:=$(SOURCEPATH)/exeabiv2_2
-SOURCEFILES:=$(SOURCEPATH)/test.cpp $(SOURCEPATH)/test_function.cpp
-SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(FLMTESTHOME)/include
-UID3:=0x000002
-
-include $(FLMHOME)/$(FLM)
-
-$(call vrestore)
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+##
+## Test 1 - build an ARM E32 EXE on Linux
+## parameters relevant to the test.
+##
+
+
+## Purpose:
+## to demonstrate use of 1 call to a basic flm with two input files
+## postconditions:
+## test2.exe is written to the output directory $OUTPUTPATH/test2/test2.exe
+## test1.o and test2.o are generated in $OUTPUTPATH/test1/test1.o and $OUTPUTPATH/test2/test2.exe
+
+
+# Pull tools
+include $(FLMHOME)/flmtools.mk
+
+$(call vsave,OUTPUTPATH SOURCEPATH CDEFS SYSTEMINCLUDE)
+# Pull in defaults for building test executables
+include $(FLMTESTHOME)/exeabiv2_defaults.mk
+
+
+TARGET:=exeabiv2_2
+CDEFS:=$(CDEFS) __TESTNAME__=\"exeabiv2_2\"
+OUTPUTPATH:=$(OUTPUTPATH)/$(TARGET)
+SOURCEPATH:=$(SOURCEPATH)/exeabiv2_2
+SOURCEFILES:=$(SOURCEPATH)/test.cpp $(SOURCEPATH)/test_function.cpp
+SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(FLMTESTHOME)/include
+UID3:=0x000002
+
+include $(FLMHOME)/$(FLM)
+
+$(call vrestore)
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/exeabiv2_2/test.cpp
--- a/sbsv2/raptor/lib/flm/test/exeabiv2_2/test.cpp	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/exeabiv2_2/test.cpp	Mon Nov 16 09:46:46 2009 +0000
@@ -1,27 +1,27 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include 
-
-int i=1;
-
-extern int function_in_test2(void);
-TInt E32Main(void)
-{
-	function_in_test2();
-	return 0;
-}
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include 
+
+int i=1;
+
+extern int function_in_test2(void);
+TInt E32Main(void)
+{
+	function_in_test2();
+	return 0;
+}
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/exeabiv2_2/test_function.cpp
--- a/sbsv2/raptor/lib/flm/test/exeabiv2_2/test_function.cpp	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/exeabiv2_2/test_function.cpp	Mon Nov 16 09:46:46 2009 +0000
@@ -1,27 +1,27 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-int function_in_test2(void)
-{
-	int x,y;
-	x=20+30* 10-1;
-	y=x*4;
-
-	x=y+1;
-
-	return 0;
-}
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+int function_in_test2(void)
+{
+	int x,y;
+	x=20+30* 10-1;
+	y=x*4;
+
+	x=y+1;
+
+	return 0;
+}
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/exeabiv2_3/exeabiv2_3.mk
--- a/sbsv2/raptor/lib/flm/test/exeabiv2_3/exeabiv2_3.mk	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/exeabiv2_3/exeabiv2_3.mk	Mon Nov 16 09:46:46 2009 +0000
@@ -1,46 +1,46 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-##
-## Test 1 - build an ARM E32 EXE on Linux
-## parameters relevant to the test.
-##
-
-
-## Purpose:
-## This is used to gauge perfomance 
-## At least one "large" input file is built
-## The input file has no dependencies so it really is just something for the compiler to "chew"
-
-
-# Pull tools
-include $(FLMHOME)/flmtools.mk
-
-$(call vsave,OUTPUTPATH SOURCEPATH CDEFS SYSTEMINCLUDE)
-# Pull in defaults for building test executables
-include $(FLMTESTHOME)/exeabiv2_defaults.mk
-
-
-TARGET:=exeabiv2_3
-CDEFS:=$(CDEFS) __TESTNAME__=\"exeabiv2_3\"
-OUTPUTPATH:=$(OUTPUTPATH)/$(TARGET)
-SOURCEPATH:=$(SOURCEPATH)/exeabiv2_3
-SOURCEFILES:=$(SOURCEPATH)/test.cpp $(SOURCEPATH)/test_big.cpp
-SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(FLMTESTHOME)/include
-UID3:=0x000003
-
-include $(FLMHOME)/$(FLM)
-
-$(call vrestore)
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+##
+## Test 1 - build an ARM E32 EXE on Linux
+## parameters relevant to the test.
+##
+
+
+## Purpose:
+## This is used to gauge perfomance 
+## At least one "large" input file is built
+## The input file has no dependencies so it really is just something for the compiler to "chew"
+
+
+# Pull tools
+include $(FLMHOME)/flmtools.mk
+
+$(call vsave,OUTPUTPATH SOURCEPATH CDEFS SYSTEMINCLUDE)
+# Pull in defaults for building test executables
+include $(FLMTESTHOME)/exeabiv2_defaults.mk
+
+
+TARGET:=exeabiv2_3
+CDEFS:=$(CDEFS) __TESTNAME__=\"exeabiv2_3\"
+OUTPUTPATH:=$(OUTPUTPATH)/$(TARGET)
+SOURCEPATH:=$(SOURCEPATH)/exeabiv2_3
+SOURCEFILES:=$(SOURCEPATH)/test.cpp $(SOURCEPATH)/test_big.cpp
+SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(FLMTESTHOME)/include
+UID3:=0x000003
+
+include $(FLMHOME)/$(FLM)
+
+$(call vrestore)
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/exeabiv2_3/test_big.cpp
--- a/sbsv2/raptor/lib/flm/test/exeabiv2_3/test_big.cpp	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/exeabiv2_3/test_big.cpp	Mon Nov 16 09:46:46 2009 +0000
@@ -1,2045 +1,2045 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-/* 
-This is jsut some "compiler fibre" for the compiler to chew
-on as part of a compilation performace test
-*/
-
-#define FUNC(VARIABLE)	\
-int function_##VARIABLE(void)	\
-{	\
-	int x,y,z;	\
-	x=VARIABLE+30* 10-1;	\
-	y=x*4;	\
-	\
-	\
-	x=y+1;	\
-	\
-	int a[VARIABLE];	\
-	\
-	\
-	\
-	for (z=0; z < 1000+VARIABLE; z++)	\
-	{	\
-		x+=a[z];		\
-	}	\
-	\
-	return x;	\
-}
-
-
-
-FUNC(1)
-FUNC(2)
-FUNC(3)
-FUNC(4)
-FUNC(5)
-FUNC(6)
-FUNC(7)
-FUNC(8)
-FUNC(9)
-FUNC(10)
-FUNC(11)
-FUNC(12)
-FUNC(13)
-FUNC(14)
-FUNC(15)
-FUNC(16)
-FUNC(17)
-FUNC(18)
-FUNC(19)
-FUNC(20)
-FUNC(21)
-FUNC(22)
-FUNC(23)
-FUNC(24)
-FUNC(25)
-FUNC(26)
-FUNC(27)
-FUNC(28)
-FUNC(29)
-FUNC(30)
-FUNC(31)
-FUNC(32)
-FUNC(33)
-FUNC(34)
-FUNC(35)
-FUNC(36)
-FUNC(37)
-FUNC(38)
-FUNC(39)
-FUNC(40)
-FUNC(41)
-FUNC(42)
-FUNC(43)
-FUNC(44)
-FUNC(45)
-FUNC(46)
-FUNC(47)
-FUNC(48)
-FUNC(49)
-FUNC(50)
-FUNC(51)
-FUNC(52)
-FUNC(53)
-FUNC(54)
-FUNC(55)
-FUNC(56)
-FUNC(57)
-FUNC(58)
-FUNC(59)
-FUNC(60)
-FUNC(61)
-FUNC(62)
-FUNC(63)
-FUNC(64)
-FUNC(65)
-FUNC(66)
-FUNC(67)
-FUNC(68)
-FUNC(69)
-FUNC(70)
-FUNC(71)
-FUNC(72)
-FUNC(73)
-FUNC(74)
-FUNC(75)
-FUNC(76)
-FUNC(77)
-FUNC(78)
-FUNC(79)
-FUNC(80)
-FUNC(81)
-FUNC(82)
-FUNC(83)
-FUNC(84)
-FUNC(85)
-FUNC(86)
-FUNC(87)
-FUNC(88)
-FUNC(89)
-FUNC(90)
-FUNC(91)
-FUNC(92)
-FUNC(93)
-FUNC(94)
-FUNC(95)
-FUNC(96)
-FUNC(97)
-FUNC(98)
-FUNC(99)
-FUNC(100)
-FUNC(101)
-FUNC(102)
-FUNC(103)
-FUNC(104)
-FUNC(105)
-FUNC(106)
-FUNC(107)
-FUNC(108)
-FUNC(109)
-FUNC(110)
-FUNC(111)
-FUNC(112)
-FUNC(113)
-FUNC(114)
-FUNC(115)
-FUNC(116)
-FUNC(117)
-FUNC(118)
-FUNC(119)
-FUNC(120)
-FUNC(121)
-FUNC(122)
-FUNC(123)
-FUNC(124)
-FUNC(125)
-FUNC(126)
-FUNC(127)
-FUNC(128)
-FUNC(129)
-FUNC(130)
-FUNC(131)
-FUNC(132)
-FUNC(133)
-FUNC(134)
-FUNC(135)
-FUNC(136)
-FUNC(137)
-FUNC(138)
-FUNC(139)
-FUNC(140)
-FUNC(141)
-FUNC(142)
-FUNC(143)
-FUNC(144)
-FUNC(145)
-FUNC(146)
-FUNC(147)
-FUNC(148)
-FUNC(149)
-FUNC(150)
-FUNC(151)
-FUNC(152)
-FUNC(153)
-FUNC(154)
-FUNC(155)
-FUNC(156)
-FUNC(157)
-FUNC(158)
-FUNC(159)
-FUNC(160)
-FUNC(161)
-FUNC(162)
-FUNC(163)
-FUNC(164)
-FUNC(165)
-FUNC(166)
-FUNC(167)
-FUNC(168)
-FUNC(169)
-FUNC(170)
-FUNC(171)
-FUNC(172)
-FUNC(173)
-FUNC(174)
-FUNC(175)
-FUNC(176)
-FUNC(177)
-FUNC(178)
-FUNC(179)
-FUNC(180)
-FUNC(181)
-FUNC(182)
-FUNC(183)
-FUNC(184)
-FUNC(185)
-FUNC(186)
-FUNC(187)
-FUNC(188)
-FUNC(189)
-FUNC(190)
-FUNC(191)
-FUNC(192)
-FUNC(193)
-FUNC(194)
-FUNC(195)
-FUNC(196)
-FUNC(197)
-FUNC(198)
-FUNC(199)
-FUNC(200)
-FUNC(201)
-FUNC(202)
-FUNC(203)
-FUNC(204)
-FUNC(205)
-FUNC(206)
-FUNC(207)
-FUNC(208)
-FUNC(209)
-FUNC(210)
-FUNC(211)
-FUNC(212)
-FUNC(213)
-FUNC(214)
-FUNC(215)
-FUNC(216)
-FUNC(217)
-FUNC(218)
-FUNC(219)
-FUNC(220)
-FUNC(221)
-FUNC(222)
-FUNC(223)
-FUNC(224)
-FUNC(225)
-FUNC(226)
-FUNC(227)
-FUNC(228)
-FUNC(229)
-FUNC(230)
-FUNC(231)
-FUNC(232)
-FUNC(233)
-FUNC(234)
-FUNC(235)
-FUNC(236)
-FUNC(237)
-FUNC(238)
-FUNC(239)
-FUNC(240)
-FUNC(241)
-FUNC(242)
-FUNC(243)
-FUNC(244)
-FUNC(245)
-FUNC(246)
-FUNC(247)
-FUNC(248)
-FUNC(249)
-FUNC(250)
-FUNC(251)
-FUNC(252)
-FUNC(253)
-FUNC(254)
-FUNC(255)
-FUNC(256)
-FUNC(257)
-FUNC(258)
-FUNC(259)
-FUNC(260)
-FUNC(261)
-FUNC(262)
-FUNC(263)
-FUNC(264)
-FUNC(265)
-FUNC(266)
-FUNC(267)
-FUNC(268)
-FUNC(269)
-FUNC(270)
-FUNC(271)
-FUNC(272)
-FUNC(273)
-FUNC(274)
-FUNC(275)
-FUNC(276)
-FUNC(277)
-FUNC(278)
-FUNC(279)
-FUNC(280)
-FUNC(281)
-FUNC(282)
-FUNC(283)
-FUNC(284)
-FUNC(285)
-FUNC(286)
-FUNC(287)
-FUNC(288)
-FUNC(289)
-FUNC(290)
-FUNC(291)
-FUNC(292)
-FUNC(293)
-FUNC(294)
-FUNC(295)
-FUNC(296)
-FUNC(297)
-FUNC(298)
-FUNC(299)
-FUNC(300)
-FUNC(301)
-FUNC(302)
-FUNC(303)
-FUNC(304)
-FUNC(305)
-FUNC(306)
-FUNC(307)
-FUNC(308)
-FUNC(309)
-FUNC(310)
-FUNC(311)
-FUNC(312)
-FUNC(313)
-FUNC(314)
-FUNC(315)
-FUNC(316)
-FUNC(317)
-FUNC(318)
-FUNC(319)
-FUNC(320)
-FUNC(321)
-FUNC(322)
-FUNC(323)
-FUNC(324)
-FUNC(325)
-FUNC(326)
-FUNC(327)
-FUNC(328)
-FUNC(329)
-FUNC(330)
-FUNC(331)
-FUNC(332)
-FUNC(333)
-FUNC(334)
-FUNC(335)
-FUNC(336)
-FUNC(337)
-FUNC(338)
-FUNC(339)
-FUNC(340)
-FUNC(341)
-FUNC(342)
-FUNC(343)
-FUNC(344)
-FUNC(345)
-FUNC(346)
-FUNC(347)
-FUNC(348)
-FUNC(349)
-FUNC(350)
-FUNC(351)
-FUNC(352)
-FUNC(353)
-FUNC(354)
-FUNC(355)
-FUNC(356)
-FUNC(357)
-FUNC(358)
-FUNC(359)
-FUNC(360)
-FUNC(361)
-FUNC(362)
-FUNC(363)
-FUNC(364)
-FUNC(365)
-FUNC(366)
-FUNC(367)
-FUNC(368)
-FUNC(369)
-FUNC(370)
-FUNC(371)
-FUNC(372)
-FUNC(373)
-FUNC(374)
-FUNC(375)
-FUNC(376)
-FUNC(377)
-FUNC(378)
-FUNC(379)
-FUNC(380)
-FUNC(381)
-FUNC(382)
-FUNC(383)
-FUNC(384)
-FUNC(385)
-FUNC(386)
-FUNC(387)
-FUNC(388)
-FUNC(389)
-FUNC(390)
-FUNC(391)
-FUNC(392)
-FUNC(393)
-FUNC(394)
-FUNC(395)
-FUNC(396)
-FUNC(397)
-FUNC(398)
-FUNC(399)
-FUNC(400)
-FUNC(401)
-FUNC(402)
-FUNC(403)
-FUNC(404)
-FUNC(405)
-FUNC(406)
-FUNC(407)
-FUNC(408)
-FUNC(409)
-FUNC(410)
-FUNC(411)
-FUNC(412)
-FUNC(413)
-FUNC(414)
-FUNC(415)
-FUNC(416)
-FUNC(417)
-FUNC(418)
-FUNC(419)
-FUNC(420)
-FUNC(421)
-FUNC(422)
-FUNC(423)
-FUNC(424)
-FUNC(425)
-FUNC(426)
-FUNC(427)
-FUNC(428)
-FUNC(429)
-FUNC(430)
-FUNC(431)
-FUNC(432)
-FUNC(433)
-FUNC(434)
-FUNC(435)
-FUNC(436)
-FUNC(437)
-FUNC(438)
-FUNC(439)
-FUNC(440)
-FUNC(441)
-FUNC(442)
-FUNC(443)
-FUNC(444)
-FUNC(445)
-FUNC(446)
-FUNC(447)
-FUNC(448)
-FUNC(449)
-FUNC(450)
-FUNC(451)
-FUNC(452)
-FUNC(453)
-FUNC(454)
-FUNC(455)
-FUNC(456)
-FUNC(457)
-FUNC(458)
-FUNC(459)
-FUNC(460)
-FUNC(461)
-FUNC(462)
-FUNC(463)
-FUNC(464)
-FUNC(465)
-FUNC(466)
-FUNC(467)
-FUNC(468)
-FUNC(469)
-FUNC(470)
-FUNC(471)
-FUNC(472)
-FUNC(473)
-FUNC(474)
-FUNC(475)
-FUNC(476)
-FUNC(477)
-FUNC(478)
-FUNC(479)
-FUNC(480)
-FUNC(481)
-FUNC(482)
-FUNC(483)
-FUNC(484)
-FUNC(485)
-FUNC(486)
-FUNC(487)
-FUNC(488)
-FUNC(489)
-FUNC(490)
-FUNC(491)
-FUNC(492)
-FUNC(493)
-FUNC(494)
-FUNC(495)
-FUNC(496)
-FUNC(497)
-FUNC(498)
-FUNC(499)
-FUNC(500)
-FUNC(501)
-FUNC(502)
-FUNC(503)
-FUNC(504)
-FUNC(505)
-FUNC(506)
-FUNC(507)
-FUNC(508)
-FUNC(509)
-FUNC(510)
-FUNC(511)
-FUNC(512)
-FUNC(513)
-FUNC(514)
-FUNC(515)
-FUNC(516)
-FUNC(517)
-FUNC(518)
-FUNC(519)
-FUNC(520)
-FUNC(521)
-FUNC(522)
-FUNC(523)
-FUNC(524)
-FUNC(525)
-FUNC(526)
-FUNC(527)
-FUNC(528)
-FUNC(529)
-FUNC(530)
-FUNC(531)
-FUNC(532)
-FUNC(533)
-FUNC(534)
-FUNC(535)
-FUNC(536)
-FUNC(537)
-FUNC(538)
-FUNC(539)
-FUNC(540)
-FUNC(541)
-FUNC(542)
-FUNC(543)
-FUNC(544)
-FUNC(545)
-FUNC(546)
-FUNC(547)
-FUNC(548)
-FUNC(549)
-FUNC(550)
-FUNC(551)
-FUNC(552)
-FUNC(553)
-FUNC(554)
-FUNC(555)
-FUNC(556)
-FUNC(557)
-FUNC(558)
-FUNC(559)
-FUNC(560)
-FUNC(561)
-FUNC(562)
-FUNC(563)
-FUNC(564)
-FUNC(565)
-FUNC(566)
-FUNC(567)
-FUNC(568)
-FUNC(569)
-FUNC(570)
-FUNC(571)
-FUNC(572)
-FUNC(573)
-FUNC(574)
-FUNC(575)
-FUNC(576)
-FUNC(577)
-FUNC(578)
-FUNC(579)
-FUNC(580)
-FUNC(581)
-FUNC(582)
-FUNC(583)
-FUNC(584)
-FUNC(585)
-FUNC(586)
-FUNC(587)
-FUNC(588)
-FUNC(589)
-FUNC(590)
-FUNC(591)
-FUNC(592)
-FUNC(593)
-FUNC(594)
-FUNC(595)
-FUNC(596)
-FUNC(597)
-FUNC(598)
-FUNC(599)
-FUNC(600)
-FUNC(601)
-FUNC(602)
-FUNC(603)
-FUNC(604)
-FUNC(605)
-FUNC(606)
-FUNC(607)
-FUNC(608)
-FUNC(609)
-FUNC(610)
-FUNC(611)
-FUNC(612)
-FUNC(613)
-FUNC(614)
-FUNC(615)
-FUNC(616)
-FUNC(617)
-FUNC(618)
-FUNC(619)
-FUNC(620)
-FUNC(621)
-FUNC(622)
-FUNC(623)
-FUNC(624)
-FUNC(625)
-FUNC(626)
-FUNC(627)
-FUNC(628)
-FUNC(629)
-FUNC(630)
-FUNC(631)
-FUNC(632)
-FUNC(633)
-FUNC(634)
-FUNC(635)
-FUNC(636)
-FUNC(637)
-FUNC(638)
-FUNC(639)
-FUNC(640)
-FUNC(641)
-FUNC(642)
-FUNC(643)
-FUNC(644)
-FUNC(645)
-FUNC(646)
-FUNC(647)
-FUNC(648)
-FUNC(649)
-FUNC(650)
-FUNC(651)
-FUNC(652)
-FUNC(653)
-FUNC(654)
-FUNC(655)
-FUNC(656)
-FUNC(657)
-FUNC(658)
-FUNC(659)
-FUNC(660)
-FUNC(661)
-FUNC(662)
-FUNC(663)
-FUNC(664)
-FUNC(665)
-FUNC(666)
-FUNC(667)
-FUNC(668)
-FUNC(669)
-FUNC(670)
-FUNC(671)
-FUNC(672)
-FUNC(673)
-FUNC(674)
-FUNC(675)
-FUNC(676)
-FUNC(677)
-FUNC(678)
-FUNC(679)
-FUNC(680)
-FUNC(681)
-FUNC(682)
-FUNC(683)
-FUNC(684)
-FUNC(685)
-FUNC(686)
-FUNC(687)
-FUNC(688)
-FUNC(689)
-FUNC(690)
-FUNC(691)
-FUNC(692)
-FUNC(693)
-FUNC(694)
-FUNC(695)
-FUNC(696)
-FUNC(697)
-FUNC(698)
-FUNC(699)
-FUNC(700)
-FUNC(701)
-FUNC(702)
-FUNC(703)
-FUNC(704)
-FUNC(705)
-FUNC(706)
-FUNC(707)
-FUNC(708)
-FUNC(709)
-FUNC(710)
-FUNC(711)
-FUNC(712)
-FUNC(713)
-FUNC(714)
-FUNC(715)
-FUNC(716)
-FUNC(717)
-FUNC(718)
-FUNC(719)
-FUNC(720)
-FUNC(721)
-FUNC(722)
-FUNC(723)
-FUNC(724)
-FUNC(725)
-FUNC(726)
-FUNC(727)
-FUNC(728)
-FUNC(729)
-FUNC(730)
-FUNC(731)
-FUNC(732)
-FUNC(733)
-FUNC(734)
-FUNC(735)
-FUNC(736)
-FUNC(737)
-FUNC(738)
-FUNC(739)
-FUNC(740)
-FUNC(741)
-FUNC(742)
-FUNC(743)
-FUNC(744)
-FUNC(745)
-FUNC(746)
-FUNC(747)
-FUNC(748)
-FUNC(749)
-FUNC(750)
-FUNC(751)
-FUNC(752)
-FUNC(753)
-FUNC(754)
-FUNC(755)
-FUNC(756)
-FUNC(757)
-FUNC(758)
-FUNC(759)
-FUNC(760)
-FUNC(761)
-FUNC(762)
-FUNC(763)
-FUNC(764)
-FUNC(765)
-FUNC(766)
-FUNC(767)
-FUNC(768)
-FUNC(769)
-FUNC(770)
-FUNC(771)
-FUNC(772)
-FUNC(773)
-FUNC(774)
-FUNC(775)
-FUNC(776)
-FUNC(777)
-FUNC(778)
-FUNC(779)
-FUNC(780)
-FUNC(781)
-FUNC(782)
-FUNC(783)
-FUNC(784)
-FUNC(785)
-FUNC(786)
-FUNC(787)
-FUNC(788)
-FUNC(789)
-FUNC(790)
-FUNC(791)
-FUNC(792)
-FUNC(793)
-FUNC(794)
-FUNC(795)
-FUNC(796)
-FUNC(797)
-FUNC(798)
-FUNC(799)
-FUNC(800)
-FUNC(801)
-FUNC(802)
-FUNC(803)
-FUNC(804)
-FUNC(805)
-FUNC(806)
-FUNC(807)
-FUNC(808)
-FUNC(809)
-FUNC(810)
-FUNC(811)
-FUNC(812)
-FUNC(813)
-FUNC(814)
-FUNC(815)
-FUNC(816)
-FUNC(817)
-FUNC(818)
-FUNC(819)
-FUNC(820)
-FUNC(821)
-FUNC(822)
-FUNC(823)
-FUNC(824)
-FUNC(825)
-FUNC(826)
-FUNC(827)
-FUNC(828)
-FUNC(829)
-FUNC(830)
-FUNC(831)
-FUNC(832)
-FUNC(833)
-FUNC(834)
-FUNC(835)
-FUNC(836)
-FUNC(837)
-FUNC(838)
-FUNC(839)
-FUNC(840)
-FUNC(841)
-FUNC(842)
-FUNC(843)
-FUNC(844)
-FUNC(845)
-FUNC(846)
-FUNC(847)
-FUNC(848)
-FUNC(849)
-FUNC(850)
-FUNC(851)
-FUNC(852)
-FUNC(853)
-FUNC(854)
-FUNC(855)
-FUNC(856)
-FUNC(857)
-FUNC(858)
-FUNC(859)
-FUNC(860)
-FUNC(861)
-FUNC(862)
-FUNC(863)
-FUNC(864)
-FUNC(865)
-FUNC(866)
-FUNC(867)
-FUNC(868)
-FUNC(869)
-FUNC(870)
-FUNC(871)
-FUNC(872)
-FUNC(873)
-FUNC(874)
-FUNC(875)
-FUNC(876)
-FUNC(877)
-FUNC(878)
-FUNC(879)
-FUNC(880)
-FUNC(881)
-FUNC(882)
-FUNC(883)
-FUNC(884)
-FUNC(885)
-FUNC(886)
-FUNC(887)
-FUNC(888)
-FUNC(889)
-FUNC(890)
-FUNC(891)
-FUNC(892)
-FUNC(893)
-FUNC(894)
-FUNC(895)
-FUNC(896)
-FUNC(897)
-FUNC(898)
-FUNC(899)
-FUNC(900)
-FUNC(901)
-FUNC(902)
-FUNC(903)
-FUNC(904)
-FUNC(905)
-FUNC(906)
-FUNC(907)
-FUNC(908)
-FUNC(909)
-FUNC(910)
-FUNC(911)
-FUNC(912)
-FUNC(913)
-FUNC(914)
-FUNC(915)
-FUNC(916)
-FUNC(917)
-FUNC(918)
-FUNC(919)
-FUNC(920)
-FUNC(921)
-FUNC(922)
-FUNC(923)
-FUNC(924)
-FUNC(925)
-FUNC(926)
-FUNC(927)
-FUNC(928)
-FUNC(929)
-FUNC(930)
-FUNC(931)
-FUNC(932)
-FUNC(933)
-FUNC(934)
-FUNC(935)
-FUNC(936)
-FUNC(937)
-FUNC(938)
-FUNC(939)
-FUNC(940)
-FUNC(941)
-FUNC(942)
-FUNC(943)
-FUNC(944)
-FUNC(945)
-FUNC(946)
-FUNC(947)
-FUNC(948)
-FUNC(949)
-FUNC(950)
-FUNC(951)
-FUNC(952)
-FUNC(953)
-FUNC(954)
-FUNC(955)
-FUNC(956)
-FUNC(957)
-FUNC(958)
-FUNC(959)
-FUNC(960)
-FUNC(961)
-FUNC(962)
-FUNC(963)
-FUNC(964)
-FUNC(965)
-FUNC(966)
-FUNC(967)
-FUNC(968)
-FUNC(969)
-FUNC(970)
-FUNC(971)
-FUNC(972)
-FUNC(973)
-FUNC(974)
-FUNC(975)
-FUNC(976)
-FUNC(977)
-FUNC(978)
-FUNC(979)
-FUNC(980)
-FUNC(981)
-FUNC(982)
-FUNC(983)
-FUNC(984)
-FUNC(985)
-FUNC(986)
-FUNC(987)
-FUNC(988)
-FUNC(989)
-FUNC(990)
-FUNC(991)
-FUNC(992)
-FUNC(993)
-FUNC(994)
-FUNC(995)
-FUNC(996)
-FUNC(997)
-FUNC(998)
-FUNC(999)
-FUNC(1000)
-FUNC(1001)
-FUNC(1002)
-FUNC(1003)
-FUNC(1004)
-FUNC(1005)
-FUNC(1006)
-FUNC(1007)
-FUNC(1008)
-FUNC(1009)
-FUNC(1010)
-FUNC(1011)
-FUNC(1012)
-FUNC(1013)
-FUNC(1014)
-FUNC(1015)
-FUNC(1016)
-FUNC(1017)
-FUNC(1018)
-FUNC(1019)
-FUNC(1020)
-FUNC(1021)
-FUNC(1022)
-FUNC(1023)
-FUNC(1024)
-FUNC(1025)
-FUNC(1026)
-FUNC(1027)
-FUNC(1028)
-FUNC(1029)
-FUNC(1030)
-FUNC(1031)
-FUNC(1032)
-FUNC(1033)
-FUNC(1034)
-FUNC(1035)
-FUNC(1036)
-FUNC(1037)
-FUNC(1038)
-FUNC(1039)
-FUNC(1040)
-FUNC(1041)
-FUNC(1042)
-FUNC(1043)
-FUNC(1044)
-FUNC(1045)
-FUNC(1046)
-FUNC(1047)
-FUNC(1048)
-FUNC(1049)
-FUNC(1050)
-FUNC(1051)
-FUNC(1052)
-FUNC(1053)
-FUNC(1054)
-FUNC(1055)
-FUNC(1056)
-FUNC(1057)
-FUNC(1058)
-FUNC(1059)
-FUNC(1060)
-FUNC(1061)
-FUNC(1062)
-FUNC(1063)
-FUNC(1064)
-FUNC(1065)
-FUNC(1066)
-FUNC(1067)
-FUNC(1068)
-FUNC(1069)
-FUNC(1070)
-FUNC(1071)
-FUNC(1072)
-FUNC(1073)
-FUNC(1074)
-FUNC(1075)
-FUNC(1076)
-FUNC(1077)
-FUNC(1078)
-FUNC(1079)
-FUNC(1080)
-FUNC(1081)
-FUNC(1082)
-FUNC(1083)
-FUNC(1084)
-FUNC(1085)
-FUNC(1086)
-FUNC(1087)
-FUNC(1088)
-FUNC(1089)
-FUNC(1090)
-FUNC(1091)
-FUNC(1092)
-FUNC(1093)
-FUNC(1094)
-FUNC(1095)
-FUNC(1096)
-FUNC(1097)
-FUNC(1098)
-FUNC(1099)
-FUNC(1100)
-FUNC(1101)
-FUNC(1102)
-FUNC(1103)
-FUNC(1104)
-FUNC(1105)
-FUNC(1106)
-FUNC(1107)
-FUNC(1108)
-FUNC(1109)
-FUNC(1110)
-FUNC(1111)
-FUNC(1112)
-FUNC(1113)
-FUNC(1114)
-FUNC(1115)
-FUNC(1116)
-FUNC(1117)
-FUNC(1118)
-FUNC(1119)
-FUNC(1120)
-FUNC(1121)
-FUNC(1122)
-FUNC(1123)
-FUNC(1124)
-FUNC(1125)
-FUNC(1126)
-FUNC(1127)
-FUNC(1128)
-FUNC(1129)
-FUNC(1130)
-FUNC(1131)
-FUNC(1132)
-FUNC(1133)
-FUNC(1134)
-FUNC(1135)
-FUNC(1136)
-FUNC(1137)
-FUNC(1138)
-FUNC(1139)
-FUNC(1140)
-FUNC(1141)
-FUNC(1142)
-FUNC(1143)
-FUNC(1144)
-FUNC(1145)
-FUNC(1146)
-FUNC(1147)
-FUNC(1148)
-FUNC(1149)
-FUNC(1150)
-FUNC(1151)
-FUNC(1152)
-FUNC(1153)
-FUNC(1154)
-FUNC(1155)
-FUNC(1156)
-FUNC(1157)
-FUNC(1158)
-FUNC(1159)
-FUNC(1160)
-FUNC(1161)
-FUNC(1162)
-FUNC(1163)
-FUNC(1164)
-FUNC(1165)
-FUNC(1166)
-FUNC(1167)
-FUNC(1168)
-FUNC(1169)
-FUNC(1170)
-FUNC(1171)
-FUNC(1172)
-FUNC(1173)
-FUNC(1174)
-FUNC(1175)
-FUNC(1176)
-FUNC(1177)
-FUNC(1178)
-FUNC(1179)
-FUNC(1180)
-FUNC(1181)
-FUNC(1182)
-FUNC(1183)
-FUNC(1184)
-FUNC(1185)
-FUNC(1186)
-FUNC(1187)
-FUNC(1188)
-FUNC(1189)
-FUNC(1190)
-FUNC(1191)
-FUNC(1192)
-FUNC(1193)
-FUNC(1194)
-FUNC(1195)
-FUNC(1196)
-FUNC(1197)
-FUNC(1198)
-FUNC(1199)
-FUNC(1200)
-FUNC(1201)
-FUNC(1202)
-FUNC(1203)
-FUNC(1204)
-FUNC(1205)
-FUNC(1206)
-FUNC(1207)
-FUNC(1208)
-FUNC(1209)
-FUNC(1210)
-FUNC(1211)
-FUNC(1212)
-FUNC(1213)
-FUNC(1214)
-FUNC(1215)
-FUNC(1216)
-FUNC(1217)
-FUNC(1218)
-FUNC(1219)
-FUNC(1220)
-FUNC(1221)
-FUNC(1222)
-FUNC(1223)
-FUNC(1224)
-FUNC(1225)
-FUNC(1226)
-FUNC(1227)
-FUNC(1228)
-FUNC(1229)
-FUNC(1230)
-FUNC(1231)
-FUNC(1232)
-FUNC(1233)
-FUNC(1234)
-FUNC(1235)
-FUNC(1236)
-FUNC(1237)
-FUNC(1238)
-FUNC(1239)
-FUNC(1240)
-FUNC(1241)
-FUNC(1242)
-FUNC(1243)
-FUNC(1244)
-FUNC(1245)
-FUNC(1246)
-FUNC(1247)
-FUNC(1248)
-FUNC(1249)
-FUNC(1250)
-FUNC(1251)
-FUNC(1252)
-FUNC(1253)
-FUNC(1254)
-FUNC(1255)
-FUNC(1256)
-FUNC(1257)
-FUNC(1258)
-FUNC(1259)
-FUNC(1260)
-FUNC(1261)
-FUNC(1262)
-FUNC(1263)
-FUNC(1264)
-FUNC(1265)
-FUNC(1266)
-FUNC(1267)
-FUNC(1268)
-FUNC(1269)
-FUNC(1270)
-FUNC(1271)
-FUNC(1272)
-FUNC(1273)
-FUNC(1274)
-FUNC(1275)
-FUNC(1276)
-FUNC(1277)
-FUNC(1278)
-FUNC(1279)
-FUNC(1280)
-FUNC(1281)
-FUNC(1282)
-FUNC(1283)
-FUNC(1284)
-FUNC(1285)
-FUNC(1286)
-FUNC(1287)
-FUNC(1288)
-FUNC(1289)
-FUNC(1290)
-FUNC(1291)
-FUNC(1292)
-FUNC(1293)
-FUNC(1294)
-FUNC(1295)
-FUNC(1296)
-FUNC(1297)
-FUNC(1298)
-FUNC(1299)
-FUNC(1300)
-FUNC(1301)
-FUNC(1302)
-FUNC(1303)
-FUNC(1304)
-FUNC(1305)
-FUNC(1306)
-FUNC(1307)
-FUNC(1308)
-FUNC(1309)
-FUNC(1310)
-FUNC(1311)
-FUNC(1312)
-FUNC(1313)
-FUNC(1314)
-FUNC(1315)
-FUNC(1316)
-FUNC(1317)
-FUNC(1318)
-FUNC(1319)
-FUNC(1320)
-FUNC(1321)
-FUNC(1322)
-FUNC(1323)
-FUNC(1324)
-FUNC(1325)
-FUNC(1326)
-FUNC(1327)
-FUNC(1328)
-FUNC(1329)
-FUNC(1330)
-FUNC(1331)
-FUNC(1332)
-FUNC(1333)
-FUNC(1334)
-FUNC(1335)
-FUNC(1336)
-FUNC(1337)
-FUNC(1338)
-FUNC(1339)
-FUNC(1340)
-FUNC(1341)
-FUNC(1342)
-FUNC(1343)
-FUNC(1344)
-FUNC(1345)
-FUNC(1346)
-FUNC(1347)
-FUNC(1348)
-FUNC(1349)
-FUNC(1350)
-FUNC(1351)
-FUNC(1352)
-FUNC(1353)
-FUNC(1354)
-FUNC(1355)
-FUNC(1356)
-FUNC(1357)
-FUNC(1358)
-FUNC(1359)
-FUNC(1360)
-FUNC(1361)
-FUNC(1362)
-FUNC(1363)
-FUNC(1364)
-FUNC(1365)
-FUNC(1366)
-FUNC(1367)
-FUNC(1368)
-FUNC(1369)
-FUNC(1370)
-FUNC(1371)
-FUNC(1372)
-FUNC(1373)
-FUNC(1374)
-FUNC(1375)
-FUNC(1376)
-FUNC(1377)
-FUNC(1378)
-FUNC(1379)
-FUNC(1380)
-FUNC(1381)
-FUNC(1382)
-FUNC(1383)
-FUNC(1384)
-FUNC(1385)
-FUNC(1386)
-FUNC(1387)
-FUNC(1388)
-FUNC(1389)
-FUNC(1390)
-FUNC(1391)
-FUNC(1392)
-FUNC(1393)
-FUNC(1394)
-FUNC(1395)
-FUNC(1396)
-FUNC(1397)
-FUNC(1398)
-FUNC(1399)
-FUNC(1400)
-FUNC(1401)
-FUNC(1402)
-FUNC(1403)
-FUNC(1404)
-FUNC(1405)
-FUNC(1406)
-FUNC(1407)
-FUNC(1408)
-FUNC(1409)
-FUNC(1410)
-FUNC(1411)
-FUNC(1412)
-FUNC(1413)
-FUNC(1414)
-FUNC(1415)
-FUNC(1416)
-FUNC(1417)
-FUNC(1418)
-FUNC(1419)
-FUNC(1420)
-FUNC(1421)
-FUNC(1422)
-FUNC(1423)
-FUNC(1424)
-FUNC(1425)
-FUNC(1426)
-FUNC(1427)
-FUNC(1428)
-FUNC(1429)
-FUNC(1430)
-FUNC(1431)
-FUNC(1432)
-FUNC(1433)
-FUNC(1434)
-FUNC(1435)
-FUNC(1436)
-FUNC(1437)
-FUNC(1438)
-FUNC(1439)
-FUNC(1440)
-FUNC(1441)
-FUNC(1442)
-FUNC(1443)
-FUNC(1444)
-FUNC(1445)
-FUNC(1446)
-FUNC(1447)
-FUNC(1448)
-FUNC(1449)
-FUNC(1450)
-FUNC(1451)
-FUNC(1452)
-FUNC(1453)
-FUNC(1454)
-FUNC(1455)
-FUNC(1456)
-FUNC(1457)
-FUNC(1458)
-FUNC(1459)
-FUNC(1460)
-FUNC(1461)
-FUNC(1462)
-FUNC(1463)
-FUNC(1464)
-FUNC(1465)
-FUNC(1466)
-FUNC(1467)
-FUNC(1468)
-FUNC(1469)
-FUNC(1470)
-FUNC(1471)
-FUNC(1472)
-FUNC(1473)
-FUNC(1474)
-FUNC(1475)
-FUNC(1476)
-FUNC(1477)
-FUNC(1478)
-FUNC(1479)
-FUNC(1480)
-FUNC(1481)
-FUNC(1482)
-FUNC(1483)
-FUNC(1484)
-FUNC(1485)
-FUNC(1486)
-FUNC(1487)
-FUNC(1488)
-FUNC(1489)
-FUNC(1490)
-FUNC(1491)
-FUNC(1492)
-FUNC(1493)
-FUNC(1494)
-FUNC(1495)
-FUNC(1496)
-FUNC(1497)
-FUNC(1498)
-FUNC(1499)
-FUNC(1500)
-FUNC(1501)
-FUNC(1502)
-FUNC(1503)
-FUNC(1504)
-FUNC(1505)
-FUNC(1506)
-FUNC(1507)
-FUNC(1508)
-FUNC(1509)
-FUNC(1510)
-FUNC(1511)
-FUNC(1512)
-FUNC(1513)
-FUNC(1514)
-FUNC(1515)
-FUNC(1516)
-FUNC(1517)
-FUNC(1518)
-FUNC(1519)
-FUNC(1520)
-FUNC(1521)
-FUNC(1522)
-FUNC(1523)
-FUNC(1524)
-FUNC(1525)
-FUNC(1526)
-FUNC(1527)
-FUNC(1528)
-FUNC(1529)
-FUNC(1530)
-FUNC(1531)
-FUNC(1532)
-FUNC(1533)
-FUNC(1534)
-FUNC(1535)
-FUNC(1536)
-FUNC(1537)
-FUNC(1538)
-FUNC(1539)
-FUNC(1540)
-FUNC(1541)
-FUNC(1542)
-FUNC(1543)
-FUNC(1544)
-FUNC(1545)
-FUNC(1546)
-FUNC(1547)
-FUNC(1548)
-FUNC(1549)
-FUNC(1550)
-FUNC(1551)
-FUNC(1552)
-FUNC(1553)
-FUNC(1554)
-FUNC(1555)
-FUNC(1556)
-FUNC(1557)
-FUNC(1558)
-FUNC(1559)
-FUNC(1560)
-FUNC(1561)
-FUNC(1562)
-FUNC(1563)
-FUNC(1564)
-FUNC(1565)
-FUNC(1566)
-FUNC(1567)
-FUNC(1568)
-FUNC(1569)
-FUNC(1570)
-FUNC(1571)
-FUNC(1572)
-FUNC(1573)
-FUNC(1574)
-FUNC(1575)
-FUNC(1576)
-FUNC(1577)
-FUNC(1578)
-FUNC(1579)
-FUNC(1580)
-FUNC(1581)
-FUNC(1582)
-FUNC(1583)
-FUNC(1584)
-FUNC(1585)
-FUNC(1586)
-FUNC(1587)
-FUNC(1588)
-FUNC(1589)
-FUNC(1590)
-FUNC(1591)
-FUNC(1592)
-FUNC(1593)
-FUNC(1594)
-FUNC(1595)
-FUNC(1596)
-FUNC(1597)
-FUNC(1598)
-FUNC(1599)
-FUNC(1600)
-FUNC(1601)
-FUNC(1602)
-FUNC(1603)
-FUNC(1604)
-FUNC(1605)
-FUNC(1606)
-FUNC(1607)
-FUNC(1608)
-FUNC(1609)
-FUNC(1610)
-FUNC(1611)
-FUNC(1612)
-FUNC(1613)
-FUNC(1614)
-FUNC(1615)
-FUNC(1616)
-FUNC(1617)
-FUNC(1618)
-FUNC(1619)
-FUNC(1620)
-FUNC(1621)
-FUNC(1622)
-FUNC(1623)
-FUNC(1624)
-FUNC(1625)
-FUNC(1626)
-FUNC(1627)
-FUNC(1628)
-FUNC(1629)
-FUNC(1630)
-FUNC(1631)
-FUNC(1632)
-FUNC(1633)
-FUNC(1634)
-FUNC(1635)
-FUNC(1636)
-FUNC(1637)
-FUNC(1638)
-FUNC(1639)
-FUNC(1640)
-FUNC(1641)
-FUNC(1642)
-FUNC(1643)
-FUNC(1644)
-FUNC(1645)
-FUNC(1646)
-FUNC(1647)
-FUNC(1648)
-FUNC(1649)
-FUNC(1650)
-FUNC(1651)
-FUNC(1652)
-FUNC(1653)
-FUNC(1654)
-FUNC(1655)
-FUNC(1656)
-FUNC(1657)
-FUNC(1658)
-FUNC(1659)
-FUNC(1660)
-FUNC(1661)
-FUNC(1662)
-FUNC(1663)
-FUNC(1664)
-FUNC(1665)
-FUNC(1666)
-FUNC(1667)
-FUNC(1668)
-FUNC(1669)
-FUNC(1670)
-FUNC(1671)
-FUNC(1672)
-FUNC(1673)
-FUNC(1674)
-FUNC(1675)
-FUNC(1676)
-FUNC(1677)
-FUNC(1678)
-FUNC(1679)
-FUNC(1680)
-FUNC(1681)
-FUNC(1682)
-FUNC(1683)
-FUNC(1684)
-FUNC(1685)
-FUNC(1686)
-FUNC(1687)
-FUNC(1688)
-FUNC(1689)
-FUNC(1690)
-FUNC(1691)
-FUNC(1692)
-FUNC(1693)
-FUNC(1694)
-FUNC(1695)
-FUNC(1696)
-FUNC(1697)
-FUNC(1698)
-FUNC(1699)
-FUNC(1700)
-FUNC(1701)
-FUNC(1702)
-FUNC(1703)
-FUNC(1704)
-FUNC(1705)
-FUNC(1706)
-FUNC(1707)
-FUNC(1708)
-FUNC(1709)
-FUNC(1710)
-FUNC(1711)
-FUNC(1712)
-FUNC(1713)
-FUNC(1714)
-FUNC(1715)
-FUNC(1716)
-FUNC(1717)
-FUNC(1718)
-FUNC(1719)
-FUNC(1720)
-FUNC(1721)
-FUNC(1722)
-FUNC(1723)
-FUNC(1724)
-FUNC(1725)
-FUNC(1726)
-FUNC(1727)
-FUNC(1728)
-FUNC(1729)
-FUNC(1730)
-FUNC(1731)
-FUNC(1732)
-FUNC(1733)
-FUNC(1734)
-FUNC(1735)
-FUNC(1736)
-FUNC(1737)
-FUNC(1738)
-FUNC(1739)
-FUNC(1740)
-FUNC(1741)
-FUNC(1742)
-FUNC(1743)
-FUNC(1744)
-FUNC(1745)
-FUNC(1746)
-FUNC(1747)
-FUNC(1748)
-FUNC(1749)
-FUNC(1750)
-FUNC(1751)
-FUNC(1752)
-FUNC(1753)
-FUNC(1754)
-FUNC(1755)
-FUNC(1756)
-FUNC(1757)
-FUNC(1758)
-FUNC(1759)
-FUNC(1760)
-FUNC(1761)
-FUNC(1762)
-FUNC(1763)
-FUNC(1764)
-FUNC(1765)
-FUNC(1766)
-FUNC(1767)
-FUNC(1768)
-FUNC(1769)
-FUNC(1770)
-FUNC(1771)
-FUNC(1772)
-FUNC(1773)
-FUNC(1774)
-FUNC(1775)
-FUNC(1776)
-FUNC(1777)
-FUNC(1778)
-FUNC(1779)
-FUNC(1780)
-FUNC(1781)
-FUNC(1782)
-FUNC(1783)
-FUNC(1784)
-FUNC(1785)
-FUNC(1786)
-FUNC(1787)
-FUNC(1788)
-FUNC(1789)
-FUNC(1790)
-FUNC(1791)
-FUNC(1792)
-FUNC(1793)
-FUNC(1794)
-FUNC(1795)
-FUNC(1796)
-FUNC(1797)
-FUNC(1798)
-FUNC(1799)
-FUNC(1800)
-FUNC(1801)
-FUNC(1802)
-FUNC(1803)
-FUNC(1804)
-FUNC(1805)
-FUNC(1806)
-FUNC(1807)
-FUNC(1808)
-FUNC(1809)
-FUNC(1810)
-FUNC(1811)
-FUNC(1812)
-FUNC(1813)
-FUNC(1814)
-FUNC(1815)
-FUNC(1816)
-FUNC(1817)
-FUNC(1818)
-FUNC(1819)
-FUNC(1820)
-FUNC(1821)
-FUNC(1822)
-FUNC(1823)
-FUNC(1824)
-FUNC(1825)
-FUNC(1826)
-FUNC(1827)
-FUNC(1828)
-FUNC(1829)
-FUNC(1830)
-FUNC(1831)
-FUNC(1832)
-FUNC(1833)
-FUNC(1834)
-FUNC(1835)
-FUNC(1836)
-FUNC(1837)
-FUNC(1838)
-FUNC(1839)
-FUNC(1840)
-FUNC(1841)
-FUNC(1842)
-FUNC(1843)
-FUNC(1844)
-FUNC(1845)
-FUNC(1846)
-FUNC(1847)
-FUNC(1848)
-FUNC(1849)
-FUNC(1850)
-FUNC(1851)
-FUNC(1852)
-FUNC(1853)
-FUNC(1854)
-FUNC(1855)
-FUNC(1856)
-FUNC(1857)
-FUNC(1858)
-FUNC(1859)
-FUNC(1860)
-FUNC(1861)
-FUNC(1862)
-FUNC(1863)
-FUNC(1864)
-FUNC(1865)
-FUNC(1866)
-FUNC(1867)
-FUNC(1868)
-FUNC(1869)
-FUNC(1870)
-FUNC(1871)
-FUNC(1872)
-FUNC(1873)
-FUNC(1874)
-FUNC(1875)
-FUNC(1876)
-FUNC(1877)
-FUNC(1878)
-FUNC(1879)
-FUNC(1880)
-FUNC(1881)
-FUNC(1882)
-FUNC(1883)
-FUNC(1884)
-FUNC(1885)
-FUNC(1886)
-FUNC(1887)
-FUNC(1888)
-FUNC(1889)
-FUNC(1890)
-FUNC(1891)
-FUNC(1892)
-FUNC(1893)
-FUNC(1894)
-FUNC(1895)
-FUNC(1896)
-FUNC(1897)
-FUNC(1898)
-FUNC(1899)
-FUNC(1900)
-FUNC(1901)
-FUNC(1902)
-FUNC(1903)
-FUNC(1904)
-FUNC(1905)
-FUNC(1906)
-FUNC(1907)
-FUNC(1908)
-FUNC(1909)
-FUNC(1910)
-FUNC(1911)
-FUNC(1912)
-FUNC(1913)
-FUNC(1914)
-FUNC(1915)
-FUNC(1916)
-FUNC(1917)
-FUNC(1918)
-FUNC(1919)
-FUNC(1920)
-FUNC(1921)
-FUNC(1922)
-FUNC(1923)
-FUNC(1924)
-FUNC(1925)
-FUNC(1926)
-FUNC(1927)
-FUNC(1928)
-FUNC(1929)
-FUNC(1930)
-FUNC(1931)
-FUNC(1932)
-FUNC(1933)
-FUNC(1934)
-FUNC(1935)
-FUNC(1936)
-FUNC(1937)
-FUNC(1938)
-FUNC(1939)
-FUNC(1940)
-FUNC(1941)
-FUNC(1942)
-FUNC(1943)
-FUNC(1944)
-FUNC(1945)
-FUNC(1946)
-FUNC(1947)
-FUNC(1948)
-FUNC(1949)
-FUNC(1950)
-FUNC(1951)
-FUNC(1952)
-FUNC(1953)
-FUNC(1954)
-FUNC(1955)
-FUNC(1956)
-FUNC(1957)
-FUNC(1958)
-FUNC(1959)
-FUNC(1960)
-FUNC(1961)
-FUNC(1962)
-FUNC(1963)
-FUNC(1964)
-FUNC(1965)
-FUNC(1966)
-FUNC(1967)
-FUNC(1968)
-FUNC(1969)
-FUNC(1970)
-FUNC(1971)
-FUNC(1972)
-FUNC(1973)
-FUNC(1974)
-FUNC(1975)
-FUNC(1976)
-FUNC(1977)
-FUNC(1978)
-FUNC(1979)
-FUNC(1980)
-FUNC(1981)
-FUNC(1982)
-FUNC(1983)
-FUNC(1984)
-FUNC(1985)
-FUNC(1986)
-FUNC(1987)
-FUNC(1988)
-FUNC(1989)
-FUNC(1990)
-FUNC(1991)
-FUNC(1992)
-FUNC(1993)
-FUNC(1994)
-FUNC(1995)
-FUNC(1996)
-FUNC(1997)
-FUNC(1998)
-FUNC(1999)
-FUNC(2000)
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+/* 
+This is jsut some "compiler fibre" for the compiler to chew
+on as part of a compilation performace test
+*/
+
+#define FUNC(VARIABLE)	\
+int function_##VARIABLE(void)	\
+{	\
+	int x,y,z;	\
+	x=VARIABLE+30* 10-1;	\
+	y=x*4;	\
+	\
+	\
+	x=y+1;	\
+	\
+	int a[VARIABLE];	\
+	\
+	\
+	\
+	for (z=0; z < 1000+VARIABLE; z++)	\
+	{	\
+		x+=a[z];		\
+	}	\
+	\
+	return x;	\
+}
+
+
+
+FUNC(1)
+FUNC(2)
+FUNC(3)
+FUNC(4)
+FUNC(5)
+FUNC(6)
+FUNC(7)
+FUNC(8)
+FUNC(9)
+FUNC(10)
+FUNC(11)
+FUNC(12)
+FUNC(13)
+FUNC(14)
+FUNC(15)
+FUNC(16)
+FUNC(17)
+FUNC(18)
+FUNC(19)
+FUNC(20)
+FUNC(21)
+FUNC(22)
+FUNC(23)
+FUNC(24)
+FUNC(25)
+FUNC(26)
+FUNC(27)
+FUNC(28)
+FUNC(29)
+FUNC(30)
+FUNC(31)
+FUNC(32)
+FUNC(33)
+FUNC(34)
+FUNC(35)
+FUNC(36)
+FUNC(37)
+FUNC(38)
+FUNC(39)
+FUNC(40)
+FUNC(41)
+FUNC(42)
+FUNC(43)
+FUNC(44)
+FUNC(45)
+FUNC(46)
+FUNC(47)
+FUNC(48)
+FUNC(49)
+FUNC(50)
+FUNC(51)
+FUNC(52)
+FUNC(53)
+FUNC(54)
+FUNC(55)
+FUNC(56)
+FUNC(57)
+FUNC(58)
+FUNC(59)
+FUNC(60)
+FUNC(61)
+FUNC(62)
+FUNC(63)
+FUNC(64)
+FUNC(65)
+FUNC(66)
+FUNC(67)
+FUNC(68)
+FUNC(69)
+FUNC(70)
+FUNC(71)
+FUNC(72)
+FUNC(73)
+FUNC(74)
+FUNC(75)
+FUNC(76)
+FUNC(77)
+FUNC(78)
+FUNC(79)
+FUNC(80)
+FUNC(81)
+FUNC(82)
+FUNC(83)
+FUNC(84)
+FUNC(85)
+FUNC(86)
+FUNC(87)
+FUNC(88)
+FUNC(89)
+FUNC(90)
+FUNC(91)
+FUNC(92)
+FUNC(93)
+FUNC(94)
+FUNC(95)
+FUNC(96)
+FUNC(97)
+FUNC(98)
+FUNC(99)
+FUNC(100)
+FUNC(101)
+FUNC(102)
+FUNC(103)
+FUNC(104)
+FUNC(105)
+FUNC(106)
+FUNC(107)
+FUNC(108)
+FUNC(109)
+FUNC(110)
+FUNC(111)
+FUNC(112)
+FUNC(113)
+FUNC(114)
+FUNC(115)
+FUNC(116)
+FUNC(117)
+FUNC(118)
+FUNC(119)
+FUNC(120)
+FUNC(121)
+FUNC(122)
+FUNC(123)
+FUNC(124)
+FUNC(125)
+FUNC(126)
+FUNC(127)
+FUNC(128)
+FUNC(129)
+FUNC(130)
+FUNC(131)
+FUNC(132)
+FUNC(133)
+FUNC(134)
+FUNC(135)
+FUNC(136)
+FUNC(137)
+FUNC(138)
+FUNC(139)
+FUNC(140)
+FUNC(141)
+FUNC(142)
+FUNC(143)
+FUNC(144)
+FUNC(145)
+FUNC(146)
+FUNC(147)
+FUNC(148)
+FUNC(149)
+FUNC(150)
+FUNC(151)
+FUNC(152)
+FUNC(153)
+FUNC(154)
+FUNC(155)
+FUNC(156)
+FUNC(157)
+FUNC(158)
+FUNC(159)
+FUNC(160)
+FUNC(161)
+FUNC(162)
+FUNC(163)
+FUNC(164)
+FUNC(165)
+FUNC(166)
+FUNC(167)
+FUNC(168)
+FUNC(169)
+FUNC(170)
+FUNC(171)
+FUNC(172)
+FUNC(173)
+FUNC(174)
+FUNC(175)
+FUNC(176)
+FUNC(177)
+FUNC(178)
+FUNC(179)
+FUNC(180)
+FUNC(181)
+FUNC(182)
+FUNC(183)
+FUNC(184)
+FUNC(185)
+FUNC(186)
+FUNC(187)
+FUNC(188)
+FUNC(189)
+FUNC(190)
+FUNC(191)
+FUNC(192)
+FUNC(193)
+FUNC(194)
+FUNC(195)
+FUNC(196)
+FUNC(197)
+FUNC(198)
+FUNC(199)
+FUNC(200)
+FUNC(201)
+FUNC(202)
+FUNC(203)
+FUNC(204)
+FUNC(205)
+FUNC(206)
+FUNC(207)
+FUNC(208)
+FUNC(209)
+FUNC(210)
+FUNC(211)
+FUNC(212)
+FUNC(213)
+FUNC(214)
+FUNC(215)
+FUNC(216)
+FUNC(217)
+FUNC(218)
+FUNC(219)
+FUNC(220)
+FUNC(221)
+FUNC(222)
+FUNC(223)
+FUNC(224)
+FUNC(225)
+FUNC(226)
+FUNC(227)
+FUNC(228)
+FUNC(229)
+FUNC(230)
+FUNC(231)
+FUNC(232)
+FUNC(233)
+FUNC(234)
+FUNC(235)
+FUNC(236)
+FUNC(237)
+FUNC(238)
+FUNC(239)
+FUNC(240)
+FUNC(241)
+FUNC(242)
+FUNC(243)
+FUNC(244)
+FUNC(245)
+FUNC(246)
+FUNC(247)
+FUNC(248)
+FUNC(249)
+FUNC(250)
+FUNC(251)
+FUNC(252)
+FUNC(253)
+FUNC(254)
+FUNC(255)
+FUNC(256)
+FUNC(257)
+FUNC(258)
+FUNC(259)
+FUNC(260)
+FUNC(261)
+FUNC(262)
+FUNC(263)
+FUNC(264)
+FUNC(265)
+FUNC(266)
+FUNC(267)
+FUNC(268)
+FUNC(269)
+FUNC(270)
+FUNC(271)
+FUNC(272)
+FUNC(273)
+FUNC(274)
+FUNC(275)
+FUNC(276)
+FUNC(277)
+FUNC(278)
+FUNC(279)
+FUNC(280)
+FUNC(281)
+FUNC(282)
+FUNC(283)
+FUNC(284)
+FUNC(285)
+FUNC(286)
+FUNC(287)
+FUNC(288)
+FUNC(289)
+FUNC(290)
+FUNC(291)
+FUNC(292)
+FUNC(293)
+FUNC(294)
+FUNC(295)
+FUNC(296)
+FUNC(297)
+FUNC(298)
+FUNC(299)
+FUNC(300)
+FUNC(301)
+FUNC(302)
+FUNC(303)
+FUNC(304)
+FUNC(305)
+FUNC(306)
+FUNC(307)
+FUNC(308)
+FUNC(309)
+FUNC(310)
+FUNC(311)
+FUNC(312)
+FUNC(313)
+FUNC(314)
+FUNC(315)
+FUNC(316)
+FUNC(317)
+FUNC(318)
+FUNC(319)
+FUNC(320)
+FUNC(321)
+FUNC(322)
+FUNC(323)
+FUNC(324)
+FUNC(325)
+FUNC(326)
+FUNC(327)
+FUNC(328)
+FUNC(329)
+FUNC(330)
+FUNC(331)
+FUNC(332)
+FUNC(333)
+FUNC(334)
+FUNC(335)
+FUNC(336)
+FUNC(337)
+FUNC(338)
+FUNC(339)
+FUNC(340)
+FUNC(341)
+FUNC(342)
+FUNC(343)
+FUNC(344)
+FUNC(345)
+FUNC(346)
+FUNC(347)
+FUNC(348)
+FUNC(349)
+FUNC(350)
+FUNC(351)
+FUNC(352)
+FUNC(353)
+FUNC(354)
+FUNC(355)
+FUNC(356)
+FUNC(357)
+FUNC(358)
+FUNC(359)
+FUNC(360)
+FUNC(361)
+FUNC(362)
+FUNC(363)
+FUNC(364)
+FUNC(365)
+FUNC(366)
+FUNC(367)
+FUNC(368)
+FUNC(369)
+FUNC(370)
+FUNC(371)
+FUNC(372)
+FUNC(373)
+FUNC(374)
+FUNC(375)
+FUNC(376)
+FUNC(377)
+FUNC(378)
+FUNC(379)
+FUNC(380)
+FUNC(381)
+FUNC(382)
+FUNC(383)
+FUNC(384)
+FUNC(385)
+FUNC(386)
+FUNC(387)
+FUNC(388)
+FUNC(389)
+FUNC(390)
+FUNC(391)
+FUNC(392)
+FUNC(393)
+FUNC(394)
+FUNC(395)
+FUNC(396)
+FUNC(397)
+FUNC(398)
+FUNC(399)
+FUNC(400)
+FUNC(401)
+FUNC(402)
+FUNC(403)
+FUNC(404)
+FUNC(405)
+FUNC(406)
+FUNC(407)
+FUNC(408)
+FUNC(409)
+FUNC(410)
+FUNC(411)
+FUNC(412)
+FUNC(413)
+FUNC(414)
+FUNC(415)
+FUNC(416)
+FUNC(417)
+FUNC(418)
+FUNC(419)
+FUNC(420)
+FUNC(421)
+FUNC(422)
+FUNC(423)
+FUNC(424)
+FUNC(425)
+FUNC(426)
+FUNC(427)
+FUNC(428)
+FUNC(429)
+FUNC(430)
+FUNC(431)
+FUNC(432)
+FUNC(433)
+FUNC(434)
+FUNC(435)
+FUNC(436)
+FUNC(437)
+FUNC(438)
+FUNC(439)
+FUNC(440)
+FUNC(441)
+FUNC(442)
+FUNC(443)
+FUNC(444)
+FUNC(445)
+FUNC(446)
+FUNC(447)
+FUNC(448)
+FUNC(449)
+FUNC(450)
+FUNC(451)
+FUNC(452)
+FUNC(453)
+FUNC(454)
+FUNC(455)
+FUNC(456)
+FUNC(457)
+FUNC(458)
+FUNC(459)
+FUNC(460)
+FUNC(461)
+FUNC(462)
+FUNC(463)
+FUNC(464)
+FUNC(465)
+FUNC(466)
+FUNC(467)
+FUNC(468)
+FUNC(469)
+FUNC(470)
+FUNC(471)
+FUNC(472)
+FUNC(473)
+FUNC(474)
+FUNC(475)
+FUNC(476)
+FUNC(477)
+FUNC(478)
+FUNC(479)
+FUNC(480)
+FUNC(481)
+FUNC(482)
+FUNC(483)
+FUNC(484)
+FUNC(485)
+FUNC(486)
+FUNC(487)
+FUNC(488)
+FUNC(489)
+FUNC(490)
+FUNC(491)
+FUNC(492)
+FUNC(493)
+FUNC(494)
+FUNC(495)
+FUNC(496)
+FUNC(497)
+FUNC(498)
+FUNC(499)
+FUNC(500)
+FUNC(501)
+FUNC(502)
+FUNC(503)
+FUNC(504)
+FUNC(505)
+FUNC(506)
+FUNC(507)
+FUNC(508)
+FUNC(509)
+FUNC(510)
+FUNC(511)
+FUNC(512)
+FUNC(513)
+FUNC(514)
+FUNC(515)
+FUNC(516)
+FUNC(517)
+FUNC(518)
+FUNC(519)
+FUNC(520)
+FUNC(521)
+FUNC(522)
+FUNC(523)
+FUNC(524)
+FUNC(525)
+FUNC(526)
+FUNC(527)
+FUNC(528)
+FUNC(529)
+FUNC(530)
+FUNC(531)
+FUNC(532)
+FUNC(533)
+FUNC(534)
+FUNC(535)
+FUNC(536)
+FUNC(537)
+FUNC(538)
+FUNC(539)
+FUNC(540)
+FUNC(541)
+FUNC(542)
+FUNC(543)
+FUNC(544)
+FUNC(545)
+FUNC(546)
+FUNC(547)
+FUNC(548)
+FUNC(549)
+FUNC(550)
+FUNC(551)
+FUNC(552)
+FUNC(553)
+FUNC(554)
+FUNC(555)
+FUNC(556)
+FUNC(557)
+FUNC(558)
+FUNC(559)
+FUNC(560)
+FUNC(561)
+FUNC(562)
+FUNC(563)
+FUNC(564)
+FUNC(565)
+FUNC(566)
+FUNC(567)
+FUNC(568)
+FUNC(569)
+FUNC(570)
+FUNC(571)
+FUNC(572)
+FUNC(573)
+FUNC(574)
+FUNC(575)
+FUNC(576)
+FUNC(577)
+FUNC(578)
+FUNC(579)
+FUNC(580)
+FUNC(581)
+FUNC(582)
+FUNC(583)
+FUNC(584)
+FUNC(585)
+FUNC(586)
+FUNC(587)
+FUNC(588)
+FUNC(589)
+FUNC(590)
+FUNC(591)
+FUNC(592)
+FUNC(593)
+FUNC(594)
+FUNC(595)
+FUNC(596)
+FUNC(597)
+FUNC(598)
+FUNC(599)
+FUNC(600)
+FUNC(601)
+FUNC(602)
+FUNC(603)
+FUNC(604)
+FUNC(605)
+FUNC(606)
+FUNC(607)
+FUNC(608)
+FUNC(609)
+FUNC(610)
+FUNC(611)
+FUNC(612)
+FUNC(613)
+FUNC(614)
+FUNC(615)
+FUNC(616)
+FUNC(617)
+FUNC(618)
+FUNC(619)
+FUNC(620)
+FUNC(621)
+FUNC(622)
+FUNC(623)
+FUNC(624)
+FUNC(625)
+FUNC(626)
+FUNC(627)
+FUNC(628)
+FUNC(629)
+FUNC(630)
+FUNC(631)
+FUNC(632)
+FUNC(633)
+FUNC(634)
+FUNC(635)
+FUNC(636)
+FUNC(637)
+FUNC(638)
+FUNC(639)
+FUNC(640)
+FUNC(641)
+FUNC(642)
+FUNC(643)
+FUNC(644)
+FUNC(645)
+FUNC(646)
+FUNC(647)
+FUNC(648)
+FUNC(649)
+FUNC(650)
+FUNC(651)
+FUNC(652)
+FUNC(653)
+FUNC(654)
+FUNC(655)
+FUNC(656)
+FUNC(657)
+FUNC(658)
+FUNC(659)
+FUNC(660)
+FUNC(661)
+FUNC(662)
+FUNC(663)
+FUNC(664)
+FUNC(665)
+FUNC(666)
+FUNC(667)
+FUNC(668)
+FUNC(669)
+FUNC(670)
+FUNC(671)
+FUNC(672)
+FUNC(673)
+FUNC(674)
+FUNC(675)
+FUNC(676)
+FUNC(677)
+FUNC(678)
+FUNC(679)
+FUNC(680)
+FUNC(681)
+FUNC(682)
+FUNC(683)
+FUNC(684)
+FUNC(685)
+FUNC(686)
+FUNC(687)
+FUNC(688)
+FUNC(689)
+FUNC(690)
+FUNC(691)
+FUNC(692)
+FUNC(693)
+FUNC(694)
+FUNC(695)
+FUNC(696)
+FUNC(697)
+FUNC(698)
+FUNC(699)
+FUNC(700)
+FUNC(701)
+FUNC(702)
+FUNC(703)
+FUNC(704)
+FUNC(705)
+FUNC(706)
+FUNC(707)
+FUNC(708)
+FUNC(709)
+FUNC(710)
+FUNC(711)
+FUNC(712)
+FUNC(713)
+FUNC(714)
+FUNC(715)
+FUNC(716)
+FUNC(717)
+FUNC(718)
+FUNC(719)
+FUNC(720)
+FUNC(721)
+FUNC(722)
+FUNC(723)
+FUNC(724)
+FUNC(725)
+FUNC(726)
+FUNC(727)
+FUNC(728)
+FUNC(729)
+FUNC(730)
+FUNC(731)
+FUNC(732)
+FUNC(733)
+FUNC(734)
+FUNC(735)
+FUNC(736)
+FUNC(737)
+FUNC(738)
+FUNC(739)
+FUNC(740)
+FUNC(741)
+FUNC(742)
+FUNC(743)
+FUNC(744)
+FUNC(745)
+FUNC(746)
+FUNC(747)
+FUNC(748)
+FUNC(749)
+FUNC(750)
+FUNC(751)
+FUNC(752)
+FUNC(753)
+FUNC(754)
+FUNC(755)
+FUNC(756)
+FUNC(757)
+FUNC(758)
+FUNC(759)
+FUNC(760)
+FUNC(761)
+FUNC(762)
+FUNC(763)
+FUNC(764)
+FUNC(765)
+FUNC(766)
+FUNC(767)
+FUNC(768)
+FUNC(769)
+FUNC(770)
+FUNC(771)
+FUNC(772)
+FUNC(773)
+FUNC(774)
+FUNC(775)
+FUNC(776)
+FUNC(777)
+FUNC(778)
+FUNC(779)
+FUNC(780)
+FUNC(781)
+FUNC(782)
+FUNC(783)
+FUNC(784)
+FUNC(785)
+FUNC(786)
+FUNC(787)
+FUNC(788)
+FUNC(789)
+FUNC(790)
+FUNC(791)
+FUNC(792)
+FUNC(793)
+FUNC(794)
+FUNC(795)
+FUNC(796)
+FUNC(797)
+FUNC(798)
+FUNC(799)
+FUNC(800)
+FUNC(801)
+FUNC(802)
+FUNC(803)
+FUNC(804)
+FUNC(805)
+FUNC(806)
+FUNC(807)
+FUNC(808)
+FUNC(809)
+FUNC(810)
+FUNC(811)
+FUNC(812)
+FUNC(813)
+FUNC(814)
+FUNC(815)
+FUNC(816)
+FUNC(817)
+FUNC(818)
+FUNC(819)
+FUNC(820)
+FUNC(821)
+FUNC(822)
+FUNC(823)
+FUNC(824)
+FUNC(825)
+FUNC(826)
+FUNC(827)
+FUNC(828)
+FUNC(829)
+FUNC(830)
+FUNC(831)
+FUNC(832)
+FUNC(833)
+FUNC(834)
+FUNC(835)
+FUNC(836)
+FUNC(837)
+FUNC(838)
+FUNC(839)
+FUNC(840)
+FUNC(841)
+FUNC(842)
+FUNC(843)
+FUNC(844)
+FUNC(845)
+FUNC(846)
+FUNC(847)
+FUNC(848)
+FUNC(849)
+FUNC(850)
+FUNC(851)
+FUNC(852)
+FUNC(853)
+FUNC(854)
+FUNC(855)
+FUNC(856)
+FUNC(857)
+FUNC(858)
+FUNC(859)
+FUNC(860)
+FUNC(861)
+FUNC(862)
+FUNC(863)
+FUNC(864)
+FUNC(865)
+FUNC(866)
+FUNC(867)
+FUNC(868)
+FUNC(869)
+FUNC(870)
+FUNC(871)
+FUNC(872)
+FUNC(873)
+FUNC(874)
+FUNC(875)
+FUNC(876)
+FUNC(877)
+FUNC(878)
+FUNC(879)
+FUNC(880)
+FUNC(881)
+FUNC(882)
+FUNC(883)
+FUNC(884)
+FUNC(885)
+FUNC(886)
+FUNC(887)
+FUNC(888)
+FUNC(889)
+FUNC(890)
+FUNC(891)
+FUNC(892)
+FUNC(893)
+FUNC(894)
+FUNC(895)
+FUNC(896)
+FUNC(897)
+FUNC(898)
+FUNC(899)
+FUNC(900)
+FUNC(901)
+FUNC(902)
+FUNC(903)
+FUNC(904)
+FUNC(905)
+FUNC(906)
+FUNC(907)
+FUNC(908)
+FUNC(909)
+FUNC(910)
+FUNC(911)
+FUNC(912)
+FUNC(913)
+FUNC(914)
+FUNC(915)
+FUNC(916)
+FUNC(917)
+FUNC(918)
+FUNC(919)
+FUNC(920)
+FUNC(921)
+FUNC(922)
+FUNC(923)
+FUNC(924)
+FUNC(925)
+FUNC(926)
+FUNC(927)
+FUNC(928)
+FUNC(929)
+FUNC(930)
+FUNC(931)
+FUNC(932)
+FUNC(933)
+FUNC(934)
+FUNC(935)
+FUNC(936)
+FUNC(937)
+FUNC(938)
+FUNC(939)
+FUNC(940)
+FUNC(941)
+FUNC(942)
+FUNC(943)
+FUNC(944)
+FUNC(945)
+FUNC(946)
+FUNC(947)
+FUNC(948)
+FUNC(949)
+FUNC(950)
+FUNC(951)
+FUNC(952)
+FUNC(953)
+FUNC(954)
+FUNC(955)
+FUNC(956)
+FUNC(957)
+FUNC(958)
+FUNC(959)
+FUNC(960)
+FUNC(961)
+FUNC(962)
+FUNC(963)
+FUNC(964)
+FUNC(965)
+FUNC(966)
+FUNC(967)
+FUNC(968)
+FUNC(969)
+FUNC(970)
+FUNC(971)
+FUNC(972)
+FUNC(973)
+FUNC(974)
+FUNC(975)
+FUNC(976)
+FUNC(977)
+FUNC(978)
+FUNC(979)
+FUNC(980)
+FUNC(981)
+FUNC(982)
+FUNC(983)
+FUNC(984)
+FUNC(985)
+FUNC(986)
+FUNC(987)
+FUNC(988)
+FUNC(989)
+FUNC(990)
+FUNC(991)
+FUNC(992)
+FUNC(993)
+FUNC(994)
+FUNC(995)
+FUNC(996)
+FUNC(997)
+FUNC(998)
+FUNC(999)
+FUNC(1000)
+FUNC(1001)
+FUNC(1002)
+FUNC(1003)
+FUNC(1004)
+FUNC(1005)
+FUNC(1006)
+FUNC(1007)
+FUNC(1008)
+FUNC(1009)
+FUNC(1010)
+FUNC(1011)
+FUNC(1012)
+FUNC(1013)
+FUNC(1014)
+FUNC(1015)
+FUNC(1016)
+FUNC(1017)
+FUNC(1018)
+FUNC(1019)
+FUNC(1020)
+FUNC(1021)
+FUNC(1022)
+FUNC(1023)
+FUNC(1024)
+FUNC(1025)
+FUNC(1026)
+FUNC(1027)
+FUNC(1028)
+FUNC(1029)
+FUNC(1030)
+FUNC(1031)
+FUNC(1032)
+FUNC(1033)
+FUNC(1034)
+FUNC(1035)
+FUNC(1036)
+FUNC(1037)
+FUNC(1038)
+FUNC(1039)
+FUNC(1040)
+FUNC(1041)
+FUNC(1042)
+FUNC(1043)
+FUNC(1044)
+FUNC(1045)
+FUNC(1046)
+FUNC(1047)
+FUNC(1048)
+FUNC(1049)
+FUNC(1050)
+FUNC(1051)
+FUNC(1052)
+FUNC(1053)
+FUNC(1054)
+FUNC(1055)
+FUNC(1056)
+FUNC(1057)
+FUNC(1058)
+FUNC(1059)
+FUNC(1060)
+FUNC(1061)
+FUNC(1062)
+FUNC(1063)
+FUNC(1064)
+FUNC(1065)
+FUNC(1066)
+FUNC(1067)
+FUNC(1068)
+FUNC(1069)
+FUNC(1070)
+FUNC(1071)
+FUNC(1072)
+FUNC(1073)
+FUNC(1074)
+FUNC(1075)
+FUNC(1076)
+FUNC(1077)
+FUNC(1078)
+FUNC(1079)
+FUNC(1080)
+FUNC(1081)
+FUNC(1082)
+FUNC(1083)
+FUNC(1084)
+FUNC(1085)
+FUNC(1086)
+FUNC(1087)
+FUNC(1088)
+FUNC(1089)
+FUNC(1090)
+FUNC(1091)
+FUNC(1092)
+FUNC(1093)
+FUNC(1094)
+FUNC(1095)
+FUNC(1096)
+FUNC(1097)
+FUNC(1098)
+FUNC(1099)
+FUNC(1100)
+FUNC(1101)
+FUNC(1102)
+FUNC(1103)
+FUNC(1104)
+FUNC(1105)
+FUNC(1106)
+FUNC(1107)
+FUNC(1108)
+FUNC(1109)
+FUNC(1110)
+FUNC(1111)
+FUNC(1112)
+FUNC(1113)
+FUNC(1114)
+FUNC(1115)
+FUNC(1116)
+FUNC(1117)
+FUNC(1118)
+FUNC(1119)
+FUNC(1120)
+FUNC(1121)
+FUNC(1122)
+FUNC(1123)
+FUNC(1124)
+FUNC(1125)
+FUNC(1126)
+FUNC(1127)
+FUNC(1128)
+FUNC(1129)
+FUNC(1130)
+FUNC(1131)
+FUNC(1132)
+FUNC(1133)
+FUNC(1134)
+FUNC(1135)
+FUNC(1136)
+FUNC(1137)
+FUNC(1138)
+FUNC(1139)
+FUNC(1140)
+FUNC(1141)
+FUNC(1142)
+FUNC(1143)
+FUNC(1144)
+FUNC(1145)
+FUNC(1146)
+FUNC(1147)
+FUNC(1148)
+FUNC(1149)
+FUNC(1150)
+FUNC(1151)
+FUNC(1152)
+FUNC(1153)
+FUNC(1154)
+FUNC(1155)
+FUNC(1156)
+FUNC(1157)
+FUNC(1158)
+FUNC(1159)
+FUNC(1160)
+FUNC(1161)
+FUNC(1162)
+FUNC(1163)
+FUNC(1164)
+FUNC(1165)
+FUNC(1166)
+FUNC(1167)
+FUNC(1168)
+FUNC(1169)
+FUNC(1170)
+FUNC(1171)
+FUNC(1172)
+FUNC(1173)
+FUNC(1174)
+FUNC(1175)
+FUNC(1176)
+FUNC(1177)
+FUNC(1178)
+FUNC(1179)
+FUNC(1180)
+FUNC(1181)
+FUNC(1182)
+FUNC(1183)
+FUNC(1184)
+FUNC(1185)
+FUNC(1186)
+FUNC(1187)
+FUNC(1188)
+FUNC(1189)
+FUNC(1190)
+FUNC(1191)
+FUNC(1192)
+FUNC(1193)
+FUNC(1194)
+FUNC(1195)
+FUNC(1196)
+FUNC(1197)
+FUNC(1198)
+FUNC(1199)
+FUNC(1200)
+FUNC(1201)
+FUNC(1202)
+FUNC(1203)
+FUNC(1204)
+FUNC(1205)
+FUNC(1206)
+FUNC(1207)
+FUNC(1208)
+FUNC(1209)
+FUNC(1210)
+FUNC(1211)
+FUNC(1212)
+FUNC(1213)
+FUNC(1214)
+FUNC(1215)
+FUNC(1216)
+FUNC(1217)
+FUNC(1218)
+FUNC(1219)
+FUNC(1220)
+FUNC(1221)
+FUNC(1222)
+FUNC(1223)
+FUNC(1224)
+FUNC(1225)
+FUNC(1226)
+FUNC(1227)
+FUNC(1228)
+FUNC(1229)
+FUNC(1230)
+FUNC(1231)
+FUNC(1232)
+FUNC(1233)
+FUNC(1234)
+FUNC(1235)
+FUNC(1236)
+FUNC(1237)
+FUNC(1238)
+FUNC(1239)
+FUNC(1240)
+FUNC(1241)
+FUNC(1242)
+FUNC(1243)
+FUNC(1244)
+FUNC(1245)
+FUNC(1246)
+FUNC(1247)
+FUNC(1248)
+FUNC(1249)
+FUNC(1250)
+FUNC(1251)
+FUNC(1252)
+FUNC(1253)
+FUNC(1254)
+FUNC(1255)
+FUNC(1256)
+FUNC(1257)
+FUNC(1258)
+FUNC(1259)
+FUNC(1260)
+FUNC(1261)
+FUNC(1262)
+FUNC(1263)
+FUNC(1264)
+FUNC(1265)
+FUNC(1266)
+FUNC(1267)
+FUNC(1268)
+FUNC(1269)
+FUNC(1270)
+FUNC(1271)
+FUNC(1272)
+FUNC(1273)
+FUNC(1274)
+FUNC(1275)
+FUNC(1276)
+FUNC(1277)
+FUNC(1278)
+FUNC(1279)
+FUNC(1280)
+FUNC(1281)
+FUNC(1282)
+FUNC(1283)
+FUNC(1284)
+FUNC(1285)
+FUNC(1286)
+FUNC(1287)
+FUNC(1288)
+FUNC(1289)
+FUNC(1290)
+FUNC(1291)
+FUNC(1292)
+FUNC(1293)
+FUNC(1294)
+FUNC(1295)
+FUNC(1296)
+FUNC(1297)
+FUNC(1298)
+FUNC(1299)
+FUNC(1300)
+FUNC(1301)
+FUNC(1302)
+FUNC(1303)
+FUNC(1304)
+FUNC(1305)
+FUNC(1306)
+FUNC(1307)
+FUNC(1308)
+FUNC(1309)
+FUNC(1310)
+FUNC(1311)
+FUNC(1312)
+FUNC(1313)
+FUNC(1314)
+FUNC(1315)
+FUNC(1316)
+FUNC(1317)
+FUNC(1318)
+FUNC(1319)
+FUNC(1320)
+FUNC(1321)
+FUNC(1322)
+FUNC(1323)
+FUNC(1324)
+FUNC(1325)
+FUNC(1326)
+FUNC(1327)
+FUNC(1328)
+FUNC(1329)
+FUNC(1330)
+FUNC(1331)
+FUNC(1332)
+FUNC(1333)
+FUNC(1334)
+FUNC(1335)
+FUNC(1336)
+FUNC(1337)
+FUNC(1338)
+FUNC(1339)
+FUNC(1340)
+FUNC(1341)
+FUNC(1342)
+FUNC(1343)
+FUNC(1344)
+FUNC(1345)
+FUNC(1346)
+FUNC(1347)
+FUNC(1348)
+FUNC(1349)
+FUNC(1350)
+FUNC(1351)
+FUNC(1352)
+FUNC(1353)
+FUNC(1354)
+FUNC(1355)
+FUNC(1356)
+FUNC(1357)
+FUNC(1358)
+FUNC(1359)
+FUNC(1360)
+FUNC(1361)
+FUNC(1362)
+FUNC(1363)
+FUNC(1364)
+FUNC(1365)
+FUNC(1366)
+FUNC(1367)
+FUNC(1368)
+FUNC(1369)
+FUNC(1370)
+FUNC(1371)
+FUNC(1372)
+FUNC(1373)
+FUNC(1374)
+FUNC(1375)
+FUNC(1376)
+FUNC(1377)
+FUNC(1378)
+FUNC(1379)
+FUNC(1380)
+FUNC(1381)
+FUNC(1382)
+FUNC(1383)
+FUNC(1384)
+FUNC(1385)
+FUNC(1386)
+FUNC(1387)
+FUNC(1388)
+FUNC(1389)
+FUNC(1390)
+FUNC(1391)
+FUNC(1392)
+FUNC(1393)
+FUNC(1394)
+FUNC(1395)
+FUNC(1396)
+FUNC(1397)
+FUNC(1398)
+FUNC(1399)
+FUNC(1400)
+FUNC(1401)
+FUNC(1402)
+FUNC(1403)
+FUNC(1404)
+FUNC(1405)
+FUNC(1406)
+FUNC(1407)
+FUNC(1408)
+FUNC(1409)
+FUNC(1410)
+FUNC(1411)
+FUNC(1412)
+FUNC(1413)
+FUNC(1414)
+FUNC(1415)
+FUNC(1416)
+FUNC(1417)
+FUNC(1418)
+FUNC(1419)
+FUNC(1420)
+FUNC(1421)
+FUNC(1422)
+FUNC(1423)
+FUNC(1424)
+FUNC(1425)
+FUNC(1426)
+FUNC(1427)
+FUNC(1428)
+FUNC(1429)
+FUNC(1430)
+FUNC(1431)
+FUNC(1432)
+FUNC(1433)
+FUNC(1434)
+FUNC(1435)
+FUNC(1436)
+FUNC(1437)
+FUNC(1438)
+FUNC(1439)
+FUNC(1440)
+FUNC(1441)
+FUNC(1442)
+FUNC(1443)
+FUNC(1444)
+FUNC(1445)
+FUNC(1446)
+FUNC(1447)
+FUNC(1448)
+FUNC(1449)
+FUNC(1450)
+FUNC(1451)
+FUNC(1452)
+FUNC(1453)
+FUNC(1454)
+FUNC(1455)
+FUNC(1456)
+FUNC(1457)
+FUNC(1458)
+FUNC(1459)
+FUNC(1460)
+FUNC(1461)
+FUNC(1462)
+FUNC(1463)
+FUNC(1464)
+FUNC(1465)
+FUNC(1466)
+FUNC(1467)
+FUNC(1468)
+FUNC(1469)
+FUNC(1470)
+FUNC(1471)
+FUNC(1472)
+FUNC(1473)
+FUNC(1474)
+FUNC(1475)
+FUNC(1476)
+FUNC(1477)
+FUNC(1478)
+FUNC(1479)
+FUNC(1480)
+FUNC(1481)
+FUNC(1482)
+FUNC(1483)
+FUNC(1484)
+FUNC(1485)
+FUNC(1486)
+FUNC(1487)
+FUNC(1488)
+FUNC(1489)
+FUNC(1490)
+FUNC(1491)
+FUNC(1492)
+FUNC(1493)
+FUNC(1494)
+FUNC(1495)
+FUNC(1496)
+FUNC(1497)
+FUNC(1498)
+FUNC(1499)
+FUNC(1500)
+FUNC(1501)
+FUNC(1502)
+FUNC(1503)
+FUNC(1504)
+FUNC(1505)
+FUNC(1506)
+FUNC(1507)
+FUNC(1508)
+FUNC(1509)
+FUNC(1510)
+FUNC(1511)
+FUNC(1512)
+FUNC(1513)
+FUNC(1514)
+FUNC(1515)
+FUNC(1516)
+FUNC(1517)
+FUNC(1518)
+FUNC(1519)
+FUNC(1520)
+FUNC(1521)
+FUNC(1522)
+FUNC(1523)
+FUNC(1524)
+FUNC(1525)
+FUNC(1526)
+FUNC(1527)
+FUNC(1528)
+FUNC(1529)
+FUNC(1530)
+FUNC(1531)
+FUNC(1532)
+FUNC(1533)
+FUNC(1534)
+FUNC(1535)
+FUNC(1536)
+FUNC(1537)
+FUNC(1538)
+FUNC(1539)
+FUNC(1540)
+FUNC(1541)
+FUNC(1542)
+FUNC(1543)
+FUNC(1544)
+FUNC(1545)
+FUNC(1546)
+FUNC(1547)
+FUNC(1548)
+FUNC(1549)
+FUNC(1550)
+FUNC(1551)
+FUNC(1552)
+FUNC(1553)
+FUNC(1554)
+FUNC(1555)
+FUNC(1556)
+FUNC(1557)
+FUNC(1558)
+FUNC(1559)
+FUNC(1560)
+FUNC(1561)
+FUNC(1562)
+FUNC(1563)
+FUNC(1564)
+FUNC(1565)
+FUNC(1566)
+FUNC(1567)
+FUNC(1568)
+FUNC(1569)
+FUNC(1570)
+FUNC(1571)
+FUNC(1572)
+FUNC(1573)
+FUNC(1574)
+FUNC(1575)
+FUNC(1576)
+FUNC(1577)
+FUNC(1578)
+FUNC(1579)
+FUNC(1580)
+FUNC(1581)
+FUNC(1582)
+FUNC(1583)
+FUNC(1584)
+FUNC(1585)
+FUNC(1586)
+FUNC(1587)
+FUNC(1588)
+FUNC(1589)
+FUNC(1590)
+FUNC(1591)
+FUNC(1592)
+FUNC(1593)
+FUNC(1594)
+FUNC(1595)
+FUNC(1596)
+FUNC(1597)
+FUNC(1598)
+FUNC(1599)
+FUNC(1600)
+FUNC(1601)
+FUNC(1602)
+FUNC(1603)
+FUNC(1604)
+FUNC(1605)
+FUNC(1606)
+FUNC(1607)
+FUNC(1608)
+FUNC(1609)
+FUNC(1610)
+FUNC(1611)
+FUNC(1612)
+FUNC(1613)
+FUNC(1614)
+FUNC(1615)
+FUNC(1616)
+FUNC(1617)
+FUNC(1618)
+FUNC(1619)
+FUNC(1620)
+FUNC(1621)
+FUNC(1622)
+FUNC(1623)
+FUNC(1624)
+FUNC(1625)
+FUNC(1626)
+FUNC(1627)
+FUNC(1628)
+FUNC(1629)
+FUNC(1630)
+FUNC(1631)
+FUNC(1632)
+FUNC(1633)
+FUNC(1634)
+FUNC(1635)
+FUNC(1636)
+FUNC(1637)
+FUNC(1638)
+FUNC(1639)
+FUNC(1640)
+FUNC(1641)
+FUNC(1642)
+FUNC(1643)
+FUNC(1644)
+FUNC(1645)
+FUNC(1646)
+FUNC(1647)
+FUNC(1648)
+FUNC(1649)
+FUNC(1650)
+FUNC(1651)
+FUNC(1652)
+FUNC(1653)
+FUNC(1654)
+FUNC(1655)
+FUNC(1656)
+FUNC(1657)
+FUNC(1658)
+FUNC(1659)
+FUNC(1660)
+FUNC(1661)
+FUNC(1662)
+FUNC(1663)
+FUNC(1664)
+FUNC(1665)
+FUNC(1666)
+FUNC(1667)
+FUNC(1668)
+FUNC(1669)
+FUNC(1670)
+FUNC(1671)
+FUNC(1672)
+FUNC(1673)
+FUNC(1674)
+FUNC(1675)
+FUNC(1676)
+FUNC(1677)
+FUNC(1678)
+FUNC(1679)
+FUNC(1680)
+FUNC(1681)
+FUNC(1682)
+FUNC(1683)
+FUNC(1684)
+FUNC(1685)
+FUNC(1686)
+FUNC(1687)
+FUNC(1688)
+FUNC(1689)
+FUNC(1690)
+FUNC(1691)
+FUNC(1692)
+FUNC(1693)
+FUNC(1694)
+FUNC(1695)
+FUNC(1696)
+FUNC(1697)
+FUNC(1698)
+FUNC(1699)
+FUNC(1700)
+FUNC(1701)
+FUNC(1702)
+FUNC(1703)
+FUNC(1704)
+FUNC(1705)
+FUNC(1706)
+FUNC(1707)
+FUNC(1708)
+FUNC(1709)
+FUNC(1710)
+FUNC(1711)
+FUNC(1712)
+FUNC(1713)
+FUNC(1714)
+FUNC(1715)
+FUNC(1716)
+FUNC(1717)
+FUNC(1718)
+FUNC(1719)
+FUNC(1720)
+FUNC(1721)
+FUNC(1722)
+FUNC(1723)
+FUNC(1724)
+FUNC(1725)
+FUNC(1726)
+FUNC(1727)
+FUNC(1728)
+FUNC(1729)
+FUNC(1730)
+FUNC(1731)
+FUNC(1732)
+FUNC(1733)
+FUNC(1734)
+FUNC(1735)
+FUNC(1736)
+FUNC(1737)
+FUNC(1738)
+FUNC(1739)
+FUNC(1740)
+FUNC(1741)
+FUNC(1742)
+FUNC(1743)
+FUNC(1744)
+FUNC(1745)
+FUNC(1746)
+FUNC(1747)
+FUNC(1748)
+FUNC(1749)
+FUNC(1750)
+FUNC(1751)
+FUNC(1752)
+FUNC(1753)
+FUNC(1754)
+FUNC(1755)
+FUNC(1756)
+FUNC(1757)
+FUNC(1758)
+FUNC(1759)
+FUNC(1760)
+FUNC(1761)
+FUNC(1762)
+FUNC(1763)
+FUNC(1764)
+FUNC(1765)
+FUNC(1766)
+FUNC(1767)
+FUNC(1768)
+FUNC(1769)
+FUNC(1770)
+FUNC(1771)
+FUNC(1772)
+FUNC(1773)
+FUNC(1774)
+FUNC(1775)
+FUNC(1776)
+FUNC(1777)
+FUNC(1778)
+FUNC(1779)
+FUNC(1780)
+FUNC(1781)
+FUNC(1782)
+FUNC(1783)
+FUNC(1784)
+FUNC(1785)
+FUNC(1786)
+FUNC(1787)
+FUNC(1788)
+FUNC(1789)
+FUNC(1790)
+FUNC(1791)
+FUNC(1792)
+FUNC(1793)
+FUNC(1794)
+FUNC(1795)
+FUNC(1796)
+FUNC(1797)
+FUNC(1798)
+FUNC(1799)
+FUNC(1800)
+FUNC(1801)
+FUNC(1802)
+FUNC(1803)
+FUNC(1804)
+FUNC(1805)
+FUNC(1806)
+FUNC(1807)
+FUNC(1808)
+FUNC(1809)
+FUNC(1810)
+FUNC(1811)
+FUNC(1812)
+FUNC(1813)
+FUNC(1814)
+FUNC(1815)
+FUNC(1816)
+FUNC(1817)
+FUNC(1818)
+FUNC(1819)
+FUNC(1820)
+FUNC(1821)
+FUNC(1822)
+FUNC(1823)
+FUNC(1824)
+FUNC(1825)
+FUNC(1826)
+FUNC(1827)
+FUNC(1828)
+FUNC(1829)
+FUNC(1830)
+FUNC(1831)
+FUNC(1832)
+FUNC(1833)
+FUNC(1834)
+FUNC(1835)
+FUNC(1836)
+FUNC(1837)
+FUNC(1838)
+FUNC(1839)
+FUNC(1840)
+FUNC(1841)
+FUNC(1842)
+FUNC(1843)
+FUNC(1844)
+FUNC(1845)
+FUNC(1846)
+FUNC(1847)
+FUNC(1848)
+FUNC(1849)
+FUNC(1850)
+FUNC(1851)
+FUNC(1852)
+FUNC(1853)
+FUNC(1854)
+FUNC(1855)
+FUNC(1856)
+FUNC(1857)
+FUNC(1858)
+FUNC(1859)
+FUNC(1860)
+FUNC(1861)
+FUNC(1862)
+FUNC(1863)
+FUNC(1864)
+FUNC(1865)
+FUNC(1866)
+FUNC(1867)
+FUNC(1868)
+FUNC(1869)
+FUNC(1870)
+FUNC(1871)
+FUNC(1872)
+FUNC(1873)
+FUNC(1874)
+FUNC(1875)
+FUNC(1876)
+FUNC(1877)
+FUNC(1878)
+FUNC(1879)
+FUNC(1880)
+FUNC(1881)
+FUNC(1882)
+FUNC(1883)
+FUNC(1884)
+FUNC(1885)
+FUNC(1886)
+FUNC(1887)
+FUNC(1888)
+FUNC(1889)
+FUNC(1890)
+FUNC(1891)
+FUNC(1892)
+FUNC(1893)
+FUNC(1894)
+FUNC(1895)
+FUNC(1896)
+FUNC(1897)
+FUNC(1898)
+FUNC(1899)
+FUNC(1900)
+FUNC(1901)
+FUNC(1902)
+FUNC(1903)
+FUNC(1904)
+FUNC(1905)
+FUNC(1906)
+FUNC(1907)
+FUNC(1908)
+FUNC(1909)
+FUNC(1910)
+FUNC(1911)
+FUNC(1912)
+FUNC(1913)
+FUNC(1914)
+FUNC(1915)
+FUNC(1916)
+FUNC(1917)
+FUNC(1918)
+FUNC(1919)
+FUNC(1920)
+FUNC(1921)
+FUNC(1922)
+FUNC(1923)
+FUNC(1924)
+FUNC(1925)
+FUNC(1926)
+FUNC(1927)
+FUNC(1928)
+FUNC(1929)
+FUNC(1930)
+FUNC(1931)
+FUNC(1932)
+FUNC(1933)
+FUNC(1934)
+FUNC(1935)
+FUNC(1936)
+FUNC(1937)
+FUNC(1938)
+FUNC(1939)
+FUNC(1940)
+FUNC(1941)
+FUNC(1942)
+FUNC(1943)
+FUNC(1944)
+FUNC(1945)
+FUNC(1946)
+FUNC(1947)
+FUNC(1948)
+FUNC(1949)
+FUNC(1950)
+FUNC(1951)
+FUNC(1952)
+FUNC(1953)
+FUNC(1954)
+FUNC(1955)
+FUNC(1956)
+FUNC(1957)
+FUNC(1958)
+FUNC(1959)
+FUNC(1960)
+FUNC(1961)
+FUNC(1962)
+FUNC(1963)
+FUNC(1964)
+FUNC(1965)
+FUNC(1966)
+FUNC(1967)
+FUNC(1968)
+FUNC(1969)
+FUNC(1970)
+FUNC(1971)
+FUNC(1972)
+FUNC(1973)
+FUNC(1974)
+FUNC(1975)
+FUNC(1976)
+FUNC(1977)
+FUNC(1978)
+FUNC(1979)
+FUNC(1980)
+FUNC(1981)
+FUNC(1982)
+FUNC(1983)
+FUNC(1984)
+FUNC(1985)
+FUNC(1986)
+FUNC(1987)
+FUNC(1988)
+FUNC(1989)
+FUNC(1990)
+FUNC(1991)
+FUNC(1992)
+FUNC(1993)
+FUNC(1994)
+FUNC(1995)
+FUNC(1996)
+FUNC(1997)
+FUNC(1998)
+FUNC(1999)
+FUNC(2000)
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/exeabiv2_4/exeabiv2_4.mk
--- a/sbsv2/raptor/lib/flm/test/exeabiv2_4/exeabiv2_4.mk	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/exeabiv2_4/exeabiv2_4.mk	Mon Nov 16 09:46:46 2009 +0000
@@ -1,46 +1,46 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-##
-## Test 1 - build an ARM E32 EXE on Linux
-## parameters relevant to the test.
-##
-
-
-## Purpose:
-## This is used to gauge perfomance 
-## At least one "large" input file is built
-## The input file has no dependencies so it really is just something for the compiler to "chew"
-
-
-# Pull tools
-include $(FLMHOME)/flmtools.mk
-
-$(call vsave,OUTPUTPATH SOURCEPATH CDEFS SYSTEMINCLUDE)
-# Pull in defaults for building test executables
-include $(FLMTESTHOME)/exeabiv2_defaults.mk
-
-
-TARGET:=exeabiv2_4
-CDEFS:=$(CDEFS) __TESTNAME__=\"exeabiv2_4\"
-OUTPUTPATH:=$(OUTPUTPATH)/$(TARGET)
-SOURCEPATH:=$(SOURCEPATH)/exeabiv2_4
-SOURCEFILES:=$(SOURCEPATH)/test.cpp $(SOURCEPATH)/test_big.cpp
-SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(FLMTESTHOME)/include
-UID3:=0x000004
-
-include $(FLMHOME)/$(FLM)
-
-$(call vrestore)
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+##
+## Test 1 - build an ARM E32 EXE on Linux
+## parameters relevant to the test.
+##
+
+
+## Purpose:
+## This is used to gauge perfomance 
+## At least one "large" input file is built
+## The input file has no dependencies so it really is just something for the compiler to "chew"
+
+
+# Pull tools
+include $(FLMHOME)/flmtools.mk
+
+$(call vsave,OUTPUTPATH SOURCEPATH CDEFS SYSTEMINCLUDE)
+# Pull in defaults for building test executables
+include $(FLMTESTHOME)/exeabiv2_defaults.mk
+
+
+TARGET:=exeabiv2_4
+CDEFS:=$(CDEFS) __TESTNAME__=\"exeabiv2_4\"
+OUTPUTPATH:=$(OUTPUTPATH)/$(TARGET)
+SOURCEPATH:=$(SOURCEPATH)/exeabiv2_4
+SOURCEFILES:=$(SOURCEPATH)/test.cpp $(SOURCEPATH)/test_big.cpp
+SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(FLMTESTHOME)/include
+UID3:=0x000004
+
+include $(FLMHOME)/$(FLM)
+
+$(call vrestore)
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/exeabiv2_4/test.cpp
--- a/sbsv2/raptor/lib/flm/test/exeabiv2_4/test.cpp	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/exeabiv2_4/test.cpp	Mon Nov 16 09:46:46 2009 +0000
@@ -1,27 +1,27 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include 
-
-int i=1;
-
-extern int function_1(void);
-TInt E32Main(void)
-{
-	function_1();
-	return 0;
-}
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#include 
+
+int i=1;
+
+extern int function_1(void);
+TInt E32Main(void)
+{
+	function_1();
+	return 0;
+}
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/exeabiv2_4/test_big.cpp
--- a/sbsv2/raptor/lib/flm/test/exeabiv2_4/test_big.cpp	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/exeabiv2_4/test_big.cpp	Mon Nov 16 09:46:46 2009 +0000
@@ -1,2045 +1,2045 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-/* 
-This is jsut some "compiler fibre" for the compiler to chew
-on as part of a compilation performace test
-*/
-
-#define FUNC(VARIABLE)	\
-int function_##VARIABLE(void)	\
-{	\
-	int x,y,z;	\
-	x=VARIABLE+30* 10-1;	\
-	y=x*4;	\
-	\
-	\
-	x=y+1;	\
-	\
-	int a[VARIABLE];	\
-	\
-	\
-	\
-	for (z=0; z < 1000+VARIABLE; z++)	\
-	{	\
-		x+=a[z];		\
-	}	\
-	\
-	return x;	\
-}
-
-
-
-FUNC(1)
-FUNC(2)
-FUNC(3)
-FUNC(4)
-FUNC(5)
-FUNC(6)
-FUNC(7)
-FUNC(8)
-FUNC(9)
-FUNC(10)
-FUNC(11)
-FUNC(12)
-FUNC(13)
-FUNC(14)
-FUNC(15)
-FUNC(16)
-FUNC(17)
-FUNC(18)
-FUNC(19)
-FUNC(20)
-FUNC(21)
-FUNC(22)
-FUNC(23)
-FUNC(24)
-FUNC(25)
-FUNC(26)
-FUNC(27)
-FUNC(28)
-FUNC(29)
-FUNC(30)
-FUNC(31)
-FUNC(32)
-FUNC(33)
-FUNC(34)
-FUNC(35)
-FUNC(36)
-FUNC(37)
-FUNC(38)
-FUNC(39)
-FUNC(40)
-FUNC(41)
-FUNC(42)
-FUNC(43)
-FUNC(44)
-FUNC(45)
-FUNC(46)
-FUNC(47)
-FUNC(48)
-FUNC(49)
-FUNC(50)
-FUNC(51)
-FUNC(52)
-FUNC(53)
-FUNC(54)
-FUNC(55)
-FUNC(56)
-FUNC(57)
-FUNC(58)
-FUNC(59)
-FUNC(60)
-FUNC(61)
-FUNC(62)
-FUNC(63)
-FUNC(64)
-FUNC(65)
-FUNC(66)
-FUNC(67)
-FUNC(68)
-FUNC(69)
-FUNC(70)
-FUNC(71)
-FUNC(72)
-FUNC(73)
-FUNC(74)
-FUNC(75)
-FUNC(76)
-FUNC(77)
-FUNC(78)
-FUNC(79)
-FUNC(80)
-FUNC(81)
-FUNC(82)
-FUNC(83)
-FUNC(84)
-FUNC(85)
-FUNC(86)
-FUNC(87)
-FUNC(88)
-FUNC(89)
-FUNC(90)
-FUNC(91)
-FUNC(92)
-FUNC(93)
-FUNC(94)
-FUNC(95)
-FUNC(96)
-FUNC(97)
-FUNC(98)
-FUNC(99)
-FUNC(100)
-FUNC(101)
-FUNC(102)
-FUNC(103)
-FUNC(104)
-FUNC(105)
-FUNC(106)
-FUNC(107)
-FUNC(108)
-FUNC(109)
-FUNC(110)
-FUNC(111)
-FUNC(112)
-FUNC(113)
-FUNC(114)
-FUNC(115)
-FUNC(116)
-FUNC(117)
-FUNC(118)
-FUNC(119)
-FUNC(120)
-FUNC(121)
-FUNC(122)
-FUNC(123)
-FUNC(124)
-FUNC(125)
-FUNC(126)
-FUNC(127)
-FUNC(128)
-FUNC(129)
-FUNC(130)
-FUNC(131)
-FUNC(132)
-FUNC(133)
-FUNC(134)
-FUNC(135)
-FUNC(136)
-FUNC(137)
-FUNC(138)
-FUNC(139)
-FUNC(140)
-FUNC(141)
-FUNC(142)
-FUNC(143)
-FUNC(144)
-FUNC(145)
-FUNC(146)
-FUNC(147)
-FUNC(148)
-FUNC(149)
-FUNC(150)
-FUNC(151)
-FUNC(152)
-FUNC(153)
-FUNC(154)
-FUNC(155)
-FUNC(156)
-FUNC(157)
-FUNC(158)
-FUNC(159)
-FUNC(160)
-FUNC(161)
-FUNC(162)
-FUNC(163)
-FUNC(164)
-FUNC(165)
-FUNC(166)
-FUNC(167)
-FUNC(168)
-FUNC(169)
-FUNC(170)
-FUNC(171)
-FUNC(172)
-FUNC(173)
-FUNC(174)
-FUNC(175)
-FUNC(176)
-FUNC(177)
-FUNC(178)
-FUNC(179)
-FUNC(180)
-FUNC(181)
-FUNC(182)
-FUNC(183)
-FUNC(184)
-FUNC(185)
-FUNC(186)
-FUNC(187)
-FUNC(188)
-FUNC(189)
-FUNC(190)
-FUNC(191)
-FUNC(192)
-FUNC(193)
-FUNC(194)
-FUNC(195)
-FUNC(196)
-FUNC(197)
-FUNC(198)
-FUNC(199)
-FUNC(200)
-FUNC(201)
-FUNC(202)
-FUNC(203)
-FUNC(204)
-FUNC(205)
-FUNC(206)
-FUNC(207)
-FUNC(208)
-FUNC(209)
-FUNC(210)
-FUNC(211)
-FUNC(212)
-FUNC(213)
-FUNC(214)
-FUNC(215)
-FUNC(216)
-FUNC(217)
-FUNC(218)
-FUNC(219)
-FUNC(220)
-FUNC(221)
-FUNC(222)
-FUNC(223)
-FUNC(224)
-FUNC(225)
-FUNC(226)
-FUNC(227)
-FUNC(228)
-FUNC(229)
-FUNC(230)
-FUNC(231)
-FUNC(232)
-FUNC(233)
-FUNC(234)
-FUNC(235)
-FUNC(236)
-FUNC(237)
-FUNC(238)
-FUNC(239)
-FUNC(240)
-FUNC(241)
-FUNC(242)
-FUNC(243)
-FUNC(244)
-FUNC(245)
-FUNC(246)
-FUNC(247)
-FUNC(248)
-FUNC(249)
-FUNC(250)
-FUNC(251)
-FUNC(252)
-FUNC(253)
-FUNC(254)
-FUNC(255)
-FUNC(256)
-FUNC(257)
-FUNC(258)
-FUNC(259)
-FUNC(260)
-FUNC(261)
-FUNC(262)
-FUNC(263)
-FUNC(264)
-FUNC(265)
-FUNC(266)
-FUNC(267)
-FUNC(268)
-FUNC(269)
-FUNC(270)
-FUNC(271)
-FUNC(272)
-FUNC(273)
-FUNC(274)
-FUNC(275)
-FUNC(276)
-FUNC(277)
-FUNC(278)
-FUNC(279)
-FUNC(280)
-FUNC(281)
-FUNC(282)
-FUNC(283)
-FUNC(284)
-FUNC(285)
-FUNC(286)
-FUNC(287)
-FUNC(288)
-FUNC(289)
-FUNC(290)
-FUNC(291)
-FUNC(292)
-FUNC(293)
-FUNC(294)
-FUNC(295)
-FUNC(296)
-FUNC(297)
-FUNC(298)
-FUNC(299)
-FUNC(300)
-FUNC(301)
-FUNC(302)
-FUNC(303)
-FUNC(304)
-FUNC(305)
-FUNC(306)
-FUNC(307)
-FUNC(308)
-FUNC(309)
-FUNC(310)
-FUNC(311)
-FUNC(312)
-FUNC(313)
-FUNC(314)
-FUNC(315)
-FUNC(316)
-FUNC(317)
-FUNC(318)
-FUNC(319)
-FUNC(320)
-FUNC(321)
-FUNC(322)
-FUNC(323)
-FUNC(324)
-FUNC(325)
-FUNC(326)
-FUNC(327)
-FUNC(328)
-FUNC(329)
-FUNC(330)
-FUNC(331)
-FUNC(332)
-FUNC(333)
-FUNC(334)
-FUNC(335)
-FUNC(336)
-FUNC(337)
-FUNC(338)
-FUNC(339)
-FUNC(340)
-FUNC(341)
-FUNC(342)
-FUNC(343)
-FUNC(344)
-FUNC(345)
-FUNC(346)
-FUNC(347)
-FUNC(348)
-FUNC(349)
-FUNC(350)
-FUNC(351)
-FUNC(352)
-FUNC(353)
-FUNC(354)
-FUNC(355)
-FUNC(356)
-FUNC(357)
-FUNC(358)
-FUNC(359)
-FUNC(360)
-FUNC(361)
-FUNC(362)
-FUNC(363)
-FUNC(364)
-FUNC(365)
-FUNC(366)
-FUNC(367)
-FUNC(368)
-FUNC(369)
-FUNC(370)
-FUNC(371)
-FUNC(372)
-FUNC(373)
-FUNC(374)
-FUNC(375)
-FUNC(376)
-FUNC(377)
-FUNC(378)
-FUNC(379)
-FUNC(380)
-FUNC(381)
-FUNC(382)
-FUNC(383)
-FUNC(384)
-FUNC(385)
-FUNC(386)
-FUNC(387)
-FUNC(388)
-FUNC(389)
-FUNC(390)
-FUNC(391)
-FUNC(392)
-FUNC(393)
-FUNC(394)
-FUNC(395)
-FUNC(396)
-FUNC(397)
-FUNC(398)
-FUNC(399)
-FUNC(400)
-FUNC(401)
-FUNC(402)
-FUNC(403)
-FUNC(404)
-FUNC(405)
-FUNC(406)
-FUNC(407)
-FUNC(408)
-FUNC(409)
-FUNC(410)
-FUNC(411)
-FUNC(412)
-FUNC(413)
-FUNC(414)
-FUNC(415)
-FUNC(416)
-FUNC(417)
-FUNC(418)
-FUNC(419)
-FUNC(420)
-FUNC(421)
-FUNC(422)
-FUNC(423)
-FUNC(424)
-FUNC(425)
-FUNC(426)
-FUNC(427)
-FUNC(428)
-FUNC(429)
-FUNC(430)
-FUNC(431)
-FUNC(432)
-FUNC(433)
-FUNC(434)
-FUNC(435)
-FUNC(436)
-FUNC(437)
-FUNC(438)
-FUNC(439)
-FUNC(440)
-FUNC(441)
-FUNC(442)
-FUNC(443)
-FUNC(444)
-FUNC(445)
-FUNC(446)
-FUNC(447)
-FUNC(448)
-FUNC(449)
-FUNC(450)
-FUNC(451)
-FUNC(452)
-FUNC(453)
-FUNC(454)
-FUNC(455)
-FUNC(456)
-FUNC(457)
-FUNC(458)
-FUNC(459)
-FUNC(460)
-FUNC(461)
-FUNC(462)
-FUNC(463)
-FUNC(464)
-FUNC(465)
-FUNC(466)
-FUNC(467)
-FUNC(468)
-FUNC(469)
-FUNC(470)
-FUNC(471)
-FUNC(472)
-FUNC(473)
-FUNC(474)
-FUNC(475)
-FUNC(476)
-FUNC(477)
-FUNC(478)
-FUNC(479)
-FUNC(480)
-FUNC(481)
-FUNC(482)
-FUNC(483)
-FUNC(484)
-FUNC(485)
-FUNC(486)
-FUNC(487)
-FUNC(488)
-FUNC(489)
-FUNC(490)
-FUNC(491)
-FUNC(492)
-FUNC(493)
-FUNC(494)
-FUNC(495)
-FUNC(496)
-FUNC(497)
-FUNC(498)
-FUNC(499)
-FUNC(500)
-FUNC(501)
-FUNC(502)
-FUNC(503)
-FUNC(504)
-FUNC(505)
-FUNC(506)
-FUNC(507)
-FUNC(508)
-FUNC(509)
-FUNC(510)
-FUNC(511)
-FUNC(512)
-FUNC(513)
-FUNC(514)
-FUNC(515)
-FUNC(516)
-FUNC(517)
-FUNC(518)
-FUNC(519)
-FUNC(520)
-FUNC(521)
-FUNC(522)
-FUNC(523)
-FUNC(524)
-FUNC(525)
-FUNC(526)
-FUNC(527)
-FUNC(528)
-FUNC(529)
-FUNC(530)
-FUNC(531)
-FUNC(532)
-FUNC(533)
-FUNC(534)
-FUNC(535)
-FUNC(536)
-FUNC(537)
-FUNC(538)
-FUNC(539)
-FUNC(540)
-FUNC(541)
-FUNC(542)
-FUNC(543)
-FUNC(544)
-FUNC(545)
-FUNC(546)
-FUNC(547)
-FUNC(548)
-FUNC(549)
-FUNC(550)
-FUNC(551)
-FUNC(552)
-FUNC(553)
-FUNC(554)
-FUNC(555)
-FUNC(556)
-FUNC(557)
-FUNC(558)
-FUNC(559)
-FUNC(560)
-FUNC(561)
-FUNC(562)
-FUNC(563)
-FUNC(564)
-FUNC(565)
-FUNC(566)
-FUNC(567)
-FUNC(568)
-FUNC(569)
-FUNC(570)
-FUNC(571)
-FUNC(572)
-FUNC(573)
-FUNC(574)
-FUNC(575)
-FUNC(576)
-FUNC(577)
-FUNC(578)
-FUNC(579)
-FUNC(580)
-FUNC(581)
-FUNC(582)
-FUNC(583)
-FUNC(584)
-FUNC(585)
-FUNC(586)
-FUNC(587)
-FUNC(588)
-FUNC(589)
-FUNC(590)
-FUNC(591)
-FUNC(592)
-FUNC(593)
-FUNC(594)
-FUNC(595)
-FUNC(596)
-FUNC(597)
-FUNC(598)
-FUNC(599)
-FUNC(600)
-FUNC(601)
-FUNC(602)
-FUNC(603)
-FUNC(604)
-FUNC(605)
-FUNC(606)
-FUNC(607)
-FUNC(608)
-FUNC(609)
-FUNC(610)
-FUNC(611)
-FUNC(612)
-FUNC(613)
-FUNC(614)
-FUNC(615)
-FUNC(616)
-FUNC(617)
-FUNC(618)
-FUNC(619)
-FUNC(620)
-FUNC(621)
-FUNC(622)
-FUNC(623)
-FUNC(624)
-FUNC(625)
-FUNC(626)
-FUNC(627)
-FUNC(628)
-FUNC(629)
-FUNC(630)
-FUNC(631)
-FUNC(632)
-FUNC(633)
-FUNC(634)
-FUNC(635)
-FUNC(636)
-FUNC(637)
-FUNC(638)
-FUNC(639)
-FUNC(640)
-FUNC(641)
-FUNC(642)
-FUNC(643)
-FUNC(644)
-FUNC(645)
-FUNC(646)
-FUNC(647)
-FUNC(648)
-FUNC(649)
-FUNC(650)
-FUNC(651)
-FUNC(652)
-FUNC(653)
-FUNC(654)
-FUNC(655)
-FUNC(656)
-FUNC(657)
-FUNC(658)
-FUNC(659)
-FUNC(660)
-FUNC(661)
-FUNC(662)
-FUNC(663)
-FUNC(664)
-FUNC(665)
-FUNC(666)
-FUNC(667)
-FUNC(668)
-FUNC(669)
-FUNC(670)
-FUNC(671)
-FUNC(672)
-FUNC(673)
-FUNC(674)
-FUNC(675)
-FUNC(676)
-FUNC(677)
-FUNC(678)
-FUNC(679)
-FUNC(680)
-FUNC(681)
-FUNC(682)
-FUNC(683)
-FUNC(684)
-FUNC(685)
-FUNC(686)
-FUNC(687)
-FUNC(688)
-FUNC(689)
-FUNC(690)
-FUNC(691)
-FUNC(692)
-FUNC(693)
-FUNC(694)
-FUNC(695)
-FUNC(696)
-FUNC(697)
-FUNC(698)
-FUNC(699)
-FUNC(700)
-FUNC(701)
-FUNC(702)
-FUNC(703)
-FUNC(704)
-FUNC(705)
-FUNC(706)
-FUNC(707)
-FUNC(708)
-FUNC(709)
-FUNC(710)
-FUNC(711)
-FUNC(712)
-FUNC(713)
-FUNC(714)
-FUNC(715)
-FUNC(716)
-FUNC(717)
-FUNC(718)
-FUNC(719)
-FUNC(720)
-FUNC(721)
-FUNC(722)
-FUNC(723)
-FUNC(724)
-FUNC(725)
-FUNC(726)
-FUNC(727)
-FUNC(728)
-FUNC(729)
-FUNC(730)
-FUNC(731)
-FUNC(732)
-FUNC(733)
-FUNC(734)
-FUNC(735)
-FUNC(736)
-FUNC(737)
-FUNC(738)
-FUNC(739)
-FUNC(740)
-FUNC(741)
-FUNC(742)
-FUNC(743)
-FUNC(744)
-FUNC(745)
-FUNC(746)
-FUNC(747)
-FUNC(748)
-FUNC(749)
-FUNC(750)
-FUNC(751)
-FUNC(752)
-FUNC(753)
-FUNC(754)
-FUNC(755)
-FUNC(756)
-FUNC(757)
-FUNC(758)
-FUNC(759)
-FUNC(760)
-FUNC(761)
-FUNC(762)
-FUNC(763)
-FUNC(764)
-FUNC(765)
-FUNC(766)
-FUNC(767)
-FUNC(768)
-FUNC(769)
-FUNC(770)
-FUNC(771)
-FUNC(772)
-FUNC(773)
-FUNC(774)
-FUNC(775)
-FUNC(776)
-FUNC(777)
-FUNC(778)
-FUNC(779)
-FUNC(780)
-FUNC(781)
-FUNC(782)
-FUNC(783)
-FUNC(784)
-FUNC(785)
-FUNC(786)
-FUNC(787)
-FUNC(788)
-FUNC(789)
-FUNC(790)
-FUNC(791)
-FUNC(792)
-FUNC(793)
-FUNC(794)
-FUNC(795)
-FUNC(796)
-FUNC(797)
-FUNC(798)
-FUNC(799)
-FUNC(800)
-FUNC(801)
-FUNC(802)
-FUNC(803)
-FUNC(804)
-FUNC(805)
-FUNC(806)
-FUNC(807)
-FUNC(808)
-FUNC(809)
-FUNC(810)
-FUNC(811)
-FUNC(812)
-FUNC(813)
-FUNC(814)
-FUNC(815)
-FUNC(816)
-FUNC(817)
-FUNC(818)
-FUNC(819)
-FUNC(820)
-FUNC(821)
-FUNC(822)
-FUNC(823)
-FUNC(824)
-FUNC(825)
-FUNC(826)
-FUNC(827)
-FUNC(828)
-FUNC(829)
-FUNC(830)
-FUNC(831)
-FUNC(832)
-FUNC(833)
-FUNC(834)
-FUNC(835)
-FUNC(836)
-FUNC(837)
-FUNC(838)
-FUNC(839)
-FUNC(840)
-FUNC(841)
-FUNC(842)
-FUNC(843)
-FUNC(844)
-FUNC(845)
-FUNC(846)
-FUNC(847)
-FUNC(848)
-FUNC(849)
-FUNC(850)
-FUNC(851)
-FUNC(852)
-FUNC(853)
-FUNC(854)
-FUNC(855)
-FUNC(856)
-FUNC(857)
-FUNC(858)
-FUNC(859)
-FUNC(860)
-FUNC(861)
-FUNC(862)
-FUNC(863)
-FUNC(864)
-FUNC(865)
-FUNC(866)
-FUNC(867)
-FUNC(868)
-FUNC(869)
-FUNC(870)
-FUNC(871)
-FUNC(872)
-FUNC(873)
-FUNC(874)
-FUNC(875)
-FUNC(876)
-FUNC(877)
-FUNC(878)
-FUNC(879)
-FUNC(880)
-FUNC(881)
-FUNC(882)
-FUNC(883)
-FUNC(884)
-FUNC(885)
-FUNC(886)
-FUNC(887)
-FUNC(888)
-FUNC(889)
-FUNC(890)
-FUNC(891)
-FUNC(892)
-FUNC(893)
-FUNC(894)
-FUNC(895)
-FUNC(896)
-FUNC(897)
-FUNC(898)
-FUNC(899)
-FUNC(900)
-FUNC(901)
-FUNC(902)
-FUNC(903)
-FUNC(904)
-FUNC(905)
-FUNC(906)
-FUNC(907)
-FUNC(908)
-FUNC(909)
-FUNC(910)
-FUNC(911)
-FUNC(912)
-FUNC(913)
-FUNC(914)
-FUNC(915)
-FUNC(916)
-FUNC(917)
-FUNC(918)
-FUNC(919)
-FUNC(920)
-FUNC(921)
-FUNC(922)
-FUNC(923)
-FUNC(924)
-FUNC(925)
-FUNC(926)
-FUNC(927)
-FUNC(928)
-FUNC(929)
-FUNC(930)
-FUNC(931)
-FUNC(932)
-FUNC(933)
-FUNC(934)
-FUNC(935)
-FUNC(936)
-FUNC(937)
-FUNC(938)
-FUNC(939)
-FUNC(940)
-FUNC(941)
-FUNC(942)
-FUNC(943)
-FUNC(944)
-FUNC(945)
-FUNC(946)
-FUNC(947)
-FUNC(948)
-FUNC(949)
-FUNC(950)
-FUNC(951)
-FUNC(952)
-FUNC(953)
-FUNC(954)
-FUNC(955)
-FUNC(956)
-FUNC(957)
-FUNC(958)
-FUNC(959)
-FUNC(960)
-FUNC(961)
-FUNC(962)
-FUNC(963)
-FUNC(964)
-FUNC(965)
-FUNC(966)
-FUNC(967)
-FUNC(968)
-FUNC(969)
-FUNC(970)
-FUNC(971)
-FUNC(972)
-FUNC(973)
-FUNC(974)
-FUNC(975)
-FUNC(976)
-FUNC(977)
-FUNC(978)
-FUNC(979)
-FUNC(980)
-FUNC(981)
-FUNC(982)
-FUNC(983)
-FUNC(984)
-FUNC(985)
-FUNC(986)
-FUNC(987)
-FUNC(988)
-FUNC(989)
-FUNC(990)
-FUNC(991)
-FUNC(992)
-FUNC(993)
-FUNC(994)
-FUNC(995)
-FUNC(996)
-FUNC(997)
-FUNC(998)
-FUNC(999)
-FUNC(1000)
-FUNC(1001)
-FUNC(1002)
-FUNC(1003)
-FUNC(1004)
-FUNC(1005)
-FUNC(1006)
-FUNC(1007)
-FUNC(1008)
-FUNC(1009)
-FUNC(1010)
-FUNC(1011)
-FUNC(1012)
-FUNC(1013)
-FUNC(1014)
-FUNC(1015)
-FUNC(1016)
-FUNC(1017)
-FUNC(1018)
-FUNC(1019)
-FUNC(1020)
-FUNC(1021)
-FUNC(1022)
-FUNC(1023)
-FUNC(1024)
-FUNC(1025)
-FUNC(1026)
-FUNC(1027)
-FUNC(1028)
-FUNC(1029)
-FUNC(1030)
-FUNC(1031)
-FUNC(1032)
-FUNC(1033)
-FUNC(1034)
-FUNC(1035)
-FUNC(1036)
-FUNC(1037)
-FUNC(1038)
-FUNC(1039)
-FUNC(1040)
-FUNC(1041)
-FUNC(1042)
-FUNC(1043)
-FUNC(1044)
-FUNC(1045)
-FUNC(1046)
-FUNC(1047)
-FUNC(1048)
-FUNC(1049)
-FUNC(1050)
-FUNC(1051)
-FUNC(1052)
-FUNC(1053)
-FUNC(1054)
-FUNC(1055)
-FUNC(1056)
-FUNC(1057)
-FUNC(1058)
-FUNC(1059)
-FUNC(1060)
-FUNC(1061)
-FUNC(1062)
-FUNC(1063)
-FUNC(1064)
-FUNC(1065)
-FUNC(1066)
-FUNC(1067)
-FUNC(1068)
-FUNC(1069)
-FUNC(1070)
-FUNC(1071)
-FUNC(1072)
-FUNC(1073)
-FUNC(1074)
-FUNC(1075)
-FUNC(1076)
-FUNC(1077)
-FUNC(1078)
-FUNC(1079)
-FUNC(1080)
-FUNC(1081)
-FUNC(1082)
-FUNC(1083)
-FUNC(1084)
-FUNC(1085)
-FUNC(1086)
-FUNC(1087)
-FUNC(1088)
-FUNC(1089)
-FUNC(1090)
-FUNC(1091)
-FUNC(1092)
-FUNC(1093)
-FUNC(1094)
-FUNC(1095)
-FUNC(1096)
-FUNC(1097)
-FUNC(1098)
-FUNC(1099)
-FUNC(1100)
-FUNC(1101)
-FUNC(1102)
-FUNC(1103)
-FUNC(1104)
-FUNC(1105)
-FUNC(1106)
-FUNC(1107)
-FUNC(1108)
-FUNC(1109)
-FUNC(1110)
-FUNC(1111)
-FUNC(1112)
-FUNC(1113)
-FUNC(1114)
-FUNC(1115)
-FUNC(1116)
-FUNC(1117)
-FUNC(1118)
-FUNC(1119)
-FUNC(1120)
-FUNC(1121)
-FUNC(1122)
-FUNC(1123)
-FUNC(1124)
-FUNC(1125)
-FUNC(1126)
-FUNC(1127)
-FUNC(1128)
-FUNC(1129)
-FUNC(1130)
-FUNC(1131)
-FUNC(1132)
-FUNC(1133)
-FUNC(1134)
-FUNC(1135)
-FUNC(1136)
-FUNC(1137)
-FUNC(1138)
-FUNC(1139)
-FUNC(1140)
-FUNC(1141)
-FUNC(1142)
-FUNC(1143)
-FUNC(1144)
-FUNC(1145)
-FUNC(1146)
-FUNC(1147)
-FUNC(1148)
-FUNC(1149)
-FUNC(1150)
-FUNC(1151)
-FUNC(1152)
-FUNC(1153)
-FUNC(1154)
-FUNC(1155)
-FUNC(1156)
-FUNC(1157)
-FUNC(1158)
-FUNC(1159)
-FUNC(1160)
-FUNC(1161)
-FUNC(1162)
-FUNC(1163)
-FUNC(1164)
-FUNC(1165)
-FUNC(1166)
-FUNC(1167)
-FUNC(1168)
-FUNC(1169)
-FUNC(1170)
-FUNC(1171)
-FUNC(1172)
-FUNC(1173)
-FUNC(1174)
-FUNC(1175)
-FUNC(1176)
-FUNC(1177)
-FUNC(1178)
-FUNC(1179)
-FUNC(1180)
-FUNC(1181)
-FUNC(1182)
-FUNC(1183)
-FUNC(1184)
-FUNC(1185)
-FUNC(1186)
-FUNC(1187)
-FUNC(1188)
-FUNC(1189)
-FUNC(1190)
-FUNC(1191)
-FUNC(1192)
-FUNC(1193)
-FUNC(1194)
-FUNC(1195)
-FUNC(1196)
-FUNC(1197)
-FUNC(1198)
-FUNC(1199)
-FUNC(1200)
-FUNC(1201)
-FUNC(1202)
-FUNC(1203)
-FUNC(1204)
-FUNC(1205)
-FUNC(1206)
-FUNC(1207)
-FUNC(1208)
-FUNC(1209)
-FUNC(1210)
-FUNC(1211)
-FUNC(1212)
-FUNC(1213)
-FUNC(1214)
-FUNC(1215)
-FUNC(1216)
-FUNC(1217)
-FUNC(1218)
-FUNC(1219)
-FUNC(1220)
-FUNC(1221)
-FUNC(1222)
-FUNC(1223)
-FUNC(1224)
-FUNC(1225)
-FUNC(1226)
-FUNC(1227)
-FUNC(1228)
-FUNC(1229)
-FUNC(1230)
-FUNC(1231)
-FUNC(1232)
-FUNC(1233)
-FUNC(1234)
-FUNC(1235)
-FUNC(1236)
-FUNC(1237)
-FUNC(1238)
-FUNC(1239)
-FUNC(1240)
-FUNC(1241)
-FUNC(1242)
-FUNC(1243)
-FUNC(1244)
-FUNC(1245)
-FUNC(1246)
-FUNC(1247)
-FUNC(1248)
-FUNC(1249)
-FUNC(1250)
-FUNC(1251)
-FUNC(1252)
-FUNC(1253)
-FUNC(1254)
-FUNC(1255)
-FUNC(1256)
-FUNC(1257)
-FUNC(1258)
-FUNC(1259)
-FUNC(1260)
-FUNC(1261)
-FUNC(1262)
-FUNC(1263)
-FUNC(1264)
-FUNC(1265)
-FUNC(1266)
-FUNC(1267)
-FUNC(1268)
-FUNC(1269)
-FUNC(1270)
-FUNC(1271)
-FUNC(1272)
-FUNC(1273)
-FUNC(1274)
-FUNC(1275)
-FUNC(1276)
-FUNC(1277)
-FUNC(1278)
-FUNC(1279)
-FUNC(1280)
-FUNC(1281)
-FUNC(1282)
-FUNC(1283)
-FUNC(1284)
-FUNC(1285)
-FUNC(1286)
-FUNC(1287)
-FUNC(1288)
-FUNC(1289)
-FUNC(1290)
-FUNC(1291)
-FUNC(1292)
-FUNC(1293)
-FUNC(1294)
-FUNC(1295)
-FUNC(1296)
-FUNC(1297)
-FUNC(1298)
-FUNC(1299)
-FUNC(1300)
-FUNC(1301)
-FUNC(1302)
-FUNC(1303)
-FUNC(1304)
-FUNC(1305)
-FUNC(1306)
-FUNC(1307)
-FUNC(1308)
-FUNC(1309)
-FUNC(1310)
-FUNC(1311)
-FUNC(1312)
-FUNC(1313)
-FUNC(1314)
-FUNC(1315)
-FUNC(1316)
-FUNC(1317)
-FUNC(1318)
-FUNC(1319)
-FUNC(1320)
-FUNC(1321)
-FUNC(1322)
-FUNC(1323)
-FUNC(1324)
-FUNC(1325)
-FUNC(1326)
-FUNC(1327)
-FUNC(1328)
-FUNC(1329)
-FUNC(1330)
-FUNC(1331)
-FUNC(1332)
-FUNC(1333)
-FUNC(1334)
-FUNC(1335)
-FUNC(1336)
-FUNC(1337)
-FUNC(1338)
-FUNC(1339)
-FUNC(1340)
-FUNC(1341)
-FUNC(1342)
-FUNC(1343)
-FUNC(1344)
-FUNC(1345)
-FUNC(1346)
-FUNC(1347)
-FUNC(1348)
-FUNC(1349)
-FUNC(1350)
-FUNC(1351)
-FUNC(1352)
-FUNC(1353)
-FUNC(1354)
-FUNC(1355)
-FUNC(1356)
-FUNC(1357)
-FUNC(1358)
-FUNC(1359)
-FUNC(1360)
-FUNC(1361)
-FUNC(1362)
-FUNC(1363)
-FUNC(1364)
-FUNC(1365)
-FUNC(1366)
-FUNC(1367)
-FUNC(1368)
-FUNC(1369)
-FUNC(1370)
-FUNC(1371)
-FUNC(1372)
-FUNC(1373)
-FUNC(1374)
-FUNC(1375)
-FUNC(1376)
-FUNC(1377)
-FUNC(1378)
-FUNC(1379)
-FUNC(1380)
-FUNC(1381)
-FUNC(1382)
-FUNC(1383)
-FUNC(1384)
-FUNC(1385)
-FUNC(1386)
-FUNC(1387)
-FUNC(1388)
-FUNC(1389)
-FUNC(1390)
-FUNC(1391)
-FUNC(1392)
-FUNC(1393)
-FUNC(1394)
-FUNC(1395)
-FUNC(1396)
-FUNC(1397)
-FUNC(1398)
-FUNC(1399)
-FUNC(1400)
-FUNC(1401)
-FUNC(1402)
-FUNC(1403)
-FUNC(1404)
-FUNC(1405)
-FUNC(1406)
-FUNC(1407)
-FUNC(1408)
-FUNC(1409)
-FUNC(1410)
-FUNC(1411)
-FUNC(1412)
-FUNC(1413)
-FUNC(1414)
-FUNC(1415)
-FUNC(1416)
-FUNC(1417)
-FUNC(1418)
-FUNC(1419)
-FUNC(1420)
-FUNC(1421)
-FUNC(1422)
-FUNC(1423)
-FUNC(1424)
-FUNC(1425)
-FUNC(1426)
-FUNC(1427)
-FUNC(1428)
-FUNC(1429)
-FUNC(1430)
-FUNC(1431)
-FUNC(1432)
-FUNC(1433)
-FUNC(1434)
-FUNC(1435)
-FUNC(1436)
-FUNC(1437)
-FUNC(1438)
-FUNC(1439)
-FUNC(1440)
-FUNC(1441)
-FUNC(1442)
-FUNC(1443)
-FUNC(1444)
-FUNC(1445)
-FUNC(1446)
-FUNC(1447)
-FUNC(1448)
-FUNC(1449)
-FUNC(1450)
-FUNC(1451)
-FUNC(1452)
-FUNC(1453)
-FUNC(1454)
-FUNC(1455)
-FUNC(1456)
-FUNC(1457)
-FUNC(1458)
-FUNC(1459)
-FUNC(1460)
-FUNC(1461)
-FUNC(1462)
-FUNC(1463)
-FUNC(1464)
-FUNC(1465)
-FUNC(1466)
-FUNC(1467)
-FUNC(1468)
-FUNC(1469)
-FUNC(1470)
-FUNC(1471)
-FUNC(1472)
-FUNC(1473)
-FUNC(1474)
-FUNC(1475)
-FUNC(1476)
-FUNC(1477)
-FUNC(1478)
-FUNC(1479)
-FUNC(1480)
-FUNC(1481)
-FUNC(1482)
-FUNC(1483)
-FUNC(1484)
-FUNC(1485)
-FUNC(1486)
-FUNC(1487)
-FUNC(1488)
-FUNC(1489)
-FUNC(1490)
-FUNC(1491)
-FUNC(1492)
-FUNC(1493)
-FUNC(1494)
-FUNC(1495)
-FUNC(1496)
-FUNC(1497)
-FUNC(1498)
-FUNC(1499)
-FUNC(1500)
-FUNC(1501)
-FUNC(1502)
-FUNC(1503)
-FUNC(1504)
-FUNC(1505)
-FUNC(1506)
-FUNC(1507)
-FUNC(1508)
-FUNC(1509)
-FUNC(1510)
-FUNC(1511)
-FUNC(1512)
-FUNC(1513)
-FUNC(1514)
-FUNC(1515)
-FUNC(1516)
-FUNC(1517)
-FUNC(1518)
-FUNC(1519)
-FUNC(1520)
-FUNC(1521)
-FUNC(1522)
-FUNC(1523)
-FUNC(1524)
-FUNC(1525)
-FUNC(1526)
-FUNC(1527)
-FUNC(1528)
-FUNC(1529)
-FUNC(1530)
-FUNC(1531)
-FUNC(1532)
-FUNC(1533)
-FUNC(1534)
-FUNC(1535)
-FUNC(1536)
-FUNC(1537)
-FUNC(1538)
-FUNC(1539)
-FUNC(1540)
-FUNC(1541)
-FUNC(1542)
-FUNC(1543)
-FUNC(1544)
-FUNC(1545)
-FUNC(1546)
-FUNC(1547)
-FUNC(1548)
-FUNC(1549)
-FUNC(1550)
-FUNC(1551)
-FUNC(1552)
-FUNC(1553)
-FUNC(1554)
-FUNC(1555)
-FUNC(1556)
-FUNC(1557)
-FUNC(1558)
-FUNC(1559)
-FUNC(1560)
-FUNC(1561)
-FUNC(1562)
-FUNC(1563)
-FUNC(1564)
-FUNC(1565)
-FUNC(1566)
-FUNC(1567)
-FUNC(1568)
-FUNC(1569)
-FUNC(1570)
-FUNC(1571)
-FUNC(1572)
-FUNC(1573)
-FUNC(1574)
-FUNC(1575)
-FUNC(1576)
-FUNC(1577)
-FUNC(1578)
-FUNC(1579)
-FUNC(1580)
-FUNC(1581)
-FUNC(1582)
-FUNC(1583)
-FUNC(1584)
-FUNC(1585)
-FUNC(1586)
-FUNC(1587)
-FUNC(1588)
-FUNC(1589)
-FUNC(1590)
-FUNC(1591)
-FUNC(1592)
-FUNC(1593)
-FUNC(1594)
-FUNC(1595)
-FUNC(1596)
-FUNC(1597)
-FUNC(1598)
-FUNC(1599)
-FUNC(1600)
-FUNC(1601)
-FUNC(1602)
-FUNC(1603)
-FUNC(1604)
-FUNC(1605)
-FUNC(1606)
-FUNC(1607)
-FUNC(1608)
-FUNC(1609)
-FUNC(1610)
-FUNC(1611)
-FUNC(1612)
-FUNC(1613)
-FUNC(1614)
-FUNC(1615)
-FUNC(1616)
-FUNC(1617)
-FUNC(1618)
-FUNC(1619)
-FUNC(1620)
-FUNC(1621)
-FUNC(1622)
-FUNC(1623)
-FUNC(1624)
-FUNC(1625)
-FUNC(1626)
-FUNC(1627)
-FUNC(1628)
-FUNC(1629)
-FUNC(1630)
-FUNC(1631)
-FUNC(1632)
-FUNC(1633)
-FUNC(1634)
-FUNC(1635)
-FUNC(1636)
-FUNC(1637)
-FUNC(1638)
-FUNC(1639)
-FUNC(1640)
-FUNC(1641)
-FUNC(1642)
-FUNC(1643)
-FUNC(1644)
-FUNC(1645)
-FUNC(1646)
-FUNC(1647)
-FUNC(1648)
-FUNC(1649)
-FUNC(1650)
-FUNC(1651)
-FUNC(1652)
-FUNC(1653)
-FUNC(1654)
-FUNC(1655)
-FUNC(1656)
-FUNC(1657)
-FUNC(1658)
-FUNC(1659)
-FUNC(1660)
-FUNC(1661)
-FUNC(1662)
-FUNC(1663)
-FUNC(1664)
-FUNC(1665)
-FUNC(1666)
-FUNC(1667)
-FUNC(1668)
-FUNC(1669)
-FUNC(1670)
-FUNC(1671)
-FUNC(1672)
-FUNC(1673)
-FUNC(1674)
-FUNC(1675)
-FUNC(1676)
-FUNC(1677)
-FUNC(1678)
-FUNC(1679)
-FUNC(1680)
-FUNC(1681)
-FUNC(1682)
-FUNC(1683)
-FUNC(1684)
-FUNC(1685)
-FUNC(1686)
-FUNC(1687)
-FUNC(1688)
-FUNC(1689)
-FUNC(1690)
-FUNC(1691)
-FUNC(1692)
-FUNC(1693)
-FUNC(1694)
-FUNC(1695)
-FUNC(1696)
-FUNC(1697)
-FUNC(1698)
-FUNC(1699)
-FUNC(1700)
-FUNC(1701)
-FUNC(1702)
-FUNC(1703)
-FUNC(1704)
-FUNC(1705)
-FUNC(1706)
-FUNC(1707)
-FUNC(1708)
-FUNC(1709)
-FUNC(1710)
-FUNC(1711)
-FUNC(1712)
-FUNC(1713)
-FUNC(1714)
-FUNC(1715)
-FUNC(1716)
-FUNC(1717)
-FUNC(1718)
-FUNC(1719)
-FUNC(1720)
-FUNC(1721)
-FUNC(1722)
-FUNC(1723)
-FUNC(1724)
-FUNC(1725)
-FUNC(1726)
-FUNC(1727)
-FUNC(1728)
-FUNC(1729)
-FUNC(1730)
-FUNC(1731)
-FUNC(1732)
-FUNC(1733)
-FUNC(1734)
-FUNC(1735)
-FUNC(1736)
-FUNC(1737)
-FUNC(1738)
-FUNC(1739)
-FUNC(1740)
-FUNC(1741)
-FUNC(1742)
-FUNC(1743)
-FUNC(1744)
-FUNC(1745)
-FUNC(1746)
-FUNC(1747)
-FUNC(1748)
-FUNC(1749)
-FUNC(1750)
-FUNC(1751)
-FUNC(1752)
-FUNC(1753)
-FUNC(1754)
-FUNC(1755)
-FUNC(1756)
-FUNC(1757)
-FUNC(1758)
-FUNC(1759)
-FUNC(1760)
-FUNC(1761)
-FUNC(1762)
-FUNC(1763)
-FUNC(1764)
-FUNC(1765)
-FUNC(1766)
-FUNC(1767)
-FUNC(1768)
-FUNC(1769)
-FUNC(1770)
-FUNC(1771)
-FUNC(1772)
-FUNC(1773)
-FUNC(1774)
-FUNC(1775)
-FUNC(1776)
-FUNC(1777)
-FUNC(1778)
-FUNC(1779)
-FUNC(1780)
-FUNC(1781)
-FUNC(1782)
-FUNC(1783)
-FUNC(1784)
-FUNC(1785)
-FUNC(1786)
-FUNC(1787)
-FUNC(1788)
-FUNC(1789)
-FUNC(1790)
-FUNC(1791)
-FUNC(1792)
-FUNC(1793)
-FUNC(1794)
-FUNC(1795)
-FUNC(1796)
-FUNC(1797)
-FUNC(1798)
-FUNC(1799)
-FUNC(1800)
-FUNC(1801)
-FUNC(1802)
-FUNC(1803)
-FUNC(1804)
-FUNC(1805)
-FUNC(1806)
-FUNC(1807)
-FUNC(1808)
-FUNC(1809)
-FUNC(1810)
-FUNC(1811)
-FUNC(1812)
-FUNC(1813)
-FUNC(1814)
-FUNC(1815)
-FUNC(1816)
-FUNC(1817)
-FUNC(1818)
-FUNC(1819)
-FUNC(1820)
-FUNC(1821)
-FUNC(1822)
-FUNC(1823)
-FUNC(1824)
-FUNC(1825)
-FUNC(1826)
-FUNC(1827)
-FUNC(1828)
-FUNC(1829)
-FUNC(1830)
-FUNC(1831)
-FUNC(1832)
-FUNC(1833)
-FUNC(1834)
-FUNC(1835)
-FUNC(1836)
-FUNC(1837)
-FUNC(1838)
-FUNC(1839)
-FUNC(1840)
-FUNC(1841)
-FUNC(1842)
-FUNC(1843)
-FUNC(1844)
-FUNC(1845)
-FUNC(1846)
-FUNC(1847)
-FUNC(1848)
-FUNC(1849)
-FUNC(1850)
-FUNC(1851)
-FUNC(1852)
-FUNC(1853)
-FUNC(1854)
-FUNC(1855)
-FUNC(1856)
-FUNC(1857)
-FUNC(1858)
-FUNC(1859)
-FUNC(1860)
-FUNC(1861)
-FUNC(1862)
-FUNC(1863)
-FUNC(1864)
-FUNC(1865)
-FUNC(1866)
-FUNC(1867)
-FUNC(1868)
-FUNC(1869)
-FUNC(1870)
-FUNC(1871)
-FUNC(1872)
-FUNC(1873)
-FUNC(1874)
-FUNC(1875)
-FUNC(1876)
-FUNC(1877)
-FUNC(1878)
-FUNC(1879)
-FUNC(1880)
-FUNC(1881)
-FUNC(1882)
-FUNC(1883)
-FUNC(1884)
-FUNC(1885)
-FUNC(1886)
-FUNC(1887)
-FUNC(1888)
-FUNC(1889)
-FUNC(1890)
-FUNC(1891)
-FUNC(1892)
-FUNC(1893)
-FUNC(1894)
-FUNC(1895)
-FUNC(1896)
-FUNC(1897)
-FUNC(1898)
-FUNC(1899)
-FUNC(1900)
-FUNC(1901)
-FUNC(1902)
-FUNC(1903)
-FUNC(1904)
-FUNC(1905)
-FUNC(1906)
-FUNC(1907)
-FUNC(1908)
-FUNC(1909)
-FUNC(1910)
-FUNC(1911)
-FUNC(1912)
-FUNC(1913)
-FUNC(1914)
-FUNC(1915)
-FUNC(1916)
-FUNC(1917)
-FUNC(1918)
-FUNC(1919)
-FUNC(1920)
-FUNC(1921)
-FUNC(1922)
-FUNC(1923)
-FUNC(1924)
-FUNC(1925)
-FUNC(1926)
-FUNC(1927)
-FUNC(1928)
-FUNC(1929)
-FUNC(1930)
-FUNC(1931)
-FUNC(1932)
-FUNC(1933)
-FUNC(1934)
-FUNC(1935)
-FUNC(1936)
-FUNC(1937)
-FUNC(1938)
-FUNC(1939)
-FUNC(1940)
-FUNC(1941)
-FUNC(1942)
-FUNC(1943)
-FUNC(1944)
-FUNC(1945)
-FUNC(1946)
-FUNC(1947)
-FUNC(1948)
-FUNC(1949)
-FUNC(1950)
-FUNC(1951)
-FUNC(1952)
-FUNC(1953)
-FUNC(1954)
-FUNC(1955)
-FUNC(1956)
-FUNC(1957)
-FUNC(1958)
-FUNC(1959)
-FUNC(1960)
-FUNC(1961)
-FUNC(1962)
-FUNC(1963)
-FUNC(1964)
-FUNC(1965)
-FUNC(1966)
-FUNC(1967)
-FUNC(1968)
-FUNC(1969)
-FUNC(1970)
-FUNC(1971)
-FUNC(1972)
-FUNC(1973)
-FUNC(1974)
-FUNC(1975)
-FUNC(1976)
-FUNC(1977)
-FUNC(1978)
-FUNC(1979)
-FUNC(1980)
-FUNC(1981)
-FUNC(1982)
-FUNC(1983)
-FUNC(1984)
-FUNC(1985)
-FUNC(1986)
-FUNC(1987)
-FUNC(1988)
-FUNC(1989)
-FUNC(1990)
-FUNC(1991)
-FUNC(1992)
-FUNC(1993)
-FUNC(1994)
-FUNC(1995)
-FUNC(1996)
-FUNC(1997)
-FUNC(1998)
-FUNC(1999)
-FUNC(2000)
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+/* 
+This is jsut some "compiler fibre" for the compiler to chew
+on as part of a compilation performace test
+*/
+
+#define FUNC(VARIABLE)	\
+int function_##VARIABLE(void)	\
+{	\
+	int x,y,z;	\
+	x=VARIABLE+30* 10-1;	\
+	y=x*4;	\
+	\
+	\
+	x=y+1;	\
+	\
+	int a[VARIABLE];	\
+	\
+	\
+	\
+	for (z=0; z < 1000+VARIABLE; z++)	\
+	{	\
+		x+=a[z];		\
+	}	\
+	\
+	return x;	\
+}
+
+
+
+FUNC(1)
+FUNC(2)
+FUNC(3)
+FUNC(4)
+FUNC(5)
+FUNC(6)
+FUNC(7)
+FUNC(8)
+FUNC(9)
+FUNC(10)
+FUNC(11)
+FUNC(12)
+FUNC(13)
+FUNC(14)
+FUNC(15)
+FUNC(16)
+FUNC(17)
+FUNC(18)
+FUNC(19)
+FUNC(20)
+FUNC(21)
+FUNC(22)
+FUNC(23)
+FUNC(24)
+FUNC(25)
+FUNC(26)
+FUNC(27)
+FUNC(28)
+FUNC(29)
+FUNC(30)
+FUNC(31)
+FUNC(32)
+FUNC(33)
+FUNC(34)
+FUNC(35)
+FUNC(36)
+FUNC(37)
+FUNC(38)
+FUNC(39)
+FUNC(40)
+FUNC(41)
+FUNC(42)
+FUNC(43)
+FUNC(44)
+FUNC(45)
+FUNC(46)
+FUNC(47)
+FUNC(48)
+FUNC(49)
+FUNC(50)
+FUNC(51)
+FUNC(52)
+FUNC(53)
+FUNC(54)
+FUNC(55)
+FUNC(56)
+FUNC(57)
+FUNC(58)
+FUNC(59)
+FUNC(60)
+FUNC(61)
+FUNC(62)
+FUNC(63)
+FUNC(64)
+FUNC(65)
+FUNC(66)
+FUNC(67)
+FUNC(68)
+FUNC(69)
+FUNC(70)
+FUNC(71)
+FUNC(72)
+FUNC(73)
+FUNC(74)
+FUNC(75)
+FUNC(76)
+FUNC(77)
+FUNC(78)
+FUNC(79)
+FUNC(80)
+FUNC(81)
+FUNC(82)
+FUNC(83)
+FUNC(84)
+FUNC(85)
+FUNC(86)
+FUNC(87)
+FUNC(88)
+FUNC(89)
+FUNC(90)
+FUNC(91)
+FUNC(92)
+FUNC(93)
+FUNC(94)
+FUNC(95)
+FUNC(96)
+FUNC(97)
+FUNC(98)
+FUNC(99)
+FUNC(100)
+FUNC(101)
+FUNC(102)
+FUNC(103)
+FUNC(104)
+FUNC(105)
+FUNC(106)
+FUNC(107)
+FUNC(108)
+FUNC(109)
+FUNC(110)
+FUNC(111)
+FUNC(112)
+FUNC(113)
+FUNC(114)
+FUNC(115)
+FUNC(116)
+FUNC(117)
+FUNC(118)
+FUNC(119)
+FUNC(120)
+FUNC(121)
+FUNC(122)
+FUNC(123)
+FUNC(124)
+FUNC(125)
+FUNC(126)
+FUNC(127)
+FUNC(128)
+FUNC(129)
+FUNC(130)
+FUNC(131)
+FUNC(132)
+FUNC(133)
+FUNC(134)
+FUNC(135)
+FUNC(136)
+FUNC(137)
+FUNC(138)
+FUNC(139)
+FUNC(140)
+FUNC(141)
+FUNC(142)
+FUNC(143)
+FUNC(144)
+FUNC(145)
+FUNC(146)
+FUNC(147)
+FUNC(148)
+FUNC(149)
+FUNC(150)
+FUNC(151)
+FUNC(152)
+FUNC(153)
+FUNC(154)
+FUNC(155)
+FUNC(156)
+FUNC(157)
+FUNC(158)
+FUNC(159)
+FUNC(160)
+FUNC(161)
+FUNC(162)
+FUNC(163)
+FUNC(164)
+FUNC(165)
+FUNC(166)
+FUNC(167)
+FUNC(168)
+FUNC(169)
+FUNC(170)
+FUNC(171)
+FUNC(172)
+FUNC(173)
+FUNC(174)
+FUNC(175)
+FUNC(176)
+FUNC(177)
+FUNC(178)
+FUNC(179)
+FUNC(180)
+FUNC(181)
+FUNC(182)
+FUNC(183)
+FUNC(184)
+FUNC(185)
+FUNC(186)
+FUNC(187)
+FUNC(188)
+FUNC(189)
+FUNC(190)
+FUNC(191)
+FUNC(192)
+FUNC(193)
+FUNC(194)
+FUNC(195)
+FUNC(196)
+FUNC(197)
+FUNC(198)
+FUNC(199)
+FUNC(200)
+FUNC(201)
+FUNC(202)
+FUNC(203)
+FUNC(204)
+FUNC(205)
+FUNC(206)
+FUNC(207)
+FUNC(208)
+FUNC(209)
+FUNC(210)
+FUNC(211)
+FUNC(212)
+FUNC(213)
+FUNC(214)
+FUNC(215)
+FUNC(216)
+FUNC(217)
+FUNC(218)
+FUNC(219)
+FUNC(220)
+FUNC(221)
+FUNC(222)
+FUNC(223)
+FUNC(224)
+FUNC(225)
+FUNC(226)
+FUNC(227)
+FUNC(228)
+FUNC(229)
+FUNC(230)
+FUNC(231)
+FUNC(232)
+FUNC(233)
+FUNC(234)
+FUNC(235)
+FUNC(236)
+FUNC(237)
+FUNC(238)
+FUNC(239)
+FUNC(240)
+FUNC(241)
+FUNC(242)
+FUNC(243)
+FUNC(244)
+FUNC(245)
+FUNC(246)
+FUNC(247)
+FUNC(248)
+FUNC(249)
+FUNC(250)
+FUNC(251)
+FUNC(252)
+FUNC(253)
+FUNC(254)
+FUNC(255)
+FUNC(256)
+FUNC(257)
+FUNC(258)
+FUNC(259)
+FUNC(260)
+FUNC(261)
+FUNC(262)
+FUNC(263)
+FUNC(264)
+FUNC(265)
+FUNC(266)
+FUNC(267)
+FUNC(268)
+FUNC(269)
+FUNC(270)
+FUNC(271)
+FUNC(272)
+FUNC(273)
+FUNC(274)
+FUNC(275)
+FUNC(276)
+FUNC(277)
+FUNC(278)
+FUNC(279)
+FUNC(280)
+FUNC(281)
+FUNC(282)
+FUNC(283)
+FUNC(284)
+FUNC(285)
+FUNC(286)
+FUNC(287)
+FUNC(288)
+FUNC(289)
+FUNC(290)
+FUNC(291)
+FUNC(292)
+FUNC(293)
+FUNC(294)
+FUNC(295)
+FUNC(296)
+FUNC(297)
+FUNC(298)
+FUNC(299)
+FUNC(300)
+FUNC(301)
+FUNC(302)
+FUNC(303)
+FUNC(304)
+FUNC(305)
+FUNC(306)
+FUNC(307)
+FUNC(308)
+FUNC(309)
+FUNC(310)
+FUNC(311)
+FUNC(312)
+FUNC(313)
+FUNC(314)
+FUNC(315)
+FUNC(316)
+FUNC(317)
+FUNC(318)
+FUNC(319)
+FUNC(320)
+FUNC(321)
+FUNC(322)
+FUNC(323)
+FUNC(324)
+FUNC(325)
+FUNC(326)
+FUNC(327)
+FUNC(328)
+FUNC(329)
+FUNC(330)
+FUNC(331)
+FUNC(332)
+FUNC(333)
+FUNC(334)
+FUNC(335)
+FUNC(336)
+FUNC(337)
+FUNC(338)
+FUNC(339)
+FUNC(340)
+FUNC(341)
+FUNC(342)
+FUNC(343)
+FUNC(344)
+FUNC(345)
+FUNC(346)
+FUNC(347)
+FUNC(348)
+FUNC(349)
+FUNC(350)
+FUNC(351)
+FUNC(352)
+FUNC(353)
+FUNC(354)
+FUNC(355)
+FUNC(356)
+FUNC(357)
+FUNC(358)
+FUNC(359)
+FUNC(360)
+FUNC(361)
+FUNC(362)
+FUNC(363)
+FUNC(364)
+FUNC(365)
+FUNC(366)
+FUNC(367)
+FUNC(368)
+FUNC(369)
+FUNC(370)
+FUNC(371)
+FUNC(372)
+FUNC(373)
+FUNC(374)
+FUNC(375)
+FUNC(376)
+FUNC(377)
+FUNC(378)
+FUNC(379)
+FUNC(380)
+FUNC(381)
+FUNC(382)
+FUNC(383)
+FUNC(384)
+FUNC(385)
+FUNC(386)
+FUNC(387)
+FUNC(388)
+FUNC(389)
+FUNC(390)
+FUNC(391)
+FUNC(392)
+FUNC(393)
+FUNC(394)
+FUNC(395)
+FUNC(396)
+FUNC(397)
+FUNC(398)
+FUNC(399)
+FUNC(400)
+FUNC(401)
+FUNC(402)
+FUNC(403)
+FUNC(404)
+FUNC(405)
+FUNC(406)
+FUNC(407)
+FUNC(408)
+FUNC(409)
+FUNC(410)
+FUNC(411)
+FUNC(412)
+FUNC(413)
+FUNC(414)
+FUNC(415)
+FUNC(416)
+FUNC(417)
+FUNC(418)
+FUNC(419)
+FUNC(420)
+FUNC(421)
+FUNC(422)
+FUNC(423)
+FUNC(424)
+FUNC(425)
+FUNC(426)
+FUNC(427)
+FUNC(428)
+FUNC(429)
+FUNC(430)
+FUNC(431)
+FUNC(432)
+FUNC(433)
+FUNC(434)
+FUNC(435)
+FUNC(436)
+FUNC(437)
+FUNC(438)
+FUNC(439)
+FUNC(440)
+FUNC(441)
+FUNC(442)
+FUNC(443)
+FUNC(444)
+FUNC(445)
+FUNC(446)
+FUNC(447)
+FUNC(448)
+FUNC(449)
+FUNC(450)
+FUNC(451)
+FUNC(452)
+FUNC(453)
+FUNC(454)
+FUNC(455)
+FUNC(456)
+FUNC(457)
+FUNC(458)
+FUNC(459)
+FUNC(460)
+FUNC(461)
+FUNC(462)
+FUNC(463)
+FUNC(464)
+FUNC(465)
+FUNC(466)
+FUNC(467)
+FUNC(468)
+FUNC(469)
+FUNC(470)
+FUNC(471)
+FUNC(472)
+FUNC(473)
+FUNC(474)
+FUNC(475)
+FUNC(476)
+FUNC(477)
+FUNC(478)
+FUNC(479)
+FUNC(480)
+FUNC(481)
+FUNC(482)
+FUNC(483)
+FUNC(484)
+FUNC(485)
+FUNC(486)
+FUNC(487)
+FUNC(488)
+FUNC(489)
+FUNC(490)
+FUNC(491)
+FUNC(492)
+FUNC(493)
+FUNC(494)
+FUNC(495)
+FUNC(496)
+FUNC(497)
+FUNC(498)
+FUNC(499)
+FUNC(500)
+FUNC(501)
+FUNC(502)
+FUNC(503)
+FUNC(504)
+FUNC(505)
+FUNC(506)
+FUNC(507)
+FUNC(508)
+FUNC(509)
+FUNC(510)
+FUNC(511)
+FUNC(512)
+FUNC(513)
+FUNC(514)
+FUNC(515)
+FUNC(516)
+FUNC(517)
+FUNC(518)
+FUNC(519)
+FUNC(520)
+FUNC(521)
+FUNC(522)
+FUNC(523)
+FUNC(524)
+FUNC(525)
+FUNC(526)
+FUNC(527)
+FUNC(528)
+FUNC(529)
+FUNC(530)
+FUNC(531)
+FUNC(532)
+FUNC(533)
+FUNC(534)
+FUNC(535)
+FUNC(536)
+FUNC(537)
+FUNC(538)
+FUNC(539)
+FUNC(540)
+FUNC(541)
+FUNC(542)
+FUNC(543)
+FUNC(544)
+FUNC(545)
+FUNC(546)
+FUNC(547)
+FUNC(548)
+FUNC(549)
+FUNC(550)
+FUNC(551)
+FUNC(552)
+FUNC(553)
+FUNC(554)
+FUNC(555)
+FUNC(556)
+FUNC(557)
+FUNC(558)
+FUNC(559)
+FUNC(560)
+FUNC(561)
+FUNC(562)
+FUNC(563)
+FUNC(564)
+FUNC(565)
+FUNC(566)
+FUNC(567)
+FUNC(568)
+FUNC(569)
+FUNC(570)
+FUNC(571)
+FUNC(572)
+FUNC(573)
+FUNC(574)
+FUNC(575)
+FUNC(576)
+FUNC(577)
+FUNC(578)
+FUNC(579)
+FUNC(580)
+FUNC(581)
+FUNC(582)
+FUNC(583)
+FUNC(584)
+FUNC(585)
+FUNC(586)
+FUNC(587)
+FUNC(588)
+FUNC(589)
+FUNC(590)
+FUNC(591)
+FUNC(592)
+FUNC(593)
+FUNC(594)
+FUNC(595)
+FUNC(596)
+FUNC(597)
+FUNC(598)
+FUNC(599)
+FUNC(600)
+FUNC(601)
+FUNC(602)
+FUNC(603)
+FUNC(604)
+FUNC(605)
+FUNC(606)
+FUNC(607)
+FUNC(608)
+FUNC(609)
+FUNC(610)
+FUNC(611)
+FUNC(612)
+FUNC(613)
+FUNC(614)
+FUNC(615)
+FUNC(616)
+FUNC(617)
+FUNC(618)
+FUNC(619)
+FUNC(620)
+FUNC(621)
+FUNC(622)
+FUNC(623)
+FUNC(624)
+FUNC(625)
+FUNC(626)
+FUNC(627)
+FUNC(628)
+FUNC(629)
+FUNC(630)
+FUNC(631)
+FUNC(632)
+FUNC(633)
+FUNC(634)
+FUNC(635)
+FUNC(636)
+FUNC(637)
+FUNC(638)
+FUNC(639)
+FUNC(640)
+FUNC(641)
+FUNC(642)
+FUNC(643)
+FUNC(644)
+FUNC(645)
+FUNC(646)
+FUNC(647)
+FUNC(648)
+FUNC(649)
+FUNC(650)
+FUNC(651)
+FUNC(652)
+FUNC(653)
+FUNC(654)
+FUNC(655)
+FUNC(656)
+FUNC(657)
+FUNC(658)
+FUNC(659)
+FUNC(660)
+FUNC(661)
+FUNC(662)
+FUNC(663)
+FUNC(664)
+FUNC(665)
+FUNC(666)
+FUNC(667)
+FUNC(668)
+FUNC(669)
+FUNC(670)
+FUNC(671)
+FUNC(672)
+FUNC(673)
+FUNC(674)
+FUNC(675)
+FUNC(676)
+FUNC(677)
+FUNC(678)
+FUNC(679)
+FUNC(680)
+FUNC(681)
+FUNC(682)
+FUNC(683)
+FUNC(684)
+FUNC(685)
+FUNC(686)
+FUNC(687)
+FUNC(688)
+FUNC(689)
+FUNC(690)
+FUNC(691)
+FUNC(692)
+FUNC(693)
+FUNC(694)
+FUNC(695)
+FUNC(696)
+FUNC(697)
+FUNC(698)
+FUNC(699)
+FUNC(700)
+FUNC(701)
+FUNC(702)
+FUNC(703)
+FUNC(704)
+FUNC(705)
+FUNC(706)
+FUNC(707)
+FUNC(708)
+FUNC(709)
+FUNC(710)
+FUNC(711)
+FUNC(712)
+FUNC(713)
+FUNC(714)
+FUNC(715)
+FUNC(716)
+FUNC(717)
+FUNC(718)
+FUNC(719)
+FUNC(720)
+FUNC(721)
+FUNC(722)
+FUNC(723)
+FUNC(724)
+FUNC(725)
+FUNC(726)
+FUNC(727)
+FUNC(728)
+FUNC(729)
+FUNC(730)
+FUNC(731)
+FUNC(732)
+FUNC(733)
+FUNC(734)
+FUNC(735)
+FUNC(736)
+FUNC(737)
+FUNC(738)
+FUNC(739)
+FUNC(740)
+FUNC(741)
+FUNC(742)
+FUNC(743)
+FUNC(744)
+FUNC(745)
+FUNC(746)
+FUNC(747)
+FUNC(748)
+FUNC(749)
+FUNC(750)
+FUNC(751)
+FUNC(752)
+FUNC(753)
+FUNC(754)
+FUNC(755)
+FUNC(756)
+FUNC(757)
+FUNC(758)
+FUNC(759)
+FUNC(760)
+FUNC(761)
+FUNC(762)
+FUNC(763)
+FUNC(764)
+FUNC(765)
+FUNC(766)
+FUNC(767)
+FUNC(768)
+FUNC(769)
+FUNC(770)
+FUNC(771)
+FUNC(772)
+FUNC(773)
+FUNC(774)
+FUNC(775)
+FUNC(776)
+FUNC(777)
+FUNC(778)
+FUNC(779)
+FUNC(780)
+FUNC(781)
+FUNC(782)
+FUNC(783)
+FUNC(784)
+FUNC(785)
+FUNC(786)
+FUNC(787)
+FUNC(788)
+FUNC(789)
+FUNC(790)
+FUNC(791)
+FUNC(792)
+FUNC(793)
+FUNC(794)
+FUNC(795)
+FUNC(796)
+FUNC(797)
+FUNC(798)
+FUNC(799)
+FUNC(800)
+FUNC(801)
+FUNC(802)
+FUNC(803)
+FUNC(804)
+FUNC(805)
+FUNC(806)
+FUNC(807)
+FUNC(808)
+FUNC(809)
+FUNC(810)
+FUNC(811)
+FUNC(812)
+FUNC(813)
+FUNC(814)
+FUNC(815)
+FUNC(816)
+FUNC(817)
+FUNC(818)
+FUNC(819)
+FUNC(820)
+FUNC(821)
+FUNC(822)
+FUNC(823)
+FUNC(824)
+FUNC(825)
+FUNC(826)
+FUNC(827)
+FUNC(828)
+FUNC(829)
+FUNC(830)
+FUNC(831)
+FUNC(832)
+FUNC(833)
+FUNC(834)
+FUNC(835)
+FUNC(836)
+FUNC(837)
+FUNC(838)
+FUNC(839)
+FUNC(840)
+FUNC(841)
+FUNC(842)
+FUNC(843)
+FUNC(844)
+FUNC(845)
+FUNC(846)
+FUNC(847)
+FUNC(848)
+FUNC(849)
+FUNC(850)
+FUNC(851)
+FUNC(852)
+FUNC(853)
+FUNC(854)
+FUNC(855)
+FUNC(856)
+FUNC(857)
+FUNC(858)
+FUNC(859)
+FUNC(860)
+FUNC(861)
+FUNC(862)
+FUNC(863)
+FUNC(864)
+FUNC(865)
+FUNC(866)
+FUNC(867)
+FUNC(868)
+FUNC(869)
+FUNC(870)
+FUNC(871)
+FUNC(872)
+FUNC(873)
+FUNC(874)
+FUNC(875)
+FUNC(876)
+FUNC(877)
+FUNC(878)
+FUNC(879)
+FUNC(880)
+FUNC(881)
+FUNC(882)
+FUNC(883)
+FUNC(884)
+FUNC(885)
+FUNC(886)
+FUNC(887)
+FUNC(888)
+FUNC(889)
+FUNC(890)
+FUNC(891)
+FUNC(892)
+FUNC(893)
+FUNC(894)
+FUNC(895)
+FUNC(896)
+FUNC(897)
+FUNC(898)
+FUNC(899)
+FUNC(900)
+FUNC(901)
+FUNC(902)
+FUNC(903)
+FUNC(904)
+FUNC(905)
+FUNC(906)
+FUNC(907)
+FUNC(908)
+FUNC(909)
+FUNC(910)
+FUNC(911)
+FUNC(912)
+FUNC(913)
+FUNC(914)
+FUNC(915)
+FUNC(916)
+FUNC(917)
+FUNC(918)
+FUNC(919)
+FUNC(920)
+FUNC(921)
+FUNC(922)
+FUNC(923)
+FUNC(924)
+FUNC(925)
+FUNC(926)
+FUNC(927)
+FUNC(928)
+FUNC(929)
+FUNC(930)
+FUNC(931)
+FUNC(932)
+FUNC(933)
+FUNC(934)
+FUNC(935)
+FUNC(936)
+FUNC(937)
+FUNC(938)
+FUNC(939)
+FUNC(940)
+FUNC(941)
+FUNC(942)
+FUNC(943)
+FUNC(944)
+FUNC(945)
+FUNC(946)
+FUNC(947)
+FUNC(948)
+FUNC(949)
+FUNC(950)
+FUNC(951)
+FUNC(952)
+FUNC(953)
+FUNC(954)
+FUNC(955)
+FUNC(956)
+FUNC(957)
+FUNC(958)
+FUNC(959)
+FUNC(960)
+FUNC(961)
+FUNC(962)
+FUNC(963)
+FUNC(964)
+FUNC(965)
+FUNC(966)
+FUNC(967)
+FUNC(968)
+FUNC(969)
+FUNC(970)
+FUNC(971)
+FUNC(972)
+FUNC(973)
+FUNC(974)
+FUNC(975)
+FUNC(976)
+FUNC(977)
+FUNC(978)
+FUNC(979)
+FUNC(980)
+FUNC(981)
+FUNC(982)
+FUNC(983)
+FUNC(984)
+FUNC(985)
+FUNC(986)
+FUNC(987)
+FUNC(988)
+FUNC(989)
+FUNC(990)
+FUNC(991)
+FUNC(992)
+FUNC(993)
+FUNC(994)
+FUNC(995)
+FUNC(996)
+FUNC(997)
+FUNC(998)
+FUNC(999)
+FUNC(1000)
+FUNC(1001)
+FUNC(1002)
+FUNC(1003)
+FUNC(1004)
+FUNC(1005)
+FUNC(1006)
+FUNC(1007)
+FUNC(1008)
+FUNC(1009)
+FUNC(1010)
+FUNC(1011)
+FUNC(1012)
+FUNC(1013)
+FUNC(1014)
+FUNC(1015)
+FUNC(1016)
+FUNC(1017)
+FUNC(1018)
+FUNC(1019)
+FUNC(1020)
+FUNC(1021)
+FUNC(1022)
+FUNC(1023)
+FUNC(1024)
+FUNC(1025)
+FUNC(1026)
+FUNC(1027)
+FUNC(1028)
+FUNC(1029)
+FUNC(1030)
+FUNC(1031)
+FUNC(1032)
+FUNC(1033)
+FUNC(1034)
+FUNC(1035)
+FUNC(1036)
+FUNC(1037)
+FUNC(1038)
+FUNC(1039)
+FUNC(1040)
+FUNC(1041)
+FUNC(1042)
+FUNC(1043)
+FUNC(1044)
+FUNC(1045)
+FUNC(1046)
+FUNC(1047)
+FUNC(1048)
+FUNC(1049)
+FUNC(1050)
+FUNC(1051)
+FUNC(1052)
+FUNC(1053)
+FUNC(1054)
+FUNC(1055)
+FUNC(1056)
+FUNC(1057)
+FUNC(1058)
+FUNC(1059)
+FUNC(1060)
+FUNC(1061)
+FUNC(1062)
+FUNC(1063)
+FUNC(1064)
+FUNC(1065)
+FUNC(1066)
+FUNC(1067)
+FUNC(1068)
+FUNC(1069)
+FUNC(1070)
+FUNC(1071)
+FUNC(1072)
+FUNC(1073)
+FUNC(1074)
+FUNC(1075)
+FUNC(1076)
+FUNC(1077)
+FUNC(1078)
+FUNC(1079)
+FUNC(1080)
+FUNC(1081)
+FUNC(1082)
+FUNC(1083)
+FUNC(1084)
+FUNC(1085)
+FUNC(1086)
+FUNC(1087)
+FUNC(1088)
+FUNC(1089)
+FUNC(1090)
+FUNC(1091)
+FUNC(1092)
+FUNC(1093)
+FUNC(1094)
+FUNC(1095)
+FUNC(1096)
+FUNC(1097)
+FUNC(1098)
+FUNC(1099)
+FUNC(1100)
+FUNC(1101)
+FUNC(1102)
+FUNC(1103)
+FUNC(1104)
+FUNC(1105)
+FUNC(1106)
+FUNC(1107)
+FUNC(1108)
+FUNC(1109)
+FUNC(1110)
+FUNC(1111)
+FUNC(1112)
+FUNC(1113)
+FUNC(1114)
+FUNC(1115)
+FUNC(1116)
+FUNC(1117)
+FUNC(1118)
+FUNC(1119)
+FUNC(1120)
+FUNC(1121)
+FUNC(1122)
+FUNC(1123)
+FUNC(1124)
+FUNC(1125)
+FUNC(1126)
+FUNC(1127)
+FUNC(1128)
+FUNC(1129)
+FUNC(1130)
+FUNC(1131)
+FUNC(1132)
+FUNC(1133)
+FUNC(1134)
+FUNC(1135)
+FUNC(1136)
+FUNC(1137)
+FUNC(1138)
+FUNC(1139)
+FUNC(1140)
+FUNC(1141)
+FUNC(1142)
+FUNC(1143)
+FUNC(1144)
+FUNC(1145)
+FUNC(1146)
+FUNC(1147)
+FUNC(1148)
+FUNC(1149)
+FUNC(1150)
+FUNC(1151)
+FUNC(1152)
+FUNC(1153)
+FUNC(1154)
+FUNC(1155)
+FUNC(1156)
+FUNC(1157)
+FUNC(1158)
+FUNC(1159)
+FUNC(1160)
+FUNC(1161)
+FUNC(1162)
+FUNC(1163)
+FUNC(1164)
+FUNC(1165)
+FUNC(1166)
+FUNC(1167)
+FUNC(1168)
+FUNC(1169)
+FUNC(1170)
+FUNC(1171)
+FUNC(1172)
+FUNC(1173)
+FUNC(1174)
+FUNC(1175)
+FUNC(1176)
+FUNC(1177)
+FUNC(1178)
+FUNC(1179)
+FUNC(1180)
+FUNC(1181)
+FUNC(1182)
+FUNC(1183)
+FUNC(1184)
+FUNC(1185)
+FUNC(1186)
+FUNC(1187)
+FUNC(1188)
+FUNC(1189)
+FUNC(1190)
+FUNC(1191)
+FUNC(1192)
+FUNC(1193)
+FUNC(1194)
+FUNC(1195)
+FUNC(1196)
+FUNC(1197)
+FUNC(1198)
+FUNC(1199)
+FUNC(1200)
+FUNC(1201)
+FUNC(1202)
+FUNC(1203)
+FUNC(1204)
+FUNC(1205)
+FUNC(1206)
+FUNC(1207)
+FUNC(1208)
+FUNC(1209)
+FUNC(1210)
+FUNC(1211)
+FUNC(1212)
+FUNC(1213)
+FUNC(1214)
+FUNC(1215)
+FUNC(1216)
+FUNC(1217)
+FUNC(1218)
+FUNC(1219)
+FUNC(1220)
+FUNC(1221)
+FUNC(1222)
+FUNC(1223)
+FUNC(1224)
+FUNC(1225)
+FUNC(1226)
+FUNC(1227)
+FUNC(1228)
+FUNC(1229)
+FUNC(1230)
+FUNC(1231)
+FUNC(1232)
+FUNC(1233)
+FUNC(1234)
+FUNC(1235)
+FUNC(1236)
+FUNC(1237)
+FUNC(1238)
+FUNC(1239)
+FUNC(1240)
+FUNC(1241)
+FUNC(1242)
+FUNC(1243)
+FUNC(1244)
+FUNC(1245)
+FUNC(1246)
+FUNC(1247)
+FUNC(1248)
+FUNC(1249)
+FUNC(1250)
+FUNC(1251)
+FUNC(1252)
+FUNC(1253)
+FUNC(1254)
+FUNC(1255)
+FUNC(1256)
+FUNC(1257)
+FUNC(1258)
+FUNC(1259)
+FUNC(1260)
+FUNC(1261)
+FUNC(1262)
+FUNC(1263)
+FUNC(1264)
+FUNC(1265)
+FUNC(1266)
+FUNC(1267)
+FUNC(1268)
+FUNC(1269)
+FUNC(1270)
+FUNC(1271)
+FUNC(1272)
+FUNC(1273)
+FUNC(1274)
+FUNC(1275)
+FUNC(1276)
+FUNC(1277)
+FUNC(1278)
+FUNC(1279)
+FUNC(1280)
+FUNC(1281)
+FUNC(1282)
+FUNC(1283)
+FUNC(1284)
+FUNC(1285)
+FUNC(1286)
+FUNC(1287)
+FUNC(1288)
+FUNC(1289)
+FUNC(1290)
+FUNC(1291)
+FUNC(1292)
+FUNC(1293)
+FUNC(1294)
+FUNC(1295)
+FUNC(1296)
+FUNC(1297)
+FUNC(1298)
+FUNC(1299)
+FUNC(1300)
+FUNC(1301)
+FUNC(1302)
+FUNC(1303)
+FUNC(1304)
+FUNC(1305)
+FUNC(1306)
+FUNC(1307)
+FUNC(1308)
+FUNC(1309)
+FUNC(1310)
+FUNC(1311)
+FUNC(1312)
+FUNC(1313)
+FUNC(1314)
+FUNC(1315)
+FUNC(1316)
+FUNC(1317)
+FUNC(1318)
+FUNC(1319)
+FUNC(1320)
+FUNC(1321)
+FUNC(1322)
+FUNC(1323)
+FUNC(1324)
+FUNC(1325)
+FUNC(1326)
+FUNC(1327)
+FUNC(1328)
+FUNC(1329)
+FUNC(1330)
+FUNC(1331)
+FUNC(1332)
+FUNC(1333)
+FUNC(1334)
+FUNC(1335)
+FUNC(1336)
+FUNC(1337)
+FUNC(1338)
+FUNC(1339)
+FUNC(1340)
+FUNC(1341)
+FUNC(1342)
+FUNC(1343)
+FUNC(1344)
+FUNC(1345)
+FUNC(1346)
+FUNC(1347)
+FUNC(1348)
+FUNC(1349)
+FUNC(1350)
+FUNC(1351)
+FUNC(1352)
+FUNC(1353)
+FUNC(1354)
+FUNC(1355)
+FUNC(1356)
+FUNC(1357)
+FUNC(1358)
+FUNC(1359)
+FUNC(1360)
+FUNC(1361)
+FUNC(1362)
+FUNC(1363)
+FUNC(1364)
+FUNC(1365)
+FUNC(1366)
+FUNC(1367)
+FUNC(1368)
+FUNC(1369)
+FUNC(1370)
+FUNC(1371)
+FUNC(1372)
+FUNC(1373)
+FUNC(1374)
+FUNC(1375)
+FUNC(1376)
+FUNC(1377)
+FUNC(1378)
+FUNC(1379)
+FUNC(1380)
+FUNC(1381)
+FUNC(1382)
+FUNC(1383)
+FUNC(1384)
+FUNC(1385)
+FUNC(1386)
+FUNC(1387)
+FUNC(1388)
+FUNC(1389)
+FUNC(1390)
+FUNC(1391)
+FUNC(1392)
+FUNC(1393)
+FUNC(1394)
+FUNC(1395)
+FUNC(1396)
+FUNC(1397)
+FUNC(1398)
+FUNC(1399)
+FUNC(1400)
+FUNC(1401)
+FUNC(1402)
+FUNC(1403)
+FUNC(1404)
+FUNC(1405)
+FUNC(1406)
+FUNC(1407)
+FUNC(1408)
+FUNC(1409)
+FUNC(1410)
+FUNC(1411)
+FUNC(1412)
+FUNC(1413)
+FUNC(1414)
+FUNC(1415)
+FUNC(1416)
+FUNC(1417)
+FUNC(1418)
+FUNC(1419)
+FUNC(1420)
+FUNC(1421)
+FUNC(1422)
+FUNC(1423)
+FUNC(1424)
+FUNC(1425)
+FUNC(1426)
+FUNC(1427)
+FUNC(1428)
+FUNC(1429)
+FUNC(1430)
+FUNC(1431)
+FUNC(1432)
+FUNC(1433)
+FUNC(1434)
+FUNC(1435)
+FUNC(1436)
+FUNC(1437)
+FUNC(1438)
+FUNC(1439)
+FUNC(1440)
+FUNC(1441)
+FUNC(1442)
+FUNC(1443)
+FUNC(1444)
+FUNC(1445)
+FUNC(1446)
+FUNC(1447)
+FUNC(1448)
+FUNC(1449)
+FUNC(1450)
+FUNC(1451)
+FUNC(1452)
+FUNC(1453)
+FUNC(1454)
+FUNC(1455)
+FUNC(1456)
+FUNC(1457)
+FUNC(1458)
+FUNC(1459)
+FUNC(1460)
+FUNC(1461)
+FUNC(1462)
+FUNC(1463)
+FUNC(1464)
+FUNC(1465)
+FUNC(1466)
+FUNC(1467)
+FUNC(1468)
+FUNC(1469)
+FUNC(1470)
+FUNC(1471)
+FUNC(1472)
+FUNC(1473)
+FUNC(1474)
+FUNC(1475)
+FUNC(1476)
+FUNC(1477)
+FUNC(1478)
+FUNC(1479)
+FUNC(1480)
+FUNC(1481)
+FUNC(1482)
+FUNC(1483)
+FUNC(1484)
+FUNC(1485)
+FUNC(1486)
+FUNC(1487)
+FUNC(1488)
+FUNC(1489)
+FUNC(1490)
+FUNC(1491)
+FUNC(1492)
+FUNC(1493)
+FUNC(1494)
+FUNC(1495)
+FUNC(1496)
+FUNC(1497)
+FUNC(1498)
+FUNC(1499)
+FUNC(1500)
+FUNC(1501)
+FUNC(1502)
+FUNC(1503)
+FUNC(1504)
+FUNC(1505)
+FUNC(1506)
+FUNC(1507)
+FUNC(1508)
+FUNC(1509)
+FUNC(1510)
+FUNC(1511)
+FUNC(1512)
+FUNC(1513)
+FUNC(1514)
+FUNC(1515)
+FUNC(1516)
+FUNC(1517)
+FUNC(1518)
+FUNC(1519)
+FUNC(1520)
+FUNC(1521)
+FUNC(1522)
+FUNC(1523)
+FUNC(1524)
+FUNC(1525)
+FUNC(1526)
+FUNC(1527)
+FUNC(1528)
+FUNC(1529)
+FUNC(1530)
+FUNC(1531)
+FUNC(1532)
+FUNC(1533)
+FUNC(1534)
+FUNC(1535)
+FUNC(1536)
+FUNC(1537)
+FUNC(1538)
+FUNC(1539)
+FUNC(1540)
+FUNC(1541)
+FUNC(1542)
+FUNC(1543)
+FUNC(1544)
+FUNC(1545)
+FUNC(1546)
+FUNC(1547)
+FUNC(1548)
+FUNC(1549)
+FUNC(1550)
+FUNC(1551)
+FUNC(1552)
+FUNC(1553)
+FUNC(1554)
+FUNC(1555)
+FUNC(1556)
+FUNC(1557)
+FUNC(1558)
+FUNC(1559)
+FUNC(1560)
+FUNC(1561)
+FUNC(1562)
+FUNC(1563)
+FUNC(1564)
+FUNC(1565)
+FUNC(1566)
+FUNC(1567)
+FUNC(1568)
+FUNC(1569)
+FUNC(1570)
+FUNC(1571)
+FUNC(1572)
+FUNC(1573)
+FUNC(1574)
+FUNC(1575)
+FUNC(1576)
+FUNC(1577)
+FUNC(1578)
+FUNC(1579)
+FUNC(1580)
+FUNC(1581)
+FUNC(1582)
+FUNC(1583)
+FUNC(1584)
+FUNC(1585)
+FUNC(1586)
+FUNC(1587)
+FUNC(1588)
+FUNC(1589)
+FUNC(1590)
+FUNC(1591)
+FUNC(1592)
+FUNC(1593)
+FUNC(1594)
+FUNC(1595)
+FUNC(1596)
+FUNC(1597)
+FUNC(1598)
+FUNC(1599)
+FUNC(1600)
+FUNC(1601)
+FUNC(1602)
+FUNC(1603)
+FUNC(1604)
+FUNC(1605)
+FUNC(1606)
+FUNC(1607)
+FUNC(1608)
+FUNC(1609)
+FUNC(1610)
+FUNC(1611)
+FUNC(1612)
+FUNC(1613)
+FUNC(1614)
+FUNC(1615)
+FUNC(1616)
+FUNC(1617)
+FUNC(1618)
+FUNC(1619)
+FUNC(1620)
+FUNC(1621)
+FUNC(1622)
+FUNC(1623)
+FUNC(1624)
+FUNC(1625)
+FUNC(1626)
+FUNC(1627)
+FUNC(1628)
+FUNC(1629)
+FUNC(1630)
+FUNC(1631)
+FUNC(1632)
+FUNC(1633)
+FUNC(1634)
+FUNC(1635)
+FUNC(1636)
+FUNC(1637)
+FUNC(1638)
+FUNC(1639)
+FUNC(1640)
+FUNC(1641)
+FUNC(1642)
+FUNC(1643)
+FUNC(1644)
+FUNC(1645)
+FUNC(1646)
+FUNC(1647)
+FUNC(1648)
+FUNC(1649)
+FUNC(1650)
+FUNC(1651)
+FUNC(1652)
+FUNC(1653)
+FUNC(1654)
+FUNC(1655)
+FUNC(1656)
+FUNC(1657)
+FUNC(1658)
+FUNC(1659)
+FUNC(1660)
+FUNC(1661)
+FUNC(1662)
+FUNC(1663)
+FUNC(1664)
+FUNC(1665)
+FUNC(1666)
+FUNC(1667)
+FUNC(1668)
+FUNC(1669)
+FUNC(1670)
+FUNC(1671)
+FUNC(1672)
+FUNC(1673)
+FUNC(1674)
+FUNC(1675)
+FUNC(1676)
+FUNC(1677)
+FUNC(1678)
+FUNC(1679)
+FUNC(1680)
+FUNC(1681)
+FUNC(1682)
+FUNC(1683)
+FUNC(1684)
+FUNC(1685)
+FUNC(1686)
+FUNC(1687)
+FUNC(1688)
+FUNC(1689)
+FUNC(1690)
+FUNC(1691)
+FUNC(1692)
+FUNC(1693)
+FUNC(1694)
+FUNC(1695)
+FUNC(1696)
+FUNC(1697)
+FUNC(1698)
+FUNC(1699)
+FUNC(1700)
+FUNC(1701)
+FUNC(1702)
+FUNC(1703)
+FUNC(1704)
+FUNC(1705)
+FUNC(1706)
+FUNC(1707)
+FUNC(1708)
+FUNC(1709)
+FUNC(1710)
+FUNC(1711)
+FUNC(1712)
+FUNC(1713)
+FUNC(1714)
+FUNC(1715)
+FUNC(1716)
+FUNC(1717)
+FUNC(1718)
+FUNC(1719)
+FUNC(1720)
+FUNC(1721)
+FUNC(1722)
+FUNC(1723)
+FUNC(1724)
+FUNC(1725)
+FUNC(1726)
+FUNC(1727)
+FUNC(1728)
+FUNC(1729)
+FUNC(1730)
+FUNC(1731)
+FUNC(1732)
+FUNC(1733)
+FUNC(1734)
+FUNC(1735)
+FUNC(1736)
+FUNC(1737)
+FUNC(1738)
+FUNC(1739)
+FUNC(1740)
+FUNC(1741)
+FUNC(1742)
+FUNC(1743)
+FUNC(1744)
+FUNC(1745)
+FUNC(1746)
+FUNC(1747)
+FUNC(1748)
+FUNC(1749)
+FUNC(1750)
+FUNC(1751)
+FUNC(1752)
+FUNC(1753)
+FUNC(1754)
+FUNC(1755)
+FUNC(1756)
+FUNC(1757)
+FUNC(1758)
+FUNC(1759)
+FUNC(1760)
+FUNC(1761)
+FUNC(1762)
+FUNC(1763)
+FUNC(1764)
+FUNC(1765)
+FUNC(1766)
+FUNC(1767)
+FUNC(1768)
+FUNC(1769)
+FUNC(1770)
+FUNC(1771)
+FUNC(1772)
+FUNC(1773)
+FUNC(1774)
+FUNC(1775)
+FUNC(1776)
+FUNC(1777)
+FUNC(1778)
+FUNC(1779)
+FUNC(1780)
+FUNC(1781)
+FUNC(1782)
+FUNC(1783)
+FUNC(1784)
+FUNC(1785)
+FUNC(1786)
+FUNC(1787)
+FUNC(1788)
+FUNC(1789)
+FUNC(1790)
+FUNC(1791)
+FUNC(1792)
+FUNC(1793)
+FUNC(1794)
+FUNC(1795)
+FUNC(1796)
+FUNC(1797)
+FUNC(1798)
+FUNC(1799)
+FUNC(1800)
+FUNC(1801)
+FUNC(1802)
+FUNC(1803)
+FUNC(1804)
+FUNC(1805)
+FUNC(1806)
+FUNC(1807)
+FUNC(1808)
+FUNC(1809)
+FUNC(1810)
+FUNC(1811)
+FUNC(1812)
+FUNC(1813)
+FUNC(1814)
+FUNC(1815)
+FUNC(1816)
+FUNC(1817)
+FUNC(1818)
+FUNC(1819)
+FUNC(1820)
+FUNC(1821)
+FUNC(1822)
+FUNC(1823)
+FUNC(1824)
+FUNC(1825)
+FUNC(1826)
+FUNC(1827)
+FUNC(1828)
+FUNC(1829)
+FUNC(1830)
+FUNC(1831)
+FUNC(1832)
+FUNC(1833)
+FUNC(1834)
+FUNC(1835)
+FUNC(1836)
+FUNC(1837)
+FUNC(1838)
+FUNC(1839)
+FUNC(1840)
+FUNC(1841)
+FUNC(1842)
+FUNC(1843)
+FUNC(1844)
+FUNC(1845)
+FUNC(1846)
+FUNC(1847)
+FUNC(1848)
+FUNC(1849)
+FUNC(1850)
+FUNC(1851)
+FUNC(1852)
+FUNC(1853)
+FUNC(1854)
+FUNC(1855)
+FUNC(1856)
+FUNC(1857)
+FUNC(1858)
+FUNC(1859)
+FUNC(1860)
+FUNC(1861)
+FUNC(1862)
+FUNC(1863)
+FUNC(1864)
+FUNC(1865)
+FUNC(1866)
+FUNC(1867)
+FUNC(1868)
+FUNC(1869)
+FUNC(1870)
+FUNC(1871)
+FUNC(1872)
+FUNC(1873)
+FUNC(1874)
+FUNC(1875)
+FUNC(1876)
+FUNC(1877)
+FUNC(1878)
+FUNC(1879)
+FUNC(1880)
+FUNC(1881)
+FUNC(1882)
+FUNC(1883)
+FUNC(1884)
+FUNC(1885)
+FUNC(1886)
+FUNC(1887)
+FUNC(1888)
+FUNC(1889)
+FUNC(1890)
+FUNC(1891)
+FUNC(1892)
+FUNC(1893)
+FUNC(1894)
+FUNC(1895)
+FUNC(1896)
+FUNC(1897)
+FUNC(1898)
+FUNC(1899)
+FUNC(1900)
+FUNC(1901)
+FUNC(1902)
+FUNC(1903)
+FUNC(1904)
+FUNC(1905)
+FUNC(1906)
+FUNC(1907)
+FUNC(1908)
+FUNC(1909)
+FUNC(1910)
+FUNC(1911)
+FUNC(1912)
+FUNC(1913)
+FUNC(1914)
+FUNC(1915)
+FUNC(1916)
+FUNC(1917)
+FUNC(1918)
+FUNC(1919)
+FUNC(1920)
+FUNC(1921)
+FUNC(1922)
+FUNC(1923)
+FUNC(1924)
+FUNC(1925)
+FUNC(1926)
+FUNC(1927)
+FUNC(1928)
+FUNC(1929)
+FUNC(1930)
+FUNC(1931)
+FUNC(1932)
+FUNC(1933)
+FUNC(1934)
+FUNC(1935)
+FUNC(1936)
+FUNC(1937)
+FUNC(1938)
+FUNC(1939)
+FUNC(1940)
+FUNC(1941)
+FUNC(1942)
+FUNC(1943)
+FUNC(1944)
+FUNC(1945)
+FUNC(1946)
+FUNC(1947)
+FUNC(1948)
+FUNC(1949)
+FUNC(1950)
+FUNC(1951)
+FUNC(1952)
+FUNC(1953)
+FUNC(1954)
+FUNC(1955)
+FUNC(1956)
+FUNC(1957)
+FUNC(1958)
+FUNC(1959)
+FUNC(1960)
+FUNC(1961)
+FUNC(1962)
+FUNC(1963)
+FUNC(1964)
+FUNC(1965)
+FUNC(1966)
+FUNC(1967)
+FUNC(1968)
+FUNC(1969)
+FUNC(1970)
+FUNC(1971)
+FUNC(1972)
+FUNC(1973)
+FUNC(1974)
+FUNC(1975)
+FUNC(1976)
+FUNC(1977)
+FUNC(1978)
+FUNC(1979)
+FUNC(1980)
+FUNC(1981)
+FUNC(1982)
+FUNC(1983)
+FUNC(1984)
+FUNC(1985)
+FUNC(1986)
+FUNC(1987)
+FUNC(1988)
+FUNC(1989)
+FUNC(1990)
+FUNC(1991)
+FUNC(1992)
+FUNC(1993)
+FUNC(1994)
+FUNC(1995)
+FUNC(1996)
+FUNC(1997)
+FUNC(1998)
+FUNC(1999)
+FUNC(2000)
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/exeabiv2_defaults.mk
--- a/sbsv2/raptor/lib/flm/test/exeabiv2_defaults.mk	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/exeabiv2_defaults.mk	Mon Nov 16 09:46:46 2009 +0000
@@ -1,48 +1,48 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-##
-# Defaults for ABIv2 EXE build tests
-
-## Purpose: To enable all test makefiles to be updated rapidly
-
-
-include $(FLMHOME)/e32abiv2.mk
-
-
-DEBUG:=1
-
-CAPABILITY:=LocalServices ReadDeviceData ReadUserData
-UID1:=0x1000007a
-UID2:=0x100039ce
-UID3:=0x000001
-VID:=0x000001
-SID:=0x10003a5c
-EXETARGET:=
-TARGETTYPE:=EXE
-MAPFILENAME:=
-BMPS:=
-EPOCDATA:=
-
-VARIANTARCH:=ARMV5
-FULLVARIANTPATH=$(VARIANTARCH)/$(VARIANTTYPE)
-STATIC_LIBS_PATH:=$(call fromnativepath,$(RVCT22LIB))/armlib
-RUNTIME_LIBS_PATH=$(RELEASEPATH)/$(VARIANTARCH)/LIB
-RELEASEPATH:=$(EPOCROOT)/epoc32/release
-FLM:=e32abiv2exe.flm
-CDEFS:=$(CDEFS) __EXE__
-
-
-
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+##
+# Defaults for ABIv2 EXE build tests
+
+## Purpose: To enable all test makefiles to be updated rapidly
+
+
+include $(FLMHOME)/e32abiv2.mk
+
+
+DEBUG:=1
+
+CAPABILITY:=LocalServices ReadDeviceData ReadUserData
+UID1:=0x1000007a
+UID2:=0x100039ce
+UID3:=0x000001
+VID:=0x000001
+SID:=0x10003a5c
+EXETARGET:=
+TARGETTYPE:=EXE
+MAPFILENAME:=
+BMPS:=
+EPOCDATA:=
+
+VARIANTARCH:=ARMV5
+FULLVARIANTPATH=$(VARIANTARCH)/$(VARIANTTYPE)
+STATIC_LIBS_PATH:=$(call fromnativepath,$(RVCT22LIB))/armlib
+RUNTIME_LIBS_PATH=$(RELEASEPATH)/$(VARIANTARCH)/LIB
+RELEASEPATH:=$(EPOCROOT)/epoc32/release
+FLM:=e32abiv2exe.flm
+CDEFS:=$(CDEFS) __EXE__
+
+
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/exebasictests.mk
--- a/sbsv2/raptor/lib/flm/test/exebasictests.mk	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/exebasictests.mk	Mon Nov 16 09:46:46 2009 +0000
@@ -1,30 +1,30 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-##
-# A grouping glue makefile that runs all tests
-
-## Purpose: Run test makefiles in parallel to ensure that they all work
-## Postconditions: All postconditions for all the makefiles are satisfied
-
-include $(FLMHOME)/flmtools.mk
-
-$(call vsave,ALLTARGET OUTPUTPATH FART)
-COMPONENT_ALLTARGETS:=$(RELEASEPATH)/$(FULLVARIANTPATH)/exeabiv2_1.exe $(RELEASEPATH)/$(FULLVARIANTPATH)/exeabiv2_2.exe
-COMPONENT_GLUEMAKEFILES:=exeabiv2_1/exeabiv2_1.mk exeabiv2_2/exeabiv2_2.mk
-$(ALLTARGET):: exebasictests
-ALLTARGET:=exebasictests
-include $(FLMHOME)/grouping.flm
-$(call vrestore)
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+##
+# A grouping glue makefile that runs all tests
+
+## Purpose: Run test makefiles in parallel to ensure that they all work
+## Postconditions: All postconditions for all the makefiles are satisfied
+
+include $(FLMHOME)/flmtools.mk
+
+$(call vsave,ALLTARGET OUTPUTPATH FART)
+COMPONENT_ALLTARGETS:=$(RELEASEPATH)/$(FULLVARIANTPATH)/exeabiv2_1.exe $(RELEASEPATH)/$(FULLVARIANTPATH)/exeabiv2_2.exe
+COMPONENT_GLUEMAKEFILES:=exeabiv2_1/exeabiv2_1.mk exeabiv2_2/exeabiv2_2.mk
+$(ALLTARGET):: exebasictests
+ALLTARGET:=exebasictests
+include $(FLMHOME)/grouping.flm
+$(call vrestore)
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/exeperftests.mk
--- a/sbsv2/raptor/lib/flm/test/exeperftests.mk	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/exeperftests.mk	Mon Nov 16 09:46:46 2009 +0000
@@ -1,31 +1,31 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-##
-# A grouping glue makefile that runs all tests
-
-## Purpose: Run test makefiles in parallel to ensure that they all work
-## Postconditions: All postconditions for all the makefiles are satisfied
-
-include $(FLMHOME)/flmtools.mk
-
-$(call vsave,ALLTARGET OUTPUTPATH)
-COMPONENT_ALLTARGETS:=$(RELEASEPATH)/$(FULLVARIANTPATH)/exeabiv2_3.exe $(RELEASEPATH)/$(FULLVARIANTPATH)/exeabiv2_4.exe
-COMPONENT_GLUEMAKEFILES:=exeabiv2_3/exeabiv2_3.mk exeabiv2_4/exeabiv2_4.mk
-$(ALLTARGET):: exeperftests
-ALLTARGET:=exeperftests
-
-include $(FLMHOME)/grouping.flm
-$(call vrestore)
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+##
+# A grouping glue makefile that runs all tests
+
+## Purpose: Run test makefiles in parallel to ensure that they all work
+## Postconditions: All postconditions for all the makefiles are satisfied
+
+include $(FLMHOME)/flmtools.mk
+
+$(call vsave,ALLTARGET OUTPUTPATH)
+COMPONENT_ALLTARGETS:=$(RELEASEPATH)/$(FULLVARIANTPATH)/exeabiv2_3.exe $(RELEASEPATH)/$(FULLVARIANTPATH)/exeabiv2_4.exe
+COMPONENT_GLUEMAKEFILES:=exeabiv2_3/exeabiv2_3.mk exeabiv2_4/exeabiv2_4.mk
+$(ALLTARGET):: exeperftests
+ALLTARGET:=exeperftests
+
+include $(FLMHOME)/grouping.flm
+$(call vrestore)
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/export1/Makefile
--- a/sbsv2/raptor/lib/flm/test/export1/Makefile	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/export1/Makefile	Mon Nov 16 09:46:46 2009 +0000
@@ -1,10 +1,10 @@
-
-EXPORT:=testexport/test1exp.h<-t1e.h \
-	testexport/test2exp.h<-t2e.h \
-	testexport/test3exp.h<-t1e.h \
-	testexport/test4exp.h<-t2e.h
-
-ALLTARGET:=all
-
-include $(FLMHOME)/export.flm
-
+
+EXPORT:=testexport/test1exp.h<-t1e.h \
+	testexport/test2exp.h<-t2e.h \
+	testexport/test3exp.h<-t1e.h \
+	testexport/test4exp.h<-t2e.h
+
+ALLTARGET:=all
+
+include $(FLMHOME)/export.flm
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/export1/t1e.h
--- a/sbsv2/raptor/lib/flm/test/export1/t1e.h	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/export1/t1e.h	Mon Nov 16 09:46:46 2009 +0000
@@ -1,20 +1,20 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-/*
-  test header file.
-
-*/
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+/*
+  test header file.
+
+*/
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/export1/t2e.h
--- a/sbsv2/raptor/lib/flm/test/export1/t2e.h	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/export1/t2e.h	Mon Nov 16 09:46:46 2009 +0000
@@ -1,20 +1,20 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-/*
-  test header file.
-
-*/
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+/*
+  test header file.
+
+*/
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/export1/t3e.h
--- a/sbsv2/raptor/lib/flm/test/export1/t3e.h	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/export1/t3e.h	Mon Nov 16 09:46:46 2009 +0000
@@ -1,20 +1,20 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-/*
-  test header file.
-
-*/
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+/*
+  test header file.
+
+*/
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/export1/t4e.h
--- a/sbsv2/raptor/lib/flm/test/export1/t4e.h	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/export1/t4e.h	Mon Nov 16 09:46:46 2009 +0000
@@ -1,20 +1,20 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-/*
-  test header file.
-
-*/
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+/*
+  test header file.
+
+*/
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/flmtests.mk
--- a/sbsv2/raptor/lib/flm/test/flmtests.mk	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/flmtests.mk	Mon Nov 16 09:46:46 2009 +0000
@@ -1,35 +1,35 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-##
-# A grouping glue makefile that runs all tests
-
-## Purpose: Run test makefiles in parallel to ensure that they all work
-## Postconditions: All postconditions for all the makefiles are satisfied
-
-#COMPONENT_ALLTARGETS:=$(RELEASEPATH)/$(FULLVARIANTPATH)/exeabiv2_1/exeabiv2_1.exe
-#COMPONENT_GLUEMAKEFILES:=exeabiv2_1/exeabiv2_1.mk
-
-#COMPONENT_ALLTARGETS:=$(RELEASEPATH)/$(FULLVARIANTPATH)/exeabiv2_1/exeabiv2_1.exe $(RELEASEPATH)/$(FULLVARIANTPATH)/exeabiv2_2/exeabiv2_2.exe $(RELEASEPATH)/$(FULLVARIANTPATH)/exeabiv2_3/exeabiv2_3.exe $(RELEASEPATH)/$(FULLVARIANTPATH)/exeabiv2_4/exeabiv2_4.exe
-#COMPONENT_GLUEMAKEFILES:=exeabiv2_1/exeabiv2_1.mk exeabiv2_2/exeabiv2_2.mk exeabiv2_3/exeabiv2_3.mk exeabiv2_4/exeabiv2_4.mk
-
-
-#COMPONENT_ALLTARGETS:=$(RELEASEPATH)/$(FULLVARIANTPATH)/nothing/nothing.mk
-#COMPONENT_GLUEMAKEFILES:=nothing/nothing.mk
-
-COMPONENT_ALLTARGETS:=$(RELEASEPATH)/$(FULLVARIANTPATH)/ciaabiv2_1
-COMPONENT_GLUEMAKEFILES:=ciaabiv2_1/ciaabiv2_1.mk
-
-include $(FLMHOME)/grouping.flm
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+##
+# A grouping glue makefile that runs all tests
+
+## Purpose: Run test makefiles in parallel to ensure that they all work
+## Postconditions: All postconditions for all the makefiles are satisfied
+
+#COMPONENT_ALLTARGETS:=$(RELEASEPATH)/$(FULLVARIANTPATH)/exeabiv2_1/exeabiv2_1.exe
+#COMPONENT_GLUEMAKEFILES:=exeabiv2_1/exeabiv2_1.mk
+
+#COMPONENT_ALLTARGETS:=$(RELEASEPATH)/$(FULLVARIANTPATH)/exeabiv2_1/exeabiv2_1.exe $(RELEASEPATH)/$(FULLVARIANTPATH)/exeabiv2_2/exeabiv2_2.exe $(RELEASEPATH)/$(FULLVARIANTPATH)/exeabiv2_3/exeabiv2_3.exe $(RELEASEPATH)/$(FULLVARIANTPATH)/exeabiv2_4/exeabiv2_4.exe
+#COMPONENT_GLUEMAKEFILES:=exeabiv2_1/exeabiv2_1.mk exeabiv2_2/exeabiv2_2.mk exeabiv2_3/exeabiv2_3.mk exeabiv2_4/exeabiv2_4.mk
+
+
+#COMPONENT_ALLTARGETS:=$(RELEASEPATH)/$(FULLVARIANTPATH)/nothing/nothing.mk
+#COMPONENT_GLUEMAKEFILES:=nothing/nothing.mk
+
+COMPONENT_ALLTARGETS:=$(RELEASEPATH)/$(FULLVARIANTPATH)/ciaabiv2_1
+COMPONENT_GLUEMAKEFILES:=ciaabiv2_1/ciaabiv2_1.mk
+
+include $(FLMHOME)/grouping.flm
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/raptorglue/raptorglue.mk
--- a/sbsv2/raptor/lib/flm/test/raptorglue/raptorglue.mk	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/raptorglue/raptorglue.mk	Mon Nov 16 09:46:46 2009 +0000
@@ -1,133 +1,133 @@
-
-# test a "real" raptor gluefile
-# generated by Raptor 0.0.1
-
-RAPTOR_HOME?=/localhome/tmurphy/pf/EPOC/development/tools/personal/tmurphy/tools/raptor
-EPOCROOT?=/tmp/tim-epocroot/
-
-# start simple 
-
-# configuration ARMV5_UDEB
-AAPCS_OPTION:=--apcs /inter
-CAPABILITY:=LocalServices ReadDeviceData ReadUserData
-CC:=armcc
-CC_ERRORS_CONTROL_OPTION:=--diag_error 1267
-CC_WARNINGS_CONTROL_OPTION:=--diag_suppress 161,611,654,997,1152,1300,1464,1488,6318
-CDEFS:=__MARM_THUMB__ __MARM_INTERWORK__ _UNICODE __SYMBIAN32__ __ARMCC__ __EPOC32__ __MARM__ __EABI__ __PRODUCT_INCLUDE=\"$(EPOCROOT)/epoc32/include/variant/Symbian_OS_vFuture.hrh\" _EXE_
-CFLAGS:=
-COMMANDFILE_OPTION:=--via
-COMPILE_ONLY_OPTION:=-c
-CPP_LANG_OPTION:=--cpp
-CREATABLEPATHS:=
-SOURCEFILES:=$(RAPTOR_HOME)/test/simple/test.cpp
-ELF2E32:=$(EPOCROOT)/epoc32/tools/elf2e32$(DOTEXE)
-ENUM_OPTION:=--enum_is_int
-EXCEPTIONS:=--exceptions --exceptions_unwind
-EXEBASELIBS:=usrt2_2.lib euser.dso efsrv.dso bafl.dso commsdat.dso
-EXENAME:=test
-EXPORT_VTBL_OPTION:=--export_all_vtbl
-FLMHOME:=$(RAPTOR_HOME)/lib/flm
-FPMODE_OPTION:=--fpmode ieee_no_fenv
-FULLVARIANTPATH:=ARMV5/UDEB
-INCLUDES:=-J $(EPOCROOT)/epoc32/include -J $(EPOCROOT)/epoc32/include/variant
-LD:=armlink
-LIBPATH:=
-LINKER_DEBUG_OPTION:=--debug
-LINKER_ENTRY_OPTION:=--entry
-LINKER_SYMBOLS_FILE_OPTION:=--list
-LINKER_SYMBOLS_OPTION:=--symbols
-OUTPUTPATH:=$(EPOCROOT)/epoc32/build
-OUTPUT_OPTION:=-o
-OWN_LIBRARY_OPTION:=-Ono_known_library
-PREINCLUDE_OPTION:=--preinclude $(EPOCROOT)/epoc32/include/rvct2_2/rvct2_2.h
-RELEASEPATH:=$(EPOCROOT)/epoc32/release
-RUNTIME_LIBS_LIST:=drtaeabi.dso dfpaeabi.dso dfprvct2_2.dso scppnwdl.dso drtrvct2_2.dso
-RUNTIME_LIBS_PATH:=$(EPOCROOT)/epoc32/release/ARMV5,$(EPOCROOT)/epoc32/release/ARMV5/LIB
-RUNTIME_SYMBOL_VISIBILITY_OPTION:=--dllimport_runtime
-RW_BASE_OPTION:=--rw-base
-SHARED_OBJECT_OPTION:=--dll
-SID:=0x10003a5c
-SOFTVFPMODE_OPTION:=
-SO_NAME_OPTION:=--soname
-SPLIT_OPTION:=--split
-STACKSIZE:=0x00005000
-STATIC_LIBS_LIST:="h_t__uf.l(switch8.o)"
-STATIC_LIBS_PATH:=/usr/local/ARM/RVCT/Data/2.2/308/lib/armlib
-SYMBIAN_CCFLAGS:=-g -O0
-SYMBIAN_LINK_FLAGS:=--diag_suppress 6331  --bpabi --reloc   --no_scanlib --datacompressor=off
-SYMVER_OPTION:=--symver_soname
-TARGETTYPE:=EXE
-TARGET_ARCH_OPTION:=--cpu 5T
-THUMB_INSTRUCTION_SET:=--thumb
-UID1:=0x1000007a
-UID2:=0x100039ce
-UID3:=0x00000001
-USER_LIBS_PATH_OPTION:=--userlibpath
-VARIANTTYPE:=UDEB
-VFE_OPTION:=--no_vfe
-include $(FLMHOME)/e32abiv2exe.flm
-
-
-# configuration ARMV5_UREL
-AAPCS_OPTION:=--apcs /inter
-CAPABILITY:=LocalServices ReadDeviceData ReadUserData
-CC:=armcc
-CC_ERRORS_CONTROL_OPTION:=--diag_error 1267
-CC_WARNINGS_CONTROL_OPTION:=--diag_suppress 161,611,654,997,1152,1300,1464,1488,6318
-CDEFS:=__MARM_THUMB__ __MARM_INTERWORK__ _UNICODE __SYMBIAN32__ __ARMCC__ __EPOC32__ __MARM__ __EABI__ __PRODUCT_INCLUDE=\"$(EPOCROOT)/epoc32/include/variant/Symbian_OS_vFuture.hrh\" _EXE_
-CFLAGS:=
-COMMANDFILE_OPTION:=--via
-COMPILE_ONLY_OPTION:=-c
-CPP_LANG_OPTION:=--cpp
-CREATABLEPATHS:=
-SOURCEFILES:=$(RAPTOR_HOME)/test/simple/test.cpp
-ELF2E32:=$(EPOCROOT)/epoc32/tools/elf2e32$(DOTEXE)
-ENUM_OPTION:=--enum_is_int
-EXCEPTIONS:=--exceptions --exceptions_unwind
-EXEBASELIBS:=usrt2_2.lib euser.dso efsrv.dso bafl.dso commsdat.dso
-EXENAME:=test
-EXPORT_VTBL_OPTION:=--export_all_vtbl
-FLMHOME:=$(RAPTOR_HOME)/lib/flm
-FPMODE_OPTION:=--fpmode ieee_no_fenv
-FULLVARIANTPATH:=ARMV5/UREL
-INCLUDES:=-J $(EPOCROOT)/epoc32/include -J $(EPOCROOT)/epoc32/include/variant
-LD:=armlink
-LIBPATH:=
-LINKER_DEBUG_OPTION:=--debug
-LINKER_ENTRY_OPTION:=--entry
-LINKER_SYMBOLS_FILE_OPTION:=--list
-LINKER_SYMBOLS_OPTION:=--symbols
-OUTPUTPATH:=$(EPOCROOT)/epoc32/build
-OUTPUT_OPTION:=-o
-OWN_LIBRARY_OPTION:=-Ono_known_library
-PREINCLUDE_OPTION:=--preinclude $(EPOCROOT)/epoc32/include/rvct2_2/rvct2_2.h
-RELEASEPATH:=$(EPOCROOT)/epoc32/release
-RUNTIME_LIBS_LIST:=drtaeabi.dso dfpaeabi.dso dfprvct2_2.dso scppnwdl.dso drtrvct2_2.dso
-RUNTIME_LIBS_PATH:=$(EPOCROOT)/epoc32/release/ARMV5,$(EPOCROOT)/epoc32/release/ARMV5/LIB
-RUNTIME_SYMBOL_VISIBILITY_OPTION:=--dllimport_runtime
-RW_BASE_OPTION:=--rw-base
-SHARED_OBJECT_OPTION:=--dll
-SID:=0x10003a5c
-SOFTVFPMODE_OPTION:=
-SO_NAME_OPTION:=--soname
-SPLIT_OPTION:=--split
-STACKSIZE:=0x00005000
-STATIC_LIBS_LIST:="h_t__uf.l(switch8.o)"
-STATIC_LIBS_PATH:=/usr/local/ARM/RVCT/Data/2.2/308/lib/armlib
-SYMBIAN_CCFLAGS:=-O2
-SYMBIAN_LINK_FLAGS:=--diag_suppress 6331  --bpabi --reloc   --no_scanlib --datacompressor=off
-SYMVER_OPTION:=--symver_soname
-TARGETTYPE:=EXE
-TARGET_ARCH_OPTION:=--cpu 5T
-THUMB_INSTRUCTION_SET:=--thumb
-UID1:=0x1000007a
-UID2:=0x100039ce
-UID3:=0x00000001
-USER_LIBS_PATH_OPTION:=--userlibpath
-VARIANTTYPE:=UREL
-VFE_OPTION:=--no_vfe
-include $(FLMHOME)/e32abiv2exe.flm
-
-# end simple 
-
-# END OF GENERATED MAKEFILE : DO NOT EDIT
+
+# test a "real" raptor gluefile
+# generated by Raptor 0.0.1
+
+RAPTOR_HOME?=/localhome/tmurphy/pf/EPOC/development/tools/personal/tmurphy/tools/raptor
+EPOCROOT?=/tmp/tim-epocroot/
+
+# start simple 
+
+# configuration ARMV5_UDEB
+AAPCS_OPTION:=--apcs /inter
+CAPABILITY:=LocalServices ReadDeviceData ReadUserData
+CC:=armcc
+CC_ERRORS_CONTROL_OPTION:=--diag_error 1267
+CC_WARNINGS_CONTROL_OPTION:=--diag_suppress 161,611,654,997,1152,1300,1464,1488,6318
+CDEFS:=__MARM_THUMB__ __MARM_INTERWORK__ _UNICODE __SYMBIAN32__ __ARMCC__ __EPOC32__ __MARM__ __EABI__ __PRODUCT_INCLUDE=\"$(EPOCROOT)/epoc32/include/variant/Symbian_OS_vFuture.hrh\" _EXE_
+CFLAGS:=
+COMMANDFILE_OPTION:=--via
+COMPILE_ONLY_OPTION:=-c
+CPP_LANG_OPTION:=--cpp
+CREATABLEPATHS:=
+SOURCEFILES:=$(RAPTOR_HOME)/test/simple/test.cpp
+ELF2E32:=$(EPOCROOT)/epoc32/tools/elf2e32$(DOTEXE)
+ENUM_OPTION:=--enum_is_int
+EXCEPTIONS:=--exceptions --exceptions_unwind
+EXEBASELIBS:=usrt2_2.lib euser.dso efsrv.dso bafl.dso commsdat.dso
+EXENAME:=test
+EXPORT_VTBL_OPTION:=--export_all_vtbl
+FLMHOME:=$(RAPTOR_HOME)/lib/flm
+FPMODE_OPTION:=--fpmode ieee_no_fenv
+FULLVARIANTPATH:=ARMV5/UDEB
+INCLUDES:=-J $(EPOCROOT)/epoc32/include -J $(EPOCROOT)/epoc32/include/variant
+LD:=armlink
+LIBPATH:=
+LINKER_DEBUG_OPTION:=--debug
+LINKER_ENTRY_OPTION:=--entry
+LINKER_SYMBOLS_FILE_OPTION:=--list
+LINKER_SYMBOLS_OPTION:=--symbols
+OUTPUTPATH:=$(EPOCROOT)/epoc32/build
+OUTPUT_OPTION:=-o
+OWN_LIBRARY_OPTION:=-Ono_known_library
+PREINCLUDE_OPTION:=--preinclude $(EPOCROOT)/epoc32/include/rvct2_2/rvct2_2.h
+RELEASEPATH:=$(EPOCROOT)/epoc32/release
+RUNTIME_LIBS_LIST:=drtaeabi.dso dfpaeabi.dso dfprvct2_2.dso scppnwdl.dso drtrvct2_2.dso
+RUNTIME_LIBS_PATH:=$(EPOCROOT)/epoc32/release/ARMV5,$(EPOCROOT)/epoc32/release/ARMV5/LIB
+RUNTIME_SYMBOL_VISIBILITY_OPTION:=--dllimport_runtime
+RW_BASE_OPTION:=--rw-base
+SHARED_OBJECT_OPTION:=--dll
+SID:=0x10003a5c
+SOFTVFPMODE_OPTION:=
+SO_NAME_OPTION:=--soname
+SPLIT_OPTION:=--split
+STACKSIZE:=0x00005000
+STATIC_LIBS_LIST:="h_t__uf.l(switch8.o)"
+STATIC_LIBS_PATH:=/usr/local/ARM/RVCT/Data/2.2/308/lib/armlib
+SYMBIAN_CCFLAGS:=-g -O0
+SYMBIAN_LINK_FLAGS:=--diag_suppress 6331  --bpabi --reloc   --no_scanlib --datacompressor=off
+SYMVER_OPTION:=--symver_soname
+TARGETTYPE:=EXE
+TARGET_ARCH_OPTION:=--cpu 5T
+THUMB_INSTRUCTION_SET:=--thumb
+UID1:=0x1000007a
+UID2:=0x100039ce
+UID3:=0x00000001
+USER_LIBS_PATH_OPTION:=--userlibpath
+VARIANTTYPE:=UDEB
+VFE_OPTION:=--no_vfe
+include $(FLMHOME)/e32abiv2exe.flm
+
+
+# configuration ARMV5_UREL
+AAPCS_OPTION:=--apcs /inter
+CAPABILITY:=LocalServices ReadDeviceData ReadUserData
+CC:=armcc
+CC_ERRORS_CONTROL_OPTION:=--diag_error 1267
+CC_WARNINGS_CONTROL_OPTION:=--diag_suppress 161,611,654,997,1152,1300,1464,1488,6318
+CDEFS:=__MARM_THUMB__ __MARM_INTERWORK__ _UNICODE __SYMBIAN32__ __ARMCC__ __EPOC32__ __MARM__ __EABI__ __PRODUCT_INCLUDE=\"$(EPOCROOT)/epoc32/include/variant/Symbian_OS_vFuture.hrh\" _EXE_
+CFLAGS:=
+COMMANDFILE_OPTION:=--via
+COMPILE_ONLY_OPTION:=-c
+CPP_LANG_OPTION:=--cpp
+CREATABLEPATHS:=
+SOURCEFILES:=$(RAPTOR_HOME)/test/simple/test.cpp
+ELF2E32:=$(EPOCROOT)/epoc32/tools/elf2e32$(DOTEXE)
+ENUM_OPTION:=--enum_is_int
+EXCEPTIONS:=--exceptions --exceptions_unwind
+EXEBASELIBS:=usrt2_2.lib euser.dso efsrv.dso bafl.dso commsdat.dso
+EXENAME:=test
+EXPORT_VTBL_OPTION:=--export_all_vtbl
+FLMHOME:=$(RAPTOR_HOME)/lib/flm
+FPMODE_OPTION:=--fpmode ieee_no_fenv
+FULLVARIANTPATH:=ARMV5/UREL
+INCLUDES:=-J $(EPOCROOT)/epoc32/include -J $(EPOCROOT)/epoc32/include/variant
+LD:=armlink
+LIBPATH:=
+LINKER_DEBUG_OPTION:=--debug
+LINKER_ENTRY_OPTION:=--entry
+LINKER_SYMBOLS_FILE_OPTION:=--list
+LINKER_SYMBOLS_OPTION:=--symbols
+OUTPUTPATH:=$(EPOCROOT)/epoc32/build
+OUTPUT_OPTION:=-o
+OWN_LIBRARY_OPTION:=-Ono_known_library
+PREINCLUDE_OPTION:=--preinclude $(EPOCROOT)/epoc32/include/rvct2_2/rvct2_2.h
+RELEASEPATH:=$(EPOCROOT)/epoc32/release
+RUNTIME_LIBS_LIST:=drtaeabi.dso dfpaeabi.dso dfprvct2_2.dso scppnwdl.dso drtrvct2_2.dso
+RUNTIME_LIBS_PATH:=$(EPOCROOT)/epoc32/release/ARMV5,$(EPOCROOT)/epoc32/release/ARMV5/LIB
+RUNTIME_SYMBOL_VISIBILITY_OPTION:=--dllimport_runtime
+RW_BASE_OPTION:=--rw-base
+SHARED_OBJECT_OPTION:=--dll
+SID:=0x10003a5c
+SOFTVFPMODE_OPTION:=
+SO_NAME_OPTION:=--soname
+SPLIT_OPTION:=--split
+STACKSIZE:=0x00005000
+STATIC_LIBS_LIST:="h_t__uf.l(switch8.o)"
+STATIC_LIBS_PATH:=/usr/local/ARM/RVCT/Data/2.2/308/lib/armlib
+SYMBIAN_CCFLAGS:=-O2
+SYMBIAN_LINK_FLAGS:=--diag_suppress 6331  --bpabi --reloc   --no_scanlib --datacompressor=off
+SYMVER_OPTION:=--symver_soname
+TARGETTYPE:=EXE
+TARGET_ARCH_OPTION:=--cpu 5T
+THUMB_INSTRUCTION_SET:=--thumb
+UID1:=0x1000007a
+UID2:=0x100039ce
+UID3:=0x00000001
+USER_LIBS_PATH_OPTION:=--userlibpath
+VARIANTTYPE:=UREL
+VFE_OPTION:=--no_vfe
+include $(FLMHOME)/e32abiv2exe.flm
+
+# end simple 
+
+# END OF GENERATED MAKEFILE : DO NOT EDIT
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/templateext/Makefile
--- a/sbsv2/raptor/lib/flm/test/templateext/Makefile	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/templateext/Makefile	Mon Nov 16 09:46:46 2009 +0000
@@ -1,48 +1,48 @@
-include $(FLMHOME)/flmtools.mk
-
-
-
-EPOCROOT:=fred1
-PLATFORM:=fred1
-CFG:=fred1
-TO_ROOT:=fred1
-TO_BLDINF:=fred1
-EPOCBLD:=fred1
-EXTENSION_ROOT:=fred1
-HOST_SHELL:=fred1
-PLATFORM_PATH:=fred1
-CFG_PATH:=fred1
-TEMPLATE_EXTENSION_MAKEFILE:=temex.mk
-HALPATH:=fred1/..
-
-include $(FLMHOME)/template_ext.flm
-
-
-EPOCROOT:=alice2
-PLATFORM:=alice2
-CFG:=alice2
-TO_ROOT:=alice2
-TO_BLDINF:=alice2
-EPOCBLD:=alice2
-EXTENSION_ROOT:=alice2
-HOST_SHELL:=alice2
-PLATFORM_PATH:=alice2
-CFG_PATH:=alice2
-TEMPLATE_EXTENSION_MAKEFILE:=temex.mk
-
-include $(FLMHOME)/template_ext.flm
-
-
-EPOCROOT:=test1
-PLATFORM:=test2
-CFG:=test3
-TO_ROOT:=test4
-TO_BLDINF:=test5
-EPOCBLD:=test6
-EXTENSION_ROOT:=test7
-HOST_SHELL:=test8
-PLATFORM_PATH:=test16
-CFG_PATH:=test17
-TEMPLATE_EXTENSION_MAKEFILE:=temex.mk
-
-include $(FLMHOME)/template_ext.flm
+include $(FLMHOME)/flmtools.mk
+
+
+
+EPOCROOT:=fred1
+PLATFORM:=fred1
+CFG:=fred1
+TO_ROOT:=fred1
+TO_BLDINF:=fred1
+EPOCBLD:=fred1
+EXTENSION_ROOT:=fred1
+HOST_SHELL:=fred1
+PLATFORM_PATH:=fred1
+CFG_PATH:=fred1
+TEMPLATE_EXTENSION_MAKEFILE:=temex.mk
+HALPATH:=fred1/..
+
+include $(FLMHOME)/template_ext.flm
+
+
+EPOCROOT:=alice2
+PLATFORM:=alice2
+CFG:=alice2
+TO_ROOT:=alice2
+TO_BLDINF:=alice2
+EPOCBLD:=alice2
+EXTENSION_ROOT:=alice2
+HOST_SHELL:=alice2
+PLATFORM_PATH:=alice2
+CFG_PATH:=alice2
+TEMPLATE_EXTENSION_MAKEFILE:=temex.mk
+
+include $(FLMHOME)/template_ext.flm
+
+
+EPOCROOT:=test1
+PLATFORM:=test2
+CFG:=test3
+TO_ROOT:=test4
+TO_BLDINF:=test5
+EPOCBLD:=test6
+EXTENSION_ROOT:=test7
+HOST_SHELL:=test8
+PLATFORM_PATH:=test16
+CFG_PATH:=test17
+TEMPLATE_EXTENSION_MAKEFILE:=temex.mk
+
+include $(FLMHOME)/template_ext.flm
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/test/templateext/temex.mk
--- a/sbsv2/raptor/lib/flm/test/templateext/temex.mk	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/test/templateext/temex.mk	Mon Nov 16 09:46:46 2009 +0000
@@ -1,96 +1,96 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-#
-# A test-template extension makefile
-# supposed to demonstrate that different calls
-# to the same template extension makefile will
-# get different variable values.
-# i.e. it's supposed to show target specific variables 
-# working properly for template extension makefiles.
-
-# The test is by manual comparison at the moment.
-
-
-
-define print
-echo ""
-echo ""
-@echo ""
-@echo "EPOCROOT=$(EPOCROOT)"
-@echo "PLATFORM=$(PLATFORM)"
-@echo "CFG=$(CFG)"
-@echo "TO_ROOT=$(TO_ROOT)"
-@echo "TO_BLDINF=$(TO_BLDINF)"
-@echo "EPOCBLD=$(EPOCBLD)"
-@echo "EXTENSION_ROOT=$(EXTENSION_ROOT)"
-@echo "HOST_SHELL=$(HOST_SHELL)"
-@echo "/=$(/)"
-@echo ";=$(;)"
-@echo "RMDIR=$(RMDIR)"
-@echo "RM=$(RM)"
-@echo "ERASE=$(ERASE)"
-@echo "MKDIR=$(MKDIR)"
-@echo "CP=$(CP)"
-@echo "PLATFORM_PATH=$(PLATFORM_PATH)"
-@echo "CFG_PATH=$(CFG_PATH)"
-@echo "TEMPLATE_EXTENSION_MAKEFILE=$(TEMPLATE_EXTENSION_MAKEFILE)"
-endef
-
-DO_NOTHING :
-	@echo "DO_NOTHING"
-	$(print)
-
-
-MAKMAKE :
-	@echo "MAKMAKE"
-	$(print)
-
-BLD :
-	@echo "BLD"
-	$(print)
-
-SAVESPACE :
-	@echo "SAVESPACE"
-	$(print)
-
-FREEZE :
-	@echo "FREEZE"
-	$(print)
-
-LIB :
-	@echo "LIB"
-	$(print)
-
-CLEANLIB :
-	@echo "CLEANLIB"
-	$(print)
-
-RESOURCE :
-	@echo "RESOURCE"
-	$(print)
-
-CLEAN :
-	@echo "CLEAN"
-	$(print)
-
-RELEASABLES :
-	@echo "RELEASABLES"
-	$(print)
-
-FINAL :
-	@echo "FINAL"
-	$(print)
-
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+#
+# A test-template extension makefile
+# supposed to demonstrate that different calls
+# to the same template extension makefile will
+# get different variable values.
+# i.e. it's supposed to show target specific variables 
+# working properly for template extension makefiles.
+
+# The test is by manual comparison at the moment.
+
+
+
+define print
+echo ""
+echo ""
+@echo ""
+@echo "EPOCROOT=$(EPOCROOT)"
+@echo "PLATFORM=$(PLATFORM)"
+@echo "CFG=$(CFG)"
+@echo "TO_ROOT=$(TO_ROOT)"
+@echo "TO_BLDINF=$(TO_BLDINF)"
+@echo "EPOCBLD=$(EPOCBLD)"
+@echo "EXTENSION_ROOT=$(EXTENSION_ROOT)"
+@echo "HOST_SHELL=$(HOST_SHELL)"
+@echo "/=$(/)"
+@echo ";=$(;)"
+@echo "RMDIR=$(RMDIR)"
+@echo "RM=$(RM)"
+@echo "ERASE=$(ERASE)"
+@echo "MKDIR=$(MKDIR)"
+@echo "CP=$(CP)"
+@echo "PLATFORM_PATH=$(PLATFORM_PATH)"
+@echo "CFG_PATH=$(CFG_PATH)"
+@echo "TEMPLATE_EXTENSION_MAKEFILE=$(TEMPLATE_EXTENSION_MAKEFILE)"
+endef
+
+DO_NOTHING :
+	@echo "DO_NOTHING"
+	$(print)
+
+
+MAKMAKE :
+	@echo "MAKMAKE"
+	$(print)
+
+BLD :
+	@echo "BLD"
+	$(print)
+
+SAVESPACE :
+	@echo "SAVESPACE"
+	$(print)
+
+FREEZE :
+	@echo "FREEZE"
+	$(print)
+
+LIB :
+	@echo "LIB"
+	$(print)
+
+CLEANLIB :
+	@echo "CLEANLIB"
+	$(print)
+
+RESOURCE :
+	@echo "RESOURCE"
+	$(print)
+
+CLEAN :
+	@echo "CLEAN"
+	$(print)
+
+RELEASABLES :
+	@echo "RELEASABLES"
+	$(print)
+
+FINAL :
+	@echo "FINAL"
+	$(print)
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/tools.xml
--- a/sbsv2/raptor/lib/flm/tools.xml	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/tools.xml	Mon Nov 16 09:46:46 2009 +0000
@@ -1,58 +1,58 @@
-
-
-	
-
-	
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-		
-	
-
-	
-		
-		
-		
-		
-		
-		
-		
-		
-	
-
-	
-		
-		
-		
-		
-	
-
-	
-	
-
-
+
+
+	
+
+	
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+
+	
+		
+		
+		
+		
+		
+		
+		
+		
+	
+
+	
+		
+		
+		
+		
+	
+
+	
+	
+
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/tools/buildstubsis.flm
--- a/sbsv2/raptor/lib/flm/tools/buildstubsis.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/tools/buildstubsis.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,50 +1,50 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-# FLM to build StubSis libraries.
-
-## Outputs - externally relevant targets that this FLM generates
-
-TARGETDIR:=$(EPOCROOT)/epoc32/data/z/system/install
-
-ifeq ($(PLATFORM),WINSCW)
-	TARGETDIR:=$(EPOCROOT)/epoc32/release/$(PLATFORM_PATH)/$(CFG_PATH)/z/system/install
-endif
-
-$(call makepath,$(TARGETDIR))
-
-# This section is in a macro oherwise startrule could get wrong values
-define SisFileCreation
-$(SISFILE): $(EXTENSION_ROOT)/$(SRCDIR)/$(SISNAME).pkg
-	$(call startrule,stubsis) \
-	$(EPOCROOT)/epoc32/tools/makesis$(DOTEXE) -s $$? $$@  \
-	$(call endrule,stubsis)
-endef
-
-# Build stub SIS file
-SISFILE:= $(TARGETDIR)/$(SISNAME).sis
-# Here a variable named "done_" gets created
-GUARD:=done_$(call sanitise,$(SISFILE))
-# If variable "done_..." not set, set it to 1, so that
-# UREL and UDEB do not execute makesis twice on the same target 
-ifeq ($($(GUARD)),)
-$(GUARD):=1
-ALL:: $(SISFILE)
-$(eval $(call SisFileCreation))
-$(eval $(call whatmacro,$(SISFILE)))
-$(eval $(call GenerateStandardCleanTarget,$(SISFILE),$(TARGETDIR)))
-endif
-
-
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+# FLM to build StubSis libraries.
+
+## Outputs - externally relevant targets that this FLM generates
+
+TARGETDIR:=$(EPOCROOT)/epoc32/data/z/system/install
+
+ifeq ($(PLATFORM),WINSCW)
+	TARGETDIR:=$(EPOCROOT)/epoc32/release/$(PLATFORM_PATH)/$(CFG_PATH)/z/system/install
+endif
+
+$(call makepath,$(TARGETDIR))
+
+# This section is in a macro oherwise startrule could get wrong values
+define SisFileCreation
+$(SISFILE): $(EXTENSION_ROOT)/$(SRCDIR)/$(SISNAME).pkg
+	$(call startrule,stubsis) \
+	$(EPOCROOT)/epoc32/tools/makesis$(DOTEXE) -s $$? $$@  \
+	$(call endrule,stubsis)
+endef
+
+# Build stub SIS file
+SISFILE:= $(TARGETDIR)/$(SISNAME).sis
+# Here a variable named "done_" gets created
+GUARD:=done_$(call sanitise,$(SISFILE))
+# If variable "done_..." not set, set it to 1, so that
+# UREL and UDEB do not execute makesis twice on the same target 
+ifeq ($($(GUARD)),)
+$(GUARD):=1
+ALL:: $(SISFILE)
+$(eval $(call SisFileCreation))
+$(eval $(call whatmacro,$(SISFILE)))
+$(eval $(call GenerateStandardCleanTarget,$(SISFILE),$(TARGETDIR)))
+endif
+
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/tools/stlport.flm
--- a/sbsv2/raptor/lib/flm/tools/stlport.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/tools/stlport.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,139 +1,139 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-# FLM to build STLport libraries.
-
-## Outputs - externally relevant targets that this FLM generates
-
-ifeq ($(OSTYPE),unix)
-STLPORT.OPT:=-fPIC -m32 -O2
-STLPORT.CXXFLAGS:=-m32 
-else
-STLPORT.OPT:=-O2
-STLPORT.CXXFLAGS:=
-endif
-
-
-SOURCE_ARCHIVE:=$(EXTENSION_ROOT)/$(SOURCE_ARCHIVE)
-
-EXTRACT_DIR:=$(EPOCBLD)$(TOOLPLATFORMDIR)
-STL_DIR:=$(EXTRACT_DIR)/STLport-$(STLPORT_VERSION)
-BUILD_DIR:=$(STL_DIR)/build/lib
-UNZIPPED:=$(STL_DIR)/unzipped.ok
-
-RELEASE_DIR:=$(EPOCROOT)/epoc32/release/tools2$(TOOLPLATFORMDIR)
-RELEASE_DIR_REL:=$(RELEASE_DIR)/rel
-RELEASE_DIR_DEB:=$(RELEASE_DIR)/deb
-WHATFLM:=
-
-ifeq ($(OSTYPE),unix)
-STLPORT.OPT:=-fPIC -m32 -O2
-STLPORT.CXXFLAGS:=-m32 
-else
-STLPORT.OPT:=-O2
-STLPORT.CXXFLAGS:=
-endif
-
-STL_REL_LIB_PATH:=$(STL_DIR)/lib/libstlport.a
-STL_DEB_LIB_PATH:=$(STL_DIR)/lib/libstlportg.a
-
-REL_LIB:=$(RELEASE_DIR_REL)/$(STL_REL_LIB_NAME)
-DEB_LIB:=$(RELEASE_DIR_DEB)/$(STL_REL_LIB_NAME)
-
-STL_HEADERS_PATH:=$(EPOCROOT)/epoc32/include/tools/stlport
-
-CLEANTARGETS:=
-CREATABLEPATHS:=
-
-define stlportcommon
-
-$(UNZIPPED): $(SOURCE_ARCHIVE) 
-	$(call startrule,unzip) \
-	$(UNZIP) -aa -o $(SOURCE_ARCHIVE) -d $(EXTRACT_DIR) && \
-	echo "SHELL:=$$$${SHELL}" > "$(BUILD_DIR)/raptor_gcc.mak" && \
-	$(GNUCAT) $(BUILD_DIR)/gcc.mak >> "$(BUILD_DIR)/raptor_gcc.mak" && \
-	$(GNUTOUCH) $(UNZIPPED) \
-	$(call endrule,unzip)
-
-CLEAN::
-	$(call startrule,clean) \
-	$(GNURM) -f $(UNZIPPED) ; \
-	$(GNURM) -rf $(STL_DIR)  \
-	$(call endrule,clean)
-
-CREATABLEPATHS:=$$(CREATABLEPATHS) $(dir $(UNZIPPED))
-endef
-
-# only declare targets once if they are the same for urel or udeb
-
-ifeq ($(TARGET_$(STL_DIR)),)
-$(eval $(stlportcommon))
-TARGET_$(STL_DIR):=1
-endif
-
-
-define stlportrel
-$(ALLTARGET):: $(REL_LIB)
-LIBRARY:: $(REL_LIB)
-
-$(REL_LIB): $(STL_REL_LIB_PATH)
-	$(call startrule,install) \
-	$(GNUCP) $(STL_REL_LIB_PATH) $(REL_LIB) \
-	$(call endrule,install)
-
-$(STL_REL_LIB_PATH): $(UNZIPPED)
-	$(call startrule,make) \
-	$(GNUMAKE38) -C "$(BUILD_DIR)" -fraptor_gcc.mak install-release-static LIB_SUFFIX= BASE_INSTALL_DIR=../.. EXTRA_CXXFLAGS='$(STLPORT.CXXFLAGS)' OPT='$(STLPORT.OPT)' \
-	$(call endrule,make)
-
-CREATABLEPATHS:=$$(CREATABLEPATHS) $(dir $(REL_LIB))
-CLEANTARGETS:=$$(CLEANTARGETS) $(REL_LIB)
-WHATFLM:=$$(WHATFLM) $(REL_LIB)
-endef
-
-ifeq ($(CFG_PATH),rel)
-$(eval $(stlportrel))
-endif
-
-define stlportdeb
-$(ALLTARGET):: $(DEB_LIB)
-LIBRARY:: $(DEB_LIB)
-
-$(DEB_LIB): $(STL_DEB_LIB_PATH)
-	$(call startrule,install) \
-	$(GNUCP) $(STL_DEB_LIB_PATH) $(DEB_LIB) \
-	$(call endrule,install)
-
-$(STL_DEB_LIB_PATH):  $(UNZIPPED)
-	$(call startrule,make) \
-	$(GNUMAKE38) -C "$(BUILD_DIR)" -fraptor_gcc.mak install-dbg-static LIB_SUFFIX= BASE_INSTALL_DIR=../.. EXTRA_CXXFLAGS='$(STLPORT.CXXFLAGS)' OPT='$(STLPORT.OPT)' \
-	$(call endrule,make)
-
-	
-CREATABLEPATHS:=$$(CREATABLE_PATHS) $(dir $(DEB_LIB))
-CLEANTARGETS:=$$(CLEANTARGETS) $(DEB_LIB)
-WHATFLM:=$$(WHATFLM) $(DEB_LIB)
-endef
-
-ifeq ($(CFG_PATH),deb)
-$(eval $(stlportdeb))
-endif
-
-$(eval $(call whatmacro,$(WHATFLM),WHATTEM))
-# 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,$(CLEANTARGETS),))
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+# FLM to build STLport libraries.
+
+## Outputs - externally relevant targets that this FLM generates
+
+ifeq ($(OSTYPE),unix)
+STLPORT.OPT:=-fPIC -m32 -O2
+STLPORT.CXXFLAGS:=-m32 
+else
+STLPORT.OPT:=-O2
+STLPORT.CXXFLAGS:=
+endif
+
+
+SOURCE_ARCHIVE:=$(EXTENSION_ROOT)/$(SOURCE_ARCHIVE)
+
+EXTRACT_DIR:=$(EPOCBLD)$(TOOLPLATFORMDIR)
+STL_DIR:=$(EXTRACT_DIR)/STLport-$(STLPORT_VERSION)
+BUILD_DIR:=$(STL_DIR)/build/lib
+UNZIPPED:=$(STL_DIR)/unzipped.ok
+
+RELEASE_DIR:=$(EPOCROOT)/epoc32/release/tools2$(TOOLPLATFORMDIR)
+RELEASE_DIR_REL:=$(RELEASE_DIR)/rel
+RELEASE_DIR_DEB:=$(RELEASE_DIR)/deb
+WHATFLM:=
+
+ifeq ($(OSTYPE),unix)
+STLPORT.OPT:=-fPIC -m32 -O2
+STLPORT.CXXFLAGS:=-m32 
+else
+STLPORT.OPT:=-O2
+STLPORT.CXXFLAGS:=
+endif
+
+STL_REL_LIB_PATH:=$(STL_DIR)/lib/libstlport.a
+STL_DEB_LIB_PATH:=$(STL_DIR)/lib/libstlportg.a
+
+REL_LIB:=$(RELEASE_DIR_REL)/$(STL_REL_LIB_NAME)
+DEB_LIB:=$(RELEASE_DIR_DEB)/$(STL_REL_LIB_NAME)
+
+STL_HEADERS_PATH:=$(EPOCROOT)/epoc32/include/tools/stlport
+
+CLEANTARGETS:=
+CREATABLEPATHS:=
+
+define stlportcommon
+
+$(UNZIPPED): $(SOURCE_ARCHIVE) 
+	$(call startrule,unzip) \
+	$(UNZIP) -aa -o $(SOURCE_ARCHIVE) -d $(EXTRACT_DIR) && \
+	echo "SHELL:=$$$${SHELL}" > "$(BUILD_DIR)/raptor_gcc.mak" && \
+	$(GNUCAT) $(BUILD_DIR)/gcc.mak >> "$(BUILD_DIR)/raptor_gcc.mak" && \
+	$(GNUTOUCH) $(UNZIPPED) \
+	$(call endrule,unzip)
+
+CLEAN::
+	$(call startrule,clean) \
+	$(GNURM) -f $(UNZIPPED) ; \
+	$(GNURM) -rf $(STL_DIR)  \
+	$(call endrule,clean)
+
+CREATABLEPATHS:=$$(CREATABLEPATHS) $(dir $(UNZIPPED))
+endef
+
+# only declare targets once if they are the same for urel or udeb
+
+ifeq ($(TARGET_$(STL_DIR)),)
+$(eval $(stlportcommon))
+TARGET_$(STL_DIR):=1
+endif
+
+
+define stlportrel
+$(ALLTARGET):: $(REL_LIB)
+LIBRARY:: $(REL_LIB)
+
+$(REL_LIB): $(STL_REL_LIB_PATH)
+	$(call startrule,install) \
+	$(GNUCP) $(STL_REL_LIB_PATH) $(REL_LIB) \
+	$(call endrule,install)
+
+$(STL_REL_LIB_PATH): $(UNZIPPED)
+	$(call startrule,make) \
+	$(GNUMAKE38) -C "$(BUILD_DIR)" -fraptor_gcc.mak install-release-static LIB_SUFFIX= BASE_INSTALL_DIR=../.. EXTRA_CXXFLAGS='$(STLPORT.CXXFLAGS)' OPT='$(STLPORT.OPT)' \
+	$(call endrule,make)
+
+CREATABLEPATHS:=$$(CREATABLEPATHS) $(dir $(REL_LIB))
+CLEANTARGETS:=$$(CLEANTARGETS) $(REL_LIB)
+WHATFLM:=$$(WHATFLM) $(REL_LIB)
+endef
+
+ifeq ($(CFG_PATH),rel)
+$(eval $(stlportrel))
+endif
+
+define stlportdeb
+$(ALLTARGET):: $(DEB_LIB)
+LIBRARY:: $(DEB_LIB)
+
+$(DEB_LIB): $(STL_DEB_LIB_PATH)
+	$(call startrule,install) \
+	$(GNUCP) $(STL_DEB_LIB_PATH) $(DEB_LIB) \
+	$(call endrule,install)
+
+$(STL_DEB_LIB_PATH):  $(UNZIPPED)
+	$(call startrule,make) \
+	$(GNUMAKE38) -C "$(BUILD_DIR)" -fraptor_gcc.mak install-dbg-static LIB_SUFFIX= BASE_INSTALL_DIR=../.. EXTRA_CXXFLAGS='$(STLPORT.CXXFLAGS)' OPT='$(STLPORT.OPT)' \
+	$(call endrule,make)
+
+	
+CREATABLEPATHS:=$$(CREATABLE_PATHS) $(dir $(DEB_LIB))
+CLEANTARGETS:=$$(CLEANTARGETS) $(DEB_LIB)
+WHATFLM:=$$(WHATFLM) $(DEB_LIB)
+endef
+
+ifeq ($(CFG_PATH),deb)
+$(eval $(stlportdeb))
+endif
+
+$(eval $(call whatmacro,$(WHATFLM),WHATTEM))
+# 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,$(CLEANTARGETS),))
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/tools/test_command_diff.sh
--- a/sbsv2/raptor/lib/flm/tools/test_command_diff.sh	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/tools/test_command_diff.sh	Mon Nov 16 09:46:46 2009 +0000
@@ -1,5 +1,5 @@
-#!/bin/bash
-
-# Example of how to compare two invocations of a tool
-( echo 'armcc    -O2 --dllimport_runtime --exceptions --exceptions_unwind --diag_suppress 161,611,654,997,1152,1300,1464,1488,6318 --diag_error 1267 --cpu 5T  --enum_is_int -Ono_known_library --fpmode ieee_no_fenv --export_all_vtbl --no_vfe --apcs /inter -c   --thumb  --fpu softvfp  -D__MARM_THUMB__  -D__MARM_INTERWORK__   -DNDEBUG -D_UNICODE   -D__SYMBIAN32__ -D__ARMCC__ -D__EPOC32__ -D__MARM__ -D__EABI__ -D__ARMCC_2__ -D__ARMCC_2_2__ -D__MARM_ARMV5__ -D__EXE__ -D__SUPPORT_CPP_EXCEPTIONS__   -D__PRODUCT_INCLUDE__=\"/epoc32/include/variant/Symbian_OS_vFuture.hrh\"    --cpp --preinclude \EPOC32\INCLUDE\RVCT2_2\RVCT2_2.h -J\comms-infras\commsdat\Tools\ced\src -J\comms-infras\commsdat\Tools\ced\inc -J\EPOC32\include -J\epoc32\include\variant -o \EPOC32\BUILD\comms-infras\commsdat\group\CED\ARMV5\UREL\database.o \comms-infras\commsdat\Tools\ced\src\database.cpp filedump.cpp';
-echo 'armcc  -g --dwarf3  -O0 --dllimport_runtime --exceptions --exceptions_unwind --diag_suppress 161,611,654,997,1152,1300,1464,1488,6318 --diag_error 1267 --cpu 5T  --enum_is_int -Ono_known_library --fpmode ieee_no_fenv --export_all_vtbl --no_vfe --apcs /inter   -c   --thumb  --fpu softvfp  -D__MARM_THUMB__  -D__MARM_INTERWORK__   -D_DEBUG -D_UNICODE   -D__SYMBIAN32__ -D__ARMCC__ -D__EPOC32__ -D__MARM__ -D__EABI__ -D__ARMCC_2__ -D__ARMCC_2_2__ -D__MARM_ARMV5__ -D__EXE__ -D__SUPPORT_CPP_EXCEPTIONS__   -D__PRODUCT_INCLUDE__=\"/epoc32/include/variant/Symbian_OS_vFuture.hrh\"    --cpp --preinclude \EPOC32\INCLUDE\RVCT2_2\RVCT2_2.h  -J\comms-infras\commsdat\Tools\ceddump\src -J\comms-infras\commsdat\Tools\ceddump\inc  -J\comms-infras\commsdat\Tools\ced\inc -J\EPOC32\include -J\epoc32\include\variant -o \EPOC32\BUILD\comms-infras\commsdat\group\CEDDUMP\ARMV5\UDEB\mainentry.o \comms-infras\commsdat\Tools\ceddump\src\mainentry.cpp r99qosconversion.cpp') | python command_diff.py
+#!/bin/bash
+
+# Example of how to compare two invocations of a tool
+( echo 'armcc    -O2 --dllimport_runtime --exceptions --exceptions_unwind --diag_suppress 161,611,654,997,1152,1300,1464,1488,6318 --diag_error 1267 --cpu 5T  --enum_is_int -Ono_known_library --fpmode ieee_no_fenv --export_all_vtbl --no_vfe --apcs /inter -c   --thumb  --fpu softvfp  -D__MARM_THUMB__  -D__MARM_INTERWORK__   -DNDEBUG -D_UNICODE   -D__SYMBIAN32__ -D__ARMCC__ -D__EPOC32__ -D__MARM__ -D__EABI__ -D__ARMCC_2__ -D__ARMCC_2_2__ -D__MARM_ARMV5__ -D__EXE__ -D__SUPPORT_CPP_EXCEPTIONS__   -D__PRODUCT_INCLUDE__=\"/epoc32/include/variant/Symbian_OS_vFuture.hrh\"    --cpp --preinclude \EPOC32\INCLUDE\RVCT2_2\RVCT2_2.h -J\comms-infras\commsdat\Tools\ced\src -J\comms-infras\commsdat\Tools\ced\inc -J\EPOC32\include -J\epoc32\include\variant -o \EPOC32\BUILD\comms-infras\commsdat\group\CED\ARMV5\UREL\database.o \comms-infras\commsdat\Tools\ced\src\database.cpp filedump.cpp';
+echo 'armcc  -g --dwarf3  -O0 --dllimport_runtime --exceptions --exceptions_unwind --diag_suppress 161,611,654,997,1152,1300,1464,1488,6318 --diag_error 1267 --cpu 5T  --enum_is_int -Ono_known_library --fpmode ieee_no_fenv --export_all_vtbl --no_vfe --apcs /inter   -c   --thumb  --fpu softvfp  -D__MARM_THUMB__  -D__MARM_INTERWORK__   -D_DEBUG -D_UNICODE   -D__SYMBIAN32__ -D__ARMCC__ -D__EPOC32__ -D__MARM__ -D__EABI__ -D__ARMCC_2__ -D__ARMCC_2_2__ -D__MARM_ARMV5__ -D__EXE__ -D__SUPPORT_CPP_EXCEPTIONS__   -D__PRODUCT_INCLUDE__=\"/epoc32/include/variant/Symbian_OS_vFuture.hrh\"    --cpp --preinclude \EPOC32\INCLUDE\RVCT2_2\RVCT2_2.h  -J\comms-infras\commsdat\Tools\ceddump\src -J\comms-infras\commsdat\Tools\ceddump\inc  -J\comms-infras\commsdat\Tools\ced\inc -J\EPOC32\include -J\epoc32\include\variant -o \EPOC32\BUILD\comms-infras\commsdat\group\CEDDUMP\ARMV5\UDEB\mainentry.o \comms-infras\commsdat\Tools\ceddump\src\mainentry.cpp r99qosconversion.cpp') | python command_diff.py
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/tools2common.flm
--- a/sbsv2/raptor/lib/flm/tools2common.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/tools2common.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,107 +1,107 @@
-# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# Function-Like Makefile to build common TOOLS2 objects with gcc
-# (included by tools2exe.flm and tools2lib.flm)
-#
-#
-
-## Input parameters
-
-OUTPUTPATH:=$(OUTPUTPATH)/$(TARGET)_$(TARGETTYPE)/tools2/$(VARIANTTYPE)$(TOOLPLATFORMDIR)
-
-ifeq ($(OSTYPE),cygwin)
-CDEFS.TOOLS2:=$(CDEFS.WIN32) $(CDEFS)
-CFLAGS:=$(CFLAGS.WIN32) $(CFLAGS) $(OPTION_GCC)
-COMPILER_PATH:=$(COMPILER_PATH.WIN32)
-else
-CDEFS.TOOLS2:=$(CDEFS.LINUX) $(CDEFS)
-CFLAGS:=$(CFLAGS) $(OPTION_GCC)
-COMPILER_PATH=$(COMPILER_PATH.LINUX)
-endif
-CDEFS.TOOLS2:=$(call makemacrodef,$(OPT.D),$(CDEFS.TOOLS2))
-
-## Locally used variables
-CREATABLEPATHS:=$(OUTPUTPATH) $(RELEASEPATH) $(TOOLSPATH)
-
-## Global targets
-$(ALLTARGET):: $(TARGETS)
-TARGET:: $(TARGETS)
-
-## Pre-Include directories
-ifneq ($(INC.COMPILER),)
-PINCLUDE:=$(patsubst %,$(OPT.PREINCLUDE)%,$(INC.COMPILER))
-endif
-
-## User and System Include directories
-ifneq ($(USERINCLUDE),)
-UINCLUDE:=$(patsubst %,$(OPT.USERINCLUDE)%,$(USERINCLUDE))
-endif
-ifneq ($(SYSTEMINCLUDE),)
-SINCLUDE:=$(patsubst %,$(OPT.SYSTEMINCLUDE)%,$(SYSTEMINCLUDE))
-endif
-
-INCLUDES:=$(PINCLUDE) $(UINCLUDE) $(SINCLUDE)
-
-## Source files
-CPPFILES:=$(filter %.CPP,$(SOURCE))
-cppFILES:=$(filter %.cpp,$(SOURCE))
-CFILES:=$(filter %.C,$(SOURCE))
-cFILES:=$(filter %.c,$(SOURCE))
-
-## Object files
-CPPOBJFILES:=$(patsubst %,$(OUTPUTPATH)/%,$(notdir $(patsubst %.CPP,%.o,$(CPPFILES))))
-cppOBJFILES:=$(patsubst %,$(OUTPUTPATH)/%,$(notdir $(patsubst %.cpp,%.o,$(cppFILES))))
-COBJFILES:=$(patsubst %,$(OUTPUTPATH)/%,$(notdir $(patsubst %.C,%.o,$(CFILES))))
-cOBJFILES:=$(patsubst %,$(OUTPUTPATH)/%,$(notdir $(patsubst %.c,%.o,$(cFILES))))
-OBJECTFILES:=$(CPPOBJFILES) $(cppOBJFILES) $(cOBJFILES) $(COBJFILES)
-
-CLEANTARGETS:=
-## Compile CPP and cpp files
-define compile2object
-$(eval compile2object_TARGET:=$(OUTPUTPATH)/$(patsubst %.$(2),%.o,$(notdir $(1))))
-$(eval DEPENDFILENAME:=$(compile2object_TARGET).d)
-$(eval DEPENDFILE:=$(wildcard $(DEPENDFILENAME)))
-$(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)" \
-	$(call endrule,compile2object)
-
-CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
-ifneq "$(DEPENDFILE)" ""
-ifeq ($(NO_DEPEND_INCLUDE),)
-  ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" ""
-    -include $(DEPENDFILE)
-  endif
-endif
-endif
-
-endef
-
-$(foreach SRC,$(CPPFILES),$(eval $(call compile2object,$(SRC),CPP)))
-$(foreach SRC,$(cppFILES),$(eval $(call compile2object,$(SRC),cpp)))
-$(foreach SRC,$(CFILES),$(eval $(call compile2object,$(SRC),C)))
-$(foreach SRC,$(cFILES),$(eval $(call compile2object,$(SRC),c)))
-
-### Conclusion - cleanup and introspection #######################
-
-# 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))
-
-## The End
+# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Function-Like Makefile to build common TOOLS2 objects with gcc
+# (included by tools2exe.flm and tools2lib.flm)
+#
+#
+
+## Input parameters
+
+OUTPUTPATH:=$(OUTPUTPATH)/$(TARGET)_$(TARGETTYPE)/tools2/$(VARIANTTYPE)$(TOOLPLATFORMDIR)
+
+ifeq ($(OSTYPE),cygwin)
+CDEFS.TOOLS2:=$(CDEFS.WIN32) $(CDEFS)
+CFLAGS:=$(CFLAGS.WIN32) $(CFLAGS) $(OPTION_GCC)
+COMPILER_PATH:=$(COMPILER_PATH.WIN32)
+else
+CDEFS.TOOLS2:=$(CDEFS.LINUX) $(CDEFS)
+CFLAGS:=$(CFLAGS) $(OPTION_GCC)
+COMPILER_PATH=$(COMPILER_PATH.LINUX)
+endif
+CDEFS.TOOLS2:=$(call makemacrodef,$(OPT.D),$(CDEFS.TOOLS2))
+
+## Locally used variables
+CREATABLEPATHS:=$(OUTPUTPATH) $(RELEASEPATH) $(TOOLSPATH)
+
+## Global targets
+$(ALLTARGET):: $(TARGETS)
+TARGET:: $(TARGETS)
+
+## Pre-Include directories
+ifneq ($(INC.COMPILER),)
+PINCLUDE:=$(patsubst %,$(OPT.PREINCLUDE)%,$(INC.COMPILER))
+endif
+
+## User and System Include directories
+ifneq ($(USERINCLUDE),)
+UINCLUDE:=$(patsubst %,$(OPT.USERINCLUDE)%,$(USERINCLUDE))
+endif
+ifneq ($(SYSTEMINCLUDE),)
+SINCLUDE:=$(patsubst %,$(OPT.SYSTEMINCLUDE)%,$(SYSTEMINCLUDE))
+endif
+
+INCLUDES:=$(PINCLUDE) $(UINCLUDE) $(SINCLUDE)
+
+## Source files
+CPPFILES:=$(filter %.CPP,$(SOURCE))
+cppFILES:=$(filter %.cpp,$(SOURCE))
+CFILES:=$(filter %.C,$(SOURCE))
+cFILES:=$(filter %.c,$(SOURCE))
+
+## Object files
+CPPOBJFILES:=$(patsubst %,$(OUTPUTPATH)/%,$(notdir $(patsubst %.CPP,%.o,$(CPPFILES))))
+cppOBJFILES:=$(patsubst %,$(OUTPUTPATH)/%,$(notdir $(patsubst %.cpp,%.o,$(cppFILES))))
+COBJFILES:=$(patsubst %,$(OUTPUTPATH)/%,$(notdir $(patsubst %.C,%.o,$(CFILES))))
+cOBJFILES:=$(patsubst %,$(OUTPUTPATH)/%,$(notdir $(patsubst %.c,%.o,$(cFILES))))
+OBJECTFILES:=$(CPPOBJFILES) $(cppOBJFILES) $(cOBJFILES) $(COBJFILES)
+
+CLEANTARGETS:=
+## Compile CPP and cpp files
+define compile2object
+$(eval compile2object_TARGET:=$(OUTPUTPATH)/$(patsubst %.$(2),%.o,$(notdir $(1))))
+$(eval DEPENDFILENAME:=$(compile2object_TARGET).d)
+$(eval DEPENDFILE:=$(wildcard $(DEPENDFILENAME)))
+$(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)" \
+	$(call endrule,compile2object)
+
+CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
+ifneq "$(DEPENDFILE)" ""
+ifeq ($(NO_DEPEND_INCLUDE),)
+  ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" ""
+    -include $(DEPENDFILE)
+  endif
+endif
+endif
+
+endef
+
+$(foreach SRC,$(CPPFILES),$(eval $(call compile2object,$(SRC),CPP)))
+$(foreach SRC,$(cppFILES),$(eval $(call compile2object,$(SRC),cpp)))
+$(foreach SRC,$(CFILES),$(eval $(call compile2object,$(SRC),C)))
+$(foreach SRC,$(cFILES),$(eval $(call compile2object,$(SRC),c)))
+
+### Conclusion - cleanup and introspection #######################
+
+# 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))
+
+## The End
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/tools2exe.flm
--- a/sbsv2/raptor/lib/flm/tools2exe.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/tools2exe.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,77 +1,77 @@
-# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# Function-Like Makefile to build a TOOLS2 EXE with gcc
-# 
-#
-
-## Outputs - externally relevant targets that this FLM generates
-ifeq ($(OSTYPE),cygwin)
-SYSTEMLIBS:=$(LIBS.WIN32)
-else
-SYSTEMLIBS:=$(LIBS.LINUX)
-endif
-
-EXETARGET:=$(RELEASEPATH)/$(TARGET)$(DOTEXE)
-
-ifneq ($(TOOLSPATH),)
-INSTALLED:=$(TOOLSPATH)/$(TARGET)$(DOTEXE)
-endif
-
-## Target groups
-RELEASEABLES:=$(INSTALLED)
-TARGETS:=$(EXETARGET) $(INSTALLED)
-
-## Common build steps (compiling and cleaning)
-include $(FLMHOME)/tools2common.flm
-
-## Static libraries
-ifneq ($(STATICLIBRARY),)
-STATICLIBS:=$(patsubst %,$(RELEASEPATH)/lib%.a,$(STATICLIBRARY))
-LLIBS:=$(OPT.L)"$(RELEASEPATH)" $(patsubst %,$(OPT.l)%,$(STATICLIBRARY))
-#
-ifneq ($(SYSTEMLIBS),)
-LLIBS:=$(LLIBS) $(patsubst %,$(OPT.l)%,$(SYSTEMLIBS))
-endif
-#
-endif
-
-## Link executable
-# get OBJECTFILES from call to tools2common
-define tools2linkexe
-$(EXETARGET): $(OBJECTFILES) $(STATICLIBS)
-	$(call startrule,tools2linkexe) \
-	$(LINKER) $(CFLAGS) $(LFLAGS) $(OPT.O)"$(EXETARGET)" $(call dblquote,$(OBJECTFILES)) $(LLIBS) \
-	$(if $(SAVESPACE),; $(GNURM) -rf $(OUTPUTPATH); true,) \
-	$(call endrule,tools2linkexe)
-
-endef
-
-$(eval $(call tools2linkexe))
-
-	
-## Copy executable to the tools directory
-ifneq ($(TOOLSPATH),)
-define tools2install
-$(INSTALLED): $(EXETARGET)
-	$(call startrule,tools2install) \
-	$(GNUCP) "$(EXETARGET)" "$(INSTALLED)" && \
-	$(GNUCHMOD) a+rwx "$(INSTALLED)" \
-	$(call endrule,tools2install)
-endef
-
-$(eval $(call tools2install))
-
-endif
-
-## The End
+# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Function-Like Makefile to build a TOOLS2 EXE with gcc
+# 
+#
+
+## Outputs - externally relevant targets that this FLM generates
+ifeq ($(OSTYPE),cygwin)
+SYSTEMLIBS:=$(LIBS.WIN32)
+else
+SYSTEMLIBS:=$(LIBS.LINUX)
+endif
+
+EXETARGET:=$(RELEASEPATH)/$(TARGET)$(DOTEXE)
+
+ifneq ($(TOOLSPATH),)
+INSTALLED:=$(TOOLSPATH)/$(TARGET)$(DOTEXE)
+endif
+
+## Target groups
+RELEASEABLES:=$(INSTALLED)
+TARGETS:=$(EXETARGET) $(INSTALLED)
+
+## Common build steps (compiling and cleaning)
+include $(FLMHOME)/tools2common.flm
+
+## Static libraries
+ifneq ($(STATICLIBRARY),)
+STATICLIBS:=$(patsubst %,$(RELEASEPATH)/lib%.a,$(STATICLIBRARY))
+LLIBS:=$(OPT.L)"$(RELEASEPATH)" $(patsubst %,$(OPT.l)%,$(STATICLIBRARY))
+#
+ifneq ($(SYSTEMLIBS),)
+LLIBS:=$(LLIBS) $(patsubst %,$(OPT.l)%,$(SYSTEMLIBS))
+endif
+#
+endif
+
+## Link executable
+# get OBJECTFILES from call to tools2common
+define tools2linkexe
+$(EXETARGET): $(OBJECTFILES) $(STATICLIBS)
+	$(call startrule,tools2linkexe) \
+	$(LINKER) $(CFLAGS) $(LFLAGS) $(OPT.O)"$(EXETARGET)" $(call dblquote,$(OBJECTFILES)) $(LLIBS) \
+	$(if $(SAVESPACE),; $(GNURM) -rf $(OUTPUTPATH); true,) \
+	$(call endrule,tools2linkexe)
+
+endef
+
+$(eval $(call tools2linkexe))
+
+	
+## Copy executable to the tools directory
+ifneq ($(TOOLSPATH),)
+define tools2install
+$(INSTALLED): $(EXETARGET)
+	$(call startrule,tools2install) \
+	$(GNUCP) "$(EXETARGET)" "$(INSTALLED)" && \
+	$(GNUCHMOD) a+rwx "$(INSTALLED)" \
+	$(call endrule,tools2install)
+endef
+
+$(eval $(call tools2install))
+
+endif
+
+## The End
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/tools2lib.flm
--- a/sbsv2/raptor/lib/flm/tools2lib.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/tools2lib.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,45 +1,45 @@
-# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# Function-Like Makefile to build a TOOLS2 LIB with gcc
-# 
-#
-
-## Outputs - externally relevant targets that this FLM generates
-LIBTARGET:=$(RELEASEPATH)/$(TARGET).a
-
-## Target groups
-RELEASEABLES:=$(LIBTARGET)
-TARGETS:=$(LIBTARGET)
-
-## Common build steps (compiling)
-include $(FLMHOME)/tools2common.flm
-
-## Create library archive
-# get OBJECTFILES from tools2common
-define tools2lib
-$(LIBTARGET): $(OBJECTFILES)
-	$(call startrule,tools2lib) \
-	$(ARCHIVER) $(AFLAGS) $(LIBTARGET) $(OBJECTFILES) && \
-	$(RANLIB) $(LIBTARGET) \
-	$(if $(SAVESPACE),; $(GNURM) -rf $(OUTPUTPATH); true,) \
-	$(call endrule,tools2lib)
-
-endef
-
-$(eval $(call tools2lib))
-
-## Global target
-LIBRARY:: $(LIBTARGET)
-
-## The End
+# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Function-Like Makefile to build a TOOLS2 LIB with gcc
+# 
+#
+
+## Outputs - externally relevant targets that this FLM generates
+LIBTARGET:=$(RELEASEPATH)/$(TARGET).a
+
+## Target groups
+RELEASEABLES:=$(LIBTARGET)
+TARGETS:=$(LIBTARGET)
+
+## Common build steps (compiling)
+include $(FLMHOME)/tools2common.flm
+
+## Create library archive
+# get OBJECTFILES from tools2common
+define tools2lib
+$(LIBTARGET): $(OBJECTFILES)
+	$(call startrule,tools2lib) \
+	$(ARCHIVER) $(AFLAGS) $(LIBTARGET) $(OBJECTFILES) && \
+	$(RANLIB) $(LIBTARGET) \
+	$(if $(SAVESPACE),; $(GNURM) -rf $(OUTPUTPATH); true,) \
+	$(call endrule,tools2lib)
+
+endef
+
+$(eval $(call tools2lib))
+
+## Global target
+LIBRARY:: $(LIBTARGET)
+
+## The End
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/tracecompiler.mk
--- a/sbsv2/raptor/lib/flm/tracecompiler.mk	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/tracecompiler.mk	Mon Nov 16 09:46:46 2009 +0000
@@ -1,76 +1,86 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# Run Trace Compiler on source files to generate trace headers and decode files
-#
-
-TRACE_PRJNAME:=$(basename $(notdir $(PROJECT_META)))
-# Find out TRACE_PATH
-TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces_$(TRACE_PRJNAME),$(DIR))))
-ifeq ($(TRACE_PATH),)
-TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces,$(DIR))))
-endif
-
-# Run trace compiler only if TRACE_PATH exists
-ifneq ($(TRACE_PATH),)
-TRACE_MARKER:=$(TRACE_MARKER_PATH)/tracecompile_$(TRACE_PRJNAME)_$(UID_TC).done
-TRACE_HEADERS:=
-
-TRACE_SOURCE_LIST:=$(TRACE_MARKER_PATH)/tracecompile_$(TRACE_PRJNAME)_$(UID_TC).sourcelist
-
-# 1. Append to or create the list of source files for trace compiler to process
-# 2. Check if the hash in trace marker remain unchanged. If not, remove marker so trace compiler will run again. 
-X:=$(shell set -x ; $(GNUMKDIR) -p $(TRACE_MARKER_PATH) ; $(GNUTOUCH) $(TRACE_SOURCE_LIST) ; echo -e "$(subst $(CHAR_SPACE),\\n,$(SOURCE))" | $(GNUSORT) -u $(TRACE_SOURCE_LIST) - > $(TRACE_SOURCE_LIST).tmp && $(GNUMV) $(TRACE_SOURCE_LIST).tmp $(TRACE_SOURCE_LIST) ; $(GNUMD5SUM) -c $(TRACE_MARKER) || $(GNURM) $(TRACE_MARKER))
-
-$(if $(FLMDEBUG),$(info Trace Compiler sourcelist generation output: $(X)))
-
-$(TRACE_MARKER) : $(SOURCE)
-
-ifeq ($(GUARD_$(call sanitise,$(TRACE_MARKER))),)
-GUARD_$(call sanitise,$(TRACE_MARKER)):=1
-
-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.
-# 3. Show source names that are processed by trace compiler
-define trace_compile
-$(TRACE_MARKER) : $(PROJECT_META)
-	$(call startrule,tracecompile) \
-	( echo -en "$(TRACE_PRJNAME)\n$(PROJECT_META)\n"; \
-	  $(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) \
-	$(call endrule,tracecompile)
-endef
-
-$(eval $(trace_compile))
-
-$(eval $(call GenerateStandardCleanTarget,$(TRACE_HEADERS) $(TRACE_PATH)/tracebuilder.cache $(TRACE_MARKER) $(TRACE_SOURCE_LIST),,))
-
-# End sanity guard
-endif
-
-else
-# Indicate to following parts of the FLM that we actually won't run
-# trace compiler so they can set dependencies accordingly.
-USE_TRACE_COMPILER:=
-endif
-
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+# 
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Run Trace Compiler on source files to generate trace headers and decode files
+
+TRACE_PRJNAME:=$(basename $(notdir $(PROJECT_META)))
+# Find out TRACE_PATH
+TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces_$(TRACE_PRJNAME),$(DIR))))
+ifeq ($(TRACE_PATH),)
+TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces,$(DIR))))
+endif
+ifeq ($(TRACE_PATH),)
+TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces_$(TARGET)_$(TARGETTYPE),$(DIR))))
+# Use target name instead of mmp file name
+TRACE_PRJNAME:=$(TARGET)_$(TARGETTYPE)
+endif
+
+$(if $(FLMDEBUG),$(info TRACE_PATH = $(TRACE_PATH)))
+
+# Run trace compiler only if TRACE_PATH exists
+ifneq ($(TRACE_PATH),)
+TRACE_MARKER:=$(TRACE_MARKER_PATH)/tracecompile_$(TRACE_PRJNAME)_$(UID_TC).done
+TRACE_HEADERS:=
+
+TRACE_SOURCE_LIST:=$(TRACE_MARKER_PATH)/tracecompile_$(TRACE_PRJNAME)_$(UID_TC).sourcelist
+
+# 1. Append to or create the list of source files for trace compiler to process
+# 2. Check if the hash in trace marker remain unchanged. If not, remove marker so trace compiler will run again. 
+X:=$(shell set -x ; $(GNUMKDIR) -p $(TRACE_MARKER_PATH) ; $(GNUTOUCH) $(TRACE_SOURCE_LIST) ; echo -e "$(subst $(CHAR_SPACE),\\n,$(SOURCE))" | $(GNUSORT) -u $(TRACE_SOURCE_LIST) - > $(TRACE_SOURCE_LIST).tmp && $(GNUMV) $(TRACE_SOURCE_LIST).tmp $(TRACE_SOURCE_LIST) ; $(GNUMD5SUM) -c $(TRACE_MARKER) || $(GNURM) $(TRACE_MARKER))
+
+$(if $(FLMDEBUG),$(info Trace Compiler sourcelist generation output: $(X)))
+
+$(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
+
+JAVA_COMMAND:=$(SBS_JAVATC)
+TRACE_COMPILER_PATH:=$(EPOCROOT)/epoc32/tools
+TRACE_COMPILER_START:=-classpath $(TRACE_COMPILER_PATH)/tracecompiler com.nokia.tracecompiler.TraceCompiler
+
+
+# 1. Use pipe to send inputs to trace compiler to process
+# 2. Create a hash regarding to source names and put it in marker.
+# 3. Show source names that are processed by trace compiler
+define trace_compile
+$(TRACE_MARKER) : $(PROJECT_META)
+	$(call startrule,tracecompile) \
+	( echo -en "$(TRACE_PRJNAME)\n$(PROJECT_META)\n"; \
+	  $(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) \
+	$(call endrule,tracecompile)
+endef
+
+$(eval $(trace_compile))
+
+$(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.
+USE_TRACE_COMPILER:=
+endif
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/user/default.flm_ex
--- a/sbsv2/raptor/lib/flm/user/default.flm_ex	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/user/default.flm_ex	Mon Nov 16 09:46:46 2009 +0000
@@ -1,26 +1,26 @@
-# Copyright (c) Symbian Software Ltd 2008-2009.
-#
-# Description:
-# This is an example file.
-# If it exists, the file default.flm in this directory is automatically
-# included by $(SBS_HOME)/lib/flm/config/default.flm
-# This allows end-users to "drop in" a file which adds to the default
-# behaviour (or overrides it) rather than editing the shipped .flm file.
-# default.flm contains things which require one instance per configuration.
-# For example, dependencies in the epoc32 tree (which need the $(EPOCROOT)
-# variable) and recipes to make things not specified in a bld.inf file.
-#
-
-
-# an example dependency - the script my.pl uses the rcomp tool
-
-$(EPOCROOT)/epoc32/tools/my.pl:	$(EPOCROOT)/epoc32/tools/rcomp$(DOTEXE)
-
-
-# an example recipe - run an accounting script after the binaries are made
-
-FINAL::
-	python $(EPOCROOT)/epoc32/tools/my_account.py $(EPOCROOT) $(PLATFORM)
-
-
-# end of example file
+# Copyright (c) Symbian Software Ltd 2008-2009.
+#
+# Description:
+# This is an example file.
+# If it exists, the file default.flm in this directory is automatically
+# included by $(SBS_HOME)/lib/flm/config/default.flm
+# This allows end-users to "drop in" a file which adds to the default
+# behaviour (or overrides it) rather than editing the shipped .flm file.
+# default.flm contains things which require one instance per configuration.
+# For example, dependencies in the epoc32 tree (which need the $(EPOCROOT)
+# variable) and recipes to make things not specified in a bld.inf file.
+#
+
+
+# an example dependency - the script my.pl uses the rcomp tool
+
+$(EPOCROOT)/epoc32/tools/my.pl:	$(EPOCROOT)/epoc32/tools/rcomp$(DOTEXE)
+
+
+# an example recipe - run an accounting script after the binaries are made
+
+FINAL::
+	python $(EPOCROOT)/epoc32/tools/my_account.py $(EPOCROOT) $(PLATFORM)
+
+
+# end of example file
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/user/globals.mk_ex
--- a/sbsv2/raptor/lib/flm/user/globals.mk_ex	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/user/globals.mk_ex	Mon Nov 16 09:46:46 2009 +0000
@@ -1,21 +1,21 @@
-# Copyright (c) Symbian Software Ltd 2008-2009.
-#
-# Description:
-# This is an example file.
-# If it exists, the file globals.mk in this directory is automatically
-# included by $(SBS_HOME)/lib/flm/globals.mk
-# This allows end-users to "drop in" a file which adds to the default
-# behaviour (or overrides it) rather than editing the shipped .mk file.
-# globals.mk contains things which require one instance per build.
-# For example, macros and variables, dependencies and targets which are
-# truly global - independent of the epoc32 tree location.
-#
-
-
-# example resource dependency variables
-
-mycore_DEPENDS:=eikcore.rsg eikcoctl.rsg
-mymisc_DEPENDS:=eikmisc.rsg
-
-
-# end of example file
+# Copyright (c) Symbian Software Ltd 2008-2009.
+#
+# Description:
+# This is an example file.
+# If it exists, the file globals.mk in this directory is automatically
+# included by $(SBS_HOME)/lib/flm/globals.mk
+# This allows end-users to "drop in" a file which adds to the default
+# behaviour (or overrides it) rather than editing the shipped .mk file.
+# globals.mk contains things which require one instance per build.
+# For example, macros and variables, dependencies and targets which are
+# truly global - independent of the epoc32 tree location.
+#
+
+
+# example resource dependency variables
+
+mycore_DEPENDS:=eikcore.rsg eikcoctl.rsg
+mymisc_DEPENDS:=eikmisc.rsg
+
+
+# end of example file
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/utils/copydir.flm
--- a/sbsv2/raptor/lib/flm/utils/copydir.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/utils/copydir.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,73 +1,73 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-# FLM to recursively copy one directory into another.
-
-# parameters
-#
-# SOURCE_DIR	the source directory, relative to EXTENSION_ROOT
-# DEST_DIR		the destination directory, relative to EPOCROOT
-
-SOURCEPATH:=$(EXTENSION_ROOT)/$(SOURCE_DIR)
-DESTPATH:=$(EPOCROOT)/$(DEST_DIR)
-
-# create the destination directory
-$(call makepath,$(DESTPATH))
-
-# macro for copying.
-define copydirectory
-
-# everything gets copied every time.
-ALL::
-	$(call startrule,copydir) \
-	$(GNUCP) -R $(SOURCEPATH)/* $(DESTPATH) && \
-	$(GNUCHMOD) -R a+rw $(DESTPATH) \
-	$(call endrule,copydir)
-
-# CLEAN removes the whole destination directory.
-CLEAN::
-	$(call startrule,clean) \
-	$(GNURM) -rf $(DESTPATH)  \
-	$(call endrule,clean)
-
-endef # copydirectory
-
-$(eval $(copydirectory))
-
-# for WHAT reporting we have to list every file because CBR
-# wont just take a directory name and include the contents.
-
-# normally we would just use the "whatmacro" macro, which
-# handles everything nicely for us, but we are likely to be
-# generating long lists of files here and might over-run the
-# space available for a single variable :-(
-
-FINDFILES:=$(GNUFIND) $(SOURCEPATH) -type f -print | $(GNUSED) 's!$(SOURCEPATH)!$(DESTPATH)!'
-
-define whatcopies
-
-WHAT::
-	@(echo ""; \
-	$(FINDFILES) | (read LINE; \
-	while [ $$$$? -eq 0 ]; do \
-		echo "$$$$LINE"; \
-		read LINE; \
-	done); \
-	echo "") $(if $(DESCRAMBLE),2>&1 | $(DESCRAMBLE))
-
-endef # whatcopies
-
-$(eval $(whatcopies))
-
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+# FLM to recursively copy one directory into another.
+
+# parameters
+#
+# SOURCE_DIR	the source directory, relative to EXTENSION_ROOT
+# DEST_DIR		the destination directory, relative to EPOCROOT
+
+SOURCEPATH:=$(EXTENSION_ROOT)/$(SOURCE_DIR)
+DESTPATH:=$(EPOCROOT)/$(DEST_DIR)
+
+# create the destination directory
+$(call makepath,$(DESTPATH))
+
+# macro for copying.
+define copydirectory
+
+# everything gets copied every time.
+ALL::
+	$(call startrule,copydir) \
+	$(GNUCP) -R $(SOURCEPATH)/* $(DESTPATH) && \
+	$(GNUCHMOD) -R a+rw $(DESTPATH) \
+	$(call endrule,copydir)
+
+# CLEAN removes the whole destination directory.
+CLEAN::
+	$(call startrule,clean) \
+	$(GNURM) -rf $(DESTPATH)  \
+	$(call endrule,clean)
+
+endef # copydirectory
+
+$(eval $(copydirectory))
+
+# for WHAT reporting we have to list every file because CBR
+# wont just take a directory name and include the contents.
+
+# normally we would just use the "whatmacro" macro, which
+# handles everything nicely for us, but we are likely to be
+# generating long lists of files here and might over-run the
+# space available for a single variable :-(
+
+FINDFILES:=$(GNUFIND) $(SOURCEPATH) -type f -print | $(GNUSED) 's!$(SOURCEPATH)!$(DESTPATH)!'
+
+define whatcopies
+
+WHAT::
+	@(echo ""; \
+	$(FINDFILES) | (read LINE; \
+	while [ $$$$? -eq 0 ]; do \
+		echo "$$$$LINE"; \
+		read LINE; \
+	done); \
+	echo "") $(if $(DESCRAMBLE),2>&1 | $(DESCRAMBLE))
+
+endef # whatcopies
+
+$(eval $(whatcopies))
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/utils/prebuilt.flm
--- a/sbsv2/raptor/lib/flm/utils/prebuilt.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/utils/prebuilt.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,103 +1,103 @@
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-# FLM to copy pre-built binaries into the right release locations
-
-# parameters
-#
-# PRE_PLATFORM    the target of the binaries, e.g. armv5
-# PRE_TYPE        the build variant of the binaries, e.g. urel
-# BINARIES        the list of binary files, relative to EXTENSION_ROOT
-
-# The filenames in the list BINARIES may optionally have an appended "->name"
-# when the destination basename should be different from the source. For
-# example, ../bin/deb_codec66.lib->codec66.lib will create files
-# called "codec66.lib" and not "deb_codec66.lib"
-               
-# ensure that there are no nasty leading or trailing spaces
-PRE_PLATFORM:=$(strip $(PRE_PLATFORM))
-PRE_TYPE:=$(strip $(PRE_TYPE))
-
-# don't do anything unless the prebuilt binaries match what we are building
-#
-ifeq ($(PRE_PLATFORM),$(VARIANTPLATFORM))
-ifeq ($(PRE_TYPE),$(VARIANTTYPE))
-
-# the feature Invariant directory for binaries of this ilk
-INV:=$(RELEASEPATH)/$(VARIANTPLATFORM)/$(VARIANTTYPE)
-
-CREATABLEPATHS:=
-RELEASABLES:=
-
-# for any configuration (feature variant or not) add rules to copy the
-# prebuilt binaries from the source directory to the Invariant directory.
-#
-# For example,
-# cp /src/armv5/urel/my.lib /epoc32/release/armv5/urel/my.lib
-#
-# Without this you would always have to build the invariant configuration
-# before (or alongside) any feature variant configuration.
-
-define copyprebuilt
-#
-# $1 is the source file
-# $2 is the destination file
-
-ALL:: $(2)
-
-$(2): $(1)
-	$(call startrule,copyprebuilt) \
-	$(GNUCP) $(1) $(2) && \
-	$(GNUCHMOD) a+rw $(2) \
-	$(call endrule,copyprebuilt)
-
-CREATABLEPATHS:=$(INV)
-RELEASABLES:=$$(RELEASABLES) $(2)
-
-endef # copyprebuilt
-
-define copyprebuiltfile
-#
-# $1 is "name" or "name->name"
-
-ifeq ($(findstring ->,$(1)),)
-$(call copyprebuilt,$(EXTENSION_ROOT)/$(1),$(INV)/$(notdir $(1)))
-else
-$(call copyprebuilt,$(EXTENSION_ROOT)/$(word 1,$(subst ->, ,$(1))),$(INV)/$(word 2,$(subst ->, ,$(1))))
-endif
-endef # copyprebuiltfile
-
-$(eval $(foreach B,$(BINARIES),$(call copyprebuiltfile,$(B))))
-
-
-# housekeeping
-
-# make the output directories while reading the makefile,
-# as some build engines prefer this.
-$(call makepath,$(CREATABLEPATHS))
-
-# clean
-$(eval $(call GenerateStandardCleanTarget,$(RELEASABLES),$(CREATABLEPATHS)))
-
-# what
-$(eval $(call whatmacro,$(RELEASABLES)))
-
-
-endif # PRE_TYPE == VARIANTTYPE
-endif # PRE_PLATFORM == VARIANTPLATFORM
-
-
-# the end
-
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+# FLM to copy pre-built binaries into the right release locations
+
+# parameters
+#
+# PRE_PLATFORM    the target of the binaries, e.g. armv5
+# PRE_TYPE        the build variant of the binaries, e.g. urel
+# BINARIES        the list of binary files, relative to EXTENSION_ROOT
+
+# The filenames in the list BINARIES may optionally have an appended "->name"
+# when the destination basename should be different from the source. For
+# example, ../bin/deb_codec66.lib->codec66.lib will create files
+# called "codec66.lib" and not "deb_codec66.lib"
+               
+# ensure that there are no nasty leading or trailing spaces
+PRE_PLATFORM:=$(strip $(PRE_PLATFORM))
+PRE_TYPE:=$(strip $(PRE_TYPE))
+
+# don't do anything unless the prebuilt binaries match what we are building
+#
+ifeq ($(PRE_PLATFORM),$(VARIANTPLATFORM))
+ifeq ($(PRE_TYPE),$(VARIANTTYPE))
+
+# the feature Invariant directory for binaries of this ilk
+INV:=$(RELEASEPATH)/$(VARIANTPLATFORM)/$(VARIANTTYPE)
+
+CREATABLEPATHS:=
+RELEASABLES:=
+
+# for any configuration (feature variant or not) add rules to copy the
+# prebuilt binaries from the source directory to the Invariant directory.
+#
+# For example,
+# cp /src/armv5/urel/my.lib /epoc32/release/armv5/urel/my.lib
+#
+# Without this you would always have to build the invariant configuration
+# before (or alongside) any feature variant configuration.
+
+define copyprebuilt
+#
+# $1 is the source file
+# $2 is the destination file
+
+ALL:: $(2)
+
+$(2): $(1)
+	$(call startrule,copyprebuilt) \
+	$(GNUCP) $(1) $(2) && \
+	$(GNUCHMOD) a+rw $(2) \
+	$(call endrule,copyprebuilt)
+
+CREATABLEPATHS:=$(INV)
+RELEASABLES:=$$(RELEASABLES) $(2)
+
+endef # copyprebuilt
+
+define copyprebuiltfile
+#
+# $1 is "name" or "name->name"
+
+ifeq ($(findstring ->,$(1)),)
+$(call copyprebuilt,$(EXTENSION_ROOT)/$(1),$(INV)/$(notdir $(1)))
+else
+$(call copyprebuilt,$(EXTENSION_ROOT)/$(word 1,$(subst ->, ,$(1))),$(INV)/$(word 2,$(subst ->, ,$(1))))
+endif
+endef # copyprebuiltfile
+
+$(eval $(foreach B,$(BINARIES),$(call copyprebuiltfile,$(B))))
+
+
+# housekeeping
+
+# make the output directories while reading the makefile,
+# as some build engines prefer this.
+$(call makepath,$(CREATABLEPATHS))
+
+# clean
+$(eval $(call GenerateStandardCleanTarget,$(RELEASABLES),$(CREATABLEPATHS)))
+
+# what
+$(eval $(call whatmacro,$(RELEASABLES)))
+
+
+endif # PRE_TYPE == VARIANTTYPE
+endif # PRE_PLATFORM == VARIANTPLATFORM
+
+
+# the end
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/utils/utility.xml
--- a/sbsv2/raptor/lib/flm/utils/utility.xml	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/utils/utility.xml	Mon Nov 16 09:46:46 2009 +0000
@@ -1,28 +1,28 @@
-
-
-	
-
-	
-		
-		
-		
-	
-
-	
-		
-		
-	
-
-	
-		
-		
-		
-		
-		
-		
-		
-		
-		 
-		
-	
-
+
+
+	
+
+	
+		
+		
+		
+	
+
+	
+		
+		
+	
+
+	
+		
+		
+		
+		
+		
+		
+		
+		
+		 
+		
+	
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/win32.flm
--- a/sbsv2/raptor/lib/flm/win32.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/win32.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,688 +1,688 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# WINSCW EXE/DLL/IMPLIB/LIB Function Like Makefile (FLM)
-# Knows how to build all possible executables for the WINSCW emulator build
-#
-#
-
-# passed in values, stripped of whitespace
-COPY_FOR_STATIC_LINKAGE:=$(strip $(COPY_FOR_STATIC_LINKAGE))
-DEFFILE:=$(strip $(DEFFILE))
-DEFFILEKEYWORD:=$(strip $(DEFFILEKEYWORD))
-EPOCALLOWDLLDATA:=$(strip $(EPOCALLOWDLLDATA))
-EXPORTLIBRARY:=$(strip $(EXPORTLIBRARY))
-BASEADDRESS:=$(strip $(BASEADDRESS))
-LINKAS:=$(strip $(LINKAS))
-NOEXPORTLIBRARY:=$(strip $(NOEXPORTLIBRARY))
-SECUREID:=$(strip $(SECUREID))
-UID2:=$(strip $(UID2))
-UID3:=$(strip $(UID3))
-VENDORID:=$(strip $(VENDORID))
-VID:=$(strip $(VID))
-WIN32_HEADERS:=$(strip $(WIN32_HEADERS))
-
-# local variables
-BINDIR:=
-BINDIRSTATICLINK:=
-BINTARGET:=
-BINTARGETSTATICLINK:=
-BLDDIR:=
-CHECKLIB_TYPE:=
-CREATABLEPATHS:=
-CLEANTARGETS:=
-CW_RUNTIME:=
-ENTRYSYMBOL:=
-IMPORTLIBLINKAS:=
-IMPORTLIBTARGET:=
-LIBDIR:=
-LINKER_FIRSTSTATLIB:=
-MAINLINKAS:=
-NEWLIBFILE:=
-RELEASABLES:=
-STATLIBDIR:=
-STDCPP_BUILD:=
-STDCPPTAGFILE:=
-UID1:=
-WIN32_LIBRARIES:=
-
-# FIVESPACES variable created to ensure that a suitable gap of space characters can
-# be placed between the separate arguments in the call to a tool (if required).
-# This is a workaround for a problem in Cygwin, where separate arguments are interpreted
-# as a single argument when passed to bash.
-FIVESPACES=$(BLANK)     $(BLANK)
-
-# CW runtime varies based on TARGETTYPE requirements, with wrapper FLMs dictating the choice
-# We override a CW-specific environment variable to do this, in common with ABLD
-ifeq ($(CW_STATIC_RUNTIME),1)
-  CW_RUNTIME:=$(CW_RUNTIME_STATIC)
-  CFLAGS:=$(CFLAGS) $(OPT.RUNTIME)staticmulti
-else
-  CW_RUNTIME:=$(CW_RUNTIME_NONSTATIC)
-  CFLAGS:=$(CFLAGS) $(OPT.RUNTIME)dllmulti
-endif
-MWSym2LibraryFiles:=$(subst $(CHAR_SPACE),$(DIRSEP),$(CW_RUNTIME) $(CW_DEFAULT_LIBS))
-ifneq ($(WIN32_LIBRARY),)
-  WIN32_HEADERS:=1
-  WIN32_LIBRARIES:=$(addprefix $(OPT.LIBFILE),$(WIN32_LIBRARY))
-endif
-
-# top-level definitions
-BINDIR:=$(RELEASEPATH)/$(FULLVARIANTPATH)
-
-# TARGETPATH and COPY_FOR_STATIC_LINKAGE only apply when TARGETPATH is a sub-directory of /sys/bin
-TARGETPATH_APPEND:=$(subst \,/,$(TARGETPATH))
-ifneq ($(findstring /sys/bin/,$(TARGETPATH_APPEND)),)
-  ifeq ($(COPY_FOR_STATIC_LINKAGE),1)
-    BINDIRSTATICLINK:=$(BINDIR)
-  endif
-  BINDIR:=$(BINDIR)/z$(TARGETPATH_APPEND)
-else
-  COPY_FOR_STATIC_LINKAGE:=0
-endif
-
-BLDDIR:=$(OUTPUTPATH)/$(FULLVARIANTPATH)
-LIBDIR:=$(RELEASEPATH)/$(LINKPATH)
-STATLIBDIR:=$(RELEASEPATH)/$(FULLVARIANTPATH)
-CREATABLEPATHS:=$(BLDDIR) $(BINDIR) $(BINDIRSTATICLINK)
-
-# Deduce whether we should be performing a build with standard CPP characteristics
-# This operates differently per-OS release, although OE TARGETTYPEs always build with standard CPP traits
-ifeq ($(OPEN_ENVIRONMENT),1)
-  STDCPP_BUILD:=1
-endif
-
-ifeq ($(SUPPORTS_STDCPP_NEWLIB),1)
-  ifeq ($(NOSTDCPP),1)
-    STDCPP_BUILD:=
-  else
-    ifeq ($(STDCPP),1)
-      STDCPP_BUILD:=1
-    endif
-  endif
-
-  ifneq ($(NEWLIB),)
-    NEWLIBFILE:=$(STATLIBDIR)/$(NEWLIB)
-  else
-    ifeq ($(SYSTEM_TARGET),1)
-      NEWLIBFILE:=$(STATLIBDIR)/$(DEFAULT_SYSTEM_NEWLIB)
-    else
-      NEWLIBFILE:=$(STATLIBDIR)/$(DEFAULT_NORMAL_NEWLIB)
-    endif
-  endif
-endif
-
-ifeq ($(STDCPP_BUILD),1)
-  CDEFS:=$(CDEFS) $(STDCPP_DEF)
-  SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(STDCPP_INCLUDE)
-  CFLAGS:=$(CFLAGS) $(OPT.WCHAR) on
-  CHECKLIB_TYPE:=$(OPT.CHECKLIB.STDCPP)
-  STDCPPTAGFILE:=$(OPT.LIBPATH)$(EPOCROOT)/epoc32/tools/tag $(OPT.SEARCH) tag_coff
-else
-  CFLAGS:=$(CFLAGS) $(OPT.WCHAR) off
-  CHECKLIB_TYPE:=$(OPT.CHECKLIB.SYMCPP)
-endif
-
-ifeq ($(WIN32_HEADERS),1)
-  CDEFS:=$(CDEFS) WIN32
-  CDEFS:=$(CDEFS) _WINDOWS
-  CFLAGS:=$(CFLAGS) $(OPT.STDINC)
-else
-  CFLAGS:=$(CFLAGS) $(OPT.NOSTDINC)
-endif
-
-# get the compiler to generate dependencies for us?
-ifeq ($(DEPEND_SKIP),)
-  CFLAGS:=$(CFLAGS) $(OPT.DEPEND)
-endif
-
-# specifics relating to the base type of the target being processed
-ifeq ($(BASE_TYPE),dll)
-  # Special case, although this should be dealt with in the wrapper FLM in a better way
-  ifeq ($(TARGETTYPE),exexp)
-    CDEFS:=$(CDEFS) __EXE__
-    ENTRYSYMBOL:=__E32Startup
-    LFLAGS:=$(LFLAGS) $(OPT.NOENTRY)
-    UID1:=1000007a
-  else
-    CDEFS:=$(CDEFS) __DLL__
-    ENTRYSYMBOL:=__E32Dll
-    LFLAGS:=$(LFLAGS) $(OPT.MAINENTRYPOINT)__Win32DllMain@12
-    UID1:=10000079
-  endif
-  LFLAGS:=$(LFLAGS) $(OPT.SHARED)
-
-  ifneq ($(BASEADDRESS),)
-    LFLAGS:=$(LFLAGS) $(OPT.IMAGEBASE)$(BASEADDRESS)
-  endif
-
-  ifeq ($(FIRST_STATLIB),)
-    BASE_TYPE_STATLIB:=edll.lib
-  else
-    BASE_TYPE_STATLIB:=$(FIRST_STATLIB)
-  endif
-endif
-ifeq ($(BASE_TYPE),exe)
-  CDEFS:=$(CDEFS) __EXE__
-  ENTRYSYMBOL:=?_E32Bootstrap@@YGXXZ
-  UID1:=1000007a
-
-  ifeq ($(FIRST_STATLIB),)
-    BASE_TYPE_STATLIB:=eexe.lib
-  else
-    BASE_TYPE_STATLIB:=$(FIRST_STATLIB)
-  endif
-endif
-
-ifeq ($(FIRSTLIB),)
-  LINKER_FIRSTSTATLIB:=$(BASE_TYPE_STATLIB)
-else
-  LINKER_FIRSTSTATLIB:=$(FIRSTLIB)
-endif
-
-
-BINTARGET:=$(BINDIR)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
-
-
-# Run trace compiler #####################################
-TRACE_MARKER_PATH:=$(OUTPUTPATH)
-
-ifeq ($(UID3),)
-  ifeq ($(UID2),)
-    USE_TRACE_COMPILER:=
-  else
-    UID_TC:=$(UID2)
-  endif
-else
-  UID_TC:=$(UID3)
-endif
-
-# USE_TRACE_COMPILER defaults to blank in Raptor config.
-# Users can turn TC on by setting it to 1 in user config.
-ifneq ($(USE_TRACE_COMPILER),) 
-  include $(FLMHOME)/tracecompiler.mk
-endif
-
-
-####################
-## IMPORT LIBRARY ##
-####################
-
-IMPORTLIBLINKAS:=$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
-# LINKAS, if supplied, only applies to IMPLIB TARGETTYPEs
-ifeq ($(BASE_TYPE),importlib)
-  ifneq ($(LINKAS),)
-    IMPORTLIBLINKAS:=$(LINKAS)
-  else
-    IMPORTLIBLINKAS:=$(TARGET).dll
-  endif
-endif
-
-ifneq ($(EXPORTLIBRARY),)
-  IMPORTLIBTARGET:=$(LIBDIR)/$(EXPORTLIBRARY).lib
-else
-  IMPORTLIBTARGET:=$(LIBDIR)/$(TARGET).lib
-endif
-
-# Regardless of whether a TARGETTYPE normally supports an import library, always attempt
-# to generate one if an explicit DEFFILE keyword was listed
-ifeq ($(DEFFILEKEYWORD),1)
-  SUPPORTS_IMPORT_LIBRARY:=1
-endif
-
-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
-      ifneq ($(VARIANTTYPE),udeb)
-        CREATABLEPATHS:=$(CREATABLEPATHS) $(if $(or $(EXPORTUNFROZEN),$(DEFFILE)),$(LIBDIR))
-      endif
-
-      ifneq ($(EXPORTUNFROZEN),)
-        # EXPORTUNFROZEN amounts to doing the stage-two link with the makedef generated temporary .def file but creating a .lib
-        # file as a side-effect of linking.  The import library is therefore dependent on the final binary in this instance.
-        $(info EXPORTUNFROZEN present in $(PROJECT_META) - unfrozen exports will be represented in import library. )
-        $(IMPORTLIBTARGET): $(BINTARGET)
-        $(eval TARGET_$(call sanitise,$(IMPORTLIBTARGET)):=1)
-      else
-        ifneq ($(DEFFILE),)
-          # If a .def file physically exists (either explicitly via DEFFILE or implicitly in the correct place) then we
-          # generate an import library with reference to it
-          PREPPEDDEFFILE:=$(BLDDIR)/$(TARGET).prep.def
-          CLEANTARGETS:=$(CLEANTARGETS) $(PREPPEDDEFFILE)
-
-          define win32def2lib
-            $(IMPORTLIBTARGET): $(DEFFILE)
-	          $(call startrule,win32def2lib) \
-	          $(PREPDEF) "$(DEFFILE)" "$(PREPPEDDEFFILE)" && \
-	          $(LD) $(PREPPEDDEFFILE) $(OPT.IMPORTLIB) -o "$$@" $(OPT.ADDCOMMAND) "out:$(IMPORTLIBLINKAS)" $(OPT.WARNINGS) off \
-	          $(call endrule,win32def2lib)
-          endef
-          $(eval $(win32def2lib))
-          $(eval TARGET_$(call sanitise,$(IMPORTLIBTARGET)):=1)
-        endif
-      endif
-    endif
-  endif
-endif
-
-
-ifneq ($(BASE_TYPE),importlib)
-
-  #############
-  ## COMPILE ##
-  #############
-
-  ifeq ($(COPY_FOR_STATIC_LINKAGE),1)
-    BINTARGETSTATICLINK:=$(BINDIRSTATICLINK)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
-  endif
-
-  CLEANTARGETS:=$(CLEANTARGETS) $(BINTARGET) $(BINTARGETSTATICLINK)
-  RELEASABLES:=$(RELEASABLES) $(BINTARGET) $(BINTARGETSTATICLINK)
-
-  # work on a local source files list
-  SRCFILES:=$(SOURCE)
-  # and there may be more source for stage 2 in OE builds
-  SRCFILES_OE:=
-
-  ifneq ($(BASE_TYPE),staticlib)
-    # add the generated UID source file
-    GENSOURCE:=$(BLDDIR)/$(TARGET).UID.CPP
-    SRCFILES:=$(SRCFILES) $(GENSOURCE)
-
-    # the generated symbol lookup source file for Open Environment.
-    # this only gets linked in at stage 2
-    SYMSOURCE:=$(if $(OPEN_ENVIRONMENT),$(BLDDIR)/$(TARGET)_SYM_.cpp,)
-    SRCFILES_OE:=$(SYMSOURCE)
-
-    CLEANTARGETS:=$(CLEANTARGETS) $(GENSOURCE) $(SYMSOURCE)
-
-    ifeq ($(UID2),00000000)
-      ifneq ($(UID2_DEFAULT),)
-        UID2:=$(UID2_DEFAULT)
-      endif
-    endif
-
-    ifeq ($(SECUREID),)
-      SECUREID:=$(UID3)
-    endif
-
-    define win32generateUIDcpp
-      $(GENSOURCE): $(PROJECT_META)
-	    $(call startrule,win32generateUIDcpp,,) \
-	    echo "// SBS-generated uid source file" > $$@ && \
-	    echo "#include " >> $$@ && \
-	    echo "#pragma data_seg(\".SYMBIAN\")" >> $$@ && \
-	    echo "__EMULATOR_IMAGE_HEADER2(0x$(UID1),0x$(UID2),0x$(UID3),EPriority$(EPOCPROCESSPRIORITY),0x$(CAPABILITYFLAG1),0x$(CAPABILITYFLAG2),0x$(SECUREID),0x$(VENDORID),0x$(VERSIONHEX),$(EPOCALLOWDLLDATA))" >> $$@ && \
-	    echo "#pragma data_seg()" >> $$@ \
-	    $(call endrule,win32generateUIDcpp)
-    endef
-    $(eval $(win32generateUIDcpp))
-  endif # neq $(BASE_TYPE),staticlib
-
-  # object files
-  OBJECTFILES:=$(patsubst %,$(BLDDIR)/%,$(addsuffix .o,$(basename $(notdir $(call allsuffixsubst,.cia .CIA .Cia,_.cia,$(SRCFILES))))))
-  OBJECTFILES:=$(patsubst %.UID.o,%_UID_.o,$(OBJECTFILES))
-
-  # object file extras for stage 2
-  OBJECTFILES_OE:=$(patsubst %,$(BLDDIR)/%,$(addsuffix .o,$(basename $(notdir $(SRCFILES_OE)))))
-
-  CLEANTARGETS:=$(CLEANTARGETS) $(OBJECTFILES) $(OBJECTFILES_OE)
-
-  # include paths and preinclude file
-  UINCLUDE:=$(patsubst %,$(OPT.USERINCLUDE)%,$(USERINCLUDE))
-  SINCLUDE:=$(patsubst %,$(OPT.SYSINCLUDE)%,$(SYSTEMINCLUDE))
-  PINCLUDE:=$(OPT.PREINCLUDE)$(notdir $(PRODUCT_INCLUDE))
-
-  #INCLUDES:=$(UINCLUDE) $(OPT.SPLITINCLUDE) $(SINCLUDE) $(PINCLUDE)
-  INCLUDES:=$(OPT.SPLITINCLUDE) $(UINCLUDE) $(SINCLUDE) $(PINCLUDE)
-
-  # macro definitions
-  DEFINES:=$(call makemacrodef,$(OPT.DEFINE),$(CDEFS) $(TARGET_MACRO))
-
-
-  # $(1) is the name of the source file, $(2) is the extension to map it to e.g. .o
-  # no space in front of function body
-  define mapwin32file
-    $(patsubst %.UID$(2),%_UID_$(2),$(BLDDIR)/$(addsuffix $2,$(basename $(notdir $(call allsuffixsubst,.cia .CIA .Cia,_.cia,$(1))))))
-  endef
-
-  # compile all source files, creating and including compiler generated dependency files along the way
-  # SED is used to (a) remove relatively pathed "object_file: source_file" references that can appear
-  # with some versions of mwccsym2 and (b) convert slashes
-  define win32compile2object
-
-    $(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 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) \
-	  $(call endrule,win32compile2object)
-
-    CLEANTARGETS:=$$(CLEANTARGETS) $(call mapwin32file,$(1),.dep)
-
-    CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
-    ifneq "$(DEPENDFILE)" ""
-    ifeq ($(NO_DEPEND_INCLUDE),)
-      ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" ""
-        -include $(DEPENDFILE)
-      endif
-    endif
-    endif
-
-    # individual source file compilation
-    SOURCETARGET_$(call sanitise,$(1)): $(call mapwin32file,$(1),.o)
-
-  endef
-
-  # List target, depends on object file
-  define win32list
-  LISTING:: $(OBJECTFILES) $(OBJECTFILES_OE)
-	$(call startrule,win32listing) \
-	$(CC) $(OPT.LISTING) $(patsubst %.UID.o,%_UID_.o,$(BLDDIR)/$(addsuffix .o,$(basename $(notdir $(1))))) -o $(basename $1).WINSCW.lst \
-	$(call endrule,win32listing)
-  endef
-
-  $(foreach SRCFILE,$(SRCFILES) $(SRCFILES_OE),$(eval $(call win32compile2object,$(SRCFILE))))
-  $(foreach SRCFILE,$(SRCFILES) $(SRCFILES_OE),$(eval $(call win32list,$(SRCFILE))))
-
-  ######################
-  ## RESOURCE COMPILE ##
-  ######################
-
-  # If Python has been used to construct the environment on Windows then the standard MW include path environment
-  # variable will have been munged to UPPERCASE.
-  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
-
-    $(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) -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) \
-	  $(call endrule,win32resourcecompile)
-
-    CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
-    ifneq "$(DEPENDFILE)" ""
-    ifeq ($(NO_DEPEND_INCLUDE),)
-      ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" ""
-        -include $(DEPENDFILE)
-      endif
-    endif
-    endif
-
-  endef
-
-  $(foreach WIN32RESOURCEFILE,$(WIN32_RESOURCE),$(eval $(call win32resourcecompile,$(WIN32RESOURCEFILE))))
-  OBJECTFILES:=$(OBJECTFILES) $(patsubst %,$(BLDDIR)/%,$(addsuffix .res,$(basename $(notdir $(WIN32_RESOURCE)))))
-
-  ##################
-  ## LINK/ARCHIVE ##
-  ##################
-
-  # libraries
-  STATICLIBS:=$(patsubst %,%.lib,$(STATICLIBRARY))
-  STATICLIBFILES:=$(patsubst %,$(STATLIBDIR)/%,$(STATICLIBS))
-  LINKER_FIRSTSTATLIBFILE:=$(STATLIBDIR)/$(LINKER_FIRSTSTATLIB)
-
-  ifeq ($(VARIANTTYPE),urel)
-    LINKLIBS:=$(patsubst %.dso,%.lib,$(LIBRARY))
-  else
-    LINKLIBS:=$(patsubst %.dso,%.lib,$(LIBRARY_DEBUG))
-  endif
-
-  LINKLIBFILES:=$(patsubst %,$(LIBDIR)/%,$(LINKLIBS))
-
-  MAP:=
-  ifneq ($(BASE_TYPE),staticlib)
-    ifneq ($(BASE_TYPE),importlib)
-      # link map file (urel only)
-      ifeq ($(VARIANTTYPE),urel)
-        MAP:=$(OPT.MAP)$(BINTARGET).map
-        CLEANTARGETS:=$(CLEANTARGETS) $(BINTARGET).map
-        RELEASABLES:=$(RELEASABLES) $(BINTARGET).map
-      endif
-    endif
-  endif
-
-  # all object files are listed in a response file to minimise the length of linker calls
-  OBJECTFILES_LRF:=$(BLDDIR)/$(TARGET)_$(VARIANTTYPE)_objects.lrf
-  CLEANTARGET:=$(CLEANTARGETS) $(OBJECTFILES_LRF)
-
-  define groupin10
-	$(if $1,@echo -e $(foreach L,$(wordlist 1,10,$1),"$(L)\\n") >> $(OBJECTFILES_LRF),)
-	$(if $1,$(call groupin10,$(wordlist 11,$(words $1),$1)),@true)
-  endef
-
-  #
-  # Archive
-  #
-  ifeq ($(BASE_TYPE),staticlib)
-    define win32archive
-      $(BINTARGET): $(OBJECTFILES)
-	    @echo "" > $(OBJECTFILES_LRF);
-		$(call groupin10,$(notdir $(OBJECTFILES))) ;
-	    $(call startrule,win32archive) \
-	    $(LD) $(OPT.STATICLIBRARY) $(LFLAGS) $(OPT.NOIMPLIB) $(WIN32_LIBRARIES) $(OPT.OUT)"$$@" $(STDCPPTAGFILE) $(OPT.LIBPATH)$(BLDDIR) $(OPT.SEARCH) @$(OBJECTFILES_LRF) \
-	    $(if $(SAVESPACE),; $(GNURM) -rf $(BLDDIR); true,) \
-	    $(call endrule,win32archive)
-    endef
-    $(eval $(win32archive))
-  endif
-
-  ifneq ($(EPOCHEAPSIZEMIN_DEC_KB),)
-    LFLAGS:=$(LFLAGS) $(OPT.HEAPRESERVE)$(EPOCHEAPSIZEMAX_DEC_KB) $(OPT.HEAPCOMMIT)$(EPOCHEAPSIZEMIN_DEC_KB)
-  endif
-
-  #
-  # Simple link
-  #
-  ifeq ($(BASE_TYPE),exe)
-    define win32simplelink
-      $(BINTARGET).map: $(BINTARGET)
-
-      $(BINTARGET): $(OBJECTFILES) $(LINKER_FIRSTSTATLIBFILE) $(NEWLIBFILE) $(STATICLIBFILES) $(LINKLIBFILES)
-	    @echo "" > $(OBJECTFILES_LRF);
-		$(call groupin10,$(notdir $(OBJECTFILES))) ;
-	    $(call startrule,win32simplelink) \
-	    $(if $(SUPPORTS_STDCPP_NEWLIB),$(if $(STATICLIBFILES),$(CHECKLIB) $(CHECKLIB_TYPE) $(OPT.CHECKLIB.WIN32) $(STATICLIBFILES) &&,),) \
-	    MWSym2LibraryFiles="$(MWSym2LibraryFiles)" $(LD) $(LFLAGS) $(OPT.MENTRYPOINT)$(ENTRYSYMBOL) $(MAP) $(LINKER_FIRSTSTATLIBFILE) $(NEWLIBFILE) $(WIN32_LIBRARIES) $(STATICLIBFILES) $(LINKLIBFILES) $(OPT.OUT)"$$@" $(OPT.NOIMPLIB) $(OPT.LIBPATH)$(BLDDIR) $(OPT.SEARCH) @$(OBJECTFILES_LRF) \
-	    $(if $(SAVESPACE),; $(GNURM) -rf $(BLDDIR); true,) \
-	    $(call endrule,win32simplelink)
-    endef
-    $(eval $(win32simplelink))
-  endif
-
-  #
-  # Two stage link
-  #
-  ifeq ($(BASE_TYPE),dll)
-    TMP_IMPLIB:=$(BLDDIR)/$(TARGET).lib
-    TMP_INFFILE:=$(BLDDIR)/$(TARGET).inf
-    TMP_SYMFILE:=$(if $(OPEN_ENVIRONMENT),$(BLDDIR)/$(TARGET).sym,)
-    TMP_TARGET:=$(BLDDIR)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
-    TMP_DEFFILE:=$(BLDDIR)/$(TARGET).def
-
-    CLEANTARGETS:=$(CLEANTARGETS) $(TMP_IMPLIB) $(TMP_INFFILE) $(TMP_TARGET) $(TMP_DEFFILE) $(TMP_SYMFILE)
-
-    MAKEDEF_ARGS:=-absent $(ENTRYSYMBOL) -Inffile  $(call dblquote,$(TMP_INFFILE)) $(NAME_LOOKUP)
-
-    ifeq ($(SYSTEM_TARGET),1)
-        MAKEDEF_ARGS:=$(MAKEDEF_ARGS) -SystemTargetType
-    endif
-
-    ifneq ($(FIXED_EXPORT),)
-      # Fixed export TARGETTYPE, but with possibility of a .def file if explicitly specified and available
-      ifeq ($(DEFFILEKEYWORD),1)
-        ifneq ($(DEFFILE),)
-          MAKEDEF_ARGS:=$(MAKEDEF_ARGS) -Frzfile $(call dblquote,$(DEFFILE))
-        endif
-      endif
-      MAKEDEF_ARGS:=$(MAKEDEF_ARGS) -1 $(FIXED_EXPORT)
-    else
-      # Variable export TARGETTYPE with either deduced or explicitly specified .def file (if available)
-      ifneq ($(DEFFILE),)
-        MAKEDEF_ARGS:=$(MAKEDEF_ARGS) -Frzfile $(call dblquote,$(DEFFILE))
-      endif
-    endif
-
-
-    ifneq ($(EXPORTSUNFROZEN),)
-    	LIBRARY: $(TMP_IMPLIB)
-    endif
-
-    define win32stageonelink
-      # Stage One
-      # Link by name, generating temporary main binary and import library.
-      $(TMP_IMPLIB): $(TMP_TARGET)
-
-      $(TMP_TARGET): $(OBJECTFILES) $(LINKER_FIRSTSTATLIBFILE) $(NEWLIBFILE) $(STATICLIBFILES) $(LINKLIBFILES)
-	    @echo "" > $(OBJECTFILES_LRF);
-		$(call groupin10,$(notdir $(OBJECTFILES))) ;
-	    $(call startrule,win32stageonelink) \
-	    $(if $(SUPPORTS_STDCPP_NEWLIB),$(if $(STATICLIBFILES),$(CHECKLIB) $(CHECKLIB_TYPE) $(OPT.CHECKLIB.WIN32) $(STATICLIBFILES) &&,),) \
-	    MWSym2LibraryFiles="$(MWSym2LibraryFiles)" $(LD) $(LFLAGS) $(OPT.MENTRYPOINT)$(ENTRYSYMBOL) $(OPT.EXPORT)$(EXPORT_TYPE) $(OPT.NOCOMPACTIMPORTLIB) $(OPT.ADDCOMMAND) "out:$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))" $(OPT.WARNINGS) off $(OPT.IMPLIB)"$(TMP_IMPLIB)" $(OPT.OUT)"$(TMP_TARGET)" $(LINKER_FIRSTSTATLIBFILE) $(NEWLIBFILE) $(WIN32_LIBRARIES) $(STATICLIBFILES) $(LINKLIBFILES) $(OPT.LIBPATH)$(BLDDIR) $(OPT.SEARCH) @$(OBJECTFILES_LRF) \
-	    $(call endrule,win32stageonelink)
-    endef
-    $(eval $(win32stageonelink))
-
-    define win32processexports
-      # Process exports
-      # Generate a descriptive info file from the import library.
-      # Push info file through MAKEDEF to generated a valid .def file for link by ordinal.
-      $(TMP_DEFFILE): $(TMP_IMPLIB)
-	    $(call startrule,win32processexports) \
-	    $(LD) $(LFLAGS_INFGEN) $(OPT.OUT)"$(TMP_INFFILE)" "$(TMP_IMPLIB)" && \
-	    $(MAKEDEF) $(MAKEDEF_ARGS) "$$@" \
-	    $(call endrule,win32processexports)
-    endef
-    $(eval $(win32processexports))
-
-    ifeq ($(OPEN_ENVIRONMENT),1)
-      define win32processoeexports
-   	    # Process additional exports for Open Environment
-        # Generate a symbol file from the temporary DLL.
-        # Generate a C++ source file from the symbol file
-
-        $(TMP_SYMFILE): $(TMP_TARGET)
-	      $(call startrule,win32generatesymfile) \
-	      $(LD) $(LFLAGS_SYMGEN) $(OPT.OUT)"$(TMP_SYMFILE)" "$(TMP_TARGET)" \
-	      $(call endrule,win32generatesymfile)
-
-        $(SYMSOURCE): $(TMP_SYMFILE)
-	      $(call startrule,win32generatesymcpp) \
-	      $(SYMLOOKUPUTIL) $(OPT.OUT)"$(SYMSOURCE)" $(OPT.SYM)"$(TMP_SYMFILE)" $(SYMLOOKUPARGS) \
-	      $(call endrule,win32generatesymcpp)
-      endef
-      $(eval $(win32processoeexports))
-    endif
-
-    define win32stagetwolink
-      # Stage Two
-      # Link by ordinal, based on a previously MAKEDEF-generated temporary .def file
-      # Optionally create an import library if EXPORTUNFROZEN is specified
-      #
-      $(BINTARGET).map: $(BINTARGET)
-
-      $(BINTARGET): $(OBJECTFILES) $(OBJECTFILES_OE) $(LINKER_FIRSTSTATLIBFILE) $(STATICLIBFILES) $(NEWLIBFILE) $(LINKLIBFILES) $(TMP_DEFFILE)
-	    @echo "" > $(OBJECTFILES_LRF);
-		$(call groupin10,$(notdir $(OBJECTFILES) $(OBJECTFILES_OE))) ;
-	    $(call startrule,win32stagetwolink) \
-	    MWSym2LibraryFiles="$(MWSym2LibraryFiles)" \
-	    $(LD) $(LFLAGS) $(OPT.DEFFILE)$(TMP_DEFFILE) $(MAP) $(LINKER_FIRSTSTATLIBFILE) $(NEWLIBFILE) $(WIN32_LIBRARIES) $(STATICLIBFILES) $(LINKLIBFILES) \
-	    $(OPT.OUT)"$$@" \
-	    $(if $(EXPORTUNFROZEN),$(OPT.IMPLIB)$(IMPORTLIBTARGET),$(OPT.NOIMPLIB)) \
-	    $(OPT.LIBPATH)$(BLDDIR) $(OPT.SEARCH) @$(OBJECTFILES_LRF) \
-	    $(if $(SAVESPACE),; $(GNURM) -rf $(BLDDIR); true,) \
-	    $(call endrule,win32stagetwolink)
-    endef
-    $(eval $(win32stagetwolink))
-
-    define win32copyforstaticlink
-      # Copy additonal binary to "traditional" output location (if required)
-      $(BINTARGETSTATICLINK): $(BINTARGET)
-	    $(call startrule,win32copyforstaticlink) \
-	    $(GNUCP) $$< $$@ \
-	    $(call endrule,win32copyforstaticlink)
-    endef
-    ifeq ($(COPY_FOR_STATIC_LINKAGE),1)
-      $(eval $(win32copyforstaticlink))
-    endif
-
-    define e32freeze
-      # DLL-type targets that support import library generation support freezing of exports using EFREEZE
-      FREEZE:: $(1)
-	    $(call startrule,freeze,,$(RESOLVED_DEFFILE)) \
-	    $(EFREEZE) $(EFREEZE_REMOVE_OPTION) "$(RESOLVED_DEFFILE)" $(FIVESPACES) "$(2)" \
-	    $(call endrule,freeze)
-    endef
-    # Create only one freeze target per urel/udeb variant as the interface won't differ between them
-    # Only create a freeze target if the component supports import library generation
-    ifneq ($(TARGET_$(call sanitise,$(IMPORTLIBTARGET))_FREEZE),1)
-      ifeq ($(SUPPORTS_IMPORT_LIBRARY),1)
-        $(eval $(call e32freeze,$(BINTARGET),$(TMP_DEFFILE)))
-        $(eval TARGET_$(call sanitise,$(IMPORTLIBTARGET))_FREEZE:=1)
-      endif
-    endif
-  endif
-endif # neq $(BASE_TYPE),importlib
-
-
-# Global targets
-.PHONY:: $(ALLTARGET)
-$(ALLTARGET):: $(RELEASABLES)
-TARGET:: $(RELEASABLES)
-
-ifeq ($(TARGET_$(call sanitise,$(IMPORTLIBTARGET))),1)
-  LIBRARY:: $(IMPORTLIBTARGET)
-else
-  ifeq ($(BASE_TYPE),staticlib)
-    LIBRARY:: $(BINTARGET)
-  endif
-endif
-
-
-# Deal with test code batch files generation.
-ifneq ($(TESTPATH),)
-  EPOC_ROOT:=$(patsubst %/,%,$(EPOCROOT))
-  TOBLDINF:=$(dir $(subst :,,$(subst $(EPOC_ROOT)/,,$(COMPONENT_META))))
-
-
-  BATCHDIR:=$(EPOCROOT)/epoc32/release/$(VARIANTPLATFORM)/$(VARIANTTYPE)/z/test/
-  $(eval $(call MakeTestBatchFiles,$(TARGET),$(BATCHDIR)$(MODULE)/$(VARIANTPLATFORM).$(TESTPATH)))
-  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),))
-# 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))
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# WINSCW EXE/DLL/IMPLIB/LIB Function Like Makefile (FLM)
+# Knows how to build all possible executables for the WINSCW emulator build
+#
+#
+
+# passed in values, stripped of whitespace
+COPY_FOR_STATIC_LINKAGE:=$(strip $(COPY_FOR_STATIC_LINKAGE))
+DEFFILE:=$(strip $(DEFFILE))
+DEFFILEKEYWORD:=$(strip $(DEFFILEKEYWORD))
+EPOCALLOWDLLDATA:=$(strip $(EPOCALLOWDLLDATA))
+EXPORTLIBRARY:=$(strip $(EXPORTLIBRARY))
+BASEADDRESS:=$(strip $(BASEADDRESS))
+LINKAS:=$(strip $(LINKAS))
+NOEXPORTLIBRARY:=$(strip $(NOEXPORTLIBRARY))
+SECUREID:=$(strip $(SECUREID))
+UID2:=$(strip $(UID2))
+UID3:=$(strip $(UID3))
+VENDORID:=$(strip $(VENDORID))
+VID:=$(strip $(VID))
+WIN32_HEADERS:=$(strip $(WIN32_HEADERS))
+
+# local variables
+BINDIR:=
+BINDIRSTATICLINK:=
+BINTARGET:=
+BINTARGETSTATICLINK:=
+BLDDIR:=
+CHECKLIB_TYPE:=
+CREATABLEPATHS:=
+CLEANTARGETS:=
+CW_RUNTIME:=
+ENTRYSYMBOL:=
+IMPORTLIBLINKAS:=
+IMPORTLIBTARGET:=
+LIBDIR:=
+LINKER_FIRSTSTATLIB:=
+MAINLINKAS:=
+NEWLIBFILE:=
+RELEASABLES:=
+STATLIBDIR:=
+STDCPP_BUILD:=
+STDCPPTAGFILE:=
+UID1:=
+WIN32_LIBRARIES:=
+
+# FIVESPACES variable created to ensure that a suitable gap of space characters can
+# be placed between the separate arguments in the call to a tool (if required).
+# This is a workaround for a problem in Cygwin, where separate arguments are interpreted
+# as a single argument when passed to bash.
+FIVESPACES=$(BLANK)     $(BLANK)
+
+# CW runtime varies based on TARGETTYPE requirements, with wrapper FLMs dictating the choice
+# We override a CW-specific environment variable to do this, in common with ABLD
+ifeq ($(CW_STATIC_RUNTIME),1)
+  CW_RUNTIME:=$(CW_RUNTIME_STATIC)
+  CFLAGS:=$(CFLAGS) $(OPT.RUNTIME)staticmulti
+else
+  CW_RUNTIME:=$(CW_RUNTIME_NONSTATIC)
+  CFLAGS:=$(CFLAGS) $(OPT.RUNTIME)dllmulti
+endif
+MWSym2LibraryFiles:=$(subst $(CHAR_SPACE),$(DIRSEP),$(CW_RUNTIME) $(CW_DEFAULT_LIBS))
+ifneq ($(WIN32_LIBRARY),)
+  WIN32_HEADERS:=1
+  WIN32_LIBRARIES:=$(addprefix $(OPT.LIBFILE),$(WIN32_LIBRARY))
+endif
+
+# top-level definitions
+BINDIR:=$(RELEASEPATH)/$(FULLVARIANTPATH)
+
+# TARGETPATH and COPY_FOR_STATIC_LINKAGE only apply when TARGETPATH is a sub-directory of /sys/bin
+TARGETPATH_APPEND:=$(subst \,/,$(TARGETPATH))
+ifneq ($(findstring /sys/bin/,$(TARGETPATH_APPEND)),)
+  ifeq ($(COPY_FOR_STATIC_LINKAGE),1)
+    BINDIRSTATICLINK:=$(BINDIR)
+  endif
+  BINDIR:=$(BINDIR)/z$(TARGETPATH_APPEND)
+else
+  COPY_FOR_STATIC_LINKAGE:=0
+endif
+
+BLDDIR:=$(OUTPUTPATH)/$(FULLVARIANTPATH)
+LIBDIR:=$(RELEASEPATH)/$(LINKPATH)
+STATLIBDIR:=$(RELEASEPATH)/$(FULLVARIANTPATH)
+CREATABLEPATHS:=$(BLDDIR) $(BINDIR) $(BINDIRSTATICLINK)
+
+# Deduce whether we should be performing a build with standard CPP characteristics
+# This operates differently per-OS release, although OE TARGETTYPEs always build with standard CPP traits
+ifeq ($(OPEN_ENVIRONMENT),1)
+  STDCPP_BUILD:=1
+endif
+
+ifeq ($(SUPPORTS_STDCPP_NEWLIB),1)
+  ifeq ($(NOSTDCPP),1)
+    STDCPP_BUILD:=
+  else
+    ifeq ($(STDCPP),1)
+      STDCPP_BUILD:=1
+    endif
+  endif
+
+  ifneq ($(NEWLIB),)
+    NEWLIBFILE:=$(STATLIBDIR)/$(NEWLIB)
+  else
+    ifeq ($(SYSTEM_TARGET),1)
+      NEWLIBFILE:=$(STATLIBDIR)/$(DEFAULT_SYSTEM_NEWLIB)
+    else
+      NEWLIBFILE:=$(STATLIBDIR)/$(DEFAULT_NORMAL_NEWLIB)
+    endif
+  endif
+endif
+
+ifeq ($(STDCPP_BUILD),1)
+  CDEFS:=$(CDEFS) $(STDCPP_DEF)
+  SYSTEMINCLUDE:=$(SYSTEMINCLUDE) $(STDCPP_INCLUDE)
+  CFLAGS:=$(CFLAGS) $(OPT.WCHAR) on
+  CHECKLIB_TYPE:=$(OPT.CHECKLIB.STDCPP)
+  STDCPPTAGFILE:=$(OPT.LIBPATH)$(EPOCROOT)/epoc32/tools/tag $(OPT.SEARCH) tag_coff
+else
+  CFLAGS:=$(CFLAGS) $(OPT.WCHAR) off
+  CHECKLIB_TYPE:=$(OPT.CHECKLIB.SYMCPP)
+endif
+
+ifeq ($(WIN32_HEADERS),1)
+  CDEFS:=$(CDEFS) WIN32
+  CDEFS:=$(CDEFS) _WINDOWS
+  CFLAGS:=$(CFLAGS) $(OPT.STDINC)
+else
+  CFLAGS:=$(CFLAGS) $(OPT.NOSTDINC)
+endif
+
+# get the compiler to generate dependencies for us?
+ifeq ($(DEPEND_SKIP),)
+  CFLAGS:=$(CFLAGS) $(OPT.DEPEND)
+endif
+
+# specifics relating to the base type of the target being processed
+ifeq ($(BASE_TYPE),dll)
+  # Special case, although this should be dealt with in the wrapper FLM in a better way
+  ifeq ($(TARGETTYPE),exexp)
+    CDEFS:=$(CDEFS) __EXE__
+    ENTRYSYMBOL:=__E32Startup
+    LFLAGS:=$(LFLAGS) $(OPT.NOENTRY)
+    UID1:=1000007a
+  else
+    CDEFS:=$(CDEFS) __DLL__
+    ENTRYSYMBOL:=__E32Dll
+    LFLAGS:=$(LFLAGS) $(OPT.MAINENTRYPOINT)__Win32DllMain@12
+    UID1:=10000079
+  endif
+  LFLAGS:=$(LFLAGS) $(OPT.SHARED)
+
+  ifneq ($(BASEADDRESS),)
+    LFLAGS:=$(LFLAGS) $(OPT.IMAGEBASE)$(BASEADDRESS)
+  endif
+
+  ifeq ($(FIRST_STATLIB),)
+    BASE_TYPE_STATLIB:=edll.lib
+  else
+    BASE_TYPE_STATLIB:=$(FIRST_STATLIB)
+  endif
+endif
+ifeq ($(BASE_TYPE),exe)
+  CDEFS:=$(CDEFS) __EXE__
+  ENTRYSYMBOL:=?_E32Bootstrap@@YGXXZ
+  UID1:=1000007a
+
+  ifeq ($(FIRST_STATLIB),)
+    BASE_TYPE_STATLIB:=eexe.lib
+  else
+    BASE_TYPE_STATLIB:=$(FIRST_STATLIB)
+  endif
+endif
+
+ifeq ($(FIRSTLIB),)
+  LINKER_FIRSTSTATLIB:=$(BASE_TYPE_STATLIB)
+else
+  LINKER_FIRSTSTATLIB:=$(FIRSTLIB)
+endif
+
+
+BINTARGET:=$(BINDIR)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
+
+
+# Run trace compiler #####################################
+TRACE_MARKER_PATH:=$(OUTPUTPATH)
+
+ifeq ($(UID3),)
+  ifeq ($(UID2),)
+    USE_TRACE_COMPILER:=
+  else
+    UID_TC:=$(UID2)
+  endif
+else
+  UID_TC:=$(UID3)
+endif
+
+# USE_TRACE_COMPILER defaults to blank in Raptor config.
+# Users can turn TC on by setting it to 1 in user config.
+ifneq ($(USE_TRACE_COMPILER),) 
+  include $(FLMHOME)/tracecompiler.mk
+endif
+
+
+####################
+## IMPORT LIBRARY ##
+####################
+
+IMPORTLIBLINKAS:=$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
+# LINKAS, if supplied, only applies to IMPLIB TARGETTYPEs
+ifeq ($(BASE_TYPE),importlib)
+  ifneq ($(LINKAS),)
+    IMPORTLIBLINKAS:=$(LINKAS)
+  else
+    IMPORTLIBLINKAS:=$(TARGET).dll
+  endif
+endif
+
+ifneq ($(EXPORTLIBRARY),)
+  IMPORTLIBTARGET:=$(LIBDIR)/$(EXPORTLIBRARY).lib
+else
+  IMPORTLIBTARGET:=$(LIBDIR)/$(TARGET).lib
+endif
+
+# Regardless of whether a TARGETTYPE normally supports an import library, always attempt
+# to generate one if an explicit DEFFILE keyword was listed
+ifeq ($(DEFFILEKEYWORD),1)
+  SUPPORTS_IMPORT_LIBRARY:=1
+endif
+
+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
+      ifneq ($(VARIANTTYPE),udeb)
+        CREATABLEPATHS:=$(CREATABLEPATHS) $(if $(or $(EXPORTUNFROZEN),$(DEFFILE)),$(LIBDIR))
+      endif
+
+      ifneq ($(EXPORTUNFROZEN),)
+        # EXPORTUNFROZEN amounts to doing the stage-two link with the makedef generated temporary .def file but creating a .lib
+        # file as a side-effect of linking.  The import library is therefore dependent on the final binary in this instance.
+        $(info EXPORTUNFROZEN present in $(PROJECT_META) - unfrozen exports will be represented in import library. )
+        $(IMPORTLIBTARGET): $(BINTARGET)
+        $(eval TARGET_$(call sanitise,$(IMPORTLIBTARGET)):=1)
+      else
+        ifneq ($(DEFFILE),)
+          # If a .def file physically exists (either explicitly via DEFFILE or implicitly in the correct place) then we
+          # generate an import library with reference to it
+          PREPPEDDEFFILE:=$(BLDDIR)/$(TARGET).prep.def
+          CLEANTARGETS:=$(CLEANTARGETS) $(PREPPEDDEFFILE)
+
+          define win32def2lib
+            $(IMPORTLIBTARGET): $(DEFFILE)
+	          $(call startrule,win32def2lib) \
+	          $(PREPDEF) "$(DEFFILE)" "$(PREPPEDDEFFILE)" && \
+	          $(LD) $(PREPPEDDEFFILE) $(OPT.IMPORTLIB) -o "$$@" $(OPT.ADDCOMMAND) "out:$(IMPORTLIBLINKAS)" $(OPT.WARNINGS) off \
+	          $(call endrule,win32def2lib)
+          endef
+          $(eval $(win32def2lib))
+          $(eval TARGET_$(call sanitise,$(IMPORTLIBTARGET)):=1)
+        endif
+      endif
+    endif
+  endif
+endif
+
+
+ifneq ($(BASE_TYPE),importlib)
+
+  #############
+  ## COMPILE ##
+  #############
+
+  ifeq ($(COPY_FOR_STATIC_LINKAGE),1)
+    BINTARGETSTATICLINK:=$(BINDIRSTATICLINK)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
+  endif
+
+  CLEANTARGETS:=$(CLEANTARGETS) $(BINTARGET) $(BINTARGETSTATICLINK)
+  RELEASABLES:=$(RELEASABLES) $(BINTARGET) $(BINTARGETSTATICLINK)
+
+  # work on a local source files list
+  SRCFILES:=$(SOURCE)
+  # and there may be more source for stage 2 in OE builds
+  SRCFILES_OE:=
+
+  ifneq ($(BASE_TYPE),staticlib)
+    # add the generated UID source file
+    GENSOURCE:=$(BLDDIR)/$(TARGET).UID.CPP
+    SRCFILES:=$(SRCFILES) $(GENSOURCE)
+
+    # the generated symbol lookup source file for Open Environment.
+    # this only gets linked in at stage 2
+    SYMSOURCE:=$(if $(OPEN_ENVIRONMENT),$(BLDDIR)/$(TARGET)_SYM_.cpp,)
+    SRCFILES_OE:=$(SYMSOURCE)
+
+    CLEANTARGETS:=$(CLEANTARGETS) $(GENSOURCE) $(SYMSOURCE)
+
+    ifeq ($(UID2),00000000)
+      ifneq ($(UID2_DEFAULT),)
+        UID2:=$(UID2_DEFAULT)
+      endif
+    endif
+
+    ifeq ($(SECUREID),)
+      SECUREID:=$(UID3)
+    endif
+
+    define win32generateUIDcpp
+      $(GENSOURCE): $(PROJECT_META)
+	    $(call startrule,win32generateUIDcpp,,) \
+	    echo "// SBS-generated uid source file" > $$@ && \
+	    echo "#include " >> $$@ && \
+	    echo "#pragma data_seg(\".SYMBIAN\")" >> $$@ && \
+	    echo "__EMULATOR_IMAGE_HEADER2(0x$(UID1),0x$(UID2),0x$(UID3),EPriority$(EPOCPROCESSPRIORITY),0x$(CAPABILITYFLAG1),0x$(CAPABILITYFLAG2),0x$(SECUREID),0x$(VENDORID),0x$(VERSIONHEX),$(EPOCALLOWDLLDATA))" >> $$@ && \
+	    echo "#pragma data_seg()" >> $$@ \
+	    $(call endrule,win32generateUIDcpp)
+    endef
+    $(eval $(win32generateUIDcpp))
+  endif # neq $(BASE_TYPE),staticlib
+
+  # object files
+  OBJECTFILES:=$(patsubst %,$(BLDDIR)/%,$(addsuffix .o,$(basename $(notdir $(call allsuffixsubst,.cia .CIA .Cia,_.cia,$(SRCFILES))))))
+  OBJECTFILES:=$(patsubst %.UID.o,%_UID_.o,$(OBJECTFILES))
+
+  # object file extras for stage 2
+  OBJECTFILES_OE:=$(patsubst %,$(BLDDIR)/%,$(addsuffix .o,$(basename $(notdir $(SRCFILES_OE)))))
+
+  CLEANTARGETS:=$(CLEANTARGETS) $(OBJECTFILES) $(OBJECTFILES_OE)
+
+  # include paths and preinclude file
+  UINCLUDE:=$(patsubst %,$(OPT.USERINCLUDE)%,$(USERINCLUDE))
+  SINCLUDE:=$(patsubst %,$(OPT.SYSINCLUDE)%,$(SYSTEMINCLUDE))
+  PINCLUDE:=$(OPT.PREINCLUDE)$(notdir $(PRODUCT_INCLUDE))
+
+  #INCLUDES:=$(UINCLUDE) $(OPT.SPLITINCLUDE) $(SINCLUDE) $(PINCLUDE)
+  INCLUDES:=$(OPT.SPLITINCLUDE) $(UINCLUDE) $(SINCLUDE) $(PINCLUDE)
+
+  # macro definitions
+  DEFINES:=$(call makemacrodef,$(OPT.DEFINE),$(CDEFS) $(TARGET_MACRO))
+
+
+  # $(1) is the name of the source file, $(2) is the extension to map it to e.g. .o
+  # no space in front of function body
+  define mapwin32file
+    $(patsubst %.UID$(2),%_UID_$(2),$(BLDDIR)/$(addsuffix $2,$(basename $(notdir $(call allsuffixsubst,.cia .CIA .Cia,_.cia,$(1))))))
+  endef
+
+  # compile all source files, creating and including compiler generated dependency files along the way
+  # SED is used to (a) remove relatively pathed "object_file: source_file" references that can appear
+  # with some versions of mwccsym2 and (b) convert slashes
+  define win32compile2object
+
+    $(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 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) \
+	  $(call endrule,win32compile2object)
+
+    CLEANTARGETS:=$$(CLEANTARGETS) $(call mapwin32file,$(1),.dep)
+
+    CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
+    ifneq "$(DEPENDFILE)" ""
+    ifeq ($(NO_DEPEND_INCLUDE),)
+      ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" ""
+        -include $(DEPENDFILE)
+      endif
+    endif
+    endif
+
+    # individual source file compilation
+    SOURCETARGET_$(call sanitise,$(1)): $(call mapwin32file,$(1),.o)
+
+  endef
+
+  # List target, depends on object file
+  define win32list
+  LISTING:: $(OBJECTFILES) $(OBJECTFILES_OE)
+	$(call startrule,win32listing) \
+	$(CC) $(OPT.LISTING) $(patsubst %.UID.o,%_UID_.o,$(BLDDIR)/$(addsuffix .o,$(basename $(notdir $(1))))) -o $(basename $1).WINSCW.lst \
+	$(call endrule,win32listing)
+  endef
+
+  $(foreach SRCFILE,$(SRCFILES) $(SRCFILES_OE),$(eval $(call win32compile2object,$(SRCFILE))))
+  $(foreach SRCFILE,$(SRCFILES) $(SRCFILES_OE),$(eval $(call win32list,$(SRCFILE))))
+
+  ######################
+  ## RESOURCE COMPILE ##
+  ######################
+
+  # If Python has been used to construct the environment on Windows then the standard MW include path environment
+  # variable will have been munged to UPPERCASE.
+  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
+
+    $(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) -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) \
+	  $(call endrule,win32resourcecompile)
+
+    CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
+    ifneq "$(DEPENDFILE)" ""
+    ifeq ($(NO_DEPEND_INCLUDE),)
+      ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" ""
+        -include $(DEPENDFILE)
+      endif
+    endif
+    endif
+
+  endef
+
+  $(foreach WIN32RESOURCEFILE,$(WIN32_RESOURCE),$(eval $(call win32resourcecompile,$(WIN32RESOURCEFILE))))
+  OBJECTFILES:=$(OBJECTFILES) $(patsubst %,$(BLDDIR)/%,$(addsuffix .res,$(basename $(notdir $(WIN32_RESOURCE)))))
+
+  ##################
+  ## LINK/ARCHIVE ##
+  ##################
+
+  # libraries
+  STATICLIBS:=$(patsubst %,%.lib,$(STATICLIBRARY))
+  STATICLIBFILES:=$(patsubst %,$(STATLIBDIR)/%,$(STATICLIBS))
+  LINKER_FIRSTSTATLIBFILE:=$(STATLIBDIR)/$(LINKER_FIRSTSTATLIB)
+
+  ifeq ($(VARIANTTYPE),urel)
+    LINKLIBS:=$(patsubst %.dso,%.lib,$(LIBRARY))
+  else
+    LINKLIBS:=$(patsubst %.dso,%.lib,$(LIBRARY_DEBUG))
+  endif
+
+  LINKLIBFILES:=$(patsubst %,$(LIBDIR)/%,$(LINKLIBS))
+
+  MAP:=
+  ifneq ($(BASE_TYPE),staticlib)
+    ifneq ($(BASE_TYPE),importlib)
+      # link map file (urel only)
+      ifeq ($(VARIANTTYPE),urel)
+        MAP:=$(OPT.MAP)$(BINTARGET).map
+        CLEANTARGETS:=$(CLEANTARGETS) $(BINTARGET).map
+        RELEASABLES:=$(RELEASABLES) $(BINTARGET).map
+      endif
+    endif
+  endif
+
+  # all object files are listed in a response file to minimise the length of linker calls
+  OBJECTFILES_LRF:=$(BLDDIR)/$(TARGET)_$(VARIANTTYPE)_objects.lrf
+  CLEANTARGET:=$(CLEANTARGETS) $(OBJECTFILES_LRF)
+
+  define groupin10
+	$(if $1,@echo -e $(foreach L,$(wordlist 1,10,$1),"$(L)\\n") >> $(OBJECTFILES_LRF),)
+	$(if $1,$(call groupin10,$(wordlist 11,$(words $1),$1)),@true)
+  endef
+
+  #
+  # Archive
+  #
+  ifeq ($(BASE_TYPE),staticlib)
+    define win32archive
+      $(BINTARGET): $(OBJECTFILES)
+	    @echo "" > $(OBJECTFILES_LRF);
+		$(call groupin10,$(notdir $(OBJECTFILES))) ;
+	    $(call startrule,win32archive) \
+	    $(LD) $(OPT.STATICLIBRARY) $(LFLAGS) $(OPT.NOIMPLIB) $(WIN32_LIBRARIES) $(OPT.OUT)"$$@" $(STDCPPTAGFILE) $(OPT.LIBPATH)$(BLDDIR) $(OPT.SEARCH) @$(OBJECTFILES_LRF) \
+	    $(if $(SAVESPACE),; $(GNURM) -rf $(BLDDIR); true,) \
+	    $(call endrule,win32archive)
+    endef
+    $(eval $(win32archive))
+  endif
+
+  ifneq ($(EPOCHEAPSIZEMIN_DEC_KB),)
+    LFLAGS:=$(LFLAGS) $(OPT.HEAPRESERVE)$(EPOCHEAPSIZEMAX_DEC_KB) $(OPT.HEAPCOMMIT)$(EPOCHEAPSIZEMIN_DEC_KB)
+  endif
+
+  #
+  # Simple link
+  #
+  ifeq ($(BASE_TYPE),exe)
+    define win32simplelink
+      $(BINTARGET).map: $(BINTARGET)
+
+      $(BINTARGET): $(OBJECTFILES) $(LINKER_FIRSTSTATLIBFILE) $(NEWLIBFILE) $(STATICLIBFILES) $(LINKLIBFILES)
+	    @echo "" > $(OBJECTFILES_LRF);
+		$(call groupin10,$(notdir $(OBJECTFILES))) ;
+	    $(call startrule,win32simplelink) \
+	    $(if $(SUPPORTS_STDCPP_NEWLIB),$(if $(STATICLIBFILES),$(CHECKLIB) $(CHECKLIB_TYPE) $(OPT.CHECKLIB.WIN32) $(STATICLIBFILES) &&,),) \
+	    MWSym2LibraryFiles="$(MWSym2LibraryFiles)" $(LD) $(LFLAGS) $(OPT.MENTRYPOINT)$(ENTRYSYMBOL) $(MAP) $(LINKER_FIRSTSTATLIBFILE) $(NEWLIBFILE) $(WIN32_LIBRARIES) $(STATICLIBFILES) $(LINKLIBFILES) $(OPT.OUT)"$$@" $(OPT.NOIMPLIB) $(OPT.LIBPATH)$(BLDDIR) $(OPT.SEARCH) @$(OBJECTFILES_LRF) \
+	    $(if $(SAVESPACE),; $(GNURM) -rf $(BLDDIR); true,) \
+	    $(call endrule,win32simplelink)
+    endef
+    $(eval $(win32simplelink))
+  endif
+
+  #
+  # Two stage link
+  #
+  ifeq ($(BASE_TYPE),dll)
+    TMP_IMPLIB:=$(BLDDIR)/$(TARGET).lib
+    TMP_INFFILE:=$(BLDDIR)/$(TARGET).inf
+    TMP_SYMFILE:=$(if $(OPEN_ENVIRONMENT),$(BLDDIR)/$(TARGET).sym,)
+    TMP_TARGET:=$(BLDDIR)/$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))
+    TMP_DEFFILE:=$(BLDDIR)/$(TARGET).def
+
+    CLEANTARGETS:=$(CLEANTARGETS) $(TMP_IMPLIB) $(TMP_INFFILE) $(TMP_TARGET) $(TMP_DEFFILE) $(TMP_SYMFILE)
+
+    MAKEDEF_ARGS:=-absent $(ENTRYSYMBOL) -Inffile  $(call dblquote,$(TMP_INFFILE)) $(NAME_LOOKUP)
+
+    ifeq ($(SYSTEM_TARGET),1)
+        MAKEDEF_ARGS:=$(MAKEDEF_ARGS) -SystemTargetType
+    endif
+
+    ifneq ($(FIXED_EXPORT),)
+      # Fixed export TARGETTYPE, but with possibility of a .def file if explicitly specified and available
+      ifeq ($(DEFFILEKEYWORD),1)
+        ifneq ($(DEFFILE),)
+          MAKEDEF_ARGS:=$(MAKEDEF_ARGS) -Frzfile $(call dblquote,$(DEFFILE))
+        endif
+      endif
+      MAKEDEF_ARGS:=$(MAKEDEF_ARGS) -1 $(FIXED_EXPORT)
+    else
+      # Variable export TARGETTYPE with either deduced or explicitly specified .def file (if available)
+      ifneq ($(DEFFILE),)
+        MAKEDEF_ARGS:=$(MAKEDEF_ARGS) -Frzfile $(call dblquote,$(DEFFILE))
+      endif
+    endif
+
+
+    ifneq ($(EXPORTSUNFROZEN),)
+    	LIBRARY: $(TMP_IMPLIB)
+    endif
+
+    define win32stageonelink
+      # Stage One
+      # Link by name, generating temporary main binary and import library.
+      $(TMP_IMPLIB): $(TMP_TARGET)
+
+      $(TMP_TARGET): $(OBJECTFILES) $(LINKER_FIRSTSTATLIBFILE) $(NEWLIBFILE) $(STATICLIBFILES) $(LINKLIBFILES)
+	    @echo "" > $(OBJECTFILES_LRF);
+		$(call groupin10,$(notdir $(OBJECTFILES))) ;
+	    $(call startrule,win32stageonelink) \
+	    $(if $(SUPPORTS_STDCPP_NEWLIB),$(if $(STATICLIBFILES),$(CHECKLIB) $(CHECKLIB_TYPE) $(OPT.CHECKLIB.WIN32) $(STATICLIBFILES) &&,),) \
+	    MWSym2LibraryFiles="$(MWSym2LibraryFiles)" $(LD) $(LFLAGS) $(OPT.MENTRYPOINT)$(ENTRYSYMBOL) $(OPT.EXPORT)$(EXPORT_TYPE) $(OPT.NOCOMPACTIMPORTLIB) $(OPT.ADDCOMMAND) "out:$(TARGET).$(if $(REQUESTEDTARGETEXT),$(REQUESTEDTARGETEXT),$(TARGETTYPE))" $(OPT.WARNINGS) off $(OPT.IMPLIB)"$(TMP_IMPLIB)" $(OPT.OUT)"$(TMP_TARGET)" $(LINKER_FIRSTSTATLIBFILE) $(NEWLIBFILE) $(WIN32_LIBRARIES) $(STATICLIBFILES) $(LINKLIBFILES) $(OPT.LIBPATH)$(BLDDIR) $(OPT.SEARCH) @$(OBJECTFILES_LRF) \
+	    $(call endrule,win32stageonelink)
+    endef
+    $(eval $(win32stageonelink))
+
+    define win32processexports
+      # Process exports
+      # Generate a descriptive info file from the import library.
+      # Push info file through MAKEDEF to generated a valid .def file for link by ordinal.
+      $(TMP_DEFFILE): $(TMP_IMPLIB)
+	    $(call startrule,win32processexports) \
+	    $(LD) $(LFLAGS_INFGEN) $(OPT.OUT)"$(TMP_INFFILE)" "$(TMP_IMPLIB)" && \
+	    $(MAKEDEF) $(MAKEDEF_ARGS) "$$@" \
+	    $(call endrule,win32processexports)
+    endef
+    $(eval $(win32processexports))
+
+    ifeq ($(OPEN_ENVIRONMENT),1)
+      define win32processoeexports
+   	    # Process additional exports for Open Environment
+        # Generate a symbol file from the temporary DLL.
+        # Generate a C++ source file from the symbol file
+
+        $(TMP_SYMFILE): $(TMP_TARGET)
+	      $(call startrule,win32generatesymfile) \
+	      $(LD) $(LFLAGS_SYMGEN) $(OPT.OUT)"$(TMP_SYMFILE)" "$(TMP_TARGET)" \
+	      $(call endrule,win32generatesymfile)
+
+        $(SYMSOURCE): $(TMP_SYMFILE)
+	      $(call startrule,win32generatesymcpp) \
+	      $(SYMLOOKUPUTIL) $(OPT.OUT)"$(SYMSOURCE)" $(OPT.SYM)"$(TMP_SYMFILE)" $(SYMLOOKUPARGS) \
+	      $(call endrule,win32generatesymcpp)
+      endef
+      $(eval $(win32processoeexports))
+    endif
+
+    define win32stagetwolink
+      # Stage Two
+      # Link by ordinal, based on a previously MAKEDEF-generated temporary .def file
+      # Optionally create an import library if EXPORTUNFROZEN is specified
+      #
+      $(BINTARGET).map: $(BINTARGET)
+
+      $(BINTARGET): $(OBJECTFILES) $(OBJECTFILES_OE) $(LINKER_FIRSTSTATLIBFILE) $(STATICLIBFILES) $(NEWLIBFILE) $(LINKLIBFILES) $(TMP_DEFFILE)
+	    @echo "" > $(OBJECTFILES_LRF);
+		$(call groupin10,$(notdir $(OBJECTFILES) $(OBJECTFILES_OE))) ;
+	    $(call startrule,win32stagetwolink) \
+	    MWSym2LibraryFiles="$(MWSym2LibraryFiles)" \
+	    $(LD) $(LFLAGS) $(OPT.DEFFILE)$(TMP_DEFFILE) $(MAP) $(LINKER_FIRSTSTATLIBFILE) $(NEWLIBFILE) $(WIN32_LIBRARIES) $(STATICLIBFILES) $(LINKLIBFILES) \
+	    $(OPT.OUT)"$$@" \
+	    $(if $(EXPORTUNFROZEN),$(OPT.IMPLIB)$(IMPORTLIBTARGET),$(OPT.NOIMPLIB)) \
+	    $(OPT.LIBPATH)$(BLDDIR) $(OPT.SEARCH) @$(OBJECTFILES_LRF) \
+	    $(if $(SAVESPACE),; $(GNURM) -rf $(BLDDIR); true,) \
+	    $(call endrule,win32stagetwolink)
+    endef
+    $(eval $(win32stagetwolink))
+
+    define win32copyforstaticlink
+      # Copy additonal binary to "traditional" output location (if required)
+      $(BINTARGETSTATICLINK): $(BINTARGET)
+	    $(call startrule,win32copyforstaticlink) \
+	    $(GNUCP) $$< $$@ \
+	    $(call endrule,win32copyforstaticlink)
+    endef
+    ifeq ($(COPY_FOR_STATIC_LINKAGE),1)
+      $(eval $(win32copyforstaticlink))
+    endif
+
+    define e32freeze
+      # DLL-type targets that support import library generation support freezing of exports using EFREEZE
+      FREEZE:: $(1)
+	    $(call startrule,freeze,,$(RESOLVED_DEFFILE)) \
+	    $(EFREEZE) $(EFREEZE_REMOVE_OPTION) "$(RESOLVED_DEFFILE)" $(FIVESPACES) "$(2)" \
+	    $(call endrule,freeze)
+    endef
+    # Create only one freeze target per urel/udeb variant as the interface won't differ between them
+    # Only create a freeze target if the component supports import library generation
+    ifneq ($(TARGET_$(call sanitise,$(IMPORTLIBTARGET))_FREEZE),1)
+      ifeq ($(SUPPORTS_IMPORT_LIBRARY),1)
+        $(eval $(call e32freeze,$(BINTARGET),$(TMP_DEFFILE)))
+        $(eval TARGET_$(call sanitise,$(IMPORTLIBTARGET))_FREEZE:=1)
+      endif
+    endif
+  endif
+endif # neq $(BASE_TYPE),importlib
+
+
+# Global targets
+.PHONY:: $(ALLTARGET)
+$(ALLTARGET):: $(RELEASABLES)
+TARGET:: $(RELEASABLES)
+
+ifeq ($(TARGET_$(call sanitise,$(IMPORTLIBTARGET))),1)
+  LIBRARY:: $(IMPORTLIBTARGET)
+else
+  ifeq ($(BASE_TYPE),staticlib)
+    LIBRARY:: $(BINTARGET)
+  endif
+endif
+
+
+# Deal with test code batch files generation.
+ifneq ($(TESTPATH),)
+  EPOC_ROOT:=$(patsubst %/,%,$(EPOCROOT))
+  TOBLDINF:=$(dir $(subst :,,$(subst $(EPOC_ROOT)/,,$(COMPONENT_META))))
+
+
+  BATCHDIR:=$(EPOCROOT)/epoc32/release/$(VARIANTPLATFORM)/$(VARIANTTYPE)/z/test/
+  $(eval $(call MakeTestBatchFiles,$(TARGET),$(BATCHDIR)$(MODULE)/$(VARIANTPLATFORM).$(TESTPATH)))
+  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),))
+# 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))
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/win32ani.flm
--- a/sbsv2/raptor/lib/flm/win32ani.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/win32ani.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,34 +1,34 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# WINSCW ANI Function Like Makefile (FLM)
-# Build an emulator ANI
-# 
-#
-
-ifeq ($(TARGETTYPE),ani)
-
-BASE_TYPE:=dll
-CW_STATIC_RUNTIME:=1
-FIRST_STATLIB:=
-FIXED_EXPORT:=?CreateCAnimDllL@@YAPAVCAnimDll@@XZ
-SUPPORTS_IMPORT_LIBRARY:=0
-SYSTEM_TARGET:=0
-UID2_DEFAULT:=10003b22
-
-# Use the general win32 FLM 
-include $(FLMHOME)/win32.flm
-
-else
-$(error $win32ani.flm called with wrong TARGETTYPE (should be 'ani' but is '$(TARGETTYPE)'))
-endif
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# WINSCW ANI Function Like Makefile (FLM)
+# Build an emulator ANI
+# 
+#
+
+ifeq ($(TARGETTYPE),ani)
+
+BASE_TYPE:=dll
+CW_STATIC_RUNTIME:=1
+FIRST_STATLIB:=
+FIXED_EXPORT:=?CreateCAnimDllL@@YAPAVCAnimDll@@XZ
+SUPPORTS_IMPORT_LIBRARY:=0
+SYSTEM_TARGET:=0
+UID2_DEFAULT:=10003b22
+
+# Use the general win32 FLM 
+include $(FLMHOME)/win32.flm
+
+else
+$(error $win32ani.flm called with wrong TARGETTYPE (should be 'ani' but is '$(TARGETTYPE)'))
+endif
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/win32bitmap.flm
--- a/sbsv2/raptor/lib/flm/win32bitmap.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/win32bitmap.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,22 +1,22 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# Thin Function Like Makefile (FLM) wrapper to general resource building FLM
-# for win32 builds.
-# 
-#
-
-BINCOPYDIRS:=$(EPOCROOT)/epoc32/release/winscw/udeb $(EPOCROOT)/epoc32/release/winscw/urel
-
-# Main (and mostly generic) resource building FLM
-include $(FLMHOME)/bitmap.flm
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Thin Function Like Makefile (FLM) wrapper to general resource building FLM
+# for win32 builds.
+# 
+#
+
+BINCOPYDIRS:=$(EPOCROOT)/epoc32/release/winscw/udeb $(EPOCROOT)/epoc32/release/winscw/urel
+
+# Main (and mostly generic) resource building FLM
+include $(FLMHOME)/bitmap.flm
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/win32dll.flm
--- a/sbsv2/raptor/lib/flm/win32dll.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/win32dll.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,34 +1,34 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# WINSCW DLL Function Like Makefile (FLM)
-# Build an emulator DLL
-# 
-#
-
-ifeq ($(TARGETTYPE),dll)
-
-BASE_TYPE:=dll
-CW_STATIC_RUNTIME:=1
-FIRST_STATLIB:=
-FIXED_EXPORT:=
-SUPPORTS_IMPORT_LIBRARY:=1
-SYSTEM_TARGET:=0
-UID2_DEFAULT:=
-
-# Use the general win32 FLM 
-include $(FLMHOME)/win32.flm
-
-else
-$(error $win32dll.flm called with wrong TARGETTYPE (should be 'dll' but is '$(TARGETTYPE)'))
-endif
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# WINSCW DLL Function Like Makefile (FLM)
+# Build an emulator DLL
+# 
+#
+
+ifeq ($(TARGETTYPE),dll)
+
+BASE_TYPE:=dll
+CW_STATIC_RUNTIME:=1
+FIRST_STATLIB:=
+FIXED_EXPORT:=
+SUPPORTS_IMPORT_LIBRARY:=1
+SYSTEM_TARGET:=0
+UID2_DEFAULT:=
+
+# Use the general win32 FLM 
+include $(FLMHOME)/win32.flm
+
+else
+$(error $win32dll.flm called with wrong TARGETTYPE (should be 'dll' but is '$(TARGETTYPE)'))
+endif
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/win32exe.flm
--- a/sbsv2/raptor/lib/flm/win32exe.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/win32exe.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,34 +1,34 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# WINSCW EXE Function Like Makefile (FLM)
-# Build an emulator EXE
-# 
-#
-
-ifeq ($(TARGETTYPE),exe)
-
-BASE_TYPE:=exe
-CW_STATIC_RUNTIME:=1
-FIRST_STATLIB:=
-FIXED_EXPORT:=
-SUPPORTS_IMPORT_LIBRARY:=0
-SYSTEM_TARGET:=0
-UID2_DEFAULT:=
-
-# Use the general win32 FLM 
-include $(FLMHOME)/win32.flm
-
-else
-$(error $win32exe.flm called with wrong TARGETTYPE (should be 'exe' but is '$(TARGETTYPE)'))
-endif
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# WINSCW EXE Function Like Makefile (FLM)
+# Build an emulator EXE
+# 
+#
+
+ifeq ($(TARGETTYPE),exe)
+
+BASE_TYPE:=exe
+CW_STATIC_RUNTIME:=1
+FIRST_STATLIB:=
+FIXED_EXPORT:=
+SUPPORTS_IMPORT_LIBRARY:=0
+SYSTEM_TARGET:=0
+UID2_DEFAULT:=
+
+# Use the general win32 FLM 
+include $(FLMHOME)/win32.flm
+
+else
+$(error $win32exe.flm called with wrong TARGETTYPE (should be 'exe' but is '$(TARGETTYPE)'))
+endif
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/win32exexp.flm
--- a/sbsv2/raptor/lib/flm/win32exexp.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/win32exexp.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,34 +1,34 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# WINSCW EXEXP Function Like Makefile (FLM)
-# Build an emulator EXEXP
-# 
-#
-
-ifeq ($(TARGETTYPE),exexp)
-
-BASE_TYPE:=dll
-CW_STATIC_RUNTIME:=1
-FIRST_STATLIB:=eexe.lib
-FIXED_EXPORT:=
-SUPPORTS_IMPORT_LIBRARY:=1
-SYSTEM_TARGET:=0
-UID2_DEFAULT:=
-
-# Use the general win32 FLM 
-include $(FLMHOME)/win32.flm
-
-else
-$(error $win32exexp.flm called with wrong TARGETTYPE (should be 'exexp' but is '$(TARGETTYPE)'))
-endif
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# WINSCW EXEXP Function Like Makefile (FLM)
+# Build an emulator EXEXP
+# 
+#
+
+ifeq ($(TARGETTYPE),exexp)
+
+BASE_TYPE:=dll
+CW_STATIC_RUNTIME:=1
+FIRST_STATLIB:=eexe.lib
+FIXED_EXPORT:=
+SUPPORTS_IMPORT_LIBRARY:=1
+SYSTEM_TARGET:=0
+UID2_DEFAULT:=
+
+# Use the general win32 FLM 
+include $(FLMHOME)/win32.flm
+
+else
+$(error $win32exexp.flm called with wrong TARGETTYPE (should be 'exexp' but is '$(TARGETTYPE)'))
+endif
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/win32fsy.flm
--- a/sbsv2/raptor/lib/flm/win32fsy.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/win32fsy.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,34 +1,34 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# WINSCW FSY Function Like Makefile (FLM)
-# Build an emulator FSY
-# 
-#
-
-ifeq ($(TARGETTYPE),fsy)
-
-BASE_TYPE:=dll
-CW_STATIC_RUNTIME:=1
-FIRST_STATLIB:=
-FIXED_EXPORT:=CreateFileSystem
-SUPPORTS_IMPORT_LIBRARY:=0
-SYSTEM_TARGET:=0
-UID2_DEFAULT:=100039df
-
-# Use the general win32 FLM 
-include $(FLMHOME)/win32.flm
-
-else
-$(error $win32fsy.flm called with wrong TARGETTYPE (should be 'fsy' but is '$(TARGETTYPE)'))
-endif
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# WINSCW FSY Function Like Makefile (FLM)
+# Build an emulator FSY
+# 
+#
+
+ifeq ($(TARGETTYPE),fsy)
+
+BASE_TYPE:=dll
+CW_STATIC_RUNTIME:=1
+FIRST_STATLIB:=
+FIXED_EXPORT:=CreateFileSystem
+SUPPORTS_IMPORT_LIBRARY:=0
+SYSTEM_TARGET:=0
+UID2_DEFAULT:=100039df
+
+# Use the general win32 FLM 
+include $(FLMHOME)/win32.flm
+
+else
+$(error $win32fsy.flm called with wrong TARGETTYPE (should be 'fsy' but is '$(TARGETTYPE)'))
+endif
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/win32implib.flm
--- a/sbsv2/raptor/lib/flm/win32implib.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/win32implib.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,31 +1,31 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# WINSCW IMPLIB Function Like Makefile (FLM)
-# Build an emulator IMPLIB
-# 
-#
-
-ifeq ($(TARGETTYPE),implib)
-
-BASE_TYPE:=importlib
-CW_STATIC_RUNTIME:=0
-FIXED_EXPORT:=
-SUPPORTS_IMPORT_LIBRARY:=1
-
-# Use the general win32 FLM 
-include $(FLMHOME)/win32.flm
-
-else
-$(error $win32implib.flm called with wrong TARGETTYPE (should be 'implib' but is '$(TARGETTYPE)'))
-endif
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# WINSCW IMPLIB Function Like Makefile (FLM)
+# Build an emulator IMPLIB
+# 
+#
+
+ifeq ($(TARGETTYPE),implib)
+
+BASE_TYPE:=importlib
+CW_STATIC_RUNTIME:=0
+FIXED_EXPORT:=
+SUPPORTS_IMPORT_LIBRARY:=1
+
+# Use the general win32 FLM 
+include $(FLMHOME)/win32.flm
+
+else
+$(error $win32implib.flm called with wrong TARGETTYPE (should be 'implib' but is '$(TARGETTYPE)'))
+endif
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/win32kdll.flm
--- a/sbsv2/raptor/lib/flm/win32kdll.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/win32kdll.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,34 +1,34 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# WINSCW KDLL Function Like Makefile (FLM)
-# Build an emulator KDLL
-# 
-#
-
-ifeq ($(TARGETTYPE),kdll)
-
-BASE_TYPE:=dll
-CW_STATIC_RUNTIME:=1
-FIRST_STATLIB:=ekll.lib
-FIXED_EXPORT:=
-SUPPORTS_IMPORT_LIBRARY:=1
-SYSTEM_TARGET:=1
-UID2_DEFAULT:=
-
-# Use the general win32 FLM 
-include $(FLMHOME)/win32.flm
-
-else
-$(error $win32kdll.flm called with wrong TARGETTYPE (should be 'dll' but is '$(TARGETTYPE)'))
-endif
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# WINSCW KDLL Function Like Makefile (FLM)
+# Build an emulator KDLL
+# 
+#
+
+ifeq ($(TARGETTYPE),kdll)
+
+BASE_TYPE:=dll
+CW_STATIC_RUNTIME:=1
+FIRST_STATLIB:=ekll.lib
+FIXED_EXPORT:=
+SUPPORTS_IMPORT_LIBRARY:=1
+SYSTEM_TARGET:=1
+UID2_DEFAULT:=
+
+# Use the general win32 FLM 
+include $(FLMHOME)/win32.flm
+
+else
+$(error $win32kdll.flm called with wrong TARGETTYPE (should be 'dll' but is '$(TARGETTYPE)'))
+endif
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/win32kext.flm
--- a/sbsv2/raptor/lib/flm/win32kext.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/win32kext.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,34 +1,34 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# WINSCW KEXT Function Like Makefile (FLM)
-# Build an emulator KEXT
-# 
-#
-
-ifeq ($(TARGETTYPE),kext)
-
-BASE_TYPE:=dll
-CW_STATIC_RUNTIME:=1
-FIRST_STATLIB:=eext.lib
-FIXED_EXPORT:=
-SUPPORTS_IMPORT_LIBRARY:=0
-SYSTEM_TARGET:=1
-UID2_DEFAULT:=
-
-# Use the general win32 FLM 
-include $(FLMHOME)/win32.flm
-
-else
-$(error $win32kext.flm called with wrong TARGETTYPE (should be 'kext' but is '$(TARGETTYPE)'))
-endif
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# WINSCW KEXT Function Like Makefile (FLM)
+# Build an emulator KEXT
+# 
+#
+
+ifeq ($(TARGETTYPE),kext)
+
+BASE_TYPE:=dll
+CW_STATIC_RUNTIME:=1
+FIRST_STATLIB:=eext.lib
+FIXED_EXPORT:=
+SUPPORTS_IMPORT_LIBRARY:=0
+SYSTEM_TARGET:=1
+UID2_DEFAULT:=
+
+# Use the general win32 FLM 
+include $(FLMHOME)/win32.flm
+
+else
+$(error $win32kext.flm called with wrong TARGETTYPE (should be 'kext' but is '$(TARGETTYPE)'))
+endif
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/win32klib.flm
--- a/sbsv2/raptor/lib/flm/win32klib.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/win32klib.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,32 +1,32 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# WINSCW KLIB Function Like Makefile (FLM)
-# Build an emulator KLIB
-# 
-#
-
-ifeq ($(TARGETTYPE),klib)
-
-BASE_TYPE:=staticlib
-CW_STATIC_RUNTIME:=1
-FIXED_EXPORT:=
-SUPPORTS_IMPORT_LIBRARY:=0
-SYSTEM_TARGET:=1
-
-# Use the general win32 FLM 
-include $(FLMHOME)/win32.flm
-
-else
-$(error $win32klib.flm called with wrong TARGETTYPE (should be 'klib' but is '$(TARGETTYPE)'))
-endif
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# WINSCW KLIB Function Like Makefile (FLM)
+# Build an emulator KLIB
+# 
+#
+
+ifeq ($(TARGETTYPE),klib)
+
+BASE_TYPE:=staticlib
+CW_STATIC_RUNTIME:=1
+FIXED_EXPORT:=
+SUPPORTS_IMPORT_LIBRARY:=0
+SYSTEM_TARGET:=1
+
+# Use the general win32 FLM 
+include $(FLMHOME)/win32.flm
+
+else
+$(error $win32klib.flm called with wrong TARGETTYPE (should be 'klib' but is '$(TARGETTYPE)'))
+endif
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/win32ldd.flm
--- a/sbsv2/raptor/lib/flm/win32ldd.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/win32ldd.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,34 +1,34 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# WINSCW LDD Function Like Makefile (FLM)
-# Build an emulator LDD
-# 
-#
-
-ifeq ($(TARGETTYPE),ldd)
-
-BASE_TYPE:=dll
-CW_STATIC_RUNTIME:=1
-FIRST_STATLIB:=edev.lib
-FIXED_EXPORT:=?CreateLogicalDevice@@YAPAVDLogicalDevice@@XZ
-SUPPORTS_IMPORT_LIBRARY:=0
-SYSTEM_TARGET:=1
-UID2_DEFAULT:=100000af
-
-# Use the general win32 FLM 
-include $(FLMHOME)/win32.flm
-
-else
-$(error $win32ldd.flm called with wrong TARGETTYPE (should be 'ldd' but is '$(TARGETTYPE)'))
-endif
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# WINSCW LDD Function Like Makefile (FLM)
+# Build an emulator LDD
+# 
+#
+
+ifeq ($(TARGETTYPE),ldd)
+
+BASE_TYPE:=dll
+CW_STATIC_RUNTIME:=1
+FIRST_STATLIB:=edev.lib
+FIXED_EXPORT:=?CreateLogicalDevice@@YAPAVDLogicalDevice@@XZ
+SUPPORTS_IMPORT_LIBRARY:=0
+SYSTEM_TARGET:=1
+UID2_DEFAULT:=100000af
+
+# Use the general win32 FLM 
+include $(FLMHOME)/win32.flm
+
+else
+$(error $win32ldd.flm called with wrong TARGETTYPE (should be 'ldd' but is '$(TARGETTYPE)'))
+endif
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/win32lib.flm
--- a/sbsv2/raptor/lib/flm/win32lib.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/win32lib.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,31 +1,31 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# WINSCW Static Library Function Like Makefile (FLM)
-# Build an emulator LIB
-# 
-#
-
-ifeq ($(TARGETTYPE),lib)
-
-BASE_TYPE:=staticlib
-CW_STATIC_RUNTIME:=1
-FIXED_EXPORT:=
-SUPPORTS_IMPORT_LIBRARY:=0
-
-# Use the general win32 FLM 
-include $(FLMHOME)/win32.flm
-
-else
-$(error $win32lib.flm called with wrong TARGETTYPE (should be 'lib' but is '$(TARGETTYPE)'))
-endif
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# WINSCW Static Library Function Like Makefile (FLM)
+# Build an emulator LIB
+# 
+#
+
+ifeq ($(TARGETTYPE),lib)
+
+BASE_TYPE:=staticlib
+CW_STATIC_RUNTIME:=1
+FIXED_EXPORT:=
+SUPPORTS_IMPORT_LIBRARY:=0
+
+# Use the general win32 FLM 
+include $(FLMHOME)/win32.flm
+
+else
+$(error $win32lib.flm called with wrong TARGETTYPE (should be 'lib' but is '$(TARGETTYPE)'))
+endif
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/win32pdd.flm
--- a/sbsv2/raptor/lib/flm/win32pdd.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/win32pdd.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,34 +1,34 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# WINSCW PDD Function Like Makefile (FLM)
-# Build an emulator PDD
-# 
-#
-
-ifeq ($(TARGETTYPE),pdd)
-
-BASE_TYPE=dll
-CW_STATIC_RUNTIME:=1
-FIRST_STATLIB:=edev.lib
-FIXED_EXPORT:=?CreatePhysicalDevice@@YAPAVDPhysicalDevice@@XZ
-SUPPORTS_IMPORT_LIBRARY:=0
-SYSTEM_TARGET:=1
-UID2_DEFAULT:=100039d0
-
-# Use the general win32 FLM 
-include $(FLMHOME)/win32.flm
-
-else
-$(error $win32pdd.flm called with wrong TARGETTYPE (should be 'pdd' but is '$(TARGETTYPE)'))
-endif
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# WINSCW PDD Function Like Makefile (FLM)
+# Build an emulator PDD
+# 
+#
+
+ifeq ($(TARGETTYPE),pdd)
+
+BASE_TYPE=dll
+CW_STATIC_RUNTIME:=1
+FIRST_STATLIB:=edev.lib
+FIXED_EXPORT:=?CreatePhysicalDevice@@YAPAVDPhysicalDevice@@XZ
+SUPPORTS_IMPORT_LIBRARY:=0
+SYSTEM_TARGET:=1
+UID2_DEFAULT:=100039d0
+
+# Use the general win32 FLM 
+include $(FLMHOME)/win32.flm
+
+else
+$(error $win32pdd.flm called with wrong TARGETTYPE (should be 'pdd' but is '$(TARGETTYPE)'))
+endif
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/win32pdl.flm
--- a/sbsv2/raptor/lib/flm/win32pdl.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/win32pdl.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,34 +1,34 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# WINSCW PDL Function Like Makefile (FLM)
-# Build an emulator PDL
-# 
-#
-
-ifeq ($(TARGETTYPE),pdl)
-
-BASE_TYPE:=dll
-CW_STATIC_RUNTIME:=1
-FIRST_STATLIB:=
-FIXED_EXPORT:=?NewPrinterDeviceL@@YAPAVCPrinterDevice@@XZ
-SUPPORTS_IMPORT_LIBRARY:=0
-SYSTEM_TARGET:=0
-UID2_DEFAULT:=10003b1c
-
-# Use the general win32 FLM 
-include $(FLMHOME)/win32.flm
-
-else
-$(error $win32pdl.flm called with wrong TARGETTYPE (should be 'pdl' but is '$(TARGETTYPE)'))
-endif
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# WINSCW PDL Function Like Makefile (FLM)
+# Build an emulator PDL
+# 
+#
+
+ifeq ($(TARGETTYPE),pdl)
+
+BASE_TYPE:=dll
+CW_STATIC_RUNTIME:=1
+FIRST_STATLIB:=
+FIXED_EXPORT:=?NewPrinterDeviceL@@YAPAVCPrinterDevice@@XZ
+SUPPORTS_IMPORT_LIBRARY:=0
+SYSTEM_TARGET:=0
+UID2_DEFAULT:=10003b1c
+
+# Use the general win32 FLM 
+include $(FLMHOME)/win32.flm
+
+else
+$(error $win32pdl.flm called with wrong TARGETTYPE (should be 'pdl' but is '$(TARGETTYPE)'))
+endif
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/win32plugin.flm
--- a/sbsv2/raptor/lib/flm/win32plugin.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/win32plugin.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,34 +1,34 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# WINSCW PLUGIN Function Like Makefile (FLM)
-# Build an emulator PLUGIN
-# 
-#
-
-ifeq ($(TARGETTYPE),plugin)
-
-BASE_TYPE:=dll
-CW_STATIC_RUNTIME:=1
-FIRST_STATLIB:=
-FIXED_EXPORT:=?ImplementationGroupProxy@@YAPBUTImplementationProxy@@AAH@Z
-SUPPORTS_IMPORT_LIBRARY:=0
-SYSTEM_TARGET:=0
-UID2_DEFAULT:=10009D8D
-
-# Use the general win32 FLM 
-include $(FLMHOME)/win32.flm
-
-else
-$(error $win32plugin.flm called with wrong TARGETTYPE (should be 'plugin' but is '$(TARGETTYPE)'))
-endif
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# WINSCW PLUGIN Function Like Makefile (FLM)
+# Build an emulator PLUGIN
+# 
+#
+
+ifeq ($(TARGETTYPE),plugin)
+
+BASE_TYPE:=dll
+CW_STATIC_RUNTIME:=1
+FIRST_STATLIB:=
+FIXED_EXPORT:=?ImplementationGroupProxy@@YAPBUTImplementationProxy@@AAH@Z
+SUPPORTS_IMPORT_LIBRARY:=0
+SYSTEM_TARGET:=0
+UID2_DEFAULT:=10009D8D
+
+# Use the general win32 FLM 
+include $(FLMHOME)/win32.flm
+
+else
+$(error $win32plugin.flm called with wrong TARGETTYPE (should be 'plugin' but is '$(TARGETTYPE)'))
+endif
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/win32resource.flm
--- a/sbsv2/raptor/lib/flm/win32resource.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/win32resource.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,25 +1,25 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# Thin Function Like Makefile (FLM) wrapper to general resource building FLM
-# for win32 builds.
-# 
-#
-
-BINCOPYDIRS:=$(EPOCROOT)/epoc32/release/winscw/udeb $(EPOCROOT)/epoc32/release/winscw/urel
-
-# Main (and mostly generic) resource building FLM
-include $(FLMHOME)/resource.flm
-
-# Reset so there it's impossible for it to influence subsequent calls:
-BINCOPYDIRS:=
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Thin Function Like Makefile (FLM) wrapper to general resource building FLM
+# for win32 builds.
+# 
+#
+
+BINCOPYDIRS:=$(EPOCROOT)/epoc32/release/winscw/udeb $(EPOCROOT)/epoc32/release/winscw/urel
+
+# Main (and mostly generic) resource building FLM
+include $(FLMHOME)/resource.flm
+
+# Reset so there it's impossible for it to influence subsequent calls:
+BINCOPYDIRS:=
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/win32stddll.flm
--- a/sbsv2/raptor/lib/flm/win32stddll.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/win32stddll.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,40 +1,40 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# WINSCW Standard DLL Function Like Makefile (FLM)
-# Build an emulator STDDLL
-# 
-#
-
-ifeq ($(TARGETTYPE),stddll)
-
-BASE_TYPE:=dll
-CFLAGS:=$(subst -inline off,,$(CFLAGS))
-CW_STATIC_RUNTIME:=0
-EXPORT_TYPE:=all
-FIRST_STATLIB:=
-FIXED_EXPORT:=
-LFLAGS:=$(subst -nostdlib,-stdlib,$(LFLAGS))
-LIBRARY:=$(LIBRARY) euser.lib backend.lib
-NAME_LOOKUP:=-sym_name_lkup -export_entrypoint_E32Dll
-OPEN_ENVIRONMENT:=1
-SUPPORTS_IMPORT_LIBRARY:=1
-SYSTEM_TARGET:=0
-UID2_DEFAULT:=20004C45
-
-# Use the general win32 FLM 
-include $(FLMHOME)/win32.flm
-
-else
-$(error $win32stddll.flm called with wrong TARGETTYPE (should be 'stddll' but is '$(TARGETTYPE)'))
-endif
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# WINSCW Standard DLL Function Like Makefile (FLM)
+# Build an emulator STDDLL
+# 
+#
+
+ifeq ($(TARGETTYPE),stddll)
+
+BASE_TYPE:=dll
+CFLAGS:=$(subst -inline off,,$(CFLAGS))
+CW_STATIC_RUNTIME:=0
+EXPORT_TYPE:=all
+FIRST_STATLIB:=
+FIXED_EXPORT:=
+LFLAGS:=$(subst -nostdlib,-stdlib,$(LFLAGS))
+LIBRARY:=$(LIBRARY) euser.lib backend.lib
+NAME_LOOKUP:=-sym_name_lkup -export_entrypoint_E32Dll
+OPEN_ENVIRONMENT:=1
+SUPPORTS_IMPORT_LIBRARY:=1
+SYSTEM_TARGET:=0
+UID2_DEFAULT:=20004C45
+
+# Use the general win32 FLM 
+include $(FLMHOME)/win32.flm
+
+else
+$(error $win32stddll.flm called with wrong TARGETTYPE (should be 'stddll' but is '$(TARGETTYPE)'))
+endif
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/win32stdexe.flm
--- a/sbsv2/raptor/lib/flm/win32stdexe.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/win32stdexe.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,46 +1,46 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# WINSCW Standard EXE Function Like Makefile (FLM)
-# Build an emulator STDEXE
-# 
-#
-
-ifeq ($(TARGETTYPE),stdexe)
-
-BASE_TYPE:=exe
-CFLAGS:=$(subst -inline off,,$(CFLAGS))
-CW_STATIC_RUNTIME:=0
-EXPORT_TYPE:=all
-FIRST_STATLIB:=
-FIXED_EXPORT:=
-LFLAGS:=$(subst -nostdlib,-stdlib,$(LFLAGS))
-LIBRARY:=$(LIBRARY) euser.lib backend.lib
-  
-ifeq ($(WCHARENTRYPOINT),)
-  LIBRARY:=$(LIBRARY) libcrt0.lib
-else
-  LIBRARY:=$(LIBRARY) libwcrt0.lib
-endif
-  
-OPEN_ENVIRONMENT:=1
-SUPPORTS_IMPORT_LIBRARY:=0
-SYSTEM_TARGET:=0
-UID2_DEFAULT:=20004C45
-
-# Use the general win32 FLM 
-include $(FLMHOME)/win32.flm
-
-else
-$(error $win32stdexe.flm called with wrong TARGETTYPE (should be 'stdexe' but is '$(TARGETTYPE)'))
-endif
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# WINSCW Standard EXE Function Like Makefile (FLM)
+# Build an emulator STDEXE
+# 
+#
+
+ifeq ($(TARGETTYPE),stdexe)
+
+BASE_TYPE:=exe
+CFLAGS:=$(subst -inline off,,$(CFLAGS))
+CW_STATIC_RUNTIME:=0
+EXPORT_TYPE:=all
+FIRST_STATLIB:=
+FIXED_EXPORT:=
+LFLAGS:=$(subst -nostdlib,-stdlib,$(LFLAGS))
+LIBRARY:=$(LIBRARY) euser.lib backend.lib
+  
+ifeq ($(WCHARENTRYPOINT),)
+  LIBRARY:=$(LIBRARY) libcrt0.lib
+else
+  LIBRARY:=$(LIBRARY) libwcrt0.lib
+endif
+  
+OPEN_ENVIRONMENT:=1
+SUPPORTS_IMPORT_LIBRARY:=0
+SYSTEM_TARGET:=0
+UID2_DEFAULT:=20004C45
+
+# Use the general win32 FLM 
+include $(FLMHOME)/win32.flm
+
+else
+$(error $win32stdexe.flm called with wrong TARGETTYPE (should be 'stdexe' but is '$(TARGETTYPE)'))
+endif
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/win32stdlib.flm
--- a/sbsv2/raptor/lib/flm/win32stdlib.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/win32stdlib.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,35 +1,35 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# win32lib.flm
-# WINSCW Standard Static Library Function Like Makefile (FLM)
-# Build an emulator STDLIB
-# 
-#
-
-ifeq ($(TARGETTYPE),stdlib)
-
-BASE_TYPE:=staticlib
-CW_STATIC_RUNTIME:=0
-FIXED_EXPORT:=
-LFLAGS:=$(subst -nostdlib,-stdlib,$(LFLAGS))
-OPEN_ENVIRONMENT:=1
-
-SUPPORTS_IMPORT_LIBRARY:=0
-
-# Use the general win32 FLM 
-include $(FLMHOME)/win32.flm
-
-else
-$(error $win32stdlib.flm called with wrong TARGETTYPE (should be 'stdlib' but is '$(TARGETTYPE)'))
-endif
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# win32lib.flm
+# WINSCW Standard Static Library Function Like Makefile (FLM)
+# Build an emulator STDLIB
+# 
+#
+
+ifeq ($(TARGETTYPE),stdlib)
+
+BASE_TYPE:=staticlib
+CW_STATIC_RUNTIME:=0
+FIXED_EXPORT:=
+LFLAGS:=$(subst -nostdlib,-stdlib,$(LFLAGS))
+OPEN_ENVIRONMENT:=1
+
+SUPPORTS_IMPORT_LIBRARY:=0
+
+# Use the general win32 FLM 
+include $(FLMHOME)/win32.flm
+
+else
+$(error $win32stdlib.flm called with wrong TARGETTYPE (should be 'stdlib' but is '$(TARGETTYPE)'))
+endif
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/win32textnotifier2.flm
--- a/sbsv2/raptor/lib/flm/win32textnotifier2.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/win32textnotifier2.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,35 +1,35 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# WINSCW TEXTNOTIFIER2 Function Like Makefile (FLM)
-# Build an emulator TEXTNOTIFIER2
-# 
-#
-
-ifeq ($(TARGETTYPE),textnotifier2)
-
-BASE_TYPE:=dll
-CW_STATIC_RUNTIME:=1
-FIRST_STATLIB:=
-# Actual export is ?NotifierArray@@YAPAV?$CArrayPtr@VMNotifierBase2@@@@XZ
-FIXED_EXPORT:=?NotifierArray@@YAPAV?\$$$$CArrayPtr@VMNotifierBase2@@@@XZ
-SUPPORTS_IMPORT_LIBRARY:=0
-SYSTEM_TARGET:=0
-UID2_DEFAULT:=101fe38b
-
-# Use the general win32 FLM 
-include $(FLMHOME)/win32.flm
-
-else
-$(error $win32textnotifier2.flm called with wrong TARGETTYPE (should be 'textnotifier2' but is '$(TARGETTYPE)'))
-endif
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# WINSCW TEXTNOTIFIER2 Function Like Makefile (FLM)
+# Build an emulator TEXTNOTIFIER2
+# 
+#
+
+ifeq ($(TARGETTYPE),textnotifier2)
+
+BASE_TYPE:=dll
+CW_STATIC_RUNTIME:=1
+FIRST_STATLIB:=
+# Actual export is ?NotifierArray@@YAPAV?$CArrayPtr@VMNotifierBase2@@@@XZ
+FIXED_EXPORT:=?NotifierArray@@YAPAV?\$$$$CArrayPtr@VMNotifierBase2@@@@XZ
+SUPPORTS_IMPORT_LIBRARY:=0
+SYSTEM_TARGET:=0
+UID2_DEFAULT:=101fe38b
+
+# Use the general win32 FLM 
+include $(FLMHOME)/win32.flm
+
+else
+$(error $win32textnotifier2.flm called with wrong TARGETTYPE (should be 'textnotifier2' but is '$(TARGETTYPE)'))
+endif
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/win32var.flm
--- a/sbsv2/raptor/lib/flm/win32var.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/win32var.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,33 +1,33 @@
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# WINSCW VAR Function Like Makefile (FLM)
-# Build an emulator VAR
-# 
-#
-
-ifeq ($(TARGETTYPE),var)
-
-BASE_TYPE:=dll
-CW_STATIC_RUNTIME:=1
-FIRST_STATLIB:=evar.lib
-FIXED_EXPORT:=
-SUPPORTS_IMPORT_LIBRARY:=1
-SYSTEM_TARGET:=1
-
-# Use the general win32 FLM 
-include $(FLMHOME)/win32.flm
-
-else
-$(error $win32var.flm called with wrong TARGETTYPE (should be 'var' but is '$(TARGETTYPE)'))
-endif
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# WINSCW VAR Function Like Makefile (FLM)
+# Build an emulator VAR
+# 
+#
+
+ifeq ($(TARGETTYPE),var)
+
+BASE_TYPE:=dll
+CW_STATIC_RUNTIME:=1
+FIRST_STATLIB:=evar.lib
+FIXED_EXPORT:=
+SUPPORTS_IMPORT_LIBRARY:=1
+SYSTEM_TARGET:=1
+
+# Use the general win32 FLM 
+include $(FLMHOME)/win32.flm
+
+else
+$(error $win32var.flm called with wrong TARGETTYPE (should be 'var' but is '$(TARGETTYPE)'))
+endif
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/lib/flm/win32var2.flm
--- a/sbsv2/raptor/lib/flm/win32var2.flm	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/lib/flm/win32var2.flm	Mon Nov 16 09:46:46 2009 +0000
@@ -1,33 +1,33 @@
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-# WINSCW VAR Function Like Makefile (FLM)
-# Build an emulator VAR (version 2)
-# 
-#
-
-ifeq ($(TARGETTYPE),var2)
-
-BASE_TYPE:=dll
-CW_STATIC_RUNTIME:=1
-FIRST_STATLIB:=evar.lib
-FIXED_EXPORT:=
-SUPPORTS_IMPORT_LIBRARY:=1
-SYSTEM_TARGET:=1
-
-# Use the general win32 FLM 
-include $(FLMHOME)/win32.flm
-
-else
-$(error $win32var2.flm called with wrong TARGETTYPE (should be 'var2' but is '$(TARGETTYPE)'))
-endif
+# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# WINSCW VAR Function Like Makefile (FLM)
+# Build an emulator VAR (version 2)
+# 
+#
+
+ifeq ($(TARGETTYPE),var2)
+
+BASE_TYPE:=dll
+CW_STATIC_RUNTIME:=1
+FIRST_STATLIB:=evar.lib
+FIXED_EXPORT:=
+SUPPORTS_IMPORT_LIBRARY:=1
+SYSTEM_TARGET:=1
+
+# Use the general win32 FLM 
+include $(FLMHOME)/win32.flm
+
+else
+$(error $win32var2.flm called with wrong TARGETTYPE (should be 'var2' but is '$(TARGETTYPE)'))
+endif
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/linux-i386/bin/bashbug
--- a/sbsv2/raptor/linux-i386/bin/bashbug	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/linux-i386/bin/bashbug	Mon Nov 16 09:46:46 2009 +0000
@@ -1,272 +1,272 @@
-#!/bin/sh -
-#
-# bashbug - create a bug report and mail it to the bug address
-#
-# The bug address depends on the release status of the shell.  Versions
-# with status `devel', `alpha', `beta', or `rc' mail bug reports to
-# chet@cwru.edu and, optionally, to bash-testers@cwru.edu.
-# Other versions send mail to bug-bash@gnu.org.
-#
-# Copyright (C) 1996-2004 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
-
-#
-# configuration section:
-#	these variables are filled in by the make target in Makefile
-#
-MACHINE="i686"
-OS="linux-gnu"
-CC="gcc"
-CFLAGS=" -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/opt/symbian/linux-i386/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib   -O2 -mtune=i686 -s"
-RELEASE="3.2"
-PATCHLEVEL="39"
-RELSTATUS="release"
-MACHTYPE="i686-pc-linux-gnu"
-
-PATH=/bin:/usr/bin:/usr/local/bin:$PATH
-export PATH
-
-# Check if TMPDIR is set, default to /tmp
-: ${TMPDIR:=/tmp}
-
-#Securely create a temporary directory for the temporary files
-TEMPDIR=$TMPDIR/bbug.$$
-(umask 077 && mkdir $TEMPDIR) || {
-	echo "$0: could not create temporary directory" >&2
-	exit 1
-}
-
-TEMPFILE1=$TEMPDIR/bbug1
-TEMPFILE2=$TEMPDIR/bbug2
-        
-USAGE="Usage: $0 [--help] [--version] [bug-report-email-address]"
-VERSTR="GNU bashbug, version ${RELEASE}.${PATCHLEVEL}-${RELSTATUS}"
-
-do_help= do_version=
-
-while [ $# -gt 0 ]; do
-	case "$1" in
-	--help)		shift ; do_help=y ;;
-	--version)	shift ; do_version=y ;;
-	--)		shift ; break ;;
-	-*)		echo "bashbug: ${1}: invalid option" >&2
-			echo "$USAGE" >& 2
-			exit 2 ;;
-	*)		break ;;
-	esac
-done
-
-if [ -n "$do_version" ]; then
-	echo "${VERSTR}"
-	exit 0
-fi
-
-if [ -n "$do_help" ]; then
-	echo "${VERSTR}"
-	echo "${USAGE}"
-	echo
-	cat << HERE_EOF
-Bashbug is used to send mail to the Bash maintainers
-for when Bash doesn't behave like you'd like, or expect.
-
-Bashbug will start up your editor (as defined by the shell's
-EDITOR environment variable) with a preformatted bug report
-template for you to fill in. The report will be mailed to the
-bash maintainers by default. See the manual for details.
-
-If you invoke bashbug by accident, just quit your editor without
-saving any changes to the template, and no bug report will be sent.
-HERE_EOF
-	exit 0
-fi
-
-# Figure out how to echo a string without a trailing newline
-N=`echo 'hi there\c'`
-case "$N" in
-*c)	n=-n c= ;;
-*)	n= c='\c' ;;
-esac
-
-BASHTESTERS="bash-testers@cwru.edu"
-
-case "$RELSTATUS" in
-alpha*|beta*|devel*|rc*)	BUGBASH=chet@cwru.edu ;;
-*)				BUGBASH=bug-bash@gnu.org ;;
-esac
-
-case "$RELSTATUS" in
-alpha*|beta*|devel*|rc*)
-		echo "$0: This is a testing release.  Would you like your bug report"
-		echo "$0: to be sent to the bash-testers mailing list?"
-		echo $n "$0: Send to bash-testers? $c"
-		read ans
-		case "$ans" in
-		y*|Y*)	BUGBASH="${BUGBASH},${BASHTESTERS}" ;;
-		esac ;;
-esac
-
-BUGADDR="${1-$BUGBASH}"
-
-if [ -z "$DEFEDITOR" ] && [ -z "$EDITOR" ]; then
-	if [ -x /usr/bin/editor ]; then
-		DEFEDITOR=editor
-	elif [ -x /usr/local/bin/ce ]; then
-		DEFEDITOR=ce
-	elif [ -x /usr/local/bin/emacs ]; then
-		DEFEDITOR=emacs
-	elif [ -x /usr/contrib/bin/emacs ]; then
-		DEFEDITOR=emacs
-	elif [ -x /usr/bin/emacs ]; then
-		DEFEDITOR=emacs
-	elif [ -x /usr/bin/xemacs ]; then
-		DEFEDITOR=xemacs
-	elif [ -x /usr/contrib/bin/jove ]; then
-		DEFEDITOR=jove
-	elif [ -x /usr/local/bin/jove ]; then
-		DEFEDITOR=jove
-	elif [ -x /usr/bin/vi ]; then
-		DEFEDITOR=vi
-	else
-		echo "$0: No default editor found: attempting to use vi" >&2
-		DEFEDITOR=vi
-	fi
-fi
-
-
-: ${EDITOR=$DEFEDITOR}
-
-: ${USER=${LOGNAME-`whoami`}}
-
-trap 'rm -rf "$TEMPDIR"; exit 1' 1 2 3 13 15
-trap 'rm -rf "$TEMPDIR"' 0
-
-UN=
-if (uname) >/dev/null 2>&1; then
-	UN=`uname -a`
-fi
-
-if [ -f /usr/lib/sendmail ] ; then
-	RMAIL="/usr/lib/sendmail"
-	SMARGS="-i -t"
-elif [ -f /usr/sbin/sendmail ] ; then
-	RMAIL="/usr/sbin/sendmail"
-	SMARGS="-i -t"
-else
-	RMAIL=rmail
-	SMARGS="$BUGADDR"
-fi
-
-INITIAL_SUBJECT='[50 character or so descriptive subject here (for reference)]'
-
-cat > "$TEMPFILE1" <> $HOME/dead.bashbug
-	echo "$0: mail failed: report saved in $HOME/dead.bashbug" >&2
-}
-
-exit 0
+#!/bin/sh -
+#
+# bashbug - create a bug report and mail it to the bug address
+#
+# The bug address depends on the release status of the shell.  Versions
+# with status `devel', `alpha', `beta', or `rc' mail bug reports to
+# chet@cwru.edu and, optionally, to bash-testers@cwru.edu.
+# Other versions send mail to bug-bash@gnu.org.
+#
+# Copyright (C) 1996-2004 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
+
+#
+# configuration section:
+#	these variables are filled in by the make target in Makefile
+#
+MACHINE="i686"
+OS="linux-gnu"
+CC="gcc"
+CFLAGS=" -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/opt/symbian/linux-i386/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib   -O2 -mtune=i686 -s"
+RELEASE="3.2"
+PATCHLEVEL="39"
+RELSTATUS="release"
+MACHTYPE="i686-pc-linux-gnu"
+
+PATH=/bin:/usr/bin:/usr/local/bin:$PATH
+export PATH
+
+# Check if TMPDIR is set, default to /tmp
+: ${TMPDIR:=/tmp}
+
+#Securely create a temporary directory for the temporary files
+TEMPDIR=$TMPDIR/bbug.$$
+(umask 077 && mkdir $TEMPDIR) || {
+	echo "$0: could not create temporary directory" >&2
+	exit 1
+}
+
+TEMPFILE1=$TEMPDIR/bbug1
+TEMPFILE2=$TEMPDIR/bbug2
+        
+USAGE="Usage: $0 [--help] [--version] [bug-report-email-address]"
+VERSTR="GNU bashbug, version ${RELEASE}.${PATCHLEVEL}-${RELSTATUS}"
+
+do_help= do_version=
+
+while [ $# -gt 0 ]; do
+	case "$1" in
+	--help)		shift ; do_help=y ;;
+	--version)	shift ; do_version=y ;;
+	--)		shift ; break ;;
+	-*)		echo "bashbug: ${1}: invalid option" >&2
+			echo "$USAGE" >& 2
+			exit 2 ;;
+	*)		break ;;
+	esac
+done
+
+if [ -n "$do_version" ]; then
+	echo "${VERSTR}"
+	exit 0
+fi
+
+if [ -n "$do_help" ]; then
+	echo "${VERSTR}"
+	echo "${USAGE}"
+	echo
+	cat << HERE_EOF
+Bashbug is used to send mail to the Bash maintainers
+for when Bash doesn't behave like you'd like, or expect.
+
+Bashbug will start up your editor (as defined by the shell's
+EDITOR environment variable) with a preformatted bug report
+template for you to fill in. The report will be mailed to the
+bash maintainers by default. See the manual for details.
+
+If you invoke bashbug by accident, just quit your editor without
+saving any changes to the template, and no bug report will be sent.
+HERE_EOF
+	exit 0
+fi
+
+# Figure out how to echo a string without a trailing newline
+N=`echo 'hi there\c'`
+case "$N" in
+*c)	n=-n c= ;;
+*)	n= c='\c' ;;
+esac
+
+BASHTESTERS="bash-testers@cwru.edu"
+
+case "$RELSTATUS" in
+alpha*|beta*|devel*|rc*)	BUGBASH=chet@cwru.edu ;;
+*)				BUGBASH=bug-bash@gnu.org ;;
+esac
+
+case "$RELSTATUS" in
+alpha*|beta*|devel*|rc*)
+		echo "$0: This is a testing release.  Would you like your bug report"
+		echo "$0: to be sent to the bash-testers mailing list?"
+		echo $n "$0: Send to bash-testers? $c"
+		read ans
+		case "$ans" in
+		y*|Y*)	BUGBASH="${BUGBASH},${BASHTESTERS}" ;;
+		esac ;;
+esac
+
+BUGADDR="${1-$BUGBASH}"
+
+if [ -z "$DEFEDITOR" ] && [ -z "$EDITOR" ]; then
+	if [ -x /usr/bin/editor ]; then
+		DEFEDITOR=editor
+	elif [ -x /usr/local/bin/ce ]; then
+		DEFEDITOR=ce
+	elif [ -x /usr/local/bin/emacs ]; then
+		DEFEDITOR=emacs
+	elif [ -x /usr/contrib/bin/emacs ]; then
+		DEFEDITOR=emacs
+	elif [ -x /usr/bin/emacs ]; then
+		DEFEDITOR=emacs
+	elif [ -x /usr/bin/xemacs ]; then
+		DEFEDITOR=xemacs
+	elif [ -x /usr/contrib/bin/jove ]; then
+		DEFEDITOR=jove
+	elif [ -x /usr/local/bin/jove ]; then
+		DEFEDITOR=jove
+	elif [ -x /usr/bin/vi ]; then
+		DEFEDITOR=vi
+	else
+		echo "$0: No default editor found: attempting to use vi" >&2
+		DEFEDITOR=vi
+	fi
+fi
+
+
+: ${EDITOR=$DEFEDITOR}
+
+: ${USER=${LOGNAME-`whoami`}}
+
+trap 'rm -rf "$TEMPDIR"; exit 1' 1 2 3 13 15
+trap 'rm -rf "$TEMPDIR"' 0
+
+UN=
+if (uname) >/dev/null 2>&1; then
+	UN=`uname -a`
+fi
+
+if [ -f /usr/lib/sendmail ] ; then
+	RMAIL="/usr/lib/sendmail"
+	SMARGS="-i -t"
+elif [ -f /usr/sbin/sendmail ] ; then
+	RMAIL="/usr/sbin/sendmail"
+	SMARGS="-i -t"
+else
+	RMAIL=rmail
+	SMARGS="$BUGADDR"
+fi
+
+INITIAL_SUBJECT='[50 character or so descriptive subject here (for reference)]'
+
+cat > "$TEMPFILE1" <> $HOME/dead.bashbug
+	echo "$0: mail failed: report saved in $HOME/dead.bashbug" >&2
+}
+
+exit 0
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/python/dos2unix.py
--- a/sbsv2/raptor/python/dos2unix.py	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/python/dos2unix.py	Mon Nov 16 09:46:46 2009 +0000
@@ -1,68 +1,68 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# dos2unix - python version
-# This module converts file from dos to unix i.e. replaces Dos/Windows EOL (CRLF) with Unix EOL (LF).
-# example usage:
-# dos2unix.py windowsFile.txt
-#
-
-import os
-import re
-import sys
-import stat
-#------------------------------------------------------------------------------
-# Converts string from dos to unix i.e. replaces CRLF with LF as a line terminator (EOL)
-#------------------------------------------------------------------------------
-def convertDos2Unix(inputString):
-    regExp = re.compile("\r\n|\n|\r")
-    return regExp.sub("\n",inputString)
-
-#------------------------------------------------------------------------------
-# Validates input
-#------------------------------------------------------------------------------
-def validateInput(argv):
-    if not(len(argv) > 1):
-       print "Error No parameter given: fileName to convert."
-       sys.exit();
-
-#------------------------------------------------------------------------------
-# Reads input file
-#------------------------------------------------------------------------------
-def readInputFile(fileName):
-    inputFile = open(fileName, 'r')
-    # read file content
-    originalFileContent = inputFile.read()
-    inputFile.close()
-    return originalFileContent
-
-#------------------------------------------------------------------------------
-# Writes string to given file (in binary mode)
-#------------------------------------------------------------------------------
-def writeToBinaryFile(string,fileName):
-    os.chmod(fileName, stat.S_IRWXU)
-    outputFile = open(fileName, 'wb')
-    outputFile.write(string)
-    outputFile.close()
-
-# Main script
-
-#------------------------------------------------------------------------------
-# Coverts dos/windows EOL to UNIX EOL (CRLF->LF) in given file
-#------------------------------------------------------------------------------
-def dos2unix(fileName):
-    originalFileContent = readInputFile(fileName)
-    convertedFileContent = convertDos2Unix(originalFileContent)
-    writeToBinaryFile(convertedFileContent,fileName)
-
+#
+# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# dos2unix - python version
+# This module converts file from dos to unix i.e. replaces Dos/Windows EOL (CRLF) with Unix EOL (LF).
+# example usage:
+# dos2unix.py windowsFile.txt
+#
+
+import os
+import re
+import sys
+import stat
+#------------------------------------------------------------------------------
+# Converts string from dos to unix i.e. replaces CRLF with LF as a line terminator (EOL)
+#------------------------------------------------------------------------------
+def convertDos2Unix(inputString):
+    regExp = re.compile("\r\n|\n|\r")
+    return regExp.sub("\n",inputString)
+
+#------------------------------------------------------------------------------
+# Validates input
+#------------------------------------------------------------------------------
+def validateInput(argv):
+    if not(len(argv) > 1):
+       print "Error No parameter given: fileName to convert."
+       sys.exit();
+
+#------------------------------------------------------------------------------
+# Reads input file
+#------------------------------------------------------------------------------
+def readInputFile(fileName):
+    inputFile = open(fileName, 'r')
+    # read file content
+    originalFileContent = inputFile.read()
+    inputFile.close()
+    return originalFileContent
+
+#------------------------------------------------------------------------------
+# Writes string to given file (in binary mode)
+#------------------------------------------------------------------------------
+def writeToBinaryFile(string,fileName):
+    os.chmod(fileName, stat.S_IRWXU)
+    outputFile = open(fileName, 'wb')
+    outputFile.write(string)
+    outputFile.close()
+
+# Main script
+
+#------------------------------------------------------------------------------
+# Coverts dos/windows EOL to UNIX EOL (CRLF->LF) in given file
+#------------------------------------------------------------------------------
+def dos2unix(fileName):
+    originalFileContent = readInputFile(fileName)
+    convertedFileContent = convertDos2Unix(originalFileContent)
+    writeToBinaryFile(convertedFileContent,fileName)
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/python/filter_interface.py
--- a/sbsv2/raptor/python/filter_interface.py	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/python/filter_interface.py	Mon Nov 16 09:46:46 2009 +0000
@@ -1,34 +1,34 @@
-#
-# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# Base Class for defining filter classes
-# All filter classes that get defined should derive from this base class
-#
-
-class Filter(object):
-	
-	def open(self, raptor):
-		return False
-	
-	def write(self, text):
-		return False
-
-	def summary(self):
-		return False
-	
-	def close(self):
-		return False
-	
-	def formatError(self, message):
-		return "sbs: error: " + message + "\n"
+#
+# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# Base Class for defining filter classes
+# All filter classes that get defined should derive from this base class
+#
+
+class Filter(object):
+	
+	def open(self, raptor):
+		return False
+	
+	def write(self, text):
+		return False
+
+	def summary(self):
+		return False
+	
+	def close(self):
+		return False
+	
+	def formatError(self, message):
+		return "sbs: error: " + message + "\n"
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/python/filter_list.py
--- a/sbsv2/raptor/python/filter_list.py	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/python/filter_list.py	Mon Nov 16 09:46:46 2009 +0000
@@ -1,170 +1,170 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# Class to control array of defined logging filters
-# This class will act as a switch, controlling the list of filters iteratively
-#
-
-import os
-import sys
-import raptor
-import filter_interface
-import pluginbox
-import traceback
-
-class FilterWriteException(Exception):
-	def __init__(self, value):
-		self.parameter = value
-	def __str__(self):
-		return repr(self.parameter)
-
-class BootstrapFilter(filter_interface.Filter):
-	def __init__(self):
-		self.out = sys.stdout
-
-	"""Use this until the CLI has supplied some real filters"""
-	def open(self, raptor_instance):
-		"""Set output to stdout for the various I/O methods to write to."""
-		self.raptor = raptor_instance
-		return True
-		
-	def write(self, text):
-		"""Write errors and warnings to stdout"""
-		
-		if text.startswith(""):
-			start = text.find(">")
-			end = text.rfind("<")
-			self.out.write(str(raptor.name) + ": error: %s\n" \
-					% text[(start + 1):end])
-		elif text.startswith("")
-			end = text.rfind("<")
-			self.out.write(str(raptor.name) + ": warning: %s\n" \
-					% text[(start + 1):end])
-		elif "error" in text or "warning" in text:
-			self.out.write(text)
-		return True
-
-	def summary(self):
-		"""Write Summary"""
-		return False
-	
-	def close(self):
-		"""Nothing to do for stdout"""
-		return True
-
-
-
-class FilterList(filter_interface.Filter):
-
-	def __init__(self):
-		self.out = [BootstrapFilter()]
-		self.filters = []
-		self.pbox = None
-
-	def open(self, raptor_instance, filternames, pbox):
-		"""
-			Call open function on each filter using raptor parameters provided
-			Returns: Boolean: Have the functions succeeded in opening the files?
-		"""
-		# Find all the filter plugins
-		self.pbox = pbox
-		possiblefilters = self.pbox.classesof(filter_interface.Filter)
-		unfound = []
-		self.filters = []
-		for f in filternames:
-			unfound.append(f) # unfound unless we find it
-			for pl in possiblefilters:
-				if pl.__name__.upper() == f.upper():
-					self.filters.append(pl())
-					unfound = unfound[:-1]
-		if unfound != []:
-			raise ValueError("requested filters not found: %s \
-			\nAvailable filters are: %s" % (str(unfound), self.format_output_list(possiblefilters)))
-
-		if self.filters == []:
-			self.out = [BootstrapFilter()]
-		else:
-			self.out=[]
-			for filter in self.filters:
-				if filter.open(raptor_instance):
-					self.out.append(filter)
-				else:
-					sys.stderr.write(str(raptor.name) + \
-							": error: Cannot open filter: %s\n" % str(filter))
-					ok = False
-					
-			if self.out == []:
-				sys.stderr.write(str(raptor.name) + \
-						": warning: All filters failed to open. " + \
-						"Defaulting to 'stdout'\n")
-				self.out = [BootstrapFilter()]
-
-	def write(self, text):
-		"""
-			Iterate through each filter, calling their write function
-		"""
-
-		if text is None:
-			return
-
-		badfilters = []
-		for filter in self.out:
-			try:
-				filter.write(text)
-			except Exception,e:
-				traceback.print_exc(file=sys.stdout)
-				sys.stdout.write("Called from: \n")
-				traceback.print_stack(file=sys.stdout)
-				sys.stdout.write("\n")
-				badfilters.append(filter)
-
-		if len(badfilters) > 0:
-			for f in badfilters:
-				self.out.remove(f) # dump the filter in case it causes repeated exceptions
-				sys.stdout.write("Removed filter %s because it generated an exception\n" % type(f))
-
-			if len(self.out) == 0:
-				sys.stdout.write("Falling back to bootstrap filter\n")
-				self.out = [BootstrapFilter()] # Try to fall back to something in the worst case
-
-	def summary(self):
-		"""
-			Run the summaries of all filters (prior to log end)
-		"""
-		for filter in self.out:
-			filter.summary()
-
-	def close(self):
-		"""
-			Iterate through each filter, calling their close function
-			Returns True if all the filters close properly
-		"""
-		returnVal = True
-		
-		for filter in self.out:
-			if (filter != sys.stdout) and (filter != sys.stderr):
-				returnVal = returnVal and filter.close()
-		
-		return returnVal
-
-	def format_output_list(self, possiblefilters):
-		"""
-			formats available filters
-		"""
-		filters_formatted = ""
-		for pl in possiblefilters:
-			filters_formatted += "\n  " + pl.__name__
-		return filters_formatted
-		
+#
+# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# Class to control array of defined logging filters
+# This class will act as a switch, controlling the list of filters iteratively
+#
+
+import os
+import sys
+import raptor
+import filter_interface
+import pluginbox
+import traceback
+
+class FilterWriteException(Exception):
+	def __init__(self, value):
+		self.parameter = value
+	def __str__(self):
+		return repr(self.parameter)
+
+class BootstrapFilter(filter_interface.Filter):
+	def __init__(self):
+		self.out = sys.stdout
+
+	"""Use this until the CLI has supplied some real filters"""
+	def open(self, raptor_instance):
+		"""Set output to stdout for the various I/O methods to write to."""
+		self.raptor = raptor_instance
+		return True
+		
+	def write(self, text):
+		"""Write errors and warnings to stdout"""
+		
+		if text.startswith(""):
+			start = text.find(">")
+			end = text.rfind("<")
+			self.out.write(str(raptor.name) + ": error: %s\n" \
+					% text[(start + 1):end])
+		elif text.startswith("")
+			end = text.rfind("<")
+			self.out.write(str(raptor.name) + ": warning: %s\n" \
+					% text[(start + 1):end])
+		elif "error" in text or "warning" in text:
+			self.out.write(text)
+		return True
+
+	def summary(self):
+		"""Write Summary"""
+		return False
+	
+	def close(self):
+		"""Nothing to do for stdout"""
+		return True
+
+
+
+class FilterList(filter_interface.Filter):
+
+	def __init__(self):
+		self.out = [BootstrapFilter()]
+		self.filters = []
+		self.pbox = None
+
+	def open(self, raptor_instance, filternames, pbox):
+		"""
+			Call open function on each filter using raptor parameters provided
+			Returns: Boolean: Have the functions succeeded in opening the files?
+		"""
+		# Find all the filter plugins
+		self.pbox = pbox
+		possiblefilters = self.pbox.classesof(filter_interface.Filter)
+		unfound = []
+		self.filters = []
+		for f in filternames:
+			unfound.append(f) # unfound unless we find it
+			for pl in possiblefilters:
+				if pl.__name__.upper() == f.upper():
+					self.filters.append(pl())
+					unfound = unfound[:-1]
+		if unfound != []:
+			raise ValueError("requested filters not found: %s \
+			\nAvailable filters are: %s" % (str(unfound), self.format_output_list(possiblefilters)))
+
+		if self.filters == []:
+			self.out = [BootstrapFilter()]
+		else:
+			self.out=[]
+			for filter in self.filters:
+				if filter.open(raptor_instance):
+					self.out.append(filter)
+				else:
+					sys.stderr.write(str(raptor.name) + \
+							": error: Cannot open filter: %s\n" % str(filter))
+					ok = False
+					
+			if self.out == []:
+				sys.stderr.write(str(raptor.name) + \
+						": warning: All filters failed to open. " + \
+						"Defaulting to 'stdout'\n")
+				self.out = [BootstrapFilter()]
+
+	def write(self, text):
+		"""
+			Iterate through each filter, calling their write function
+		"""
+
+		if text is None:
+			return
+
+		badfilters = []
+		for filter in self.out:
+			try:
+				filter.write(text)
+			except Exception,e:
+				traceback.print_exc(file=sys.stdout)
+				sys.stdout.write("Called from: \n")
+				traceback.print_stack(file=sys.stdout)
+				sys.stdout.write("\n")
+				badfilters.append(filter)
+
+		if len(badfilters) > 0:
+			for f in badfilters:
+				self.out.remove(f) # dump the filter in case it causes repeated exceptions
+				sys.stdout.write("Removed filter %s because it generated an exception\n" % type(f))
+
+			if len(self.out) == 0:
+				sys.stdout.write("Falling back to bootstrap filter\n")
+				self.out = [BootstrapFilter()] # Try to fall back to something in the worst case
+
+	def summary(self):
+		"""
+			Run the summaries of all filters (prior to log end)
+		"""
+		for filter in self.out:
+			filter.summary()
+
+	def close(self):
+		"""
+			Iterate through each filter, calling their close function
+			Returns True if all the filters close properly
+		"""
+		returnVal = True
+		
+		for filter in self.out:
+			if (filter != sys.stdout) and (filter != sys.stderr):
+				returnVal = returnVal and filter.close()
+		
+		return returnVal
+
+	def format_output_list(self, possiblefilters):
+		"""
+			formats available filters
+		"""
+		filters_formatted = ""
+		for pl in possiblefilters:
+			filters_formatted += "\n  " + pl.__name__
+		return filters_formatted
+		
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/python/filter_utils.py
--- a/sbsv2/raptor/python/filter_utils.py	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/python/filter_utils.py	Mon Nov 16 09:46:46 2009 +0000
@@ -1,249 +1,249 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# Classes, methods and regex available for use in log filters
-#
-
-
-import re
-
-
-# General log structure
-logTag = re.compile('\?xml|buildlog|info|warning|error|recipe|whatlog|build|export|archive|member|bitmap|resource|stringtable|bmconvcmdfile)[>| ]')
-logHeader = re.compile('.+)[\'|\"] xmlns=[\'|\"](?P.+)[\'|\"] xmlns:xsi=[\'|\"](?P.+)[\'|\"] xsi:schemaLocation=[\'|\"](?P.+)[\'|\"]>')
-clean = re.compile('.*.+)[\'|\"] />')
-exports = re.compile('(Copied|Unzipped (?P\d+) files from) (?P.+) to (?P.+)')
-
-# Tool errors and warnings
-mwError = re.compile('(.+:\d+:(?! (note|warning):) .+|mw(ld|cc)sym2(.exe)?:(?! (note|warning):) .+ \'.+\' .+)')
-mwWarning = re.compile('.+:\d+: warning: .+|mw(ld|cc)sym2(.exe)?: warning: .+')
-
-
-class AutoFlushedStream(file):
-	""" Wrapper for STDOUT/STDERR streams to ensure that a flush is performed
-	after write methods.
-	Use to avoid buffering when log output in real time is required."""
-	
-	def __init__(self, aStream):
-		self.__stream = aStream
-    
-	def write(self, aText):
-		self.__stream.write(aText)
-		self.__stream.flush()
-
-	def writelines(self, aTextList):
-		self.__stream.writelines(aTextList)
-		self.__stream.flush()
-
-
-class RecipeFactory(object):
-	"Factory class to ease creation of appropriately specialised Recipe objects."
-	
-	def newRecipe(self, aLine=None, aCustomIgnore=None):
-		""" Creates objects of base type Recipe depending on the name
-		of the recipe being processed."""
-		
-		name = ""
-		header = None
-		if aLine:
-			header = Recipe.header.match(aLine)
-		if header:
-			name = header.group("name")	
-		
-		if name.startswith("win32"):
-			return Win32Recipe(aLine, aCustomIgnore)
-		else:
-			return Recipe(aLine, aCustomIgnore)
-	
-
-class Recipe(object):
-	""" Recipe base class.
-	Provides a means to get hold of recipe content in a generic way.
-	Includes a basic understanding of errors and warnings - sub-classes can
-	override output, error and warning methods to specialise."""
-	
-	# Flags to normalise client access, mapping directly to regex groups
-	name		= "name"
-	target		= "target"
-	host		= "host"
-	layer		= "layer"
-	component	= "component"
-	bldinf		= "bldinf"
-	mmp			= "mmp"
-	config		= "config"
-	platform	= "platform"
-	phase		= "phase"
-	source		= "source"
-	start		= "start"
-	elapsed		= "elapsed"
-	exit		= "exit"
-	code		= "code"
-	attempts	= "attempts"
-	
-	# Basic errors/warnings
-	error = re.compile('Error: ')
-	warning = re.compile('Warning: ')
-	
-	# Recipe metadata
-	header  = re.compile('.+)[\'|\"]\s+target=[\'|\"](?P.+)[\'|\"]\s+host=[\'|\"](?P.+)[\'|\"]\s+layer=[\'|\"](?P.*)[\'|\"]\s+component=[\'|\"](?P.*)[\'|\"]\s+bldinf=[\'|\"](?P.+)[\'|\"]\s+mmp=[\'|\"](?P.*)[\'|\"]\s+config=[\'|\"](?P.+)[\'|\"]\s+platform=[\'|\"](?P.*)[\'|\"]\s+phase=[\'|\"](?P.+)[\'|\"]\s+source=[\'|\"](?P.*)[\'|\"]\s*>')
-	call    = re.compile('^\+ (?P.+)$')
-	status  = re.compile('\(ok|failed|retry))[\'|\"](\s+code=[\'|\"](?P\d+)[\'|\"])?\s+attempt=[\'|\"](?P\d+)[\'|\"]\s*\/>')
-	ignore  = re.compile('\d+\.\d+)[\'|\"]\s+elapsed=[\'|\"](?P\d+.\d+)[\'|\"]\s*/>$')
-	footer  = re.compile('$')
-	
-	
-	def __init__(self, aLine=None, aCustomIgnore=None):
-		"""
-		@param aLine			Optional first line of a recipe (typically the recipe header)
-		@param aCustomIgnore	Optional compiled regular expression object listing additional
-								lines to be ignored in this recipe's output.
-		"""				
-		self.__customIgnore = aCustomIgnore	
-		
-		self.__detail = {
-						Recipe.name		:"",
-						Recipe.target	:"",
-						Recipe.host		:"",
-						Recipe.layer	:"",
-						Recipe.component:"",
-						Recipe.bldinf	:"",
-						Recipe.mmp		:"",
-						Recipe.config	:"",
-						Recipe.platform	:"",
-						Recipe.phase	:"",
-						Recipe.source	:"",
-						Recipe.start	:"",
-						Recipe.elapsed	:0.0,
-						Recipe.exit		:"",
-						Recipe.code		:0,
-						Recipe.attempts	:0
-						}
-		
-		self.__calls = []
-		self.__lines = []
-		self.__complete = False
-		
-		if aLine:
-			self.addLine(aLine)
-	
-	def isComplete(self):
-		"""Signifies that the recipe footer has been reached, the
-		recipe is complete and so is in a fit state to be queried."""
-		return self.__complete
-
-	def __storeDetail(self, aMatchObject):
-		for key in aMatchObject.groupdict().keys():
-			value = aMatchObject.group(key)
-			if value:
-				if (key in [Recipe.code,Recipe.attempts]):
-					value = int(value)
-				elif key == Recipe.elapsed:
-					value = float(value)
-				self.__detail[key] = value
-	
-	def addLine(self, aLine):
-		"""Add a log line to an existing recipe object, processing anything
-		that can be examined at this point in time directly."""
-		if Recipe.ignore.match(aLine) or (self.__customIgnore and self.__customIgnore.match(aLine)):
-			return
-
-		header = Recipe.header.match(aLine)
-		if header:
-			self.__storeDetail(header)
-			return
-		
-		call = Recipe.call.match(aLine)
-		if call:
-			self.__calls.append(call.group("call"))
-			return
-		
-		time = Recipe.time.match(aLine)
-		if time:
-			self.__storeDetail(time)
-			return
-		
-		status = Recipe.status.match(aLine)
-		if status:
-			self.__storeDetail(status)
-			return
-		
-		if Recipe.footer.match(aLine):
-			self.__complete = True
-			return
-
-		self.__lines.append(aLine)
-	
-	def getDetail(self, aItem):
-		"""Retrieve attribute detail from recipe tags.
-		Class data flags provide known items e.g. getDetail(Recipe.source)"""
-		if self.__detail.has_key(aItem):
-			return self.__detail[aItem]
-		
-	def getCalls(self):
-		"Return a list of all '+' prefixed tool calls from this recipe."
-		return self.__calls
-	
-	def isError(self, aLine):
-		"""Convenience matcher for basic errors.
-		Override in sub-classes to specialise."""
-		return True if Recipe.error.match(aLine) else 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
-	
-	def getOutput(self):
-		""""Return a list of all output that isn't an error or a warning.
-		Override in sub-classes to specialise."""
-		output = []
-		for line in self.__lines:
-			if not self.isError(line) and not self.isWarning(line):
-				output.append(line)
-		return output
-	
-	def getErrors(self):
-		""""Return a list of all output identified as an error.
-		Override in sub-classes to specialise."""
-		errors = []
-		for line in self.__lines:
-			if self.isError(line):
-				errors.append(line)
-		return errors
-	
-	def getWarnings(self):
-		""""Return a list of all output identified as a warning.
-		Override in sub-classes to specialise."""
-		warnings = []
-		for line in self.__lines:
-			if self.isWarning(line):
-				warnings.append(line)
-		return warnings
-	
-	def isSuccess(self):
-		"Convenience method to get overall recipe status."
-		return True if self.getDetail(Recipe.exit) == "ok" else False
-	
-	
-class Win32Recipe(Recipe):
-	"Win32 tailored recipe class."
-	def isError(self, aLine):
-		return True if mwError.match(aLine) else False
-	
-	def isWarning(self, aLine):
-		return True if mwWarning.match(aLine) else False
-
-
-	
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# Classes, methods and regex available for use in log filters
+#
+
+
+import re
+
+
+# General log structure
+logTag = re.compile('\?xml|buildlog|info|warning|error|recipe|whatlog|build|export|archive|member|bitmap|resource|stringtable|bmconvcmdfile)[>| ]')
+logHeader = re.compile('.+)[\'|\"] xmlns=[\'|\"](?P.+)[\'|\"] xmlns:xsi=[\'|\"](?P.+)[\'|\"] xsi:schemaLocation=[\'|\"](?P.+)[\'|\"]>')
+clean = re.compile('.*.+)[\'|\"] />')
+exports = re.compile('(Copied|Unzipped (?P\d+) files from) (?P.+) to (?P.+)')
+
+# Tool errors and warnings
+mwError = re.compile('(.+:\d+:(?! (note|warning):) .+|mw(ld|cc)sym2(.exe)?:(?! (note|warning):) .+ \'.+\' .+)')
+mwWarning = re.compile('.+:\d+: warning: .+|mw(ld|cc)sym2(.exe)?: warning: .+')
+
+
+class AutoFlushedStream(file):
+	""" Wrapper for STDOUT/STDERR streams to ensure that a flush is performed
+	after write methods.
+	Use to avoid buffering when log output in real time is required."""
+	
+	def __init__(self, aStream):
+		self.__stream = aStream
+    
+	def write(self, aText):
+		self.__stream.write(aText)
+		self.__stream.flush()
+
+	def writelines(self, aTextList):
+		self.__stream.writelines(aTextList)
+		self.__stream.flush()
+
+
+class RecipeFactory(object):
+	"Factory class to ease creation of appropriately specialised Recipe objects."
+	
+	def newRecipe(self, aLine=None, aCustomIgnore=None):
+		""" Creates objects of base type Recipe depending on the name
+		of the recipe being processed."""
+		
+		name = ""
+		header = None
+		if aLine:
+			header = Recipe.header.match(aLine)
+		if header:
+			name = header.group("name")	
+		
+		if name.startswith("win32"):
+			return Win32Recipe(aLine, aCustomIgnore)
+		else:
+			return Recipe(aLine, aCustomIgnore)
+	
+
+class Recipe(object):
+	""" Recipe base class.
+	Provides a means to get hold of recipe content in a generic way.
+	Includes a basic understanding of errors and warnings - sub-classes can
+	override output, error and warning methods to specialise."""
+	
+	# Flags to normalise client access, mapping directly to regex groups
+	name		= "name"
+	target		= "target"
+	host		= "host"
+	layer		= "layer"
+	component	= "component"
+	bldinf		= "bldinf"
+	mmp			= "mmp"
+	config		= "config"
+	platform	= "platform"
+	phase		= "phase"
+	source		= "source"
+	start		= "start"
+	elapsed		= "elapsed"
+	exit		= "exit"
+	code		= "code"
+	attempts	= "attempts"
+	
+	# Basic errors/warnings
+	error = re.compile('Error: ')
+	warning = re.compile('Warning: ')
+	
+	# Recipe metadata
+	header  = re.compile('.+)[\'|\"]\s+target=[\'|\"](?P.+)[\'|\"]\s+host=[\'|\"](?P.+)[\'|\"]\s+layer=[\'|\"](?P.*)[\'|\"]\s+component=[\'|\"](?P.*)[\'|\"]\s+bldinf=[\'|\"](?P.+)[\'|\"]\s+mmp=[\'|\"](?P.*)[\'|\"]\s+config=[\'|\"](?P.+)[\'|\"]\s+platform=[\'|\"](?P.*)[\'|\"]\s+phase=[\'|\"](?P.+)[\'|\"]\s+source=[\'|\"](?P.*)[\'|\"]\s*>')
+	call    = re.compile('^\+ (?P.+)$')
+	status  = re.compile('\(ok|failed|retry))[\'|\"](\s+code=[\'|\"](?P\d+)[\'|\"])?\s+attempt=[\'|\"](?P\d+)[\'|\"]\s*\/>')
+	ignore  = re.compile('\d+\.\d+)[\'|\"]\s+elapsed=[\'|\"](?P\d+.\d+)[\'|\"]\s*/>$')
+	footer  = re.compile('$')
+	
+	
+	def __init__(self, aLine=None, aCustomIgnore=None):
+		"""
+		@param aLine			Optional first line of a recipe (typically the recipe header)
+		@param aCustomIgnore	Optional compiled regular expression object listing additional
+								lines to be ignored in this recipe's output.
+		"""				
+		self.__customIgnore = aCustomIgnore	
+		
+		self.__detail = {
+						Recipe.name		:"",
+						Recipe.target	:"",
+						Recipe.host		:"",
+						Recipe.layer	:"",
+						Recipe.component:"",
+						Recipe.bldinf	:"",
+						Recipe.mmp		:"",
+						Recipe.config	:"",
+						Recipe.platform	:"",
+						Recipe.phase	:"",
+						Recipe.source	:"",
+						Recipe.start	:"",
+						Recipe.elapsed	:0.0,
+						Recipe.exit		:"",
+						Recipe.code		:0,
+						Recipe.attempts	:0
+						}
+		
+		self.__calls = []
+		self.__lines = []
+		self.__complete = False
+		
+		if aLine:
+			self.addLine(aLine)
+	
+	def isComplete(self):
+		"""Signifies that the recipe footer has been reached, the
+		recipe is complete and so is in a fit state to be queried."""
+		return self.__complete
+
+	def __storeDetail(self, aMatchObject):
+		for key in aMatchObject.groupdict().keys():
+			value = aMatchObject.group(key)
+			if value:
+				if (key in [Recipe.code,Recipe.attempts]):
+					value = int(value)
+				elif key == Recipe.elapsed:
+					value = float(value)
+				self.__detail[key] = value
+	
+	def addLine(self, aLine):
+		"""Add a log line to an existing recipe object, processing anything
+		that can be examined at this point in time directly."""
+		if Recipe.ignore.match(aLine) or (self.__customIgnore and self.__customIgnore.match(aLine)):
+			return
+
+		header = Recipe.header.match(aLine)
+		if header:
+			self.__storeDetail(header)
+			return
+		
+		call = Recipe.call.match(aLine)
+		if call:
+			self.__calls.append(call.group("call"))
+			return
+		
+		time = Recipe.time.match(aLine)
+		if time:
+			self.__storeDetail(time)
+			return
+		
+		status = Recipe.status.match(aLine)
+		if status:
+			self.__storeDetail(status)
+			return
+		
+		if Recipe.footer.match(aLine):
+			self.__complete = True
+			return
+
+		self.__lines.append(aLine)
+	
+	def getDetail(self, aItem):
+		"""Retrieve attribute detail from recipe tags.
+		Class data flags provide known items e.g. getDetail(Recipe.source)"""
+		if self.__detail.has_key(aItem):
+			return self.__detail[aItem]
+		
+	def getCalls(self):
+		"Return a list of all '+' prefixed tool calls from this recipe."
+		return self.__calls
+	
+	def isError(self, aLine):
+		"""Convenience matcher for basic errors.
+		Override in sub-classes to specialise."""
+		return True if Recipe.error.match(aLine) else 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
+	
+	def getOutput(self):
+		""""Return a list of all output that isn't an error or a warning.
+		Override in sub-classes to specialise."""
+		output = []
+		for line in self.__lines:
+			if not self.isError(line) and not self.isWarning(line):
+				output.append(line)
+		return output
+	
+	def getErrors(self):
+		""""Return a list of all output identified as an error.
+		Override in sub-classes to specialise."""
+		errors = []
+		for line in self.__lines:
+			if self.isError(line):
+				errors.append(line)
+		return errors
+	
+	def getWarnings(self):
+		""""Return a list of all output identified as a warning.
+		Override in sub-classes to specialise."""
+		warnings = []
+		for line in self.__lines:
+			if self.isWarning(line):
+				warnings.append(line)
+		return warnings
+	
+	def isSuccess(self):
+		"Convenience method to get overall recipe status."
+		return True if self.getDetail(Recipe.exit) == "ok" else False
+	
+	
+class Win32Recipe(Recipe):
+	"Win32 tailored recipe class."
+	def isError(self, aLine):
+		return True if mwError.match(aLine) else False
+	
+	def isWarning(self, aLine):
+		return True if mwWarning.match(aLine) else False
+
+
+	
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/python/generic_path.py
--- a/sbsv2/raptor/python/generic_path.py	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/python/generic_path.py	Mon Nov 16 09:46:46 2009 +0000
@@ -1,315 +1,315 @@
-#
-# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# generic_path module
-#
-
-import os
-import sys
-import re
-import types
-
-# are we on windows, and if so what is the current drive letter
-isWin = sys.platform.lower().startswith("win")
-if isWin:
-	drive = re.match('^([A-Za-z]:)',os.getcwd()).group(0)
-
-# regex for "bare" drive letters	
-driveRE = re.compile('^[A-Za-z]:$')
-
-# Base class
-
-class Path:
-	"""This class represents a file path.
-	
-	A generic path object supports operations without needing to know
-	about Windows and Linux differences. The standard str() function can
-	obtain a string version of the path in Local format for use by
-	platform-specific functions (file opening for example).
-	
-	We use forward slashes as path separators (even on Windows).
-	
-	For example,
-	
-		path1 = generic_path.Path("/foo")
-		path2 = generic_path.Path("bar", "bing.bang")
-		
-		print str(path1.Append(path2))
-		
-	Prints /foo/bar/bing.bang		on Linux
-	Prints c:/foo/bar/bing.bang		on Windows (if c is the current drive)
-	""" 
-		
-	def __init__(self, *arguments):
-		"""construct a path from a list of path elements"""
-		
-		if len(arguments) == 0:
-			self.path = ""
-			return
-		
-		list = []
-		for i,arg in enumerate(arguments):
-			if isWin:
-				if i == 0:
-					# If the first element starts with \ or / then we will
-					# add the current drive letter to make a fully absolute path
-					if arg.startswith("\\\\"):
-						list.append(arg) # A UNC path - don't mess with it
-					elif arg.startswith("\\") or arg.startswith("/"):
-						list.append(drive + arg)
-					# If the first element is a bare drive then dress it with a \
-					# temporarily otherwise "join" will not work properly.
-					elif driveRE.match(arg):
-						list.append(arg + "\\")
-					# nothing special about the first element
-					else:
-						list.append(arg)
-				else:
-					if arg.startswith("\\\\"):
-						raise ValueError("non-initial path components must not start with \\\\ : %s" % arg)
-					else:
-						list.append(arg)
-				if ";" in arg:
-					raise ValueError("An individual windows Path may not contain ';' : %s" % arg)
-			else:
-				list.append(arg)
-	
-		self.path = os.path.join(*list)
-		
-		# normalise to avoid nastiness with dots and multiple separators
-		# but do not normalise "" as it will become "."
-		if self.path != "":
-			self.path = os.path.normpath(self.path)
-		
-		# always use forward slashes as separators
-		self.path = self.path.replace("\\", "/")
-		
-		# remove trailing slashes unless we are just /
-		if self.path != "/":
-			self.path = self.path.rstrip("/")
-		
-	def __str__(self):
-		return self.path
-	
-	def GetNeutralStr(self):
-		"""return the path as a string that could be included in other paths."""
-		return self.path.replace(":","").replace("/","")
-
-	def GetLocalString(self):
-		"""return a string in the local file-system format.
-		
-		e.g. C:/tmp on Windows or /C/tmp on Linux"""
-		return self.path
-	
-	def isAbsolute(self):
-		"test whether this path is absolute or relative"
-		# C: is an absolute directory
-		return (os.path.isabs(self.path) or driveRE.match(self.path))
-	
-	def Absolute(self):
-		"""return an object for the absolute version of this path.
-		
-		Prepends the current working directory to relative paths and
-		the current drive (on Windows) to /something type paths."""
-		# leave C: alone as abspath will stick the cwd on
-		if driveRE.match(self.path):
-			return Path(self.path)
-		else:
-			return Path(os.path.abspath(self.path))
-	
-	def Append(self, *arguments):
-		"return an object with path elements added at the end of this path"
-		return Join(*((self,) + arguments))
-	
-	def Prepend(self, *arguments):
-		"return an object with path elements added at the start of this path"
-		return Join(*(arguments + (self,)))
-	
-	def isDir(self):
-		"test whether this path points to an existing directory"
-		# C: is a directory
-		return (os.path.isdir(self.path) or driveRE.match(self.path))
-	
-	def isFile(self):
-		"test whether this path points to an existing file"
-		return os.path.isfile(self.path)
-
-	def Exists(self):
-		"test whether this path exists in the filesystem"
-		if driveRE.match(self.path):
-			return os.path.exists(self.path + "/")
-		else:
-			return os.path.exists(self.path)
-		
-	def Dir(self):
-		"return an object for the directory part of this path"
-		if driveRE.match(self.path):
-			return Path(self.path)
-		else:
-			return Path(os.path.dirname(self.path))
-
-	def File(self):
-		"return a string for the file part of this path"
-		return os.path.basename(self.path)
-
-	def Components(self):
-		"""return a list of the components of this path."""
-		return self.path.split('/')
-
-	def FindCaseless(self):
-		"""Given a path which may not be not correct in terms of case,
-		search the filesystem to find the corresponding, correct path.
-		paths are assumed to be absolute and normalised (which they
-		should be in this class).
-
-		Assumes that the path is more right than wrong, i.e. starts
-		with the full path and tests for existence - then takes the
-		last component off and check for that.
-
-		This will be inefficient if used in cases where the file 
-		has a high probability of not existing.
-		"""
-
-		if os.path.exists(self.path):
-			return Path(self.path)
-
-		unknown_elements = []
-		tail = self.path
-		head = None
-		while tail != '': 
-			if os.path.exists(tail):
-				break
-			else:
-				(tail,head) = os.path.split(tail)
-				#print "(head,tail) = (%s,%s)\n" % (head,tail)
-				unknown_elements.append(head)
-
-		if tail == None:
-			result = ""
-		else:
-			result = tail
-
-		# Now we know the bits that may be wrong so we can search for them
-		unknown_elements.reverse()
-		for item in unknown_elements:
-			possible = os.path.join(result, item) 
-			if os.path.exists(possible):
-				result = possible
-				continue # not finished yet - only this element is ok
-
-			# Nope, we really do have to search for this component of the path
-			possible = None
-			if result:
-				for file in os.listdir(result):
-					if file.lower() == item.lower():
-						possible = os.path.join(result,file)
-						break # find first matching name (might not be right)
-				if possible is None:
-					result = "" 
-					break # really couldn't find the file
-				result = possible
-
-		if result == "":
-			return None
-
-		return Path(result)
-
-	def From(self,source):
-		"""Returns the relative path from 'source' to here."""
-		list1 = source.Absolute().Components()
-		list2 = self.Absolute().Components()
-
-		# on windows if the drives are different
-		# then the relative path is the absolute one.
-		if isWin and list1[0] != list2[0]:
-			return self.Absolute()
-
-		final_list = []
-		for item in list1:
-			if list2 != []:
-				for widget in list2:
-					if item == widget:
-						list2.pop(0)
-						break
-					else:
-						final_list.insert(0, "..")
-						final_list.append(widget)
-						list2.pop(0)
-						break
-			else:
-				final_list.insert(0, "..")
-
-		final_list.extend(list2)
-
-		return Join(*final_list)
-
-	def GetShellPath(self):
-		"""Returns correct slashes according to os type as a string
-		"""
-		if isWin:
-			if  "OSTYPE" in os.environ and os.environ['OSTYPE'] == "cygwin" :
-				return self.path
-
-			return self.path.replace("/", "\\")
-
-		return self.path
-
-
-# Module functions
-
-def Join(*arguments):
-	"""Concatenate the given list to make a generic path object. 
-	
-	This can accept both strings and Path objects, and join
-	them "intelligently" to make a complete path."""
-	list = []
-	for arg in arguments:
-		if isinstance(arg, Path):
-			list.append(arg.path)
-		else:
-			list.append(arg)
-		
-	return Path(*list)
-
-def CurrentDir():
-	"return a Path object for the current working directory"
-	return Path(os.getcwd())
-
-def NormalisePathList(aList):
-	"""Convert a list of strings into a list of Path objects"""
-	return map(lambda x: Path(x), aList)
-
-def Where(afile):
-	"""Return the location of a file 'afile' in the system path.
-	
-	On windows, adds .exe onto the filename if it's not there. Returns the first location it found or None if it wasn't found.
-	
-	>>> Where("python")
-	"/usr/bin/python"
-	>>> Where("nonexistentfile")
-	None
-	"""
-	location = None
-	if sys.platform.startswith("win"):
-		if not afile.lower().endswith(".exe"):
-			afile += ".exe"
-			
-	for current_file in [os.path.join(loop_number,afile) for loop_number in
-			     os.environ["PATH"].split(os.path.pathsep)]:
-		if os.path.isfile(current_file):
-			location = current_file
-			break
-	return location
-
-# end of generic_path module
+#
+# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# generic_path module
+#
+
+import os
+import sys
+import re
+import types
+
+# are we on windows, and if so what is the current drive letter
+isWin = sys.platform.lower().startswith("win")
+if isWin:
+	drive = re.match('^([A-Za-z]:)',os.getcwd()).group(0)
+
+# regex for "bare" drive letters	
+driveRE = re.compile('^[A-Za-z]:$')
+
+# Base class
+
+class Path:
+	"""This class represents a file path.
+	
+	A generic path object supports operations without needing to know
+	about Windows and Linux differences. The standard str() function can
+	obtain a string version of the path in Local format for use by
+	platform-specific functions (file opening for example).
+	
+	We use forward slashes as path separators (even on Windows).
+	
+	For example,
+	
+		path1 = generic_path.Path("/foo")
+		path2 = generic_path.Path("bar", "bing.bang")
+		
+		print str(path1.Append(path2))
+		
+	Prints /foo/bar/bing.bang		on Linux
+	Prints c:/foo/bar/bing.bang		on Windows (if c is the current drive)
+	""" 
+		
+	def __init__(self, *arguments):
+		"""construct a path from a list of path elements"""
+		
+		if len(arguments) == 0:
+			self.path = ""
+			return
+		
+		list = []
+		for i,arg in enumerate(arguments):
+			if isWin:
+				if i == 0:
+					# If the first element starts with \ or / then we will
+					# add the current drive letter to make a fully absolute path
+					if arg.startswith("\\\\"):
+						list.append(arg) # A UNC path - don't mess with it
+					elif arg.startswith("\\") or arg.startswith("/"):
+						list.append(drive + arg)
+					# If the first element is a bare drive then dress it with a \
+					# temporarily otherwise "join" will not work properly.
+					elif driveRE.match(arg):
+						list.append(arg + "\\")
+					# nothing special about the first element
+					else:
+						list.append(arg)
+				else:
+					if arg.startswith("\\\\"):
+						raise ValueError("non-initial path components must not start with \\\\ : %s" % arg)
+					else:
+						list.append(arg)
+				if ";" in arg:
+					raise ValueError("An individual windows Path may not contain ';' : %s" % arg)
+			else:
+				list.append(arg)
+	
+		self.path = os.path.join(*list)
+		
+		# normalise to avoid nastiness with dots and multiple separators
+		# but do not normalise "" as it will become "."
+		if self.path != "":
+			self.path = os.path.normpath(self.path)
+		
+		# always use forward slashes as separators
+		self.path = self.path.replace("\\", "/")
+		
+		# remove trailing slashes unless we are just /
+		if self.path != "/":
+			self.path = self.path.rstrip("/")
+		
+	def __str__(self):
+		return self.path
+	
+	def GetNeutralStr(self):
+		"""return the path as a string that could be included in other paths."""
+		return self.path.replace(":","").replace("/","")
+
+	def GetLocalString(self):
+		"""return a string in the local file-system format.
+		
+		e.g. C:/tmp on Windows or /C/tmp on Linux"""
+		return self.path
+	
+	def isAbsolute(self):
+		"test whether this path is absolute or relative"
+		# C: is an absolute directory
+		return (os.path.isabs(self.path) or driveRE.match(self.path))
+	
+	def Absolute(self):
+		"""return an object for the absolute version of this path.
+		
+		Prepends the current working directory to relative paths and
+		the current drive (on Windows) to /something type paths."""
+		# leave C: alone as abspath will stick the cwd on
+		if driveRE.match(self.path):
+			return Path(self.path)
+		else:
+			return Path(os.path.abspath(self.path))
+	
+	def Append(self, *arguments):
+		"return an object with path elements added at the end of this path"
+		return Join(*((self,) + arguments))
+	
+	def Prepend(self, *arguments):
+		"return an object with path elements added at the start of this path"
+		return Join(*(arguments + (self,)))
+	
+	def isDir(self):
+		"test whether this path points to an existing directory"
+		# C: is a directory
+		return (os.path.isdir(self.path) or driveRE.match(self.path))
+	
+	def isFile(self):
+		"test whether this path points to an existing file"
+		return os.path.isfile(self.path)
+
+	def Exists(self):
+		"test whether this path exists in the filesystem"
+		if driveRE.match(self.path):
+			return os.path.exists(self.path + "/")
+		else:
+			return os.path.exists(self.path)
+		
+	def Dir(self):
+		"return an object for the directory part of this path"
+		if driveRE.match(self.path):
+			return Path(self.path)
+		else:
+			return Path(os.path.dirname(self.path))
+
+	def File(self):
+		"return a string for the file part of this path"
+		return os.path.basename(self.path)
+
+	def Components(self):
+		"""return a list of the components of this path."""
+		return self.path.split('/')
+
+	def FindCaseless(self):
+		"""Given a path which may not be not correct in terms of case,
+		search the filesystem to find the corresponding, correct path.
+		paths are assumed to be absolute and normalised (which they
+		should be in this class).
+
+		Assumes that the path is more right than wrong, i.e. starts
+		with the full path and tests for existence - then takes the
+		last component off and check for that.
+
+		This will be inefficient if used in cases where the file 
+		has a high probability of not existing.
+		"""
+
+		if os.path.exists(self.path):
+			return Path(self.path)
+
+		unknown_elements = []
+		tail = self.path
+		head = None
+		while tail != '': 
+			if os.path.exists(tail):
+				break
+			else:
+				(tail,head) = os.path.split(tail)
+				#print "(head,tail) = (%s,%s)\n" % (head,tail)
+				unknown_elements.append(head)
+
+		if tail == None:
+			result = ""
+		else:
+			result = tail
+
+		# Now we know the bits that may be wrong so we can search for them
+		unknown_elements.reverse()
+		for item in unknown_elements:
+			possible = os.path.join(result, item) 
+			if os.path.exists(possible):
+				result = possible
+				continue # not finished yet - only this element is ok
+
+			# Nope, we really do have to search for this component of the path
+			possible = None
+			if result:
+				for file in os.listdir(result):
+					if file.lower() == item.lower():
+						possible = os.path.join(result,file)
+						break # find first matching name (might not be right)
+				if possible is None:
+					result = "" 
+					break # really couldn't find the file
+				result = possible
+
+		if result == "":
+			return None
+
+		return Path(result)
+
+	def From(self,source):
+		"""Returns the relative path from 'source' to here."""
+		list1 = source.Absolute().Components()
+		list2 = self.Absolute().Components()
+
+		# on windows if the drives are different
+		# then the relative path is the absolute one.
+		if isWin and list1[0] != list2[0]:
+			return self.Absolute()
+
+		final_list = []
+		for item in list1:
+			if list2 != []:
+				for widget in list2:
+					if item == widget:
+						list2.pop(0)
+						break
+					else:
+						final_list.insert(0, "..")
+						final_list.append(widget)
+						list2.pop(0)
+						break
+			else:
+				final_list.insert(0, "..")
+
+		final_list.extend(list2)
+
+		return Join(*final_list)
+
+	def GetShellPath(self):
+		"""Returns correct slashes according to os type as a string
+		"""
+		if isWin:
+			if  "OSTYPE" in os.environ and os.environ['OSTYPE'] == "cygwin" :
+				return self.path
+
+			return self.path.replace("/", "\\")
+
+		return self.path
+
+
+# Module functions
+
+def Join(*arguments):
+	"""Concatenate the given list to make a generic path object. 
+	
+	This can accept both strings and Path objects, and join
+	them "intelligently" to make a complete path."""
+	list = []
+	for arg in arguments:
+		if isinstance(arg, Path):
+			list.append(arg.path)
+		else:
+			list.append(arg)
+		
+	return Path(*list)
+
+def CurrentDir():
+	"return a Path object for the current working directory"
+	return Path(os.getcwd())
+
+def NormalisePathList(aList):
+	"""Convert a list of strings into a list of Path objects"""
+	return map(lambda x: Path(x), aList)
+
+def Where(afile):
+	"""Return the location of a file 'afile' in the system path.
+	
+	On windows, adds .exe onto the filename if it's not there. Returns the first location it found or None if it wasn't found.
+	
+	>>> Where("python")
+	"/usr/bin/python"
+	>>> Where("nonexistentfile")
+	None
+	"""
+	location = None
+	if sys.platform.startswith("win"):
+		if not afile.lower().endswith(".exe"):
+			afile += ".exe"
+			
+	for current_file in [os.path.join(loop_number,afile) for loop_number in
+			     os.environ["PATH"].split(os.path.pathsep)]:
+		if os.path.isfile(current_file):
+			location = current_file
+			break
+	return location
+
+# end of generic_path module
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/python/mmpparser.py
--- a/sbsv2/raptor/python/mmpparser.py	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/python/mmpparser.py	Mon Nov 16 09:46:46 2009 +0000
@@ -1,388 +1,388 @@
-#
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# MMPParser module
-# This module provides a parser for MMP files which can work
-# with any supplied MMPBackend
-#
-
-
-# We have to define the grammar in the following order:
-# Actions - because the rules reference them
-# Terminals - because the rules use them
-# Rules
-# Root rule - e.g. "an MMP is a list of statements"
-#
-# This seems inverted but it's just the price of
-# being able to use python to define the grammar.
-
-
-from pyparsing import *
-import sys
-
-# For multiline matching we must exclude \n from the list of whitespace
-# characters.  If we don't then Parse Elements like OneOrMore won't stop
-# at line boundaries.
-# \r doesn't matter as it is always followed by \n anyhow it is
-# redundant and may be thrown away without any loss of information.
-ParserElement.setDefaultWhitespaceChars('\t\r ')
-
-
-
-
-## Useful Parse Elements #########################################
-def String():
-	return Regex('[^ \n]+')
-
-def StringList():
-	return Group(OneOrMore(Regex('[^ \n]+')))
-
-def HexOrDecNumber():
-	return Regex('(0[xX][0-9a-fA-Z]+)|([0-9]+)')
-
-def Line(pattern):
-	return pattern.copy() + LineEnd().suppress()
-
-
-
-class MMPParser(object):
-	# Tools for whom options may be specified
-	tools = [ 'ARMCC', 'CW', 'GCC', 'MSVC', 'GCCXML', 'ARMASM', 'GCCE' ]
-
-
-	def __init__(self,statemachine):
-		self.backend = statemachine
-		# Create Tokens for the tools we support
-		self.toolName = CaselessKeyword(MMPParser.tools[0])
-		for thisTool in MMPParser.tools[1:]:
-			self.toolName ^= CaselessKeyword(thisTool)
-
-		self.assignment = \
-			( \
-			Line(CaselessKeyword('ARMFPU') + String()) ^ \
-			Line(CaselessKeyword('ASSPLIBRARY') + StringList()) ^ \
-			Line(CaselessKeyword('CAPABILITY') + StringList()) ^ \
-			Line(CaselessKeyword('DOCUMENT') + StringList()) ^ \
-			Line(CaselessKeyword('EPOCHEAPSIZE') + HexOrDecNumber() + HexOrDecNumber()) ^ \
-			Line(CaselessKeyword('EPOCPROCESSPRIORITY') + String()) ^ \
-			Line(CaselessKeyword('FIRSTLIB') + String()) ^ \
-			Line(CaselessKeyword('TARGET') + String()) ^ \
-			Line(CaselessKeyword('ROMTARGET') + Optional(StringList())) ^ \
-			Line(CaselessKeyword('RAMTARGET') + String()) ^ \
-			Line(CaselessKeyword('TARGETTYPE') + String()) ^ \
-			Line(CaselessKeyword('TARGETPATH') + String()) ^ \
-			Line(CaselessKeyword('SYSTEMINCLUDE') + StringList()) ^ \
-			Line(CaselessKeyword('USERINCLUDE') + StringList()) ^ \
-			Line(CaselessKeyword('DEFFILE') + String()) ^ \
-			Line(CaselessKeyword('EXPORTLIBRARY') + String()) ^ \
-			Line(CaselessKeyword('LINKAS') + String()) ^ \
-			Line(CaselessKeyword('VENDORID') + HexOrDecNumber()) ^ \
-			Line(CaselessKeyword('OPTION') + self.toolName + StringList()) ^ \
-			Line(CaselessKeyword('LINKEROPTION') + self.toolName + StringList()) ^\
-			Line(CaselessKeyword('OPTION_REPLACE') + self.toolName + StringList()) ^ \
-			Line(CaselessKeyword('SECUREID') + HexOrDecNumber()) ^ \
-			Line(CaselessKeyword('EPOCSTACKSIZE') + HexOrDecNumber()) ^ \
-			Line(CaselessKeyword('VERSION') + String() + Optional(CaselessKeyword('EXPLICIT'))) ^ \
-			Line(CaselessKeyword('EPOCPROCESSPRIORITY') + String()) ^ \
-			Line(CaselessKeyword('NEWLIB') + String()) \
-			).setParseAction(self.backend.doAssignment) ^ \
-			( \
-			Line(CaselessKeyword('SOURCE') + StringList()).setParseAction(self.backend.doSourceAssignment) \
-			).setParseAction(self.backend.doSourceAssignment) ^ \
-			( \
-			Line(CaselessKeyword('RESOURCE') + StringList()).setParseAction(self.backend.doOldResourceAssignment) \
-			).setParseAction(self.backend.doOldResourceAssignment) ^ \
-			( \
-			Line(CaselessKeyword('SYSTEMRESOURCE') + StringList()).setParseAction(self.backend.doResourceAssignment) \
-			).setParseAction(self.backend.doOldResourceAssignment) ^ \
-			( \
-			Line(CaselessKeyword('SOURCEPATH') + String()).setParseAction(self.backend.doSourceAssignment) \
-			).setParseAction(self.backend.doSourcePathAssignment) ^ \
-			( \
-			Line((CaselessKeyword('UID') + Group(HexOrDecNumber() + Optional(HexOrDecNumber())))).setParseAction(self.backend.doUIDAssignment) \
-			).setParseAction(self.backend.doUIDAssignment)  ^ \
-			( \
-			Line(CaselessKeyword('LANG') + StringList()) \
-			).setParseAction(self.backend.doAppend) ^ \
-			( \
-			Line(CaselessKeyword('LIBRARY') + StringList()) \
-			).setParseAction(self.backend.doAppend) ^ \
-			( \
-			Line(CaselessKeyword('DEBUGLIBRARY') + StringList()) \
-			).setParseAction(self.backend.doAppend) ^ \
-			( \
-			Line(CaselessKeyword('MACRO') + Optional(StringList())) \
-			).setParseAction(self.backend.doAppend) ^ \
-			( \
-			Line(CaselessKeyword('AIF') + StringList()) \
-			).setParseAction(self.backend.doDeprecated) ^ \
-			( \
-			Line(CaselessKeyword('STATICLIBRARY') + StringList()) \
-			).setParseAction(self.backend.doAppend)
-
-		self.switch = \
-			(Line( \
-			CaselessKeyword('ALWAYS_BUILD_AS_ARM') ^ \
-			CaselessKeyword('ASSPEXPORTS') ^ \
-			CaselessKeyword('ASSPABI') ^ \
-			CaselessKeyword('ASSPEXPORTS') ^ \
-			CaselessKeyword('DEBUGGABLE') ^ \
-			CaselessKeyword('DEBUGGABLE_UDEBONLY') ^ \
-			CaselessKeyword('EPOCALLOWDLLDATA') ^ \
-			CaselessKeyword('EPOCCALLDLLENTRYPOINTS') ^ \
-			CaselessKeyword('EPOCFIXEDPROCESS') ^ \
-			CaselessKeyword('EXPORTUNFROZEN') ^ \
-			CaselessKeyword('FEATUREVARIANT') ^ \
-			CaselessKeyword('BYTEPAIRCOMPRESSTARGET') ^ \
-			CaselessKeyword('INFLATECOMPRESSTARGET') ^ \
-			CaselessKeyword('NOCOMPRESSTARGET') ^ \
-			CaselessKeyword('NOLINKTIMECODEGENERATION') ^ \
-			CaselessKeyword('NOMULTIFILECOMPILATION') ^ \
-			CaselessKeyword('COMPRESSTARGET') ^ \
-			CaselessKeyword('NOEXPORTLIBRARY') ^ \
-			CaselessKeyword('NOSTRICTDEF') ^ \
-			CaselessKeyword('SRCDBG') ^ \
-			CaselessKeyword('STRICTDEPEND') ^ \
-			CaselessKeyword('STDCPP') ^ \
-			CaselessKeyword('NOSTDCPP') ^ \
-			CaselessKeyword('SMPSAFE') ^ \
-			CaselessKeyword('PAGED') ^ \
-			CaselessKeyword('PAGEDCODE') ^ \
-			CaselessKeyword('PAGEDDATA') ^ \
-			CaselessKeyword('UNPAGED') ^ \
-			CaselessKeyword('UNPAGEDCODE') ^ \
-			CaselessKeyword('UNPAGEDDATA') ^ \
-			CaselessKeyword('WCHARENTRYPOINT') \
-			)).setParseAction(self.backend.doSetSwitch)
-
-		# General
-
-		self.blankline = (LineStart() + Regex('[\t\r ]*') + LineEnd().suppress() \
-			).setParseAction(self.backend.doBlankLine)
-
-		self.preProcessorComment = (LineStart() + Regex('# .*') + LineEnd().suppress() 
-			).setParseAction(self.backend.doPreProcessorComment)
-
-		self.unknownstatement = (LineStart() + Regex('.*\S+') + LineEnd().suppress() \
-			).setParseAction(self.backend.doUnknownStatement)
-			
-		self.unknownBlockBody = (\
-			(Regex("[^\n]+?\s*") + LineEnd().suppress()).setParseAction(self.backend.doStartUnknown) + \
-			ZeroOrMore(self.unknownstatement) \
-			).setParseAction(self.backend.doEndUnknown) 
-
-		# Platform
-
-		self.ARMCCBlockStatement = \
-			self.blankline ^ self.preProcessorComment ^ \
-			Line( \
-			CaselessKeyword('ARMRT') ^ \
-			CaselessKeyword('ARMINC') \
-			).setParseAction(self.backend.doSetSwitch) ^ \
-			Line( \
-			(CaselessKeyword('ARMLIBS') + StringList()) \
-			).setParseAction(self.backend.doAppend)
-
-		self.WINSBlockStatement = \
-			self.blankline ^ self.preProcessorComment ^ \
-			Line( \
-			(CaselessKeyword('BASEADDRESS') + HexOrDecNumber()) \
-			).setParseAction(self.backend.doAssignment) ^ \
-			Line( \
-			(CaselessKeyword('WIN32_LIBRARY') + StringList()) \
-			).setParseAction(self.backend.doAppend) ^ \
-			Line( \
-			(CaselessKeyword('WIN32_RESOURCE') + StringList()) \
-			).setParseAction(self.backend.doAppend) ^ \
-			Line( \
-			CaselessKeyword('WIN32_HEADERS') ^ \
-			CaselessKeyword('COPY_FOR_STATIC_LINKAGE')			
-			).setParseAction(self.backend.doSetSwitch)
-
-		self.TOOLSBlockStatement = \
-			self.blankline ^ self.preProcessorComment ^ \
-			Line( \
-			(CaselessKeyword('WIN32_LIBRARY') + StringList()) \
-			).setParseAction(self.backend.doAppend)
-
-		self.platformBlock = ( \
-			((CaselessKeyword('ARMCC') + LineEnd().suppress()).setParseAction(self.backend.doStartPlatform) + ZeroOrMore(self.ARMCCBlockStatement)) ^ \
-			((CaselessKeyword('WINS') + LineEnd().suppress()).setParseAction(self.backend.doStartPlatform) + ZeroOrMore(self.WINSBlockStatement)) ^ \
-			((CaselessKeyword('WINSCW') + LineEnd().suppress()).setParseAction(self.backend.doStartPlatform) + ZeroOrMore(self.WINSBlockStatement)) ^ \
-			(CaselessKeyword('MARM') + LineEnd().suppress()).setParseAction(self.backend.doStartPlatform) ^ \
-			((CaselessKeyword('TOOLS') + LineEnd().suppress()).setParseAction(self.backend.doStartPlatform) + ZeroOrMore(self.TOOLSBlockStatement)) ^ \
-			(CaselessKeyword('WINC') + LineEnd().suppress()).setParseAction(self.backend.doStartPlatform) + ZeroOrMore(self.WINSBlockStatement) \
-			).setParseAction(self.backend.doEndPlatform)
-
-		# Resource
-			
-		self.resourceSetting= \
-			self.blankline ^ self.preProcessorComment ^ \
-			Line( \
-			(CaselessKeyword('TARGET') + String()) ^ \
-			(CaselessKeyword('TARGETPATH') + String()) ^ \
-			(CaselessKeyword('UID') + HexOrDecNumber()) \
-			).setParseAction(self.backend.doResourceAssignment) ^ \
-			Line( \
-			(CaselessKeyword('DEPENDS') + StringList()) ^ \
-			(CaselessKeyword('LANG') + StringList()) \
-			).setParseAction(self.backend.doResourceAppend) ^ \
-			Line( \
-			CaselessKeyword('HEADER') ^ \
-			CaselessKeyword('HEADERONLY')
-			).setParseAction(self.backend.doResourceSetSwitch)
-
-		self.resourceBlockBody = (\
-			(CaselessKeyword('RESOURCE') + String() + LineEnd().suppress()).setParseAction(self.backend.doStartResource) \
-			 + ZeroOrMore(self.resourceSetting) \
-			).setParseAction(self.backend.doEndResource)
-
-		# Bitmap
-
-		self.bitmapSetting = \
-			self.blankline ^ self.preProcessorComment ^ \
-			Line( \
-			(CaselessKeyword('TARGETPATH') + String()) \
-			).setParseAction(self.backend.doBitmapAssignment) ^\
-			Line( \
-			(CaselessKeyword('SOURCE') + StringList()) 
-			).setParseAction(self.backend.doBitmapSourceAssignment) ^\
-			Line( \
-			(CaselessKeyword('SOURCEPATH') + String()) 
-			).setParseAction(self.backend.doBitmapSourcePathAssignment) ^\
-			Line( \
-			CaselessKeyword('HEADER')
-			).setParseAction(self.backend.doBitmapSetSwitch)
-			
-		self.bitmapBlockBody = (\
-			(CaselessKeyword('BITMAP') + String() + LineEnd().suppress()).setParseAction(self.backend.doStartBitmap) + \
-			ZeroOrMore(self.bitmapSetting) \
-			).setParseAction(self.backend.doEndBitmap)
-			
-		# Stringtable
-		
-		self.stringTableSetting = \
-			self.blankline ^ self.preProcessorComment ^ \
-			Line( \
-			(CaselessKeyword('EXPORTPATH') + String())		
-			).setParseAction(self.backend.doStringTableAssignment) ^\
-			Line( \
-			CaselessKeyword('HEADERONLY') \
-			).setParseAction(self.backend.doStringTableSetSwitch)
-			
-		self.stringTableBlockBody = (\
-			(CaselessKeyword('STRINGTABLE') + String() + LineEnd().suppress()).setParseAction(self.backend.doStartStringTable) + \
-			ZeroOrMore(self.stringTableSetting) \
-			).setParseAction(self.backend.doEndStringTable)		
-
-		# Top-level
-		self.block = \
-			LineStart() + CaselessLiteral("START") + White().suppress() + \
-			(self.platformBlock ^ self.resourceBlockBody ^ self.bitmapBlockBody ^ self.stringTableBlockBody ^self.unknownBlockBody) +  \
-			LineStart() + CaselessLiteral("END") + LineEnd().suppress()
-					
-
-		self.command = \
-			 self.assignment ^ self.switch
-	
-		# Unknown blocks and statements are ordered i.e. if there's a failure to match something before,
-		# then they're "caught" appropriately
-		
-		self.mmp = (ZeroOrMore(self.preProcessorComment ^ self.blankline ^ self.block ^ self.command ^ self.unknownstatement)).setParseAction(self.backend.doMMP) 
-
-
-## MMP Parsing Backends #########################################
-class MMPBackend(object):
-	"""A "backend" for the MMP language
-	This may be used to implement a build system,
-	source analysis tool or anything else"""
-	def __init__(self):
-		super(MMPBackend,self).__init__()
-	def doPreProcessorComment(self,s,loc,toks):
-		return "OK"
-	
-	def doStartPlatform(self,s,loc,toks):
-		return "OK"
-	def doEndPlatform(self,s,loc,toks):
-		return "OK"
-
-	def doStartResource(self,s,loc,toks):
-		return "OK"
-	def doResourceAssignment(self,s,loc,toks):
-		return "OK"
-	def doResourceAppend(self,s,loc,toks):
-		return "OK"
-	def doResourceSetSwitch(self,s,loc,toks):
-		return "OK"	
-	def doEndResource(self,s,loc,toks):
-		return "OK"
-
-	def doStartBitmap(self,s,loc,toks):
-		return "OK" 
-	def doBitmapAssignment(self,s,loc,toks):
-		return "OK" 
-	def doBitmapSourceAssignment(self,s,loc,toks):
-		return "OK" 
-	def doBitmapSourcePathAssignment(self,s,loc,toks):
-		return "OK" 
-	def doBitmapSetSwitch(self,s,loc,toks):
-		return "OK" 
-	def doEndBitmap(self,s,loc,toks):
-		return "OK"
-
-	def doStartStringtable(self,s,loc,toks):
-		return "OK" 
-	def doStringTableAssignment(self,s,loc,toks):
-		return "OK" 
-	def doStringTableSetSwitch(self,s,loc,toks):
-		return "OK" 	
-	def doEndStringtable(self,s,loc,toks):
-		return "OK"
-
-	def doSetSwitch(self,s,loc,toks):
-		return "OK"
-	def doAppend(self,s,loc,toks):
-		return "OK"
-	def doAssignment(self,s,loc,toks):
-		return "OK"
-	def doUIDAssignment(self,s,loc,toks):
-		return "OK"
-	def doSourcePathAssignment(self,s,loc,toks):
-		return "OK"
-	def doSourceAssignment(self,s,loc,toks):
-		return "OK"
-	
-	def doOldResourceAssignment(self,s,loc,toks):
-		return "OK"
-	
-	def doUnknownStatement(self,s,loc,toks):
-		return "OK"
-	def doStartUnknown(self,s,loc,toks):
-		return "OK"
-	def doEndUnknown(self,s,loc,toks):
-		return "OK"
-	
-	def doBlankLine(self,s,loc,toks):
-		return "OK"
-	
-	def doDeprecated(self,s,loc,toks):
-		return "OK"
-		
-	def doNothing(self):
-		return "OK"
-	
-	def doMMP(self,s,loc,toks):
-		return "MMP"
-
-
+#
+# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# MMPParser module
+# This module provides a parser for MMP files which can work
+# with any supplied MMPBackend
+#
+
+
+# We have to define the grammar in the following order:
+# Actions - because the rules reference them
+# Terminals - because the rules use them
+# Rules
+# Root rule - e.g. "an MMP is a list of statements"
+#
+# This seems inverted but it's just the price of
+# being able to use python to define the grammar.
+
+
+from pyparsing import *
+import sys
+
+# For multiline matching we must exclude \n from the list of whitespace
+# characters.  If we don't then Parse Elements like OneOrMore won't stop
+# at line boundaries.
+# \r doesn't matter as it is always followed by \n anyhow it is
+# redundant and may be thrown away without any loss of information.
+ParserElement.setDefaultWhitespaceChars('\t\r ')
+
+
+
+
+## Useful Parse Elements #########################################
+def String():
+	return Regex('[^ \n]+')
+
+def StringList():
+	return Group(OneOrMore(Regex('[^ \n]+')))
+
+def HexOrDecNumber():
+	return Regex('(0[xX][0-9a-fA-Z]+)|([0-9]+)')
+
+def Line(pattern):
+	return pattern.copy() + LineEnd().suppress()
+
+
+
+class MMPParser(object):
+	# Tools for whom options may be specified
+	tools = [ 'ARMCC', 'CW', 'GCC', 'MSVC', 'GCCXML', 'ARMASM', 'GCCE' ]
+
+
+	def __init__(self,statemachine):
+		self.backend = statemachine
+		# Create Tokens for the tools we support
+		self.toolName = CaselessKeyword(MMPParser.tools[0])
+		for thisTool in MMPParser.tools[1:]:
+			self.toolName ^= CaselessKeyword(thisTool)
+
+		self.assignment = \
+			( \
+			Line(CaselessKeyword('ARMFPU') + String()) ^ \
+			Line(CaselessKeyword('ASSPLIBRARY') + StringList()) ^ \
+			Line(CaselessKeyword('CAPABILITY') + StringList()) ^ \
+			Line(CaselessKeyword('DOCUMENT') + StringList()) ^ \
+			Line(CaselessKeyword('EPOCHEAPSIZE') + HexOrDecNumber() + HexOrDecNumber()) ^ \
+			Line(CaselessKeyword('EPOCPROCESSPRIORITY') + String()) ^ \
+			Line(CaselessKeyword('FIRSTLIB') + String()) ^ \
+			Line(CaselessKeyword('TARGET') + String()) ^ \
+			Line(CaselessKeyword('ROMTARGET') + Optional(StringList())) ^ \
+			Line(CaselessKeyword('RAMTARGET') + String()) ^ \
+			Line(CaselessKeyword('TARGETTYPE') + String()) ^ \
+			Line(CaselessKeyword('TARGETPATH') + String()) ^ \
+			Line(CaselessKeyword('SYSTEMINCLUDE') + StringList()) ^ \
+			Line(CaselessKeyword('USERINCLUDE') + StringList()) ^ \
+			Line(CaselessKeyword('DEFFILE') + String()) ^ \
+			Line(CaselessKeyword('EXPORTLIBRARY') + String()) ^ \
+			Line(CaselessKeyword('LINKAS') + String()) ^ \
+			Line(CaselessKeyword('VENDORID') + HexOrDecNumber()) ^ \
+			Line(CaselessKeyword('OPTION') + self.toolName + StringList()) ^ \
+			Line(CaselessKeyword('LINKEROPTION') + self.toolName + StringList()) ^\
+			Line(CaselessKeyword('OPTION_REPLACE') + self.toolName + StringList()) ^ \
+			Line(CaselessKeyword('SECUREID') + HexOrDecNumber()) ^ \
+			Line(CaselessKeyword('EPOCSTACKSIZE') + HexOrDecNumber()) ^ \
+			Line(CaselessKeyword('VERSION') + String() + Optional(CaselessKeyword('EXPLICIT'))) ^ \
+			Line(CaselessKeyword('EPOCPROCESSPRIORITY') + String()) ^ \
+			Line(CaselessKeyword('NEWLIB') + String()) \
+			).setParseAction(self.backend.doAssignment) ^ \
+			( \
+			Line(CaselessKeyword('SOURCE') + StringList()).setParseAction(self.backend.doSourceAssignment) \
+			).setParseAction(self.backend.doSourceAssignment) ^ \
+			( \
+			Line(CaselessKeyword('RESOURCE') + StringList()).setParseAction(self.backend.doOldResourceAssignment) \
+			).setParseAction(self.backend.doOldResourceAssignment) ^ \
+			( \
+			Line(CaselessKeyword('SYSTEMRESOURCE') + StringList()).setParseAction(self.backend.doResourceAssignment) \
+			).setParseAction(self.backend.doOldResourceAssignment) ^ \
+			( \
+			Line(CaselessKeyword('SOURCEPATH') + String()).setParseAction(self.backend.doSourceAssignment) \
+			).setParseAction(self.backend.doSourcePathAssignment) ^ \
+			( \
+			Line((CaselessKeyword('UID') + Group(HexOrDecNumber() + Optional(HexOrDecNumber())))).setParseAction(self.backend.doUIDAssignment) \
+			).setParseAction(self.backend.doUIDAssignment)  ^ \
+			( \
+			Line(CaselessKeyword('LANG') + StringList()) \
+			).setParseAction(self.backend.doAppend) ^ \
+			( \
+			Line(CaselessKeyword('LIBRARY') + StringList()) \
+			).setParseAction(self.backend.doAppend) ^ \
+			( \
+			Line(CaselessKeyword('DEBUGLIBRARY') + StringList()) \
+			).setParseAction(self.backend.doAppend) ^ \
+			( \
+			Line(CaselessKeyword('MACRO') + Optional(StringList())) \
+			).setParseAction(self.backend.doAppend) ^ \
+			( \
+			Line(CaselessKeyword('AIF') + StringList()) \
+			).setParseAction(self.backend.doDeprecated) ^ \
+			( \
+			Line(CaselessKeyword('STATICLIBRARY') + StringList()) \
+			).setParseAction(self.backend.doAppend)
+
+		self.switch = \
+			(Line( \
+			CaselessKeyword('ALWAYS_BUILD_AS_ARM') ^ \
+			CaselessKeyword('ASSPEXPORTS') ^ \
+			CaselessKeyword('ASSPABI') ^ \
+			CaselessKeyword('ASSPEXPORTS') ^ \
+			CaselessKeyword('DEBUGGABLE') ^ \
+			CaselessKeyword('DEBUGGABLE_UDEBONLY') ^ \
+			CaselessKeyword('EPOCALLOWDLLDATA') ^ \
+			CaselessKeyword('EPOCCALLDLLENTRYPOINTS') ^ \
+			CaselessKeyword('EPOCFIXEDPROCESS') ^ \
+			CaselessKeyword('EXPORTUNFROZEN') ^ \
+			CaselessKeyword('FEATUREVARIANT') ^ \
+			CaselessKeyword('BYTEPAIRCOMPRESSTARGET') ^ \
+			CaselessKeyword('INFLATECOMPRESSTARGET') ^ \
+			CaselessKeyword('NOCOMPRESSTARGET') ^ \
+			CaselessKeyword('NOLINKTIMECODEGENERATION') ^ \
+			CaselessKeyword('NOMULTIFILECOMPILATION') ^ \
+			CaselessKeyword('COMPRESSTARGET') ^ \
+			CaselessKeyword('NOEXPORTLIBRARY') ^ \
+			CaselessKeyword('NOSTRICTDEF') ^ \
+			CaselessKeyword('SRCDBG') ^ \
+			CaselessKeyword('STRICTDEPEND') ^ \
+			CaselessKeyword('STDCPP') ^ \
+			CaselessKeyword('NOSTDCPP') ^ \
+			CaselessKeyword('SMPSAFE') ^ \
+			CaselessKeyword('PAGED') ^ \
+			CaselessKeyword('PAGEDCODE') ^ \
+			CaselessKeyword('PAGEDDATA') ^ \
+			CaselessKeyword('UNPAGED') ^ \
+			CaselessKeyword('UNPAGEDCODE') ^ \
+			CaselessKeyword('UNPAGEDDATA') ^ \
+			CaselessKeyword('WCHARENTRYPOINT') \
+			)).setParseAction(self.backend.doSetSwitch)
+
+		# General
+
+		self.blankline = (LineStart() + Regex('[\t\r ]*') + LineEnd().suppress() \
+			).setParseAction(self.backend.doBlankLine)
+
+		self.preProcessorComment = (LineStart() + Regex('# .*') + LineEnd().suppress() 
+			).setParseAction(self.backend.doPreProcessorComment)
+
+		self.unknownstatement = (LineStart() + Regex('.*\S+') + LineEnd().suppress() \
+			).setParseAction(self.backend.doUnknownStatement)
+			
+		self.unknownBlockBody = (\
+			(Regex("[^\n]+?\s*") + LineEnd().suppress()).setParseAction(self.backend.doStartUnknown) + \
+			ZeroOrMore(self.unknownstatement) \
+			).setParseAction(self.backend.doEndUnknown) 
+
+		# Platform
+
+		self.ARMCCBlockStatement = \
+			self.blankline ^ self.preProcessorComment ^ \
+			Line( \
+			CaselessKeyword('ARMRT') ^ \
+			CaselessKeyword('ARMINC') \
+			).setParseAction(self.backend.doSetSwitch) ^ \
+			Line( \
+			(CaselessKeyword('ARMLIBS') + StringList()) \
+			).setParseAction(self.backend.doAppend)
+
+		self.WINSBlockStatement = \
+			self.blankline ^ self.preProcessorComment ^ \
+			Line( \
+			(CaselessKeyword('BASEADDRESS') + HexOrDecNumber()) \
+			).setParseAction(self.backend.doAssignment) ^ \
+			Line( \
+			(CaselessKeyword('WIN32_LIBRARY') + StringList()) \
+			).setParseAction(self.backend.doAppend) ^ \
+			Line( \
+			(CaselessKeyword('WIN32_RESOURCE') + StringList()) \
+			).setParseAction(self.backend.doAppend) ^ \
+			Line( \
+			CaselessKeyword('WIN32_HEADERS') ^ \
+			CaselessKeyword('COPY_FOR_STATIC_LINKAGE')			
+			).setParseAction(self.backend.doSetSwitch)
+
+		self.TOOLSBlockStatement = \
+			self.blankline ^ self.preProcessorComment ^ \
+			Line( \
+			(CaselessKeyword('WIN32_LIBRARY') + StringList()) \
+			).setParseAction(self.backend.doAppend)
+
+		self.platformBlock = ( \
+			((CaselessKeyword('ARMCC') + LineEnd().suppress()).setParseAction(self.backend.doStartPlatform) + ZeroOrMore(self.ARMCCBlockStatement)) ^ \
+			((CaselessKeyword('WINS') + LineEnd().suppress()).setParseAction(self.backend.doStartPlatform) + ZeroOrMore(self.WINSBlockStatement)) ^ \
+			((CaselessKeyword('WINSCW') + LineEnd().suppress()).setParseAction(self.backend.doStartPlatform) + ZeroOrMore(self.WINSBlockStatement)) ^ \
+			(CaselessKeyword('MARM') + LineEnd().suppress()).setParseAction(self.backend.doStartPlatform) ^ \
+			((CaselessKeyword('TOOLS') + LineEnd().suppress()).setParseAction(self.backend.doStartPlatform) + ZeroOrMore(self.TOOLSBlockStatement)) ^ \
+			(CaselessKeyword('WINC') + LineEnd().suppress()).setParseAction(self.backend.doStartPlatform) + ZeroOrMore(self.WINSBlockStatement) \
+			).setParseAction(self.backend.doEndPlatform)
+
+		# Resource
+			
+		self.resourceSetting= \
+			self.blankline ^ self.preProcessorComment ^ \
+			Line( \
+			(CaselessKeyword('TARGET') + String()) ^ \
+			(CaselessKeyword('TARGETPATH') + String()) ^ \
+			(CaselessKeyword('UID') + HexOrDecNumber()) \
+			).setParseAction(self.backend.doResourceAssignment) ^ \
+			Line( \
+			(CaselessKeyword('DEPENDS') + StringList()) ^ \
+			(CaselessKeyword('LANG') + StringList()) \
+			).setParseAction(self.backend.doResourceAppend) ^ \
+			Line( \
+			CaselessKeyword('HEADER') ^ \
+			CaselessKeyword('HEADERONLY')
+			).setParseAction(self.backend.doResourceSetSwitch)
+
+		self.resourceBlockBody = (\
+			(CaselessKeyword('RESOURCE') + String() + LineEnd().suppress()).setParseAction(self.backend.doStartResource) \
+			 + ZeroOrMore(self.resourceSetting) \
+			).setParseAction(self.backend.doEndResource)
+
+		# Bitmap
+
+		self.bitmapSetting = \
+			self.blankline ^ self.preProcessorComment ^ \
+			Line( \
+			(CaselessKeyword('TARGETPATH') + String()) \
+			).setParseAction(self.backend.doBitmapAssignment) ^\
+			Line( \
+			(CaselessKeyword('SOURCE') + StringList()) 
+			).setParseAction(self.backend.doBitmapSourceAssignment) ^\
+			Line( \
+			(CaselessKeyword('SOURCEPATH') + String()) 
+			).setParseAction(self.backend.doBitmapSourcePathAssignment) ^\
+			Line( \
+			CaselessKeyword('HEADER')
+			).setParseAction(self.backend.doBitmapSetSwitch)
+			
+		self.bitmapBlockBody = (\
+			(CaselessKeyword('BITMAP') + String() + LineEnd().suppress()).setParseAction(self.backend.doStartBitmap) + \
+			ZeroOrMore(self.bitmapSetting) \
+			).setParseAction(self.backend.doEndBitmap)
+			
+		# Stringtable
+		
+		self.stringTableSetting = \
+			self.blankline ^ self.preProcessorComment ^ \
+			Line( \
+			(CaselessKeyword('EXPORTPATH') + String())		
+			).setParseAction(self.backend.doStringTableAssignment) ^\
+			Line( \
+			CaselessKeyword('HEADERONLY') \
+			).setParseAction(self.backend.doStringTableSetSwitch)
+			
+		self.stringTableBlockBody = (\
+			(CaselessKeyword('STRINGTABLE') + String() + LineEnd().suppress()).setParseAction(self.backend.doStartStringTable) + \
+			ZeroOrMore(self.stringTableSetting) \
+			).setParseAction(self.backend.doEndStringTable)		
+
+		# Top-level
+		self.block = \
+			LineStart() + CaselessLiteral("START") + White().suppress() + \
+			(self.platformBlock ^ self.resourceBlockBody ^ self.bitmapBlockBody ^ self.stringTableBlockBody ^self.unknownBlockBody) +  \
+			LineStart() + CaselessLiteral("END") + LineEnd().suppress()
+					
+
+		self.command = \
+			 self.assignment ^ self.switch
+	
+		# Unknown blocks and statements are ordered i.e. if there's a failure to match something before,
+		# then they're "caught" appropriately
+		
+		self.mmp = (ZeroOrMore(self.preProcessorComment ^ self.blankline ^ self.block ^ self.command ^ self.unknownstatement)).setParseAction(self.backend.doMMP) 
+
+
+## MMP Parsing Backends #########################################
+class MMPBackend(object):
+	"""A "backend" for the MMP language
+	This may be used to implement a build system,
+	source analysis tool or anything else"""
+	def __init__(self):
+		super(MMPBackend,self).__init__()
+	def doPreProcessorComment(self,s,loc,toks):
+		return "OK"
+	
+	def doStartPlatform(self,s,loc,toks):
+		return "OK"
+	def doEndPlatform(self,s,loc,toks):
+		return "OK"
+
+	def doStartResource(self,s,loc,toks):
+		return "OK"
+	def doResourceAssignment(self,s,loc,toks):
+		return "OK"
+	def doResourceAppend(self,s,loc,toks):
+		return "OK"
+	def doResourceSetSwitch(self,s,loc,toks):
+		return "OK"	
+	def doEndResource(self,s,loc,toks):
+		return "OK"
+
+	def doStartBitmap(self,s,loc,toks):
+		return "OK" 
+	def doBitmapAssignment(self,s,loc,toks):
+		return "OK" 
+	def doBitmapSourceAssignment(self,s,loc,toks):
+		return "OK" 
+	def doBitmapSourcePathAssignment(self,s,loc,toks):
+		return "OK" 
+	def doBitmapSetSwitch(self,s,loc,toks):
+		return "OK" 
+	def doEndBitmap(self,s,loc,toks):
+		return "OK"
+
+	def doStartStringtable(self,s,loc,toks):
+		return "OK" 
+	def doStringTableAssignment(self,s,loc,toks):
+		return "OK" 
+	def doStringTableSetSwitch(self,s,loc,toks):
+		return "OK" 	
+	def doEndStringtable(self,s,loc,toks):
+		return "OK"
+
+	def doSetSwitch(self,s,loc,toks):
+		return "OK"
+	def doAppend(self,s,loc,toks):
+		return "OK"
+	def doAssignment(self,s,loc,toks):
+		return "OK"
+	def doUIDAssignment(self,s,loc,toks):
+		return "OK"
+	def doSourcePathAssignment(self,s,loc,toks):
+		return "OK"
+	def doSourceAssignment(self,s,loc,toks):
+		return "OK"
+	
+	def doOldResourceAssignment(self,s,loc,toks):
+		return "OK"
+	
+	def doUnknownStatement(self,s,loc,toks):
+		return "OK"
+	def doStartUnknown(self,s,loc,toks):
+		return "OK"
+	def doEndUnknown(self,s,loc,toks):
+		return "OK"
+	
+	def doBlankLine(self,s,loc,toks):
+		return "OK"
+	
+	def doDeprecated(self,s,loc,toks):
+		return "OK"
+		
+	def doNothing(self):
+		return "OK"
+	
+	def doMMP(self,s,loc,toks):
+		return "MMP"
+
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/python/pluginbox.py
--- a/sbsv2/raptor/python/pluginbox.py	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/python/pluginbox.py	Mon Nov 16 09:46:46 2009 +0000
@@ -1,68 +1,68 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# PluginBox module - finds classes 
-#
-
-from os import listdir
-import re
-from types import TypeType, ModuleType
-import sys
-
-class PluginModule(object):
-	"""Represents a module containing plugin classes """
-	def __init__(self, file):
-		self.module = __import__(file)
-		self.classes = []
-		self.__findclasses(self.module)
-
-	def __findclasses(self,module):
-		for c in module.__dict__:
-			mbr = module.__dict__[c]
-			if type(mbr) == TypeType:
-				self.classes.append(mbr)
-
-class PluginBox(object):
-	"""
-	A container that locates all the classes in a directory.
-	Example usage:
-
-		from person import Person
-		ps = PluginBox("plugins")
-		people = []
-		for i in ps.classesof(Person):
-			people.append(i())
-
-	"""
-	plugfilenamere=re.compile('^(.*)\.py$',re.I)
-	def __init__(self, plugindirectory):
-		self.pluginlist = []
-		self.plugindir = plugindirectory
-		sys.path.append(str(self.plugindir))
-		for f in listdir(plugindirectory):
-			m = PluginBox.plugfilenamere.match(f)
-			if m is not None:
-				self.pluginlist.append(PluginModule(m.groups()[0]))
-		sys.path = sys.path[:-1]
-
-	def classesof(self, classtype):
-		"""return a list of all classes that are subclasses of """
-		classes = []
-		for p in self.pluginlist:
-			for c in p.classes:
-				if issubclass(c, classtype):
-					if c.__name__ != classtype.__name__:
-						classes.append(c)
-		return classes
-
+#
+# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# PluginBox module - finds classes 
+#
+
+from os import listdir
+import re
+from types import TypeType, ModuleType
+import sys
+
+class PluginModule(object):
+	"""Represents a module containing plugin classes """
+	def __init__(self, file):
+		self.module = __import__(file)
+		self.classes = []
+		self.__findclasses(self.module)
+
+	def __findclasses(self,module):
+		for c in module.__dict__:
+			mbr = module.__dict__[c]
+			if type(mbr) == TypeType:
+				self.classes.append(mbr)
+
+class PluginBox(object):
+	"""
+	A container that locates all the classes in a directory.
+	Example usage:
+
+		from person import Person
+		ps = PluginBox("plugins")
+		people = []
+		for i in ps.classesof(Person):
+			people.append(i())
+
+	"""
+	plugfilenamere=re.compile('^(.*)\.py$',re.I)
+	def __init__(self, plugindirectory):
+		self.pluginlist = []
+		self.plugindir = plugindirectory
+		sys.path.append(str(self.plugindir))
+		for f in listdir(plugindirectory):
+			m = PluginBox.plugfilenamere.match(f)
+			if m is not None:
+				self.pluginlist.append(PluginModule(m.groups()[0]))
+		sys.path = sys.path[:-1]
+
+	def classesof(self, classtype):
+		"""return a list of all classes that are subclasses of """
+		classes = []
+		for p in self.pluginlist:
+			for c in p.classes:
+				if issubclass(c, classtype):
+					if c.__name__ != classtype.__name__:
+						classes.append(c)
+		return classes
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/python/plugins/dummyplugin.py
--- a/sbsv2/raptor/python/plugins/dummyplugin.py	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/python/plugins/dummyplugin.py	Mon Nov 16 09:46:46 2009 +0000
@@ -1,22 +1,22 @@
-#
-# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# Test plugin
-#
-
-
-class DummyPlugin(object):
-	def __init__(self):
-		print "DummyPlugin Init"
-
+#
+# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# Test plugin
+#
+
+
+class DummyPlugin(object):
+	def __init__(self):
+		print "DummyPlugin Init"
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/python/plugins/filter_carbide.py
--- a/sbsv2/raptor/python/plugins/filter_carbide.py	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/python/plugins/filter_carbide.py	Mon Nov 16 09:46:46 2009 +0000
@@ -1,133 +1,133 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# Format Raptor verbose log output for the Carbide IDE
-#
-
-
-import os
-import re
-import sys
-import raptor
-import filter_interface
-import filter_utils
-
-
-class FilterCarbide(filter_interface.Filter):
-	"""Carbide IDE filter
-	Strips most verbose output leaving tools calls, tool output and formatted errors/warnings."""
-	
-	# ignore all general, benign, make output
-	ignore = re.compile('(make(\.exe)?: Nothing to be done for \`.+\'|make(\.exe)?: \[.+\] Error \d+ \(ignored\)|.*make(.exe)?\[\d\]: (Entering|Leaving) directory \`.+\')')
-	
-	stdout = filter_utils.AutoFlushedStream(sys.stdout)
-	stderr = filter_utils.AutoFlushedStream(sys.stderr)
-	
-	recipeFactory = filter_utils.RecipeFactory()
-	
-	def __init__(self):
-		self.__errors = 0
-		self.__warnings = 0
-		self.__recipe = None
-
-	def open(self, aRaptorInstance):
-		return True
-		
-	def write(self, aLine):
-		"""Process output on the fly and format appropriately for the Carbide IDE.
-		Most verbose output is discarded leaving tools calls, tool output and formatted errors
-		and warnings.
-		Identified errors go to stderr so that they will be highlighted in the IDE console."""
-		
-		if FilterCarbide.ignore.match(aLine):
-			return
-		
-		logHeader = filter_utils.logHeader.match(aLine)
-		if logHeader:
-			FilterCarbide.stdout.write("sbs version: " + logHeader.group("version")+"\n\n")
-			return
-		
-		clean = filter_utils.clean.match(aLine)
-		if clean:
-			for file in clean.group("removals").split():
-				FilterCarbide.stdout.write("clean: " + file + "\n")
-			return
-		
-		exports = filter_utils.exports.match(aLine)
-		if exports:
-			FilterCarbide.stdout.write("export: " + exports.group("source") + " to " + exports.group("destination") + "\n")
-			return
-		
-		
-		if self.__recipe:
-			self.__recipe.addLine(aLine)
-			
-			if self.__recipe.isComplete():
-				for call in self.__recipe.getCalls():
-					FilterCarbide.stdout.write(call + "\n")				
-		else:		
-			logTag = filter_utils.logTag.match(aLine)
-			if logTag:
-				tagName = logTag.group("name")			
-				if tagName == "recipe":
-					if self.__recipe:
-						self.__recipe.addLine(aLine)
-					else:
-						self.__recipe = FilterCarbide.recipeFactory.newRecipe(aLine)						
-				elif tagName == "error":
-					self.__errors += 1
-					FilterCarbide.stderr.write("Error: " + filter_utils.logTag.sub("", aLine) + "\n")
-				elif tagName == "warning":
-					self.__warnings += 1
-					FilterCarbide.stdout.write("Warning: " + filter_utils.logTag.sub("", aLine) + "\n")
-				# we're not interested in any other tagged output
-				return
-			else:
-				# Not a recipe, and not tagged output that we know about.
-				# Output this anyway, just in case it's something important
-				FilterCarbide.stdout.write(aLine)
-		
-		
-		if self.__recipe and self.__recipe.isComplete():
-			errors = 0
-			warnings = 0			
-
-			recipeOutput = self.__recipe.getOutput()
-			recipeWarnings = self.__recipe.getWarnings()
-			recipeErrors = self.__recipe.getErrors()
-
-			if len(recipeOutput):
-				FilterCarbide.stdout.writelines(recipeOutput)		
-			if len(recipeWarnings):
-				FilterCarbide.stdout.writelines(recipeWarnings)
-				warnings += len(recipeWarnings)
-			if len(recipeErrors):
-				FilterCarbide.stderr.writelines(recipeErrors)
-				errors += len(recipeErrors)
-
-			# Per-recipe summary
-			self.__errors += errors
-			self.__warnings += warnings
-			FilterCarbide.stdout.write("Errors: %d, (Total for build: %d)\n" % (errors, self.__errors))
-			FilterCarbide.stdout.write("Warnings: %d, (Total for build: %d)\n\n" % (warnings, self.__warnings))
-			self.__recipe = None
-
-		return True
-	
-	def close(self):
-		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
-
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# Format Raptor verbose log output for the Carbide IDE
+#
+
+
+import os
+import re
+import sys
+import raptor
+import filter_interface
+import filter_utils
+
+
+class FilterCarbide(filter_interface.Filter):
+	"""Carbide IDE filter
+	Strips most verbose output leaving tools calls, tool output and formatted errors/warnings."""
+	
+	# ignore all general, benign, make output
+	ignore = re.compile('(make(\.exe)?: Nothing to be done for \`.+\'|make(\.exe)?: \[.+\] Error \d+ \(ignored\)|.*make(.exe)?\[\d\]: (Entering|Leaving) directory \`.+\')')
+	
+	stdout = filter_utils.AutoFlushedStream(sys.stdout)
+	stderr = filter_utils.AutoFlushedStream(sys.stderr)
+	
+	recipeFactory = filter_utils.RecipeFactory()
+	
+	def __init__(self):
+		self.__errors = 0
+		self.__warnings = 0
+		self.__recipe = None
+
+	def open(self, aRaptorInstance):
+		return True
+		
+	def write(self, aLine):
+		"""Process output on the fly and format appropriately for the Carbide IDE.
+		Most verbose output is discarded leaving tools calls, tool output and formatted errors
+		and warnings.
+		Identified errors go to stderr so that they will be highlighted in the IDE console."""
+		
+		if FilterCarbide.ignore.match(aLine):
+			return
+		
+		logHeader = filter_utils.logHeader.match(aLine)
+		if logHeader:
+			FilterCarbide.stdout.write("sbs version: " + logHeader.group("version")+"\n\n")
+			return
+		
+		clean = filter_utils.clean.match(aLine)
+		if clean:
+			for file in clean.group("removals").split():
+				FilterCarbide.stdout.write("clean: " + file + "\n")
+			return
+		
+		exports = filter_utils.exports.match(aLine)
+		if exports:
+			FilterCarbide.stdout.write("export: " + exports.group("source") + " to " + exports.group("destination") + "\n")
+			return
+		
+		
+		if self.__recipe:
+			self.__recipe.addLine(aLine)
+			
+			if self.__recipe.isComplete():
+				for call in self.__recipe.getCalls():
+					FilterCarbide.stdout.write(call + "\n")				
+		else:		
+			logTag = filter_utils.logTag.match(aLine)
+			if logTag:
+				tagName = logTag.group("name")			
+				if tagName == "recipe":
+					if self.__recipe:
+						self.__recipe.addLine(aLine)
+					else:
+						self.__recipe = FilterCarbide.recipeFactory.newRecipe(aLine)						
+				elif tagName == "error":
+					self.__errors += 1
+					FilterCarbide.stderr.write("Error: " + filter_utils.logTag.sub("", aLine) + "\n")
+				elif tagName == "warning":
+					self.__warnings += 1
+					FilterCarbide.stdout.write("Warning: " + filter_utils.logTag.sub("", aLine) + "\n")
+				# we're not interested in any other tagged output
+				return
+			else:
+				# Not a recipe, and not tagged output that we know about.
+				# Output this anyway, just in case it's something important
+				FilterCarbide.stdout.write(aLine)
+		
+		
+		if self.__recipe and self.__recipe.isComplete():
+			errors = 0
+			warnings = 0			
+
+			recipeOutput = self.__recipe.getOutput()
+			recipeWarnings = self.__recipe.getWarnings()
+			recipeErrors = self.__recipe.getErrors()
+
+			if len(recipeOutput):
+				FilterCarbide.stdout.writelines(recipeOutput)		
+			if len(recipeWarnings):
+				FilterCarbide.stdout.writelines(recipeWarnings)
+				warnings += len(recipeWarnings)
+			if len(recipeErrors):
+				FilterCarbide.stderr.writelines(recipeErrors)
+				errors += len(recipeErrors)
+
+			# Per-recipe summary
+			self.__errors += errors
+			self.__warnings += warnings
+			FilterCarbide.stdout.write("Errors: %d, (Total for build: %d)\n" % (errors, self.__errors))
+			FilterCarbide.stdout.write("Warnings: %d, (Total for build: %d)\n\n" % (warnings, self.__warnings))
+			self.__recipe = None
+
+		return True
+	
+	def close(self):
+		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
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/python/plugins/filter_checksource.py
--- a/sbsv2/raptor/python/plugins/filter_checksource.py	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/python/plugins/filter_checksource.py	Mon Nov 16 09:46:46 2009 +0000
@@ -1,376 +1,376 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-#
-
-import raptor_utilities
-import os
-import re
-import sys
-import filter_interface
-import xml.parsers.expat
-import raptor
-import generic_path
-import tempfile
-
-# This filter has not been tested on linux
-if not raptor_utilities.getOSPlatform().startswith("linux"):
-	
-	# Compares the two paths, and reports the differences highlighted by a "^" character
-	# Output Generated will be like this:
-	# Reference in metadata -> C:/foo/bar/cat.cpp
-	# 			               -------^-------^-- 
-	# Reference in metadata -> C:/foo/Bar/cat.Cpp
-	def reportcsdifference(path1, path2):
-		
-		same = "-"
-		different = "^"
-		space = ' '
-		metadataString = 'Reference in metadata -> '
-		ondiskString   = 'Actual case on disk   -> '
-		
-		sys.stderr.write(metadataString + path2 +"\n")
-		separator = ""
-		for i, e in enumerate(path1):
-			try:
-				if e != path2[i]:
-					separator += different
-				else:
-					separator += same
-			except IndexError:
-				separator += '*'
-
-		separator += different * (len(path1)-len(path2))
-		
-		sys.stderr.write(space*len(metadataString) + separator +"\n") # Print the separator in alignment with the metadataString
-		sys.stderr.write(ondiskString + path1 + "\n")
-
-	class FilterCheckSource(filter_interface.Filter):
-
-		def open(self, raptor_instance):
-			self.raptor = raptor_instance
-			self.ok = True
-			self.errors = 0
-			self.checked = []
-			self.check = raptor_instance.doCheck
-			self.casechecker = CheckCase()
-			
-			# Expat Parser initialisation
-			self.p = xml.parsers.expat.ParserCreate()
-			self.p.StartElementHandler = self.startelement # Handles opening XML tags
-			self.p.EndElementHandler = self.endelement # Handles closing XML tags
-			self.p.CharacterDataHandler = self.chardata # Handles data between opening/closing tags
-			
-			# Regex initialisation
-			self.rvctdependfinder = re.compile("--depend\s+(.*?d)(?:\s+|$)", re.IGNORECASE|re.DOTALL)
-			self.cwdependfinder = re.compile("#'\s+(.*?\.dep)", re.IGNORECASE|re.DOTALL)
-			
-			# Data to be passed to case checkers
-			self.currentmmp = ""
-			self.currentbldinf = ""
-			self.currentconfig = ""
-			
-			self.filestocheck = []
-			
-			# Need this flag for the chardata method that does not have the name of the
-			# current XML element passed to it as a parameter.
-			self.infiletag = False
-			
-			# Create a temporary file to record all dependency files. We can only parse those after 
-			# make has finished running all the compile commands and by definition these
-			# files should therefore exist.
-			try:
-				self.tmp = tempfile.TemporaryFile()
-			except:
-				sys.stderr.write("sbs: could not create temporary file for FilterClean\n")
-				self.ok = False
-			
-			return self.ok
-
-		def write(self, text):
-			# Slightly nasty that we have to "ignore" exceptions, but the xml parser 
-			# generates this when it encounters non-xml lines (like make: nothing to be done for 'export')
-			try:
-				self.p.Parse(text.rstrip())	
-			except xml.parsers.expat.ExpatError:
-				pass
-
-			return self.ok
-
-		def saveitem(self, path):
-			"put path into a temporary file."
-			try:
-				self.tmp.write(path + "\n")
-			except:
-				sys.stderr.write("sbs: could not write temporary file in FilterCheckSource\n")
-				self.ok = False
-
-		def startelement(self, name, attrs):
-			# Check the source code cpp files - obtained from the "source" 
-			# attribute of compile and other tags 
-			if 'source' in attrs.keys():
-				if attrs['source'] != "":
-					self.filestocheck.append(attrs['source'])
-			
-			# Record the current metadata files and config
-			if name == "clean":
-				self.currentmmp = attrs["mmp"]
-				self.currentbldinf = attrs["bldinf"]
-				self.currentconfig = attrs["config"]
-			
-			# Indicates we are in a  element
-			if name == "file":
-				# Need to use a flag to indicate that we are processing a file tag
-				self.infiletag = True
-		
-		def chardata(self, data):
-			# Strip quotes from data
-			unquoteddata = data.strip("\"\'")
-			
-			# Use a flag to determine that we are processing a file tag since this method
-			# doesn't receive the "name" argument that startelement/endelement
-			if self.infiletag:
-				self.filestocheck.append(unquoteddata)
-				
-				# Also write dependency file names to temp file to parse the 
-				# contents of these at the end
-				if unquoteddata.endswith(".d") or unquoteddata.endswith(".dep"):
-					self.saveitem(unquoteddata)
-			
-			# RVCT depends files
-			# Outside of file tags, chardata will be called on CDATA which contains
-			# compiler calls, hence we parse these for the "--depend" option to extract
-			# the .d file.
-			if "--depend" in data:
-				result =  self.rvctdependfinder.findall(data)
-				for res in result:
-					self.saveitem(res)
-			
-			# CW toolchain depends files
-			# As for RVCT, chardata will be called on CDATA which contains compiler calls, 
-			# hence we parse these for file names ending in .dep after the sequence #, ' and 
-			# a space. The win32.flm munges the contents of these files around so we are really
-			# interested in the .o.d files - these have the same path as the .dep files but 
-			# with the extension changed to .o.d from .dep.
-			if ".dep" in data:
-				result = self.cwdependfinder.findall(data)
-				for res in result:
-					self.saveitem(res.replace(".dep", ".o.d"))
-			
-		def endelement(self, name):
-			# Blank out the mmp, bldinf and config for next clean tag (in case it has any blanks)
-			if name == "clean":
-				self.currentmmp = ""
-				self.currentbldinf = ""
-				self.currentconfig = ""
-			
-			if name == "file":
-				self.infiletag = False
-			
-			if len(self.filestocheck) > 0:
-				# Check the found file(s)
-				for filename in self.filestocheck:
-					self.checksource(filename)
-				
-				# Reset list so as not to re-check already checked files
-				self.filestocheck = []
-				
-		def close(self):			
-			return self.ok
-
-		def summary(self):
-			
-			depparser = DependenciesParser()
-			dependenciesfileset = set() # Stores the files listed inside depdendency files
-			deps = [] # Stores dependency (.d and .dep) files
-			
-			try:
-				self.tmp.flush()	# write what is left in the buffer
-				self.tmp.seek(0)	# rewind to the beginning
-				
-				for line in self.tmp.readlines():
-					path = line.strip()
-					
-					# Only try to parse the file if it exists as a file, and if we haven't done so 
-					# already (store the list of parsed files in the set "dependenciesfileset"
-					if os.path.isfile(path) and not path in dependenciesfileset:
-						dependenciesfileset.add(path)
-						
-						# Here we parse each dependency file and form a list of the prerequisites contained therein
-						dependencyfilelines = depparser.readdepfilelines(path) # Read the lines
-						dependencyfilestr = depparser.removelinecontinuation(dependencyfilelines) # Join them up
-						dependencyfiles = depparser.getdependencies(dependencyfilestr) # Get prerequisites
-						deps.extend(dependencyfiles) # Add to list
-					else:
-						sys.stdout.write("\t"  + path + " does not exist\n")
-						
-				self.tmp.close()	# This also deletes the temporary file
-				
-				# Make a set of the prerequisites listed in the dependency files
-				# so we only check each one once
-				depset = set(deps)
-				deplistnodups = list(depset)
-				
-				# Do the check for each file 	
-				for dep in deplistnodups:
-					dep = os.path.normpath(dep).replace('\\', '/')
-					self.checksource(dep)
-					
-			except Exception, e:
-				sys.stderr.write("sbs: could not access temporary file for FilterClean\n")
-				
-			if self.errors == 0:
-				sys.stdout.write("No checksource errors found\n")
-			else:
-				sys.stdout.write("\n %d checksource errors found in the build\n" % self.errors)
-			
-		
-		def checksource(self, path):
-			normedpath = path.replace("\"", "") # Remove quoting
-			
-			if normedpath not in self.checked:
-				self.checked.append(normedpath)
-				try:
-					realpath = self.casechecker.checkcase(normedpath)
-				except IOError, e:
-					# file does not exist so just return
-					return
-										
-				if not realpath == normedpath and realpath != "":
-					self.ok = False
-					self.errors += 1
-					sys.stderr.write("\nChecksource Failure:\n")
-					reportcsdifference(realpath, normedpath)
-
-	class CheckCase(object):
-		"""Used to check the case of a given path matches the file system.  
-		Caches previous lookups to reduce disk IO and improve performance"""
-		
-		def __init__(self):
-			self.__dirsCache = {} # a hash containing the directory structure, in the same case as the file system
-		
-		def checkcase(self, path):
-			"""Checks the path matches the file system"""
-			
-			path = os.path.normpath(path)
-			path = path.replace('\\', '/')
-			
-			if not os.path.exists(path):
-				raise IOError, path + " does not exist"
-				
-			parts = path.split('/')
-			
-			dirBeingChecked = parts.pop(0) + "/"
-			
-			cacheItem = self.__dirsCache
-			
-			for part in parts:
-				if not self.checkkeyignorecase(cacheItem, part):
-				
-					dirItems = os.listdir(dirBeingChecked)
-					
-					found = False
-					
-					for dirItem in dirItems:
-						if os.path.isdir(os.path.join(dirBeingChecked, dirItem)):
-							if not cacheItem.has_key(dirItem):
-								cacheItem[dirItem] = {}
-							
-							if not found:
-								# Check if there is a dir match
-								if re.search("^" + part + "$", dirItem, re.IGNORECASE):
-									found = True
-									
-									cacheItem = cacheItem[dirItem]
-									
-									dirBeingChecked = os.path.join(dirBeingChecked, dirItem).replace('\\', '/')
-						else:
-							cacheItem[dirItem] = 1
-					
-							if not found:
-								# Check if there is a dir match
-								if re.search("^" + part + "$", dirItem, re.IGNORECASE):
-									found = True
-									
-									return os.path.join(dirBeingChecked, dirItem).replace('\\', '/')                         
-				
-				else:
-					if os.path.isdir(os.path.join(dirBeingChecked, part)):
-						cacheItem = cacheItem[part]
-				
-					dirBeingChecked = os.path.join(dirBeingChecked, part).replace('\\', '/')
-	
-			return dirBeingChecked
-	
-		def checkkeyignorecase(self, dictionary, keyToFind):
-			for key in dictionary.keys():
-				if re.search("^" + keyToFind + "$", key, re.IGNORECASE):
-					
-					if not keyToFind == key:
-						return False
-					
-					return True
-			
-			return False
-
-	class DependenciesParser(object):
-		
-		def __init__(self):
-			pass # Nop - nothing to do for init
-		
-		def readdepfilelines(self, dotdfile):
-			""" Read the lines from a Make dependency file and return them as a list """
-			lines = []
-			try:
-				fh = open(dotdfile, "r")
-			except IOError, e:
-				print "Error: Failed to open file \"%s\": %s" % (dotdfile, e.strerror)
-			except Exception, e:
-				print "Error: Unknown error: %s" % str(e)
-			else:
-				lines = fh.readlines()
-				fh.close()
-				
-			return lines
-		
-		def removelinecontinuation(self, lineslist):
-			""" Remove line continuation chararacters '\\' from the end of any lines in  
-			the list that have them and return a string with lines joined together """
-			str = " ".join(lineslist).replace('\\\n','')
-			return str
-		
-		def getdependencies(self, dotdfilestring):
-			""" Splits the multi-lined string dotdfilestring and performs a regexp
-			match on files to the right of a : on each line """
-			
-			# Strip whitespace at the start of the string	
-			lines = dotdfilestring.lstrip().split("\n")
-			
-			dependencyset = set() # Create a set to skip duplicates
-			for line in lines:
-				# Split on whitespace that is *not* preceeded by a \ - i.e. 
-				# don't split on escaped spaces.
-				lineparts = re.split("(? C:/foo/bar/cat.cpp
+	# 			               -------^-------^-- 
+	# Reference in metadata -> C:/foo/Bar/cat.Cpp
+	def reportcsdifference(path1, path2):
+		
+		same = "-"
+		different = "^"
+		space = ' '
+		metadataString = 'Reference in metadata -> '
+		ondiskString   = 'Actual case on disk   -> '
+		
+		sys.stderr.write(metadataString + path2 +"\n")
+		separator = ""
+		for i, e in enumerate(path1):
+			try:
+				if e != path2[i]:
+					separator += different
+				else:
+					separator += same
+			except IndexError:
+				separator += '*'
+
+		separator += different * (len(path1)-len(path2))
+		
+		sys.stderr.write(space*len(metadataString) + separator +"\n") # Print the separator in alignment with the metadataString
+		sys.stderr.write(ondiskString + path1 + "\n")
+
+	class FilterCheckSource(filter_interface.Filter):
+
+		def open(self, raptor_instance):
+			self.raptor = raptor_instance
+			self.ok = True
+			self.errors = 0
+			self.checked = []
+			self.check = raptor_instance.doCheck
+			self.casechecker = CheckCase()
+			
+			# Expat Parser initialisation
+			self.p = xml.parsers.expat.ParserCreate()
+			self.p.StartElementHandler = self.startelement # Handles opening XML tags
+			self.p.EndElementHandler = self.endelement # Handles closing XML tags
+			self.p.CharacterDataHandler = self.chardata # Handles data between opening/closing tags
+			
+			# Regex initialisation
+			self.rvctdependfinder = re.compile("--depend\s+(.*?d)(?:\s+|$)", re.IGNORECASE|re.DOTALL)
+			self.cwdependfinder = re.compile("#'\s+(.*?\.dep)", re.IGNORECASE|re.DOTALL)
+			
+			# Data to be passed to case checkers
+			self.currentmmp = ""
+			self.currentbldinf = ""
+			self.currentconfig = ""
+			
+			self.filestocheck = []
+			
+			# Need this flag for the chardata method that does not have the name of the
+			# current XML element passed to it as a parameter.
+			self.infiletag = False
+			
+			# Create a temporary file to record all dependency files. We can only parse those after 
+			# make has finished running all the compile commands and by definition these
+			# files should therefore exist.
+			try:
+				self.tmp = tempfile.TemporaryFile()
+			except:
+				sys.stderr.write("sbs: could not create temporary file for FilterClean\n")
+				self.ok = False
+			
+			return self.ok
+
+		def write(self, text):
+			# Slightly nasty that we have to "ignore" exceptions, but the xml parser 
+			# generates this when it encounters non-xml lines (like make: nothing to be done for 'export')
+			try:
+				self.p.Parse(text.rstrip())	
+			except xml.parsers.expat.ExpatError:
+				pass
+
+			return self.ok
+
+		def saveitem(self, path):
+			"put path into a temporary file."
+			try:
+				self.tmp.write(path + "\n")
+			except:
+				sys.stderr.write("sbs: could not write temporary file in FilterCheckSource\n")
+				self.ok = False
+
+		def startelement(self, name, attrs):
+			# Check the source code cpp files - obtained from the "source" 
+			# attribute of compile and other tags 
+			if 'source' in attrs.keys():
+				if attrs['source'] != "":
+					self.filestocheck.append(attrs['source'])
+			
+			# Record the current metadata files and config
+			if name == "clean":
+				self.currentmmp = attrs["mmp"]
+				self.currentbldinf = attrs["bldinf"]
+				self.currentconfig = attrs["config"]
+			
+			# Indicates we are in a  element
+			if name == "file":
+				# Need to use a flag to indicate that we are processing a file tag
+				self.infiletag = True
+		
+		def chardata(self, data):
+			# Strip quotes from data
+			unquoteddata = data.strip("\"\'")
+			
+			# Use a flag to determine that we are processing a file tag since this method
+			# doesn't receive the "name" argument that startelement/endelement
+			if self.infiletag:
+				self.filestocheck.append(unquoteddata)
+				
+				# Also write dependency file names to temp file to parse the 
+				# contents of these at the end
+				if unquoteddata.endswith(".d") or unquoteddata.endswith(".dep"):
+					self.saveitem(unquoteddata)
+			
+			# RVCT depends files
+			# Outside of file tags, chardata will be called on CDATA which contains
+			# compiler calls, hence we parse these for the "--depend" option to extract
+			# the .d file.
+			if "--depend" in data:
+				result =  self.rvctdependfinder.findall(data)
+				for res in result:
+					self.saveitem(res)
+			
+			# CW toolchain depends files
+			# As for RVCT, chardata will be called on CDATA which contains compiler calls, 
+			# hence we parse these for file names ending in .dep after the sequence #, ' and 
+			# a space. The win32.flm munges the contents of these files around so we are really
+			# interested in the .o.d files - these have the same path as the .dep files but 
+			# with the extension changed to .o.d from .dep.
+			if ".dep" in data:
+				result = self.cwdependfinder.findall(data)
+				for res in result:
+					self.saveitem(res.replace(".dep", ".o.d"))
+			
+		def endelement(self, name):
+			# Blank out the mmp, bldinf and config for next clean tag (in case it has any blanks)
+			if name == "clean":
+				self.currentmmp = ""
+				self.currentbldinf = ""
+				self.currentconfig = ""
+			
+			if name == "file":
+				self.infiletag = False
+			
+			if len(self.filestocheck) > 0:
+				# Check the found file(s)
+				for filename in self.filestocheck:
+					self.checksource(filename)
+				
+				# Reset list so as not to re-check already checked files
+				self.filestocheck = []
+				
+		def close(self):			
+			return self.ok
+
+		def summary(self):
+			
+			depparser = DependenciesParser()
+			dependenciesfileset = set() # Stores the files listed inside depdendency files
+			deps = [] # Stores dependency (.d and .dep) files
+			
+			try:
+				self.tmp.flush()	# write what is left in the buffer
+				self.tmp.seek(0)	# rewind to the beginning
+				
+				for line in self.tmp.readlines():
+					path = line.strip()
+					
+					# Only try to parse the file if it exists as a file, and if we haven't done so 
+					# already (store the list of parsed files in the set "dependenciesfileset"
+					if os.path.isfile(path) and not path in dependenciesfileset:
+						dependenciesfileset.add(path)
+						
+						# Here we parse each dependency file and form a list of the prerequisites contained therein
+						dependencyfilelines = depparser.readdepfilelines(path) # Read the lines
+						dependencyfilestr = depparser.removelinecontinuation(dependencyfilelines) # Join them up
+						dependencyfiles = depparser.getdependencies(dependencyfilestr) # Get prerequisites
+						deps.extend(dependencyfiles) # Add to list
+					else:
+						sys.stdout.write("\t"  + path + " does not exist\n")
+						
+				self.tmp.close()	# This also deletes the temporary file
+				
+				# Make a set of the prerequisites listed in the dependency files
+				# so we only check each one once
+				depset = set(deps)
+				deplistnodups = list(depset)
+				
+				# Do the check for each file 	
+				for dep in deplistnodups:
+					dep = os.path.normpath(dep).replace('\\', '/')
+					self.checksource(dep)
+					
+			except Exception, e:
+				sys.stderr.write("sbs: could not access temporary file for FilterClean\n")
+				
+			if self.errors == 0:
+				sys.stdout.write("No checksource errors found\n")
+			else:
+				sys.stdout.write("\n %d checksource errors found in the build\n" % self.errors)
+			
+		
+		def checksource(self, path):
+			normedpath = path.replace("\"", "") # Remove quoting
+			
+			if normedpath not in self.checked:
+				self.checked.append(normedpath)
+				try:
+					realpath = self.casechecker.checkcase(normedpath)
+				except IOError, e:
+					# file does not exist so just return
+					return
+										
+				if not realpath == normedpath and realpath != "":
+					self.ok = False
+					self.errors += 1
+					sys.stderr.write("\nChecksource Failure:\n")
+					reportcsdifference(realpath, normedpath)
+
+	class CheckCase(object):
+		"""Used to check the case of a given path matches the file system.  
+		Caches previous lookups to reduce disk IO and improve performance"""
+		
+		def __init__(self):
+			self.__dirsCache = {} # a hash containing the directory structure, in the same case as the file system
+		
+		def checkcase(self, path):
+			"""Checks the path matches the file system"""
+			
+			path = os.path.normpath(path)
+			path = path.replace('\\', '/')
+			
+			if not os.path.exists(path):
+				raise IOError, path + " does not exist"
+				
+			parts = path.split('/')
+			
+			dirBeingChecked = parts.pop(0) + "/"
+			
+			cacheItem = self.__dirsCache
+			
+			for part in parts:
+				if not self.checkkeyignorecase(cacheItem, part):
+				
+					dirItems = os.listdir(dirBeingChecked)
+					
+					found = False
+					
+					for dirItem in dirItems:
+						if os.path.isdir(os.path.join(dirBeingChecked, dirItem)):
+							if not cacheItem.has_key(dirItem):
+								cacheItem[dirItem] = {}
+							
+							if not found:
+								# Check if there is a dir match
+								if re.search("^" + part + "$", dirItem, re.IGNORECASE):
+									found = True
+									
+									cacheItem = cacheItem[dirItem]
+									
+									dirBeingChecked = os.path.join(dirBeingChecked, dirItem).replace('\\', '/')
+						else:
+							cacheItem[dirItem] = 1
+					
+							if not found:
+								# Check if there is a dir match
+								if re.search("^" + part + "$", dirItem, re.IGNORECASE):
+									found = True
+									
+									return os.path.join(dirBeingChecked, dirItem).replace('\\', '/')                         
+				
+				else:
+					if os.path.isdir(os.path.join(dirBeingChecked, part)):
+						cacheItem = cacheItem[part]
+				
+					dirBeingChecked = os.path.join(dirBeingChecked, part).replace('\\', '/')
+	
+			return dirBeingChecked
+	
+		def checkkeyignorecase(self, dictionary, keyToFind):
+			for key in dictionary.keys():
+				if re.search("^" + keyToFind + "$", key, re.IGNORECASE):
+					
+					if not keyToFind == key:
+						return False
+					
+					return True
+			
+			return False
+
+	class DependenciesParser(object):
+		
+		def __init__(self):
+			pass # Nop - nothing to do for init
+		
+		def readdepfilelines(self, dotdfile):
+			""" Read the lines from a Make dependency file and return them as a list """
+			lines = []
+			try:
+				fh = open(dotdfile, "r")
+			except IOError, e:
+				print "Error: Failed to open file \"%s\": %s" % (dotdfile, e.strerror)
+			except Exception, e:
+				print "Error: Unknown error: %s" % str(e)
+			else:
+				lines = fh.readlines()
+				fh.close()
+				
+			return lines
+		
+		def removelinecontinuation(self, lineslist):
+			""" Remove line continuation chararacters '\\' from the end of any lines in  
+			the list that have them and return a string with lines joined together """
+			str = " ".join(lineslist).replace('\\\n','')
+			return str
+		
+		def getdependencies(self, dotdfilestring):
+			""" Splits the multi-lined string dotdfilestring and performs a regexp
+			match on files to the right of a : on each line """
+			
+			# Strip whitespace at the start of the string	
+			lines = dotdfilestring.lstrip().split("\n")
+			
+			dependencyset = set() # Create a set to skip duplicates
+			for line in lines:
+				# Split on whitespace that is *not* preceeded by a \ - i.e. 
+				# don't split on escaped spaces.
+				lineparts = re.split("(?"):
-					self.doFile(line)
-				elif line.startswith(""):
-					self.doDirectory(line)
-						
-			if self.removeExports:
-				if line.startswith(""):
-					self.doMember(line)
-				elif line.startswith(""):
-					self.doZipMarker(line)
-				
-		return self.ok
-	
-	
-	def summary(self):
-		"finish off"
-		
-		# remove files, remembering directories
-		dirs = set()
-		
-		try:
-			self.tmp.flush()	# write what is left in the buffer
-			self.tmp.seek(0)	# rewind to the beginning
-			
-			for line in self.tmp.readlines():
-				path = line.strip()
-				
-				if os.path.isfile(path):
-					self.removeFile(path)
-					
-				elif os.path.isdir(path):
-					dirs.add(path)
-					
-			self.tmp.close()	# this also deletes the temporary file
-		except:
-			sys.stderr.write("sbs: could not access temporary file for FilterClean\n")
-			self.ok = False
-		
-		# finally remove (empty) directories
-		for dir in dirs:
-			try:
-				os.removedirs(dir)	# may fail if the directory has files in
-			except:
-				pass				# silently ignore all errors
-				
-		return self.ok
-
-
-	def close(self):
-		"nop"
-		
-		return self.ok
-	
-	
-	def removeFile(self, path):
-		try:
-			os.unlink(path)
-		except Exception, e:
-			sys.stderr.write("sbs: could not remove " + path + "\n")
-			sys.stderr.write(str(e) + "\n")
-		
-				
-	def saveItem(self, path):
-		"put path into a temporary file."
-		try:
-			self.tmp.write(path + "\n")
-		except:
-			sys.stderr.write("sbs: could not write temporary file in FilterClean\n")
-			self.ok = False
-	
-			
-	def doFile(self, line):
-		"remove filenames in  tags immediately (not .d or .dep)."
-		filename = line[6:-7]                # line is "filename
-		filename = filename.strip("\"\'")    # some names are quoted
-		
-		# dependency files must be deleted at the end,
-		# everything else can be deleted straight away.
-		if filename.endswith(".d") or filename.endswith(".dep"):
-			self.saveItem(filename)
-		else:
-			if os.path.isfile(filename):
-				self.removeFile(filename)
-
-
-	def doDirectory(self, line):
-		"save directories in  tags for the end."
-		# assuming X
-		dirname = line[5:-6]
-		self.saveItem(dirname.strip("\"\'"))
-		
-		
-	def doExport(self, line):
-		"save exported files in  tags for the end."
-		# assuming 
-		filename = line[21:line.find("'", 21)]
-		self.saveItem(filename)
-		
-		
-	def doMember(self, line):
-		"save zip exports in  tags for the end."
-		# assuming X
-		filename = line[8:-9]
-		self.saveItem(filename)
-		
-		
-	def doZipMarker(self, line):
-		"Remove file in  tags"
-		# assuming X
-		filename = line[11:-12]
-		if os.path.isfile(filename):
-			self.removeFile(filename)
-
-
-# the end				
-
+#
+# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# Filter class for doing CLEAN, CLEANEXPORT and REALLYCLEAN efficiently.
+#
+
+import os
+import sys
+import tempfile
+import filter_interface
+
+class FilterClean(filter_interface.Filter):
+	
+	def open(self, params):
+		"initialise"
+		
+		targets = [x.lower() for x in params.targets]
+		
+		self.removeExports = ("cleanexport" in targets or "reallyclean" in targets)
+		self.removeTargets = ("clean" in targets or "reallyclean" in targets)
+		
+		self.ok = True
+		
+		# create a temporary file to record all the exports and directories
+		# in. We can only remove those after "make" has finished running all
+		# the CLEAN targets.
+		try:
+			self.tmp = tempfile.TemporaryFile()
+		except:
+			sys.stderr.write("sbs: could not create temporary file for FilterClean\n")
+			self.ok = False
+		
+		return self.ok
+	
+	
+	def write(self, text):
+		"process some log text"
+		
+		for line in text.splitlines():
+		
+			if self.removeTargets:
+				if line.startswith(""):
+					self.doFile(line)
+				elif line.startswith(""):
+					self.doDirectory(line)
+						
+			if self.removeExports:
+				if line.startswith(""):
+					self.doMember(line)
+				elif line.startswith(""):
+					self.doZipMarker(line)
+				
+		return self.ok
+	
+	
+	def summary(self):
+		"finish off"
+		
+		# remove files, remembering directories
+		dirs = set()
+		
+		try:
+			self.tmp.flush()	# write what is left in the buffer
+			self.tmp.seek(0)	# rewind to the beginning
+			
+			for line in self.tmp.readlines():
+				path = line.strip()
+				
+				if os.path.isfile(path):
+					self.removeFile(path)
+					
+				elif os.path.isdir(path):
+					dirs.add(path)
+					
+			self.tmp.close()	# this also deletes the temporary file
+		except:
+			sys.stderr.write("sbs: could not access temporary file for FilterClean\n")
+			self.ok = False
+		
+		# finally remove (empty) directories
+		for dir in dirs:
+			try:
+				os.removedirs(dir)	# may fail if the directory has files in
+			except:
+				pass				# silently ignore all errors
+				
+		return self.ok
+
+
+	def close(self):
+		"nop"
+		
+		return self.ok
+	
+	
+	def removeFile(self, path):
+		try:
+			os.unlink(path)
+		except Exception, e:
+			sys.stderr.write("sbs: could not remove " + path + "\n")
+			sys.stderr.write(str(e) + "\n")
+		
+				
+	def saveItem(self, path):
+		"put path into a temporary file."
+		try:
+			self.tmp.write(path + "\n")
+		except:
+			sys.stderr.write("sbs: could not write temporary file in FilterClean\n")
+			self.ok = False
+	
+			
+	def doFile(self, line):
+		"remove filenames in  tags immediately (not .d or .dep)."
+		filename = line[6:-7]                # line is "filename
+		filename = filename.strip("\"\'")    # some names are quoted
+		
+		# dependency files must be deleted at the end,
+		# everything else can be deleted straight away.
+		if filename.endswith(".d") or filename.endswith(".dep"):
+			self.saveItem(filename)
+		else:
+			if os.path.isfile(filename):
+				self.removeFile(filename)
+
+
+	def doDirectory(self, line):
+		"save directories in  tags for the end."
+		# assuming X
+		dirname = line[5:-6]
+		self.saveItem(dirname.strip("\"\'"))
+		
+		
+	def doExport(self, line):
+		"save exported files in  tags for the end."
+		# assuming 
+		filename = line[21:line.find("'", 21)]
+		self.saveItem(filename)
+		
+		
+	def doMember(self, line):
+		"save zip exports in  tags for the end."
+		# assuming X
+		filename = line[8:-9]
+		self.saveItem(filename)
+		
+		
+	def doZipMarker(self, line):
+		"Remove file in  tags"
+		# assuming X
+		filename = line[11:-12]
+		if os.path.isfile(filename):
+			self.removeFile(filename)
+
+
+# the end				
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/python/plugins/filter_logfile.py
--- a/sbsv2/raptor/python/plugins/filter_logfile.py	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/python/plugins/filter_logfile.py	Mon Nov 16 09:46:46 2009 +0000
@@ -1,77 +1,77 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# Filter class for filtering XML logs and generate reports
-# Will ultimately do everything that scanlog does
-#
-
-import os
-import sys
-import raptor
-import filter_interface
-
-class FilterLogfile(filter_interface.Filter):
-
-	def open(self, raptor_instance):
-		"""Open a log file for the various I/O methods to write to."""
-
-		self.raptor = raptor_instance
-		self.logFileName = self.raptor.logFileName
-		# insert the time into the log file name
-		if self.logFileName:
-			self.logFileName.path = self.logFileName.path.replace("%TIME",
-					self.raptor.timestring)
-	
-			try:
-				dirname = str(self.raptor.logFileName.Dir())
-				if dirname and not os.path.isdir(dirname):
-					os.makedirs(dirname)
-			except os.error, e:
-				if e.errno != os.errno.EEXIST:
-					sys.stderr.write("%s : error: cannot create directory %s\n" % \
-						(str(raptor.name), dirname))
-					return False
-			try:
-				self.out = open(str(self.logFileName), "w")
-			except:
-				self.out = None
-				sys.stderr.write("%s : error: cannot write log %s\n" %\
-					(str(raptor.name), self.logFileName.GetShellPath()))
-				return False
-		else:
-			self.out = sys.stdout
-
-		return True
-
-	def write(self, text):
-		"""Write text into the log file"""
-
-		self.out.write(text)
-		return True
-
-	def summary(self):
-		"""Write Summary"""
-		if self.logFileName and not self.raptor.quiet:
-			sys.stdout.write("sbs: build log in %s\n" % str(self.logFileName))
-		return False
-
-	def close(self):
-		"""Close the log file"""
-
-		try:
-			self.out.close()
-			return True
-		except:
-			self.out = None
-		return False
+#
+# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# Filter class for filtering XML logs and generate reports
+# Will ultimately do everything that scanlog does
+#
+
+import os
+import sys
+import raptor
+import filter_interface
+
+class FilterLogfile(filter_interface.Filter):
+
+	def open(self, raptor_instance):
+		"""Open a log file for the various I/O methods to write to."""
+
+		self.raptor = raptor_instance
+		self.logFileName = self.raptor.logFileName
+		# insert the time into the log file name
+		if self.logFileName:
+			self.logFileName.path = self.logFileName.path.replace("%TIME",
+					self.raptor.timestring)
+	
+			try:
+				dirname = str(self.raptor.logFileName.Dir())
+				if dirname and not os.path.isdir(dirname):
+					os.makedirs(dirname)
+			except os.error, e:
+				if e.errno != os.errno.EEXIST:
+					sys.stderr.write("%s : error: cannot create directory %s\n" % \
+						(str(raptor.name), dirname))
+					return False
+			try:
+				self.out = open(str(self.logFileName), "w")
+			except:
+				self.out = None
+				sys.stderr.write("%s : error: cannot write log %s\n" %\
+					(str(raptor.name), self.logFileName.GetShellPath()))
+				return False
+		else:
+			self.out = sys.stdout
+
+		return True
+
+	def write(self, text):
+		"""Write text into the log file"""
+
+		self.out.write(text)
+		return True
+
+	def summary(self):
+		"""Write Summary"""
+		if self.logFileName and not self.raptor.quiet:
+			sys.stdout.write("sbs: build log in %s\n" % str(self.logFileName))
+		return False
+
+	def close(self):
+		"""Close the log file"""
+
+		try:
+			self.out.close()
+			return True
+		except:
+			self.out = None
+		return False
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/python/plugins/filter_splitlog.py
--- a/sbsv2/raptor/python/plugins/filter_splitlog.py	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/python/plugins/filter_splitlog.py	Mon Nov 16 09:46:46 2009 +0000
@@ -1,157 +1,157 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# Filter class for filtering XML logs and generate reports
-# Will ultimately do everything that scanlog does
-#
-
-import os
-import sys
-import raptor
-import filter_interface
-
-class FilterSplitlog(filter_interface.Filter):
-
-	def open(self, raptor_instance):
-		"""Open a log file for the various I/O methods to write to."""
-
-		self.raptor = raptor_instance
-		self.logFileName = self.raptor.logFileName
-		# insert the time into the log file name
-		if self.logFileName:
-			self.logFileName.path = self.logFileName.path.replace("%TIME",
-					self.raptor.timestring)
-	
-			try:
-				dirname = str(self.raptor.logFileName.Dir())
-				if dirname and not os.path.isdir(dirname):
-					os.makedirs(dirname)
-			except os.error, e:
-				if e.errno != os.errno.EEXIST:
-					sys.stderr.write("%s : error: cannot create directory " +
-							"%s\n" % (raptor.name, dirname))
-					return False
-			try:
-				self.out = open(str(self.logFileName), "w")
-			except:
-				self.out = None
-				sys.stderr.write("%s : error: cannot write log %s\n" %\
-					(raptor.name, self.logFileName.GetShellPath()))
-				return False
-			
-			# Add extra streams for splitting logfile
-			self.log = str(self.logFileName)
-			self.index = self.log.rfind(".")
-			# If there is no dot, append to the end
-			if self.index < 0:
-				self.index = len(self.log)
-			self.streams = [self.out]
-			
-			# Append this list for extra files
-			stream_list = ["clean", "whatlog", "recipe"]
-				
-			for stream in stream_list:
-				
-				path = self.log[:self.index] + "." + stream + \
-						self.log[self.index:]
-				try:
-					handle = open(path, "w")
-					self.streams.append(handle)
-				except:
-					self.streams.append(self.out)
-					sys.stderr.write("%s : error: cannot write log %s\n" %\
-							(str(raptor.name), path))
-			# self.out = self.streams[0]
-			self.clean = self.streams[1]
-			self.whatlog = self.streams[2]
-			self.recipe = self.streams[3]
-			self.block = self.out
-			
-		else:
-			# Change output stream to stdout and override 'write' function
-			self.out = sys.stdout
-			def stdout_write(text):
-				self.out.write(text)
-				return True
-			self.write = stdout_write
-			
-		return True
-
-
-	def write(self, text):
-		"""Write text into relevant log file"""
-		
-		for textLine in text.splitlines():
-			textLine = textLine + '\n'
-			if textLine.startswith(" tag found " \
-							+ "before previous block closed %s\n" %\
-							(raptor.name, self.logFileName))
-				self.block = self.clean
-				self.block.write(textLine)
-				
-			# Split 'WHATLOG' output into whatlog file
-			elif textLine.startswith(" tag " + \
-							"found before previous block closed\n" %\
-							(raptor.name, self.logFileName.GetShellPath()))
-				self.block = self.whatlog
-				self.block.write(textLine)
-				
-			# Split 'RECIPE' output into recipe file
-			elif textLine.startswith(" tag " + \
-							"found before previous block closed %s\n" %\
-							(raptor.name, self.logFileName.GetShellPath()))
-				self.block = self.recipe
-				self.block.write(textLine)
-				
-			# End of block found. Reset block to standard logfile
-			elif textLine.startswith("") or textLine.startswith("") \
-				or textLine.startswith(""):
-				self.block.write(textLine)
-				self.block = self.out
-			
-		# Everything else goes to logfile associated with current block
-			else:
-				self.block.write(textLine)
-		return True
-
-
-	def summary(self):
-		"""Write Summary"""
-		if self.logFileName and not self.raptor.quiet:
-			sys.stdout.write("sbs: build log in %s\n" % self.logFileName)
-		return True
-
-
-	def close(self):
-		"""Close the log file(s)"""
-
-		try:
-			self.out.close
-			for stream in self.streams:
-				stream.close()
-			return True
-		except:
-			self.out = None
-		return False
+#
+# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# Filter class for filtering XML logs and generate reports
+# Will ultimately do everything that scanlog does
+#
+
+import os
+import sys
+import raptor
+import filter_interface
+
+class FilterSplitlog(filter_interface.Filter):
+
+	def open(self, raptor_instance):
+		"""Open a log file for the various I/O methods to write to."""
+
+		self.raptor = raptor_instance
+		self.logFileName = self.raptor.logFileName
+		# insert the time into the log file name
+		if self.logFileName:
+			self.logFileName.path = self.logFileName.path.replace("%TIME",
+					self.raptor.timestring)
+	
+			try:
+				dirname = str(self.raptor.logFileName.Dir())
+				if dirname and not os.path.isdir(dirname):
+					os.makedirs(dirname)
+			except os.error, e:
+				if e.errno != os.errno.EEXIST:
+					sys.stderr.write("%s : error: cannot create directory " +
+							"%s\n" % (raptor.name, dirname))
+					return False
+			try:
+				self.out = open(str(self.logFileName), "w")
+			except:
+				self.out = None
+				sys.stderr.write("%s : error: cannot write log %s\n" %\
+					(raptor.name, self.logFileName.GetShellPath()))
+				return False
+			
+			# Add extra streams for splitting logfile
+			self.log = str(self.logFileName)
+			self.index = self.log.rfind(".")
+			# If there is no dot, append to the end
+			if self.index < 0:
+				self.index = len(self.log)
+			self.streams = [self.out]
+			
+			# Append this list for extra files
+			stream_list = ["clean", "whatlog", "recipe"]
+				
+			for stream in stream_list:
+				
+				path = self.log[:self.index] + "." + stream + \
+						self.log[self.index:]
+				try:
+					handle = open(path, "w")
+					self.streams.append(handle)
+				except:
+					self.streams.append(self.out)
+					sys.stderr.write("%s : error: cannot write log %s\n" %\
+							(str(raptor.name), path))
+			# self.out = self.streams[0]
+			self.clean = self.streams[1]
+			self.whatlog = self.streams[2]
+			self.recipe = self.streams[3]
+			self.block = self.out
+			
+		else:
+			# Change output stream to stdout and override 'write' function
+			self.out = sys.stdout
+			def stdout_write(text):
+				self.out.write(text)
+				return True
+			self.write = stdout_write
+			
+		return True
+
+
+	def write(self, text):
+		"""Write text into relevant log file"""
+		
+		for textLine in text.splitlines():
+			textLine = textLine + '\n'
+			if textLine.startswith(" tag found " \
+							+ "before previous block closed %s\n" %\
+							(raptor.name, self.logFileName))
+				self.block = self.clean
+				self.block.write(textLine)
+				
+			# Split 'WHATLOG' output into whatlog file
+			elif textLine.startswith(" tag " + \
+							"found before previous block closed\n" %\
+							(raptor.name, self.logFileName.GetShellPath()))
+				self.block = self.whatlog
+				self.block.write(textLine)
+				
+			# Split 'RECIPE' output into recipe file
+			elif textLine.startswith(" tag " + \
+							"found before previous block closed %s\n" %\
+							(raptor.name, self.logFileName.GetShellPath()))
+				self.block = self.recipe
+				self.block.write(textLine)
+				
+			# End of block found. Reset block to standard logfile
+			elif textLine.startswith("") or textLine.startswith("") \
+				or textLine.startswith(""):
+				self.block.write(textLine)
+				self.block = self.out
+			
+		# Everything else goes to logfile associated with current block
+			else:
+				self.block.write(textLine)
+		return True
+
+
+	def summary(self):
+		"""Write Summary"""
+		if self.logFileName and not self.raptor.quiet:
+			sys.stdout.write("sbs: build log in %s\n" % self.logFileName)
+		return True
+
+
+	def close(self):
+		"""Close the log file(s)"""
+
+		try:
+			self.out.close
+			for stream in self.streams:
+				stream.close()
+			return True
+		except:
+			self.out = None
+		return False
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/python/plugins/filter_squashlog.py
--- a/sbsv2/raptor/python/plugins/filter_squashlog.py	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/python/plugins/filter_squashlog.py	Mon Nov 16 09:46:46 2009 +0000
@@ -1,108 +1,108 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# Squash a raptor log file by removing commands from successful recipes
-#
-
-import os
-import sys
-import raptor
-import filter_interface
-
-class FilterSquashlog(filter_interface.Filter):
-	
-	def __init__(self):
-		self.__inRecipe = False
-
-	def open(self, raptor_instance):
-		"""Open a log file for the various I/O methods to write to."""
-		
-		if raptor_instance.logFileName == None:
-			self.out = sys.stdout
-		else:	
-			try:
-				dirname = str(raptor_instance.logFileName.Dir())
-				if dirname and not os.path.isdir(dirname):
-					os.makedirs(dirname)
-			except:
-				sys.stderr.write(str(raptor.name) + \
-						": error: cannot create directory %s\n", dirname)
-				return False
-			
-			try:
-				logname = str(raptor_instance.logFileName)
-				self.out = open(logname, "w")
-			except:
-				self.out = None
-				sys.stderr.write(str(raptor.name) + \
-						": error: cannot write log %s\n", \
-						str(raptor_instance.logFileName))
-				return False
-		
-		return True
-		
-	def write(self, line):
-		"""Write text into a squashed log file by removing commands from successful recipes"""
-		
-		# escape % characters otherwise print will fail
-		line = line.replace("%", "%%")
-		
-		# detect the start of a recipe
-		if line.startswith(""):
-			# print the recipe
-			if self.__squashRecipe:
-				for text in self.__recipeLines:
-					if not text.startswith("+"):
-						self.out.write(text)
-			else:
-				for text in self.__recipeLines:
-					self.out.write(text)
-			
-			self.out.write(line)
-			self.__inRecipe = False
-			return
-
-		# remember the lines during a recipe
-		if self.__inRecipe:
-			self.__recipeLines.append(line)	
-		else:
-			# print all lines outside a recipe 
-			self.out.write(line)
-			
-		return True
-	
-	def close(self):
-		"""Close the log file"""
-		
-		try:
-			self.out.close()
-			return True
-		except:
-			self.out = None
-		return False
+#
+# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# Squash a raptor log file by removing commands from successful recipes
+#
+
+import os
+import sys
+import raptor
+import filter_interface
+
+class FilterSquashlog(filter_interface.Filter):
+	
+	def __init__(self):
+		self.__inRecipe = False
+
+	def open(self, raptor_instance):
+		"""Open a log file for the various I/O methods to write to."""
+		
+		if raptor_instance.logFileName == None:
+			self.out = sys.stdout
+		else:	
+			try:
+				dirname = str(raptor_instance.logFileName.Dir())
+				if dirname and not os.path.isdir(dirname):
+					os.makedirs(dirname)
+			except:
+				sys.stderr.write(str(raptor.name) + \
+						": error: cannot create directory %s\n", dirname)
+				return False
+			
+			try:
+				logname = str(raptor_instance.logFileName)
+				self.out = open(logname, "w")
+			except:
+				self.out = None
+				sys.stderr.write(str(raptor.name) + \
+						": error: cannot write log %s\n", \
+						str(raptor_instance.logFileName))
+				return False
+		
+		return True
+		
+	def write(self, line):
+		"""Write text into a squashed log file by removing commands from successful recipes"""
+		
+		# escape % characters otherwise print will fail
+		line = line.replace("%", "%%")
+		
+		# detect the start of a recipe
+		if line.startswith(""):
+			# print the recipe
+			if self.__squashRecipe:
+				for text in self.__recipeLines:
+					if not text.startswith("+"):
+						self.out.write(text)
+			else:
+				for text in self.__recipeLines:
+					self.out.write(text)
+			
+			self.out.write(line)
+			self.__inRecipe = False
+			return
+
+		# remember the lines during a recipe
+		if self.__inRecipe:
+			self.__recipeLines.append(line)	
+		else:
+			# print all lines outside a recipe 
+			self.out.write(line)
+			
+		return True
+	
+	def close(self):
+		"""Close the log file"""
+		
+		try:
+			self.out.close()
+			return True
+		except:
+			self.out = None
+		return False
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/python/plugins/filter_terminal.py
--- a/sbsv2/raptor/python/plugins/filter_terminal.py	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/python/plugins/filter_terminal.py	Mon Nov 16 09:46:46 2009 +0000
@@ -1,422 +1,422 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# Filter class for filtering XML logs and generating reports
-# Prints errors and warnings to stdout
-#
-
-import sys
-import raptor
-import filter_interface
-import generic_path
-import os
-import os.path
-import re
-
-class Recipe(object):
-	"""State machine that parses a recipe
-	"""
-
-	suppress = []
-	warningRE = re.compile("^.*((Warning:)|(MAKEDEF WARNING:)) .*$", re.DOTALL | re.M | re.I)
-	infoRE = None
-	name = [ "default" ]
-	recipes = []
-
-	def __init__(self, text):
-		self.suppress = self.__class__.suppress
-		self.text = text
-		self.warningRE = Recipe.warningRE
-	
-	def warnings(self):
-		return self.warningRE.findall(self.text)
-
-	def info(self):
-		if self.infoRE:
-			return self.infoRE.findall(self.text)
-		else:
-			return []
-
-	@classmethod			
-	def factory(cls, name, text):
-		for r in Recipe.recipes:
-			if name in r.name:
-				return r(text)
-		return Recipe(text)
-	
-
-class MwLinkerRecipe(Recipe):
-	suppress = [ 
-		re.compile(
-r"^mwldsym2: warning: Cannot locate library \"MSL_All_Static_MSE_Symbian\" specified in #pragma comment\(lib,...\)$"
-r"[\n\r]*mwldsym2: warning: referenced from.*$"
-r"[\n\r]*mwldsym2: warning: Option 'Use default libraries' is enabled but linker used.*$"
-r"[\n\r]*mwldsym2: warning: runtime library from MW\[...\]LibraryFiles \(msl_all_static_mse_symbian_d.lib\);$"
-r"[\n\r]*mwldsym2: warning: this indicates a potential settings/libraries mismatch.*$"
-		, re.M)
-		, re.compile(
-r"^mwldsym2.exe: warning: Multiply defined symbol: ___get_MSL_init_count in.*$"
-r"[\n\r]*mwldsym2.exe: warning: files uc_cwhelp.obj \(.*\), startup.win32.c.obj \(msl_all_static_mse_symbian_d.lib\),.*$"
-r"[\n\r]*mwldsym2.exe: warning: keeping definition in startup.win32.c.obj.*$"
-		, re.M )
-		, re.compile(
-r"^mwldsym2.exe: warning: Option 'Use default libraries' is enabled but linker used.*$"
-r"[\n\r]*mwldsym2.exe: warning: runtime library from MW\[...\]LibraryFiles \(msl_all_static_mse_symbian_d.lib\);.*$"
-r"[\n\r]*mwldsym2.exe: warning: this indicates a potential settings/libraries mismatch.*$"
-	, re.M)
-	]
-	name = [ "win32stagetwolink", "win32simplelink" ]
-
-	def warnings(self):
-		edited = self.text
-		for s in MwLinkerRecipe.suppress:
-			edited = s.sub("", edited)
-		return Recipe.warningRE.findall(edited)
-
-Recipe.recipes.append(MwLinkerRecipe)
-
-
-class FreezeRecipe(Recipe):
-	name = [ "freeze" ]
-	warningRE = re.compile("^(WARNING:) .*$", re.DOTALL | re.M | re.I)
-	infoRE = re.compile("^(EFREEZE:) .*$", re.DOTALL | re.M | re.I)
-
-	def __init__(self, text):
-		Recipe.__init__(self, text)
-		self.warningRE = FreezeRecipe.warningRE
-		self.infoRE = FreezeRecipe.infoRE
-
-Recipe.recipes.append(FreezeRecipe)
-
-
-
-class FilterTerminal(filter_interface.Filter):
-
-	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
-
-	# recipes that we think most users are interested in
-	# and the mapping that we will use to output them as
-	docare = {
-		"asmcompile" : "asmcompile" ,
-		"compile" : "compile" ,
-		"postlink" : "target",
-		"resourcecompile" : "resource",
-		"genstringtable" : "strtable",
-		"tem" : "tem",
-		"bitmapcompile" : "bitmap",
-		"bitmapcopy" : "bitmapcopy",
-		"win32compile2object" : "compile",
-		"win32stagetwolink" : "target",
-		"win32simplelink" : "target",
-		"tools2install" : "target",
-		"compile2object" : "compile",
-		"msvctoolsinstall" : "target",
-		"msvctoolscompile" : "compile",
-		"freeze" : "freeze",
-		"win32archive" : "target"
-	}
-
-	# Determine the width of the largest mapped recipe name
-	recipewidth = 0
-	for i in docare:
-		l = len(docare[i])
-		if l > recipewidth:
-			recipewidth = l # justification for printing out recipes.
-	recipewidth+=1
-
-	def __init__(self):
-		self.analyseonly = False
-		self.quiet = False
-		# defaults can use EPOCROOT
-		if "EPOCROOT" in os.environ:
-			self.epocroot = str(generic_path.Path(os.environ["EPOCROOT"]))
-		else:
-			self.epocroot = str(generic_path.Path('/'))
-		self.current_recipe_logged = False
-		self.cleaned = 0  # cleaned files
-		self.dotcount = 0 # progress dots printed so far
-		# list of strings to catch make errors (must be lowercase)
-		self.make_error_expr = set([
-				"error:",
-				": ***",
-				"make: interrupt/exception caught (code =",
-				"make.exe: interrupt/exception caught (code ="
-				])
-		# list of strings to catch make warnings (must be lowercase)
-		self.make_warning_expr = ["warning:"]
-
-		# list of strings to catch recipe warnings (must be lowercase)
-		self.recipe_warning_expr = ["warning:"]
-
-	def isMakeWarning(self, text):
-                """A simple test for warnings.
-                Can be extended do to more comprehensive checking."""
-		# generic warnings checked
-		# array of make_warning_expr holds all the possible values
-		for warn in self.make_warning_expr:
-			if warn in text.lower():
-				return True
-	
-		return False
-
-
-	def isMakeError(self, text):
-		"""A simple test for errors.	
-		Can be extended to do more comprehensive checking."""
-
-		# make, emake and pvmgmake spit out things like
-		# make: *** No rule to make target X, needed by Y. Stop.
-		#
-		# array of make_error_expr holds all the possible values
-		for err in self.make_error_expr:
-			if err in text.lower():
-				return True
-		
-		return False
-
-
-	def open(self, raptor_instance):
-		"""Set output to stdout for the various I/O methods to write to."""
-		self.raptor = raptor_instance
-
-		# Be totally silent?
-		if self.raptor.logFileName is None:
-			self.analyseonly = True
-
-		# Only print errors and warnings?
-		if self.raptor.quiet:
-			self.quiet = True
-		
-		# keep count of errors and warnings
-		self.err_count = 0
-		self.warn_count = 0
-		self.suppressed_warn_count = 0
-		self.inBody = False
-		self.inRecipe = False
-		return True
-		
-	def write(self, text):
-		"""Write errors and warnings to stdout"""
-		
-		if text.startswith("")
-			end = text.rfind("<")
-			self.err_count += 1
-			if not self.analyseonly:
-				sys.stderr.write(str(raptor.name) + ": error: %s\n" \
-						% text[(start + 1):end])
-		elif text.startswith("")
-			end = text.rfind("<")
-			self.warn_count += 1
-			if not self.analyseonly:
-				sys.stdout.write(str(raptor.name) + ": warning: %s\n" \
-					% text[(start + 1):end])
-		elif text.startswith(""):
-			# detect the end of a recipe
-			if not self.inRecipe:
-				sys.stdout.flush()
-				sys.stderr.write(self.formatError("Closing recipe tag found " \
-						+ "before opening recipe tag:\nUnable to print " \
-						+ "recipe data (Possible logfile corruption)"))
-				sys.stderr.flush()
-			else:
-				self.inRecipe = False
-				
-				if self.failed == True:
-					if not self.analyseonly:
-						sys.stderr.write("\n FAILED %s for %s: %s\n" % \
-								(self.recipe_dict['name'],
-								self.recipe_dict['config'],
-								self.recipe_dict['name_to_user']))
-	
-						mmppath = generic_path.Path(self.recipe_dict['mmp']).From(generic_path.CurrentDir()).GetShellPath()
-						sys.stderr.write("  mmp: %s\n" % mmppath)
-						for L in self.recipeBody:
-							if not L.startswith('+'):
-								sys.stdout.write("   %s\n" % L.rstrip())
-					self.err_count += 1
-				else:
-					r = Recipe.factory(self.recipe_dict['name'], "".join(self.recipeBody))
-					warnings = r.warnings()
-					info = r.info()
-					if len(warnings) > 0:
-						if not self.analyseonly:
-							for L in self.recipeBody:
-								if not L.startswith('+'):
-									sys.stdout.write("   %s\n" % L.rstrip())
-						self.warn_count += len(warnings)
-	
-				self.recipeBody = []
-			return
-		elif not self.inRecipe and self.isMakeError(text):
-			# these two statements pick up errors coming from make
-			self.err_count += 1
-			sys.stderr.write("    %s\n" % text.rstrip())
-			return
-		elif not self.inRecipe and self.isMakeWarning(text):
-			self.warn_count += 1
-			sys.stdout.write("    %s\n" % text.rstrip())
-			return
-		elif text.startswith(""):
-			if self.inRecipe:
-				self.inBody = False
-		elif text.startswith("Copied"):
-			if not self.analyseonly and not self.quiet:
-				start = text.find(" to ") + 4
-				end = text.find("",start)
-				short_target = text[start:end]
-				if short_target.startswith(self.epocroot):
-					short_target = short_target.replace(self.epocroot,"")[1:]
-				short_target = generic_path.Path(short_target).GetShellPath()
-				sys.stdout.write(" %s: %s\n" % ("export".ljust(FilterTerminal.recipewidth), short_target))
-			return
-		elif text.find(" 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,
-					self.err_count))
-		else:
-			sys.stdout.write("\nno warnings or errors\n")
-
-		sys.stdout.write("\nRun time %d seconds\n" % self.raptor.runtime);
-		sys.stdout.write("\n")
-		return True
-	
-	def close(self):
-		"""Tell raptor that there were errors."""
-		if self.err_count > 0:
-			return False
-		return True
-
+#
+# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# Filter class for filtering XML logs and generating reports
+# Prints errors and warnings to stdout
+#
+
+import sys
+import raptor
+import filter_interface
+import generic_path
+import os
+import os.path
+import re
+
+class Recipe(object):
+	"""State machine that parses a recipe
+	"""
+
+	suppress = []
+	warningRE = re.compile("^.*((Warning:)|(MAKEDEF WARNING:)) .*$", re.DOTALL | re.M | re.I)
+	infoRE = None
+	name = [ "default" ]
+	recipes = []
+
+	def __init__(self, text):
+		self.suppress = self.__class__.suppress
+		self.text = text
+		self.warningRE = Recipe.warningRE
+	
+	def warnings(self):
+		return self.warningRE.findall(self.text)
+
+	def info(self):
+		if self.infoRE:
+			return self.infoRE.findall(self.text)
+		else:
+			return []
+
+	@classmethod			
+	def factory(cls, name, text):
+		for r in Recipe.recipes:
+			if name in r.name:
+				return r(text)
+		return Recipe(text)
+	
+
+class MwLinkerRecipe(Recipe):
+	suppress = [ 
+		re.compile(
+r"^mwldsym2: warning: Cannot locate library \"MSL_All_Static_MSE_Symbian\" specified in #pragma comment\(lib,...\)$"
+r"[\n\r]*mwldsym2: warning: referenced from.*$"
+r"[\n\r]*mwldsym2: warning: Option 'Use default libraries' is enabled but linker used.*$"
+r"[\n\r]*mwldsym2: warning: runtime library from MW\[...\]LibraryFiles \(msl_all_static_mse_symbian_d.lib\);$"
+r"[\n\r]*mwldsym2: warning: this indicates a potential settings/libraries mismatch.*$"
+		, re.M)
+		, re.compile(
+r"^mwldsym2.exe: warning: Multiply defined symbol: ___get_MSL_init_count in.*$"
+r"[\n\r]*mwldsym2.exe: warning: files uc_cwhelp.obj \(.*\), startup.win32.c.obj \(msl_all_static_mse_symbian_d.lib\),.*$"
+r"[\n\r]*mwldsym2.exe: warning: keeping definition in startup.win32.c.obj.*$"
+		, re.M )
+		, re.compile(
+r"^mwldsym2.exe: warning: Option 'Use default libraries' is enabled but linker used.*$"
+r"[\n\r]*mwldsym2.exe: warning: runtime library from MW\[...\]LibraryFiles \(msl_all_static_mse_symbian_d.lib\);.*$"
+r"[\n\r]*mwldsym2.exe: warning: this indicates a potential settings/libraries mismatch.*$"
+	, re.M)
+	]
+	name = [ "win32stagetwolink", "win32simplelink" ]
+
+	def warnings(self):
+		edited = self.text
+		for s in MwLinkerRecipe.suppress:
+			edited = s.sub("", edited)
+		return Recipe.warningRE.findall(edited)
+
+Recipe.recipes.append(MwLinkerRecipe)
+
+
+class FreezeRecipe(Recipe):
+	name = [ "freeze" ]
+	warningRE = re.compile("^(WARNING:) .*$", re.DOTALL | re.M | re.I)
+	infoRE = re.compile("^(EFREEZE:) .*$", re.DOTALL | re.M | re.I)
+
+	def __init__(self, text):
+		Recipe.__init__(self, text)
+		self.warningRE = FreezeRecipe.warningRE
+		self.infoRE = FreezeRecipe.infoRE
+
+Recipe.recipes.append(FreezeRecipe)
+
+
+
+class FilterTerminal(filter_interface.Filter):
+
+	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
+
+	# recipes that we think most users are interested in
+	# and the mapping that we will use to output them as
+	docare = {
+		"asmcompile" : "asmcompile" ,
+		"compile" : "compile" ,
+		"postlink" : "target",
+		"resourcecompile" : "resource",
+		"genstringtable" : "strtable",
+		"tem" : "tem",
+		"bitmapcompile" : "bitmap",
+		"bitmapcopy" : "bitmapcopy",
+		"win32compile2object" : "compile",
+		"win32stagetwolink" : "target",
+		"win32simplelink" : "target",
+		"tools2install" : "target",
+		"compile2object" : "compile",
+		"msvctoolsinstall" : "target",
+		"msvctoolscompile" : "compile",
+		"freeze" : "freeze",
+		"win32archive" : "target"
+	}
+
+	# Determine the width of the largest mapped recipe name
+	recipewidth = 0
+	for i in docare:
+		l = len(docare[i])
+		if l > recipewidth:
+			recipewidth = l # justification for printing out recipes.
+	recipewidth+=1
+
+	def __init__(self):
+		self.analyseonly = False
+		self.quiet = False
+		# defaults can use EPOCROOT
+		if "EPOCROOT" in os.environ:
+			self.epocroot = str(generic_path.Path(os.environ["EPOCROOT"]))
+		else:
+			self.epocroot = str(generic_path.Path('/'))
+		self.current_recipe_logged = False
+		self.cleaned = 0  # cleaned files
+		self.dotcount = 0 # progress dots printed so far
+		# list of strings to catch make errors (must be lowercase)
+		self.make_error_expr = set([
+				"error:",
+				": ***",
+				"make: interrupt/exception caught (code =",
+				"make.exe: interrupt/exception caught (code ="
+				])
+		# list of strings to catch make warnings (must be lowercase)
+		self.make_warning_expr = ["warning:"]
+
+		# list of strings to catch recipe warnings (must be lowercase)
+		self.recipe_warning_expr = ["warning:"]
+
+	def isMakeWarning(self, text):
+                """A simple test for warnings.
+                Can be extended do to more comprehensive checking."""
+		# generic warnings checked
+		# array of make_warning_expr holds all the possible values
+		for warn in self.make_warning_expr:
+			if warn in text.lower():
+				return True
+	
+		return False
+
+
+	def isMakeError(self, text):
+		"""A simple test for errors.	
+		Can be extended to do more comprehensive checking."""
+
+		# make, emake and pvmgmake spit out things like
+		# make: *** No rule to make target X, needed by Y. Stop.
+		#
+		# array of make_error_expr holds all the possible values
+		for err in self.make_error_expr:
+			if err in text.lower():
+				return True
+		
+		return False
+
+
+	def open(self, raptor_instance):
+		"""Set output to stdout for the various I/O methods to write to."""
+		self.raptor = raptor_instance
+
+		# Be totally silent?
+		if self.raptor.logFileName is None:
+			self.analyseonly = True
+
+		# Only print errors and warnings?
+		if self.raptor.quiet:
+			self.quiet = True
+		
+		# keep count of errors and warnings
+		self.err_count = 0
+		self.warn_count = 0
+		self.suppressed_warn_count = 0
+		self.inBody = False
+		self.inRecipe = False
+		return True
+		
+	def write(self, text):
+		"""Write errors and warnings to stdout"""
+		
+		if text.startswith("")
+			end = text.rfind("<")
+			self.err_count += 1
+			if not self.analyseonly:
+				sys.stderr.write(str(raptor.name) + ": error: %s\n" \
+						% text[(start + 1):end])
+		elif text.startswith("")
+			end = text.rfind("<")
+			self.warn_count += 1
+			if not self.analyseonly:
+				sys.stdout.write(str(raptor.name) + ": warning: %s\n" \
+					% text[(start + 1):end])
+		elif text.startswith(""):
+			# detect the end of a recipe
+			if not self.inRecipe:
+				sys.stdout.flush()
+				sys.stderr.write(self.formatError("Closing recipe tag found " \
+						+ "before opening recipe tag:\nUnable to print " \
+						+ "recipe data (Possible logfile corruption)"))
+				sys.stderr.flush()
+			else:
+				self.inRecipe = False
+				
+				if self.failed == True:
+					if not self.analyseonly:
+						sys.stderr.write("\n FAILED %s for %s: %s\n" % \
+								(self.recipe_dict['name'],
+								self.recipe_dict['config'],
+								self.recipe_dict['name_to_user']))
+	
+						mmppath = generic_path.Path(self.recipe_dict['mmp']).From(generic_path.CurrentDir()).GetShellPath()
+						sys.stderr.write("  mmp: %s\n" % mmppath)
+						for L in self.recipeBody:
+							if not L.startswith('+'):
+								sys.stdout.write("   %s\n" % L.rstrip())
+					self.err_count += 1
+				else:
+					r = Recipe.factory(self.recipe_dict['name'], "".join(self.recipeBody))
+					warnings = r.warnings()
+					info = r.info()
+					if len(warnings) > 0:
+						if not self.analyseonly:
+							for L in self.recipeBody:
+								if not L.startswith('+'):
+									sys.stdout.write("   %s\n" % L.rstrip())
+						self.warn_count += len(warnings)
+	
+				self.recipeBody = []
+			return
+		elif not self.inRecipe and self.isMakeError(text):
+			# these two statements pick up errors coming from make
+			self.err_count += 1
+			sys.stderr.write("    %s\n" % text.rstrip())
+			return
+		elif not self.inRecipe and self.isMakeWarning(text):
+			self.warn_count += 1
+			sys.stdout.write("    %s\n" % text.rstrip())
+			return
+		elif text.startswith(""):
+			if self.inRecipe:
+				self.inBody = False
+		elif text.startswith("Copied"):
+			if not self.analyseonly and not self.quiet:
+				start = text.find(" to ") + 4
+				end = text.find("",start)
+				short_target = text[start:end]
+				if short_target.startswith(self.epocroot):
+					short_target = short_target.replace(self.epocroot,"")[1:]
+				short_target = generic_path.Path(short_target).GetShellPath()
+				sys.stdout.write(" %s: %s\n" % ("export".ljust(FilterTerminal.recipewidth), short_target))
+			return
+		elif text.find(" 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,
+					self.err_count))
+		else:
+			sys.stdout.write("\nno warnings or errors\n")
+
+		sys.stdout.write("\nRun time %d seconds\n" % self.raptor.runtime);
+		sys.stdout.write("\n")
+		return True
+	
+	def close(self):
+		"""Tell raptor that there were errors."""
+		if self.err_count > 0:
+			return False
+		return True
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/python/plugins/filter_what.py
--- a/sbsv2/raptor/python/plugins/filter_what.py	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/python/plugins/filter_what.py	Mon Nov 16 09:46:46 2009 +0000
@@ -1,128 +1,128 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# Filter class for doing --what and --check operations
-#
-
-import os
-import sys
-import re
-import filter_interface
-
-class FilterWhat(filter_interface.Filter):
-
-	
-	def print_file(self, line, start, end):
-		"Ensure DOS slashes on Windows"
-		
-		"""Use chars between enclosing tags ("<>", "''", etc)
-				start = opening tag, so the line we need
-				actually starts at 'start + 1' """
-		if "win" in self.buildparameters.platform:
-			filename = line[(start + 1):end].replace("/","\\")
-		else:
-			filename = line[(start + 1):end]
-			
-		if self.check:
-			if not os.path.isfile(filename):
-				print "MISSING:", filename
-				self.ok = False
-		else:
-			self.outfile.write(filename+"\n")
-
-
-	def open(self, build_parameters):
-		"initialise"
-		
-		self.buildparameters = build_parameters
-		self.check = build_parameters.doCheck
-		self.what = build_parameters.doWhat
-
-		self.outfile = sys.stdout
-		self.outfile_close = False
-
-		if "FILTERWHAT_FILE" in os.environ:
-			try:
-				self.outfile = open(os.environ['FILTERWHAT_FILE'],"w+")
-				self.outfile_close = True
-			except Exception,e:
-				raise Exception("The 'What Filter' could not open the output file specified in the FILTER_WHAT environment variable: " + os.environ['FILTERWHAT_FILE'])
-		
-		# repetitions is for tracking repeated lines in the output log
-		# when --check and --what are called
-		self.repetitions = {}
-		
-		"Regex for old what output"
-		if "win" in self.buildparameters.platform:
-			self.regex = re.compile("^[a-zA-Z]:\S+$")
-		else:
-			self.regex = re.compile("^/\S+$")
-		
-		"Regex for targets"
-		self.target_regex = re.compile("^<(build|stringtable|resource|bitmap)>.*")
-			
-		"Regex for exports"
-		self.export_regex = re.compile("^.*")
-		
-		self.ok = True		
-		return self.ok
-	
-	def write(self, text):
-		"process some log text"
-		
-		for line in text.splitlines():
-			line = line.rstrip()
-			
-			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))
-					
-				if self.target_regex.match(line):
-					"Grab the filename between  and " 
-					start = line.find(">")
-					end = line.rfind("<")
-					
-					self.print_file(line, start, end)
-					
-				elif self.export_regex.match(line):
-					"Grab the filename between the first set of '' chars" 
-					start = line.find("'")
-					end = line.find("'", (start + 1))
-					
-					self.print_file(line, start, end)
-						
-				elif self.zip_export_regex.match(line):
-					"Grab the filename between  and " 
-					start = line.find(">")
-					end = line.rfind("<")
-					
-					self.print_file(line, start, end)
-						
-			self.repetitions[line] += 1
-				
-		return self.ok
-	
-	def close(self):
-		if self.outfile_close:
-			self.outfile.close()
-		return self.ok
-						
-	
+#
+# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# Filter class for doing --what and --check operations
+#
+
+import os
+import sys
+import re
+import filter_interface
+
+class FilterWhat(filter_interface.Filter):
+
+	
+	def print_file(self, line, start, end):
+		"Ensure DOS slashes on Windows"
+		
+		"""Use chars between enclosing tags ("<>", "''", etc)
+				start = opening tag, so the line we need
+				actually starts at 'start + 1' """
+		if "win" in self.buildparameters.platform:
+			filename = line[(start + 1):end].replace("/","\\")
+		else:
+			filename = line[(start + 1):end]
+			
+		if self.check:
+			if not os.path.isfile(filename):
+				print "MISSING:", filename
+				self.ok = False
+		else:
+			self.outfile.write(filename+"\n")
+
+
+	def open(self, build_parameters):
+		"initialise"
+		
+		self.buildparameters = build_parameters
+		self.check = build_parameters.doCheck
+		self.what = build_parameters.doWhat
+
+		self.outfile = sys.stdout
+		self.outfile_close = False
+
+		if "FILTERWHAT_FILE" in os.environ:
+			try:
+				self.outfile = open(os.environ['FILTERWHAT_FILE'],"w+")
+				self.outfile_close = True
+			except Exception,e:
+				raise Exception("The 'What Filter' could not open the output file specified in the FILTER_WHAT environment variable: " + os.environ['FILTERWHAT_FILE'])
+		
+		# repetitions is for tracking repeated lines in the output log
+		# when --check and --what are called
+		self.repetitions = {}
+		
+		"Regex for old what output"
+		if "win" in self.buildparameters.platform:
+			self.regex = re.compile("^[a-zA-Z]:\S+$")
+		else:
+			self.regex = re.compile("^/\S+$")
+		
+		"Regex for targets"
+		self.target_regex = re.compile("^<(build|stringtable|resource|bitmap)>.*")
+			
+		"Regex for exports"
+		self.export_regex = re.compile("^.*")
+		
+		self.ok = True		
+		return self.ok
+	
+	def write(self, text):
+		"process some log text"
+		
+		for line in text.splitlines():
+			line = line.rstrip()
+			
+			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))
+					
+				if self.target_regex.match(line):
+					"Grab the filename between  and " 
+					start = line.find(">")
+					end = line.rfind("<")
+					
+					self.print_file(line, start, end)
+					
+				elif self.export_regex.match(line):
+					"Grab the filename between the first set of '' chars" 
+					start = line.find("'")
+					end = line.find("'", (start + 1))
+					
+					self.print_file(line, start, end)
+						
+				elif self.zip_export_regex.match(line):
+					"Grab the filename between  and " 
+					start = line.find(">")
+					end = line.rfind("<")
+					
+					self.print_file(line, start, end)
+						
+			self.repetitions[line] += 1
+				
+		return self.ok
+	
+	def close(self):
+		if self.outfile_close:
+			self.outfile.close()
+		return self.ok
+						
+	
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/python/pyparsing.py
--- a/sbsv2/raptor/python/pyparsing.py	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/python/pyparsing.py	Mon Nov 16 09:46:46 2009 +0000
@@ -1,2961 +1,2961 @@
-# module pyparsing.py

-#

-# Copyright (c) 2003-2006  Paul T. McGuire

-#

-# Permission is hereby granted, free of charge, to any person obtaining

-# a copy of this software and associated documentation files (the

-# "Software"), to deal in the Software without restriction, including

-# without limitation the rights to use, copy, modify, merge, publish,

-# distribute, sublicense, and/or sell copies of the Software, and to

-# permit persons to whom the Software is furnished to do so, subject to

-# the following conditions:

-#

-# The above copyright notice and this permission notice shall be

-# included in all copies or substantial portions of the Software.

-#

-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,

-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF

-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY

-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,

-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE

-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

-#

-#from __future__ import generators

-

-__doc__ = \
-"""

-pyparsing module - Classes and methods to define and execute parsing grammars

-

-The pyparsing module is an alternative approach to creating and executing simple grammars, 

-vs. the traditional lex/yacc approach, or the use of regular expressions.  With pyparsing, you

-don't need to learn a new syntax for defining grammars or matching expressions - the parsing module 

-provides a library of classes that you use to construct the grammar directly in Python.

-

-Here is a program to parse "Hello, World!" (or any greeting of the form ", !")::

-

-    from pyparsing import Word, alphas

-    

-    # define grammar of a greeting

-    greet = Word( alphas ) + "," + Word( alphas ) + "!" 

-    

-    hello = "Hello, World!"

-    print hello, "->", greet.parseString( hello )

-

-The program outputs the following::

-

-    Hello, World! -> ['Hello', ',', 'World', '!']

-

-The Python representation of the grammar is quite readable, owing to the self-explanatory 

-class names, and the use of '+', '|' and '^' operators.

-

-The parsed results returned from parseString() can be accessed as a nested list, a dictionary, or an 

-object with named attributes.

-

-The pyparsing module handles some of the problems that are typically vexing when writing text parsers:

- - extra or missing whitespace (the above program will also handle "Hello,World!", "Hello  ,  World  !", etc.)

- - quoted strings

- - embedded comments

-"""

-__version__ = "1.4.5"

-__versionTime__ = "16 December 2006 07:20"

-__author__ = "Paul McGuire "

-

-import string

-import copy,sys

-import warnings

-import re

-import sre_constants

-import xml.sax.saxutils

-#~ sys.stderr.write( "testing pyparsing module, version %s, %s\n" % (__version__,__versionTime__ ) )

-

-def _ustr(obj):

-    """Drop-in replacement for str(obj) that tries to be Unicode friendly. It first tries

-       str(obj). If that fails with a UnicodeEncodeError, then it tries unicode(obj). It

-       then < returns the unicode object | encodes it with the default encoding | ... >.

-    """

-    try:

-        # If this works, then _ustr(obj) has the same behaviour as str(obj), so

-        # it won't break any existing code.

-        return str(obj)

-        

-    except UnicodeEncodeError, e:

-        # The Python docs (http://docs.python.org/ref/customization.html#l2h-182)

-        # state that "The return value must be a string object". However, does a

-        # unicode object (being a subclass of basestring) count as a "string

-        # object"?

-        # If so, then return a unicode object:

-        return unicode(obj)

-        # Else encode it... but how? There are many choices... :)

-        # Replace unprintables with escape codes?

-        #return unicode(obj).encode(sys.getdefaultencoding(), 'backslashreplace_errors')

-        # Replace unprintables with question marks?

-        #return unicode(obj).encode(sys.getdefaultencoding(), 'replace')

-        # ...

-

-def _str2dict(strg):

-    return dict( [(c,0) for c in strg] )

-    #~ return set( [c for c in strg] )

-

-class _Constants(object):

-    pass

-    

-alphas     = string.lowercase + string.uppercase

-nums       = string.digits

-hexnums    = nums + "ABCDEFabcdef"

-alphanums  = alphas + nums    

-

-class ParseBaseException(Exception):

-    """base exception class for all parsing runtime exceptions"""

-    __slots__ = ( "loc","msg","pstr","parserElement" )

-    # Performance tuning: we construct a *lot* of these, so keep this

-    # constructor as small and fast as possible        

-    def __init__( self, pstr, loc, msg, elem=None ):

-        self.loc = loc

-        self.msg = msg

-        self.pstr = pstr

-        self.parserElement = elem

-

-    def __getattr__( self, aname ):

-        """supported attributes by name are:

-            - lineno - returns the line number of the exception text

-            - col - returns the column number of the exception text

-            - line - returns the line containing the exception text

-        """

-        if( aname == "lineno" ):

-            return lineno( self.loc, self.pstr )

-        elif( aname in ("col", "column") ):

-            return col( self.loc, self.pstr )

-        elif( aname == "line" ):

-            return line( self.loc, self.pstr )

-        else:

-            raise AttributeError, aname

-

-    def __str__( self ):

-        return "%s (at char %d), (line:%d, col:%d)" % ( self.msg, self.loc, self.lineno, self.column )

-    def __repr__( self ):

-        return _ustr(self)

-    def markInputline( self, markerString = ">!<" ):

-        """Extracts the exception line from the input string, and marks 

-           the location of the exception with a special symbol.

-        """

-        line_str = self.line

-        line_column = self.column - 1

-        if markerString:

-            line_str = "".join( [line_str[:line_column], markerString, line_str[line_column:]])

-        return line_str.strip()

-

-class ParseException(ParseBaseException):

-    """exception thrown when parse expressions don't match class"""

-    """supported attributes by name are:

-        - lineno - returns the line number of the exception text

-        - col - returns the column number of the exception text

-        - line - returns the line containing the exception text

-    """

-    pass

-    

-class ParseFatalException(ParseBaseException):

-    """user-throwable exception thrown when inconsistent parse content

-       is found; stops all parsing immediately"""

-    pass

-

-class ReparseException(ParseBaseException):

-    def __init_( self, newstring, restartLoc ):

-        self.newParseText = newstring

-        self.reparseLoc = restartLoc

-

-

-class RecursiveGrammarException(Exception):

-    """exception thrown by validate() if the grammar could be improperly recursive"""

-    def __init__( self, parseElementList ):

-        self.parseElementTrace = parseElementList

-    

-    def __str__( self ):

-        return "RecursiveGrammarException: %s" % self.parseElementTrace

-

-class ParseResults(object):

-    """Structured parse results, to provide multiple means of access to the parsed data:

-       - as a list (len(results))

-       - by list index (results[0], results[1], etc.)

-       - by attribute (results.)

-       """

-    __slots__ = ( "__toklist", "__tokdict", "__doinit", "__name", "__parent", "__accumNames" )

-    def __new__(cls, toklist, name=None, asList=True, modal=True ):

-        if isinstance(toklist, cls):

-            return toklist

-        retobj = object.__new__(cls)

-        retobj.__doinit = True

-        return retobj

-        

-    # Performance tuning: we construct a *lot* of these, so keep this

-    # constructor as small and fast as possible

-    def __init__( self, toklist, name=None, asList=True, modal=True ):

-        if self.__doinit:

-            self.__doinit = False

-            self.__name = None

-            self.__parent = None

-            self.__accumNames = {}

-            if isinstance(toklist, list):

-                self.__toklist = toklist[:]

-            else:

-                self.__toklist = [toklist]

-            self.__tokdict = dict()

-

-        # this line is related to debugging the asXML bug

-        #~ asList = False

-        

-        if name:

-            if not modal:

-                self.__accumNames[name] = 0

-            if isinstance(name,int):

-                name = _ustr(name) # will always return a str, but use _ustr for consistency

-            self.__name = name

-            if not toklist in (None,'',[]):

-                if isinstance(toklist,basestring): 

-                    toklist = [ toklist ]

-                if asList:

-                    if isinstance(toklist,ParseResults):

-                        self[name] = (toklist.copy(),-1)

-                    else:

-                        self[name] = (ParseResults(toklist[0]),-1)

-                    self[name].__name = name

-                else:

-                    try:

-                        self[name] = toklist[0]

-                    except (KeyError,TypeError):

-                        self[name] = toklist

-

-    def __getitem__( self, i ):

-        if isinstance( i, (int,slice) ):

-            return self.__toklist[i]

-        else:

-            if i not in self.__accumNames:

-                return self.__tokdict[i][-1][0]

-            else:

-                return ParseResults([ v[0] for v in self.__tokdict[i] ])

-

-    def __setitem__( self, k, v ):

-        if isinstance(v,tuple):

-            self.__tokdict[k] = self.__tokdict.get(k,list()) + [v]

-            sub = v[0]

-        elif isinstance(k,int):

-            self.__toklist[k] = v

-            sub = v

-        else:

-            self.__tokdict[k] = self.__tokdict.get(k,list()) + [(v,0)]

-            sub = v

-        if isinstance(sub,ParseResults):

-            sub.__parent = self

-        

-    def __delitem__( self, i ):

-        if isinstance(i,(int,slice)):

-            del self.__toklist[i]

-        else:

-            del self._tokdict[i]

-

-    def __contains__( self, k ):

-        return self.__tokdict.has_key(k)

-        

-    def __len__( self ): return len( self.__toklist )

-    def __nonzero__( self ): return len( self.__toklist ) > 0

-    def __iter__( self ): return iter( self.__toklist )

-    def keys( self ): 

-        """Returns all named result keys."""

-        return self.__tokdict.keys()

-    

-    def items( self ): 

-        """Returns all named result keys and values as a list of tuples."""

-        return [(k,self[k]) for k in self.__tokdict.keys()]

-    

-    def values( self ): 

-        """Returns all named result values."""

-        return [ v[-1][0] for v in self.__tokdict.values() ]

-

-    def __getattr__( self, name ):

-        if name not in self.__slots__:

-            if self.__tokdict.has_key( name ):

-                if name not in self.__accumNames:

-                    return self.__tokdict[name][-1][0]

-                else:

-                    return ParseResults([ v[0] for v in self.__tokdict[name] ])

-            else:

-                return ""

-        return None

-

-    def __add__( self, other ):

-        ret = self.copy()

-        ret += other

-        return ret

-        

-    def __iadd__( self, other ):

-        if other.__tokdict:

-            offset = len(self.__toklist)

-            addoffset = ( lambda a: (a<0 and offset) or (a+offset) )

-            otheritems = other.__tokdict.items()

-            otherdictitems = [(k,(v[0],addoffset(v[1])) ) for (k,vlist) in otheritems for v in vlist]

-            for k,v in otherdictitems:

-                self[k] = v

-                if isinstance(v[0],ParseResults):

-                    v[0].__parent = self

-        self.__toklist += other.__toklist

-        self.__accumNames.update( other.__accumNames )

-        del other

-        return self

-       

-    def __repr__( self ):

-        return "(%s, %s)" % ( repr( self.__toklist ), repr( self.__tokdict ) )

-

-    def __str__( self ):

-        out = "["

-        sep = ""

-        for i in self.__toklist:

-            if isinstance(i, ParseResults):

-                out += sep + _ustr(i)

-            else:

-                out += sep + repr(i)

-            sep = ", "

-        out += "]"

-        return out

-

-    def _asStringList( self, sep='' ):

-        out = []

-        for item in self.__toklist:

-            if out and sep:

-                out.append(sep)

-            if isinstance( item, ParseResults ):

-                out += item._asStringList()

-            else:

-                out.append( _ustr(item) )

-        return out

-

-    def asList( self ):

-        """Returns the parse results as a nested list of matching tokens, all converted to strings."""

-        out = []

-        for res in self.__toklist:

-            if isinstance(res,ParseResults):

-                out.append( res.asList() )

-            else:

-                out.append( res )

-        return out

-

-    def asDict( self ):

-        """Returns the named parse results as dictionary."""

-        return dict( self.items() )

-

-    def copy( self ):

-        """Returns a new copy of a ParseResults object."""

-        ret = ParseResults( self.__toklist )

-        ret.__tokdict = self.__tokdict.copy()

-        ret.__parent = self.__parent

-        ret.__accumNames.update( self.__accumNames )

-        ret.__name = self.__name

-        return ret

-        

-    def asXML( self, doctag=None, namedItemsOnly=False, indent="", formatted=True ):

-        """Returns the parse results as XML. Tags are created for tokens and lists that have defined results names."""

-        nl = "\n"

-        out = []

-        namedItems = dict( [ (v[1],k) for (k,vlist) in self.__tokdict.items() for v in vlist ] )

-        nextLevelIndent = indent + "  "

-        

-        # collapse out indents if formatting is not desired

-        if not formatted:

-            indent = ""

-            nextLevelIndent = ""

-            nl = ""

-            

-        selfTag = None

-        if doctag is not None:

-            selfTag = doctag

-        else:

-            if self.__name:

-                selfTag = self.__name

-        

-        if not selfTag:

-            if namedItemsOnly:

-                return ""

-            else:

-                selfTag = "ITEM"

-        

-        out += [ nl, indent, "<", selfTag, ">" ]

-        

-        worklist = self.__toklist

-        for i,res in enumerate(worklist):

-            if isinstance(res,ParseResults):

-                if i in namedItems:

-                    out += [ res.asXML(namedItems[i], namedItemsOnly and doctag is None, nextLevelIndent,formatted)]

-                else:

-                    out += [ res.asXML(None, namedItemsOnly and doctag is None, nextLevelIndent,formatted)]

-            else:

-                # individual token, see if there is a name for it

-                resTag = None

-                if i in namedItems:

-                    resTag = namedItems[i]

-                if not resTag:

-                    if namedItemsOnly:

-                        continue

-                    else:

-                        resTag = "ITEM"

-                xmlBodyText = xml.sax.saxutils.escape(_ustr(res))

-                out += [ nl, nextLevelIndent, "<", resTag, ">", xmlBodyText, "" ]

-        

-        out += [ nl, indent, "" ]

-        return "".join(out)

-

-    def __lookup(self,sub):

-        for k,vlist in self.__tokdict.items():

-            for v,loc in vlist:

-                if sub is v:

-                    return k

-        return None

-            

-    def getName(self):

-        """Returns the results name for this token expression."""

-        if self.__name:

-            return self.__name

-        elif self.__parent:

-            par = self.__parent

-            if par:

-                return par.__lookup(self)

-            else:

-                return None

-        elif (len(self) == 1 and 

-               len(self.__tokdict) == 1 and

-               self.__tokdict.values()[0][0][1] in (0,-1)):

-            return self.__tokdict.keys()[0]

-        else:

-            return None

-            

-    def dump(self,indent='',depth=0):

-        """Diagnostic method for listing out the contents of a ParseResults.

-           Accepts an optional indent argument so that this string can be embedded

-           in a nested display of other data."""

-        out = []

-        out.append( indent+str(self.asList()) )

-        keys = self.items()

-        keys.sort()

-        for k,v in keys:

-            if out:

-                out.append('\n')

-            out.append( "%s%s- %s: " % (indent,('  '*depth), k) )

-            if isinstance(v,ParseResults):

-                if v.keys():

-                    #~ out.append('\n')

-                    out.append( v.dump(indent,depth+1) )

-                    #~ out.append('\n')

-                else:

-                    out.append(str(v))

-            else:

-                out.append(str(v))

-        #~ out.append('\n')

-        return "".join(out)

-

-    # add support for pickle protocol

-    def __getstate__(self):

-        return ( self.__toklist,

-                 ( self.__tokdict.copy(),

-                   self.__parent,

-                   self.__accumNames,

-                   self.__name ) )

-    

-    def __setstate__(self,state):

-        self.__toklist = state[0]

-        self.__tokdict, \

-        self.__parent, \

-        inAccumNames, \

-        self.__name = state[1]

-        self.__accumNames = {}

-        self.__accumNames.update(inAccumNames)

-

-

-def col (loc,strg):

-    """Returns current column within a string, counting newlines as line separators.

-   The first column is number 1.

-   """

-    return (loc 0:

-        return strg[lastCR+1:nextCR]

-    else:

-        return strg[lastCR+1:]

-

-def _defaultStartDebugAction( instring, loc, expr ):

-    print "Match",expr,"at loc",loc,"(%d,%d)" % ( lineno(loc,instring), col(loc,instring) )

-

-def _defaultSuccessDebugAction( instring, startloc, endloc, expr, toks ):

-    print "Matched",expr,"->",toks.asList()

-    

-def _defaultExceptionDebugAction( instring, loc, expr, exc ):

-    print "Exception raised:", exc

-

-def nullDebugAction(*args):

-    """'Do-nothing' debug action, to suppress debugging output during parsing."""

-    pass

-

-class ParserElement(object):

-    """Abstract base level parser element class."""

-    DEFAULT_WHITE_CHARS = " \n\t\r"

-    

-    def setDefaultWhitespaceChars( chars ):

-        """Overrides the default whitespace chars

-        """

-        ParserElement.DEFAULT_WHITE_CHARS = chars

-    setDefaultWhitespaceChars = staticmethod(setDefaultWhitespaceChars)

-    

-    def __init__( self, savelist=False ):

-        self.parseAction = list()

-        self.failAction = None

-        #~ self.name = ""  # don't define self.name, let subclasses try/except upcall

-        self.strRepr = None

-        self.resultsName = None

-        self.saveAsList = savelist

-        self.skipWhitespace = True

-        self.whiteChars = ParserElement.DEFAULT_WHITE_CHARS

-        self.copyDefaultWhiteChars = True

-        self.mayReturnEmpty = False

-        self.keepTabs = False

-        self.ignoreExprs = list()

-        self.debug = False

-        self.streamlined = False

-        self.mayIndexError = True

-        self.errmsg = ""

-        self.modalResults = True

-        self.debugActions = ( None, None, None )

-        self.re = None

-

-    def copy( self ):

-        """Make a copy of this ParserElement.  Useful for defining different parse actions

-           for the same parsing pattern, using copies of the original parse element."""

-        cpy = copy.copy( self )

-        cpy.parseAction = self.parseAction[:]

-        cpy.ignoreExprs = self.ignoreExprs[:]

-        if self.copyDefaultWhiteChars:

-            cpy.whiteChars = ParserElement.DEFAULT_WHITE_CHARS

-        return cpy

-

-    def setName( self, name ):

-        """Define name for this expression, for use in debugging."""

-        self.name = name

-        self.errmsg = "Expected " + self.name

-        return self

-

-    def setResultsName( self, name, listAllMatches=False ):

-        """Define name for referencing matching tokens as a nested attribute 

-           of the returned parse results.

-           NOTE: this returns a *copy* of the original ParserElement object;

-           this is so that the client can define a basic element, such as an

-           integer, and reference it in multiple places with different names.

-        """

-        newself = self.copy()

-        newself.resultsName = name

-        newself.modalResults = not listAllMatches

-        return newself

-

-    def normalizeParseActionArgs( f ):

-        """Internal method used to decorate parse actions that take fewer than 3 arguments,

-           so that all parse actions can be called as f(s,l,t)."""

-        STAR_ARGS = 4

-

-        try:

-            restore = None

-            if isinstance(f,type):

-                restore = f

-                f = f.__init__

-            if f.func_code.co_flags & STAR_ARGS:

-                return f

-            numargs = f.func_code.co_argcount

-            if hasattr(f,"im_self"):

-                numargs -= 1

-            if restore:

-                f = restore

-        except AttributeError:

-            try:

-                # not a function, must be a callable object, get info from the

-                # im_func binding of its bound __call__ method

-                if f.__call__.im_func.func_code.co_flags & STAR_ARGS:

-                    return f

-                numargs = f.__call__.im_func.func_code.co_argcount

-                if hasattr(f.__call__,"im_self"):

-                    numargs -= 1

-            except AttributeError:

-                # not a bound method, get info directly from __call__ method

-                if f.__call__.func_code.co_flags & STAR_ARGS:

-                    return f

-                numargs = f.__call__.func_code.co_argcount

-                if hasattr(f.__call__,"im_self"):

-                    numargs -= 1

-

-        #~ print "adding function %s with %d args" % (f.func_name,numargs)

-        if numargs == 3:

-            return f

-        else:

-            if numargs == 2:

-                def tmp(s,l,t):

-                    return f(l,t)

-            elif numargs == 1:

-                def tmp(s,l,t):

-                    return f(t)

-            else: #~ numargs == 0:

-                def tmp(s,l,t):

-                    return f()

-            return tmp

-    normalizeParseActionArgs = staticmethod(normalizeParseActionArgs)

-            

-    def setParseAction( self, *fns ):

-        """Define action to perform when successfully matching parse element definition.

-           Parse action fn is a callable method with 0-3 arguments, called as fn(s,loc,toks),

-           fn(loc,toks), fn(toks), or just fn(), where:

-            - s   = the original string being parsed

-            - loc = the location of the matching substring

-            - toks = a list of the matched tokens, packaged as a ParseResults object

-           If the functions in fns modify the tokens, they can return them as the return

-           value from fn, and the modified list of tokens will replace the original.

-           Otherwise, fn does not need to return any value."""

-        self.parseAction = map(self.normalizeParseActionArgs, list(fns))

-        return self

-

-    def addParseAction( self, *fns ):

-        """Add parse action to expression's list of parse actions. See setParseAction_."""

-        self.parseAction += map(self.normalizeParseActionArgs, list(fns))

-        return self

-

-    def setFailAction( self, fn ):

-        """Define action to perform if parsing fails at this expression. 

-           Fail acton fn is a callable function that takes the arguments 

-           fn(s,loc,expr,err) where:

-            - s = string being parsed

-            - loc = location where expression match was attempted and failed

-            - expr = the parse expression that failed

-            - err = the exception thrown

-           The function returns no value.  It may throw ParseFatalException

-           if it is desired to stop parsing immediately."""

-        self.failAction = fn

-        return self

-        

-    def skipIgnorables( self, instring, loc ):

-        exprsFound = True

-        while exprsFound:

-            exprsFound = False

-            for e in self.ignoreExprs:

-                try:

-                    while 1:

-                        loc,dummy = e._parse( instring, loc )

-                        exprsFound = True

-                except ParseException:

-                    pass

-        return loc

-

-    def preParse( self, instring, loc ):

-        if self.ignoreExprs:

-            loc = self.skipIgnorables( instring, loc )

-        

-        if self.skipWhitespace:

-            wt = self.whiteChars

-            instrlen = len(instring)

-            while loc < instrlen and instring[loc] in wt:

-                loc += 1

-                

-        return loc

-

-    def parseImpl( self, instring, loc, doActions=True ):

-        return loc, []

-

-    def postParse( self, instring, loc, tokenlist ):

-        return tokenlist

-

-    #~ @profile

-    def _parseNoCache( self, instring, loc, doActions=True, callPreParse=True ):

-        debugging = ( self.debug ) #and doActions )

-

-        if debugging or self.failAction:

-            #~ print "Match",self,"at loc",loc,"(%d,%d)" % ( lineno(loc,instring), col(loc,instring) )

-            if (self.debugActions[0] ):

-                self.debugActions[0]( instring, loc, self )

-            if callPreParse:

-                preloc = self.preParse( instring, loc )

-            else:

-                preloc = loc

-            tokensStart = loc

-            try:

-                try:

-                    loc,tokens = self.parseImpl( instring, preloc, doActions )

-                except IndexError:

-                    raise ParseException( instring, len(instring), self.errmsg, self )

-            #~ except ReparseException, retryEx:

-                #~ pass

-            except ParseException, err:

-                #~ print "Exception raised:", err

-                if self.debugActions[2]:

-                    self.debugActions[2]( instring, tokensStart, self, err )

-                if self.failAction:

-                    self.failAction( instring, tokensStart, self, err )

-                raise

-        else:

-            if callPreParse:

-                preloc = self.preParse( instring, loc )

-            else:

-                preloc = loc

-            tokensStart = loc

-            if self.mayIndexError or loc >= len(instring):

-                try:

-                    loc,tokens = self.parseImpl( instring, preloc, doActions )

-                except IndexError:

-                    raise ParseException( instring, len(instring), self.errmsg, self )

-            else:

-                loc,tokens = self.parseImpl( instring, preloc, doActions )

-        

-        tokens = self.postParse( instring, loc, tokens )

-

-        retTokens = ParseResults( tokens, self.resultsName, asList=self.saveAsList, modal=self.modalResults )

-        if self.parseAction and doActions:

-            if debugging:

-                try:

-                    for fn in self.parseAction:

-                        tokens = fn( instring, tokensStart, retTokens )

-                        if tokens is not None:

-                            retTokens = ParseResults( tokens, 

-                                                      self.resultsName, 

-                                                      asList=self.saveAsList and isinstance(tokens,(ParseResults,list)), 

-                                                      modal=self.modalResults )

-                except ParseException, err:

-                    #~ print "Exception raised in user parse action:", err

-                    if (self.debugActions[2] ):

-                        self.debugActions[2]( instring, tokensStart, self, err )

-                    raise

-            else:

-                for fn in self.parseAction:

-                    tokens = fn( instring, tokensStart, retTokens )

-                    if tokens is not None:

-                        retTokens = ParseResults( tokens, 

-                                                  self.resultsName, 

-                                                  asList=self.saveAsList and isinstance(tokens,(ParseResults,list)), 

-                                                  modal=self.modalResults )

-

-        if debugging:

-            #~ print "Matched",self,"->",retTokens.asList()

-            if (self.debugActions[1] ):

-                self.debugActions[1]( instring, tokensStart, loc, self, retTokens )

-

-        return loc, retTokens

-

-    def tryParse( self, instring, loc ):

-        return self._parse( instring, loc, doActions=False )[0]

-    

-    # this method gets repeatedly called during backtracking with the same arguments -

-    # we can cache these arguments and save ourselves the trouble of re-parsing the contained expression

-    def _parseCache( self, instring, loc, doActions=True, callPreParse=True ):

-        if doActions and self.parseAction:

-            return self._parseNoCache( instring, loc, doActions, callPreParse )

-        lookup = (self,instring,loc,callPreParse)

-        if lookup in ParserElement._exprArgCache:

-            value = ParserElement._exprArgCache[ lookup ]

-            if isinstance(value,Exception):

-                if isinstance(value,ParseBaseException):

-                    value.loc = loc

-                raise value

-            return value

-        else:

-            try:

-                ParserElement._exprArgCache[ lookup ] = \
-                    value = self._parseNoCache( instring, loc, doActions, callPreParse )

-                return value

-            except ParseBaseException, pe:

-                ParserElement._exprArgCache[ lookup ] = pe

-                raise

-

-    _parse = _parseNoCache

-

-    # argument cache for optimizing repeated calls when backtracking through recursive expressions

-    _exprArgCache = {}

-    def resetCache():

-        ParserElement._exprArgCache.clear()

-    resetCache = staticmethod(resetCache)

-    

-    _packratEnabled = False

-    def enablePackrat():

-        """Enables "packrat" parsing, which adds memoizing to the parsing logic.

-           Repeated parse attempts at the same string location (which happens 

-           often in many complex grammars) can immediately return a cached value, 

-           instead of re-executing parsing/validating code.  Memoizing is done of

-           both valid results and parsing exceptions.

-            

-           This speedup may break existing programs that use parse actions that 

-           have side-effects.  For this reason, packrat parsing is disabled when

-           you first import pyparsing.  To activate the packrat feature, your

-           program must call the class method ParserElement.enablePackrat().  If

-           your program uses psyco to "compile as you go", you must call 

-           enablePackrat before calling psyco.full().  If you do not do this,

-           Python will crash.  For best results, call enablePackrat() immediately

-           after importing pyparsing.

-        """

-        if not ParserElement._packratEnabled:

-            ParserElement._packratEnabled = True

-            ParserElement._parse = ParserElement._parseCache

-    enablePackrat = staticmethod(enablePackrat)

-

-    def parseString( self, instring ):

-        """Execute the parse expression with the given string.

-           This is the main interface to the client code, once the complete 

-           expression has been built.

-        """

-        ParserElement.resetCache()

-        if not self.streamlined:

-            self.streamline()

-            #~ self.saveAsList = True

-        for e in self.ignoreExprs:

-            e.streamline()

-        if self.keepTabs:

-            loc, tokens = self._parse( instring, 0 )

-        else:

-            loc, tokens = self._parse( instring.expandtabs(), 0 )

-        return tokens

-

-    def scanString( self, instring, maxMatches=sys.maxint ):

-        """Scan the input string for expression matches.  Each match will return the 

-           matching tokens, start location, and end location.  May be called with optional

-           maxMatches argument, to clip scanning after 'n' matches are found."""

-        if not self.streamlined:

-            self.streamline()

-        for e in self.ignoreExprs:

-            e.streamline()

-        

-        if not self.keepTabs:

-            instring = instring.expandtabs()

-        instrlen = len(instring)

-        loc = 0

-        preparseFn = self.preParse

-        parseFn = self._parse

-        ParserElement.resetCache()

-        matches = 0

-        while loc <= instrlen and matches < maxMatches:

-            try:

-                preloc = preparseFn( instring, loc )

-                nextLoc,tokens = parseFn( instring, preloc, callPreParse=False )

-            except ParseException:

-                loc = preloc+1

-            else:

-                matches += 1

-                yield tokens, preloc, nextLoc

-                loc = nextLoc

-        

-    def transformString( self, instring ):

-        """Extension to scanString, to modify matching text with modified tokens that may

-           be returned from a parse action.  To use transformString, define a grammar and 

-           attach a parse action to it that modifies the returned token list.  

-           Invoking transformString() on a target string will then scan for matches, 

-           and replace the matched text patterns according to the logic in the parse 

-           action.  transformString() returns the resulting transformed string."""

-        out = []

-        lastE = 0

-        # force preservation of s, to minimize unwanted transformation of string, and to

-        # keep string locs straight between transformString and scanString

-        self.keepTabs = True

-        for t,s,e in self.scanString( instring ):

-            out.append( instring[lastE:s] )

-            if t:

-                if isinstance(t,ParseResults):

-                    out += t.asList()

-                elif isinstance(t,list):

-                    out += t

-                else:

-                    out.append(t)

-            lastE = e

-        out.append(instring[lastE:])

-        return "".join(out)

-

-    def searchString( self, instring, maxMatches=sys.maxint ):

-        """Another extension to scanString, simplifying the access to the tokens found

-           to match the given parse expression.  May be called with optional

-           maxMatches argument, to clip searching after 'n' matches are found.

-        """

-        return ParseResults([ t for t,s,e in self.scanString( instring, maxMatches ) ])

-            

-    def __add__(self, other ):

-        """Implementation of + operator - returns And"""

-        if isinstance( other, basestring ):

-            other = Literal( other )

-        if not isinstance( other, ParserElement ):

-            warnings.warn("Cannot add element of type %s to ParserElement" % type(other),

-                    SyntaxWarning, stacklevel=2)

-        return And( [ self, other ] )

-

-    def __radd__(self, other ):

-        """Implementation of += operator"""

-        if isinstance( other, basestring ):

-            other = Literal( other )

-        if not isinstance( other, ParserElement ):

-            warnings.warn("Cannot add element of type %s to ParserElement" % type(other),

-                    SyntaxWarning, stacklevel=2)

-        return other + self

-

-    def __or__(self, other ):

-        """Implementation of | operator - returns MatchFirst"""

-        if isinstance( other, basestring ):

-            other = Literal( other )

-        if not isinstance( other, ParserElement ):

-            warnings.warn("Cannot add element of type %s to ParserElement" % type(other),

-                    SyntaxWarning, stacklevel=2)

-        return MatchFirst( [ self, other ] )

-

-    def __ror__(self, other ):

-        """Implementation of |= operator"""

-        if isinstance( other, basestring ):

-            other = Literal( other )

-        if not isinstance( other, ParserElement ):

-            warnings.warn("Cannot add element of type %s to ParserElement" % type(other),

-                    SyntaxWarning, stacklevel=2)

-        return other | self

-

-    def __xor__(self, other ):

-        """Implementation of ^ operator - returns Or"""

-        if isinstance( other, basestring ):

-            other = Literal( other )

-        if not isinstance( other, ParserElement ):

-            warnings.warn("Cannot add element of type %s to ParserElement" % type(other),

-                    SyntaxWarning, stacklevel=2)

-        return Or( [ self, other ] )

-

-    def __rxor__(self, other ):

-        """Implementation of ^= operator"""

-        if isinstance( other, basestring ):

-            other = Literal( other )

-        if not isinstance( other, ParserElement ):

-            warnings.warn("Cannot add element of type %s to ParserElement" % type(other),

-                    SyntaxWarning, stacklevel=2)

-        return other ^ self

-

-    def __and__(self, other ):

-        """Implementation of & operator - returns Each"""

-        if isinstance( other, basestring ):

-            other = Literal( other )

-        if not isinstance( other, ParserElement ):

-            warnings.warn("Cannot add element of type %s to ParserElement" % type(other),

-                    SyntaxWarning, stacklevel=2)

-        return Each( [ self, other ] )

-

-    def __rand__(self, other ):

-        """Implementation of right-& operator"""

-        if isinstance( other, basestring ):

-            other = Literal( other )

-        if not isinstance( other, ParserElement ):

-            warnings.warn("Cannot add element of type %s to ParserElement" % type(other),

-                    SyntaxWarning, stacklevel=2)

-        return other & self

-

-    def __invert__( self ):

-        """Implementation of ~ operator - returns NotAny"""

-        return NotAny( self )

-

-    def suppress( self ):

-        """Suppresses the output of this ParserElement; useful to keep punctuation from

-           cluttering up returned output.

-        """

-        return Suppress( self )

-

-    def leaveWhitespace( self ):

-        """Disables the skipping of whitespace before matching the characters in the 

-           ParserElement's defined pattern.  This is normally only used internally by

-           the pyparsing module, but may be needed in some whitespace-sensitive grammars.

-        """

-        self.skipWhitespace = False

-        return self

-

-    def setWhitespaceChars( self, chars ):

-        """Overrides the default whitespace chars

-        """

-        self.skipWhitespace = True

-        self.whiteChars = chars

-        self.copyDefaultWhiteChars = False

-        return self

-        

-    def parseWithTabs( self ):

-        """Overrides default behavior to expand s to spaces before parsing the input string.

-           Must be called before parseString when the input grammar contains elements that 

-           match  characters."""

-        self.keepTabs = True

-        return self

-        

-    def ignore( self, other ):

-        """Define expression to be ignored (e.g., comments) while doing pattern 

-           matching; may be called repeatedly, to define multiple comment or other

-           ignorable patterns.

-        """

-        if isinstance( other, Suppress ):

-            if other not in self.ignoreExprs:

-                self.ignoreExprs.append( other )

-        else:

-            self.ignoreExprs.append( Suppress( other ) )

-        return self

-

-    def setDebugActions( self, startAction, successAction, exceptionAction ):

-        """Enable display of debugging messages while doing pattern matching."""

-        self.debugActions = (startAction or _defaultStartDebugAction, 

-                             successAction or _defaultSuccessDebugAction, 

-                             exceptionAction or _defaultExceptionDebugAction)

-        self.debug = True

-        return self

-

-    def setDebug( self, flag=True ):

-        """Enable display of debugging messages while doing pattern matching."""

-        if flag:

-            self.setDebugActions( _defaultStartDebugAction, _defaultSuccessDebugAction, _defaultExceptionDebugAction )

-        else:

-            self.debug = False

-        return self

-

-    def __str__( self ):

-        return self.name

-

-    def __repr__( self ):

-        return _ustr(self)

-        

-    def streamline( self ):

-        self.streamlined = True

-        self.strRepr = None

-        return self

-        

-    def checkRecursion( self, parseElementList ):

-        pass

-        

-    def validate( self, validateTrace=[] ):

-        """Check defined expressions for valid structure, check for infinite recursive definitions."""

-        self.checkRecursion( [] )

-

-    def parseFile( self, file_or_filename ):

-        """Execute the parse expression on the given file or filename.

-           If a filename is specified (instead of a file object),

-           the entire file is opened, read, and closed before parsing.

-        """

-        try:

-            file_contents = file_or_filename.read()

-        except AttributeError:

-            f = open(file_or_filename, "rb")

-            file_contents = f.read()

-            f.close()

-        return self.parseString(file_contents)

-

-

-class Token(ParserElement):

-    """Abstract ParserElement subclass, for defining atomic matching patterns."""

-    def __init__( self ):

-        super(Token,self).__init__( savelist=False )

-        self.myException = ParseException("",0,"",self)

-

-    def setName(self, name):

-        s = super(Token,self).setName(name)

-        self.errmsg = "Expected " + self.name

-        s.myException.msg = self.errmsg

-        return s

-

-

-class Empty(Token):

-    """An empty token, will always match."""

-    def __init__( self ):

-        super(Empty,self).__init__()

-        self.name = "Empty"

-        self.mayReturnEmpty = True

-        self.mayIndexError = False

-

-

-class NoMatch(Token):

-    """A token that will never match."""

-    def __init__( self ):

-        super(NoMatch,self).__init__()

-        self.name = "NoMatch"

-        self.mayReturnEmpty = True

-        self.mayIndexError = False

-        self.errmsg = "Unmatchable token"

-        self.myException.msg = self.errmsg

-        

-    def parseImpl( self, instring, loc, doActions=True ):

-        exc = self.myException

-        exc.loc = loc

-        exc.pstr = instring

-        raise exc

-

-

-class Literal(Token):

-    """Token to exactly match a specified string."""

-    def __init__( self, matchString ):

-        super(Literal,self).__init__()

-        self.match = matchString

-        self.matchLen = len(matchString)

-        try:

-            self.firstMatchChar = matchString[0]

-        except IndexError:

-            warnings.warn("null string passed to Literal; use Empty() instead", 

-                            SyntaxWarning, stacklevel=2)

-            self.__class__ = Empty

-        self.name = '"%s"' % self.match

-        self.errmsg = "Expected " + self.name

-        self.mayReturnEmpty = False

-        self.myException.msg = self.errmsg

-        self.mayIndexError = False

-

-    # Performance tuning: this routine gets called a *lot*

-    # if this is a single character match string  and the first character matches,

-    # short-circuit as quickly as possible, and avoid calling startswith

-    #~ @profile

-    def parseImpl( self, instring, loc, doActions=True ):

-        if (instring[loc] == self.firstMatchChar and

-            (self.matchLen==1 or instring.startswith(self.match,loc)) ):

-            return loc+self.matchLen, self.match

-        #~ raise ParseException( instring, loc, self.errmsg )

-        exc = self.myException

-        exc.loc = loc

-        exc.pstr = instring

-        raise exc

-

-class Keyword(Token):

-    """Token to exactly match a specified string as a keyword, that is, it must be 

-       immediately followed by a non-keyword character.  Compare with Literal::

-         Literal("if") will match the leading 'if' in 'ifAndOnlyIf'.

-         Keyword("if") will not; it will only match the leading 'if in 'if x=1', or 'if(y==2)'

-       Accepts two optional constructor arguments in addition to the keyword string:

-       identChars is a string of characters that would be valid identifier characters,

-       defaulting to all alphanumerics + "_" and "$"; caseless allows case-insensitive

-       matching, default is False.

-    """

-    DEFAULT_KEYWORD_CHARS = alphanums+"_$"

-    

-    def __init__( self, matchString, identChars=DEFAULT_KEYWORD_CHARS, caseless=False ):

-        super(Keyword,self).__init__()

-        self.match = matchString

-        self.matchLen = len(matchString)

-        try:

-            self.firstMatchChar = matchString[0]

-        except IndexError:

-            warnings.warn("null string passed to Keyword; use Empty() instead", 

-                            SyntaxWarning, stacklevel=2)

-        self.name = '"%s"' % self.match

-        self.errmsg = "Expected " + self.name

-        self.mayReturnEmpty = False

-        self.myException.msg = self.errmsg

-        self.mayIndexError = False

-        self.caseless = caseless

-        if caseless:

-            self.caselessmatch = matchString.upper()

-            identChars = identChars.upper()

-        self.identChars = _str2dict(identChars)

-

-    def parseImpl( self, instring, loc, doActions=True ):

-        if self.caseless:

-            if ( (instring[ loc:loc+self.matchLen ].upper() == self.caselessmatch) and

-                 (loc >= len(instring)-self.matchLen or instring[loc+self.matchLen].upper() not in self.identChars) and

-                 (loc == 0 or instring[loc-1].upper() not in self.identChars) ):

-                return loc+self.matchLen, self.match

-        else:

-            if (instring[loc] == self.firstMatchChar and

-                (self.matchLen==1 or instring.startswith(self.match,loc)) and

-                (loc >= len(instring)-self.matchLen or instring[loc+self.matchLen] not in self.identChars) and

-                (loc == 0 or instring[loc-1] not in self.identChars) ):

-                return loc+self.matchLen, self.match

-        #~ raise ParseException( instring, loc, self.errmsg )

-        exc = self.myException

-        exc.loc = loc

-        exc.pstr = instring

-        raise exc

-        

-    def copy(self):

-        c = super(Keyword,self).copy()

-        c.identChars = Keyword.DEFAULT_KEYWORD_CHARS

-        return c

-        

-    def setDefaultKeywordChars( chars ):

-        """Overrides the default Keyword chars

-        """

-        Keyword.DEFAULT_KEYWORD_CHARS = chars

-    setDefaultKeywordChars = staticmethod(setDefaultKeywordChars)        

-

-

-class CaselessLiteral(Literal):

-    """Token to match a specified string, ignoring case of letters.

-       Note: the matched results will always be in the case of the given

-       match string, NOT the case of the input text.

-    """

-    def __init__( self, matchString ):

-        super(CaselessLiteral,self).__init__( matchString.upper() )

-        # Preserve the defining literal.

-        self.returnString = matchString

-        self.name = "'%s'" % self.returnString

-        self.errmsg = "Expected " + self.name

-        self.myException.msg = self.errmsg

-

-    def parseImpl( self, instring, loc, doActions=True ):

-        if instring[ loc:loc+self.matchLen ].upper() == self.match:

-            return loc+self.matchLen, self.returnString

-        #~ raise ParseException( instring, loc, self.errmsg )

-        exc = self.myException

-        exc.loc = loc

-        exc.pstr = instring

-        raise exc

-

-class CaselessKeyword(Keyword):

-    def __init__( self, matchString, identChars=Keyword.DEFAULT_KEYWORD_CHARS ):

-        super(CaselessKeyword,self).__init__( matchString, identChars, caseless=True )

-

-    def parseImpl( self, instring, loc, doActions=True ):

-        if ( (instring[ loc:loc+self.matchLen ].upper() == self.caselessmatch) and

-             (loc >= len(instring)-self.matchLen or instring[loc+self.matchLen].upper() not in self.identChars) ):

-            return loc+self.matchLen, self.match

-        #~ raise ParseException( instring, loc, self.errmsg )

-        exc = self.myException

-        exc.loc = loc

-        exc.pstr = instring

-        raise exc

-

-class Word(Token):

-    """Token for matching words composed of allowed character sets.

-       Defined with string containing all allowed initial characters,

-       an optional string containing allowed body characters (if omitted,

-       defaults to the initial character set), and an optional minimum,

-       maximum, and/or exact length.

-    """

-    def __init__( self, initChars, bodyChars=None, min=1, max=0, exact=0 ):

-        super(Word,self).__init__()

-        self.initCharsOrig = initChars

-        self.initChars = _str2dict(initChars)

-        if bodyChars :

-            self.bodyCharsOrig = bodyChars

-            self.bodyChars = _str2dict(bodyChars)

-        else:

-            self.bodyCharsOrig = initChars

-            self.bodyChars = _str2dict(initChars)

-            

-        self.maxSpecified = max > 0

-

-        self.minLen = min

-

-        if max > 0:

-            self.maxLen = max

-        else:

-            self.maxLen = sys.maxint

-

-        if exact > 0:

-            self.maxLen = exact

-            self.minLen = exact

-

-        self.name = _ustr(self)

-        self.errmsg = "Expected " + self.name

-        self.myException.msg = self.errmsg

-        self.mayIndexError = False

-        

-        if ' ' not in self.initCharsOrig+self.bodyCharsOrig and (min==1 and max==0 and exact==0):

-            if self.bodyCharsOrig == self.initCharsOrig:

-                self.reString = "[%s]+" % _escapeRegexRangeChars(self.initCharsOrig)

-            elif len(self.bodyCharsOrig) == 1:

-                self.reString = "%s[%s]*" % \
-                                      (re.escape(self.initCharsOrig),

-                                      _escapeRegexRangeChars(self.bodyCharsOrig),)

-            else:

-                self.reString = "[%s][%s]*" % \
-                                      (_escapeRegexRangeChars(self.initCharsOrig),

-                                      _escapeRegexRangeChars(self.bodyCharsOrig),)

-            try:

-                self.re = re.compile( self.reString )

-            except:

-                self.re = None

-        

-    def parseImpl( self, instring, loc, doActions=True ):

-        if self.re:

-            result = self.re.match(instring,loc)

-            if not result:

-                exc = self.myException

-                exc.loc = loc

-                exc.pstr = instring

-                raise exc

-            

-            loc = result.end()

-            return loc,result.group()

-        

-        if not(instring[ loc ] in self.initChars):

-            #~ raise ParseException( instring, loc, self.errmsg )

-            exc = self.myException

-            exc.loc = loc

-            exc.pstr = instring

-            raise exc

-        start = loc

-        loc += 1

-        instrlen = len(instring)

-        bodychars = self.bodyChars

-        maxloc = start + self.maxLen

-        maxloc = min( maxloc, instrlen )

-        while loc < maxloc and instring[loc] in bodychars:

-            loc += 1

-            

-        throwException = False

-        if loc - start < self.minLen:

-            throwException = True

-        if self.maxSpecified and loc < instrlen and instring[loc] in bodychars:

-            throwException = True

-

-        if throwException:

-            #~ raise ParseException( instring, loc, self.errmsg )

-            exc = self.myException

-            exc.loc = loc

-            exc.pstr = instring

-            raise exc

-

-        return loc, instring[start:loc]

-

-    def __str__( self ):

-        try:

-            return super(Word,self).__str__()

-        except:

-            pass

-

-            

-        if self.strRepr is None:

-            

-            def charsAsStr(s):

-                if len(s)>4:

-                    return s[:4]+"..."

-                else:

-                    return s

-            

-            if ( self.initCharsOrig != self.bodyCharsOrig ):

-                self.strRepr = "W:(%s,%s)" % ( charsAsStr(self.initCharsOrig), charsAsStr(self.bodyCharsOrig) )

-            else:

-                self.strRepr = "W:(%s)" % charsAsStr(self.initCharsOrig)

-

-        return self.strRepr

-

-

-class Regex(Token):

-    """Token for matching strings that match a given regular expression.

-       Defined with string specifying the regular expression in a form recognized by the inbuilt Python re module.

-    """

-    def __init__( self, pattern, flags=0):

-        """The parameters pattern and flags are passed to the re.compile() function as-is. See the Python re module for an explanation of the acceptable patterns and flags."""

-        super(Regex,self).__init__()

-        

-        if len(pattern) == 0:

-            warnings.warn("null string passed to Regex; use Empty() instead", 

-                    SyntaxWarning, stacklevel=2)

-    

-        self.pattern = pattern

-        self.flags = flags

-        

-        try:

-            self.re = re.compile(self.pattern, self.flags)

-            self.reString = self.pattern

-        except sre_constants.error,e:

-            warnings.warn("invalid pattern (%s) passed to Regex" % pattern, 

-                SyntaxWarning, stacklevel=2)

-            raise

-

-        self.name = _ustr(self)

-        self.errmsg = "Expected " + self.name

-        self.myException.msg = self.errmsg

-        self.mayIndexError = False

-        self.mayReturnEmpty = True

-    

-    def parseImpl( self, instring, loc, doActions=True ):

-        result = self.re.match(instring,loc)

-        if not result:

-            exc = self.myException

-            exc.loc = loc

-            exc.pstr = instring

-            raise exc

-        

-        loc = result.end()

-        d = result.groupdict()

-        ret = ParseResults(result.group())

-        if d:

-            for k in d.keys():

-                ret[k] = d[k]

-        return loc,ret

-    

-    def __str__( self ):

-        try:

-            return super(Regex,self).__str__()

-        except:

-            pass

-        

-        if self.strRepr is None:

-            self.strRepr = "Re:(%s)" % repr(self.pattern)

-        

-        return self.strRepr

-

-

-class QuotedString(Token):

-    """Token for matching strings that are delimited by quoting characters.

-    """

-    def __init__( self, quoteChar, escChar=None, escQuote=None, multiline=False, unquoteResults=True, endQuoteChar=None):

-        """

-           Defined with the following parameters:

-           - quoteChar - string of one or more characters defining the quote delimiting string

-           - escChar - character to escape quotes, typically backslash (default=None)

-           - escQuote - special quote sequence to escape an embedded quote string (such as SQL's "" to escape an embedded ") (default=None)

-           - multiline - boolean indicating whether quotes can span multiple lines (default=False)

-           - unquoteResults - boolean indicating whether the matched text should be unquoted (default=True)

-           - endQuoteChar - string of one or more characters defining the end of the quote delimited string (default=None => same as quoteChar)

-        """

-        super(QuotedString,self).__init__()

-        

-        # remove white space from quote chars - wont work anyway

-        quoteChar = quoteChar.strip()

-        if len(quoteChar) == 0:

-            warnings.warn("quoteChar cannot be the empty string",SyntaxWarning,stacklevel=2)

-            raise SyntaxError()

-        

-        if endQuoteChar is None:

-            endQuoteChar = quoteChar

-        else:

-            endQuoteChar = endQuoteChar.strip()

-            if len(endQuoteChar) == 0:

-                warnings.warn("endQuoteChar cannot be the empty string",SyntaxWarning,stacklevel=2)

-                raise SyntaxError()

-        

-        self.quoteChar = quoteChar

-        self.quoteCharLen = len(quoteChar)

-        self.firstQuoteChar = quoteChar[0]

-        self.endQuoteChar = endQuoteChar

-        self.endQuoteCharLen = len(endQuoteChar)

-        self.escChar = escChar

-        self.escQuote = escQuote

-        self.unquoteResults = unquoteResults

-        

-        if multiline:

-            self.flags = re.MULTILINE | re.DOTALL

-            self.pattern = r'%s(?:[^%s%s]' % \
-                ( re.escape(self.quoteChar),

-                  _escapeRegexRangeChars(self.endQuoteChar[0]),

-                  (escChar is not None and _escapeRegexRangeChars(escChar) or '') )

-        else:

-            self.flags = 0

-            self.pattern = r'%s(?:[^%s\n\r%s]' % \
-                ( re.escape(self.quoteChar),

-                  _escapeRegexRangeChars(self.endQuoteChar[0]),

-                  (escChar is not None and _escapeRegexRangeChars(escChar) or '') )

-        if len(self.endQuoteChar) > 1:

-            self.pattern += (

-                '|(?:' + ')|(?:'.join(["%s[^%s]" % (re.escape(self.endQuoteChar[:i]),

-                                               _escapeRegexRangeChars(self.endQuoteChar[i])) 

-                                    for i in range(len(self.endQuoteChar)-1,0,-1)]) + ')'

-                )

-        if escQuote:

-            self.pattern += (r'|(?:%s)' % re.escape(escQuote))

-        if escChar:

-            self.pattern += (r'|(?:%s.)' % re.escape(escChar))

-            self.escCharReplacePattern = re.escape(self.escChar)+"(.)"

-        self.pattern += (r')*%s' % re.escape(self.endQuoteChar))

-        

-        try:

-            self.re = re.compile(self.pattern, self.flags)

-            self.reString = self.pattern

-        except sre_constants.error,e:

-            warnings.warn("invalid pattern (%s) passed to Regex" % self.pattern, 

-                SyntaxWarning, stacklevel=2)

-            raise

-

-        self.name = _ustr(self)

-        self.errmsg = "Expected " + self.name

-        self.myException.msg = self.errmsg

-        self.mayIndexError = False

-        self.mayReturnEmpty = True

-    

-    def parseImpl( self, instring, loc, doActions=True ):

-        result = instring[loc] == self.firstQuoteChar and self.re.match(instring,loc) or None

-        if not result:

-            exc = self.myException

-            exc.loc = loc

-            exc.pstr = instring

-            raise exc

-        

-        loc = result.end()

-        ret = result.group()

-        

-        if self.unquoteResults:

-            

-            # strip off quotes

-            ret = ret[self.quoteCharLen:-self.endQuoteCharLen]

-                

-            if isinstance(ret,basestring):

-                # replace escaped characters

-                if self.escChar:

-                    ret = re.sub(self.escCharReplacePattern,"\g<1>",ret)

-

-                # replace escaped quotes

-                if self.escQuote:

-                    ret = ret.replace(self.escQuote, self.endQuoteChar)

-

-        return loc, ret

-    

-    def __str__( self ):

-        try:

-            return super(QuotedString,self).__str__()

-        except:

-            pass

-        

-        if self.strRepr is None:

-            self.strRepr = "quoted string, starting with %s ending with %s" % (self.quoteChar, self.endQuoteChar)

-        

-        return self.strRepr

-

-

-class CharsNotIn(Token):

-    """Token for matching words composed of characters *not* in a given set.

-       Defined with string containing all disallowed characters, and an optional 

-       minimum, maximum, and/or exact length.

-    """

-    def __init__( self, notChars, min=1, max=0, exact=0 ):

-        super(CharsNotIn,self).__init__()

-        self.skipWhitespace = False

-        self.notChars = notChars

-        

-        self.minLen = min

-

-        if max > 0:

-            self.maxLen = max

-        else:

-            self.maxLen = sys.maxint

-

-        if exact > 0:

-            self.maxLen = exact

-            self.minLen = exact

-        

-        self.name = _ustr(self)

-        self.errmsg = "Expected " + self.name

-        self.mayReturnEmpty = ( self.minLen == 0 )

-        self.myException.msg = self.errmsg

-        self.mayIndexError = False

-

-    def parseImpl( self, instring, loc, doActions=True ):

-        if instring[loc] in self.notChars:

-            #~ raise ParseException( instring, loc, self.errmsg )

-            exc = self.myException

-            exc.loc = loc

-            exc.pstr = instring

-            raise exc

-            

-        start = loc

-        loc += 1

-        notchars = self.notChars

-        maxlen = min( start+self.maxLen, len(instring) )

-        while loc < maxlen and (instring[loc] not in notchars):

-            loc += 1

-

-        if loc - start < self.minLen:

-            #~ raise ParseException( instring, loc, self.errmsg )

-            exc = self.myException

-            exc.loc = loc

-            exc.pstr = instring

-            raise exc

-

-        return loc, instring[start:loc]

-

-    def __str__( self ):

-        try:

-            return super(CharsNotIn, self).__str__()

-        except:

-            pass

-

-        if self.strRepr is None:

-            if len(self.notChars) > 4:

-                self.strRepr = "!W:(%s...)" % self.notChars[:4]

-            else:

-                self.strRepr = "!W:(%s)" % self.notChars

-        

-        return self.strRepr

-

-class White(Token):

-    """Special matching class for matching whitespace.  Normally, whitespace is ignored

-       by pyparsing grammars.  This class is included when some whitespace structures

-       are significant.  Define with a string containing the whitespace characters to be

-       matched; default is " \\t\\n".  Also takes optional min, max, and exact arguments,

-       as defined for the Word class."""

-    whiteStrs = {

-        " " : "",

-        "\t": "",

-        "\n": "",

-        "\r": "",

-        "\f": "",

-        }

-    def __init__(self, ws=" \t\r\n", min=1, max=0, exact=0):

-        super(White,self).__init__()

-        self.matchWhite = ws

-        self.setWhitespaceChars( "".join([c for c in self.whiteChars if c not in self.matchWhite]) )

-        #~ self.leaveWhitespace()

-        self.name = ("".join([White.whiteStrs[c] for c in self.matchWhite]))

-        self.mayReturnEmpty = True

-        self.errmsg = "Expected " + self.name

-        self.myException.msg = self.errmsg

-

-        self.minLen = min

-

-        if max > 0:

-            self.maxLen = max

-        else:

-            self.maxLen = sys.maxint

-

-        if exact > 0:

-            self.maxLen = exact

-            self.minLen = exact

-            

-    def parseImpl( self, instring, loc, doActions=True ):

-        if not(instring[ loc ] in self.matchWhite):

-            #~ raise ParseException( instring, loc, self.errmsg )

-            exc = self.myException

-            exc.loc = loc

-            exc.pstr = instring

-            raise exc

-        start = loc

-        loc += 1

-        maxloc = start + self.maxLen

-        maxloc = min( maxloc, len(instring) )

-        while loc < maxloc and instring[loc] in self.matchWhite:

-            loc += 1

-

-        if loc - start < self.minLen:

-            #~ raise ParseException( instring, loc, self.errmsg )

-            exc = self.myException

-            exc.loc = loc

-            exc.pstr = instring

-            raise exc

-

-        return loc, instring[start:loc]

-

-

-class PositionToken(Token):

-    def __init__( self ):

-        super(PositionToken,self).__init__()

-        self.name=self.__class__.__name__

-        self.mayReturnEmpty = True

-        self.mayIndexError = False

-

-class GoToColumn(PositionToken):

-    """Token to advance to a specific column of input text; useful for tabular report scraping."""

-    def __init__( self, colno ):

-        super(GoToColumn,self).__init__()

-        self.col = colno

-

-    def preParse( self, instring, loc ):

-        if col(loc,instring) != self.col:

-            instrlen = len(instring)

-            if self.ignoreExprs:

-                loc = self.skipIgnorables( instring, loc )

-            while loc < instrlen and instring[loc].isspace() and col( loc, instring ) != self.col :

-                loc += 1

-        return loc

-

-    def parseImpl( self, instring, loc, doActions=True ):

-        thiscol = col( loc, instring )

-        if thiscol > self.col:

-            raise ParseException( instring, loc, "Text not in expected column", self )

-        newloc = loc + self.col - thiscol

-        ret = instring[ loc: newloc ]

-        return newloc, ret

-

-class LineStart(PositionToken):

-    """Matches if current position is at the beginning of a line within the parse string"""

-    def __init__( self ):

-        super(LineStart,self).__init__()

-        self.setWhitespaceChars( " \t" )

-        self.errmsg = "Expected start of line"

-        self.myException.msg = self.errmsg

-

-    def preParse( self, instring, loc ):

-        preloc = super(LineStart,self).preParse(instring,loc)

-        if instring[preloc] == "\n":

-            loc += 1

-        return loc

-

-    def parseImpl( self, instring, loc, doActions=True ):

-        if not( loc==0 or

-            (loc == self.preParse( instring, 0 )) or

-            (instring[loc-1] == "\n") ): #col(loc, instring) != 1:

-            #~ raise ParseException( instring, loc, "Expected start of line" )

-            exc = self.myException

-            exc.loc = loc

-            exc.pstr = instring

-            raise exc

-        return loc, []

-

-class LineEnd(PositionToken):

-    """Matches if current position is at the end of a line within the parse string"""

-    def __init__( self ):

-        super(LineEnd,self).__init__()

-        self.setWhitespaceChars( " \t" )

-        self.errmsg = "Expected end of line"

-        self.myException.msg = self.errmsg

-    

-    def parseImpl( self, instring, loc, doActions=True ):

-        if loc maxExcLoc:

-                    maxException = err

-                    maxExcLoc = err.loc

-            except IndexError, err:

-                if len(instring) > maxExcLoc:

-                    maxException = ParseException(instring,len(instring),e.errmsg,self)

-                    maxExcLoc = len(instring)

-            else:

-                if loc2 > maxMatchLoc:

-                    maxMatchLoc = loc2

-                    maxMatchExp = e

-        

-        if maxMatchLoc < 0:

-            if self.exprs:

-                raise maxException

-            else:

-                raise ParseException(instring, loc, "no defined alternatives to match", self)

-

-        return maxMatchExp._parse( instring, loc, doActions )

-

-    def __ixor__(self, other ):

-        if isinstance( other, basestring ):

-            other = Literal( other )

-        return self.append( other ) #Or( [ self, other ] )

-

-    def __str__( self ):

-        if hasattr(self,"name"):

-            return self.name

-            

-        if self.strRepr is None:

-            self.strRepr = "{" + " ^ ".join( [ _ustr(e) for e in self.exprs ] ) + "}"

-        

-        return self.strRepr

-    

-    def checkRecursion( self, parseElementList ):

-        subRecCheckList = parseElementList[:] + [ self ]

-        for e in self.exprs:

-            e.checkRecursion( subRecCheckList )

-

-

-class MatchFirst(ParseExpression):

-    """Requires that at least one ParseExpression is found.

-       If two expressions match, the first one listed is the one that will match.

-       May be constructed using the '|' operator.

-    """

-    def __init__( self, exprs, savelist = False ):

-        super(MatchFirst,self).__init__(exprs, savelist)

-        if exprs:

-            self.mayReturnEmpty = False

-            for e in self.exprs:

-                if e.mayReturnEmpty:

-                    self.mayReturnEmpty = True

-                    break

-        else:

-            self.mayReturnEmpty = True

-    

-    def parseImpl( self, instring, loc, doActions=True ):

-        maxExcLoc = -1

-        for e in self.exprs:

-            try:

-                ret = e._parse( instring, loc, doActions )

-                return ret

-            except ParseException, err:

-                if err.loc > maxExcLoc:

-                    maxException = err

-                    maxExcLoc = err.loc

-            except IndexError, err:

-                if len(instring) > maxExcLoc:

-                    maxException = ParseException(instring,len(instring),e.errmsg,self)

-                    maxExcLoc = len(instring)

-

-        # only got here if no expression matched, raise exception for match that made it the furthest

-        else:

-            if self.exprs:

-                raise maxException

-            else:

-                raise ParseException(instring, loc, "no defined alternatives to match", self)

-

-    def __ior__(self, other ):

-        if isinstance( other, basestring ):

-            other = Literal( other )

-        return self.append( other ) #MatchFirst( [ self, other ] )

-

-    def __str__( self ):

-        if hasattr(self,"name"):

-            return self.name

-            

-        if self.strRepr is None:

-            self.strRepr = "{" + " | ".join( [ _ustr(e) for e in self.exprs ] ) + "}"

-        

-        return self.strRepr

-    

-    def checkRecursion( self, parseElementList ):

-        subRecCheckList = parseElementList[:] + [ self ]

-        for e in self.exprs:

-            e.checkRecursion( subRecCheckList )

-

-class Each(ParseExpression):

-    """Requires all given ParseExpressions to be found, but in any order.

-       Expressions may be separated by whitespace.

-       May be constructed using the '&' operator.

-    """

-    def __init__( self, exprs, savelist = True ):

-        super(Each,self).__init__(exprs, savelist)

-        self.mayReturnEmpty = True

-        for e in self.exprs:

-            if not e.mayReturnEmpty:

-                self.mayReturnEmpty = False

-                break

-        self.skipWhitespace = True

-        self.optionals = [ e.expr for e in exprs if isinstance(e,Optional) ]

-        self.multioptionals = [ e.expr for e in exprs if isinstance(e,ZeroOrMore) ]

-        self.multirequired = [ e.expr for e in exprs if isinstance(e,OneOrMore) ]

-        self.required = [ e for e in exprs if not isinstance(e,(Optional,ZeroOrMore,OneOrMore)) ]

-        self.required += self.multirequired

-

-    def parseImpl( self, instring, loc, doActions=True ):

-        tmpLoc = loc

-        tmpReqd = self.required[:]

-        tmpOpt  = self.optionals[:]

-        matchOrder = []

-

-        keepMatching = True

-        while keepMatching:

-            tmpExprs = tmpReqd + tmpOpt + self.multioptionals + self.multirequired

-            failed = []

-            for e in tmpExprs:

-                try:

-                    tmpLoc = e.tryParse( instring, tmpLoc )

-                except ParseException:

-                    failed.append(e)

-                else:

-                    matchOrder.append(e)

-                    if e in tmpReqd:

-                        tmpReqd.remove(e)

-                    elif e in tmpOpt:

-                        tmpOpt.remove(e)

-            if len(failed) == len(tmpExprs):

-                keepMatching = False

-        

-        if tmpReqd:

-            missing = ", ".join( [ _ustr(e) for e in tmpReqd ] )

-            raise ParseException(instring,loc,"Missing one or more required elements (%s)" % missing )

-

-        resultlist = []

-        for e in matchOrder:

-            loc,results = e._parse(instring,loc,doActions)

-            resultlist.append(results)

-            

-        finalResults = ParseResults([])

-        for r in resultlist:

-            dups = {}

-            for k in r.keys():

-                if k in finalResults.keys():

-                    tmp = ParseResults(finalResults[k])

-                    tmp += ParseResults(r[k])

-                    dups[k] = tmp

-            finalResults += ParseResults(r)

-            for k,v in dups.items():

-                finalResults[k] = v

-        return loc, finalResults

-

-    def __str__( self ):

-        if hasattr(self,"name"):

-            return self.name

-            

-        if self.strRepr is None:

-            self.strRepr = "{" + " & ".join( [ _ustr(e) for e in self.exprs ] ) + "}"

-        

-        return self.strRepr

-    

-    def checkRecursion( self, parseElementList ):

-        subRecCheckList = parseElementList[:] + [ self ]

-        for e in self.exprs:

-            e.checkRecursion( subRecCheckList )

-

-

-class ParseElementEnhance(ParserElement):

-    """Abstract subclass of ParserElement, for combining and post-processing parsed tokens."""

-    def __init__( self, expr, savelist=False ):

-        super(ParseElementEnhance,self).__init__(savelist)

-        if isinstance( expr, basestring ):

-            expr = Literal(expr)

-        self.expr = expr

-        self.strRepr = None

-        if expr is not None:

-            self.mayIndexError = expr.mayIndexError

-            self.setWhitespaceChars( expr.whiteChars )

-            self.skipWhitespace = expr.skipWhitespace

-            self.saveAsList = expr.saveAsList

-    

-    def parseImpl( self, instring, loc, doActions=True ):

-        if self.expr is not None:

-            return self.expr._parse( instring, loc, doActions, callPreParse=False )

-        else:

-            raise ParseException("",loc,self.errmsg,self)

-            

-    def leaveWhitespace( self ):

-        self.skipWhitespace = False

-        self.expr = self.expr.copy()

-        if self.expr is not None:

-            self.expr.leaveWhitespace()

-        return self

-

-    def ignore( self, other ):

-        if isinstance( other, Suppress ):

-            if other not in self.ignoreExprs:

-                super( ParseElementEnhance, self).ignore( other )

-                if self.expr is not None:

-                    self.expr.ignore( self.ignoreExprs[-1] )

-        else:

-            super( ParseElementEnhance, self).ignore( other )

-            if self.expr is not None:

-                self.expr.ignore( self.ignoreExprs[-1] )

-        return self

-

-    def streamline( self ):

-        super(ParseElementEnhance,self).streamline()

-        if self.expr is not None:

-            self.expr.streamline()

-        return self

-

-    def checkRecursion( self, parseElementList ):

-        if self in parseElementList:

-            raise RecursiveGrammarException( parseElementList+[self] )

-        subRecCheckList = parseElementList[:] + [ self ]

-        if self.expr is not None:

-            self.expr.checkRecursion( subRecCheckList )

-        

-    def validate( self, validateTrace=[] ):

-        tmp = validateTrace[:]+[self]

-        if self.expr is not None:

-            self.expr.validate(tmp)

-        self.checkRecursion( [] )

-    

-    def __str__( self ):

-        try:

-            return super(ParseElementEnhance,self).__str__()

-        except:

-            pass

-            

-        if self.strRepr is None and self.expr is not None:

-            self.strRepr = "%s:(%s)" % ( self.__class__.__name__, _ustr(self.expr) )

-        return self.strRepr

-

-

-class FollowedBy(ParseElementEnhance):

-    """Lookahead matching of the given parse expression.  FollowedBy

-    does *not* advance the parsing position within the input string, it only 

-    verifies that the specified parse expression matches at the current 

-    position.  FollowedBy always returns a null token list."""

-    def __init__( self, expr ):

-        super(FollowedBy,self).__init__(expr)

-        self.mayReturnEmpty = True

-        

-    def parseImpl( self, instring, loc, doActions=True ):

-        self.expr.tryParse( instring, loc )

-        return loc, []

-

-

-class NotAny(ParseElementEnhance):

-    """Lookahead to disallow matching with the given parse expression.  NotAny

-    does *not* advance the parsing position within the input string, it only 

-    verifies that the specified parse expression does *not* match at the current 

-    position.  Also, NotAny does *not* skip over leading whitespace. NotAny 

-    always returns a null token list.  May be constructed using the '~' operator."""

-    def __init__( self, expr ):

-        super(NotAny,self).__init__(expr)

-        #~ self.leaveWhitespace()

-        self.skipWhitespace = False  # do NOT use self.leaveWhitespace(), don't want to propagate to exprs

-        self.mayReturnEmpty = True

-        self.errmsg = "Found unwanted token, "+_ustr(self.expr)

-        self.myException = ParseException("",0,self.errmsg,self)

-        

-    def parseImpl( self, instring, loc, doActions=True ):

-        try:

-            self.expr.tryParse( instring, loc )

-        except (ParseException,IndexError):

-            pass

-        else:

-            #~ raise ParseException(instring, loc, self.errmsg )

-            exc = self.myException

-            exc.loc = loc

-            exc.pstr = instring

-            raise exc

-        return loc, []

-

-    def __str__( self ):

-        if hasattr(self,"name"):

-            return self.name

-            

-        if self.strRepr is None:

-            self.strRepr = "~{" + _ustr(self.expr) + "}"

-        

-        return self.strRepr

-

-

-class ZeroOrMore(ParseElementEnhance):

-    """Optional repetition of zero or more of the given expression."""

-    def __init__( self, expr ):

-        super(ZeroOrMore,self).__init__(expr)

-        self.mayReturnEmpty = True

-    

-    def parseImpl( self, instring, loc, doActions=True ):

-        tokens = []

-        try:

-            loc, tokens = self.expr._parse( instring, loc, doActions, callPreParse=False )

-            hasIgnoreExprs = ( len(self.ignoreExprs) > 0 )

-            while 1:

-                if hasIgnoreExprs:

-                    preloc = self.skipIgnorables( instring, loc )

-                else:

-                    preloc = loc

-                loc, tmptokens = self.expr._parse( instring, preloc, doActions )

-                if tmptokens or tmptokens.keys():

-                    tokens += tmptokens

-        except (ParseException,IndexError):

-            pass

-

-        return loc, tokens

-

-    def __str__( self ):

-        if hasattr(self,"name"):

-            return self.name

-            

-        if self.strRepr is None:

-            self.strRepr = "[" + _ustr(self.expr) + "]..."

-        

-        return self.strRepr

-    

-    def setResultsName( self, name, listAllMatches=False ):

-        ret = super(ZeroOrMore,self).setResultsName(name,listAllMatches)

-        ret.saveAsList = True

-        return ret

-    

-

-class OneOrMore(ParseElementEnhance):

-    """Repetition of one or more of the given expression."""

-    def parseImpl( self, instring, loc, doActions=True ):

-        # must be at least one

-        loc, tokens = self.expr._parse( instring, loc, doActions, callPreParse=False )

-        try:

-            hasIgnoreExprs = ( len(self.ignoreExprs) > 0 )

-            while 1:

-                if hasIgnoreExprs:

-                    preloc = self.skipIgnorables( instring, loc )

-                else:

-                    preloc = loc

-                loc, tmptokens = self.expr._parse( instring, preloc, doActions )

-                if tmptokens or tmptokens.keys():

-                    tokens += tmptokens

-        except (ParseException,IndexError):

-            pass

-

-        return loc, tokens

-

-    def __str__( self ):

-        if hasattr(self,"name"):

-            return self.name

-            

-        if self.strRepr is None:

-            self.strRepr = "{" + _ustr(self.expr) + "}..."

-        

-        return self.strRepr

-    

-    def setResultsName( self, name, listAllMatches=False ):

-        ret = super(OneOrMore,self).setResultsName(name,listAllMatches)

-        ret.saveAsList = True

-        return ret

-

-class _NullToken(object):

-    def __bool__(self):

-        return False

-    def __str__(self):

-        return ""

-

-_optionalNotMatched = _NullToken()

-class Optional(ParseElementEnhance):

-    """Optional matching of the given expression.

-       A default return string can also be specified, if the optional expression

-       is not found.

-    """

-    def __init__( self, exprs, default=_optionalNotMatched ):

-        super(Optional,self).__init__( exprs, savelist=False )

-        self.defaultValue = default

-        self.mayReturnEmpty = True

-

-    def parseImpl( self, instring, loc, doActions=True ):

-        try:

-            loc, tokens = self.expr._parse( instring, loc, doActions, callPreParse=False )

-        except (ParseException,IndexError):

-            if self.defaultValue is not _optionalNotMatched:

-                tokens = [ self.defaultValue ]

-            else:

-                tokens = []

-        return loc, tokens

-

-    def __str__( self ):

-        if hasattr(self,"name"):

-            return self.name

-            

-        if self.strRepr is None:

-            self.strRepr = "[" + _ustr(self.expr) + "]"

-        

-        return self.strRepr

-

-

-class SkipTo(ParseElementEnhance):

-    """Token for skipping over all undefined text until the matched expression is found.

-       If include is set to true, the matched expression is also consumed.  The ignore

-       argument is used to define grammars (typically quoted strings and comments) that 

-       might contain false matches.

-    """

-    def __init__( self, other, include=False, ignore=None ):

-        super( SkipTo, self ).__init__( other )

-        if ignore is not None:

-            self.expr = self.expr.copy()

-            self.expr.ignore(ignore)

-        self.mayReturnEmpty = True

-        self.mayIndexError = False

-        self.includeMatch = include

-        self.asList = False

-        self.errmsg = "No match found for "+_ustr(self.expr)

-        self.myException = ParseException("",0,self.errmsg,self)

-

-    def parseImpl( self, instring, loc, doActions=True ):

-        startLoc = loc

-        instrlen = len(instring)

-        expr = self.expr

-        while loc <= instrlen:

-            try:

-                loc = expr.skipIgnorables( instring, loc )

-                expr._parse( instring, loc, doActions=False, callPreParse=False )

-                if self.includeMatch:

-                    skipText = instring[startLoc:loc]

-                    loc,mat = expr._parse(instring,loc)

-                    if mat:

-                        return loc, [ skipText, mat ]

-                    else:

-                        return loc, [ skipText ]

-                else:

-                    return loc, [ instring[startLoc:loc] ]

-            except (ParseException,IndexError):

-                loc += 1

-        exc = self.myException

-        exc.loc = loc

-        exc.pstr = instring

-        raise exc

-

-class Forward(ParseElementEnhance):

-    """Forward declaration of an expression to be defined later -

-       used for recursive grammars, such as algebraic infix notation.

-       When the expression is known, it is assigned to the Forward variable using the '<<' operator.

-       

-       Note: take care when assigning to Forward not to overlook precedence of operators.

-       Specifically, '|' has a lower precedence than '<<', so that::

-          fwdExpr << a | b | c

-       will actually be evaluated as::

-          (fwdExpr << a) | b | c

-       thereby leaving b and c out as parseable alternatives.  It is recommended that you

-       explicitly group the values inserted into the Forward::

-          fwdExpr << (a | b | c)

-    """

-    def __init__( self, other=None ):

-        super(Forward,self).__init__( other, savelist=False )

-

-    def __lshift__( self, other ):

-        if isinstance( other, basestring ):

-            other = Literal(other)

-        self.expr = other

-        self.mayReturnEmpty = other.mayReturnEmpty

-        self.strRepr = None

-        return self

-

-    def leaveWhitespace( self ):

-        self.skipWhitespace = False

-        return self

-

-    def streamline( self ):

-        if not self.streamlined:

-            self.streamlined = True

-            if self.expr is not None: 

-                self.expr.streamline()

-        return self

-

-    def validate( self, validateTrace=[] ):

-        if self not in validateTrace:

-            tmp = validateTrace[:]+[self]

-            if self.expr is not None: 

-                self.expr.validate(tmp)

-        self.checkRecursion([])        

-        

-    def __str__( self ):

-        if hasattr(self,"name"):

-            return self.name

-

-        self.__class__ = _ForwardNoRecurse

-        try:

-            if self.expr is not None: 

-                retString = _ustr(self.expr)

-            else:

-                retString = "None"

-        finally:

-            self.__class__ = Forward

-        return "Forward: "+retString

-        

-    def copy(self):

-        if self.expr is not None:

-            return super(Forward,self).copy()

-        else:

-            ret = Forward()

-            ret << self

-            return ret

-

-class _ForwardNoRecurse(Forward):

-    def __str__( self ):

-        return "..."

-        

-class TokenConverter(ParseElementEnhance):

-    """Abstract subclass of ParseExpression, for converting parsed results."""

-    def __init__( self, expr, savelist=False ):

-        super(TokenConverter,self).__init__( expr )#, savelist )

-        self.saveAsList = False

-

-

-class Upcase(TokenConverter):

-    """Converter to upper case all matching tokens."""

-    def __init__(self, *args):

-        super(Upcase,self).__init__(*args)

-        warnings.warn("Upcase class is deprecated, use upcaseTokens parse action instead", 

-                       DeprecationWarning,stacklevel=2)

-    

-    def postParse( self, instring, loc, tokenlist ):

-        return map( string.upper, tokenlist )

-

-

-class Combine(TokenConverter):

-    """Converter to concatenate all matching tokens to a single string.

-       By default, the matching patterns must also be contiguous in the input string;

-       this can be disabled by specifying 'adjacent=False' in the constructor.

-    """

-    def __init__( self, expr, joinString="", adjacent=True ):

-        super(Combine,self).__init__( expr )

-        # suppress whitespace-stripping in contained parse expressions, but re-enable it on the Combine itself

-        if adjacent:

-            self.leaveWhitespace()

-        self.adjacent = adjacent

-        self.skipWhitespace = True

-        self.joinString = joinString

-

-    def ignore( self, other ):

-        if self.adjacent:

-            ParserElement.ignore(self, other)

-        else:

-            super( Combine, self).ignore( other )

-        return self

-

-    def postParse( self, instring, loc, tokenlist ):

-        retToks = tokenlist.copy()

-        del retToks[:]

-        retToks += ParseResults([ "".join(tokenlist._asStringList(self.joinString)) ], modal=self.modalResults)

-

-        if self.resultsName and len(retToks.keys())>0:

-            return [ retToks ]

-        else:

-            return retToks

-

-class Group(TokenConverter):

-    """Converter to return the matched tokens as a list - useful for returning tokens of ZeroOrMore and OneOrMore expressions."""

-    def __init__( self, expr ):

-        super(Group,self).__init__( expr )

-        self.saveAsList = True

-

-    def postParse( self, instring, loc, tokenlist ):

-        return [ tokenlist ]

-        

-class Dict(TokenConverter):

-    """Converter to return a repetitive expression as a list, but also as a dictionary.

-       Each element can also be referenced using the first token in the expression as its key.

-       Useful for tabular report scraping when the first column can be used as a item key.

-    """

-    def __init__( self, exprs ):

-        super(Dict,self).__init__( exprs )

-        self.saveAsList = True

-

-    def postParse( self, instring, loc, tokenlist ):

-        for i,tok in enumerate(tokenlist):

-            ikey = _ustr(tok[0]).strip()

-            if len(tok)==1:

-                tokenlist[ikey] = ("",i)

-            elif len(tok)==2 and not isinstance(tok[1],ParseResults):

-                tokenlist[ikey] = (tok[1],i)

-            else:

-                dictvalue = tok.copy() #ParseResults(i)

-                del dictvalue[0]

-                if len(dictvalue)!= 1 or (isinstance(dictvalue,ParseResults) and dictvalue.keys()):

-                    tokenlist[ikey] = (dictvalue,i)

-                else:

-                    tokenlist[ikey] = (dictvalue[0],i)

-

-        if self.resultsName:

-            return [ tokenlist ]

-        else:

-            return tokenlist

-

-

-class Suppress(TokenConverter):

-    """Converter for ignoring the results of a parsed expression."""

-    def postParse( self, instring, loc, tokenlist ):

-        return []

-    

-    def suppress( self ):

-        return self

-

-

-class OnlyOnce(object):

-    """Wrapper for parse actions, to ensure they are only called once."""

-    def __init__(self, methodCall):

-        self.callable = ParserElement.normalizeParseActionArgs(methodCall)

-        self.called = False

-    def __call__(self,s,l,t):

-        if not self.called:

-            results = self.callable(s,l,t)

-            self.called = True

-            return results

-        raise ParseException(s,l,"")

-    def reset():

-        self.called = False

-

-def traceParseAction(f):

-    """Decorator for debugging parse actions."""

-    f = ParserElement.normalizeParseActionArgs(f)

-    def z(*paArgs):

-        thisFunc = f.func_name

-        s,l,t = paArgs[-3:]

-        if len(paArgs)>3:

-            thisFunc = paArgs[0].__class__.__name__ + '.' + thisFunc

-        sys.stderr.write( ">>entering %s(line: '%s', %d, %s)\n" % (thisFunc,line(l,s),l,t) )

-        try:

-            ret = f(*paArgs)

-        except Exception, exc:

-            sys.stderr.write( "<", "|".join( [ _escapeRegexChars(sym) for sym in symbols] )

-        try:

-            if len(symbols)==len("".join(symbols)):

-                return Regex( "[%s]" % "".join( [ _escapeRegexRangeChars(sym) for sym in symbols] ) )

-            else:

-                return Regex( "|".join( [ re.escape(sym) for sym in symbols] ) )

-        except:

-            warnings.warn("Exception creating Regex for oneOf, building MatchFirst",

-                    SyntaxWarning, stacklevel=2)

-

-

-    # last resort, just use MatchFirst

-    return MatchFirst( [ parseElementClass(sym) for sym in symbols ] )

-

-def dictOf( key, value ):

-    """Helper to easily and clearly define a dictionary by specifying the respective patterns

-       for the key and value.  Takes care of defining the Dict, ZeroOrMore, and Group tokens

-       in the proper order.  The key pattern can include delimiting markers or punctuation,

-       as long as they are suppressed, thereby leaving the significant key text.  The value

-       pattern can include named results, so that the Dict results can include named token 

-       fields.

-    """

-    return Dict( ZeroOrMore( Group ( key + value ) ) )

-

-_bslash = "\\"

-printables = "".join( [ c for c in string.printable if c not in string.whitespace ] )

-

-# convenience constants for positional expressions

-empty       = Empty().setName("empty")

-lineStart   = LineStart().setName("lineStart")

-lineEnd     = LineEnd().setName("lineEnd")

-stringStart = StringStart().setName("stringStart")

-stringEnd   = StringEnd().setName("stringEnd")

-

-_escapedPunc = Word( _bslash, r"\[]-*.$+^?()~ ", exact=2 ).setParseAction(lambda s,l,t:t[0][1])

-_printables_less_backslash = "".join([ c for c in printables if c not in  r"\]" ])

-_escapedHexChar = Combine( Suppress(_bslash + "0x") + Word(hexnums) ).setParseAction(lambda s,l,t:unichr(int(t[0],16)))

-_escapedOctChar = Combine( Suppress(_bslash) + Word("0","01234567") ).setParseAction(lambda s,l,t:unichr(int(t[0],8)))

-_singleChar = _escapedPunc | _escapedHexChar | _escapedOctChar | Word(_printables_less_backslash,exact=1)

-_charRange = Group(_singleChar + Suppress("-") + _singleChar)

-_reBracketExpr = "[" + Optional("^").setResultsName("negate") + Group( OneOrMore( _charRange | _singleChar ) ).setResultsName("body") + "]"

-

-_expanded = lambda p: (isinstance(p,ParseResults) and ''.join([ unichr(c) for c in range(ord(p[0]),ord(p[1])+1) ]) or p)

-        

-def srange(s):

-    r"""Helper to easily define string ranges for use in Word construction.  Borrows

-       syntax from regexp '[]' string range definitions::

-          srange("[0-9]")   -> "0123456789"

-          srange("[a-z]")   -> "abcdefghijklmnopqrstuvwxyz"

-          srange("[a-z$_]") -> "abcdefghijklmnopqrstuvwxyz$_"

-       The input string must be enclosed in []'s, and the returned string is the expanded 

-       character set joined into a single string.

-       The values enclosed in the []'s may be::

-          a single character

-          an escaped character with a leading backslash (such as \- or \])

-          an escaped hex character with a leading '\0x' (\0x21, which is a '!' character)

-          an escaped octal character with a leading '\0' (\041, which is a '!' character)

-          a range of any of the above, separated by a dash ('a-z', etc.)

-          any combination of the above ('aeiouy', 'a-zA-Z0-9_$', etc.)

-    """

-    try:

-        return "".join([_expanded(part) for part in _reBracketExpr.parseString(s).body])

-    except:

-        return ""

-

-def replaceWith(replStr):

-    """Helper method for common parse actions that simply return a literal value.  Especially 

-       useful when used with transformString().

-    """

-    def _replFunc(*args):

-        return [replStr]

-    return _replFunc

-

-def removeQuotes(s,l,t):

-    """Helper parse action for removing quotation marks from parsed quoted strings.

-       To use, add this parse action to quoted string using::

-         quotedString.setParseAction( removeQuotes )

-    """

-    return t[0][1:-1]

-

-def upcaseTokens(s,l,t):

-    """Helper parse action to convert tokens to upper case."""

-    return [ str(tt).upper() for tt in t ]

-

-def downcaseTokens(s,l,t):

-    """Helper parse action to convert tokens to lower case."""

-    return [ str(tt).lower() for tt in t ]

-

-def keepOriginalText(s,startLoc,t):

-    import inspect

-    """Helper parse action to preserve original parsed text,

-       overriding any nested parse actions."""

-    f = inspect.stack()[1][0]

-    try:

-        endloc = f.f_locals["loc"]

-    finally:

-        del f

-    return s[startLoc:endloc]

-        

-def _makeTags(tagStr, xml):

-    """Internal helper to construct opening and closing tag expressions, given a tag name"""

-    if isinstance(tagStr,basestring):

-        resname = tagStr

-        tagStr = Keyword(tagStr, caseless=not xml)

-    else:

-        resname = tagStr.name

-        

-    tagAttrName = Word(alphas,alphanums+"_-")

-    if (xml):

-        tagAttrValue = dblQuotedString.copy().setParseAction( removeQuotes )

-        openTag = Suppress("<") + tagStr + \
-                Dict(ZeroOrMore(Group( tagAttrName + Suppress("=") + tagAttrValue ))) + \
-                Optional("/",default=[False]).setResultsName("empty").setParseAction(lambda s,l,t:t[0]=='/') + Suppress(">")

-    else:

-        printablesLessRAbrack = "".join( [ c for c in printables if c not in ">" ] )

-        tagAttrValue = quotedString.copy().setParseAction( removeQuotes ) | Word(printablesLessRAbrack)

-        openTag = Suppress("<") + tagStr + \
-                Dict(ZeroOrMore(Group( tagAttrName.setParseAction(downcaseTokens) + \

-                Suppress("=") + tagAttrValue ))) + \
-                Optional("/",default=[False]).setResultsName("empty").setParseAction(lambda s,l,t:t[0]=='/') + Suppress(">")

-    closeTag = Combine("")

-    

-    openTag = openTag.setResultsName("start"+"".join(resname.replace(":"," ").title().split())).setName("<%s>" % tagStr)

-    closeTag = closeTag.setResultsName("end"+"".join(resname.replace(":"," ").title().split())).setName("" % tagStr)

-    

-    return openTag, closeTag

-

-def makeHTMLTags(tagStr):

-    """Helper to construct opening and closing tag expressions for HTML, given a tag name"""

-    return _makeTags( tagStr, False )

-

-def makeXMLTags(tagStr):

-    """Helper to construct opening and closing tag expressions for XML, given a tag name"""

-    return _makeTags( tagStr, True )

-

-opAssoc = _Constants()

-opAssoc.LEFT = object()

-opAssoc.RIGHT = object()

-

-def operatorPrecedence( baseExpr, opList ):

-    """Helper method for constructing grammars of expressions made up of 

-       operators working in a precedence hierarchy.  Operators may be unary or

-       binary, left- or right-associative.  Parse actions can also be attached

-       to operator expressions.

-        

-       Parameters:

-        - baseExpr - expression representing the most basic element for the nested 

-        - opList - list of tuples, one for each operator precedence level in the expression grammar; each tuple is of the form

-          (opExpr, numTerms, rightLeftAssoc, parseAction), where:

-           - opExpr is the pyparsing expression for the operator;

-              may also be a string, which will be converted to a Literal

-           - numTerms is the number of terms for this operator (must

-              be 1 or 2)

-           - rightLeftAssoc is the indicator whether the operator is

-              right or left associative, using the pyparsing-defined

-              constants opAssoc.RIGHT and opAssoc.LEFT.

-           - parseAction is the parse action to be associated with 

-              expressions matching this operator expression (the

-              parse action tuple member may be omitted)

-    """

-    ret = Forward()

-    lastExpr = baseExpr | ( Suppress('(') + ret + Suppress(')') )

-    for i,operDef in enumerate(opList):

-        opExpr,arity,rightLeftAssoc,pa = (operDef + (None,))[:4]

-        thisExpr = Forward().setName("expr%d" % i)

-        if rightLeftAssoc == opAssoc.LEFT:

-            if arity == 1:

-                matchExpr = Group( lastExpr + opExpr )

-            elif arity == 2:

-                matchExpr = Group( lastExpr + OneOrMore( opExpr + lastExpr ) )

-            else:

-                raise ValueError, "operator must be unary (1) or binary (2)"

-        elif rightLeftAssoc == opAssoc.RIGHT:

-            if arity == 1:

-                # try to avoid LR with this extra test

-                if not isinstance(opExpr, Optional):

-                    opExpr = Optional(opExpr)

-                matchExpr = FollowedBy(opExpr.expr + thisExpr) + Group( opExpr + thisExpr ) 

-            elif arity == 2:

-                matchExpr = Group( lastExpr + OneOrMore( opExpr + thisExpr ) )

-            else:

-                raise ValueError, "operator must be unary (1) or binary (2)"

-        else:

-            raise ValueError, "operator must indicate right or left associativity"

-        if pa:

-            matchExpr.setParseAction( pa )

-        thisExpr << ( matchExpr | lastExpr )

-        lastExpr = thisExpr

-    ret << lastExpr

-    return ret

-

-alphas8bit = srange(r"[\0xc0-\0xd6\0xd8-\0xf6\0xf8-\0xff]")

-punc8bit = srange(r"[\0xa1-\0xbf\0xd7\0xf7]")

-

-dblQuotedString = Regex(r'"(?:[^"\n\r\\]|(?:"")|(?:\\.))*"').setName("string enclosed in double quotes")

-sglQuotedString = Regex(r"'(?:[^'\n\r\\]|(?:'')|(?:\\.))*'").setName("string enclosed in single quotes")

-quotedString = Regex(r'''(?:"(?:[^"\n\r\\]|(?:"")|(?:\\.))*")|(?:'(?:[^'\n\r\\]|(?:'')|(?:\\.))*')''').setName("quotedString using single or double quotes")

-

-anyOpenTag,anyCloseTag = makeHTMLTags(Word(alphas,alphanums+"_"))

-commonHTMLEntity = Combine("&" + oneOf("gt lt amp nbsp quot").setResultsName("entity") +";")

-_htmlEntityMap = dict(zip("gt lt amp nbsp quot".split(),"><& '"))

-replaceHTMLEntity = lambda t : t.entity in _htmlEntityMap and _htmlEntityMap[t.entity] or None

-    

-# it's easy to get these comment structures wrong - they're very common, so may as well make them available

-cStyleComment = Regex(r"/\*(?:[^*]*\*+)+?/").setName("C style comment")

-

-htmlComment = Regex(r"")

-restOfLine = Regex(r".*").leaveWhitespace()

-dblSlashComment = Regex(r"\/\/(\\\n|.)*").setName("// comment")

-cppStyleComment = Regex(r"/(?:\*(?:[^*]*\*+)+?/|/[^\n]*(?:\n[^\n]*)*?(?:(?",

-        try:

-            tokens = simpleSQL.parseString( teststring )

-            tokenlist = tokens.asList()

-            print tokenlist

-            print "tokens = ",        tokens

-            print "tokens.columns =", tokens.columns

-            print "tokens.tables =",  tokens.tables

-            print tokens.asXML("SQL",True)

-        except ParseException, err:

-            print err.line

-            print " "*(err.column-1) + "^"

-            print err

-        print

-

-    selectToken    = CaselessLiteral( "select" )

-    fromToken      = CaselessLiteral( "from" )

-

-    ident          = Word( alphas, alphanums + "_$" )

-    columnName     = delimitedList( ident, ".", combine=True ).setParseAction( upcaseTokens )

-    columnNameList = Group( delimitedList( columnName ) )#.setName("columns")

-    tableName      = delimitedList( ident, ".", combine=True ).setParseAction( upcaseTokens )

-    tableNameList  = Group( delimitedList( tableName ) )#.setName("tables")

-    simpleSQL      = ( selectToken + \

-                     ( '*' | columnNameList ).setResultsName( "columns" ) + \

-                     fromToken + \

-                     tableNameList.setResultsName( "tables" ) )

-    

-    test( "SELECT * from XYZZY, ABC" )

-    test( "select * from SYS.XYZZY" )

-    test( "Select A from Sys.dual" )

-    test( "Select AA,BB,CC from Sys.dual" )

-    test( "Select A, B, C from Sys.dual" )

-    test( "Select A, B, C from Sys.dual" )

-    test( "Xelect A, B, C from Sys.dual" )

-    test( "Select A, B, C frox Sys.dual" )

-    test( "Select" )

-    test( "Select ^^^ frox Sys.dual" )

-    test( "Select A, B, C from Sys.dual, Table2   " )

+# module pyparsing.py
+#
+# Copyright (c) 2003-2006  Paul T. McGuire
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+#from __future__ import generators
+
+__doc__ = \
+"""
+pyparsing module - Classes and methods to define and execute parsing grammars
+
+The pyparsing module is an alternative approach to creating and executing simple grammars, 
+vs. the traditional lex/yacc approach, or the use of regular expressions.  With pyparsing, you
+don't need to learn a new syntax for defining grammars or matching expressions - the parsing module 
+provides a library of classes that you use to construct the grammar directly in Python.
+
+Here is a program to parse "Hello, World!" (or any greeting of the form ", !")::
+
+    from pyparsing import Word, alphas
+    
+    # define grammar of a greeting
+    greet = Word( alphas ) + "," + Word( alphas ) + "!" 
+    
+    hello = "Hello, World!"
+    print hello, "->", greet.parseString( hello )
+
+The program outputs the following::
+
+    Hello, World! -> ['Hello', ',', 'World', '!']
+
+The Python representation of the grammar is quite readable, owing to the self-explanatory 
+class names, and the use of '+', '|' and '^' operators.
+
+The parsed results returned from parseString() can be accessed as a nested list, a dictionary, or an 
+object with named attributes.
+
+The pyparsing module handles some of the problems that are typically vexing when writing text parsers:
+ - extra or missing whitespace (the above program will also handle "Hello,World!", "Hello  ,  World  !", etc.)
+ - quoted strings
+ - embedded comments
+"""
+__version__ = "1.4.5"
+__versionTime__ = "16 December 2006 07:20"
+__author__ = "Paul McGuire "
+
+import string
+import copy,sys
+import warnings
+import re
+import sre_constants
+import xml.sax.saxutils
+#~ sys.stderr.write( "testing pyparsing module, version %s, %s\n" % (__version__,__versionTime__ ) )
+
+def _ustr(obj):
+    """Drop-in replacement for str(obj) that tries to be Unicode friendly. It first tries
+       str(obj). If that fails with a UnicodeEncodeError, then it tries unicode(obj). It
+       then < returns the unicode object | encodes it with the default encoding | ... >.
+    """
+    try:
+        # If this works, then _ustr(obj) has the same behaviour as str(obj), so
+        # it won't break any existing code.
+        return str(obj)
+        
+    except UnicodeEncodeError, e:
+        # The Python docs (http://docs.python.org/ref/customization.html#l2h-182)
+        # state that "The return value must be a string object". However, does a
+        # unicode object (being a subclass of basestring) count as a "string
+        # object"?
+        # If so, then return a unicode object:
+        return unicode(obj)
+        # Else encode it... but how? There are many choices... :)
+        # Replace unprintables with escape codes?
+        #return unicode(obj).encode(sys.getdefaultencoding(), 'backslashreplace_errors')
+        # Replace unprintables with question marks?
+        #return unicode(obj).encode(sys.getdefaultencoding(), 'replace')
+        # ...
+
+def _str2dict(strg):
+    return dict( [(c,0) for c in strg] )
+    #~ return set( [c for c in strg] )
+
+class _Constants(object):
+    pass
+    
+alphas     = string.lowercase + string.uppercase
+nums       = string.digits
+hexnums    = nums + "ABCDEFabcdef"
+alphanums  = alphas + nums    
+
+class ParseBaseException(Exception):
+    """base exception class for all parsing runtime exceptions"""
+    __slots__ = ( "loc","msg","pstr","parserElement" )
+    # Performance tuning: we construct a *lot* of these, so keep this
+    # constructor as small and fast as possible        
+    def __init__( self, pstr, loc, msg, elem=None ):
+        self.loc = loc
+        self.msg = msg
+        self.pstr = pstr
+        self.parserElement = elem
+
+    def __getattr__( self, aname ):
+        """supported attributes by name are:
+            - lineno - returns the line number of the exception text
+            - col - returns the column number of the exception text
+            - line - returns the line containing the exception text
+        """
+        if( aname == "lineno" ):
+            return lineno( self.loc, self.pstr )
+        elif( aname in ("col", "column") ):
+            return col( self.loc, self.pstr )
+        elif( aname == "line" ):
+            return line( self.loc, self.pstr )
+        else:
+            raise AttributeError, aname
+
+    def __str__( self ):
+        return "%s (at char %d), (line:%d, col:%d)" % ( self.msg, self.loc, self.lineno, self.column )
+    def __repr__( self ):
+        return _ustr(self)
+    def markInputline( self, markerString = ">!<" ):
+        """Extracts the exception line from the input string, and marks 
+           the location of the exception with a special symbol.
+        """
+        line_str = self.line
+        line_column = self.column - 1
+        if markerString:
+            line_str = "".join( [line_str[:line_column], markerString, line_str[line_column:]])
+        return line_str.strip()
+
+class ParseException(ParseBaseException):
+    """exception thrown when parse expressions don't match class"""
+    """supported attributes by name are:
+        - lineno - returns the line number of the exception text
+        - col - returns the column number of the exception text
+        - line - returns the line containing the exception text
+    """
+    pass
+    
+class ParseFatalException(ParseBaseException):
+    """user-throwable exception thrown when inconsistent parse content
+       is found; stops all parsing immediately"""
+    pass
+
+class ReparseException(ParseBaseException):
+    def __init_( self, newstring, restartLoc ):
+        self.newParseText = newstring
+        self.reparseLoc = restartLoc
+
+
+class RecursiveGrammarException(Exception):
+    """exception thrown by validate() if the grammar could be improperly recursive"""
+    def __init__( self, parseElementList ):
+        self.parseElementTrace = parseElementList
+    
+    def __str__( self ):
+        return "RecursiveGrammarException: %s" % self.parseElementTrace
+
+class ParseResults(object):
+    """Structured parse results, to provide multiple means of access to the parsed data:
+       - as a list (len(results))
+       - by list index (results[0], results[1], etc.)
+       - by attribute (results.)
+       """
+    __slots__ = ( "__toklist", "__tokdict", "__doinit", "__name", "__parent", "__accumNames" )
+    def __new__(cls, toklist, name=None, asList=True, modal=True ):
+        if isinstance(toklist, cls):
+            return toklist
+        retobj = object.__new__(cls)
+        retobj.__doinit = True
+        return retobj
+        
+    # Performance tuning: we construct a *lot* of these, so keep this
+    # constructor as small and fast as possible
+    def __init__( self, toklist, name=None, asList=True, modal=True ):
+        if self.__doinit:
+            self.__doinit = False
+            self.__name = None
+            self.__parent = None
+            self.__accumNames = {}
+            if isinstance(toklist, list):
+                self.__toklist = toklist[:]
+            else:
+                self.__toklist = [toklist]
+            self.__tokdict = dict()
+
+        # this line is related to debugging the asXML bug
+        #~ asList = False
+        
+        if name:
+            if not modal:
+                self.__accumNames[name] = 0
+            if isinstance(name,int):
+                name = _ustr(name) # will always return a str, but use _ustr for consistency
+            self.__name = name
+            if not toklist in (None,'',[]):
+                if isinstance(toklist,basestring): 
+                    toklist = [ toklist ]
+                if asList:
+                    if isinstance(toklist,ParseResults):
+                        self[name] = (toklist.copy(),-1)
+                    else:
+                        self[name] = (ParseResults(toklist[0]),-1)
+                    self[name].__name = name
+                else:
+                    try:
+                        self[name] = toklist[0]
+                    except (KeyError,TypeError):
+                        self[name] = toklist
+
+    def __getitem__( self, i ):
+        if isinstance( i, (int,slice) ):
+            return self.__toklist[i]
+        else:
+            if i not in self.__accumNames:
+                return self.__tokdict[i][-1][0]
+            else:
+                return ParseResults([ v[0] for v in self.__tokdict[i] ])
+
+    def __setitem__( self, k, v ):
+        if isinstance(v,tuple):
+            self.__tokdict[k] = self.__tokdict.get(k,list()) + [v]
+            sub = v[0]
+        elif isinstance(k,int):
+            self.__toklist[k] = v
+            sub = v
+        else:
+            self.__tokdict[k] = self.__tokdict.get(k,list()) + [(v,0)]
+            sub = v
+        if isinstance(sub,ParseResults):
+            sub.__parent = self
+        
+    def __delitem__( self, i ):
+        if isinstance(i,(int,slice)):
+            del self.__toklist[i]
+        else:
+            del self._tokdict[i]
+
+    def __contains__( self, k ):
+        return self.__tokdict.has_key(k)
+        
+    def __len__( self ): return len( self.__toklist )
+    def __nonzero__( self ): return len( self.__toklist ) > 0
+    def __iter__( self ): return iter( self.__toklist )
+    def keys( self ): 
+        """Returns all named result keys."""
+        return self.__tokdict.keys()
+    
+    def items( self ): 
+        """Returns all named result keys and values as a list of tuples."""
+        return [(k,self[k]) for k in self.__tokdict.keys()]
+    
+    def values( self ): 
+        """Returns all named result values."""
+        return [ v[-1][0] for v in self.__tokdict.values() ]
+
+    def __getattr__( self, name ):
+        if name not in self.__slots__:
+            if self.__tokdict.has_key( name ):
+                if name not in self.__accumNames:
+                    return self.__tokdict[name][-1][0]
+                else:
+                    return ParseResults([ v[0] for v in self.__tokdict[name] ])
+            else:
+                return ""
+        return None
+
+    def __add__( self, other ):
+        ret = self.copy()
+        ret += other
+        return ret
+        
+    def __iadd__( self, other ):
+        if other.__tokdict:
+            offset = len(self.__toklist)
+            addoffset = ( lambda a: (a<0 and offset) or (a+offset) )
+            otheritems = other.__tokdict.items()
+            otherdictitems = [(k,(v[0],addoffset(v[1])) ) for (k,vlist) in otheritems for v in vlist]
+            for k,v in otherdictitems:
+                self[k] = v
+                if isinstance(v[0],ParseResults):
+                    v[0].__parent = self
+        self.__toklist += other.__toklist
+        self.__accumNames.update( other.__accumNames )
+        del other
+        return self
+       
+    def __repr__( self ):
+        return "(%s, %s)" % ( repr( self.__toklist ), repr( self.__tokdict ) )
+
+    def __str__( self ):
+        out = "["
+        sep = ""
+        for i in self.__toklist:
+            if isinstance(i, ParseResults):
+                out += sep + _ustr(i)
+            else:
+                out += sep + repr(i)
+            sep = ", "
+        out += "]"
+        return out
+
+    def _asStringList( self, sep='' ):
+        out = []
+        for item in self.__toklist:
+            if out and sep:
+                out.append(sep)
+            if isinstance( item, ParseResults ):
+                out += item._asStringList()
+            else:
+                out.append( _ustr(item) )
+        return out
+
+    def asList( self ):
+        """Returns the parse results as a nested list of matching tokens, all converted to strings."""
+        out = []
+        for res in self.__toklist:
+            if isinstance(res,ParseResults):
+                out.append( res.asList() )
+            else:
+                out.append( res )
+        return out
+
+    def asDict( self ):
+        """Returns the named parse results as dictionary."""
+        return dict( self.items() )
+
+    def copy( self ):
+        """Returns a new copy of a ParseResults object."""
+        ret = ParseResults( self.__toklist )
+        ret.__tokdict = self.__tokdict.copy()
+        ret.__parent = self.__parent
+        ret.__accumNames.update( self.__accumNames )
+        ret.__name = self.__name
+        return ret
+        
+    def asXML( self, doctag=None, namedItemsOnly=False, indent="", formatted=True ):
+        """Returns the parse results as XML. Tags are created for tokens and lists that have defined results names."""
+        nl = "\n"
+        out = []
+        namedItems = dict( [ (v[1],k) for (k,vlist) in self.__tokdict.items() for v in vlist ] )
+        nextLevelIndent = indent + "  "
+        
+        # collapse out indents if formatting is not desired
+        if not formatted:
+            indent = ""
+            nextLevelIndent = ""
+            nl = ""
+            
+        selfTag = None
+        if doctag is not None:
+            selfTag = doctag
+        else:
+            if self.__name:
+                selfTag = self.__name
+        
+        if not selfTag:
+            if namedItemsOnly:
+                return ""
+            else:
+                selfTag = "ITEM"
+        
+        out += [ nl, indent, "<", selfTag, ">" ]
+        
+        worklist = self.__toklist
+        for i,res in enumerate(worklist):
+            if isinstance(res,ParseResults):
+                if i in namedItems:
+                    out += [ res.asXML(namedItems[i], namedItemsOnly and doctag is None, nextLevelIndent,formatted)]
+                else:
+                    out += [ res.asXML(None, namedItemsOnly and doctag is None, nextLevelIndent,formatted)]
+            else:
+                # individual token, see if there is a name for it
+                resTag = None
+                if i in namedItems:
+                    resTag = namedItems[i]
+                if not resTag:
+                    if namedItemsOnly:
+                        continue
+                    else:
+                        resTag = "ITEM"
+                xmlBodyText = xml.sax.saxutils.escape(_ustr(res))
+                out += [ nl, nextLevelIndent, "<", resTag, ">", xmlBodyText, "" ]
+        
+        out += [ nl, indent, "" ]
+        return "".join(out)
+
+    def __lookup(self,sub):
+        for k,vlist in self.__tokdict.items():
+            for v,loc in vlist:
+                if sub is v:
+                    return k
+        return None
+            
+    def getName(self):
+        """Returns the results name for this token expression."""
+        if self.__name:
+            return self.__name
+        elif self.__parent:
+            par = self.__parent
+            if par:
+                return par.__lookup(self)
+            else:
+                return None
+        elif (len(self) == 1 and 
+               len(self.__tokdict) == 1 and
+               self.__tokdict.values()[0][0][1] in (0,-1)):
+            return self.__tokdict.keys()[0]
+        else:
+            return None
+            
+    def dump(self,indent='',depth=0):
+        """Diagnostic method for listing out the contents of a ParseResults.
+           Accepts an optional indent argument so that this string can be embedded
+           in a nested display of other data."""
+        out = []
+        out.append( indent+str(self.asList()) )
+        keys = self.items()
+        keys.sort()
+        for k,v in keys:
+            if out:
+                out.append('\n')
+            out.append( "%s%s- %s: " % (indent,('  '*depth), k) )
+            if isinstance(v,ParseResults):
+                if v.keys():
+                    #~ out.append('\n')
+                    out.append( v.dump(indent,depth+1) )
+                    #~ out.append('\n')
+                else:
+                    out.append(str(v))
+            else:
+                out.append(str(v))
+        #~ out.append('\n')
+        return "".join(out)
+
+    # add support for pickle protocol
+    def __getstate__(self):
+        return ( self.__toklist,
+                 ( self.__tokdict.copy(),
+                   self.__parent,
+                   self.__accumNames,
+                   self.__name ) )
+    
+    def __setstate__(self,state):
+        self.__toklist = state[0]
+        self.__tokdict, \
+        self.__parent, \
+        inAccumNames, \
+        self.__name = state[1]
+        self.__accumNames = {}
+        self.__accumNames.update(inAccumNames)
+
+
+def col (loc,strg):
+    """Returns current column within a string, counting newlines as line separators.
+   The first column is number 1.
+   """
+    return (loc 0:
+        return strg[lastCR+1:nextCR]
+    else:
+        return strg[lastCR+1:]
+
+def _defaultStartDebugAction( instring, loc, expr ):
+    print "Match",expr,"at loc",loc,"(%d,%d)" % ( lineno(loc,instring), col(loc,instring) )
+
+def _defaultSuccessDebugAction( instring, startloc, endloc, expr, toks ):
+    print "Matched",expr,"->",toks.asList()
+    
+def _defaultExceptionDebugAction( instring, loc, expr, exc ):
+    print "Exception raised:", exc
+
+def nullDebugAction(*args):
+    """'Do-nothing' debug action, to suppress debugging output during parsing."""
+    pass
+
+class ParserElement(object):
+    """Abstract base level parser element class."""
+    DEFAULT_WHITE_CHARS = " \n\t\r"
+    
+    def setDefaultWhitespaceChars( chars ):
+        """Overrides the default whitespace chars
+        """
+        ParserElement.DEFAULT_WHITE_CHARS = chars
+    setDefaultWhitespaceChars = staticmethod(setDefaultWhitespaceChars)
+    
+    def __init__( self, savelist=False ):
+        self.parseAction = list()
+        self.failAction = None
+        #~ self.name = ""  # don't define self.name, let subclasses try/except upcall
+        self.strRepr = None
+        self.resultsName = None
+        self.saveAsList = savelist
+        self.skipWhitespace = True
+        self.whiteChars = ParserElement.DEFAULT_WHITE_CHARS
+        self.copyDefaultWhiteChars = True
+        self.mayReturnEmpty = False
+        self.keepTabs = False
+        self.ignoreExprs = list()
+        self.debug = False
+        self.streamlined = False
+        self.mayIndexError = True
+        self.errmsg = ""
+        self.modalResults = True
+        self.debugActions = ( None, None, None )
+        self.re = None
+
+    def copy( self ):
+        """Make a copy of this ParserElement.  Useful for defining different parse actions
+           for the same parsing pattern, using copies of the original parse element."""
+        cpy = copy.copy( self )
+        cpy.parseAction = self.parseAction[:]
+        cpy.ignoreExprs = self.ignoreExprs[:]
+        if self.copyDefaultWhiteChars:
+            cpy.whiteChars = ParserElement.DEFAULT_WHITE_CHARS
+        return cpy
+
+    def setName( self, name ):
+        """Define name for this expression, for use in debugging."""
+        self.name = name
+        self.errmsg = "Expected " + self.name
+        return self
+
+    def setResultsName( self, name, listAllMatches=False ):
+        """Define name for referencing matching tokens as a nested attribute 
+           of the returned parse results.
+           NOTE: this returns a *copy* of the original ParserElement object;
+           this is so that the client can define a basic element, such as an
+           integer, and reference it in multiple places with different names.
+        """
+        newself = self.copy()
+        newself.resultsName = name
+        newself.modalResults = not listAllMatches
+        return newself
+
+    def normalizeParseActionArgs( f ):
+        """Internal method used to decorate parse actions that take fewer than 3 arguments,
+           so that all parse actions can be called as f(s,l,t)."""
+        STAR_ARGS = 4
+
+        try:
+            restore = None
+            if isinstance(f,type):
+                restore = f
+                f = f.__init__
+            if f.func_code.co_flags & STAR_ARGS:
+                return f
+            numargs = f.func_code.co_argcount
+            if hasattr(f,"im_self"):
+                numargs -= 1
+            if restore:
+                f = restore
+        except AttributeError:
+            try:
+                # not a function, must be a callable object, get info from the
+                # im_func binding of its bound __call__ method
+                if f.__call__.im_func.func_code.co_flags & STAR_ARGS:
+                    return f
+                numargs = f.__call__.im_func.func_code.co_argcount
+                if hasattr(f.__call__,"im_self"):
+                    numargs -= 1
+            except AttributeError:
+                # not a bound method, get info directly from __call__ method
+                if f.__call__.func_code.co_flags & STAR_ARGS:
+                    return f
+                numargs = f.__call__.func_code.co_argcount
+                if hasattr(f.__call__,"im_self"):
+                    numargs -= 1
+
+        #~ print "adding function %s with %d args" % (f.func_name,numargs)
+        if numargs == 3:
+            return f
+        else:
+            if numargs == 2:
+                def tmp(s,l,t):
+                    return f(l,t)
+            elif numargs == 1:
+                def tmp(s,l,t):
+                    return f(t)
+            else: #~ numargs == 0:
+                def tmp(s,l,t):
+                    return f()
+            return tmp
+    normalizeParseActionArgs = staticmethod(normalizeParseActionArgs)
+            
+    def setParseAction( self, *fns ):
+        """Define action to perform when successfully matching parse element definition.
+           Parse action fn is a callable method with 0-3 arguments, called as fn(s,loc,toks),
+           fn(loc,toks), fn(toks), or just fn(), where:
+            - s   = the original string being parsed
+            - loc = the location of the matching substring
+            - toks = a list of the matched tokens, packaged as a ParseResults object
+           If the functions in fns modify the tokens, they can return them as the return
+           value from fn, and the modified list of tokens will replace the original.
+           Otherwise, fn does not need to return any value."""
+        self.parseAction = map(self.normalizeParseActionArgs, list(fns))
+        return self
+
+    def addParseAction( self, *fns ):
+        """Add parse action to expression's list of parse actions. See setParseAction_."""
+        self.parseAction += map(self.normalizeParseActionArgs, list(fns))
+        return self
+
+    def setFailAction( self, fn ):
+        """Define action to perform if parsing fails at this expression. 
+           Fail acton fn is a callable function that takes the arguments 
+           fn(s,loc,expr,err) where:
+            - s = string being parsed
+            - loc = location where expression match was attempted and failed
+            - expr = the parse expression that failed
+            - err = the exception thrown
+           The function returns no value.  It may throw ParseFatalException
+           if it is desired to stop parsing immediately."""
+        self.failAction = fn
+        return self
+        
+    def skipIgnorables( self, instring, loc ):
+        exprsFound = True
+        while exprsFound:
+            exprsFound = False
+            for e in self.ignoreExprs:
+                try:
+                    while 1:
+                        loc,dummy = e._parse( instring, loc )
+                        exprsFound = True
+                except ParseException:
+                    pass
+        return loc
+
+    def preParse( self, instring, loc ):
+        if self.ignoreExprs:
+            loc = self.skipIgnorables( instring, loc )
+        
+        if self.skipWhitespace:
+            wt = self.whiteChars
+            instrlen = len(instring)
+            while loc < instrlen and instring[loc] in wt:
+                loc += 1
+                
+        return loc
+
+    def parseImpl( self, instring, loc, doActions=True ):
+        return loc, []
+
+    def postParse( self, instring, loc, tokenlist ):
+        return tokenlist
+
+    #~ @profile
+    def _parseNoCache( self, instring, loc, doActions=True, callPreParse=True ):
+        debugging = ( self.debug ) #and doActions )
+
+        if debugging or self.failAction:
+            #~ print "Match",self,"at loc",loc,"(%d,%d)" % ( lineno(loc,instring), col(loc,instring) )
+            if (self.debugActions[0] ):
+                self.debugActions[0]( instring, loc, self )
+            if callPreParse:
+                preloc = self.preParse( instring, loc )
+            else:
+                preloc = loc
+            tokensStart = loc
+            try:
+                try:
+                    loc,tokens = self.parseImpl( instring, preloc, doActions )
+                except IndexError:
+                    raise ParseException( instring, len(instring), self.errmsg, self )
+            #~ except ReparseException, retryEx:
+                #~ pass
+            except ParseException, err:
+                #~ print "Exception raised:", err
+                if self.debugActions[2]:
+                    self.debugActions[2]( instring, tokensStart, self, err )
+                if self.failAction:
+                    self.failAction( instring, tokensStart, self, err )
+                raise
+        else:
+            if callPreParse:
+                preloc = self.preParse( instring, loc )
+            else:
+                preloc = loc
+            tokensStart = loc
+            if self.mayIndexError or loc >= len(instring):
+                try:
+                    loc,tokens = self.parseImpl( instring, preloc, doActions )
+                except IndexError:
+                    raise ParseException( instring, len(instring), self.errmsg, self )
+            else:
+                loc,tokens = self.parseImpl( instring, preloc, doActions )
+        
+        tokens = self.postParse( instring, loc, tokens )
+
+        retTokens = ParseResults( tokens, self.resultsName, asList=self.saveAsList, modal=self.modalResults )
+        if self.parseAction and doActions:
+            if debugging:
+                try:
+                    for fn in self.parseAction:
+                        tokens = fn( instring, tokensStart, retTokens )
+                        if tokens is not None:
+                            retTokens = ParseResults( tokens, 
+                                                      self.resultsName, 
+                                                      asList=self.saveAsList and isinstance(tokens,(ParseResults,list)), 
+                                                      modal=self.modalResults )
+                except ParseException, err:
+                    #~ print "Exception raised in user parse action:", err
+                    if (self.debugActions[2] ):
+                        self.debugActions[2]( instring, tokensStart, self, err )
+                    raise
+            else:
+                for fn in self.parseAction:
+                    tokens = fn( instring, tokensStart, retTokens )
+                    if tokens is not None:
+                        retTokens = ParseResults( tokens, 
+                                                  self.resultsName, 
+                                                  asList=self.saveAsList and isinstance(tokens,(ParseResults,list)), 
+                                                  modal=self.modalResults )
+
+        if debugging:
+            #~ print "Matched",self,"->",retTokens.asList()
+            if (self.debugActions[1] ):
+                self.debugActions[1]( instring, tokensStart, loc, self, retTokens )
+
+        return loc, retTokens
+
+    def tryParse( self, instring, loc ):
+        return self._parse( instring, loc, doActions=False )[0]
+    
+    # this method gets repeatedly called during backtracking with the same arguments -
+    # we can cache these arguments and save ourselves the trouble of re-parsing the contained expression
+    def _parseCache( self, instring, loc, doActions=True, callPreParse=True ):
+        if doActions and self.parseAction:
+            return self._parseNoCache( instring, loc, doActions, callPreParse )
+        lookup = (self,instring,loc,callPreParse)
+        if lookup in ParserElement._exprArgCache:
+            value = ParserElement._exprArgCache[ lookup ]
+            if isinstance(value,Exception):
+                if isinstance(value,ParseBaseException):
+                    value.loc = loc
+                raise value
+            return value
+        else:
+            try:
+                ParserElement._exprArgCache[ lookup ] = \
+                    value = self._parseNoCache( instring, loc, doActions, callPreParse )
+                return value
+            except ParseBaseException, pe:
+                ParserElement._exprArgCache[ lookup ] = pe
+                raise
+
+    _parse = _parseNoCache
+
+    # argument cache for optimizing repeated calls when backtracking through recursive expressions
+    _exprArgCache = {}
+    def resetCache():
+        ParserElement._exprArgCache.clear()
+    resetCache = staticmethod(resetCache)
+    
+    _packratEnabled = False
+    def enablePackrat():
+        """Enables "packrat" parsing, which adds memoizing to the parsing logic.
+           Repeated parse attempts at the same string location (which happens 
+           often in many complex grammars) can immediately return a cached value, 
+           instead of re-executing parsing/validating code.  Memoizing is done of
+           both valid results and parsing exceptions.
+            
+           This speedup may break existing programs that use parse actions that 
+           have side-effects.  For this reason, packrat parsing is disabled when
+           you first import pyparsing.  To activate the packrat feature, your
+           program must call the class method ParserElement.enablePackrat().  If
+           your program uses psyco to "compile as you go", you must call 
+           enablePackrat before calling psyco.full().  If you do not do this,
+           Python will crash.  For best results, call enablePackrat() immediately
+           after importing pyparsing.
+        """
+        if not ParserElement._packratEnabled:
+            ParserElement._packratEnabled = True
+            ParserElement._parse = ParserElement._parseCache
+    enablePackrat = staticmethod(enablePackrat)
+
+    def parseString( self, instring ):
+        """Execute the parse expression with the given string.
+           This is the main interface to the client code, once the complete 
+           expression has been built.
+        """
+        ParserElement.resetCache()
+        if not self.streamlined:
+            self.streamline()
+            #~ self.saveAsList = True
+        for e in self.ignoreExprs:
+            e.streamline()
+        if self.keepTabs:
+            loc, tokens = self._parse( instring, 0 )
+        else:
+            loc, tokens = self._parse( instring.expandtabs(), 0 )
+        return tokens
+
+    def scanString( self, instring, maxMatches=sys.maxint ):
+        """Scan the input string for expression matches.  Each match will return the 
+           matching tokens, start location, and end location.  May be called with optional
+           maxMatches argument, to clip scanning after 'n' matches are found."""
+        if not self.streamlined:
+            self.streamline()
+        for e in self.ignoreExprs:
+            e.streamline()
+        
+        if not self.keepTabs:
+            instring = instring.expandtabs()
+        instrlen = len(instring)
+        loc = 0
+        preparseFn = self.preParse
+        parseFn = self._parse
+        ParserElement.resetCache()
+        matches = 0
+        while loc <= instrlen and matches < maxMatches:
+            try:
+                preloc = preparseFn( instring, loc )
+                nextLoc,tokens = parseFn( instring, preloc, callPreParse=False )
+            except ParseException:
+                loc = preloc+1
+            else:
+                matches += 1
+                yield tokens, preloc, nextLoc
+                loc = nextLoc
+        
+    def transformString( self, instring ):
+        """Extension to scanString, to modify matching text with modified tokens that may
+           be returned from a parse action.  To use transformString, define a grammar and 
+           attach a parse action to it that modifies the returned token list.  
+           Invoking transformString() on a target string will then scan for matches, 
+           and replace the matched text patterns according to the logic in the parse 
+           action.  transformString() returns the resulting transformed string."""
+        out = []
+        lastE = 0
+        # force preservation of s, to minimize unwanted transformation of string, and to
+        # keep string locs straight between transformString and scanString
+        self.keepTabs = True
+        for t,s,e in self.scanString( instring ):
+            out.append( instring[lastE:s] )
+            if t:
+                if isinstance(t,ParseResults):
+                    out += t.asList()
+                elif isinstance(t,list):
+                    out += t
+                else:
+                    out.append(t)
+            lastE = e
+        out.append(instring[lastE:])
+        return "".join(out)
+
+    def searchString( self, instring, maxMatches=sys.maxint ):
+        """Another extension to scanString, simplifying the access to the tokens found
+           to match the given parse expression.  May be called with optional
+           maxMatches argument, to clip searching after 'n' matches are found.
+        """
+        return ParseResults([ t for t,s,e in self.scanString( instring, maxMatches ) ])
+            
+    def __add__(self, other ):
+        """Implementation of + operator - returns And"""
+        if isinstance( other, basestring ):
+            other = Literal( other )
+        if not isinstance( other, ParserElement ):
+            warnings.warn("Cannot add element of type %s to ParserElement" % type(other),
+                    SyntaxWarning, stacklevel=2)
+        return And( [ self, other ] )
+
+    def __radd__(self, other ):
+        """Implementation of += operator"""
+        if isinstance( other, basestring ):
+            other = Literal( other )
+        if not isinstance( other, ParserElement ):
+            warnings.warn("Cannot add element of type %s to ParserElement" % type(other),
+                    SyntaxWarning, stacklevel=2)
+        return other + self
+
+    def __or__(self, other ):
+        """Implementation of | operator - returns MatchFirst"""
+        if isinstance( other, basestring ):
+            other = Literal( other )
+        if not isinstance( other, ParserElement ):
+            warnings.warn("Cannot add element of type %s to ParserElement" % type(other),
+                    SyntaxWarning, stacklevel=2)
+        return MatchFirst( [ self, other ] )
+
+    def __ror__(self, other ):
+        """Implementation of |= operator"""
+        if isinstance( other, basestring ):
+            other = Literal( other )
+        if not isinstance( other, ParserElement ):
+            warnings.warn("Cannot add element of type %s to ParserElement" % type(other),
+                    SyntaxWarning, stacklevel=2)
+        return other | self
+
+    def __xor__(self, other ):
+        """Implementation of ^ operator - returns Or"""
+        if isinstance( other, basestring ):
+            other = Literal( other )
+        if not isinstance( other, ParserElement ):
+            warnings.warn("Cannot add element of type %s to ParserElement" % type(other),
+                    SyntaxWarning, stacklevel=2)
+        return Or( [ self, other ] )
+
+    def __rxor__(self, other ):
+        """Implementation of ^= operator"""
+        if isinstance( other, basestring ):
+            other = Literal( other )
+        if not isinstance( other, ParserElement ):
+            warnings.warn("Cannot add element of type %s to ParserElement" % type(other),
+                    SyntaxWarning, stacklevel=2)
+        return other ^ self
+
+    def __and__(self, other ):
+        """Implementation of & operator - returns Each"""
+        if isinstance( other, basestring ):
+            other = Literal( other )
+        if not isinstance( other, ParserElement ):
+            warnings.warn("Cannot add element of type %s to ParserElement" % type(other),
+                    SyntaxWarning, stacklevel=2)
+        return Each( [ self, other ] )
+
+    def __rand__(self, other ):
+        """Implementation of right-& operator"""
+        if isinstance( other, basestring ):
+            other = Literal( other )
+        if not isinstance( other, ParserElement ):
+            warnings.warn("Cannot add element of type %s to ParserElement" % type(other),
+                    SyntaxWarning, stacklevel=2)
+        return other & self
+
+    def __invert__( self ):
+        """Implementation of ~ operator - returns NotAny"""
+        return NotAny( self )
+
+    def suppress( self ):
+        """Suppresses the output of this ParserElement; useful to keep punctuation from
+           cluttering up returned output.
+        """
+        return Suppress( self )
+
+    def leaveWhitespace( self ):
+        """Disables the skipping of whitespace before matching the characters in the 
+           ParserElement's defined pattern.  This is normally only used internally by
+           the pyparsing module, but may be needed in some whitespace-sensitive grammars.
+        """
+        self.skipWhitespace = False
+        return self
+
+    def setWhitespaceChars( self, chars ):
+        """Overrides the default whitespace chars
+        """
+        self.skipWhitespace = True
+        self.whiteChars = chars
+        self.copyDefaultWhiteChars = False
+        return self
+        
+    def parseWithTabs( self ):
+        """Overrides default behavior to expand s to spaces before parsing the input string.
+           Must be called before parseString when the input grammar contains elements that 
+           match  characters."""
+        self.keepTabs = True
+        return self
+        
+    def ignore( self, other ):
+        """Define expression to be ignored (e.g., comments) while doing pattern 
+           matching; may be called repeatedly, to define multiple comment or other
+           ignorable patterns.
+        """
+        if isinstance( other, Suppress ):
+            if other not in self.ignoreExprs:
+                self.ignoreExprs.append( other )
+        else:
+            self.ignoreExprs.append( Suppress( other ) )
+        return self
+
+    def setDebugActions( self, startAction, successAction, exceptionAction ):
+        """Enable display of debugging messages while doing pattern matching."""
+        self.debugActions = (startAction or _defaultStartDebugAction, 
+                             successAction or _defaultSuccessDebugAction, 
+                             exceptionAction or _defaultExceptionDebugAction)
+        self.debug = True
+        return self
+
+    def setDebug( self, flag=True ):
+        """Enable display of debugging messages while doing pattern matching."""
+        if flag:
+            self.setDebugActions( _defaultStartDebugAction, _defaultSuccessDebugAction, _defaultExceptionDebugAction )
+        else:
+            self.debug = False
+        return self
+
+    def __str__( self ):
+        return self.name
+
+    def __repr__( self ):
+        return _ustr(self)
+        
+    def streamline( self ):
+        self.streamlined = True
+        self.strRepr = None
+        return self
+        
+    def checkRecursion( self, parseElementList ):
+        pass
+        
+    def validate( self, validateTrace=[] ):
+        """Check defined expressions for valid structure, check for infinite recursive definitions."""
+        self.checkRecursion( [] )
+
+    def parseFile( self, file_or_filename ):
+        """Execute the parse expression on the given file or filename.
+           If a filename is specified (instead of a file object),
+           the entire file is opened, read, and closed before parsing.
+        """
+        try:
+            file_contents = file_or_filename.read()
+        except AttributeError:
+            f = open(file_or_filename, "rb")
+            file_contents = f.read()
+            f.close()
+        return self.parseString(file_contents)
+
+
+class Token(ParserElement):
+    """Abstract ParserElement subclass, for defining atomic matching patterns."""
+    def __init__( self ):
+        super(Token,self).__init__( savelist=False )
+        self.myException = ParseException("",0,"",self)
+
+    def setName(self, name):
+        s = super(Token,self).setName(name)
+        self.errmsg = "Expected " + self.name
+        s.myException.msg = self.errmsg
+        return s
+
+
+class Empty(Token):
+    """An empty token, will always match."""
+    def __init__( self ):
+        super(Empty,self).__init__()
+        self.name = "Empty"
+        self.mayReturnEmpty = True
+        self.mayIndexError = False
+
+
+class NoMatch(Token):
+    """A token that will never match."""
+    def __init__( self ):
+        super(NoMatch,self).__init__()
+        self.name = "NoMatch"
+        self.mayReturnEmpty = True
+        self.mayIndexError = False
+        self.errmsg = "Unmatchable token"
+        self.myException.msg = self.errmsg
+        
+    def parseImpl( self, instring, loc, doActions=True ):
+        exc = self.myException
+        exc.loc = loc
+        exc.pstr = instring
+        raise exc
+
+
+class Literal(Token):
+    """Token to exactly match a specified string."""
+    def __init__( self, matchString ):
+        super(Literal,self).__init__()
+        self.match = matchString
+        self.matchLen = len(matchString)
+        try:
+            self.firstMatchChar = matchString[0]
+        except IndexError:
+            warnings.warn("null string passed to Literal; use Empty() instead", 
+                            SyntaxWarning, stacklevel=2)
+            self.__class__ = Empty
+        self.name = '"%s"' % self.match
+        self.errmsg = "Expected " + self.name
+        self.mayReturnEmpty = False
+        self.myException.msg = self.errmsg
+        self.mayIndexError = False
+
+    # Performance tuning: this routine gets called a *lot*
+    # if this is a single character match string  and the first character matches,
+    # short-circuit as quickly as possible, and avoid calling startswith
+    #~ @profile
+    def parseImpl( self, instring, loc, doActions=True ):
+        if (instring[loc] == self.firstMatchChar and
+            (self.matchLen==1 or instring.startswith(self.match,loc)) ):
+            return loc+self.matchLen, self.match
+        #~ raise ParseException( instring, loc, self.errmsg )
+        exc = self.myException
+        exc.loc = loc
+        exc.pstr = instring
+        raise exc
+
+class Keyword(Token):
+    """Token to exactly match a specified string as a keyword, that is, it must be 
+       immediately followed by a non-keyword character.  Compare with Literal::
+         Literal("if") will match the leading 'if' in 'ifAndOnlyIf'.
+         Keyword("if") will not; it will only match the leading 'if in 'if x=1', or 'if(y==2)'
+       Accepts two optional constructor arguments in addition to the keyword string:
+       identChars is a string of characters that would be valid identifier characters,
+       defaulting to all alphanumerics + "_" and "$"; caseless allows case-insensitive
+       matching, default is False.
+    """
+    DEFAULT_KEYWORD_CHARS = alphanums+"_$"
+    
+    def __init__( self, matchString, identChars=DEFAULT_KEYWORD_CHARS, caseless=False ):
+        super(Keyword,self).__init__()
+        self.match = matchString
+        self.matchLen = len(matchString)
+        try:
+            self.firstMatchChar = matchString[0]
+        except IndexError:
+            warnings.warn("null string passed to Keyword; use Empty() instead", 
+                            SyntaxWarning, stacklevel=2)
+        self.name = '"%s"' % self.match
+        self.errmsg = "Expected " + self.name
+        self.mayReturnEmpty = False
+        self.myException.msg = self.errmsg
+        self.mayIndexError = False
+        self.caseless = caseless
+        if caseless:
+            self.caselessmatch = matchString.upper()
+            identChars = identChars.upper()
+        self.identChars = _str2dict(identChars)
+
+    def parseImpl( self, instring, loc, doActions=True ):
+        if self.caseless:
+            if ( (instring[ loc:loc+self.matchLen ].upper() == self.caselessmatch) and
+                 (loc >= len(instring)-self.matchLen or instring[loc+self.matchLen].upper() not in self.identChars) and
+                 (loc == 0 or instring[loc-1].upper() not in self.identChars) ):
+                return loc+self.matchLen, self.match
+        else:
+            if (instring[loc] == self.firstMatchChar and
+                (self.matchLen==1 or instring.startswith(self.match,loc)) and
+                (loc >= len(instring)-self.matchLen or instring[loc+self.matchLen] not in self.identChars) and
+                (loc == 0 or instring[loc-1] not in self.identChars) ):
+                return loc+self.matchLen, self.match
+        #~ raise ParseException( instring, loc, self.errmsg )
+        exc = self.myException
+        exc.loc = loc
+        exc.pstr = instring
+        raise exc
+        
+    def copy(self):
+        c = super(Keyword,self).copy()
+        c.identChars = Keyword.DEFAULT_KEYWORD_CHARS
+        return c
+        
+    def setDefaultKeywordChars( chars ):
+        """Overrides the default Keyword chars
+        """
+        Keyword.DEFAULT_KEYWORD_CHARS = chars
+    setDefaultKeywordChars = staticmethod(setDefaultKeywordChars)        
+
+
+class CaselessLiteral(Literal):
+    """Token to match a specified string, ignoring case of letters.
+       Note: the matched results will always be in the case of the given
+       match string, NOT the case of the input text.
+    """
+    def __init__( self, matchString ):
+        super(CaselessLiteral,self).__init__( matchString.upper() )
+        # Preserve the defining literal.
+        self.returnString = matchString
+        self.name = "'%s'" % self.returnString
+        self.errmsg = "Expected " + self.name
+        self.myException.msg = self.errmsg
+
+    def parseImpl( self, instring, loc, doActions=True ):
+        if instring[ loc:loc+self.matchLen ].upper() == self.match:
+            return loc+self.matchLen, self.returnString
+        #~ raise ParseException( instring, loc, self.errmsg )
+        exc = self.myException
+        exc.loc = loc
+        exc.pstr = instring
+        raise exc
+
+class CaselessKeyword(Keyword):
+    def __init__( self, matchString, identChars=Keyword.DEFAULT_KEYWORD_CHARS ):
+        super(CaselessKeyword,self).__init__( matchString, identChars, caseless=True )
+
+    def parseImpl( self, instring, loc, doActions=True ):
+        if ( (instring[ loc:loc+self.matchLen ].upper() == self.caselessmatch) and
+             (loc >= len(instring)-self.matchLen or instring[loc+self.matchLen].upper() not in self.identChars) ):
+            return loc+self.matchLen, self.match
+        #~ raise ParseException( instring, loc, self.errmsg )
+        exc = self.myException
+        exc.loc = loc
+        exc.pstr = instring
+        raise exc
+
+class Word(Token):
+    """Token for matching words composed of allowed character sets.
+       Defined with string containing all allowed initial characters,
+       an optional string containing allowed body characters (if omitted,
+       defaults to the initial character set), and an optional minimum,
+       maximum, and/or exact length.
+    """
+    def __init__( self, initChars, bodyChars=None, min=1, max=0, exact=0 ):
+        super(Word,self).__init__()
+        self.initCharsOrig = initChars
+        self.initChars = _str2dict(initChars)
+        if bodyChars :
+            self.bodyCharsOrig = bodyChars
+            self.bodyChars = _str2dict(bodyChars)
+        else:
+            self.bodyCharsOrig = initChars
+            self.bodyChars = _str2dict(initChars)
+            
+        self.maxSpecified = max > 0
+
+        self.minLen = min
+
+        if max > 0:
+            self.maxLen = max
+        else:
+            self.maxLen = sys.maxint
+
+        if exact > 0:
+            self.maxLen = exact
+            self.minLen = exact
+
+        self.name = _ustr(self)
+        self.errmsg = "Expected " + self.name
+        self.myException.msg = self.errmsg
+        self.mayIndexError = False
+        
+        if ' ' not in self.initCharsOrig+self.bodyCharsOrig and (min==1 and max==0 and exact==0):
+            if self.bodyCharsOrig == self.initCharsOrig:
+                self.reString = "[%s]+" % _escapeRegexRangeChars(self.initCharsOrig)
+            elif len(self.bodyCharsOrig) == 1:
+                self.reString = "%s[%s]*" % \
+                                      (re.escape(self.initCharsOrig),
+                                      _escapeRegexRangeChars(self.bodyCharsOrig),)
+            else:
+                self.reString = "[%s][%s]*" % \
+                                      (_escapeRegexRangeChars(self.initCharsOrig),
+                                      _escapeRegexRangeChars(self.bodyCharsOrig),)
+            try:
+                self.re = re.compile( self.reString )
+            except:
+                self.re = None
+        
+    def parseImpl( self, instring, loc, doActions=True ):
+        if self.re:
+            result = self.re.match(instring,loc)
+            if not result:
+                exc = self.myException
+                exc.loc = loc
+                exc.pstr = instring
+                raise exc
+            
+            loc = result.end()
+            return loc,result.group()
+        
+        if not(instring[ loc ] in self.initChars):
+            #~ raise ParseException( instring, loc, self.errmsg )
+            exc = self.myException
+            exc.loc = loc
+            exc.pstr = instring
+            raise exc
+        start = loc
+        loc += 1
+        instrlen = len(instring)
+        bodychars = self.bodyChars
+        maxloc = start + self.maxLen
+        maxloc = min( maxloc, instrlen )
+        while loc < maxloc and instring[loc] in bodychars:
+            loc += 1
+            
+        throwException = False
+        if loc - start < self.minLen:
+            throwException = True
+        if self.maxSpecified and loc < instrlen and instring[loc] in bodychars:
+            throwException = True
+
+        if throwException:
+            #~ raise ParseException( instring, loc, self.errmsg )
+            exc = self.myException
+            exc.loc = loc
+            exc.pstr = instring
+            raise exc
+
+        return loc, instring[start:loc]
+
+    def __str__( self ):
+        try:
+            return super(Word,self).__str__()
+        except:
+            pass
+
+            
+        if self.strRepr is None:
+            
+            def charsAsStr(s):
+                if len(s)>4:
+                    return s[:4]+"..."
+                else:
+                    return s
+            
+            if ( self.initCharsOrig != self.bodyCharsOrig ):
+                self.strRepr = "W:(%s,%s)" % ( charsAsStr(self.initCharsOrig), charsAsStr(self.bodyCharsOrig) )
+            else:
+                self.strRepr = "W:(%s)" % charsAsStr(self.initCharsOrig)
+
+        return self.strRepr
+
+
+class Regex(Token):
+    """Token for matching strings that match a given regular expression.
+       Defined with string specifying the regular expression in a form recognized by the inbuilt Python re module.
+    """
+    def __init__( self, pattern, flags=0):
+        """The parameters pattern and flags are passed to the re.compile() function as-is. See the Python re module for an explanation of the acceptable patterns and flags."""
+        super(Regex,self).__init__()
+        
+        if len(pattern) == 0:
+            warnings.warn("null string passed to Regex; use Empty() instead", 
+                    SyntaxWarning, stacklevel=2)
+    
+        self.pattern = pattern
+        self.flags = flags
+        
+        try:
+            self.re = re.compile(self.pattern, self.flags)
+            self.reString = self.pattern
+        except sre_constants.error,e:
+            warnings.warn("invalid pattern (%s) passed to Regex" % pattern, 
+                SyntaxWarning, stacklevel=2)
+            raise
+
+        self.name = _ustr(self)
+        self.errmsg = "Expected " + self.name
+        self.myException.msg = self.errmsg
+        self.mayIndexError = False
+        self.mayReturnEmpty = True
+    
+    def parseImpl( self, instring, loc, doActions=True ):
+        result = self.re.match(instring,loc)
+        if not result:
+            exc = self.myException
+            exc.loc = loc
+            exc.pstr = instring
+            raise exc
+        
+        loc = result.end()
+        d = result.groupdict()
+        ret = ParseResults(result.group())
+        if d:
+            for k in d.keys():
+                ret[k] = d[k]
+        return loc,ret
+    
+    def __str__( self ):
+        try:
+            return super(Regex,self).__str__()
+        except:
+            pass
+        
+        if self.strRepr is None:
+            self.strRepr = "Re:(%s)" % repr(self.pattern)
+        
+        return self.strRepr
+
+
+class QuotedString(Token):
+    """Token for matching strings that are delimited by quoting characters.
+    """
+    def __init__( self, quoteChar, escChar=None, escQuote=None, multiline=False, unquoteResults=True, endQuoteChar=None):
+        """
+           Defined with the following parameters:
+           - quoteChar - string of one or more characters defining the quote delimiting string
+           - escChar - character to escape quotes, typically backslash (default=None)
+           - escQuote - special quote sequence to escape an embedded quote string (such as SQL's "" to escape an embedded ") (default=None)
+           - multiline - boolean indicating whether quotes can span multiple lines (default=False)
+           - unquoteResults - boolean indicating whether the matched text should be unquoted (default=True)
+           - endQuoteChar - string of one or more characters defining the end of the quote delimited string (default=None => same as quoteChar)
+        """
+        super(QuotedString,self).__init__()
+        
+        # remove white space from quote chars - wont work anyway
+        quoteChar = quoteChar.strip()
+        if len(quoteChar) == 0:
+            warnings.warn("quoteChar cannot be the empty string",SyntaxWarning,stacklevel=2)
+            raise SyntaxError()
+        
+        if endQuoteChar is None:
+            endQuoteChar = quoteChar
+        else:
+            endQuoteChar = endQuoteChar.strip()
+            if len(endQuoteChar) == 0:
+                warnings.warn("endQuoteChar cannot be the empty string",SyntaxWarning,stacklevel=2)
+                raise SyntaxError()
+        
+        self.quoteChar = quoteChar
+        self.quoteCharLen = len(quoteChar)
+        self.firstQuoteChar = quoteChar[0]
+        self.endQuoteChar = endQuoteChar
+        self.endQuoteCharLen = len(endQuoteChar)
+        self.escChar = escChar
+        self.escQuote = escQuote
+        self.unquoteResults = unquoteResults
+        
+        if multiline:
+            self.flags = re.MULTILINE | re.DOTALL
+            self.pattern = r'%s(?:[^%s%s]' % \
+                ( re.escape(self.quoteChar),
+                  _escapeRegexRangeChars(self.endQuoteChar[0]),
+                  (escChar is not None and _escapeRegexRangeChars(escChar) or '') )
+        else:
+            self.flags = 0
+            self.pattern = r'%s(?:[^%s\n\r%s]' % \
+                ( re.escape(self.quoteChar),
+                  _escapeRegexRangeChars(self.endQuoteChar[0]),
+                  (escChar is not None and _escapeRegexRangeChars(escChar) or '') )
+        if len(self.endQuoteChar) > 1:
+            self.pattern += (
+                '|(?:' + ')|(?:'.join(["%s[^%s]" % (re.escape(self.endQuoteChar[:i]),
+                                               _escapeRegexRangeChars(self.endQuoteChar[i])) 
+                                    for i in range(len(self.endQuoteChar)-1,0,-1)]) + ')'
+                )
+        if escQuote:
+            self.pattern += (r'|(?:%s)' % re.escape(escQuote))
+        if escChar:
+            self.pattern += (r'|(?:%s.)' % re.escape(escChar))
+            self.escCharReplacePattern = re.escape(self.escChar)+"(.)"
+        self.pattern += (r')*%s' % re.escape(self.endQuoteChar))
+        
+        try:
+            self.re = re.compile(self.pattern, self.flags)
+            self.reString = self.pattern
+        except sre_constants.error,e:
+            warnings.warn("invalid pattern (%s) passed to Regex" % self.pattern, 
+                SyntaxWarning, stacklevel=2)
+            raise
+
+        self.name = _ustr(self)
+        self.errmsg = "Expected " + self.name
+        self.myException.msg = self.errmsg
+        self.mayIndexError = False
+        self.mayReturnEmpty = True
+    
+    def parseImpl( self, instring, loc, doActions=True ):
+        result = instring[loc] == self.firstQuoteChar and self.re.match(instring,loc) or None
+        if not result:
+            exc = self.myException
+            exc.loc = loc
+            exc.pstr = instring
+            raise exc
+        
+        loc = result.end()
+        ret = result.group()
+        
+        if self.unquoteResults:
+            
+            # strip off quotes
+            ret = ret[self.quoteCharLen:-self.endQuoteCharLen]
+                
+            if isinstance(ret,basestring):
+                # replace escaped characters
+                if self.escChar:
+                    ret = re.sub(self.escCharReplacePattern,"\g<1>",ret)
+
+                # replace escaped quotes
+                if self.escQuote:
+                    ret = ret.replace(self.escQuote, self.endQuoteChar)
+
+        return loc, ret
+    
+    def __str__( self ):
+        try:
+            return super(QuotedString,self).__str__()
+        except:
+            pass
+        
+        if self.strRepr is None:
+            self.strRepr = "quoted string, starting with %s ending with %s" % (self.quoteChar, self.endQuoteChar)
+        
+        return self.strRepr
+
+
+class CharsNotIn(Token):
+    """Token for matching words composed of characters *not* in a given set.
+       Defined with string containing all disallowed characters, and an optional 
+       minimum, maximum, and/or exact length.
+    """
+    def __init__( self, notChars, min=1, max=0, exact=0 ):
+        super(CharsNotIn,self).__init__()
+        self.skipWhitespace = False
+        self.notChars = notChars
+        
+        self.minLen = min
+
+        if max > 0:
+            self.maxLen = max
+        else:
+            self.maxLen = sys.maxint
+
+        if exact > 0:
+            self.maxLen = exact
+            self.minLen = exact
+        
+        self.name = _ustr(self)
+        self.errmsg = "Expected " + self.name
+        self.mayReturnEmpty = ( self.minLen == 0 )
+        self.myException.msg = self.errmsg
+        self.mayIndexError = False
+
+    def parseImpl( self, instring, loc, doActions=True ):
+        if instring[loc] in self.notChars:
+            #~ raise ParseException( instring, loc, self.errmsg )
+            exc = self.myException
+            exc.loc = loc
+            exc.pstr = instring
+            raise exc
+            
+        start = loc
+        loc += 1
+        notchars = self.notChars
+        maxlen = min( start+self.maxLen, len(instring) )
+        while loc < maxlen and (instring[loc] not in notchars):
+            loc += 1
+
+        if loc - start < self.minLen:
+            #~ raise ParseException( instring, loc, self.errmsg )
+            exc = self.myException
+            exc.loc = loc
+            exc.pstr = instring
+            raise exc
+
+        return loc, instring[start:loc]
+
+    def __str__( self ):
+        try:
+            return super(CharsNotIn, self).__str__()
+        except:
+            pass
+
+        if self.strRepr is None:
+            if len(self.notChars) > 4:
+                self.strRepr = "!W:(%s...)" % self.notChars[:4]
+            else:
+                self.strRepr = "!W:(%s)" % self.notChars
+        
+        return self.strRepr
+
+class White(Token):
+    """Special matching class for matching whitespace.  Normally, whitespace is ignored
+       by pyparsing grammars.  This class is included when some whitespace structures
+       are significant.  Define with a string containing the whitespace characters to be
+       matched; default is " \\t\\n".  Also takes optional min, max, and exact arguments,
+       as defined for the Word class."""
+    whiteStrs = {
+        " " : "",
+        "\t": "",
+        "\n": "",
+        "\r": "",
+        "\f": "",
+        }
+    def __init__(self, ws=" \t\r\n", min=1, max=0, exact=0):
+        super(White,self).__init__()
+        self.matchWhite = ws
+        self.setWhitespaceChars( "".join([c for c in self.whiteChars if c not in self.matchWhite]) )
+        #~ self.leaveWhitespace()
+        self.name = ("".join([White.whiteStrs[c] for c in self.matchWhite]))
+        self.mayReturnEmpty = True
+        self.errmsg = "Expected " + self.name
+        self.myException.msg = self.errmsg
+
+        self.minLen = min
+
+        if max > 0:
+            self.maxLen = max
+        else:
+            self.maxLen = sys.maxint
+
+        if exact > 0:
+            self.maxLen = exact
+            self.minLen = exact
+            
+    def parseImpl( self, instring, loc, doActions=True ):
+        if not(instring[ loc ] in self.matchWhite):
+            #~ raise ParseException( instring, loc, self.errmsg )
+            exc = self.myException
+            exc.loc = loc
+            exc.pstr = instring
+            raise exc
+        start = loc
+        loc += 1
+        maxloc = start + self.maxLen
+        maxloc = min( maxloc, len(instring) )
+        while loc < maxloc and instring[loc] in self.matchWhite:
+            loc += 1
+
+        if loc - start < self.minLen:
+            #~ raise ParseException( instring, loc, self.errmsg )
+            exc = self.myException
+            exc.loc = loc
+            exc.pstr = instring
+            raise exc
+
+        return loc, instring[start:loc]
+
+
+class PositionToken(Token):
+    def __init__( self ):
+        super(PositionToken,self).__init__()
+        self.name=self.__class__.__name__
+        self.mayReturnEmpty = True
+        self.mayIndexError = False
+
+class GoToColumn(PositionToken):
+    """Token to advance to a specific column of input text; useful for tabular report scraping."""
+    def __init__( self, colno ):
+        super(GoToColumn,self).__init__()
+        self.col = colno
+
+    def preParse( self, instring, loc ):
+        if col(loc,instring) != self.col:
+            instrlen = len(instring)
+            if self.ignoreExprs:
+                loc = self.skipIgnorables( instring, loc )
+            while loc < instrlen and instring[loc].isspace() and col( loc, instring ) != self.col :
+                loc += 1
+        return loc
+
+    def parseImpl( self, instring, loc, doActions=True ):
+        thiscol = col( loc, instring )
+        if thiscol > self.col:
+            raise ParseException( instring, loc, "Text not in expected column", self )
+        newloc = loc + self.col - thiscol
+        ret = instring[ loc: newloc ]
+        return newloc, ret
+
+class LineStart(PositionToken):
+    """Matches if current position is at the beginning of a line within the parse string"""
+    def __init__( self ):
+        super(LineStart,self).__init__()
+        self.setWhitespaceChars( " \t" )
+        self.errmsg = "Expected start of line"
+        self.myException.msg = self.errmsg
+
+    def preParse( self, instring, loc ):
+        preloc = super(LineStart,self).preParse(instring,loc)
+        if instring[preloc] == "\n":
+            loc += 1
+        return loc
+
+    def parseImpl( self, instring, loc, doActions=True ):
+        if not( loc==0 or
+            (loc == self.preParse( instring, 0 )) or
+            (instring[loc-1] == "\n") ): #col(loc, instring) != 1:
+            #~ raise ParseException( instring, loc, "Expected start of line" )
+            exc = self.myException
+            exc.loc = loc
+            exc.pstr = instring
+            raise exc
+        return loc, []
+
+class LineEnd(PositionToken):
+    """Matches if current position is at the end of a line within the parse string"""
+    def __init__( self ):
+        super(LineEnd,self).__init__()
+        self.setWhitespaceChars( " \t" )
+        self.errmsg = "Expected end of line"
+        self.myException.msg = self.errmsg
+    
+    def parseImpl( self, instring, loc, doActions=True ):
+        if loc maxExcLoc:
+                    maxException = err
+                    maxExcLoc = err.loc
+            except IndexError, err:
+                if len(instring) > maxExcLoc:
+                    maxException = ParseException(instring,len(instring),e.errmsg,self)
+                    maxExcLoc = len(instring)
+            else:
+                if loc2 > maxMatchLoc:
+                    maxMatchLoc = loc2
+                    maxMatchExp = e
+        
+        if maxMatchLoc < 0:
+            if self.exprs:
+                raise maxException
+            else:
+                raise ParseException(instring, loc, "no defined alternatives to match", self)
+
+        return maxMatchExp._parse( instring, loc, doActions )
+
+    def __ixor__(self, other ):
+        if isinstance( other, basestring ):
+            other = Literal( other )
+        return self.append( other ) #Or( [ self, other ] )
+
+    def __str__( self ):
+        if hasattr(self,"name"):
+            return self.name
+            
+        if self.strRepr is None:
+            self.strRepr = "{" + " ^ ".join( [ _ustr(e) for e in self.exprs ] ) + "}"
+        
+        return self.strRepr
+    
+    def checkRecursion( self, parseElementList ):
+        subRecCheckList = parseElementList[:] + [ self ]
+        for e in self.exprs:
+            e.checkRecursion( subRecCheckList )
+
+
+class MatchFirst(ParseExpression):
+    """Requires that at least one ParseExpression is found.
+       If two expressions match, the first one listed is the one that will match.
+       May be constructed using the '|' operator.
+    """
+    def __init__( self, exprs, savelist = False ):
+        super(MatchFirst,self).__init__(exprs, savelist)
+        if exprs:
+            self.mayReturnEmpty = False
+            for e in self.exprs:
+                if e.mayReturnEmpty:
+                    self.mayReturnEmpty = True
+                    break
+        else:
+            self.mayReturnEmpty = True
+    
+    def parseImpl( self, instring, loc, doActions=True ):
+        maxExcLoc = -1
+        for e in self.exprs:
+            try:
+                ret = e._parse( instring, loc, doActions )
+                return ret
+            except ParseException, err:
+                if err.loc > maxExcLoc:
+                    maxException = err
+                    maxExcLoc = err.loc
+            except IndexError, err:
+                if len(instring) > maxExcLoc:
+                    maxException = ParseException(instring,len(instring),e.errmsg,self)
+                    maxExcLoc = len(instring)
+
+        # only got here if no expression matched, raise exception for match that made it the furthest
+        else:
+            if self.exprs:
+                raise maxException
+            else:
+                raise ParseException(instring, loc, "no defined alternatives to match", self)
+
+    def __ior__(self, other ):
+        if isinstance( other, basestring ):
+            other = Literal( other )
+        return self.append( other ) #MatchFirst( [ self, other ] )
+
+    def __str__( self ):
+        if hasattr(self,"name"):
+            return self.name
+            
+        if self.strRepr is None:
+            self.strRepr = "{" + " | ".join( [ _ustr(e) for e in self.exprs ] ) + "}"
+        
+        return self.strRepr
+    
+    def checkRecursion( self, parseElementList ):
+        subRecCheckList = parseElementList[:] + [ self ]
+        for e in self.exprs:
+            e.checkRecursion( subRecCheckList )
+
+class Each(ParseExpression):
+    """Requires all given ParseExpressions to be found, but in any order.
+       Expressions may be separated by whitespace.
+       May be constructed using the '&' operator.
+    """
+    def __init__( self, exprs, savelist = True ):
+        super(Each,self).__init__(exprs, savelist)
+        self.mayReturnEmpty = True
+        for e in self.exprs:
+            if not e.mayReturnEmpty:
+                self.mayReturnEmpty = False
+                break
+        self.skipWhitespace = True
+        self.optionals = [ e.expr for e in exprs if isinstance(e,Optional) ]
+        self.multioptionals = [ e.expr for e in exprs if isinstance(e,ZeroOrMore) ]
+        self.multirequired = [ e.expr for e in exprs if isinstance(e,OneOrMore) ]
+        self.required = [ e for e in exprs if not isinstance(e,(Optional,ZeroOrMore,OneOrMore)) ]
+        self.required += self.multirequired
+
+    def parseImpl( self, instring, loc, doActions=True ):
+        tmpLoc = loc
+        tmpReqd = self.required[:]
+        tmpOpt  = self.optionals[:]
+        matchOrder = []
+
+        keepMatching = True
+        while keepMatching:
+            tmpExprs = tmpReqd + tmpOpt + self.multioptionals + self.multirequired
+            failed = []
+            for e in tmpExprs:
+                try:
+                    tmpLoc = e.tryParse( instring, tmpLoc )
+                except ParseException:
+                    failed.append(e)
+                else:
+                    matchOrder.append(e)
+                    if e in tmpReqd:
+                        tmpReqd.remove(e)
+                    elif e in tmpOpt:
+                        tmpOpt.remove(e)
+            if len(failed) == len(tmpExprs):
+                keepMatching = False
+        
+        if tmpReqd:
+            missing = ", ".join( [ _ustr(e) for e in tmpReqd ] )
+            raise ParseException(instring,loc,"Missing one or more required elements (%s)" % missing )
+
+        resultlist = []
+        for e in matchOrder:
+            loc,results = e._parse(instring,loc,doActions)
+            resultlist.append(results)
+            
+        finalResults = ParseResults([])
+        for r in resultlist:
+            dups = {}
+            for k in r.keys():
+                if k in finalResults.keys():
+                    tmp = ParseResults(finalResults[k])
+                    tmp += ParseResults(r[k])
+                    dups[k] = tmp
+            finalResults += ParseResults(r)
+            for k,v in dups.items():
+                finalResults[k] = v
+        return loc, finalResults
+
+    def __str__( self ):
+        if hasattr(self,"name"):
+            return self.name
+            
+        if self.strRepr is None:
+            self.strRepr = "{" + " & ".join( [ _ustr(e) for e in self.exprs ] ) + "}"
+        
+        return self.strRepr
+    
+    def checkRecursion( self, parseElementList ):
+        subRecCheckList = parseElementList[:] + [ self ]
+        for e in self.exprs:
+            e.checkRecursion( subRecCheckList )
+
+
+class ParseElementEnhance(ParserElement):
+    """Abstract subclass of ParserElement, for combining and post-processing parsed tokens."""
+    def __init__( self, expr, savelist=False ):
+        super(ParseElementEnhance,self).__init__(savelist)
+        if isinstance( expr, basestring ):
+            expr = Literal(expr)
+        self.expr = expr
+        self.strRepr = None
+        if expr is not None:
+            self.mayIndexError = expr.mayIndexError
+            self.setWhitespaceChars( expr.whiteChars )
+            self.skipWhitespace = expr.skipWhitespace
+            self.saveAsList = expr.saveAsList
+    
+    def parseImpl( self, instring, loc, doActions=True ):
+        if self.expr is not None:
+            return self.expr._parse( instring, loc, doActions, callPreParse=False )
+        else:
+            raise ParseException("",loc,self.errmsg,self)
+            
+    def leaveWhitespace( self ):
+        self.skipWhitespace = False
+        self.expr = self.expr.copy()
+        if self.expr is not None:
+            self.expr.leaveWhitespace()
+        return self
+
+    def ignore( self, other ):
+        if isinstance( other, Suppress ):
+            if other not in self.ignoreExprs:
+                super( ParseElementEnhance, self).ignore( other )
+                if self.expr is not None:
+                    self.expr.ignore( self.ignoreExprs[-1] )
+        else:
+            super( ParseElementEnhance, self).ignore( other )
+            if self.expr is not None:
+                self.expr.ignore( self.ignoreExprs[-1] )
+        return self
+
+    def streamline( self ):
+        super(ParseElementEnhance,self).streamline()
+        if self.expr is not None:
+            self.expr.streamline()
+        return self
+
+    def checkRecursion( self, parseElementList ):
+        if self in parseElementList:
+            raise RecursiveGrammarException( parseElementList+[self] )
+        subRecCheckList = parseElementList[:] + [ self ]
+        if self.expr is not None:
+            self.expr.checkRecursion( subRecCheckList )
+        
+    def validate( self, validateTrace=[] ):
+        tmp = validateTrace[:]+[self]
+        if self.expr is not None:
+            self.expr.validate(tmp)
+        self.checkRecursion( [] )
+    
+    def __str__( self ):
+        try:
+            return super(ParseElementEnhance,self).__str__()
+        except:
+            pass
+            
+        if self.strRepr is None and self.expr is not None:
+            self.strRepr = "%s:(%s)" % ( self.__class__.__name__, _ustr(self.expr) )
+        return self.strRepr
+
+
+class FollowedBy(ParseElementEnhance):
+    """Lookahead matching of the given parse expression.  FollowedBy
+    does *not* advance the parsing position within the input string, it only 
+    verifies that the specified parse expression matches at the current 
+    position.  FollowedBy always returns a null token list."""
+    def __init__( self, expr ):
+        super(FollowedBy,self).__init__(expr)
+        self.mayReturnEmpty = True
+        
+    def parseImpl( self, instring, loc, doActions=True ):
+        self.expr.tryParse( instring, loc )
+        return loc, []
+
+
+class NotAny(ParseElementEnhance):
+    """Lookahead to disallow matching with the given parse expression.  NotAny
+    does *not* advance the parsing position within the input string, it only 
+    verifies that the specified parse expression does *not* match at the current 
+    position.  Also, NotAny does *not* skip over leading whitespace. NotAny 
+    always returns a null token list.  May be constructed using the '~' operator."""
+    def __init__( self, expr ):
+        super(NotAny,self).__init__(expr)
+        #~ self.leaveWhitespace()
+        self.skipWhitespace = False  # do NOT use self.leaveWhitespace(), don't want to propagate to exprs
+        self.mayReturnEmpty = True
+        self.errmsg = "Found unwanted token, "+_ustr(self.expr)
+        self.myException = ParseException("",0,self.errmsg,self)
+        
+    def parseImpl( self, instring, loc, doActions=True ):
+        try:
+            self.expr.tryParse( instring, loc )
+        except (ParseException,IndexError):
+            pass
+        else:
+            #~ raise ParseException(instring, loc, self.errmsg )
+            exc = self.myException
+            exc.loc = loc
+            exc.pstr = instring
+            raise exc
+        return loc, []
+
+    def __str__( self ):
+        if hasattr(self,"name"):
+            return self.name
+            
+        if self.strRepr is None:
+            self.strRepr = "~{" + _ustr(self.expr) + "}"
+        
+        return self.strRepr
+
+
+class ZeroOrMore(ParseElementEnhance):
+    """Optional repetition of zero or more of the given expression."""
+    def __init__( self, expr ):
+        super(ZeroOrMore,self).__init__(expr)
+        self.mayReturnEmpty = True
+    
+    def parseImpl( self, instring, loc, doActions=True ):
+        tokens = []
+        try:
+            loc, tokens = self.expr._parse( instring, loc, doActions, callPreParse=False )
+            hasIgnoreExprs = ( len(self.ignoreExprs) > 0 )
+            while 1:
+                if hasIgnoreExprs:
+                    preloc = self.skipIgnorables( instring, loc )
+                else:
+                    preloc = loc
+                loc, tmptokens = self.expr._parse( instring, preloc, doActions )
+                if tmptokens or tmptokens.keys():
+                    tokens += tmptokens
+        except (ParseException,IndexError):
+            pass
+
+        return loc, tokens
+
+    def __str__( self ):
+        if hasattr(self,"name"):
+            return self.name
+            
+        if self.strRepr is None:
+            self.strRepr = "[" + _ustr(self.expr) + "]..."
+        
+        return self.strRepr
+    
+    def setResultsName( self, name, listAllMatches=False ):
+        ret = super(ZeroOrMore,self).setResultsName(name,listAllMatches)
+        ret.saveAsList = True
+        return ret
+    
+
+class OneOrMore(ParseElementEnhance):
+    """Repetition of one or more of the given expression."""
+    def parseImpl( self, instring, loc, doActions=True ):
+        # must be at least one
+        loc, tokens = self.expr._parse( instring, loc, doActions, callPreParse=False )
+        try:
+            hasIgnoreExprs = ( len(self.ignoreExprs) > 0 )
+            while 1:
+                if hasIgnoreExprs:
+                    preloc = self.skipIgnorables( instring, loc )
+                else:
+                    preloc = loc
+                loc, tmptokens = self.expr._parse( instring, preloc, doActions )
+                if tmptokens or tmptokens.keys():
+                    tokens += tmptokens
+        except (ParseException,IndexError):
+            pass
+
+        return loc, tokens
+
+    def __str__( self ):
+        if hasattr(self,"name"):
+            return self.name
+            
+        if self.strRepr is None:
+            self.strRepr = "{" + _ustr(self.expr) + "}..."
+        
+        return self.strRepr
+    
+    def setResultsName( self, name, listAllMatches=False ):
+        ret = super(OneOrMore,self).setResultsName(name,listAllMatches)
+        ret.saveAsList = True
+        return ret
+
+class _NullToken(object):
+    def __bool__(self):
+        return False
+    def __str__(self):
+        return ""
+
+_optionalNotMatched = _NullToken()
+class Optional(ParseElementEnhance):
+    """Optional matching of the given expression.
+       A default return string can also be specified, if the optional expression
+       is not found.
+    """
+    def __init__( self, exprs, default=_optionalNotMatched ):
+        super(Optional,self).__init__( exprs, savelist=False )
+        self.defaultValue = default
+        self.mayReturnEmpty = True
+
+    def parseImpl( self, instring, loc, doActions=True ):
+        try:
+            loc, tokens = self.expr._parse( instring, loc, doActions, callPreParse=False )
+        except (ParseException,IndexError):
+            if self.defaultValue is not _optionalNotMatched:
+                tokens = [ self.defaultValue ]
+            else:
+                tokens = []
+        return loc, tokens
+
+    def __str__( self ):
+        if hasattr(self,"name"):
+            return self.name
+            
+        if self.strRepr is None:
+            self.strRepr = "[" + _ustr(self.expr) + "]"
+        
+        return self.strRepr
+
+
+class SkipTo(ParseElementEnhance):
+    """Token for skipping over all undefined text until the matched expression is found.
+       If include is set to true, the matched expression is also consumed.  The ignore
+       argument is used to define grammars (typically quoted strings and comments) that 
+       might contain false matches.
+    """
+    def __init__( self, other, include=False, ignore=None ):
+        super( SkipTo, self ).__init__( other )
+        if ignore is not None:
+            self.expr = self.expr.copy()
+            self.expr.ignore(ignore)
+        self.mayReturnEmpty = True
+        self.mayIndexError = False
+        self.includeMatch = include
+        self.asList = False
+        self.errmsg = "No match found for "+_ustr(self.expr)
+        self.myException = ParseException("",0,self.errmsg,self)
+
+    def parseImpl( self, instring, loc, doActions=True ):
+        startLoc = loc
+        instrlen = len(instring)
+        expr = self.expr
+        while loc <= instrlen:
+            try:
+                loc = expr.skipIgnorables( instring, loc )
+                expr._parse( instring, loc, doActions=False, callPreParse=False )
+                if self.includeMatch:
+                    skipText = instring[startLoc:loc]
+                    loc,mat = expr._parse(instring,loc)
+                    if mat:
+                        return loc, [ skipText, mat ]
+                    else:
+                        return loc, [ skipText ]
+                else:
+                    return loc, [ instring[startLoc:loc] ]
+            except (ParseException,IndexError):
+                loc += 1
+        exc = self.myException
+        exc.loc = loc
+        exc.pstr = instring
+        raise exc
+
+class Forward(ParseElementEnhance):
+    """Forward declaration of an expression to be defined later -
+       used for recursive grammars, such as algebraic infix notation.
+       When the expression is known, it is assigned to the Forward variable using the '<<' operator.
+       
+       Note: take care when assigning to Forward not to overlook precedence of operators.
+       Specifically, '|' has a lower precedence than '<<', so that::
+          fwdExpr << a | b | c
+       will actually be evaluated as::
+          (fwdExpr << a) | b | c
+       thereby leaving b and c out as parseable alternatives.  It is recommended that you
+       explicitly group the values inserted into the Forward::
+          fwdExpr << (a | b | c)
+    """
+    def __init__( self, other=None ):
+        super(Forward,self).__init__( other, savelist=False )
+
+    def __lshift__( self, other ):
+        if isinstance( other, basestring ):
+            other = Literal(other)
+        self.expr = other
+        self.mayReturnEmpty = other.mayReturnEmpty
+        self.strRepr = None
+        return self
+
+    def leaveWhitespace( self ):
+        self.skipWhitespace = False
+        return self
+
+    def streamline( self ):
+        if not self.streamlined:
+            self.streamlined = True
+            if self.expr is not None: 
+                self.expr.streamline()
+        return self
+
+    def validate( self, validateTrace=[] ):
+        if self not in validateTrace:
+            tmp = validateTrace[:]+[self]
+            if self.expr is not None: 
+                self.expr.validate(tmp)
+        self.checkRecursion([])        
+        
+    def __str__( self ):
+        if hasattr(self,"name"):
+            return self.name
+
+        self.__class__ = _ForwardNoRecurse
+        try:
+            if self.expr is not None: 
+                retString = _ustr(self.expr)
+            else:
+                retString = "None"
+        finally:
+            self.__class__ = Forward
+        return "Forward: "+retString
+        
+    def copy(self):
+        if self.expr is not None:
+            return super(Forward,self).copy()
+        else:
+            ret = Forward()
+            ret << self
+            return ret
+
+class _ForwardNoRecurse(Forward):
+    def __str__( self ):
+        return "..."
+        
+class TokenConverter(ParseElementEnhance):
+    """Abstract subclass of ParseExpression, for converting parsed results."""
+    def __init__( self, expr, savelist=False ):
+        super(TokenConverter,self).__init__( expr )#, savelist )
+        self.saveAsList = False
+
+
+class Upcase(TokenConverter):
+    """Converter to upper case all matching tokens."""
+    def __init__(self, *args):
+        super(Upcase,self).__init__(*args)
+        warnings.warn("Upcase class is deprecated, use upcaseTokens parse action instead", 
+                       DeprecationWarning,stacklevel=2)
+    
+    def postParse( self, instring, loc, tokenlist ):
+        return map( string.upper, tokenlist )
+
+
+class Combine(TokenConverter):
+    """Converter to concatenate all matching tokens to a single string.
+       By default, the matching patterns must also be contiguous in the input string;
+       this can be disabled by specifying 'adjacent=False' in the constructor.
+    """
+    def __init__( self, expr, joinString="", adjacent=True ):
+        super(Combine,self).__init__( expr )
+        # suppress whitespace-stripping in contained parse expressions, but re-enable it on the Combine itself
+        if adjacent:
+            self.leaveWhitespace()
+        self.adjacent = adjacent
+        self.skipWhitespace = True
+        self.joinString = joinString
+
+    def ignore( self, other ):
+        if self.adjacent:
+            ParserElement.ignore(self, other)
+        else:
+            super( Combine, self).ignore( other )
+        return self
+
+    def postParse( self, instring, loc, tokenlist ):
+        retToks = tokenlist.copy()
+        del retToks[:]
+        retToks += ParseResults([ "".join(tokenlist._asStringList(self.joinString)) ], modal=self.modalResults)
+
+        if self.resultsName and len(retToks.keys())>0:
+            return [ retToks ]
+        else:
+            return retToks
+
+class Group(TokenConverter):
+    """Converter to return the matched tokens as a list - useful for returning tokens of ZeroOrMore and OneOrMore expressions."""
+    def __init__( self, expr ):
+        super(Group,self).__init__( expr )
+        self.saveAsList = True
+
+    def postParse( self, instring, loc, tokenlist ):
+        return [ tokenlist ]
+        
+class Dict(TokenConverter):
+    """Converter to return a repetitive expression as a list, but also as a dictionary.
+       Each element can also be referenced using the first token in the expression as its key.
+       Useful for tabular report scraping when the first column can be used as a item key.
+    """
+    def __init__( self, exprs ):
+        super(Dict,self).__init__( exprs )
+        self.saveAsList = True
+
+    def postParse( self, instring, loc, tokenlist ):
+        for i,tok in enumerate(tokenlist):
+            ikey = _ustr(tok[0]).strip()
+            if len(tok)==1:
+                tokenlist[ikey] = ("",i)
+            elif len(tok)==2 and not isinstance(tok[1],ParseResults):
+                tokenlist[ikey] = (tok[1],i)
+            else:
+                dictvalue = tok.copy() #ParseResults(i)
+                del dictvalue[0]
+                if len(dictvalue)!= 1 or (isinstance(dictvalue,ParseResults) and dictvalue.keys()):
+                    tokenlist[ikey] = (dictvalue,i)
+                else:
+                    tokenlist[ikey] = (dictvalue[0],i)
+
+        if self.resultsName:
+            return [ tokenlist ]
+        else:
+            return tokenlist
+
+
+class Suppress(TokenConverter):
+    """Converter for ignoring the results of a parsed expression."""
+    def postParse( self, instring, loc, tokenlist ):
+        return []
+    
+    def suppress( self ):
+        return self
+
+
+class OnlyOnce(object):
+    """Wrapper for parse actions, to ensure they are only called once."""
+    def __init__(self, methodCall):
+        self.callable = ParserElement.normalizeParseActionArgs(methodCall)
+        self.called = False
+    def __call__(self,s,l,t):
+        if not self.called:
+            results = self.callable(s,l,t)
+            self.called = True
+            return results
+        raise ParseException(s,l,"")
+    def reset():
+        self.called = False
+
+def traceParseAction(f):
+    """Decorator for debugging parse actions."""
+    f = ParserElement.normalizeParseActionArgs(f)
+    def z(*paArgs):
+        thisFunc = f.func_name
+        s,l,t = paArgs[-3:]
+        if len(paArgs)>3:
+            thisFunc = paArgs[0].__class__.__name__ + '.' + thisFunc
+        sys.stderr.write( ">>entering %s(line: '%s', %d, %s)\n" % (thisFunc,line(l,s),l,t) )
+        try:
+            ret = f(*paArgs)
+        except Exception, exc:
+            sys.stderr.write( "<", "|".join( [ _escapeRegexChars(sym) for sym in symbols] )
+        try:
+            if len(symbols)==len("".join(symbols)):
+                return Regex( "[%s]" % "".join( [ _escapeRegexRangeChars(sym) for sym in symbols] ) )
+            else:
+                return Regex( "|".join( [ re.escape(sym) for sym in symbols] ) )
+        except:
+            warnings.warn("Exception creating Regex for oneOf, building MatchFirst",
+                    SyntaxWarning, stacklevel=2)
+
+
+    # last resort, just use MatchFirst
+    return MatchFirst( [ parseElementClass(sym) for sym in symbols ] )
+
+def dictOf( key, value ):
+    """Helper to easily and clearly define a dictionary by specifying the respective patterns
+       for the key and value.  Takes care of defining the Dict, ZeroOrMore, and Group tokens
+       in the proper order.  The key pattern can include delimiting markers or punctuation,
+       as long as they are suppressed, thereby leaving the significant key text.  The value
+       pattern can include named results, so that the Dict results can include named token 
+       fields.
+    """
+    return Dict( ZeroOrMore( Group ( key + value ) ) )
+
+_bslash = "\\"
+printables = "".join( [ c for c in string.printable if c not in string.whitespace ] )
+
+# convenience constants for positional expressions
+empty       = Empty().setName("empty")
+lineStart   = LineStart().setName("lineStart")
+lineEnd     = LineEnd().setName("lineEnd")
+stringStart = StringStart().setName("stringStart")
+stringEnd   = StringEnd().setName("stringEnd")
+
+_escapedPunc = Word( _bslash, r"\[]-*.$+^?()~ ", exact=2 ).setParseAction(lambda s,l,t:t[0][1])
+_printables_less_backslash = "".join([ c for c in printables if c not in  r"\]" ])
+_escapedHexChar = Combine( Suppress(_bslash + "0x") + Word(hexnums) ).setParseAction(lambda s,l,t:unichr(int(t[0],16)))
+_escapedOctChar = Combine( Suppress(_bslash) + Word("0","01234567") ).setParseAction(lambda s,l,t:unichr(int(t[0],8)))
+_singleChar = _escapedPunc | _escapedHexChar | _escapedOctChar | Word(_printables_less_backslash,exact=1)
+_charRange = Group(_singleChar + Suppress("-") + _singleChar)
+_reBracketExpr = "[" + Optional("^").setResultsName("negate") + Group( OneOrMore( _charRange | _singleChar ) ).setResultsName("body") + "]"
+
+_expanded = lambda p: (isinstance(p,ParseResults) and ''.join([ unichr(c) for c in range(ord(p[0]),ord(p[1])+1) ]) or p)
+        
+def srange(s):
+    r"""Helper to easily define string ranges for use in Word construction.  Borrows
+       syntax from regexp '[]' string range definitions::
+          srange("[0-9]")   -> "0123456789"
+          srange("[a-z]")   -> "abcdefghijklmnopqrstuvwxyz"
+          srange("[a-z$_]") -> "abcdefghijklmnopqrstuvwxyz$_"
+       The input string must be enclosed in []'s, and the returned string is the expanded 
+       character set joined into a single string.
+       The values enclosed in the []'s may be::
+          a single character
+          an escaped character with a leading backslash (such as \- or \])
+          an escaped hex character with a leading '\0x' (\0x21, which is a '!' character)
+          an escaped octal character with a leading '\0' (\041, which is a '!' character)
+          a range of any of the above, separated by a dash ('a-z', etc.)
+          any combination of the above ('aeiouy', 'a-zA-Z0-9_$', etc.)
+    """
+    try:
+        return "".join([_expanded(part) for part in _reBracketExpr.parseString(s).body])
+    except:
+        return ""
+
+def replaceWith(replStr):
+    """Helper method for common parse actions that simply return a literal value.  Especially 
+       useful when used with transformString().
+    """
+    def _replFunc(*args):
+        return [replStr]
+    return _replFunc
+
+def removeQuotes(s,l,t):
+    """Helper parse action for removing quotation marks from parsed quoted strings.
+       To use, add this parse action to quoted string using::
+         quotedString.setParseAction( removeQuotes )
+    """
+    return t[0][1:-1]
+
+def upcaseTokens(s,l,t):
+    """Helper parse action to convert tokens to upper case."""
+    return [ str(tt).upper() for tt in t ]
+
+def downcaseTokens(s,l,t):
+    """Helper parse action to convert tokens to lower case."""
+    return [ str(tt).lower() for tt in t ]
+
+def keepOriginalText(s,startLoc,t):
+    import inspect
+    """Helper parse action to preserve original parsed text,
+       overriding any nested parse actions."""
+    f = inspect.stack()[1][0]
+    try:
+        endloc = f.f_locals["loc"]
+    finally:
+        del f
+    return s[startLoc:endloc]
+        
+def _makeTags(tagStr, xml):
+    """Internal helper to construct opening and closing tag expressions, given a tag name"""
+    if isinstance(tagStr,basestring):
+        resname = tagStr
+        tagStr = Keyword(tagStr, caseless=not xml)
+    else:
+        resname = tagStr.name
+        
+    tagAttrName = Word(alphas,alphanums+"_-")
+    if (xml):
+        tagAttrValue = dblQuotedString.copy().setParseAction( removeQuotes )
+        openTag = Suppress("<") + tagStr + \
+                Dict(ZeroOrMore(Group( tagAttrName + Suppress("=") + tagAttrValue ))) + \
+                Optional("/",default=[False]).setResultsName("empty").setParseAction(lambda s,l,t:t[0]=='/') + Suppress(">")
+    else:
+        printablesLessRAbrack = "".join( [ c for c in printables if c not in ">" ] )
+        tagAttrValue = quotedString.copy().setParseAction( removeQuotes ) | Word(printablesLessRAbrack)
+        openTag = Suppress("<") + tagStr + \
+                Dict(ZeroOrMore(Group( tagAttrName.setParseAction(downcaseTokens) + \
+                Suppress("=") + tagAttrValue ))) + \
+                Optional("/",default=[False]).setResultsName("empty").setParseAction(lambda s,l,t:t[0]=='/') + Suppress(">")
+    closeTag = Combine("")
+    
+    openTag = openTag.setResultsName("start"+"".join(resname.replace(":"," ").title().split())).setName("<%s>" % tagStr)
+    closeTag = closeTag.setResultsName("end"+"".join(resname.replace(":"," ").title().split())).setName("" % tagStr)
+    
+    return openTag, closeTag
+
+def makeHTMLTags(tagStr):
+    """Helper to construct opening and closing tag expressions for HTML, given a tag name"""
+    return _makeTags( tagStr, False )
+
+def makeXMLTags(tagStr):
+    """Helper to construct opening and closing tag expressions for XML, given a tag name"""
+    return _makeTags( tagStr, True )
+
+opAssoc = _Constants()
+opAssoc.LEFT = object()
+opAssoc.RIGHT = object()
+
+def operatorPrecedence( baseExpr, opList ):
+    """Helper method for constructing grammars of expressions made up of 
+       operators working in a precedence hierarchy.  Operators may be unary or
+       binary, left- or right-associative.  Parse actions can also be attached
+       to operator expressions.
+        
+       Parameters:
+        - baseExpr - expression representing the most basic element for the nested 
+        - opList - list of tuples, one for each operator precedence level in the expression grammar; each tuple is of the form
+          (opExpr, numTerms, rightLeftAssoc, parseAction), where:
+           - opExpr is the pyparsing expression for the operator;
+              may also be a string, which will be converted to a Literal
+           - numTerms is the number of terms for this operator (must
+              be 1 or 2)
+           - rightLeftAssoc is the indicator whether the operator is
+              right or left associative, using the pyparsing-defined
+              constants opAssoc.RIGHT and opAssoc.LEFT.
+           - parseAction is the parse action to be associated with 
+              expressions matching this operator expression (the
+              parse action tuple member may be omitted)
+    """
+    ret = Forward()
+    lastExpr = baseExpr | ( Suppress('(') + ret + Suppress(')') )
+    for i,operDef in enumerate(opList):
+        opExpr,arity,rightLeftAssoc,pa = (operDef + (None,))[:4]
+        thisExpr = Forward().setName("expr%d" % i)
+        if rightLeftAssoc == opAssoc.LEFT:
+            if arity == 1:
+                matchExpr = Group( lastExpr + opExpr )
+            elif arity == 2:
+                matchExpr = Group( lastExpr + OneOrMore( opExpr + lastExpr ) )
+            else:
+                raise ValueError, "operator must be unary (1) or binary (2)"
+        elif rightLeftAssoc == opAssoc.RIGHT:
+            if arity == 1:
+                # try to avoid LR with this extra test
+                if not isinstance(opExpr, Optional):
+                    opExpr = Optional(opExpr)
+                matchExpr = FollowedBy(opExpr.expr + thisExpr) + Group( opExpr + thisExpr ) 
+            elif arity == 2:
+                matchExpr = Group( lastExpr + OneOrMore( opExpr + thisExpr ) )
+            else:
+                raise ValueError, "operator must be unary (1) or binary (2)"
+        else:
+            raise ValueError, "operator must indicate right or left associativity"
+        if pa:
+            matchExpr.setParseAction( pa )
+        thisExpr << ( matchExpr | lastExpr )
+        lastExpr = thisExpr
+    ret << lastExpr
+    return ret
+
+alphas8bit = srange(r"[\0xc0-\0xd6\0xd8-\0xf6\0xf8-\0xff]")
+punc8bit = srange(r"[\0xa1-\0xbf\0xd7\0xf7]")
+
+dblQuotedString = Regex(r'"(?:[^"\n\r\\]|(?:"")|(?:\\.))*"').setName("string enclosed in double quotes")
+sglQuotedString = Regex(r"'(?:[^'\n\r\\]|(?:'')|(?:\\.))*'").setName("string enclosed in single quotes")
+quotedString = Regex(r'''(?:"(?:[^"\n\r\\]|(?:"")|(?:\\.))*")|(?:'(?:[^'\n\r\\]|(?:'')|(?:\\.))*')''').setName("quotedString using single or double quotes")
+
+anyOpenTag,anyCloseTag = makeHTMLTags(Word(alphas,alphanums+"_"))
+commonHTMLEntity = Combine("&" + oneOf("gt lt amp nbsp quot").setResultsName("entity") +";")
+_htmlEntityMap = dict(zip("gt lt amp nbsp quot".split(),"><& '"))
+replaceHTMLEntity = lambda t : t.entity in _htmlEntityMap and _htmlEntityMap[t.entity] or None
+    
+# it's easy to get these comment structures wrong - they're very common, so may as well make them available
+cStyleComment = Regex(r"/\*(?:[^*]*\*+)+?/").setName("C style comment")
+
+htmlComment = Regex(r"")
+restOfLine = Regex(r".*").leaveWhitespace()
+dblSlashComment = Regex(r"\/\/(\\\n|.)*").setName("// comment")
+cppStyleComment = Regex(r"/(?:\*(?:[^*]*\*+)+?/|/[^\n]*(?:\n[^\n]*)*?(?:(?",
+        try:
+            tokens = simpleSQL.parseString( teststring )
+            tokenlist = tokens.asList()
+            print tokenlist
+            print "tokens = ",        tokens
+            print "tokens.columns =", tokens.columns
+            print "tokens.tables =",  tokens.tables
+            print tokens.asXML("SQL",True)
+        except ParseException, err:
+            print err.line
+            print " "*(err.column-1) + "^"
+            print err
+        print
+
+    selectToken    = CaselessLiteral( "select" )
+    fromToken      = CaselessLiteral( "from" )
+
+    ident          = Word( alphas, alphanums + "_$" )
+    columnName     = delimitedList( ident, ".", combine=True ).setParseAction( upcaseTokens )
+    columnNameList = Group( delimitedList( columnName ) )#.setName("columns")
+    tableName      = delimitedList( ident, ".", combine=True ).setParseAction( upcaseTokens )
+    tableNameList  = Group( delimitedList( tableName ) )#.setName("tables")
+    simpleSQL      = ( selectToken + \
+                     ( '*' | columnNameList ).setResultsName( "columns" ) + \
+                     fromToken + \
+                     tableNameList.setResultsName( "tables" ) )
+    
+    test( "SELECT * from XYZZY, ABC" )
+    test( "select * from SYS.XYZZY" )
+    test( "Select A from Sys.dual" )
+    test( "Select AA,BB,CC from Sys.dual" )
+    test( "Select A, B, C from Sys.dual" )
+    test( "Select A, B, C from Sys.dual" )
+    test( "Xelect A, B, C from Sys.dual" )
+    test( "Select A, B, C frox Sys.dual" )
+    test( "Select" )
+    test( "Select ^^^ frox Sys.dual" )
+    test( "Select A, B, C from Sys.dual, Table2   " )
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/python/raptor.py
--- a/sbsv2/raptor/python/raptor.py	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/python/raptor.py	Mon Nov 16 09:46:46 2009 +0000
@@ -1,1234 +1,1234 @@
-#
-# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# raptor module
-# This module represents the running Raptor program. Raptor is started
-# either by calling the Main() function, which creates an instance of
-# the raptor.Raptor class and calls its methods to perform a build based
-# on command-line parameters, or by explicitly creating a raptor.Raptor
-# instance and calling its methods to set-up and perform a build.
-#
-
-name = "sbs"			# the public name for the raptor build tool
-env  = "SBS_HOME"		# the environment variable that locates us
-xml  = "sbs_init.xml"	# the primary initialisation file
-env2 = "HOME"		 	# the environment variable that locates the user
-xml2 = ".sbs_init.xml"	# the override initialisation file
-
-import generic_path
-import os
-import raptor_cache
-import raptor_cli
-import raptor_data
-import raptor_make
-import raptor_meta
-import raptor_utilities
-import raptor_version
-import raptor_xml
-import filter_list
-import sys
-import types
-import time
-import re
-import traceback
-import pluginbox
-from xml.sax.saxutils import escape
-
-
-if not "HOSTPLATFORM" in os.environ or not "HOSTPLATFORM_DIR" in os.environ:
-	print "Error: HOSTPLATFORM and HOSTPLATFORM_DIR must be set in the environment (this is usually done automatically by the startup script)."
-	sys.exit(1)
-
-hostplatform = os.environ["HOSTPLATFORM"].split(" ")
-hostplatform_dir = os.environ["HOSTPLATFORM_DIR"]
-
-# defaults can use EPOCROOT
-if "EPOCROOT" in os.environ:
-	epocroot = os.environ["EPOCROOT"].replace("\\","/")
-else:
-	if 'linux' in hostplatform:
-		epocroot=os.environ['HOME'] + os.sep + "epocroot"
-		os.environ["EPOCROOT"] = epocroot
-	else:
-		epocroot = "/"
-		os.environ["EPOCROOT"] = os.sep
-
-if "SBS_BUILD_DIR" in os.environ:
-	sbs_build_dir = os.environ["SBS_BUILD_DIR"]
-else:
-	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")
-if epoc32UserConfigDir.isDir():
-	defaultSystemConfig = str(epoc32UserConfigDir) + os.pathsep + defaultSystemConfig
-
-# parameters that can be overriden by the sbs_init.xml file
-# or by the command-line.
-defaults = {
-		"allowCommandLineOverrides" : True,
-		"CLI" : "raptor_cli",
-		"buildInformation" : generic_path.Path("bld.inf"),
-		"defaultConfig" : "default",
-		"jobs": 4,
-		"keepGoing": False,
-		"logFileName" : generic_path.Join(sbs_build_dir,"Makefile.%TIME.log"),
-		"makeEngine" : "make",
-		"preferBuildInfoToSystemDefinition" : False,
-		"pruneDuplicateMakefiles": True,
-		"quiet" : False,
-		"systemConfig" :  defaultSystemConfig,
-		"systemDefinition" : generic_path.Path("System_Definition.xml"),
-		"systemDefinitionBase" : generic_path.Path("."),
-		"systemFLM" : generic_path.Path("lib/flm"),
-		"systemPlugins" : generic_path.Path("python/plugins"),
-		"topMakefile" : generic_path.Join(sbs_build_dir,"Makefile"),
-		"tries": 1,
-		"writeSingleMakefile": True,
-		"ignoreOsDetection": False,
-		"toolcheck": "on",
-		"filterList": "filterterminal,filterlogfile"
-		}
-
-
-class ComponentGroup(object):
-	""" 	Some components that should be built togther 
-		e.g. a Layer in the system definition. 
-	""" 
-	def __init__(self, name, componentlist=[]):
-		self.components = componentlist
-		self.name = name
-
-	def __iter__(self):
-		return iter(self.components)
-
-	def __getitem__(self,x):
-		if isinstance(x, slice):
-			return self.components[x.start:x.stop]
-		return self.components[x]
-
-	def __setitem__(self,k, v):
-		self.components[k] = v
-
-	def __len__(self):
-		return len(self.components)
-
-	def extend(self, c):
-		self.components.extend(c)
-	
-	def append(self, c):
-		self.components.append(c)
-
-	def GenerateSpecs(self, genericspecs, configs):
-		"""Return a build spec hierarchy for a ComponentGroup. This involves parsing the component MetaData (bld.infs, mmps). 
-		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.
-		"""
-
-		self.specs = []
-		self.specs.extend(genericspecs)
-		self.configs = configs
-		self.dependencies = set()
-
-		metaReader = None
-		if len (self.components):
-			try:
-				# create a MetaReader that is aware of the list of
-				# configurations that we are trying to build.
-				metaReader = raptor_meta.MetaReader(build, configs)
-
-				# convert the list of bld.inf files into a specification
-				# hierarchy suitable for all the configurations we are using.
-				self.specs.extend(metaReader.ReadBldInfFiles(self.components,build.doExportOnly))
-
-			except raptor_meta.MetaDataError, e:
-				log.Error(e.Text)
-
-		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)
-
-		engine.Write(makefile, self.specs, self.configs)
-
-		return makefile
-
-
-	def GenerateMetadataSpecs(self, configs):
-		# insert the start time into the Makefile name?
-
-		self.configs = build.GetConfig("build").GenerateBuildUnits()
-
-		# Pass certain CLI flags through to the makefile-generating sbs calls
-		cli_options = ""
-			
-		if build.debugOutput == True:
-			cli_options += " -d"
-				
-		if build.ignoreOsDetection == True:
-			cli_options += " -i"
-			
-		if build.keepGoing == True:
-			cli_options += " -k"
-			
-		if build.quiet == True:
-			cli_options += " -q"
-
-		
-		nc = len(self.components)
-		number_blocks = 16
-		block_size = (nc / number_blocks) + 1
-		component_blocks = []
-		spec_nodes = []
-		
-		b = 0
-		while b < nc:
-			component_blocks.append(self.components[b:b+block_size])
-			b += block_size
-			
-		if len(component_blocks[-1]) <= 0:
-			component_blocks.pop()
-		
-		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])
-			
-			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))
-				pass
-			
-			# add some basic data in a component-wide variant
-			var = raptor_data.Variant()
-			var.AddOperation(raptor_data.Set("COMPONENT_PATHS", componentList))
-			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))
-			# 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)
-			except KeyError:
-				build.Error("Can't find flm interface 'build.makefiles' ")
-				
-			spec_nodes.append(specNode)
-			
-			
-
-		## possibly some error handling here?
-
-		self.specs = spec_nodes
-
-
-class BuildCompleteException(Exception):
-	pass
-
-# raptor module classes
-
-class Raptor(object):
-	"""An instance of a running Raptor program.
-
-	When operated from the command-line there is a single Raptor object
-	created by the Main function. When operated by an IDE several Raptor
-	objects may be created and operated at the same time."""
-
-
-	M_BUILD = 1
-	M_VERSION = 2	
-
-	def __init__(self, home = None):
-
-		self.DefaultSetUp(home)
-
-
-	def DefaultSetUp(self, home = None):
-		"revert to the default set-up state"
-		self.errorCode = 0
-		self.skipAll = False
-		self.summary = True
-		self.out = sys.stdout # Just until filters get started.
-
-		# Create a bootstrap output system.
-		self.out = filter_list.FilterList()
-
-		if home == None:
-			try:
-				home = os.environ[env]
-			except KeyError:
-				home = os.getcwd()
-
-		# make sure the home directory exists
-		self.home = generic_path.Path(home).Absolute()
-
-		if not self.home.isDir():
-			self.Error("%s '%s' is not a directory", env, self.home)
-			return
-
-		# the set-up file location.
-		# use the override "env2/xml2" if it exists
-		# else use the primary "env/xml" if it exists
-		# else keep the hard-coded defaults.
-		self.raptorXML = self.home.Append(xml)
-
-		if env2 in os.environ:
-			sbs_init = generic_path.Join(os.environ[env2], xml2)
-			if sbs_init.isFile():
-				self.raptorXML = sbs_init
-
-		# things that can be overridden by the set-up file
-		for key, value in defaults.items():
-			self.__dict__[key] = value
-
-		# things to initialise
-		self.args = []
-
-		self.componentGroups = []
-		self.orderComponentGroups = False
-		self.commandlineComponents = []
-
-		self.systemModel = None
-		self.systemDefinitionFile = None
-		self.systemDefinitionRequestedLayers = []
-		self.systemDefinitionOrderLayers = False
-
-		self.specGroups = {}
-
-		self.configNames = []
-		self.configsToBuild = set()
-		self.makeOptions = []
-		self.maker = None
-		self.debugOutput = False
-		self.doExportOnly = False
-		self.noBuild = False
-		self.noDependInclude = False
-		self.projects = set()
-
-		self.cache = raptor_cache.Cache(self)
-		self.override = {env: str(self.home)}
-		self.targets = []
-		self.defaultTargets = []
-
-		self.doCheck = False
-		self.doWhat = False
-		self.doParallelParsing = False
-		self.mission = Raptor.M_BUILD
-
-		# what platform and filesystem are we running on?
-		self.filesystem = raptor_utilities.getOSFileSystem()
-
-		self.toolset = None
-
-		self.starttime = time.time()
-		self.timestring = time.strftime("%Y-%m-%d-%H-%M-%S")
-
-		self.fatalErrorState = False
-
-	def AddConfigList(self, configPathList):
-		# this function converts cmd line option into a list
-		# and prepends it to default config.
-		self.configPath = generic_path.NormalisePathList(configPathList.split(os.pathsep)) + self.configPath
-		return True
-
-	def AddConfigName(self, name):
-		self.configNames.append(name)
-		return True
-
-	def RunQuietly(self, TrueOrFalse):
-		self.quiet = TrueOrFalse
-		return True
-
-	def SetCheck(self, TrueOrFalse):
-		self.doCheck = TrueOrFalse
-		return True
-
-	def SetWhat(self, TrueOrFalse):
-		self.doWhat = TrueOrFalse
-		return True
-
-	def SetEnv(self, name, value):
-		self.override[name] = value
-
-	def AddTarget(self, target):
-		if self.doCheck or self.doWhat:
-			self.Warn("ignoring target %s because --what or --check is specified.\n", target)
-		else:
-			self.targets.append(target)
-			
-	def AddSourceTarget(self, filename):
-		# source targets are sanitised and then added as if they were a "normal" makefile target
-		# in addition they have a default, empty, top-level target assigned in order that they can
-		# be presented to any generated makefile without error
-		sourceTarget = generic_path.Path(filename).Absolute()
-		sourceTarget = 'SOURCETARGET_' + raptor_utilities.sanitise(str(sourceTarget))
-		self.AddTarget(sourceTarget)
-		self.defaultTargets.append(sourceTarget)
-		return True
-
-	def SetSysDefFile(self, filename):
-		self.systemDefinitionFile = generic_path.Path(filename)
-		return True
-
-	def SetSysDefBase(self, path):
-		self.systemDefinitionBase = generic_path.Path(path)
-		return True
-
-	def AddSysDefLayer(self, layer):
-		self.systemDefinitionRequestedLayers.append(layer)
-		return True
-
-	def SetSysDefOrderLayers(self, TrueOrFalse):
-		self.systemDefinitionOrderLayers = TrueOrFalse
-		return True
-
-	def AddBuildInfoFile(self, filename):
-		bldinf = generic_path.Path(filename).Absolute()
-		self.commandlineComponents.append(bldinf)
-		return True
-
-	def SetTopMakefile(self, filename):
-		self.topMakefile = generic_path.Path(filename)
-		return True
-
-	def SetDebugOutput(self, TrueOrFalse):
-		self.debugOutput = TrueOrFalse
-		return True
-
-	def SetExportOnly(self, TrueOrFalse):
-		self.doExportOnly = TrueOrFalse
-		return True
-
-	def SetNoBuild(self, TrueOrFalse):
-		self.noBuild = TrueOrFalse
-		return True
-
-	def SetNoDependInclude(self, TrueOrFalse):
-		self.noDependInclude = TrueOrFalse
-		return True
-		
-	def SetKeepGoing(self, TrueOrFalse):
-		self.keepGoing = TrueOrFalse
-		return True
-
-	def SetLogFileName(self, logfile):
-		if logfile == "-":
-			self.logFileName = None  # stdout
-		else:
-			self.logFileName = generic_path.Path(logfile)
-		return True
-
-	def SetMakeEngine(self, makeEngine):
-		self.makeEngine = makeEngine
-		return True
-
-	def AddMakeOption(self, makeOption):
-		self.makeOptions.append(makeOption)
-		return True
-
-	def SetJobs(self, numberOfJobs):
-		try:
-			self.jobs = int(numberOfJobs)
-		except ValueError:
-			self.jobs = 0
-
-		if self.jobs < 1:
-			self.Warn("The number of jobs (%s) must be a positive integer\n", numberOfJobs)
-			self.jobs = 1
-			return False
-		return True
-
-	def SetTries(self, numberOfTries):
-		try:
-			self.tries = int(numberOfTries)
-		except ValueError:
-			self.tries = 0
-
-		if self.tries < 1:
-			self.Warn("The number of tries (%s) must be a positive integer\n", numberOfTries)
-			self.tries = 1
-			return False
-		return True
-
-	def SetToolCheck(self, type):
-		type = type.lower()
-		toolcheck_types= [ "forced", "on", "off" ]
-		if type in toolcheck_types:
-			self.toolcheck=type
-		else:
-			self.Warn("toolcheck option must be one of: %s" % toolcheck_types)
-			return False
-
-		return True
-
-	def SetParallelParsing(self, type):
-		type = type.lower()
-		if type == "on":
-			self.doParallelParsing = True
-		elif type == "off":
-			self.doParallelParsing = False
-		else:
-			self.Warn(" parallel parsing option must be either 'on' or 'off' (was %s)"  % type)
-			return False
-
-		return True
-
-	def AddProject(self, projectName):
-		self.projects.add(projectName.lower())
-		return True
-
-	def FilterList(self, value):
-		self.filterList = value
-		return True
-
-	def IgnoreOsDetection(self, value):
-		self.ignoreOsDetection = value
-		return True
-
-	def PrintVersion(self,dummy):
-		global name
-		print name, "version", raptor_version.Version()
-		self.mission = Raptor.M_VERSION
-		return False
-
-	# worker methods
-
-	def Introduction(self):
-		"""Print a header of useful information about Raptor"""
-
-		self.Info("%s: version %s\n", name, raptor_version.Version())
-
-		self.Info("%s %s", env, str(self.home))
-		self.Info("Set-up %s", str(self.raptorXML))
-		self.Info("Command-line-arguments %s", " ".join(self.args))
-		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)
-
-		# and some general debug stuff
-		self.Debug("Platform %s", "-".join(hostplatform))
-		self.Debug("Filesystem %s", self.filesystem)
-		self.Debug("Python %d.%d.%d", *sys.version_info[:3])
-		self.Debug("Command-line-parser %s", self.CLI)
-
-		for e,value in self.override.items():
-			self.Debug("Override %s = %s", e, value)
-
-		for t in self.targets:
-			self.Debug("Target %s", t)
-
-
-	def ConfigFile(self):
-		if not self.raptorXML.isFile():
-			return
-
-		self.cache.Load(self.raptorXML)
-
-		# find the 'defaults.raptor' variant and extract the values
-		try:
-			var = self.cache.FindNamedVariant("defaults.init")
-			evaluator = self.GetEvaluator( None, raptor_data.BuildUnit(var.name,[var]) )
-
-			for key, value in defaults.items():
-				newValue = evaluator.Resolve(key)
-
-				if newValue != None:
-					# got a string for the value
-					if type(value) == types.BooleanType:
-						newValue = (newValue.lower() != "false")
-					elif type(value) == types.IntType:
-						newValue = int(newValue)
-					elif isinstance(value, generic_path.Path):
-						newValue = generic_path.Path(newValue)
-
-					self.__dict__[key] = newValue
-
-		except KeyError:
-			# it is OK to not have this but useful to say it wasn't there
-			self.Info("No 'defaults.init' configuration found in " + str(self.raptorXML))
-
-
-	def CommandLine(self, args):
-		# remember the arguments for the log
-		self.args = args
-
-		# assuming self.CLI = "raptor_cli"
-		more_to_do = raptor_cli.GetArgs(self, args)
-
-		# resolve inter-argument dependencies.
-		# --what or --check implies the WHAT target and FilterWhat Filter
-		if self.doWhat or self.doCheck:
-			self.targets = ["WHAT"]
-			self.filterList = "filterwhat"
-
-		else:
-			# 1. CLEAN/CLEANEXPORT/REALLYCLEAN needs the FilterClean filter.
-			# 2. Targets that clean should not be combined with other targets.
-
-			targets = [x.lower() for x in self.targets]
-
-			CL = "clean"
-			CE = "cleanexport"
-			RC = "reallyclean"
-
-			is_clean = 0
-			is_suspicious_clean = 0
-
-			if CL in targets and CE in targets:
-				is_clean = 1
-				if len(targets) > 2:
-					is_suspicious_clean = 1
-			elif RC in targets or CL in targets or CE in targets:
-				is_clean = 1
-				if len(targets) > 1:
-					is_suspicious_clean = 1
-
-			if is_clean:
-				self.filterList += ",filterclean"
-				if is_suspicious_clean:
-					self.Warn('CLEAN, CLEANEXPORT and a REALLYCLEAN should not be combined with other targets as the result is unpredictable.')
-
-		if not more_to_do:
-			self.skipAll = True		# nothing else to do
-
-	def ProcessConfig(self):
-		# this function will perform additional processing of config
-
-		# create list of generic paths
-		self.configPath = generic_path.NormalisePathList(self.systemConfig.split(os.pathsep))
-
-	def LoadCache(self):
-		def mkAbsolute(aGenericPath):
-			""" internal function to make a generic_path.Path
-			absolute if required"""
-			if not aGenericPath.isAbsolute():
-				return self.home.Append(aGenericPath)
-			else:
-				return aGenericPath
-		
-		# make generic paths absolute (if required)
-		self.configPath = map(mkAbsolute, self.configPath)
-		self.cache.Load(self.configPath)
-
-		if not self.systemFLM.isAbsolute():
-			self.systemFLM = self.home.Append(self.systemFLM)
-
-		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.
-
-		raptor.GetBuildUnitsToBuild(["armv5", "winscw"])
-		>>> [ config1, config2, ... , configN ]
-		""" 
-
-		if len(configNames) == 0:
-			# use default config
-			if len(self.defaultConfig) == 0:
-				self.Warn("No default configuration name")
-			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))
-
-		for b in buildUnitsToBuild:
-			self.Info("Buildable configuration '%s'", b.name)
-
-		if len(buildUnitsToBuild) == 0:
-			self.Error("No build configurations given")
-
-		return buildUnitsToBuild
-
-	def CheckToolset(self, evaluator, configname):
-		"""Check the toolset for a particular config, allow other objects access 
-		to the toolset for this build (e.g. the raptor_make class)."""
-		if self.toolset is None:
-			if self.toolcheck == 'on':
-				self.toolset = raptor_data.ToolSet(log=self)
-			elif self.toolcheck == 'forced' :
-				self.toolset = raptor_data.ToolSet(log=self, forced=True)
-			else:
-				return True
-
-		return self.toolset.check(evaluator, configname)
-
-
-	def CheckConfigs(self, configs):
-		"""	Tool checking for all the buildable configurations
-			NB. We are allowed to use different tool versions for different
-			configurations."""
-
-		tools_ok = True
-		for b in configs:
-			self.Debug("Tool check for %s", b.name)
-			evaluator = self.GetEvaluator(None, b, gathertools=True)
-			tools_ok = tools_ok and self.CheckToolset(evaluator, b.name)
-
-		return tools_ok
-
-
-
-	def GatherSysModelLayers(self, systemModel, systemDefinitionRequestedLayers):
-		"""Return a list of lists of components to be built.
-
-		components = GatherSysModelLayers(self, configurations)
-		>>> set("abc/group/bld.inf","def/group/bld.inf, ....")
-		"""
-		layersToBuild = []
-
-		if systemModel:
-			# We either process all available layers in the system model, or a subset of
-			# layers specified on the command line.  In both cases, the processing is the same,
-			# and can be subject to ordering if explicitly requested.
-			systemModel.DumpInfo()
-
-			if systemDefinitionRequestedLayers:
-				layersToProcess = systemDefinitionRequestedLayers
-			else:
-				layersToProcess = systemModel.GetLayerNames()
-
-			for layer in layersToProcess:
-				systemModel.DumpLayerInfo(layer)
-
-				if systemModel.IsLayerBuildable(layer):
-					layersToBuild.append(ComponentGroup(layer,
-							systemModel.GetLayerComponents(layer)))
-
-		return layersToBuild
-
-
-	# Add bld.inf or system definition xml to command line componentGroups (depending on preference)
-	def FindSysDefIn(self, aDir = None):
-		# Find a system definition file
-
-		if aDir is None:
-			dir = generic_path.CurrentDir()
-		else:
-			dir = generic_path.Path(aDir)
-
-		sysDef = dir.Append(self.systemDefinition)
-		if not sysDef.isFile():
-			return None
-
-		return sysDef
-
-
-	def FindComponentIn(self, aDir = None):
-		# look for a bld.inf 
-
-		if aDir is None:
-			dir = generic_path.CurrentDir()
-		else:
-			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.
-		configWide = {}
-		genericSpecs = []
-		for c in configsToBuild:
-			evaluator = self.GetEvaluator(None, c)
-			iface = evaluator.Get("INTERFACE.config")
-			if iface:
-				if iface in configWide:
-					# seen it already, so reuse the node
-					filter = configWide[iface]
-					filter.AddConfigCondition(c.name)
-				else:
-					# create a new node
-					filter = raptor_data.Filter("config_wide")
-					filter.AddConfigCondition(c.name)
-					for i in iface.split():
-						spec = raptor_data.Specification(i)
-						spec.SetInterface(i)
-						filter.AddChildSpecification(spec)
-					# remember it, use it
-					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
-
-
-	def Make(self, makefile):
-
-		if self.maker.Make(makefile):
-			self.Info("The make-engine exited successfully.")
-			return True
-		else:
-			self.Error("The make-engine exited with errors.")
-			return False
-
-
-	def Report(self):
-		if self.quiet:
-			return
-
-		self.endtime = time.time()
-		self.runtime = int(0.5 + self.endtime - self.starttime)
-		self.raptor_params.runtime = self.runtime
-		self.Info("Run time %s seconds" % self.runtime)
-
-	def AssertBuildOK(self):
-		"""Raise a BuildCompleteException if no further processing is required
-		"""
-		if self.Skip():
-			raise BuildCompleteException("")
-
-		return True
-
-	def Skip(self):
-		"""Indicate not to perform operation if:
-		   fatalErrorState is set
-		   an error code is set but we're not in keepgoing mode
-		"""
-		return self.fatalErrorState or ((self.errorCode != 0) and (not self.keepGoing))
-
-
-	# log file open/close
-
-	def OpenLog(self):
-		"""Open a log file for the various I/O methods to write to."""
-
-		try:
-			# Find all the raptor plugins and put them into a pluginbox.
-			if not self.systemPlugins.isAbsolute():
-				self.systemPlugins = self.home.Append(self.systemPlugins)
-
-			self.pbox = pluginbox.PluginBox(str(self.systemPlugins))
-
-			self.raptor_params = BuildStats(self)
-
-			# Open the requested plugins using the pluginbox
-			self.out.open(self.raptor_params, self.filterList.split(','), self.pbox)
-
-			# log header
-			self.out.write("\n")
-
-			namespace = "http://symbian.com/xml/build/log"
-			schema = "http://symbian.com/xml/build/log/1_0.xsd"
-
-			self.out.write("\n"
-						   % (raptor_version.Version(), 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()
-			self.out.write("\n")
-
-			if not self.out.close():
-				self.errorCode = 1
-
-
-	def Cleanup(self):
-		# ensure that the toolset cache is flushed.
-		if self.toolset is not None:
-			self.toolset.write()
-
-	# I/O methods
-
-	@staticmethod
-	def attributeString(dictionary):
-		"turn a dictionary into a string of XML attributes"
-		atts = ""
-		for a,v in dictionary.items():
-			atts += " " + a + "='" + v + "'"
-		return atts
-	
-	def Info(self, format, *extras, **attributes):
-		"""Send an information message to the configured channel
-				(XML control characters will be escaped)
-		"""
-		self.out.write("" +
-		               escape(format % extras) + "\n")
-
-	def Debug(self, format, *extras, **attributes):
-		"Send a debugging message to the configured channel"
-
-		# the debug text is out of our control so wrap it in a CDATA
-		# in case it contains characters special to XML... like <>
-		if self.debugOutput:
-			self.out.write("" +
-			               ">\n")
-
-	def Warn(self, format, *extras, **attributes):
-		"""Send a warning message to the configured channel
-				(XML control characters will be escaped)
-		"""
-		self.out.write("" + 
-		               escape(format % extras) + "\n")
-
-	def FatalError(self, format, *extras, **attributes):
-		"""Send an error message to the configured channel. This implies such a serious
-		   error that the entire build must be shut down asap whilst still finishing off
-		   correctly whatever housekeeping is possible e.g. producing error reports.
-		   Remains quiet if the raptor object is already in a fatal state since there
-		   further errors are probably triggered by the first.
-		"""
-		if not self.fatalErrorState:
-			self.out.write("" + 
-			               (format % extras) + "\n")
-			self.errorCode = 1
-			self.fatalErrorState = True
-
-	def Error(self, format, *extras, **attributes):
-		"""Send an error message to the configured channel
-				(XML control characters will be escaped)
-		"""
-		self.out.write("" + 
-		               escape(format % extras) + "\n")
-		self.errorCode = 1
-
-
-	def PrintXML(self, format, *extras):
-		"Print to configured channel (no newline is added) (assumes valid xml)"
-		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
-		   commandline interface to Raptor e.g. parameters
-		   or the current directory"""
-		componentGroups=[]
-		# 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:
-				cwd = os.getcwd()
-				self.systemDefinitionFile = self.FindSysDefIn(cwd)
-				if self.systemDefinitionFile == None:
-					aComponent = self.FindComponentIn(cwd)
-					if aComponent:
-						componentGroups.append(ComponentGroup('default',[aComponent]))
-			else:
-				aComponent = self.FindComponentIn(cwd)
-				if aComponent is None:
-					self.systemDefinitionFile = self.FindSysDefIn(cwd)
-				else:
-					componentGroups.append(ComponentGroup('default',[aComponent]))
-
-			if len(componentGroups) <= 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)
-			
-		# 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))
-
-		# 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]
-
-		return componentGroups
-
-	def Build(self):
-
-		if self.mission != Raptor.M_BUILD: # help or version requested instead.
-			return 0
-
-		# open the log file
-		self.OpenLog()
-
-
-		try:
-			# show the command and platform info
-			self.AssertBuildOK()
-			self.Introduction()
-			# establish an object cache
-			self.AssertBuildOK()
-			
-			self.LoadCache()
-
-			# find out what configurations to build
-			self.AssertBuildOK()
-			buildUnitsToBuild = set()
-			buildUnitsToBuild = self.GetBuildUnitsToBuild(self.configNames)
-
-			# find out what components to build, and in what way
-			componentGroups = []
-
-			self.AssertBuildOK()
-			if len(buildUnitsToBuild) >= 0:
-				componentGroups = self.GetComponentGroupsFromCLI()
-
-			componentCount = reduce(lambda x,y : x + y, [len(cg) for cg in componentGroups])
-
-			if not componentCount > 0:
-				raise BuildCompleteException("No components to build.")
-
-			# check the configurations (tools versions)
-			self.AssertBuildOK()
-
-			if self.toolcheck != 'off':
-				self.CheckConfigs(buildUnitsToBuild)
-			else:
-				self.Info(" Not Checking Tool Versions")
-
-			self.AssertBuildOK()
-
-
-			# if self.doParallelParsing and not (len(componentGroups) == 1 and len(componentGroups[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")
-			else:
-				# Parse components serially, creating one set of makefiles
-				# create non-component specs
-				self.AssertBuildOK()
-				generic_specs = self.GenerateGenericSpecs(buildUnitsToBuild)
-
-				self.AssertBuildOK()
-				for cg in componentGroups:
-					# create specs for a specific group of components
-					cg.GenerateSpecs(generic_specs, buildUnitsToBuild)
-					self.WriteMetadataDepsMakefile(cg)	
-					
-					# generate the makefiles for one group of specs
-					self.MakeComponentGroup(cg)
-
-		except BuildCompleteException,b:
-			if str(b) != "":
-				self.Info(str(b))
-
-		# final report
-		if not self.fatalErrorState:
-			self.Report()
-
-		self.Cleanup()
-
-		# close the log file
-		self.CloseLog()
-
-		return self.errorCode
-
-	@classmethod
-	def CreateCommandlineBuild(cls, argv):
-		""" Perform a 'typical' build. """
-		# configure the framework
-
-		build = Raptor()
-		build.AssertBuildOK()
-		build.ConfigFile()
-		build.ProcessConfig()
-		build.CommandLine(argv)
-
-		return build 
-
-
-
-# Class for passing constricted parameters to filters
-class BuildStats(object):
-
-	def __init__(self, raptor_instance):
-		self.logFileName = raptor_instance.logFileName
-		self.quiet = raptor_instance.quiet
-		self.doCheck = raptor_instance.doCheck
-		self.doWhat = raptor_instance.doWhat
-		self.platform = hostplatform
-		self.skipAll = raptor_instance.fatalErrorState
-		self.timestring = raptor_instance.timestring
-		self.targets = raptor_instance.targets
-		self.runtime = 0
-		self.name = name
-
-
-# raptor module functions
-
-def Main(argv):
-	"""The main entry point for Raptor.
-
-	argv is a list of command-line parameters,
-	NOT including the name of the calling script.
-
-	The return value is zero for success and non-zero for failure."""
-
-	DisplayBanner()
-
-	# 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
-
-
-def DisplayBanner():
-	"""Stuff that needs printing out for every command."""
-	pass
-
-
-
-# end of the raptor module
+#
+# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# raptor module
+# This module represents the running Raptor program. Raptor is started
+# either by calling the Main() function, which creates an instance of
+# the raptor.Raptor class and calls its methods to perform a build based
+# on command-line parameters, or by explicitly creating a raptor.Raptor
+# instance and calling its methods to set-up and perform a build.
+#
+
+name = "sbs"			# the public name for the raptor build tool
+env  = "SBS_HOME"		# the environment variable that locates us
+xml  = "sbs_init.xml"	# the primary initialisation file
+env2 = "HOME"		 	# the environment variable that locates the user
+xml2 = ".sbs_init.xml"	# the override initialisation file
+
+import generic_path
+import os
+import raptor_cache
+import raptor_cli
+import raptor_data
+import raptor_make
+import raptor_meta
+import raptor_utilities
+import raptor_version
+import raptor_xml
+import filter_list
+import sys
+import types
+import time
+import re
+import traceback
+import pluginbox
+from xml.sax.saxutils import escape
+
+
+if not "HOSTPLATFORM" in os.environ or not "HOSTPLATFORM_DIR" in os.environ:
+	print "Error: HOSTPLATFORM and HOSTPLATFORM_DIR must be set in the environment (this is usually done automatically by the startup script)."
+	sys.exit(1)
+
+hostplatform = os.environ["HOSTPLATFORM"].split(" ")
+hostplatform_dir = os.environ["HOSTPLATFORM_DIR"]
+
+# defaults can use EPOCROOT
+if "EPOCROOT" in os.environ:
+	epocroot = os.environ["EPOCROOT"].replace("\\","/")
+else:
+	if 'linux' in hostplatform:
+		epocroot=os.environ['HOME'] + os.sep + "epocroot"
+		os.environ["EPOCROOT"] = epocroot
+	else:
+		epocroot = "/"
+		os.environ["EPOCROOT"] = os.sep
+
+if "SBS_BUILD_DIR" in os.environ:
+	sbs_build_dir = os.environ["SBS_BUILD_DIR"]
+else:
+	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")
+if epoc32UserConfigDir.isDir():
+	defaultSystemConfig = str(epoc32UserConfigDir) + os.pathsep + defaultSystemConfig
+
+# parameters that can be overriden by the sbs_init.xml file
+# or by the command-line.
+defaults = {
+		"allowCommandLineOverrides" : True,
+		"CLI" : "raptor_cli",
+		"buildInformation" : generic_path.Path("bld.inf"),
+		"defaultConfig" : "default",
+		"jobs": 4,
+		"keepGoing": False,
+		"logFileName" : generic_path.Join(sbs_build_dir,"Makefile.%TIME.log"),
+		"makeEngine" : "make",
+		"preferBuildInfoToSystemDefinition" : False,
+		"pruneDuplicateMakefiles": True,
+		"quiet" : False,
+		"systemConfig" :  defaultSystemConfig,
+		"systemDefinition" : generic_path.Path("System_Definition.xml"),
+		"systemDefinitionBase" : generic_path.Path("."),
+		"systemFLM" : generic_path.Path("lib/flm"),
+		"systemPlugins" : generic_path.Path("python/plugins"),
+		"topMakefile" : generic_path.Join(sbs_build_dir,"Makefile"),
+		"tries": 1,
+		"writeSingleMakefile": True,
+		"ignoreOsDetection": False,
+		"toolcheck": "on",
+		"filterList": "filterterminal,filterlogfile"
+		}
+
+
+class ComponentGroup(object):
+	""" 	Some components that should be built togther 
+		e.g. a Layer in the system definition. 
+	""" 
+	def __init__(self, name, componentlist=[]):
+		self.components = componentlist
+		self.name = name
+
+	def __iter__(self):
+		return iter(self.components)
+
+	def __getitem__(self,x):
+		if isinstance(x, slice):
+			return self.components[x.start:x.stop]
+		return self.components[x]
+
+	def __setitem__(self,k, v):
+		self.components[k] = v
+
+	def __len__(self):
+		return len(self.components)
+
+	def extend(self, c):
+		self.components.extend(c)
+	
+	def append(self, c):
+		self.components.append(c)
+
+	def GenerateSpecs(self, genericspecs, configs):
+		"""Return a build spec hierarchy for a ComponentGroup. This involves parsing the component MetaData (bld.infs, mmps). 
+		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.
+		"""
+
+		self.specs = []
+		self.specs.extend(genericspecs)
+		self.configs = configs
+		self.dependencies = set()
+
+		metaReader = None
+		if len (self.components):
+			try:
+				# create a MetaReader that is aware of the list of
+				# configurations that we are trying to build.
+				metaReader = raptor_meta.MetaReader(build, configs)
+
+				# convert the list of bld.inf files into a specification
+				# hierarchy suitable for all the configurations we are using.
+				self.specs.extend(metaReader.ReadBldInfFiles(self.components,build.doExportOnly))
+
+			except raptor_meta.MetaDataError, e:
+				log.Error(e.Text)
+
+		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)
+
+		engine.Write(makefile, self.specs, self.configs)
+
+		return makefile
+
+
+	def GenerateMetadataSpecs(self, configs):
+		# insert the start time into the Makefile name?
+
+		self.configs = build.GetConfig("build").GenerateBuildUnits()
+
+		# Pass certain CLI flags through to the makefile-generating sbs calls
+		cli_options = ""
+			
+		if build.debugOutput == True:
+			cli_options += " -d"
+				
+		if build.ignoreOsDetection == True:
+			cli_options += " -i"
+			
+		if build.keepGoing == True:
+			cli_options += " -k"
+			
+		if build.quiet == True:
+			cli_options += " -q"
+
+		
+		nc = len(self.components)
+		number_blocks = 16
+		block_size = (nc / number_blocks) + 1
+		component_blocks = []
+		spec_nodes = []
+		
+		b = 0
+		while b < nc:
+			component_blocks.append(self.components[b:b+block_size])
+			b += block_size
+			
+		if len(component_blocks[-1]) <= 0:
+			component_blocks.pop()
+		
+		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])
+			
+			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))
+				pass
+			
+			# add some basic data in a component-wide variant
+			var = raptor_data.Variant()
+			var.AddOperation(raptor_data.Set("COMPONENT_PATHS", componentList))
+			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))
+			# 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)
+			except KeyError:
+				build.Error("Can't find flm interface 'build.makefiles' ")
+				
+			spec_nodes.append(specNode)
+			
+			
+
+		## possibly some error handling here?
+
+		self.specs = spec_nodes
+
+
+class BuildCompleteException(Exception):
+	pass
+
+# raptor module classes
+
+class Raptor(object):
+	"""An instance of a running Raptor program.
+
+	When operated from the command-line there is a single Raptor object
+	created by the Main function. When operated by an IDE several Raptor
+	objects may be created and operated at the same time."""
+
+
+	M_BUILD = 1
+	M_VERSION = 2	
+
+	def __init__(self, home = None):
+
+		self.DefaultSetUp(home)
+
+
+	def DefaultSetUp(self, home = None):
+		"revert to the default set-up state"
+		self.errorCode = 0
+		self.skipAll = False
+		self.summary = True
+		self.out = sys.stdout # Just until filters get started.
+
+		# Create a bootstrap output system.
+		self.out = filter_list.FilterList()
+
+		if home == None:
+			try:
+				home = os.environ[env]
+			except KeyError:
+				home = os.getcwd()
+
+		# make sure the home directory exists
+		self.home = generic_path.Path(home).Absolute()
+
+		if not self.home.isDir():
+			self.Error("%s '%s' is not a directory", env, self.home)
+			return
+
+		# the set-up file location.
+		# use the override "env2/xml2" if it exists
+		# else use the primary "env/xml" if it exists
+		# else keep the hard-coded defaults.
+		self.raptorXML = self.home.Append(xml)
+
+		if env2 in os.environ:
+			sbs_init = generic_path.Join(os.environ[env2], xml2)
+			if sbs_init.isFile():
+				self.raptorXML = sbs_init
+
+		# things that can be overridden by the set-up file
+		for key, value in defaults.items():
+			self.__dict__[key] = value
+
+		# things to initialise
+		self.args = []
+
+		self.componentGroups = []
+		self.orderComponentGroups = False
+		self.commandlineComponents = []
+
+		self.systemModel = None
+		self.systemDefinitionFile = None
+		self.systemDefinitionRequestedLayers = []
+		self.systemDefinitionOrderLayers = False
+
+		self.specGroups = {}
+
+		self.configNames = []
+		self.configsToBuild = set()
+		self.makeOptions = []
+		self.maker = None
+		self.debugOutput = False
+		self.doExportOnly = False
+		self.noBuild = False
+		self.noDependInclude = False
+		self.projects = set()
+
+		self.cache = raptor_cache.Cache(self)
+		self.override = {env: str(self.home)}
+		self.targets = []
+		self.defaultTargets = []
+
+		self.doCheck = False
+		self.doWhat = False
+		self.doParallelParsing = False
+		self.mission = Raptor.M_BUILD
+
+		# what platform and filesystem are we running on?
+		self.filesystem = raptor_utilities.getOSFileSystem()
+
+		self.toolset = None
+
+		self.starttime = time.time()
+		self.timestring = time.strftime("%Y-%m-%d-%H-%M-%S")
+
+		self.fatalErrorState = False
+
+	def AddConfigList(self, configPathList):
+		# this function converts cmd line option into a list
+		# and prepends it to default config.
+		self.configPath = generic_path.NormalisePathList(configPathList.split(os.pathsep)) + self.configPath
+		return True
+
+	def AddConfigName(self, name):
+		self.configNames.append(name)
+		return True
+
+	def RunQuietly(self, TrueOrFalse):
+		self.quiet = TrueOrFalse
+		return True
+
+	def SetCheck(self, TrueOrFalse):
+		self.doCheck = TrueOrFalse
+		return True
+
+	def SetWhat(self, TrueOrFalse):
+		self.doWhat = TrueOrFalse
+		return True
+
+	def SetEnv(self, name, value):
+		self.override[name] = value
+
+	def AddTarget(self, target):
+		if self.doCheck or self.doWhat:
+			self.Warn("ignoring target %s because --what or --check is specified.\n", target)
+		else:
+			self.targets.append(target)
+			
+	def AddSourceTarget(self, filename):
+		# source targets are sanitised and then added as if they were a "normal" makefile target
+		# in addition they have a default, empty, top-level target assigned in order that they can
+		# be presented to any generated makefile without error
+		sourceTarget = generic_path.Path(filename).Absolute()
+		sourceTarget = 'SOURCETARGET_' + raptor_utilities.sanitise(str(sourceTarget))
+		self.AddTarget(sourceTarget)
+		self.defaultTargets.append(sourceTarget)
+		return True
+
+	def SetSysDefFile(self, filename):
+		self.systemDefinitionFile = generic_path.Path(filename)
+		return True
+
+	def SetSysDefBase(self, path):
+		self.systemDefinitionBase = generic_path.Path(path)
+		return True
+
+	def AddSysDefLayer(self, layer):
+		self.systemDefinitionRequestedLayers.append(layer)
+		return True
+
+	def SetSysDefOrderLayers(self, TrueOrFalse):
+		self.systemDefinitionOrderLayers = TrueOrFalse
+		return True
+
+	def AddBuildInfoFile(self, filename):
+		bldinf = generic_path.Path(filename).Absolute()
+		self.commandlineComponents.append(bldinf)
+		return True
+
+	def SetTopMakefile(self, filename):
+		self.topMakefile = generic_path.Path(filename)
+		return True
+
+	def SetDebugOutput(self, TrueOrFalse):
+		self.debugOutput = TrueOrFalse
+		return True
+
+	def SetExportOnly(self, TrueOrFalse):
+		self.doExportOnly = TrueOrFalse
+		return True
+
+	def SetNoBuild(self, TrueOrFalse):
+		self.noBuild = TrueOrFalse
+		return True
+
+	def SetNoDependInclude(self, TrueOrFalse):
+		self.noDependInclude = TrueOrFalse
+		return True
+		
+	def SetKeepGoing(self, TrueOrFalse):
+		self.keepGoing = TrueOrFalse
+		return True
+
+	def SetLogFileName(self, logfile):
+		if logfile == "-":
+			self.logFileName = None  # stdout
+		else:
+			self.logFileName = generic_path.Path(logfile)
+		return True
+
+	def SetMakeEngine(self, makeEngine):
+		self.makeEngine = makeEngine
+		return True
+
+	def AddMakeOption(self, makeOption):
+		self.makeOptions.append(makeOption)
+		return True
+
+	def SetJobs(self, numberOfJobs):
+		try:
+			self.jobs = int(numberOfJobs)
+		except ValueError:
+			self.jobs = 0
+
+		if self.jobs < 1:
+			self.Warn("The number of jobs (%s) must be a positive integer\n", numberOfJobs)
+			self.jobs = 1
+			return False
+		return True
+
+	def SetTries(self, numberOfTries):
+		try:
+			self.tries = int(numberOfTries)
+		except ValueError:
+			self.tries = 0
+
+		if self.tries < 1:
+			self.Warn("The number of tries (%s) must be a positive integer\n", numberOfTries)
+			self.tries = 1
+			return False
+		return True
+
+	def SetToolCheck(self, type):
+		type = type.lower()
+		toolcheck_types= [ "forced", "on", "off" ]
+		if type in toolcheck_types:
+			self.toolcheck=type
+		else:
+			self.Warn("toolcheck option must be one of: %s" % toolcheck_types)
+			return False
+
+		return True
+
+	def SetParallelParsing(self, type):
+		type = type.lower()
+		if type == "on":
+			self.doParallelParsing = True
+		elif type == "off":
+			self.doParallelParsing = False
+		else:
+			self.Warn(" parallel parsing option must be either 'on' or 'off' (was %s)"  % type)
+			return False
+
+		return True
+
+	def AddProject(self, projectName):
+		self.projects.add(projectName.lower())
+		return True
+
+	def FilterList(self, value):
+		self.filterList = value
+		return True
+
+	def IgnoreOsDetection(self, value):
+		self.ignoreOsDetection = value
+		return True
+
+	def PrintVersion(self,dummy):
+		global name
+		print name, "version", raptor_version.Version()
+		self.mission = Raptor.M_VERSION
+		return False
+
+	# worker methods
+
+	def Introduction(self):
+		"""Print a header of useful information about Raptor"""
+
+		self.Info("%s: version %s\n", name, raptor_version.Version())
+
+		self.Info("%s %s", env, str(self.home))
+		self.Info("Set-up %s", str(self.raptorXML))
+		self.Info("Command-line-arguments %s", " ".join(self.args))
+		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)
+
+		# and some general debug stuff
+		self.Debug("Platform %s", "-".join(hostplatform))
+		self.Debug("Filesystem %s", self.filesystem)
+		self.Debug("Python %d.%d.%d", *sys.version_info[:3])
+		self.Debug("Command-line-parser %s", self.CLI)
+
+		for e,value in self.override.items():
+			self.Debug("Override %s = %s", e, value)
+
+		for t in self.targets:
+			self.Debug("Target %s", t)
+
+
+	def ConfigFile(self):
+		if not self.raptorXML.isFile():
+			return
+
+		self.cache.Load(self.raptorXML)
+
+		# find the 'defaults.raptor' variant and extract the values
+		try:
+			var = self.cache.FindNamedVariant("defaults.init")
+			evaluator = self.GetEvaluator( None, raptor_data.BuildUnit(var.name,[var]) )
+
+			for key, value in defaults.items():
+				newValue = evaluator.Resolve(key)
+
+				if newValue != None:
+					# got a string for the value
+					if type(value) == types.BooleanType:
+						newValue = (newValue.lower() != "false")
+					elif type(value) == types.IntType:
+						newValue = int(newValue)
+					elif isinstance(value, generic_path.Path):
+						newValue = generic_path.Path(newValue)
+
+					self.__dict__[key] = newValue
+
+		except KeyError:
+			# it is OK to not have this but useful to say it wasn't there
+			self.Info("No 'defaults.init' configuration found in " + str(self.raptorXML))
+
+
+	def CommandLine(self, args):
+		# remember the arguments for the log
+		self.args = args
+
+		# assuming self.CLI = "raptor_cli"
+		more_to_do = raptor_cli.GetArgs(self, args)
+
+		# resolve inter-argument dependencies.
+		# --what or --check implies the WHAT target and FilterWhat Filter
+		if self.doWhat or self.doCheck:
+			self.targets = ["WHAT"]
+			self.filterList = "filterwhat"
+
+		else:
+			# 1. CLEAN/CLEANEXPORT/REALLYCLEAN needs the FilterClean filter.
+			# 2. Targets that clean should not be combined with other targets.
+
+			targets = [x.lower() for x in self.targets]
+
+			CL = "clean"
+			CE = "cleanexport"
+			RC = "reallyclean"
+
+			is_clean = 0
+			is_suspicious_clean = 0
+
+			if CL in targets and CE in targets:
+				is_clean = 1
+				if len(targets) > 2:
+					is_suspicious_clean = 1
+			elif RC in targets or CL in targets or CE in targets:
+				is_clean = 1
+				if len(targets) > 1:
+					is_suspicious_clean = 1
+
+			if is_clean:
+				self.filterList += ",filterclean"
+				if is_suspicious_clean:
+					self.Warn('CLEAN, CLEANEXPORT and a REALLYCLEAN should not be combined with other targets as the result is unpredictable.')
+
+		if not more_to_do:
+			self.skipAll = True		# nothing else to do
+
+	def ProcessConfig(self):
+		# this function will perform additional processing of config
+
+		# create list of generic paths
+		self.configPath = generic_path.NormalisePathList(self.systemConfig.split(os.pathsep))
+
+	def LoadCache(self):
+		def mkAbsolute(aGenericPath):
+			""" internal function to make a generic_path.Path
+			absolute if required"""
+			if not aGenericPath.isAbsolute():
+				return self.home.Append(aGenericPath)
+			else:
+				return aGenericPath
+		
+		# make generic paths absolute (if required)
+		self.configPath = map(mkAbsolute, self.configPath)
+		self.cache.Load(self.configPath)
+
+		if not self.systemFLM.isAbsolute():
+			self.systemFLM = self.home.Append(self.systemFLM)
+
+		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.
+
+		raptor.GetBuildUnitsToBuild(["armv5", "winscw"])
+		>>> [ config1, config2, ... , configN ]
+		""" 
+
+		if len(configNames) == 0:
+			# use default config
+			if len(self.defaultConfig) == 0:
+				self.Warn("No default configuration name")
+			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))
+
+		for b in buildUnitsToBuild:
+			self.Info("Buildable configuration '%s'", b.name)
+
+		if len(buildUnitsToBuild) == 0:
+			self.Error("No build configurations given")
+
+		return buildUnitsToBuild
+
+	def CheckToolset(self, evaluator, configname):
+		"""Check the toolset for a particular config, allow other objects access 
+		to the toolset for this build (e.g. the raptor_make class)."""
+		if self.toolset is None:
+			if self.toolcheck == 'on':
+				self.toolset = raptor_data.ToolSet(log=self)
+			elif self.toolcheck == 'forced' :
+				self.toolset = raptor_data.ToolSet(log=self, forced=True)
+			else:
+				return True
+
+		return self.toolset.check(evaluator, configname)
+
+
+	def CheckConfigs(self, configs):
+		"""	Tool checking for all the buildable configurations
+			NB. We are allowed to use different tool versions for different
+			configurations."""
+
+		tools_ok = True
+		for b in configs:
+			self.Debug("Tool check for %s", b.name)
+			evaluator = self.GetEvaluator(None, b, gathertools=True)
+			tools_ok = tools_ok and self.CheckToolset(evaluator, b.name)
+
+		return tools_ok
+
+
+
+	def GatherSysModelLayers(self, systemModel, systemDefinitionRequestedLayers):
+		"""Return a list of lists of components to be built.
+
+		components = GatherSysModelLayers(self, configurations)
+		>>> set("abc/group/bld.inf","def/group/bld.inf, ....")
+		"""
+		layersToBuild = []
+
+		if systemModel:
+			# We either process all available layers in the system model, or a subset of
+			# layers specified on the command line.  In both cases, the processing is the same,
+			# and can be subject to ordering if explicitly requested.
+			systemModel.DumpInfo()
+
+			if systemDefinitionRequestedLayers:
+				layersToProcess = systemDefinitionRequestedLayers
+			else:
+				layersToProcess = systemModel.GetLayerNames()
+
+			for layer in layersToProcess:
+				systemModel.DumpLayerInfo(layer)
+
+				if systemModel.IsLayerBuildable(layer):
+					layersToBuild.append(ComponentGroup(layer,
+							systemModel.GetLayerComponents(layer)))
+
+		return layersToBuild
+
+
+	# Add bld.inf or system definition xml to command line componentGroups (depending on preference)
+	def FindSysDefIn(self, aDir = None):
+		# Find a system definition file
+
+		if aDir is None:
+			dir = generic_path.CurrentDir()
+		else:
+			dir = generic_path.Path(aDir)
+
+		sysDef = dir.Append(self.systemDefinition)
+		if not sysDef.isFile():
+			return None
+
+		return sysDef
+
+
+	def FindComponentIn(self, aDir = None):
+		# look for a bld.inf 
+
+		if aDir is None:
+			dir = generic_path.CurrentDir()
+		else:
+			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.
+		configWide = {}
+		genericSpecs = []
+		for c in configsToBuild:
+			evaluator = self.GetEvaluator(None, c)
+			iface = evaluator.Get("INTERFACE.config")
+			if iface:
+				if iface in configWide:
+					# seen it already, so reuse the node
+					filter = configWide[iface]
+					filter.AddConfigCondition(c.name)
+				else:
+					# create a new node
+					filter = raptor_data.Filter("config_wide")
+					filter.AddConfigCondition(c.name)
+					for i in iface.split():
+						spec = raptor_data.Specification(i)
+						spec.SetInterface(i)
+						filter.AddChildSpecification(spec)
+					# remember it, use it
+					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
+
+
+	def Make(self, makefile):
+
+		if self.maker.Make(makefile):
+			self.Info("The make-engine exited successfully.")
+			return True
+		else:
+			self.Error("The make-engine exited with errors.")
+			return False
+
+
+	def Report(self):
+		if self.quiet:
+			return
+
+		self.endtime = time.time()
+		self.runtime = int(0.5 + self.endtime - self.starttime)
+		self.raptor_params.runtime = self.runtime
+		self.Info("Run time %s seconds" % self.runtime)
+
+	def AssertBuildOK(self):
+		"""Raise a BuildCompleteException if no further processing is required
+		"""
+		if self.Skip():
+			raise BuildCompleteException("")
+
+		return True
+
+	def Skip(self):
+		"""Indicate not to perform operation if:
+		   fatalErrorState is set
+		   an error code is set but we're not in keepgoing mode
+		"""
+		return self.fatalErrorState or ((self.errorCode != 0) and (not self.keepGoing))
+
+
+	# log file open/close
+
+	def OpenLog(self):
+		"""Open a log file for the various I/O methods to write to."""
+
+		try:
+			# Find all the raptor plugins and put them into a pluginbox.
+			if not self.systemPlugins.isAbsolute():
+				self.systemPlugins = self.home.Append(self.systemPlugins)
+
+			self.pbox = pluginbox.PluginBox(str(self.systemPlugins))
+
+			self.raptor_params = BuildStats(self)
+
+			# Open the requested plugins using the pluginbox
+			self.out.open(self.raptor_params, self.filterList.split(','), self.pbox)
+
+			# log header
+			self.out.write("\n")
+
+			namespace = "http://symbian.com/xml/build/log"
+			schema = "http://symbian.com/xml/build/log/1_0.xsd"
+
+			self.out.write("\n"
+						   % (raptor_version.Version(), 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()
+			self.out.write("\n")
+
+			if not self.out.close():
+				self.errorCode = 1
+
+
+	def Cleanup(self):
+		# ensure that the toolset cache is flushed.
+		if self.toolset is not None:
+			self.toolset.write()
+
+	# I/O methods
+
+	@staticmethod
+	def attributeString(dictionary):
+		"turn a dictionary into a string of XML attributes"
+		atts = ""
+		for a,v in dictionary.items():
+			atts += " " + a + "='" + v + "'"
+		return atts
+	
+	def Info(self, format, *extras, **attributes):
+		"""Send an information message to the configured channel
+				(XML control characters will be escaped)
+		"""
+		self.out.write("" +
+		               escape(format % extras) + "\n")
+
+	def Debug(self, format, *extras, **attributes):
+		"Send a debugging message to the configured channel"
+
+		# the debug text is out of our control so wrap it in a CDATA
+		# in case it contains characters special to XML... like <>
+		if self.debugOutput:
+			self.out.write("" +
+			               ">\n")
+
+	def Warn(self, format, *extras, **attributes):
+		"""Send a warning message to the configured channel
+				(XML control characters will be escaped)
+		"""
+		self.out.write("" + 
+		               escape(format % extras) + "\n")
+
+	def FatalError(self, format, *extras, **attributes):
+		"""Send an error message to the configured channel. This implies such a serious
+		   error that the entire build must be shut down asap whilst still finishing off
+		   correctly whatever housekeeping is possible e.g. producing error reports.
+		   Remains quiet if the raptor object is already in a fatal state since there
+		   further errors are probably triggered by the first.
+		"""
+		if not self.fatalErrorState:
+			self.out.write("" + 
+			               (format % extras) + "\n")
+			self.errorCode = 1
+			self.fatalErrorState = True
+
+	def Error(self, format, *extras, **attributes):
+		"""Send an error message to the configured channel
+				(XML control characters will be escaped)
+		"""
+		self.out.write("" + 
+		               escape(format % extras) + "\n")
+		self.errorCode = 1
+
+
+	def PrintXML(self, format, *extras):
+		"Print to configured channel (no newline is added) (assumes valid xml)"
+		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
+		   commandline interface to Raptor e.g. parameters
+		   or the current directory"""
+		componentGroups=[]
+		# 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:
+				cwd = os.getcwd()
+				self.systemDefinitionFile = self.FindSysDefIn(cwd)
+				if self.systemDefinitionFile == None:
+					aComponent = self.FindComponentIn(cwd)
+					if aComponent:
+						componentGroups.append(ComponentGroup('default',[aComponent]))
+			else:
+				aComponent = self.FindComponentIn(cwd)
+				if aComponent is None:
+					self.systemDefinitionFile = self.FindSysDefIn(cwd)
+				else:
+					componentGroups.append(ComponentGroup('default',[aComponent]))
+
+			if len(componentGroups) <= 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)
+			
+		# 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))
+
+		# 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]
+
+		return componentGroups
+
+	def Build(self):
+
+		if self.mission != Raptor.M_BUILD: # help or version requested instead.
+			return 0
+
+		# open the log file
+		self.OpenLog()
+
+
+		try:
+			# show the command and platform info
+			self.AssertBuildOK()
+			self.Introduction()
+			# establish an object cache
+			self.AssertBuildOK()
+			
+			self.LoadCache()
+
+			# find out what configurations to build
+			self.AssertBuildOK()
+			buildUnitsToBuild = set()
+			buildUnitsToBuild = self.GetBuildUnitsToBuild(self.configNames)
+
+			# find out what components to build, and in what way
+			componentGroups = []
+
+			self.AssertBuildOK()
+			if len(buildUnitsToBuild) >= 0:
+				componentGroups = self.GetComponentGroupsFromCLI()
+
+			componentCount = reduce(lambda x,y : x + y, [len(cg) for cg in componentGroups])
+
+			if not componentCount > 0:
+				raise BuildCompleteException("No components to build.")
+
+			# check the configurations (tools versions)
+			self.AssertBuildOK()
+
+			if self.toolcheck != 'off':
+				self.CheckConfigs(buildUnitsToBuild)
+			else:
+				self.Info(" Not Checking Tool Versions")
+
+			self.AssertBuildOK()
+
+
+			# if self.doParallelParsing and not (len(componentGroups) == 1 and len(componentGroups[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")
+			else:
+				# Parse components serially, creating one set of makefiles
+				# create non-component specs
+				self.AssertBuildOK()
+				generic_specs = self.GenerateGenericSpecs(buildUnitsToBuild)
+
+				self.AssertBuildOK()
+				for cg in componentGroups:
+					# create specs for a specific group of components
+					cg.GenerateSpecs(generic_specs, buildUnitsToBuild)
+					self.WriteMetadataDepsMakefile(cg)	
+					
+					# generate the makefiles for one group of specs
+					self.MakeComponentGroup(cg)
+
+		except BuildCompleteException,b:
+			if str(b) != "":
+				self.Info(str(b))
+
+		# final report
+		if not self.fatalErrorState:
+			self.Report()
+
+		self.Cleanup()
+
+		# close the log file
+		self.CloseLog()
+
+		return self.errorCode
+
+	@classmethod
+	def CreateCommandlineBuild(cls, argv):
+		""" Perform a 'typical' build. """
+		# configure the framework
+
+		build = Raptor()
+		build.AssertBuildOK()
+		build.ConfigFile()
+		build.ProcessConfig()
+		build.CommandLine(argv)
+
+		return build 
+
+
+
+# Class for passing constricted parameters to filters
+class BuildStats(object):
+
+	def __init__(self, raptor_instance):
+		self.logFileName = raptor_instance.logFileName
+		self.quiet = raptor_instance.quiet
+		self.doCheck = raptor_instance.doCheck
+		self.doWhat = raptor_instance.doWhat
+		self.platform = hostplatform
+		self.skipAll = raptor_instance.fatalErrorState
+		self.timestring = raptor_instance.timestring
+		self.targets = raptor_instance.targets
+		self.runtime = 0
+		self.name = name
+
+
+# raptor module functions
+
+def Main(argv):
+	"""The main entry point for Raptor.
+
+	argv is a list of command-line parameters,
+	NOT including the name of the calling script.
+
+	The return value is zero for success and non-zero for failure."""
+
+	DisplayBanner()
+
+	# 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
+
+
+def DisplayBanner():
+	"""Stuff that needs printing out for every command."""
+	pass
+
+
+
+# end of the raptor module
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/python/raptor_cache.py
--- a/sbsv2/raptor/python/raptor_cache.py	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/python/raptor_cache.py	Mon Nov 16 09:46:46 2009 +0000
@@ -1,223 +1,223 @@
-#
-# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# raptor_cache module
-# This module represents a cache of objects for a Raptor program.
-#
-
-import raptor_data
-import raptor_xml
-import generic_path
-import os
-
-# raptor_cache module attributes
-
-
-# raptor_cache module classes
-
-class Cache:
-
-	def __init__(self, Raptor):
-		self.raptor = Raptor
-		self.aliases = {}
-		self.groups = {}
-		self.interfaces = {}
-		self.variants = {}
-
-	def Load(self, gPathOrGPathList, cacheID = ""):
-		"""scan directory for xml files containing Raptor objects.
-		Input is either a generic path object or a list of
-		generic path objects.
-
-		If a cacheID is supplied then the loaded objects are
-		placed into containers which are marked with that ID.
-		This is useful for Interfaces which may be loaded from
-		several locations (different epoc32 trees for example)
-		but need to be kept separate.
-		"""
-
-		pathlist = []
-		filenames = []
-
-		# Create pathlist - this will be of length one if gPathOrGPathList is a
-		# generic path object; otherwise it's a list so just make all supplied paths generic
-		if isinstance(gPathOrGPathList, list):
-			pathlist = map(lambda x: x.GetLocalString(), gPathOrGPathList)
-		elif isinstance(gPathOrGPathList, generic_path.Path):
-			pathlist = [gPathOrGPathList.GetLocalString()]
-		else:
-			self.raptor.Warn("Empty list or blank path supplied.")
-
-		# Only when debugging, print the list. The for loop will be
-		# skipped if not in debug mode
-		if self.raptor.debugOutput:
-			for path in pathlist:
-				self.raptor.Debug("Loading XML cache from %s", path)
-
-		# Internal function to get the list of XML
-		# files recursively
-		def getXmlFiles(aDir, aFileList):
-			dirList = []
-			for fname in os.listdir(aDir):
-				path = os.path.join(aDir, fname)
-				if os.path.isdir(path):
-					dirList.append(path)
-				else: # It's a file
-					if path.endswith(".xml"): # Only files ending in .xml get added
-						aFileList.append(path)
-			# Now iterate over directory list; this way, the files in the top level of
-			# aDir will be added before all files in any subdirectory of aDir
-			for dir in dirList:
-				getXmlFiles(dir, aFileList)
-
-		# This will add all files in all top level directories and all XML files
-		for path in pathlist:
-			# gPathOrGPathList passed to Load() can be a file or a
-			# directory, or a list of files or directories or both
-			if os.path.isfile(path):
-				if path.endswith(".xml"): # Only files whose names end in .xml get added
-					filenames.append(path)
-			elif os.path.isdir(path):
-				getXmlFiles(path, filenames)
-			else: # it isn't a file or directory
-				self.raptor.Warn("No file or directory found for '%s'", path)
-
-		if not filenames:
-			# No XML files found in any of the paths
-			return
-
-		# Parse XML files, and add the objects to our
-		# configuration/interface/variant dictionaries
-		for fullpath in filenames:
-			try:
-				objects = raptor_xml.Read(self.raptor, fullpath)
-
-			except raptor_xml.XMLError:
-				self.raptor.Warn("Failed to read XML file %s", fullpath)
-				continue
-
-			self.raptor.Debug("%d objects found in XML file %s", len(objects), fullpath)
-
-			for obj in objects:
-				# top-level objects need to know which XML file they came from.
-				obj.SetSourceFile(fullpath)
-				try:
-					self.AddObject(obj, cacheID)
-				except UnexpectedObjectError:
-					self.raptor.Warn("Unexpected object %s", str(obj))
-
-	def AddObject(self, obj, cacheID):
-		"""add a Group, Alias, Interface or Variant.
-
-		The cacheID is only used to separate Interfaces.
-		"""
-
-		if isinstance(obj, raptor_data.Group):
-			self.AddGroup(obj)
-		elif isinstance(obj, raptor_data.Alias):
-			self.AddAlias(obj)
-		elif isinstance(obj, raptor_data.Interface):
-			self.AddInterface(obj, cacheID)
-		elif isinstance(obj, raptor_data.Variant):
-			self.AddVariant(obj)
-		else:
-			raise UnexpectedObjectError
-
-
-	def FindNamedGroup(self, name):
-		return self.groups[name]
-
-	def AddGroup(self, obj):
-		if obj.name in self.groups:
-			self.WarnDuplicate("group", self.groups[obj.name], obj)
-			return
-
-		obj.SetOwner(self.raptor)
-		self.groups[obj.name] = obj
-
-	def FindNamedAlias(self, name):
-		return self.aliases[name]
-
-	def AddAlias(self, obj):
-		if obj.name in self.aliases:
-			self.WarnDuplicate("alias", self.aliases[obj.name], obj)
-			return
-
-		obj.SetOwner(self.raptor)
-		self.aliases[obj.name] = obj
-
-
-	def FindNamedInterface(self, name, cacheID = ""):
-		try:
-			return self.interfaces[cacheID][name]
-		except KeyError, e:
-			if cacheID == "":
-				raise e
-			else:
-				return self.interfaces[""][name]
-
-
-	def AddInterface(self, obj, cacheID):
-		if not cacheID in self.interfaces:
-			self.interfaces[cacheID] = {}
-
-		if obj.name in self.interfaces[cacheID]:
-			self.WarnDuplicate("interface", self.interfaces[cacheID][obj.name], obj)
-			return
-
-		obj.SetOwner(self.raptor)
-		obj.cacheID = cacheID
-		self.interfaces[cacheID][obj.name] = obj
-
-
-	def FindNamedVariant(self, name):
-		return self.variants[name]
-
-
-	def AddVariant(self, obj):
-		# anonymous variants can never be referenced, so ignore them
-		if obj.name:
-			if self.variants.has_key(obj.name):
-				self.WarnDuplicate("variant", self.variants[obj.name], obj)
-				return
-
-			obj.SetOwner(self.raptor)
-			self.variants[obj.name] = obj
-
-
-	def WarnDuplicate(self, type, objOld, objNew):
-		"""tell us where duplicate objects came from."""
-		oldSource = objOld.source
-		if oldSource == None:
-			oldSource = "unknown"
-
-		newSource = objNew.source
-		if newSource == None:
-			newSource = "unknown"
-
-		# don't warn if we are reloading the object from the same
-		# file as before: since that is quite ligitimate.
-		if oldSource == newSource and oldSource != "unknown":
-			return
-
-		# actually this is just for information not a warning
-		self.raptor.Info("Duplicate %s '%s' (the one from '%s' will override the one in '%s')",
-						 type, objOld.name, oldSource, newSource)
-
-
-class UnexpectedObjectError(Exception):
-	pass
-
-
-# end of the raptor_cache module
+#
+# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# raptor_cache module
+# This module represents a cache of objects for a Raptor program.
+#
+
+import raptor_data
+import raptor_xml
+import generic_path
+import os
+
+# raptor_cache module attributes
+
+
+# raptor_cache module classes
+
+class Cache:
+
+	def __init__(self, Raptor):
+		self.raptor = Raptor
+		self.aliases = {}
+		self.groups = {}
+		self.interfaces = {}
+		self.variants = {}
+
+	def Load(self, gPathOrGPathList, cacheID = ""):
+		"""scan directory for xml files containing Raptor objects.
+		Input is either a generic path object or a list of
+		generic path objects.
+
+		If a cacheID is supplied then the loaded objects are
+		placed into containers which are marked with that ID.
+		This is useful for Interfaces which may be loaded from
+		several locations (different epoc32 trees for example)
+		but need to be kept separate.
+		"""
+
+		pathlist = []
+		filenames = []
+
+		# Create pathlist - this will be of length one if gPathOrGPathList is a
+		# generic path object; otherwise it's a list so just make all supplied paths generic
+		if isinstance(gPathOrGPathList, list):
+			pathlist = map(lambda x: x.GetLocalString(), gPathOrGPathList)
+		elif isinstance(gPathOrGPathList, generic_path.Path):
+			pathlist = [gPathOrGPathList.GetLocalString()]
+		else:
+			self.raptor.Warn("Empty list or blank path supplied.")
+
+		# Only when debugging, print the list. The for loop will be
+		# skipped if not in debug mode
+		if self.raptor.debugOutput:
+			for path in pathlist:
+				self.raptor.Debug("Loading XML cache from %s", path)
+
+		# Internal function to get the list of XML
+		# files recursively
+		def getXmlFiles(aDir, aFileList):
+			dirList = []
+			for fname in os.listdir(aDir):
+				path = os.path.join(aDir, fname)
+				if os.path.isdir(path):
+					dirList.append(path)
+				else: # It's a file
+					if path.endswith(".xml"): # Only files ending in .xml get added
+						aFileList.append(path)
+			# Now iterate over directory list; this way, the files in the top level of
+			# aDir will be added before all files in any subdirectory of aDir
+			for dir in dirList:
+				getXmlFiles(dir, aFileList)
+
+		# This will add all files in all top level directories and all XML files
+		for path in pathlist:
+			# gPathOrGPathList passed to Load() can be a file or a
+			# directory, or a list of files or directories or both
+			if os.path.isfile(path):
+				if path.endswith(".xml"): # Only files whose names end in .xml get added
+					filenames.append(path)
+			elif os.path.isdir(path):
+				getXmlFiles(path, filenames)
+			else: # it isn't a file or directory
+				self.raptor.Warn("No file or directory found for '%s'", path)
+
+		if not filenames:
+			# No XML files found in any of the paths
+			return
+
+		# Parse XML files, and add the objects to our
+		# configuration/interface/variant dictionaries
+		for fullpath in filenames:
+			try:
+				objects = raptor_xml.Read(self.raptor, fullpath)
+
+			except raptor_xml.XMLError:
+				self.raptor.Warn("Failed to read XML file %s", fullpath)
+				continue
+
+			self.raptor.Debug("%d objects found in XML file %s", len(objects), fullpath)
+
+			for obj in objects:
+				# top-level objects need to know which XML file they came from.
+				obj.SetSourceFile(fullpath)
+				try:
+					self.AddObject(obj, cacheID)
+				except UnexpectedObjectError:
+					self.raptor.Warn("Unexpected object %s", str(obj))
+
+	def AddObject(self, obj, cacheID):
+		"""add a Group, Alias, Interface or Variant.
+
+		The cacheID is only used to separate Interfaces.
+		"""
+
+		if isinstance(obj, raptor_data.Group):
+			self.AddGroup(obj)
+		elif isinstance(obj, raptor_data.Alias):
+			self.AddAlias(obj)
+		elif isinstance(obj, raptor_data.Interface):
+			self.AddInterface(obj, cacheID)
+		elif isinstance(obj, raptor_data.Variant):
+			self.AddVariant(obj)
+		else:
+			raise UnexpectedObjectError
+
+
+	def FindNamedGroup(self, name):
+		return self.groups[name]
+
+	def AddGroup(self, obj):
+		if obj.name in self.groups:
+			self.WarnDuplicate("group", self.groups[obj.name], obj)
+			return
+
+		obj.SetOwner(self.raptor)
+		self.groups[obj.name] = obj
+
+	def FindNamedAlias(self, name):
+		return self.aliases[name]
+
+	def AddAlias(self, obj):
+		if obj.name in self.aliases:
+			self.WarnDuplicate("alias", self.aliases[obj.name], obj)
+			return
+
+		obj.SetOwner(self.raptor)
+		self.aliases[obj.name] = obj
+
+
+	def FindNamedInterface(self, name, cacheID = ""):
+		try:
+			return self.interfaces[cacheID][name]
+		except KeyError, e:
+			if cacheID == "":
+				raise e
+			else:
+				return self.interfaces[""][name]
+
+
+	def AddInterface(self, obj, cacheID):
+		if not cacheID in self.interfaces:
+			self.interfaces[cacheID] = {}
+
+		if obj.name in self.interfaces[cacheID]:
+			self.WarnDuplicate("interface", self.interfaces[cacheID][obj.name], obj)
+			return
+
+		obj.SetOwner(self.raptor)
+		obj.cacheID = cacheID
+		self.interfaces[cacheID][obj.name] = obj
+
+
+	def FindNamedVariant(self, name):
+		return self.variants[name]
+
+
+	def AddVariant(self, obj):
+		# anonymous variants can never be referenced, so ignore them
+		if obj.name:
+			if self.variants.has_key(obj.name):
+				self.WarnDuplicate("variant", self.variants[obj.name], obj)
+				return
+
+			obj.SetOwner(self.raptor)
+			self.variants[obj.name] = obj
+
+
+	def WarnDuplicate(self, type, objOld, objNew):
+		"""tell us where duplicate objects came from."""
+		oldSource = objOld.source
+		if oldSource == None:
+			oldSource = "unknown"
+
+		newSource = objNew.source
+		if newSource == None:
+			newSource = "unknown"
+
+		# don't warn if we are reloading the object from the same
+		# file as before: since that is quite ligitimate.
+		if oldSource == newSource and oldSource != "unknown":
+			return
+
+		# actually this is just for information not a warning
+		self.raptor.Info("Duplicate %s '%s' (the one from '%s' will override the one in '%s')",
+						 type, objOld.name, oldSource, newSource)
+
+
+class UnexpectedObjectError(Exception):
+	pass
+
+
+# end of the raptor_cache module
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/python/raptor_cli.py
--- a/sbsv2/raptor/python/raptor_cli.py	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/python/raptor_cli.py	Mon Nov 16 09:46:46 2009 +0000
@@ -1,320 +1,320 @@
-#
-# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# raptor_cli module
-# This module represents a Command Line Interpreter (CLI) for Raptor.
-# The interface with Raptor is the GetArgs() function, which is called
-# by a raptor.Raptor object.
-#
-
-import re
-import types
-import raptor
-import os
-import sys
-import tempfile
-from raptor_utilities import getOSPlatform
-
-from optparse import OptionParser # for parsing command line parameters
-
-fullCommandOption = "--command"
-miniCommandOption = "--co"  # update this if another "co" option is added
-
-# raptor_cli module attributes
-
-parser = OptionParser(prog = raptor.name,
-					  usage = """%prog [--help] [options] [variable=value] [target] ...
-
-Targets:
-
-BITMAP         Create bitmap files
-CLEAN          Remove built files and intermediates, but not exported files
-CLEANEXPORT    Remove exported files
-EXPORT         Copy exported files to destinations
-FINAL          Allow extension makefiles to execute final commands
-FREEZE         Freeze exported functions in a .DEF file
-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
-ROMFILE        Create an IBY file to be included in a ROM
-TARGET         Create main executables
-WHAT           List all releaseable targets
-
-Examples:
-
-sbs -b my/group/bld.inf -c armv5        # build my component for target ARMV5
-sbs -b my/group/bld.inf -c armv5.test   # build my tests for target ARMV5
-
-sbs -c winscw CLEAN                     # clean emulator files
-sbs REALLYCLEAN                         # delete everything""")
-
-parser.add_option("-a","--sysdefbase",action="store",dest="sys_def_base",
-				help="Root directory for relative paths in the System Definition XML file.")
-
-parser.add_option("-b","--bldinf",action="append",dest="bld_inf_file",
-				help="Build information filename. Multiple -b options can be given.")
-
-parser.add_option("-c","--config",action="append",dest="config_name",
-				help="Configuration name to build. Multiple -c options can be given. The standard configs are all, armv5, armv7, default, tools, tools2 and winscw.")
-
-parser.add_option("--configpath", action="append",dest="config_list",
-				help="Append a list of paths to the default list of XML configuration folders. Use ';' as the separator on Windows, and ':' on Linux. Multiple --configpath options can be given.")
-
-parser.add_option("--check",action="store_true",dest="check",
-				help="Test for the existence of files created by the build, printing the ones which are missing. Do not build anything.")
-
-parser.add_option("--command",action="append",dest="command_file",
-				help="Provide a set of command-line options in a file.")
-
-parser.add_option("-d","--debug",action="store_true",dest="debugoutput",
-				help="Display information useful for debugging.")
-
-parser.add_option("-e","--engine",action="store",dest="make_engine",
-				help="Name of the make engine which runs the build.")
-
-parser.add_option("--export-only",action="store_true",dest="doExportOnly",
-				help="Generate exports only and do not create any make files.")
-
-parser.add_option("-f","--logfile",action="store",dest="logfile",
-				help="Name of the log file, or '-' for stdout.")
-
-parser.add_option("--filters",action="store",dest="filter_list",
-				help="Comma-separated list of names of the filters to use (case sensitive).")
-
-parser.add_option("-i","--ignore-os-detection",action="store_true",dest="ignore_os_detection",
-				help="Disables automatic application of OS variant based upon the OS version detected from each epoc32 tree.")
-
-parser.add_option("-j","--jobs",action="store",dest="number_of_jobs",
-                help="The maximum number of jobs that make should try and run in parallel (on a single machine).")
-
-parser.add_option("-k","--keepgoing",action="store_true",dest="keepgoing",
-				help="Continue building, even if some build commands fail.")
-
-parser.add_option("-l","--layer",action="append",dest="sys_def_layer",
-                help="Build a specific layer in the System Definition XML File. Multiple -l options can be given.")
-
-parser.add_option("-m","--makefile",action="store",dest="makefile",
-				help="Top-level makefile to be created.")
-
-parser.add_option("--mo",action="append",dest="make_option",
-				help="Option that must be passed through to the make engine. Multiple --mo options can be given.")
-
-parser.add_option("-n","--nobuild",action="store_true",dest="nobuild",
-				help="Just create makefiles, do not build anything.")
-
-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("-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.")
-
-parser.add_option("-p","--project",action="append",dest="project_name",
-                help="Build a specific project (mmp or extension) in the given bld.inf file. Multiple -p options can be given.")
-
-parser.add_option("-q","--quiet",action="store_true",dest="quiet",
-				help="Run quietly, not generating output messages.")
-
-parser.add_option("-s","--sysdef",action="store",dest="sys_def_file",
-				help="System Definition XML filename.")
-
-parser.add_option("--source-target",action="append",dest="source_target",
-				help="Build the listed source or resource file in isolation - do not perform any dependent processing. Multiple --source-target options can be given.")
-
-parser.add_option("-t","--tries",action="store",dest="tries",
-				help="How many times to run a command before recording an error. The default is 1. This is useful for builds where transient failures can occur.")
-
-parser.add_option("--toolcheck",action="store",dest="toolcheck",
-			help= \
-				"""Possible values are:
-				  "on"     -  Check the versions of tools that will be used in the build. Use cached results from previous builds to save time. This is the default.
-
-  				  "off"    -  Do not check tool versions whatsoever.
-
-				  "forced" -  Check all tool versions. Don't use cached results.
-			""")
-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)
-					"off" - Parse bld.infs serially 
-				     """)
-
-parser.add_option("-v","--version",action="store_true",dest="version",
-				help="Print the version number and exit.")
-
-parser.add_option("--what",action="store_true",dest="what",
-				help="Print out the names of the files created by the build. Do not build anything.")
-
-def GetArgs(Raptor, args):
-	"Process command line arguments for a Raptor object"
-	return DoRaptor(Raptor,args)
-
-def ReadCommandFile(filename, used):
-	if filename in used:
-		raise IOError("command file '%s' refers to itself" % filename)
-
-	args = []
-	try:
-		file = open(filename, "r")
-		for line in file.readlines():
-			args.extend(line.split())
-		file.close()
-	except:
-		raise IOError("couldn't read command file '%s'" % filename)
-
-	# expand any command files in the options we just read.
-	# making sure we don't get stuck in a loop.
-	usedPlusThis = used[:]
-	usedPlusThis.append(filename)
-	return ExpandCommandOptions(args, usedPlusThis)
-
-def ExpandCommandOptions(args, files = []):
-	"""recursively expand --command options."""
-	expanded = []
-	previousWasOpt = False
-
-	for a in args:
-		if previousWasOpt: # then this one is the filename
-			expanded.extend(ReadCommandFile(a, files))
-			previousWasOpt = False
-			continue
-
-		if a.startswith(miniCommandOption):
-			if "=" in a: # then this is opt=filename
-				opt = a.split("=")
-				if fullCommandOption.startswith(opt[0]):
-					expanded.extend(ReadCommandFile(opt[1], files))
-					continue
-			else: # the next one is the filename
-				if fullCommandOption.startswith(a):
-					previousWasOpt = True
-					continue
-
-		expanded.append(a) # an ordinary arg, nothing to do with command files
-
-	return expanded
-
-def DoRaptor(Raptor, args):
-	"Process raptor arguments"
-	#
-	# This should parse the args list and call methods on
-	# the Raptor object to store the appropriate data.
-
-	# Expand --command=file options, replacing them with the contents of the
-	# command file.
-
-	non_ascii_error = "Non-ASCII character in argument or command file"
-
-	try:
-		expanded_args = ExpandCommandOptions(args)
-		for arg in expanded_args:
-			for c in arg:
-				if ord(c) > 127:
-					Raptor.Error(non_ascii_error)
-					return False
-	except IOError, e:
-		Raptor.Error(str(e))
-		return False
-	except UnicodeDecodeError:
-		Raptor.Error(non_ascii_error)
-		return False
-
-	# parse the full set of arguments
-	(options, leftover_args) = parser.parse_args(expanded_args)
-
-	# the leftover_args are either variable assignments of the form a=b
-	# or target names.
-	regex = re.compile("^(.+)=(.*)$")
-	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.
-	# Attributes and function names can be added easily.
-	# The calling attribute should be the same
-	# as specified when creating the add_option
-	functions = {'config_name': Raptor.AddConfigName,
-				 'config_list':Raptor.AddConfigList,
-				 'sys_def_file' : Raptor.SetSysDefFile,
-				 'sys_def_base' : Raptor.SetSysDefBase,
-				 'sys_def_layer' : Raptor.AddSysDefLayer,
-				 'sys_def_order_layers' : Raptor.SetSysDefOrderLayers,
-				 'bld_inf_file' : Raptor.AddBuildInfoFile,
-				 'logfile' : Raptor.SetLogFileName,
-				 'makefile' : Raptor.SetTopMakefile,
-				 'quiet' : Raptor.RunQuietly,
-				 'debugoutput' : Raptor.SetDebugOutput,
-				 'doExportOnly' : Raptor.SetExportOnly,
-				 'keepgoing': Raptor.SetKeepGoing,
-				 'nobuild' : Raptor.SetNoBuild,
-				 'make_engine': Raptor.SetMakeEngine,
-				 'make_option': Raptor.AddMakeOption,
-				 'noDependInclude': Raptor.SetNoDependInclude,
-				 'number_of_jobs': Raptor.SetJobs,
-				 'project_name' :  Raptor.AddProject,
-				 'filter_list' : Raptor.FilterList,
-				 'ignore_os_detection': Raptor.IgnoreOsDetection,
-				 'check' :  Raptor.SetCheck,
-				 'what' :  Raptor.SetWhat,
-				 'tries' : Raptor.SetTries,
-				 'toolcheck' : Raptor.SetToolCheck,
-				 'source_target' : Raptor.AddSourceTarget,
-				 'command_file' : CommandFile,
-				'parallel_parsing' : Raptor.SetParallelParsing,
-			 	'version' : Raptor.PrintVersion
-				}
-
-	# Check if Quiet mode has been specified (otherwise we will make noise)
-	if parser.values.quiet:
-		Raptor.RunQuietly(True)
-
-	# some options imply that Raptor should exit immediately (e.g. --version)
-	keepGoing = True
-
-	if parser.values.version:
-		keepGoing = False
-
-	# Parse through the command line arguments passed, and call the
-	# corresponding function with the correct parameter.
-	# Since options is a OptParse.Value instance, it can be iterated over.
-	# This implementation helps avoid lengthy if-else statements
-	for opt in options.__dict__.items():
-		call_function = functions[str(opt[0])]
-		values = opt[1]
-		if not values:
-			pass
-		else:
-			if type(values) == types.ListType: # Check if the argument type is a list or a string. If list, then iterate through it and call the functions
-				for val in values:
-					keepGoing = (call_function(val) and keepGoing)
-			else:
-					keepGoing = (call_function(values) and keepGoing)
-
-	return keepGoing
-
-def CommandFile(file):
-	"this should never be called because we expand --command in this module."
-	print raptor.name + ": error: command file '%s' was not expanded" % file
-	return False
-
-
-
-
-# end of the raptor_cli module
-
-
+#
+# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# raptor_cli module
+# This module represents a Command Line Interpreter (CLI) for Raptor.
+# The interface with Raptor is the GetArgs() function, which is called
+# by a raptor.Raptor object.
+#
+
+import re
+import types
+import raptor
+import os
+import sys
+import tempfile
+from raptor_utilities import getOSPlatform
+
+from optparse import OptionParser # for parsing command line parameters
+
+fullCommandOption = "--command"
+miniCommandOption = "--co"  # update this if another "co" option is added
+
+# raptor_cli module attributes
+
+parser = OptionParser(prog = raptor.name,
+					  usage = """%prog [--help] [options] [variable=value] [target] ...
+
+Targets:
+
+BITMAP         Create bitmap files
+CLEAN          Remove built files and intermediates, but not exported files
+CLEANEXPORT    Remove exported files
+EXPORT         Copy exported files to destinations
+FINAL          Allow extension makefiles to execute final commands
+FREEZE         Freeze exported functions in a .DEF file
+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
+ROMFILE        Create an IBY file to be included in a ROM
+TARGET         Create main executables
+WHAT           List all releaseable targets
+
+Examples:
+
+sbs -b my/group/bld.inf -c armv5        # build my component for target ARMV5
+sbs -b my/group/bld.inf -c armv5.test   # build my tests for target ARMV5
+
+sbs -c winscw CLEAN                     # clean emulator files
+sbs REALLYCLEAN                         # delete everything""")
+
+parser.add_option("-a","--sysdefbase",action="store",dest="sys_def_base",
+				help="Root directory for relative paths in the System Definition XML file.")
+
+parser.add_option("-b","--bldinf",action="append",dest="bld_inf_file",
+				help="Build information filename. Multiple -b options can be given.")
+
+parser.add_option("-c","--config",action="append",dest="config_name",
+				help="Configuration name to build. Multiple -c options can be given. The standard configs are all, armv5, armv7, default, tools, tools2 and winscw.")
+
+parser.add_option("--configpath", action="append",dest="config_list",
+				help="Append a list of paths to the default list of XML configuration folders. Use ';' as the separator on Windows, and ':' on Linux. Multiple --configpath options can be given.")
+
+parser.add_option("--check",action="store_true",dest="check",
+				help="Test for the existence of files created by the build, printing the ones which are missing. Do not build anything.")
+
+parser.add_option("--command",action="append",dest="command_file",
+				help="Provide a set of command-line options in a file.")
+
+parser.add_option("-d","--debug",action="store_true",dest="debugoutput",
+				help="Display information useful for debugging.")
+
+parser.add_option("-e","--engine",action="store",dest="make_engine",
+				help="Name of the make engine which runs the build.")
+
+parser.add_option("--export-only",action="store_true",dest="doExportOnly",
+				help="Generate exports only and do not create any make files.")
+
+parser.add_option("-f","--logfile",action="store",dest="logfile",
+				help="Name of the log file, or '-' for stdout.")
+
+parser.add_option("--filters",action="store",dest="filter_list",
+				help="Comma-separated list of names of the filters to use (case sensitive).")
+
+parser.add_option("-i","--ignore-os-detection",action="store_true",dest="ignore_os_detection",
+				help="Disables automatic application of OS variant based upon the OS version detected from each epoc32 tree.")
+
+parser.add_option("-j","--jobs",action="store",dest="number_of_jobs",
+                help="The maximum number of jobs that make should try and run in parallel (on a single machine).")
+
+parser.add_option("-k","--keepgoing",action="store_true",dest="keepgoing",
+				help="Continue building, even if some build commands fail.")
+
+parser.add_option("-l","--layer",action="append",dest="sys_def_layer",
+                help="Build a specific layer in the System Definition XML File. Multiple -l options can be given.")
+
+parser.add_option("-m","--makefile",action="store",dest="makefile",
+				help="Top-level makefile to be created.")
+
+parser.add_option("--mo",action="append",dest="make_option",
+				help="Option that must be passed through to the make engine. Multiple --mo options can be given.")
+
+parser.add_option("-n","--nobuild",action="store_true",dest="nobuild",
+				help="Just create makefiles, do not build anything.")
+
+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("-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.")
+
+parser.add_option("-p","--project",action="append",dest="project_name",
+                help="Build a specific project (mmp or extension) in the given bld.inf file. Multiple -p options can be given.")
+
+parser.add_option("-q","--quiet",action="store_true",dest="quiet",
+				help="Run quietly, not generating output messages.")
+
+parser.add_option("-s","--sysdef",action="store",dest="sys_def_file",
+				help="System Definition XML filename.")
+
+parser.add_option("--source-target",action="append",dest="source_target",
+				help="Build the listed source or resource file in isolation - do not perform any dependent processing. Multiple --source-target options can be given.")
+
+parser.add_option("-t","--tries",action="store",dest="tries",
+				help="How many times to run a command before recording an error. The default is 1. This is useful for builds where transient failures can occur.")
+
+parser.add_option("--toolcheck",action="store",dest="toolcheck",
+			help= \
+				"""Possible values are:
+				  "on"     -  Check the versions of tools that will be used in the build. Use cached results from previous builds to save time. This is the default.
+
+  				  "off"    -  Do not check tool versions whatsoever.
+
+				  "forced" -  Check all tool versions. Don't use cached results.
+			""")
+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)
+					"off" - Parse bld.infs serially 
+				     """)
+
+parser.add_option("-v","--version",action="store_true",dest="version",
+				help="Print the version number and exit.")
+
+parser.add_option("--what",action="store_true",dest="what",
+				help="Print out the names of the files created by the build. Do not build anything.")
+
+def GetArgs(Raptor, args):
+	"Process command line arguments for a Raptor object"
+	return DoRaptor(Raptor,args)
+
+def ReadCommandFile(filename, used):
+	if filename in used:
+		raise IOError("command file '%s' refers to itself" % filename)
+
+	args = []
+	try:
+		file = open(filename, "r")
+		for line in file.readlines():
+			args.extend(line.split())
+		file.close()
+	except:
+		raise IOError("couldn't read command file '%s'" % filename)
+
+	# expand any command files in the options we just read.
+	# making sure we don't get stuck in a loop.
+	usedPlusThis = used[:]
+	usedPlusThis.append(filename)
+	return ExpandCommandOptions(args, usedPlusThis)
+
+def ExpandCommandOptions(args, files = []):
+	"""recursively expand --command options."""
+	expanded = []
+	previousWasOpt = False
+
+	for a in args:
+		if previousWasOpt: # then this one is the filename
+			expanded.extend(ReadCommandFile(a, files))
+			previousWasOpt = False
+			continue
+
+		if a.startswith(miniCommandOption):
+			if "=" in a: # then this is opt=filename
+				opt = a.split("=")
+				if fullCommandOption.startswith(opt[0]):
+					expanded.extend(ReadCommandFile(opt[1], files))
+					continue
+			else: # the next one is the filename
+				if fullCommandOption.startswith(a):
+					previousWasOpt = True
+					continue
+
+		expanded.append(a) # an ordinary arg, nothing to do with command files
+
+	return expanded
+
+def DoRaptor(Raptor, args):
+	"Process raptor arguments"
+	#
+	# This should parse the args list and call methods on
+	# the Raptor object to store the appropriate data.
+
+	# Expand --command=file options, replacing them with the contents of the
+	# command file.
+
+	non_ascii_error = "Non-ASCII character in argument or command file"
+
+	try:
+		expanded_args = ExpandCommandOptions(args)
+		for arg in expanded_args:
+			for c in arg:
+				if ord(c) > 127:
+					Raptor.Error(non_ascii_error)
+					return False
+	except IOError, e:
+		Raptor.Error(str(e))
+		return False
+	except UnicodeDecodeError:
+		Raptor.Error(non_ascii_error)
+		return False
+
+	# parse the full set of arguments
+	(options, leftover_args) = parser.parse_args(expanded_args)
+
+	# the leftover_args are either variable assignments of the form a=b
+	# or target names.
+	regex = re.compile("^(.+)=(.*)$")
+	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.
+	# Attributes and function names can be added easily.
+	# The calling attribute should be the same
+	# as specified when creating the add_option
+	functions = {'config_name': Raptor.AddConfigName,
+				 'config_list':Raptor.AddConfigList,
+				 'sys_def_file' : Raptor.SetSysDefFile,
+				 'sys_def_base' : Raptor.SetSysDefBase,
+				 'sys_def_layer' : Raptor.AddSysDefLayer,
+				 'sys_def_order_layers' : Raptor.SetSysDefOrderLayers,
+				 'bld_inf_file' : Raptor.AddBuildInfoFile,
+				 'logfile' : Raptor.SetLogFileName,
+				 'makefile' : Raptor.SetTopMakefile,
+				 'quiet' : Raptor.RunQuietly,
+				 'debugoutput' : Raptor.SetDebugOutput,
+				 'doExportOnly' : Raptor.SetExportOnly,
+				 'keepgoing': Raptor.SetKeepGoing,
+				 'nobuild' : Raptor.SetNoBuild,
+				 'make_engine': Raptor.SetMakeEngine,
+				 'make_option': Raptor.AddMakeOption,
+				 'noDependInclude': Raptor.SetNoDependInclude,
+				 'number_of_jobs': Raptor.SetJobs,
+				 'project_name' :  Raptor.AddProject,
+				 'filter_list' : Raptor.FilterList,
+				 'ignore_os_detection': Raptor.IgnoreOsDetection,
+				 'check' :  Raptor.SetCheck,
+				 'what' :  Raptor.SetWhat,
+				 'tries' : Raptor.SetTries,
+				 'toolcheck' : Raptor.SetToolCheck,
+				 'source_target' : Raptor.AddSourceTarget,
+				 'command_file' : CommandFile,
+				'parallel_parsing' : Raptor.SetParallelParsing,
+			 	'version' : Raptor.PrintVersion
+				}
+
+	# Check if Quiet mode has been specified (otherwise we will make noise)
+	if parser.values.quiet:
+		Raptor.RunQuietly(True)
+
+	# some options imply that Raptor should exit immediately (e.g. --version)
+	keepGoing = True
+
+	if parser.values.version:
+		keepGoing = False
+
+	# Parse through the command line arguments passed, and call the
+	# corresponding function with the correct parameter.
+	# Since options is a OptParse.Value instance, it can be iterated over.
+	# This implementation helps avoid lengthy if-else statements
+	for opt in options.__dict__.items():
+		call_function = functions[str(opt[0])]
+		values = opt[1]
+		if not values:
+			pass
+		else:
+			if type(values) == types.ListType: # Check if the argument type is a list or a string. If list, then iterate through it and call the functions
+				for val in values:
+					keepGoing = (call_function(val) and keepGoing)
+			else:
+					keepGoing = (call_function(values) and keepGoing)
+
+	return keepGoing
+
+def CommandFile(file):
+	"this should never be called because we expand --command in this module."
+	print raptor.name + ": error: command file '%s' was not expanded" % file
+	return False
+
+
+
+
+# end of the raptor_cli module
+
+
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/python/raptor_data.py
--- a/sbsv2/raptor/python/raptor_data.py	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/python/raptor_data.py	Mon Nov 16 09:46:46 2009 +0000
@@ -1,1489 +1,1489 @@
-#
-# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# raptor_data module
-# This module contains the classes that make up the Raptor Data Model.
-#
-
-import copy
-import generic_path
-import os
-import hashlib
-import raptor_utilities
-import re
-import types
-import sys
-import subprocess
-from tempfile import gettempdir
-from time import time, clock
-
-
-
-# What host platforms we recognise
-# This allows us to tie some variants to one host platform and some to another
-class HostPlatform(object):
-	""" List the host platforms on which we can build.  Allow configuration
- 	    files to specify different information based on that.
-	"""
-	hostplatforms = ["win32", "win64", "linux2"]
-	hostplatform = sys.platform
-
-	@classmethod
-	def IsKnown(cls, platformpattern):
-		"Does the parameter match the name of a known platform "
-		hpnre = re.compile(platformpattern, re.I)
-		for hp in cls.hostplatforms:
-			if hpnre.match(hp):
-				return True
-		return False
-
-	@classmethod
-	def IsHost(cls, platformpattern):
-		""" Does the parameter match the name of the
-		    platform that we're executing on? """
-		ppre = re.compile(platformpattern, re.I)
-		if ppre.match(cls.hostplatform):
-			return True
-		return False
-
-
-# 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)))
-
-
-# raptor_data module classes
-
-class Model(object):
-	"Base class for data-model objects"
-
-	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
-
-
-	def SetSourceFile(self, filename):
-		self.source = filename
-
-
-	def SetProperty(self, name, value):
-		raise InvalidPropertyError()
-
-
-	def AddChild(self, child):
-		raise InvalidChildError()
-
-
-	def DebugPrint(self, prefix = ""):
-		if self.owner:
-			self.owner.Debug("%s", prefix)
-
-	def Valid(self):
-		return False
-
-	def IsApplicable(self):
-		"This variant may be caused to only apply when used on a particular host build platform"
-		if self.host is None:
-			return True
-
-		if HostPlatform.IsHost(self.host):
-			return True
-
-		return False
-
-
-class InvalidPropertyError(Exception):
-	pass
-
-class InvalidChildError(Exception):
-	pass
-
-class BadReferenceError(Exception):
-	pass
-
-
-class Reference(Model):
-	"Base class for data-model reference objects"
-
-	def __init__(self, ref = None):
-		Model.__init__(self)
-		self.ref = ref
-		self.modifiers = []
-
-	def SetProperty(self, name, value):
-		if name == "ref":
-			self.ref = value
-		elif name == "mod":
-			self.modifiers = value.split(".")
-		else:
-			raise InvalidPropertyError()
-
-	def Resolve(self):
-		raise BadReferenceError()
-
-	def GetModifiers(self):
-		cache = self.owner.cache
-		return [ cache.FindNamedVariant(m) for m in self.modifiers ]
-
-	def Valid(self):
-		return self.ref
-
-
-class VariantContainer(Model):
-
-	def __init__(self):
-		Model.__init__(self)	# base class constructor
-		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 AddVariant(self, variant):
-		if type(variant) is types.StringTypes:
-			variant = VariantRef(variant)
-
-
-		# Only add the variant if it's not in the list
-		# already
-		if not variant in self.variants:
-			self.variants.append(variant)
-
-	def GetVariants(self):
-		# resolve any VariantRef objects into Variant objects
-		for i,var in enumerate(self.variants):
-			if isinstance(var, Reference):
-				try:
-					self.variants[i] = var.Resolve()
-
-				except BadReferenceError:
-					self.owner.Error("Missing variant '%s'", var.ref)
-
-		return self.variants
-
-
-class Interface(Model):
-
-	def __init__(self, name = None):
-		Model.__init__(self)	# base class constructor
-		self.name = name
-		self.flm = None
-		self.abstract = False
-		self.extends = None
-		self.params = []
-		self.paramgroups = []
-
-	def DebugPrint(self, prefix = ""):
-		self.owner.Debug("%s", prefix, self.name)
-		self.owner.Debug("%s...", prefix)
-		self.owner.Debug("%s", prefix)
-
-	def FindParent(self):
-		try:
-			return self.owner.cache.FindNamedInterface(self.extends, self.cacheID)
-		except KeyError:
-			raise BadReferenceError("Cannot extend interface because it cannot be found: "+str(self.extends))
-
-	def GetParams(self):
-		if self.extends != None:
-			parent = self.FindParent()
-
-			# 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():
-				if not p.name in names:
-					pp.append(p)
-
-			# list parent parameters first then ours
-			pp.extend(self.params)
-			return pp
-
-		return self.params
-
-	def GetParamGroups(self):
-		if self.extends != None:
-			parent = self.FindParent()
-
-			# 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():
-				if not g.pattern in patterns:
-					self.paramgroups.append(g)
-
-		return self.paramgroups
-
-
-	def GetFLMIncludePath(self):
-		"absolute path to the FLM"
-
-		if self.flm == None:
-			if self.extends != None:
-				parent = self.FindParent()
-
-				return parent.GetFLMIncludePath()
-			else:
-				raise InvalidPropertyError()
-
-		if not os.path.isabs(self.flm):
-			self.flm = os.path.join(os.path.dirname(self.source), self.flm)
-
-		return generic_path.Path(self.flm)
-
-
-	def SetProperty(self, name, value):
-		if name == "name":
-			self.name = value
-		elif name == "flm":
-			self.flm = value
-		elif name == "abstract":
-			self.abstract = (value == "true")
-		elif name == "extends":
-			self.extends = value
-		else:
-			raise InvalidPropertyError()
-
-
-	def AddChild(self, child):
-		if isinstance(child, Parameter):
-			self.AddParameter(child)
-		elif isinstance(child, ParameterGroup):
-			self.AddParameterGroup(child)
-		else:
-			raise InvalidChildError()
-
-
-	def AddParameter(self, parameter):
-		self.params.append(parameter)
-
-	def AddParameterGroup(self, parametergroup):
-		self.paramgroups.append(parametergroup)
-
-	def Valid(self):
-		return (self.name != None)
-
-
-class InterfaceRef(Reference):
-
-	def DebugPrint(self, prefix = ""):
-		self.owner.Debug("%s", prefix, self.ref)
-
-	def Resolve(self):
-		try:
-			return self.owner.cache.FindNamedInterface(self.ref, self.cacheID)
-		except KeyError:
-			raise BadReferenceError()
-
-
-class Specification(VariantContainer):
-
-	def __init__(self, name = "", type = ""):
-		VariantContainer.__init__(self)	# base class constructor
-		self.name = name
-		self.type = type
-		self.interface = None
-		self.childSpecs = []
-		self.parentSpec = None
-
-
-	def DebugPrint(self, prefix = ""):
-		self.owner.Debug("%s", prefix, self.name)
-		if self.interface:
-			self.interface.DebugPrint(prefix + self.indent)
-		VariantContainer.DebugPrint(self, prefix + self.indent)
-		for c in self.childSpecs:
-			c.DebugPrint(prefix + self.indent)
-		self.owner.Debug("%s", 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)
-
-
-	def SetProperty(self, name, value):
-		if name == "name":
-			self.name = value
-		else:
-			raise InvalidPropertyError()
-
-
-	def Configure(self, config):
-		# configure all the children (some may be Filters or parents of)
-		for spec in self.GetChildSpecs():
-			spec.Configure(config)
-
-
-	def HasInterface(self):
-		return self.interface != None
-
-
-	def SetInterface(self, interface):
-		if isinstance(interface, Interface) \
-		or isinstance(interface, InterfaceRef):
-			self.interface = interface
-		else:
-			self.interface = InterfaceRef(interface)
-
-
-	def GetInterface(self):
-		"""return the Interface (fetching from the cache if it was a ref)
-		may return None"""
-
-		if self.interface == None \
-		or isinstance(self.interface, Interface):
-			return self.interface
-
-		if isinstance(self.interface, InterfaceRef):
-			try:
-				self.interface = self.interface.Resolve()
-				return self.interface
-
-			except BadReferenceError:
-				self.owner.Error("Missing interface %s", self.interface.ref)
-				return None
-
-
-	def AddChild(self, child):
-		if isinstance(child, Specification):
-			self.AddChildSpecification(child)
-		elif isinstance(child, Interface) \
-		  or isinstance(child, InterfaceRef):
-			self.SetInterface(child)
-		elif isinstance(child, Variant) \
-		  or isinstance(child, VariantRef):
-			self.AddVariant(child)
-		else:
-			raise InvalidChildError()
-
-
-	def AddChildSpecification(self, child):
-		child.SetParentSpec(self)
-		self.childSpecs.append(child)
-
-
-	def SetParentSpec(self, parent):
-		self.parentSpec = parent
-
-
-	def GetChildSpecs(self):
-		return self.childSpecs
-
-
-	def Valid(self):
-		return True
-
-
-	def GetAllVariantsRecursively(self):
-		"""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,
-		variants-in-self].
-
-		Note that the function recurses through parent *Specifications*, not through
-		the variants themselves.
-		"""
-		if self.parentSpec:
-			variants = self.parentSpec.GetAllVariantsRecursively()
-		else:
-			variants = []
-
-		variants.extend( self.GetVariants() )
-
-		return variants
-
-
-class Filter(Specification):
-	"""A Filter is two Specification nodes and a True/False switch.
-
-	Filter extends Specification to have two nodes, only one of
-	which can be active at any time. Which node is active is determined
-	when the Configure method is called after setting up a Condition.
-
-	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
-		self.isTrue = True
-		self.configNames = set()            #
-		self.variableNames = set()          # TO DO: Condition class
-		self.variableValues = {}            #
-
-	def DebugPrint(self, prefix = ""):
-		self.owner.Debug("%s", prefix, self.name)
-		self.owner.Debug("%s ", prefix, " | ".join(self.configNames))
-		Specification.DebugPrint(self, prefix + self.indent)
-		self.owner.Debug("%s ", prefix)
-		self.owner.Debug("%s ", prefix)
-		self.Else.DebugPrint(prefix + self.indent)
-		self.owner.Debug("%s ", prefix)
-		self.owner.Debug("%s", prefix)
-
-
-	def SetConfigCondition(self, configName):
-		self.configNames = set([configName])
-
-	def AddConfigCondition(self, configName):
-		self.configNames.add(configName)
-
-
-	def SetVariableCondition(self, variableName, variableValues):
-		self.variableNames = set([variableName])
-		if type(variableValues) == types.ListType:
-			self.variableValues[variableName] = set(variableValues)
-		else:
-			self.variableValues[variableName] = set([variableValues])
-
-	def AddVariableCondition(self, variableName, variableValues):
-		self.variableNames.add(variableName)
-		if type(variableValues) == types.ListType:
-			self.variableValues[variableName] = set(variableValues)
-		else:
-			self.variableValues[variableName] = set([variableValues])
-
-
-	def Configure(self, buildUnit):
-		self.isTrue = False
-
-		if buildUnit.name in self.configNames:
-			self.isTrue = True
-		elif self.variableNames:
-			evaluator = self.owner.GetEvaluator(self.parentSpec, buildUnit)
-
-			for variableName in self.variableNames:
-				variableValue = evaluator.Get(variableName)
-
-				if variableValue in self.variableValues[variableName]:
-					self.isTrue = True
-					break
-
-		# 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)
-
-
-	def HasInterface(self):
-		if self.isTrue:
-			return Specification.HasInterface(self)
-		else:
-			return self.Else.HasInterface()
-
-
-	def GetInterface(self):
-		if self.isTrue:
-			return Specification.GetInterface(self)
-		else:
-			return self.Else.GetInterface()
-
-
-	def GetVariants(self):
-		if self.isTrue:
-			return Specification.GetVariants(self)
-		else:
-			return self.Else.GetVariants()
-
-
-	def SetParentSpec(self, parent):
-		# base class method
-		Specification.SetParentSpec(self, parent)
-		# same for Else part
-		self.Else.SetParentSpec(parent)
-
-
-	def GetChildSpecs(self):
-		if self.isTrue:
-			return Specification.GetChildSpecs(self)
-		else:
-			return self.Else.GetChildSpecs()
-
-
-class Parameter(Model):
-
-	def __init__(self, name = None, default = None):
-		Model.__init__(self)	# base class constructor
-		self.name = name
-		self.default = default
-
-
-	def SetProperty(self, name, value):
-		if name == "name":
-			self.name = value
-		elif name == "default":
-			self.default = value
-		else:
-			raise InvalidPropertyError()
-
-
-	def Valid(self):
-		return (self.name != None)
-
-class ParameterGroup(Model):
-	"""A group of Parameters specified in an interface by a regexp"""
-	def __init__(self, pattern = None, default = None):
-		Model.__init__(self)	# base class constructor
-		self.pattern = pattern
-
-		self.patternre = None
-		if pattern:
-			try:
-				self.patternre = re.compile(pattern)
-			except TypeError:
-				pass
-		self.default = default
-
-
-	def SetProperty(self, pattern, value):
-		if pattern == "pattern":
-			self.pattern = value
-			self.patternre = re.compile(value)
-		elif pattern == "default":
-			self.default = value
-		else:
-			raise InvalidPropertyError()
-
-
-	def Valid(self):
-		return (self.pattern != None and self.patternre != None)
-
-
-class Operation(Model):
-	"Base class for variant operations"
-	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')
-
-	def __init__(self, name = None, value = None, separator = " "):
-		Operation.__init__(self)	# base class constructor
-		self.name = name
-		self.value = value
-		self.separator = separator
-
-
-	def DebugPrint(self, prefix = ""):
-		attributes = "name='" + self.name + "' value='" + self.value + "' separator='" + self.separator + "'"
-		self.owner.Debug("%s", prefix, attributes)
-
-
-	def Apply(self, oldValue):
-		if len(oldValue) > 0:
-			if len(self.value) > 0:
-				return oldValue + self.separator + self.value
-			else:
-				return oldValue
-		else:
-			return self.value
-
-
-	def SetProperty(self, name, value):
-		if name == "name":
-			self.name = value
-		elif name == "value":
-			self.value = value
-		elif name == "separator":
-			self.separator = value
-		else:
-			raise InvalidPropertyError()
-
-
-	def Valid(self):
-		return (self.name != None and self.value != None)
-
-
-class Prepend(Operation):
-	def __init__(self, name = None, value = None, separator = " "):
-		Operation.__init__(self)	# base class constructor
-		self.name = name
-		self.value = value
-		self.separator = separator
-
-
-	def DebugPrint(self, prefix = ""):
-		attributes = "name='" + self.name + "' value='" + self.value + "' separator='" + self.separator + "'"
-		self.owner.Debug("%s", prefix, attributes)
-
-
-	def Apply(self, oldValue):
-		if len(oldValue) > 0:
-			if len(self.value) > 0:
-				return self.value + self.separator + oldValue
-			else:
-				return oldValue
-		else:
-			return self.value
-
-
-	def SetProperty(self, name, value):
-		if name == "name":
-			self.name = value
-		elif name == "value":
-			self.value = value
-		elif name == "separator":
-			self.separator = value
-		else:
-			raise InvalidPropertyError()
-
-
-	def Valid(self):
-		return (self.name != None and self.value != None)
-
-
-class Set(Operation):
-	"""implementation of  operation"""
-	__slots__ = ('name','value', 'type', 'versionCommand', 'versionResult', 'owner')
-
-	def __init__(self, name = None, value = "", type = ""):
-		Operation.__init__(self)	# base class constructor
-		self.name = name
-		self.value = value
-		self.type = type
-		self.versionCommand = ""
-		self.versionResult = ""
-
-
-	def DebugPrint(self, prefix = ""):
-		attributes = "name='" + self.name + "' value='" + self.value + "' type='" + self.type + "'"
-		if type == "tool":
-			attributes += " versionCommand='" + self.versionCommand + "' versionResult='" + self.versionResult
-
-		self.owner.Debug("%s", prefix, attributes)
-
-
-	def Apply(self, oldValue):
-		return self.value
-
-
-	def SetProperty(self, name, value):
-		if name == "name":
-			self.name = value
-		elif name == "value":
-			self.value = value
-		elif name == "type":
-			self.type = value
-		elif name == "versionCommand":
-			self.versionCommand = value
-		elif name == "versionResult":
-			self.versionResult = value
-		elif name == "host":
-			if HostPlatform.IsKnown(value):
-				self.host = value
-		else:
-			raise InvalidPropertyError()
-
-
-	def Valid(self):
-		return (self.name != None and self.value != None)
-
-
-class Env(Set):
-	"""implementation of  operator"""
-
-	def __init__(self, name = None, default = None, type = ""):
-		Set.__init__(self, name, "", type)	# base class constructor
-		self.default = default
-
-
-	def DebugPrint(self, prefix = ""):
-		attributes = "name='" + self.name + "' type='" + self.type + "'"
-		if default != None:
-			attributes += " default='" + self.default + "'"
-
-		if type == "tool":
-			attributes += " versionCommand='" + self.versionCommand + "' versionResult='" + self.versionResult + "'"
-
-		self.owner.Debug("%s", prefix, 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
-			# 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
-		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
-
-		return value
-
-
-	def SetProperty(self, name, value):
-		if name == "default":
-			self.default = value
-		else:
-			Set.SetProperty(self, name, value)
-
-
-	def Valid(self):
-		return (self.name != None)
-
-
-class BuildUnit(object):
-	"Represents an individual buildable unit."
-
-	def __init__(self, name, variants):
-		self.name = name
-		
-		# A list of Variant objects.
-		self.variants = variants
-
-		# Cache for the variant operations implied by this BuildUnit.
-		self.operations = []
-		self.variantKey = ""
-
-	def GetOperations(self):
-		"""Return all operations related to this BuildUnit.
-		
-		The result is cached, and so will only be computed once per BuildUnit.
-		"""
-		key = '.'.join([x.name for x in self.variants])
-		if self.variantKey != key:
-			self.variantKey = key
-			for v in self.variants:
-				self.operations.extend( v.GetAllOperationsRecursively() )
-
-		return self.operations
-
-class Config(object):
-	"""Abstract type representing an argument to the '-c' option.
-
-	The fundamental property of a Config is that it can generate one or more
-	BuildUnits.
-	"""
-
-	def __init__(self):
-		self.modifiers = []
-
-	def AddModifier(self, variant):
-		self.modifiers.append(variant)
-
-	def ClearModifiers(self):
-		self.modifiers = []
-
-	def GenerateBuildUnits(self):
-		"""Returns a list of BuildUnits.
-
-		This function must be overridden by derived classes.
-		"""
-		raise NotImplementedError()
-
-
-class Variant(Model, Config):
-
-	def __init__(self, name = ""):
-		Model.__init__(self)
-		Config.__init__(self)
-		self.name = name
-
-		# Operations defined inside this variant.
-		self.ops = []
-
-		# The name of our parent variant, if any.
-		self.extends = ""
-
-		# Any variant references used inside this variant.
-		self.variantRefs = []
-
-		self.allOperations = []
-
-	def SetProperty(self, name, value):
-		if name == "name":
-			self.name = value
-		elif name == "host":
-			if HostPlatform.IsKnown(value):
-				self.host = value
-		elif name == "extends":
-			self.extends = value
-		else:
-			raise InvalidPropertyError()
-
-	def AddChild(self, child):
-		if isinstance(child, Operation):
-			self.ops.append(child)
-		elif isinstance(child, VariantRef):
-			self.variantRefs.append(child)
-		else:
-			raise InvalidChildError()
-
-	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):
-		"""Returns a list of all operations in this variant.
-
-		The list elements are themselves lists; the overall structure of the
-		returned value is:
-
-		[ [ops-from-parent],[ops-from-varRefs], [ops-in-self] ]
-		"""
-
-		if not self.allOperations:
-			if self.extends:
-				parent = self.owner.cache.FindNamedVariant(self.extends)
-				self.allOperations.extend( parent.GetAllOperationsRecursively() )
-			for r in self.variantRefs:
-				for v in [ r.Resolve() ] + r.GetModifiers():
-					self.allOperations.extend( v.GetAllOperationsRecursively() )
-			self.allOperations.append(self.ops)
-
-		return self.allOperations
-
-	def GenerateBuildUnits(self):
-
-		name = self.name
-		vars = [self]
-
-		for m in self.modifiers:
-			name = name + "." + m.name
-			vars.append(m)
-
-		return [ BuildUnit(name, vars) ]
-
-	def DebugPrint(self, prefix = ""):
-
-		self.owner.Debug("%s", prefix, self.name, self.extends)
-		for op in self.ops:
-			op.DebugPrint(prefix + self.indent)
-
-		self.owner.Debug("%s", prefix)
-
-
-class VariantRef(Reference):
-
-	def __init__(self, ref=None):
-		Reference.__init__(self, ref)
-
-	def DebugPrint(self, prefix = ""):
-		self.owner.Debug("%s", prefix, self.ref)
-
-	def Resolve(self):
-		try:
-			return self.owner.cache.FindNamedVariant(self.ref)
-		except KeyError:
-			raise BadReferenceError(self.ref)
-
-
-class Alias(Model, Config):
-
-	def __init__(self, name=""):
-		Model.__init__(self)
-		Config.__init__(self)
-		self.name = name
-		self.meaning = ""
-		self.varRefs = []
-		self.variants = []
-
-	def DebugPrint(self, prefix = ""):
-		self.owner.Debug("%s", prefix, self.name, self.meaning)
-
-	def SetProperty(self, key, val):
-		if key == "name":
-			self.name = val
-		elif key == "meaning":
-			self.meaning = val
-
-			for u in val.split("."):
-				self.varRefs.append( VariantRef(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):
-		if not self.variants:
-			for r in self.varRefs:
-				try:
-					self.variants.append( r.Resolve() )
-				except BadReferenceError:
-					self.owner.Error("Missing variant '%s'", r.ref)
-
-		name = self.name
-
-		for v in self.modifiers:
-			name = name + "." + v.name
-
-		return [ BuildUnit(name, self.variants + self.modifiers) ]
-
-
-class AliasRef(Reference):
-
-	def __init__(self, ref=None):
-		Reference.__init__(self, ref)
-
-	def DebugPrint(self, prefix = ""):
-		self.owner.Debug("%s", prefix, self.ref)
-
-	def Resolve(self):
-		try:
-			return self.owner.cache.FindNamedAlias(self.ref)
-		except KeyError:
-			raise BadReferenceError(self.ref)
-
-
-class Group(Model, Config):
-	def __init__(self, name=""):
-		Model.__init__(self)
-		Config.__init__(self)
-		self.name = name
-		self.childRefs = []
-
-	def SetProperty(self, key, val):
-		if key == "name":
-			self.name = val
-		else:
-			raise InvalidPropertyError()
-
-	def AddChild(self, child):
-		if isinstance( child, (VariantRef,AliasRef,GroupRef) ):
-			self.childRefs.append(child)
-		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("", prefix, self.name)
-
-		for r in self.childRefs:
-			r.DebugPrint(prefix + self.indent)
-
-		self.owner.Debug("%s", prefix)
-
-	def GenerateBuildUnits(self):
-
-		units = []
-
-		for r in self.childRefs:
-			refMods = r.GetModifiers()
-
-			try:
-				obj = r.Resolve()
-			except BadReferenceError:
-				self.owner.Error("Missing variant '%s'", r.ref)
-			else:
-				obj.ClearModifiers()
-
-				for m in refMods + self.modifiers:
-					obj.AddModifier(m)
-
-				units.extend( obj.GenerateBuildUnits() )
-
-		return units
-
-
-class GroupRef(Reference):
-
-	def __init__(self, ref=None):
-		Reference.__init__(self, ref)
-
-	def DebugPrint(self, prefix = ""):
-		mod = ".".join(self.modifiers)
-		self.owner.Debug("%s", prefix, self.ref, mod)
-
-	def Resolve(self):
-		try:
-			return self.owner.cache.FindNamedGroup(self.ref)
-		except KeyError:
-			raise BadReferenceError(self.ref)
-
-class Tool(object):
-	"""Represents a tool that might be used by raptor e.g. a compiler"""
-
-	# For use in dealing with tools that return non-ascii version strings.
-	nonascii = ""
-	identity_chartable = chr(0)
-	for c in xrange(1,128):
-		identity_chartable += chr(c)
-	for c in xrange(128,256):
-		nonascii += chr(c)
-		identity_chartable += " "
-
-	def __init__(self, name, command, versioncommand, versionresult, id="", log = raptor_utilities.nulllog):
-		self.name = name
-		self.command = command
-		self.versioncommand = versioncommand
-		self.versionresult = versionresult
-		self.id = id # what config this is from - used in debug messages
-		self.date = None
-
-
-		# Assume the tool is unavailable or the wrong
-		# version until someone proves that it's OK
-		self.valid = False
-
-		self.log=log
-
-	def expand(self, toolset):
-		self.versioncommand = toolset.ExpandAll(self.versioncommand)
-		self.versionresult  = toolset.ExpandAll(self.versionresult)
-		self.command = toolset.ExpandAll(self.command)
-		self.key = hashlib.md5(self.versioncommand + self.versionresult).hexdigest()
-		
-		# We need the tool's date to find out if we should check it.
-		try:
-			if '/' in self.command:
-				testfile = os.path.abspath(self.command.strip("\"'"))
-			else:
-				# The tool isn't a relative or absolute path so the could be relying on the 
-				# $PATH variable to make it available.  We must find the tool if it's a simple 
-				# executable file (e.g. "armcc" rather than "python myscript.py") then get it's date. 
-				# We can use the date later to see if our cache is valid. 
-				# 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)
-				if testfile is None:
-					raise Exception("Can't be found in path")
-
-			if not os.path.isfile(testfile):
-				raise Exception("tool %s appears to not be a file %s", self.command, testfile)
-				
-			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))
-	
-			
-	def check(self, shell, evaluator):
-
-		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)
-			versionoutput,err = p.communicate()
-			self.log.Debug("Checking tool '%s' for version '%s'", self.name, self.versionresult)
-		except Exception,e:
-			versionoutput=None
-
-		# Some tools return version strings with unicode characters! 
-		# There is no good response other than a lot of decoding and encoding.
-		# Simpler to ignore it:
-		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))
-			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
-
-def envhash(irrelevant_vars):
-	"""Determine something unique about this environment to identify it.
-	must ignore variables that change without mattering to the caller
-	e.g. perhaps PATH matters but PWD and PPID don't"""
-	envid = hashlib.md5()
-	for k in os.environ:
-		if k not in irrelevant_vars:
-			envid.update(os.environ[k])
-	return envid.hexdigest()[:16]
-
-
-class ToolSet(object):
-	""" 
-	This class manages a bunch of tools and keeps a cache of
-	all tools that it ever sees (across all configurations).
-	toolset.check() is called for each config but the cache is kept across calls to
-	catch the use of one tool in many configs.
-	write() is used to flush the cache to disc.
-	"""
-	# The raptor shell - this is not mutable.
-	hostbinaries = os.path.join(os.environ['SBS_HOME'], 
-	                            os.environ['HOSTPLATFORM_DIR'])
-	                            
-	if HostPlatform.IsHost('lin*'):
-		shell=os.path.join(hostbinaries, 'bin/bash')
-	else:
-		if 'SBS_CYGWIN' in os.environ:
-			shell=os.path.join(os.environ['SBS_CYGWIN'], 'bin\\bash.exe')
-		else:
-			shell=os.path.join(hostbinaries, 'cygwin\\bin\\bash.exe')
-
-
-	irrelevant_vars = ['PWD','OLDPWD','PID','PPID', 'SHLVL' ]
-
-
-	shell_version=".*GNU bash, version [34].*"
-	shell_re = re.compile(shell_version)
-	if 'SBS_BUILD_DIR' in os.environ:
-		cachefile_basename = str(generic_path.Join(os.environ['SBS_BUILD_DIR'],"toolcheck_cache_"))
-	elif 'EPOCROOT' in os.environ:
-		cachefile_basename = str(generic_path.Join(os.environ['EPOCROOT'],"epoc32/build/toolcheck_cache_"))
-	else:
-		cachefile_basename = None
-
-	tool_env_id = envhash(irrelevant_vars)
-	filemarker = "sbs_toolcache_2.8.2"
-
-	def __init__(self, log = raptor_utilities.nulllog, forced=False):
-		self.__toolcheckcache = {}
-
-		self.valid = True
-		self.checked = False
-		self.shellok = False
-		self.configname=""
-		self.cache_loaded = False
-		self.forced = forced
-
-		self.log=log
-
-		# Read in the tool cache
-		#
-		# The cache format is a hash key which identifies the
-		# command and the version that we're checking for. Then
-		# there are name,value pairs that record, e.g. the date
-		# of the command file or the name of the variable that
-		# the config uses for the tool (GNUCP or MWCC or whatever)
-
-		if ToolSet.cachefile_basename:
-			self.cachefilename = ToolSet.cachefile_basename+".tmp"
-			if not self.forced:
-				try:
-					f = open(self.cachefilename, "r+")
-					# if this tool cache was recorded in
-					# a different environment then ignore it.
-					marker = f.readline().rstrip("\r\n")
-					if marker == ToolSet.filemarker:
-						env_id_tmp = f.readline().rstrip("\r\n")
-						if env_id_tmp == ToolSet.tool_env_id:
-							try:
-								for l in f.readlines():
-									toolhistory  = l.rstrip(",\n\r").split(",")
-									ce = {}
-									for i in toolhistory[1:]:
-										(name,val) = i.split("=")
-										if name == "valid":
-											val = bool(val)
-										elif name == "age":
-											val = int(val)
-										elif name == "date":
-											if val != "None":
-												val = float(val)
-											else:
-												val= None
-
-										ce[name] = val
-									self.__toolcheckcache[toolhistory[0]] = ce
-								log.Info("Loaded toolcheck cache: %s\n", self.cachefilename)
-							except Exception, e:
-								log.Info("Ignoring garbled toolcheck cache: %s (%s)\n", self.cachefilename, str(e))
-								self.__toolcheckcache = {}
-								
-									
-						else:
-							log.Info("Toolcheck cache %s ignored - environment changed\n", self.cachefilename)
-					else:
-						log.Info("Toolcheck cache not loaded = marker missing: %s %s\n", self.cachefilename, ToolSet.filemarker)
-					f.close()
-				except IOError, e:
-					log.Info("Failed to load toolcheck cache: %s\n", self.cachefilename)
-		else:
-			log.Debug("Toolcheck cachefile not created because EPOCROOT not set in environment.\n")
-
-	def check_shell(self):
-		# The command shell is a critical tool because all the other tools run
-		# within it so we must check for it first. It has to be in the path.
-		# bash 4 is preferred, 3 is accepted
-		try:
-			p = subprocess.Popen(args=[ToolSet.shell, '--version'], bufsize=1024, shell = False, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
-			shellversion_out, errtxt = p.communicate()
-			if ToolSet.shell_re.search(shellversion_out) == None:
-				self.log.Error("A critical tool, '%s', did not return the required version '%s':\n%s\nPlease check that '%s' is in the path.", ToolSet.shell, ToolSet.shell_version, shellversion_out, ToolSet.shell)
-				self.valid = False
-		except Exception,e:
-			self.log.Error("A critical tool could not be found.\nPlease check that '%s' is in the path. (%s)", ToolSet.shell,  str(e))
-			self.valid = False
-
-		return self.valid
-
-	def check(self, evaluator, configname):
-		"""Check the toolset for a particular config"""
-
-		self.checked = True # remember that we did check something
-
-		if not self.shellok:
-			self.shellok = self.check_shell()
-		self.shellok = True
-
-		self.valid = self.valid and self.shellok
-
-		cache = self.__toolcheckcache 
-		for tool in evaluator.tools:
-			if not self.forced:
-				try:
-					t = cache[tool.key]
-						
-				except KeyError,e:
-					pass
-				else:
-					# if the cache has an entry for the tool then see if the date on
-					# the tool has changed (assuming the tool is a simple executable file)
-					if t.has_key('date') and (tool.date is None or (tool.date - t['date'] > 0.1))  :
-						self.log.Debug("toolcheck forced: '%s'  changed since the last check: %s < %s", tool.command, str(t['date']), str(tool.date))
-					else:
-						t['age'] = 0 # we used it so it's obviously needed
-						self.valid = self.valid and t['valid']
-						self.log.Debug("toolcheck saved on: '%s'", tool.name)
-						continue
-
-
-			self.log.Debug("toolcheck done: %s -key: %s" % (tool.name, tool.key))
-
-			if not tool.check(ToolSet.shell, evaluator):
-				self.valid = False
-
-			# 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 }
-
-
-	def write(self):
-		"""Writes the tool check cache to disc.
-
-		   toolset.write()
-		"""
-		cache = self.__toolcheckcache 
-
-		# Write out the cache.
-		if self.checked and ToolSet.cachefile_basename:
-			self.log.Debug("Saving toolcache: %s", self.cachefilename)
-			try:
-				f = open(self.cachefilename, "w+")
-				f.write(ToolSet.filemarker+"\n")
-				f.write(ToolSet.tool_env_id+"\n")
-				for k,ce in cache.iteritems():
-
-					# If a tool has not been used for an extraordinarily long time
-					# then forget it - to prevent the cache from clogging up with old tools.
-					# Only write entries for tools that were found to be ok - so that the 
-					# next time the ones that weren't will be re-tested
-
-					if ce['valid'] and ce['age'] < 100:
-						ce['age'] += 1
-						f.write("%s," % k)
-						for n,v in ce.iteritems():
-							f.write("%s=%s," % (n,str(v)))
-					f.write("\n")
-				f.close()
-				self.log.Info("Created/Updated toolcheck cache: %s\n", self.cachefilename)
-			except Exception, e:
-				self.log.Info("Could not write toolcheck cache: %s", str(e))
-		return self.valid
-
-
-class Evaluator(object):
-	"""Determine the values of variables under different Configurations.
-	Either of specification and buildUnit may be None."""
-
-
-	refRegex = re.compile("\$\((.+?)\)")
-
-	def __init__(self, Raptor, specification, buildUnit, gathertools = False):
-		self.raptor = Raptor
-		self.dict = {}
-		self.tools = []
-		self.gathertools = gathertools
-
-		specName = "none"
-		configName = "none"
-
-		# A list of lists of operations.
-		opsLists = []
-
-		if buildUnit:
-			opsLists.extend( buildUnit.GetOperations() )
-
-		if specification:
-			for v in specification.GetAllVariantsRecursively():
-				opsLists.extend( v.GetAllOperationsRecursively() )
-
-		tools = {}
-
-		for opsList in opsLists:
-			for op in opsList:
-				# applying an Operation to a non-existent variable
-				# is OK. We assume that it is just an empty string.
-				try:
-					oldValue = self.dict[op.name]
-				except KeyError:
-					oldValue = ""
-
-				newValue = op.Apply(oldValue)
-				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)
-
-
-		if self.gathertools:
-			self.tools = tools.values()
-		else:
-			self.tools=[]
-
-		# resolve inter-variable references in the dictionary
-		unresolved = True
-
-		for k, v in self.dict.items():
-			self.dict[k] = v.replace("$$","__RAPTOR_ESCAPED_DOLLAR__")
-
-		while unresolved:
-			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"
-				else:
-					expanded = self.ExpandAll(v, specName, configName)
-
-				if expanded != v:				# something changed?
-					self.dict[k] = expanded
-					unresolved = True			# maybe more to do
-
-		# unquote double-dollar references
-		for k, v in self.dict.items():
-			self.dict[k] = v.replace("__RAPTOR_ESCAPED_DOLLAR__","$")
-
-		for t in self.tools:
-			t.expand(self)
-
-
-
-	def Get(self, name):
-		"""return the value of variable 'name' or None if not found."""
-
-		if name in self.dict:
-			return self.dict[name]
-		else:
-			return None
-
-
-	def Resolve(self, name):
-		"""same as Get except that env variables are expanded.
-
-		raises BadReferenceError if the variable 'name' exists but a
-		contained environment variable does not exist."""
-		return self.Get(name) # all variables are now expanded anyway
-
-
-	def ResolveMatching(self, pattern):
-		""" Return a dictionary of all variables that match the pattern """
-		for k,v in self.dict.iteritems():
-			if pattern.match(k):
-				yield (k,v)
-
-
-	def ExpandAll(self, value, spec = "none", config = "none"):
-		"""replace all $(SOMETHING) in the string value.
-
-		returns the newly expanded string."""
-
-		refs = Evaluator.refRegex.findall(value)
-
-		for r in set(refs):
-			expansion = None
-
-			if r in self.raptor.override:
-				expansion = self.raptor.override[r]
-			elif 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)
-			if expansion != None:
-				value = value.replace("$(" + r + ")", expansion)
-
-		return value
-
-
-# raptor_data module functions
-
-
-# end of the raptor_data module
+#
+# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# raptor_data module
+# This module contains the classes that make up the Raptor Data Model.
+#
+
+import copy
+import generic_path
+import os
+import hashlib
+import raptor_utilities
+import re
+import types
+import sys
+import subprocess
+from tempfile import gettempdir
+from time import time, clock
+
+
+
+# What host platforms we recognise
+# This allows us to tie some variants to one host platform and some to another
+class HostPlatform(object):
+	""" List the host platforms on which we can build.  Allow configuration
+ 	    files to specify different information based on that.
+	"""
+	hostplatforms = ["win32", "win64", "linux2"]
+	hostplatform = sys.platform
+
+	@classmethod
+	def IsKnown(cls, platformpattern):
+		"Does the parameter match the name of a known platform "
+		hpnre = re.compile(platformpattern, re.I)
+		for hp in cls.hostplatforms:
+			if hpnre.match(hp):
+				return True
+		return False
+
+	@classmethod
+	def IsHost(cls, platformpattern):
+		""" Does the parameter match the name of the
+		    platform that we're executing on? """
+		ppre = re.compile(platformpattern, re.I)
+		if ppre.match(cls.hostplatform):
+			return True
+		return False
+
+
+# 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)))
+
+
+# raptor_data module classes
+
+class Model(object):
+	"Base class for data-model objects"
+
+	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
+
+
+	def SetSourceFile(self, filename):
+		self.source = filename
+
+
+	def SetProperty(self, name, value):
+		raise InvalidPropertyError()
+
+
+	def AddChild(self, child):
+		raise InvalidChildError()
+
+
+	def DebugPrint(self, prefix = ""):
+		if self.owner:
+			self.owner.Debug("%s", prefix)
+
+	def Valid(self):
+		return False
+
+	def IsApplicable(self):
+		"This variant may be caused to only apply when used on a particular host build platform"
+		if self.host is None:
+			return True
+
+		if HostPlatform.IsHost(self.host):
+			return True
+
+		return False
+
+
+class InvalidPropertyError(Exception):
+	pass
+
+class InvalidChildError(Exception):
+	pass
+
+class BadReferenceError(Exception):
+	pass
+
+
+class Reference(Model):
+	"Base class for data-model reference objects"
+
+	def __init__(self, ref = None):
+		Model.__init__(self)
+		self.ref = ref
+		self.modifiers = []
+
+	def SetProperty(self, name, value):
+		if name == "ref":
+			self.ref = value
+		elif name == "mod":
+			self.modifiers = value.split(".")
+		else:
+			raise InvalidPropertyError()
+
+	def Resolve(self):
+		raise BadReferenceError()
+
+	def GetModifiers(self):
+		cache = self.owner.cache
+		return [ cache.FindNamedVariant(m) for m in self.modifiers ]
+
+	def Valid(self):
+		return self.ref
+
+
+class VariantContainer(Model):
+
+	def __init__(self):
+		Model.__init__(self)	# base class constructor
+		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 AddVariant(self, variant):
+		if type(variant) is types.StringTypes:
+			variant = VariantRef(variant)
+
+
+		# Only add the variant if it's not in the list
+		# already
+		if not variant in self.variants:
+			self.variants.append(variant)
+
+	def GetVariants(self):
+		# resolve any VariantRef objects into Variant objects
+		for i,var in enumerate(self.variants):
+			if isinstance(var, Reference):
+				try:
+					self.variants[i] = var.Resolve()
+
+				except BadReferenceError:
+					self.owner.Error("Missing variant '%s'", var.ref)
+
+		return self.variants
+
+
+class Interface(Model):
+
+	def __init__(self, name = None):
+		Model.__init__(self)	# base class constructor
+		self.name = name
+		self.flm = None
+		self.abstract = False
+		self.extends = None
+		self.params = []
+		self.paramgroups = []
+
+	def DebugPrint(self, prefix = ""):
+		self.owner.Debug("%s", prefix, self.name)
+		self.owner.Debug("%s...", prefix)
+		self.owner.Debug("%s", prefix)
+
+	def FindParent(self):
+		try:
+			return self.owner.cache.FindNamedInterface(self.extends, self.cacheID)
+		except KeyError:
+			raise BadReferenceError("Cannot extend interface because it cannot be found: "+str(self.extends))
+
+	def GetParams(self):
+		if self.extends != None:
+			parent = self.FindParent()
+
+			# 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():
+				if not p.name in names:
+					pp.append(p)
+
+			# list parent parameters first then ours
+			pp.extend(self.params)
+			return pp
+
+		return self.params
+
+	def GetParamGroups(self):
+		if self.extends != None:
+			parent = self.FindParent()
+
+			# 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():
+				if not g.pattern in patterns:
+					self.paramgroups.append(g)
+
+		return self.paramgroups
+
+
+	def GetFLMIncludePath(self):
+		"absolute path to the FLM"
+
+		if self.flm == None:
+			if self.extends != None:
+				parent = self.FindParent()
+
+				return parent.GetFLMIncludePath()
+			else:
+				raise InvalidPropertyError()
+
+		if not os.path.isabs(self.flm):
+			self.flm = os.path.join(os.path.dirname(self.source), self.flm)
+
+		return generic_path.Path(self.flm)
+
+
+	def SetProperty(self, name, value):
+		if name == "name":
+			self.name = value
+		elif name == "flm":
+			self.flm = value
+		elif name == "abstract":
+			self.abstract = (value == "true")
+		elif name == "extends":
+			self.extends = value
+		else:
+			raise InvalidPropertyError()
+
+
+	def AddChild(self, child):
+		if isinstance(child, Parameter):
+			self.AddParameter(child)
+		elif isinstance(child, ParameterGroup):
+			self.AddParameterGroup(child)
+		else:
+			raise InvalidChildError()
+
+
+	def AddParameter(self, parameter):
+		self.params.append(parameter)
+
+	def AddParameterGroup(self, parametergroup):
+		self.paramgroups.append(parametergroup)
+
+	def Valid(self):
+		return (self.name != None)
+
+
+class InterfaceRef(Reference):
+
+	def DebugPrint(self, prefix = ""):
+		self.owner.Debug("%s", prefix, self.ref)
+
+	def Resolve(self):
+		try:
+			return self.owner.cache.FindNamedInterface(self.ref, self.cacheID)
+		except KeyError:
+			raise BadReferenceError()
+
+
+class Specification(VariantContainer):
+
+	def __init__(self, name = "", type = ""):
+		VariantContainer.__init__(self)	# base class constructor
+		self.name = name
+		self.type = type
+		self.interface = None
+		self.childSpecs = []
+		self.parentSpec = None
+
+
+	def DebugPrint(self, prefix = ""):
+		self.owner.Debug("%s", prefix, self.name)
+		if self.interface:
+			self.interface.DebugPrint(prefix + self.indent)
+		VariantContainer.DebugPrint(self, prefix + self.indent)
+		for c in self.childSpecs:
+			c.DebugPrint(prefix + self.indent)
+		self.owner.Debug("%s", 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)
+
+
+	def SetProperty(self, name, value):
+		if name == "name":
+			self.name = value
+		else:
+			raise InvalidPropertyError()
+
+
+	def Configure(self, config):
+		# configure all the children (some may be Filters or parents of)
+		for spec in self.GetChildSpecs():
+			spec.Configure(config)
+
+
+	def HasInterface(self):
+		return self.interface != None
+
+
+	def SetInterface(self, interface):
+		if isinstance(interface, Interface) \
+		or isinstance(interface, InterfaceRef):
+			self.interface = interface
+		else:
+			self.interface = InterfaceRef(interface)
+
+
+	def GetInterface(self):
+		"""return the Interface (fetching from the cache if it was a ref)
+		may return None"""
+
+		if self.interface == None \
+		or isinstance(self.interface, Interface):
+			return self.interface
+
+		if isinstance(self.interface, InterfaceRef):
+			try:
+				self.interface = self.interface.Resolve()
+				return self.interface
+
+			except BadReferenceError:
+				self.owner.Error("Missing interface %s", self.interface.ref)
+				return None
+
+
+	def AddChild(self, child):
+		if isinstance(child, Specification):
+			self.AddChildSpecification(child)
+		elif isinstance(child, Interface) \
+		  or isinstance(child, InterfaceRef):
+			self.SetInterface(child)
+		elif isinstance(child, Variant) \
+		  or isinstance(child, VariantRef):
+			self.AddVariant(child)
+		else:
+			raise InvalidChildError()
+
+
+	def AddChildSpecification(self, child):
+		child.SetParentSpec(self)
+		self.childSpecs.append(child)
+
+
+	def SetParentSpec(self, parent):
+		self.parentSpec = parent
+
+
+	def GetChildSpecs(self):
+		return self.childSpecs
+
+
+	def Valid(self):
+		return True
+
+
+	def GetAllVariantsRecursively(self):
+		"""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,
+		variants-in-self].
+
+		Note that the function recurses through parent *Specifications*, not through
+		the variants themselves.
+		"""
+		if self.parentSpec:
+			variants = self.parentSpec.GetAllVariantsRecursively()
+		else:
+			variants = []
+
+		variants.extend( self.GetVariants() )
+
+		return variants
+
+
+class Filter(Specification):
+	"""A Filter is two Specification nodes and a True/False switch.
+
+	Filter extends Specification to have two nodes, only one of
+	which can be active at any time. Which node is active is determined
+	when the Configure method is called after setting up a Condition.
+
+	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
+		self.isTrue = True
+		self.configNames = set()            #
+		self.variableNames = set()          # TO DO: Condition class
+		self.variableValues = {}            #
+
+	def DebugPrint(self, prefix = ""):
+		self.owner.Debug("%s", prefix, self.name)
+		self.owner.Debug("%s ", prefix, " | ".join(self.configNames))
+		Specification.DebugPrint(self, prefix + self.indent)
+		self.owner.Debug("%s ", prefix)
+		self.owner.Debug("%s ", prefix)
+		self.Else.DebugPrint(prefix + self.indent)
+		self.owner.Debug("%s ", prefix)
+		self.owner.Debug("%s", prefix)
+
+
+	def SetConfigCondition(self, configName):
+		self.configNames = set([configName])
+
+	def AddConfigCondition(self, configName):
+		self.configNames.add(configName)
+
+
+	def SetVariableCondition(self, variableName, variableValues):
+		self.variableNames = set([variableName])
+		if type(variableValues) == types.ListType:
+			self.variableValues[variableName] = set(variableValues)
+		else:
+			self.variableValues[variableName] = set([variableValues])
+
+	def AddVariableCondition(self, variableName, variableValues):
+		self.variableNames.add(variableName)
+		if type(variableValues) == types.ListType:
+			self.variableValues[variableName] = set(variableValues)
+		else:
+			self.variableValues[variableName] = set([variableValues])
+
+
+	def Configure(self, buildUnit):
+		self.isTrue = False
+
+		if buildUnit.name in self.configNames:
+			self.isTrue = True
+		elif self.variableNames:
+			evaluator = self.owner.GetEvaluator(self.parentSpec, buildUnit)
+
+			for variableName in self.variableNames:
+				variableValue = evaluator.Get(variableName)
+
+				if variableValue in self.variableValues[variableName]:
+					self.isTrue = True
+					break
+
+		# 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)
+
+
+	def HasInterface(self):
+		if self.isTrue:
+			return Specification.HasInterface(self)
+		else:
+			return self.Else.HasInterface()
+
+
+	def GetInterface(self):
+		if self.isTrue:
+			return Specification.GetInterface(self)
+		else:
+			return self.Else.GetInterface()
+
+
+	def GetVariants(self):
+		if self.isTrue:
+			return Specification.GetVariants(self)
+		else:
+			return self.Else.GetVariants()
+
+
+	def SetParentSpec(self, parent):
+		# base class method
+		Specification.SetParentSpec(self, parent)
+		# same for Else part
+		self.Else.SetParentSpec(parent)
+
+
+	def GetChildSpecs(self):
+		if self.isTrue:
+			return Specification.GetChildSpecs(self)
+		else:
+			return self.Else.GetChildSpecs()
+
+
+class Parameter(Model):
+
+	def __init__(self, name = None, default = None):
+		Model.__init__(self)	# base class constructor
+		self.name = name
+		self.default = default
+
+
+	def SetProperty(self, name, value):
+		if name == "name":
+			self.name = value
+		elif name == "default":
+			self.default = value
+		else:
+			raise InvalidPropertyError()
+
+
+	def Valid(self):
+		return (self.name != None)
+
+class ParameterGroup(Model):
+	"""A group of Parameters specified in an interface by a regexp"""
+	def __init__(self, pattern = None, default = None):
+		Model.__init__(self)	# base class constructor
+		self.pattern = pattern
+
+		self.patternre = None
+		if pattern:
+			try:
+				self.patternre = re.compile(pattern)
+			except TypeError:
+				pass
+		self.default = default
+
+
+	def SetProperty(self, pattern, value):
+		if pattern == "pattern":
+			self.pattern = value
+			self.patternre = re.compile(value)
+		elif pattern == "default":
+			self.default = value
+		else:
+			raise InvalidPropertyError()
+
+
+	def Valid(self):
+		return (self.pattern != None and self.patternre != None)
+
+
+class Operation(Model):
+	"Base class for variant operations"
+	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')
+
+	def __init__(self, name = None, value = None, separator = " "):
+		Operation.__init__(self)	# base class constructor
+		self.name = name
+		self.value = value
+		self.separator = separator
+
+
+	def DebugPrint(self, prefix = ""):
+		attributes = "name='" + self.name + "' value='" + self.value + "' separator='" + self.separator + "'"
+		self.owner.Debug("%s", prefix, attributes)
+
+
+	def Apply(self, oldValue):
+		if len(oldValue) > 0:
+			if len(self.value) > 0:
+				return oldValue + self.separator + self.value
+			else:
+				return oldValue
+		else:
+			return self.value
+
+
+	def SetProperty(self, name, value):
+		if name == "name":
+			self.name = value
+		elif name == "value":
+			self.value = value
+		elif name == "separator":
+			self.separator = value
+		else:
+			raise InvalidPropertyError()
+
+
+	def Valid(self):
+		return (self.name != None and self.value != None)
+
+
+class Prepend(Operation):
+	def __init__(self, name = None, value = None, separator = " "):
+		Operation.__init__(self)	# base class constructor
+		self.name = name
+		self.value = value
+		self.separator = separator
+
+
+	def DebugPrint(self, prefix = ""):
+		attributes = "name='" + self.name + "' value='" + self.value + "' separator='" + self.separator + "'"
+		self.owner.Debug("%s", prefix, attributes)
+
+
+	def Apply(self, oldValue):
+		if len(oldValue) > 0:
+			if len(self.value) > 0:
+				return self.value + self.separator + oldValue
+			else:
+				return oldValue
+		else:
+			return self.value
+
+
+	def SetProperty(self, name, value):
+		if name == "name":
+			self.name = value
+		elif name == "value":
+			self.value = value
+		elif name == "separator":
+			self.separator = value
+		else:
+			raise InvalidPropertyError()
+
+
+	def Valid(self):
+		return (self.name != None and self.value != None)
+
+
+class Set(Operation):
+	"""implementation of  operation"""
+	__slots__ = ('name','value', 'type', 'versionCommand', 'versionResult', 'owner')
+
+	def __init__(self, name = None, value = "", type = ""):
+		Operation.__init__(self)	# base class constructor
+		self.name = name
+		self.value = value
+		self.type = type
+		self.versionCommand = ""
+		self.versionResult = ""
+
+
+	def DebugPrint(self, prefix = ""):
+		attributes = "name='" + self.name + "' value='" + self.value + "' type='" + self.type + "'"
+		if type == "tool":
+			attributes += " versionCommand='" + self.versionCommand + "' versionResult='" + self.versionResult
+
+		self.owner.Debug("%s", prefix, attributes)
+
+
+	def Apply(self, oldValue):
+		return self.value
+
+
+	def SetProperty(self, name, value):
+		if name == "name":
+			self.name = value
+		elif name == "value":
+			self.value = value
+		elif name == "type":
+			self.type = value
+		elif name == "versionCommand":
+			self.versionCommand = value
+		elif name == "versionResult":
+			self.versionResult = value
+		elif name == "host":
+			if HostPlatform.IsKnown(value):
+				self.host = value
+		else:
+			raise InvalidPropertyError()
+
+
+	def Valid(self):
+		return (self.name != None and self.value != None)
+
+
+class Env(Set):
+	"""implementation of  operator"""
+
+	def __init__(self, name = None, default = None, type = ""):
+		Set.__init__(self, name, "", type)	# base class constructor
+		self.default = default
+
+
+	def DebugPrint(self, prefix = ""):
+		attributes = "name='" + self.name + "' type='" + self.type + "'"
+		if default != None:
+			attributes += " default='" + self.default + "'"
+
+		if type == "tool":
+			attributes += " versionCommand='" + self.versionCommand + "' versionResult='" + self.versionResult + "'"
+
+		self.owner.Debug("%s", prefix, 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
+			# 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
+		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
+
+		return value
+
+
+	def SetProperty(self, name, value):
+		if name == "default":
+			self.default = value
+		else:
+			Set.SetProperty(self, name, value)
+
+
+	def Valid(self):
+		return (self.name != None)
+
+
+class BuildUnit(object):
+	"Represents an individual buildable unit."
+
+	def __init__(self, name, variants):
+		self.name = name
+		
+		# A list of Variant objects.
+		self.variants = variants
+
+		# Cache for the variant operations implied by this BuildUnit.
+		self.operations = []
+		self.variantKey = ""
+
+	def GetOperations(self):
+		"""Return all operations related to this BuildUnit.
+		
+		The result is cached, and so will only be computed once per BuildUnit.
+		"""
+		key = '.'.join([x.name for x in self.variants])
+		if self.variantKey != key:
+			self.variantKey = key
+			for v in self.variants:
+				self.operations.extend( v.GetAllOperationsRecursively() )
+
+		return self.operations
+
+class Config(object):
+	"""Abstract type representing an argument to the '-c' option.
+
+	The fundamental property of a Config is that it can generate one or more
+	BuildUnits.
+	"""
+
+	def __init__(self):
+		self.modifiers = []
+
+	def AddModifier(self, variant):
+		self.modifiers.append(variant)
+
+	def ClearModifiers(self):
+		self.modifiers = []
+
+	def GenerateBuildUnits(self):
+		"""Returns a list of BuildUnits.
+
+		This function must be overridden by derived classes.
+		"""
+		raise NotImplementedError()
+
+
+class Variant(Model, Config):
+
+	def __init__(self, name = ""):
+		Model.__init__(self)
+		Config.__init__(self)
+		self.name = name
+
+		# Operations defined inside this variant.
+		self.ops = []
+
+		# The name of our parent variant, if any.
+		self.extends = ""
+
+		# Any variant references used inside this variant.
+		self.variantRefs = []
+
+		self.allOperations = []
+
+	def SetProperty(self, name, value):
+		if name == "name":
+			self.name = value
+		elif name == "host":
+			if HostPlatform.IsKnown(value):
+				self.host = value
+		elif name == "extends":
+			self.extends = value
+		else:
+			raise InvalidPropertyError()
+
+	def AddChild(self, child):
+		if isinstance(child, Operation):
+			self.ops.append(child)
+		elif isinstance(child, VariantRef):
+			self.variantRefs.append(child)
+		else:
+			raise InvalidChildError()
+
+	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):
+		"""Returns a list of all operations in this variant.
+
+		The list elements are themselves lists; the overall structure of the
+		returned value is:
+
+		[ [ops-from-parent],[ops-from-varRefs], [ops-in-self] ]
+		"""
+
+		if not self.allOperations:
+			if self.extends:
+				parent = self.owner.cache.FindNamedVariant(self.extends)
+				self.allOperations.extend( parent.GetAllOperationsRecursively() )
+			for r in self.variantRefs:
+				for v in [ r.Resolve() ] + r.GetModifiers():
+					self.allOperations.extend( v.GetAllOperationsRecursively() )
+			self.allOperations.append(self.ops)
+
+		return self.allOperations
+
+	def GenerateBuildUnits(self):
+
+		name = self.name
+		vars = [self]
+
+		for m in self.modifiers:
+			name = name + "." + m.name
+			vars.append(m)
+
+		return [ BuildUnit(name, vars) ]
+
+	def DebugPrint(self, prefix = ""):
+
+		self.owner.Debug("%s", prefix, self.name, self.extends)
+		for op in self.ops:
+			op.DebugPrint(prefix + self.indent)
+
+		self.owner.Debug("%s", prefix)
+
+
+class VariantRef(Reference):
+
+	def __init__(self, ref=None):
+		Reference.__init__(self, ref)
+
+	def DebugPrint(self, prefix = ""):
+		self.owner.Debug("%s", prefix, self.ref)
+
+	def Resolve(self):
+		try:
+			return self.owner.cache.FindNamedVariant(self.ref)
+		except KeyError:
+			raise BadReferenceError(self.ref)
+
+
+class Alias(Model, Config):
+
+	def __init__(self, name=""):
+		Model.__init__(self)
+		Config.__init__(self)
+		self.name = name
+		self.meaning = ""
+		self.varRefs = []
+		self.variants = []
+
+	def DebugPrint(self, prefix = ""):
+		self.owner.Debug("%s", prefix, self.name, self.meaning)
+
+	def SetProperty(self, key, val):
+		if key == "name":
+			self.name = val
+		elif key == "meaning":
+			self.meaning = val
+
+			for u in val.split("."):
+				self.varRefs.append( VariantRef(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):
+		if not self.variants:
+			for r in self.varRefs:
+				try:
+					self.variants.append( r.Resolve() )
+				except BadReferenceError:
+					self.owner.Error("Missing variant '%s'", r.ref)
+
+		name = self.name
+
+		for v in self.modifiers:
+			name = name + "." + v.name
+
+		return [ BuildUnit(name, self.variants + self.modifiers) ]
+
+
+class AliasRef(Reference):
+
+	def __init__(self, ref=None):
+		Reference.__init__(self, ref)
+
+	def DebugPrint(self, prefix = ""):
+		self.owner.Debug("%s", prefix, self.ref)
+
+	def Resolve(self):
+		try:
+			return self.owner.cache.FindNamedAlias(self.ref)
+		except KeyError:
+			raise BadReferenceError(self.ref)
+
+
+class Group(Model, Config):
+	def __init__(self, name=""):
+		Model.__init__(self)
+		Config.__init__(self)
+		self.name = name
+		self.childRefs = []
+
+	def SetProperty(self, key, val):
+		if key == "name":
+			self.name = val
+		else:
+			raise InvalidPropertyError()
+
+	def AddChild(self, child):
+		if isinstance( child, (VariantRef,AliasRef,GroupRef) ):
+			self.childRefs.append(child)
+		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("", prefix, self.name)
+
+		for r in self.childRefs:
+			r.DebugPrint(prefix + self.indent)
+
+		self.owner.Debug("%s", prefix)
+
+	def GenerateBuildUnits(self):
+
+		units = []
+
+		for r in self.childRefs:
+			refMods = r.GetModifiers()
+
+			try:
+				obj = r.Resolve()
+			except BadReferenceError:
+				self.owner.Error("Missing variant '%s'", r.ref)
+			else:
+				obj.ClearModifiers()
+
+				for m in refMods + self.modifiers:
+					obj.AddModifier(m)
+
+				units.extend( obj.GenerateBuildUnits() )
+
+		return units
+
+
+class GroupRef(Reference):
+
+	def __init__(self, ref=None):
+		Reference.__init__(self, ref)
+
+	def DebugPrint(self, prefix = ""):
+		mod = ".".join(self.modifiers)
+		self.owner.Debug("%s", prefix, self.ref, mod)
+
+	def Resolve(self):
+		try:
+			return self.owner.cache.FindNamedGroup(self.ref)
+		except KeyError:
+			raise BadReferenceError(self.ref)
+
+class Tool(object):
+	"""Represents a tool that might be used by raptor e.g. a compiler"""
+
+	# For use in dealing with tools that return non-ascii version strings.
+	nonascii = ""
+	identity_chartable = chr(0)
+	for c in xrange(1,128):
+		identity_chartable += chr(c)
+	for c in xrange(128,256):
+		nonascii += chr(c)
+		identity_chartable += " "
+
+	def __init__(self, name, command, versioncommand, versionresult, id="", log = raptor_utilities.nulllog):
+		self.name = name
+		self.command = command
+		self.versioncommand = versioncommand
+		self.versionresult = versionresult
+		self.id = id # what config this is from - used in debug messages
+		self.date = None
+
+
+		# Assume the tool is unavailable or the wrong
+		# version until someone proves that it's OK
+		self.valid = False
+
+		self.log=log
+
+	def expand(self, toolset):
+		self.versioncommand = toolset.ExpandAll(self.versioncommand)
+		self.versionresult  = toolset.ExpandAll(self.versionresult)
+		self.command = toolset.ExpandAll(self.command)
+		self.key = hashlib.md5(self.versioncommand + self.versionresult).hexdigest()
+		
+		# We need the tool's date to find out if we should check it.
+		try:
+			if '/' in self.command:
+				testfile = os.path.abspath(self.command.strip("\"'"))
+			else:
+				# The tool isn't a relative or absolute path so the could be relying on the 
+				# $PATH variable to make it available.  We must find the tool if it's a simple 
+				# executable file (e.g. "armcc" rather than "python myscript.py") then get it's date. 
+				# We can use the date later to see if our cache is valid. 
+				# 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)
+				if testfile is None:
+					raise Exception("Can't be found in path")
+
+			if not os.path.isfile(testfile):
+				raise Exception("tool %s appears to not be a file %s", self.command, testfile)
+				
+			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))
+	
+			
+	def check(self, shell, evaluator):
+
+		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)
+			versionoutput,err = p.communicate()
+			self.log.Debug("Checking tool '%s' for version '%s'", self.name, self.versionresult)
+		except Exception,e:
+			versionoutput=None
+
+		# Some tools return version strings with unicode characters! 
+		# There is no good response other than a lot of decoding and encoding.
+		# Simpler to ignore it:
+		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))
+			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
+
+def envhash(irrelevant_vars):
+	"""Determine something unique about this environment to identify it.
+	must ignore variables that change without mattering to the caller
+	e.g. perhaps PATH matters but PWD and PPID don't"""
+	envid = hashlib.md5()
+	for k in os.environ:
+		if k not in irrelevant_vars:
+			envid.update(os.environ[k])
+	return envid.hexdigest()[:16]
+
+
+class ToolSet(object):
+	""" 
+	This class manages a bunch of tools and keeps a cache of
+	all tools that it ever sees (across all configurations).
+	toolset.check() is called for each config but the cache is kept across calls to
+	catch the use of one tool in many configs.
+	write() is used to flush the cache to disc.
+	"""
+	# The raptor shell - this is not mutable.
+	hostbinaries = os.path.join(os.environ['SBS_HOME'], 
+	                            os.environ['HOSTPLATFORM_DIR'])
+	                            
+	if HostPlatform.IsHost('lin*'):
+		shell=os.path.join(hostbinaries, 'bin/bash')
+	else:
+		if 'SBS_CYGWIN' in os.environ:
+			shell=os.path.join(os.environ['SBS_CYGWIN'], 'bin\\bash.exe')
+		else:
+			shell=os.path.join(hostbinaries, 'cygwin\\bin\\bash.exe')
+
+
+	irrelevant_vars = ['PWD','OLDPWD','PID','PPID', 'SHLVL' ]
+
+
+	shell_version=".*GNU bash, version [34].*"
+	shell_re = re.compile(shell_version)
+	if 'SBS_BUILD_DIR' in os.environ:
+		cachefile_basename = str(generic_path.Join(os.environ['SBS_BUILD_DIR'],"toolcheck_cache_"))
+	elif 'EPOCROOT' in os.environ:
+		cachefile_basename = str(generic_path.Join(os.environ['EPOCROOT'],"epoc32/build/toolcheck_cache_"))
+	else:
+		cachefile_basename = None
+
+	tool_env_id = envhash(irrelevant_vars)
+	filemarker = "sbs_toolcache_2.8.2"
+
+	def __init__(self, log = raptor_utilities.nulllog, forced=False):
+		self.__toolcheckcache = {}
+
+		self.valid = True
+		self.checked = False
+		self.shellok = False
+		self.configname=""
+		self.cache_loaded = False
+		self.forced = forced
+
+		self.log=log
+
+		# Read in the tool cache
+		#
+		# The cache format is a hash key which identifies the
+		# command and the version that we're checking for. Then
+		# there are name,value pairs that record, e.g. the date
+		# of the command file or the name of the variable that
+		# the config uses for the tool (GNUCP or MWCC or whatever)
+
+		if ToolSet.cachefile_basename:
+			self.cachefilename = ToolSet.cachefile_basename+".tmp"
+			if not self.forced:
+				try:
+					f = open(self.cachefilename, "r+")
+					# if this tool cache was recorded in
+					# a different environment then ignore it.
+					marker = f.readline().rstrip("\r\n")
+					if marker == ToolSet.filemarker:
+						env_id_tmp = f.readline().rstrip("\r\n")
+						if env_id_tmp == ToolSet.tool_env_id:
+							try:
+								for l in f.readlines():
+									toolhistory  = l.rstrip(",\n\r").split(",")
+									ce = {}
+									for i in toolhistory[1:]:
+										(name,val) = i.split("=")
+										if name == "valid":
+											val = bool(val)
+										elif name == "age":
+											val = int(val)
+										elif name == "date":
+											if val != "None":
+												val = float(val)
+											else:
+												val= None
+
+										ce[name] = val
+									self.__toolcheckcache[toolhistory[0]] = ce
+								log.Info("Loaded toolcheck cache: %s\n", self.cachefilename)
+							except Exception, e:
+								log.Info("Ignoring garbled toolcheck cache: %s (%s)\n", self.cachefilename, str(e))
+								self.__toolcheckcache = {}
+								
+									
+						else:
+							log.Info("Toolcheck cache %s ignored - environment changed\n", self.cachefilename)
+					else:
+						log.Info("Toolcheck cache not loaded = marker missing: %s %s\n", self.cachefilename, ToolSet.filemarker)
+					f.close()
+				except IOError, e:
+					log.Info("Failed to load toolcheck cache: %s\n", self.cachefilename)
+		else:
+			log.Debug("Toolcheck cachefile not created because EPOCROOT not set in environment.\n")
+
+	def check_shell(self):
+		# The command shell is a critical tool because all the other tools run
+		# within it so we must check for it first. It has to be in the path.
+		# bash 4 is preferred, 3 is accepted
+		try:
+			p = subprocess.Popen(args=[ToolSet.shell, '--version'], bufsize=1024, shell = False, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
+			shellversion_out, errtxt = p.communicate()
+			if ToolSet.shell_re.search(shellversion_out) == None:
+				self.log.Error("A critical tool, '%s', did not return the required version '%s':\n%s\nPlease check that '%s' is in the path.", ToolSet.shell, ToolSet.shell_version, shellversion_out, ToolSet.shell)
+				self.valid = False
+		except Exception,e:
+			self.log.Error("A critical tool could not be found.\nPlease check that '%s' is in the path. (%s)", ToolSet.shell,  str(e))
+			self.valid = False
+
+		return self.valid
+
+	def check(self, evaluator, configname):
+		"""Check the toolset for a particular config"""
+
+		self.checked = True # remember that we did check something
+
+		if not self.shellok:
+			self.shellok = self.check_shell()
+		self.shellok = True
+
+		self.valid = self.valid and self.shellok
+
+		cache = self.__toolcheckcache 
+		for tool in evaluator.tools:
+			if not self.forced:
+				try:
+					t = cache[tool.key]
+						
+				except KeyError,e:
+					pass
+				else:
+					# if the cache has an entry for the tool then see if the date on
+					# the tool has changed (assuming the tool is a simple executable file)
+					if t.has_key('date') and (tool.date is None or (tool.date - t['date'] > 0.1))  :
+						self.log.Debug("toolcheck forced: '%s'  changed since the last check: %s < %s", tool.command, str(t['date']), str(tool.date))
+					else:
+						t['age'] = 0 # we used it so it's obviously needed
+						self.valid = self.valid and t['valid']
+						self.log.Debug("toolcheck saved on: '%s'", tool.name)
+						continue
+
+
+			self.log.Debug("toolcheck done: %s -key: %s" % (tool.name, tool.key))
+
+			if not tool.check(ToolSet.shell, evaluator):
+				self.valid = False
+
+			# 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 }
+
+
+	def write(self):
+		"""Writes the tool check cache to disc.
+
+		   toolset.write()
+		"""
+		cache = self.__toolcheckcache 
+
+		# Write out the cache.
+		if self.checked and ToolSet.cachefile_basename:
+			self.log.Debug("Saving toolcache: %s", self.cachefilename)
+			try:
+				f = open(self.cachefilename, "w+")
+				f.write(ToolSet.filemarker+"\n")
+				f.write(ToolSet.tool_env_id+"\n")
+				for k,ce in cache.iteritems():
+
+					# If a tool has not been used for an extraordinarily long time
+					# then forget it - to prevent the cache from clogging up with old tools.
+					# Only write entries for tools that were found to be ok - so that the 
+					# next time the ones that weren't will be re-tested
+
+					if ce['valid'] and ce['age'] < 100:
+						ce['age'] += 1
+						f.write("%s," % k)
+						for n,v in ce.iteritems():
+							f.write("%s=%s," % (n,str(v)))
+					f.write("\n")
+				f.close()
+				self.log.Info("Created/Updated toolcheck cache: %s\n", self.cachefilename)
+			except Exception, e:
+				self.log.Info("Could not write toolcheck cache: %s", str(e))
+		return self.valid
+
+
+class Evaluator(object):
+	"""Determine the values of variables under different Configurations.
+	Either of specification and buildUnit may be None."""
+
+
+	refRegex = re.compile("\$\((.+?)\)")
+
+	def __init__(self, Raptor, specification, buildUnit, gathertools = False):
+		self.raptor = Raptor
+		self.dict = {}
+		self.tools = []
+		self.gathertools = gathertools
+
+		specName = "none"
+		configName = "none"
+
+		# A list of lists of operations.
+		opsLists = []
+
+		if buildUnit:
+			opsLists.extend( buildUnit.GetOperations() )
+
+		if specification:
+			for v in specification.GetAllVariantsRecursively():
+				opsLists.extend( v.GetAllOperationsRecursively() )
+
+		tools = {}
+
+		for opsList in opsLists:
+			for op in opsList:
+				# applying an Operation to a non-existent variable
+				# is OK. We assume that it is just an empty string.
+				try:
+					oldValue = self.dict[op.name]
+				except KeyError:
+					oldValue = ""
+
+				newValue = op.Apply(oldValue)
+				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)
+
+
+		if self.gathertools:
+			self.tools = tools.values()
+		else:
+			self.tools=[]
+
+		# resolve inter-variable references in the dictionary
+		unresolved = True
+
+		for k, v in self.dict.items():
+			self.dict[k] = v.replace("$$","__RAPTOR_ESCAPED_DOLLAR__")
+
+		while unresolved:
+			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"
+				else:
+					expanded = self.ExpandAll(v, specName, configName)
+
+				if expanded != v:				# something changed?
+					self.dict[k] = expanded
+					unresolved = True			# maybe more to do
+
+		# unquote double-dollar references
+		for k, v in self.dict.items():
+			self.dict[k] = v.replace("__RAPTOR_ESCAPED_DOLLAR__","$")
+
+		for t in self.tools:
+			t.expand(self)
+
+
+
+	def Get(self, name):
+		"""return the value of variable 'name' or None if not found."""
+
+		if name in self.dict:
+			return self.dict[name]
+		else:
+			return None
+
+
+	def Resolve(self, name):
+		"""same as Get except that env variables are expanded.
+
+		raises BadReferenceError if the variable 'name' exists but a
+		contained environment variable does not exist."""
+		return self.Get(name) # all variables are now expanded anyway
+
+
+	def ResolveMatching(self, pattern):
+		""" Return a dictionary of all variables that match the pattern """
+		for k,v in self.dict.iteritems():
+			if pattern.match(k):
+				yield (k,v)
+
+
+	def ExpandAll(self, value, spec = "none", config = "none"):
+		"""replace all $(SOMETHING) in the string value.
+
+		returns the newly expanded string."""
+
+		refs = Evaluator.refRegex.findall(value)
+
+		for r in set(refs):
+			expansion = None
+
+			if r in self.raptor.override:
+				expansion = self.raptor.override[r]
+			elif 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)
+			if expansion != None:
+				value = value.replace("$(" + r + ")", expansion)
+
+		return value
+
+
+# raptor_data module functions
+
+
+# end of the raptor_data module
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/python/raptor_make.py
--- a/sbsv2/raptor/python/raptor_make.py	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/python/raptor_make.py	Mon Nov 16 09:46:46 2009 +0000
@@ -1,563 +1,563 @@
-#
-# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# raptor_make module
-# This module contains the classes that write and call Makefile wrappers.
-#
-
-import hashlib
-import os
-import random
-import raptor
-import raptor_data
-import raptor_utilities
-import raptor_version
-import re
-import subprocess
-import time
-from raptor_makefile import *
-
-# raptor_make module classes
-
-class MakeEngine(object):
-
-	def __init__(self, Raptor):
-		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:
-			avar = Raptor.cache.FindNamedAlias(engine)
-		elif engine in Raptor.cache.variants:
-			avar = Raptor.cache.FindNamedVariant(engine)
-		else:
-			Raptor.Error("No settings found for build engine '%s'", engine)
-			return
-					
-		# find the variant and extract the values
-		try:
-			units = avar.GenerateBuildUnits()
-			evaluator = Raptor.GetEvaluator( None, units[0] , gathertools=True)
-
-			# shell
-			self.shellpath = evaluator.Get("DEFAULT_SHELL")
-			usetalon_s = evaluator.Get("USE_TALON") 
-			self.usetalon = usetalon_s is not None and usetalon_s != ""
-			self.talonshell = str(evaluator.Get("TALON_SHELL"))
-			self.talontimeout = str(evaluator.Get("TALON_TIMEOUT"))
-			self.talonretries = str(evaluator.Get("TALON_RETRIES"))
-
-			# commands
-			self.initCommand = evaluator.Get("initialise")
-			self.buildCommand = evaluator.Get("build")
-			self.shutdownCommand = evaluator.Get("shutdown")
-
-			# options
-			self.makefileOption = evaluator.Get("makefile")
-			self.keepGoingOption = evaluator.Get("keep_going")
-			self.jobsOption = evaluator.Get("jobs")
-			self.defaultMakeOptions = evaluator.Get("defaultoptions")
-
-			# buffering
-			self.scrambled = (evaluator.Get("scrambled") == "true")
-
-			# check tool versions
-			Raptor.CheckToolset(evaluator, avar.name)
-			
-			# default targets (can vary per-invocation)
-			self.defaultTargets = Raptor.defaultTargets
-
-			# work out how to split up makefiles
-			try:
-				selectorNames = [ x.strip() for x in evaluator.Get("selectors").split(',') if x.strip() != "" ]
-				self.selectors = []
-
-
-				if len(selectorNames) > 0:
-					for name in selectorNames:
-						pattern = evaluator.Get(name.strip() + ".selector.iface")
-						target = evaluator.Get(name.strip() + ".selector.target")
-						ignoretargets = evaluator.Get(name.strip() + ".selector.ignoretargets")
-						self.selectors.append(MakefileSelector(name,pattern,target,ignoretargets))
-			except KeyError:
-				Raptor.Error("%s.selector.iface, %s.selector.target not found in make engine configuration", name, name)
-				self.selectors = []
-
-		except KeyError:
-			Raptor.Error("Bad '%s' configuration found.", engine)
-			self.valid = False
-			return
-
-		# there must at least be a build command...
-		if not self.buildCommand:
-				Raptor.Error("No build command for '%s'", engine)
-				self.valid = False
-
-
-		if self.usetalon:
-			talon_settings="""
-TALON_SHELL:=%s
-TALON_TIMEOUT:=%s
-TALON_RECIPEATTRIBUTES:=\
- name='$$RECIPE'\
- target='$$TARGET'\
- host='$$HOSTNAME'\
- layer='$$COMPONENT_LAYER'\
- component='$$COMPONENT_NAME'\
- bldinf='$$COMPONENT_META' mmp='$$PROJECT_META'\
- config='$$SBS_CONFIGURATION' platform='$$PLATFORM'\
- phase='$$MAKEFILE_GROUP' source='$$SOURCE
-export TALON_RECIPEATTRIBUTES TALON_SHELL TALON_TIMEOUT
-USE_TALON:=%s
-
-""" % (self.talonshell, self.talontimeout, "1")
-		else:
-			talon_settings="""
-USE_TALON:=
-
-"""
-		
-
-		self.makefile_prologue = """
-# generated by %s %s
-
-HOSTPLATFORM:=%s
-HOSTPLATFORM_DIR:=%s
-OSTYPE:=%s
-FLMHOME:=%s
-SHELL:=%s
-
-%s
-
-include %s
-
-""" 		% (  raptor.name, raptor_version.Version(),
-			 " ".join(raptor.hostplatform),
-			 raptor.hostplatform_dir,
-			 self.raptor.filesystem,
-			 str(self.raptor.systemFLM),
-			 self.shellpath,
-			 talon_settings,
-			 self.raptor.systemFLM.Append('globals.mk') )
-
-
-		self.makefile_epilogue = """
-
-include %s
-
-""" 			% (self.raptor.systemFLM.Append('final.mk') )
-
-	def Write(self, toplevel, specs, configs):
-		"""Generate a set of makefiles, or one big Makefile."""
-
-		if not self.valid:
-			return
-
-		self.toplevel = toplevel
-
-		# create the top-level makefiles
-
-		try:
-			self.makefileset = MakefileSet(directory = str(toplevel.Dir()),
-										   selectors = self.selectors,
-										   filenamebase = str(toplevel.File()),
-										   prologue = self.makefile_prologue,
-										   epilogue = self.makefile_epilogue,
-										   defaulttargets = self.defaultTargets)
-
-			# are we pruning duplicates?
-			self.prune = self.raptor.pruneDuplicateMakefiles
-			self.hashes = set()
-
-			# are we writing one Makefile or lots?
-			self.many = not self.raptor.writeSingleMakefile
-
-			# add a makefile for each spec under each config
-			config_makefileset = self.makefileset
-
-			for c in configs:
-				if self.many:
-					config_makefileset = self.makefileset.createChild(c.name)
-
-				# make sure the config_wide spec item is put out first so that it
-				# can affect everything.
-				ordered_specs=[]
-				config_wide_spec = None
-				for s in specs:
-					if s.name == "config_wide":
-						config_wide_spec = s
-					else:
-						ordered_specs.append(s)
-
-				if config_wide_spec is not None:
-					config_wide_spec.Configure(c)
-					self.WriteConfiguredSpec(config_makefileset, config_wide_spec, c, True)
-
-				for s in ordered_specs:
-					s.Configure(c)
-					self.WriteConfiguredSpec(config_makefileset, s, c, False)
-
-			self.makefileset.close()
-		except Exception,e:
-			self.raptor.Error("Failed to write makefile '%s': %s" % (str(toplevel),str(e)))
-
-
-	def WriteConfiguredSpec(self, parentMakefileSet, spec, config, useAllInterfaces):
-		# ignore this spec if it is empty
-		hasInterface = spec.HasInterface()
-		childSpecs = spec.GetChildSpecs()
-
-		if not hasInterface and not childSpecs:
-			return
-
-		parameters = []
-		dupe = True
-		iface = None
-		guard = None
-		if hasInterface:
-			# find the Interface (it may be a ref)
-			iface = spec.GetInterface()
-
-			if iface == None:
-				self.raptor.Error("No interface for '%s'", spec.name)
-				return
-
-			if iface.abstract:
-				self.raptor.Error("Abstract interface '%s' for '%s'",
-								  iface.name, spec.name)
-				return
-
-			# we need to guard the FLM call with a hash based on all the
-			# parameter values so that duplicate calls cannot be made.
-			# So we need to find all the values before we can write
-			# anything out.
-			md5hash = hashlib.md5()
-			md5hash.update(iface.name)
-
-			# we need an Evaluator to get parameter values for this
-			# Specification in the context of this Configuration
-			evaluator = self.raptor.GetEvaluator(spec, config)
-
-			def addparam(k, value, default):
-				if value == None:
-					if p.default != None:
-						value = p.default
-					else:
-						self.raptor.Error("%s undefined for '%s'",
-										  k, spec.name)
-						value = ""
-
-				parameters.append((k, value))
-				md5hash.update(value)
-
-			# parameters required by the interface
-			for p in iface.GetParams():
-				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 k,v in evaluator.ResolveMatching(g.patternre):
-					addparam(k,v,g.default)
-
-			hash = md5hash.hexdigest()
-			dupe = hash in self.hashes
-
-			self.hashes.add(hash)
-
-		# we only create a Makefile if we have a new FLM call to contribute,
-		# OR we are not pruning duplicates (guarding instead)
-		# OR we have some child specs that need something to include them.
-		if dupe and self.prune and not childSpecs:
-			return
-
-		makefileset = parentMakefileSet
-		# Create a new layer of makefiles?
-		if self.many:
-			makefileset = makefileset.createChild(spec.name)
-
-		if not (self.prune and dupe):
-			if self.prune:
-				guard = ""
-			else:
-				guard = "guard_" + hash
-
-		# generate the call to the FLM
-		if iface is not None:
-			makefileset.addCall(spec.name, config.name, iface.name, useAllInterfaces, iface.GetFLMIncludePath(), parameters, guard)
-
-		# recursive includes
-
-		for child in childSpecs:
-			self.WriteConfiguredSpec(makefileset, child, config, useAllInterfaces)
-
-		if self.many:
-			makefileset.close() # close child set of makefiles as we'll never see them again.
-
-	def Make(self, makefileset):
-		"run the make command"
-
-		if not self.valid:
-			return False
-	
-		if self.usetalon:
-			# Always use Talon since it does the XML not
-			# just descrambling
-			if not self.StartTalon() and not self.raptor.keepGoing:
-				self.Tidy()
-				return False
-		else:
-			# use the descrambler if we are doing a parallel build on
-			# a make engine which does not buffer each agent's output
-			if self.raptor.jobs > 1 and self.scrambled:
-				self.StartDescrambler()
-				if  not self.descrambler_started and not self.raptor.keepGoing:
-					self.Tidy()
-					return False
-			
-		# run any initialisation script
-		if self.initCommand:
-			self.raptor.Info("Running %s", self.initCommand)
-			if os.system(self.initCommand) != 0:
-				self.raptor.Error("Failed in %s", self.initCommand)
-				self.Tidy()
-				return False
-
-		# Save file names to a list, to allow the order to be reversed
-		fileName_list = list(self.makefileset.makefileNames())
-
-		# Iterate through args passed to raptor, searching for CLEAN or REALLYCLEAN
-		clean_flag = False
-		for arg in self.raptor.args:
-			clean_flag = ("CLEAN" in self.raptor.args) or \
-			            ("REALLYCLEAN" in self.raptor.args)
-
-		# Files should be deleted in the opposite order to the order
-		# they were built. So reverse file order if cleaning
-		if clean_flag:
-			fileName_list.reverse()
-
-		# Process each file in turn
-		for makefile in fileName_list:
-			if not os.path.exists(makefile):
-				self.raptor.Info("Skipping makefile %s", makefile)
-				continue
-			self.raptor.Info("Making %s", makefile)
-			# assemble the build command line
-			command = self.buildCommand
-
-			if self.makefileOption:
-				command += " " + self.makefileOption + " " + '"' + str(makefile) + '"'
-
-			if self.raptor.keepGoing and self.keepGoingOption:
-				command += " " + self.keepGoingOption
-
-			if self.raptor.jobs > 1 and self.jobsOption:
-				command += " " + self.jobsOption +" "+ str(self.raptor.jobs)
-
-			# Set default options first so that they can be overridden by
-			# ones set by the --mo option on the raptor commandline:
-			command += " " + self.defaultMakeOptions
-			# Can supply options on the commandline to override default settings.
-			if len(self.raptor.makeOptions) > 0:
-				command += " " + " ".join(self.raptor.makeOptions)
-
-			# Switch off dependency file including?
-			if self.raptor.noDependInclude:
-				command += " NO_DEPEND_INCLUDE=1"
-			
-			if self.usetalon:
-				# use the descrambler if we set it up
-				command += ' TALON_DESCRAMBLE=' 
-				if self.scrambled:
-					command += '1 '
-				else:
-					command += '0 '
-			else:
-				if self.descrambler_started:
-					command += ' DESCRAMBLE="' + self.descrambler + '"'
-			
-			# use the retry mechanism if requested
-			if self.raptor.tries > 1:
-				command += ' RECIPETRIES=' + str(self.raptor.tries)
-				command += ' TALON_RETRIES=' + str(self.raptor.tries - 1)
-
-			# targets go at the end, if the makefile supports them
-			addTargets = self.raptor.targets[:]
-			ignoreTargets = self.makefileset.ignoreTargets(makefile)
-			if addTargets and ignoreTargets:
-				for target in self.raptor.targets:
-					if re.match(ignoreTargets, target):
-						addTargets.remove(target)
-
-			if addTargets:
-				command += " " + " ".join(addTargets)
-
-			self.raptor.Info("Executing '%s'", command)
-
-			# execute the build.
-			# the actual call differs between Windows and Unix.
-			# bufsize=1 means "line buffered"
-			#
-			try:
-				makeenv=os.environ.copy()
-				if self.usetalon:
-					makeenv['TALON_RECIPEATTRIBUTES']="none"
-					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,
-									     stdout=subprocess.PIPE,
-									     stderr=subprocess.STDOUT,
-									     close_fds=True, env=makeenv, shell=True)
-				else:
-					p = subprocess.Popen(command, bufsize=65535,
-									     stdout=subprocess.PIPE,
-									     stderr=subprocess.STDOUT,
-									     universal_newlines=True, env=makeenv)
-				stream = p.stdout
-
-
-				line = " "
-				while line:
-					line = stream.readline()
-					self.raptor.out.write(line)
-
-				# should be done now
-				returncode = p.wait()
-
-
-				if returncode != 0  and not self.raptor.keepGoing:
-					self.Tidy()
-					return False
-
-			except Exception,e:
-				self.raptor.Error("Exception '%s' during '%s'", str(e), command)
-				self.Tidy()
-				return False
-
-		# run any shutdown script
-		if self.shutdownCommand != None and self.shutdownCommand != "":
-			self.raptor.Info("Running %s", self.shutdownCommand)
-			if os.system(self.shutdownCommand) != 0:
-				self.raptor.Error("Failed in %s", self.shutdownCommand)
-				self.Tidy()
-				return False
-
-		self.Tidy()
-		return True
-
-	def Tidy(self):
-		if self.usetalon:
-			self.StopTalon() 
-		else:
-			"clean up after the make command"
-			self.StopDescrambler()
-
-	def StartTalon(self):
-		# the talon command
-		beginning = raptor.hostplatform_dir + "/bin"
-		if "win" in raptor.hostplatform:
-			end = ".exe"
-		else:
-			end = ""
-			
-		self.talonctl = str(self.raptor.home.Append(beginning, "talonctl"+end))
-			
-		# generate a unique build number
-		random.seed()
-		looking = True
-		tries = 0
-		while looking and tries < 100:
-			self.buildID = raptor.name + str(random.getrandbits(32))
-			
-			command = self.talonctl + " start"
-
-			os.environ["TALON_BUILDID"] = self.buildID
-			self.raptor.Info("Running %s", command)
-			looking = (os.system(command) != 0)
-			tries += 1
-		if looking:
-			self.raptor.Error("Failed to initilaise the talon shell for this build")
-			self.talonctl = ""
-			return False
-		
-		return True
-	
-	def StopTalon(self):
-		if self.talonctl:
-			command = self.talonctl + " stop"
-			self.talonctl = ""
-			
-			self.raptor.Info("Running %s", command)
-			if os.system(command) != 0:
-				self.raptor.Error("Failed in %s", command)
-				return False
-			
-		return True
-	
-	def StartDescrambler(self):
-		# the descrambler command
-		beginning = raptor.hostplatform_dir + "/bin"
-		if "win" in raptor.hostplatform:
-			end = ".exe"
-		else:
-			end = ""
-
-		self.descrambler = str(self.raptor.home.Append(beginning, "sbs_descramble"+end))
-			
-		# generate a unique build number
-		random.seed()
-		looking = True
-		tries = 0
-		while looking and tries < 100:
-			buildID = raptor.name + str(random.getrandbits(32))
-
-			command = self.descrambler + " " + buildID + " start"
-			self.raptor.Info("Running %s", command)
-			looking = (os.system(command) != 0)
-			tries += 1
-
-		if looking:
-			self.raptor.Error("Failed to start the log descrambler")
-			self.descrambler_started = True
-			return False
-
-		self.descrambler_started = True
-		self.descrambler +=	" " + buildID
-
-		return  True
-
-	def StopDescrambler(self):
-		if self.descrambler_started:
-			command = self.descrambler + " stop"
-			self.descrambler = ""
-
-			self.raptor.Info("Running %s", command)
-			if os.system(command) != 0:
-				self.raptor.Error("Failed in %s", command)
-				return False
-		return True
-
-# raptor_make module functions
-
-
-# end of the raptor_make module
+#
+# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# raptor_make module
+# This module contains the classes that write and call Makefile wrappers.
+#
+
+import hashlib
+import os
+import random
+import raptor
+import raptor_data
+import raptor_utilities
+import raptor_version
+import re
+import subprocess
+import time
+from raptor_makefile import *
+
+# raptor_make module classes
+
+class MakeEngine(object):
+
+	def __init__(self, Raptor):
+		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:
+			avar = Raptor.cache.FindNamedAlias(engine)
+		elif engine in Raptor.cache.variants:
+			avar = Raptor.cache.FindNamedVariant(engine)
+		else:
+			Raptor.Error("No settings found for build engine '%s'", engine)
+			return
+					
+		# find the variant and extract the values
+		try:
+			units = avar.GenerateBuildUnits()
+			evaluator = Raptor.GetEvaluator( None, units[0] , gathertools=True)
+
+			# shell
+			self.shellpath = evaluator.Get("DEFAULT_SHELL")
+			usetalon_s = evaluator.Get("USE_TALON") 
+			self.usetalon = usetalon_s is not None and usetalon_s != ""
+			self.talonshell = str(evaluator.Get("TALON_SHELL"))
+			self.talontimeout = str(evaluator.Get("TALON_TIMEOUT"))
+			self.talonretries = str(evaluator.Get("TALON_RETRIES"))
+
+			# commands
+			self.initCommand = evaluator.Get("initialise")
+			self.buildCommand = evaluator.Get("build")
+			self.shutdownCommand = evaluator.Get("shutdown")
+
+			# options
+			self.makefileOption = evaluator.Get("makefile")
+			self.keepGoingOption = evaluator.Get("keep_going")
+			self.jobsOption = evaluator.Get("jobs")
+			self.defaultMakeOptions = evaluator.Get("defaultoptions")
+
+			# buffering
+			self.scrambled = (evaluator.Get("scrambled") == "true")
+
+			# check tool versions
+			Raptor.CheckToolset(evaluator, avar.name)
+			
+			# default targets (can vary per-invocation)
+			self.defaultTargets = Raptor.defaultTargets
+
+			# work out how to split up makefiles
+			try:
+				selectorNames = [ x.strip() for x in evaluator.Get("selectors").split(',') if x.strip() != "" ]
+				self.selectors = []
+
+
+				if len(selectorNames) > 0:
+					for name in selectorNames:
+						pattern = evaluator.Get(name.strip() + ".selector.iface")
+						target = evaluator.Get(name.strip() + ".selector.target")
+						ignoretargets = evaluator.Get(name.strip() + ".selector.ignoretargets")
+						self.selectors.append(MakefileSelector(name,pattern,target,ignoretargets))
+			except KeyError:
+				Raptor.Error("%s.selector.iface, %s.selector.target not found in make engine configuration", name, name)
+				self.selectors = []
+
+		except KeyError:
+			Raptor.Error("Bad '%s' configuration found.", engine)
+			self.valid = False
+			return
+
+		# there must at least be a build command...
+		if not self.buildCommand:
+				Raptor.Error("No build command for '%s'", engine)
+				self.valid = False
+
+
+		if self.usetalon:
+			talon_settings="""
+TALON_SHELL:=%s
+TALON_TIMEOUT:=%s
+TALON_RECIPEATTRIBUTES:=\
+ name='$$RECIPE'\
+ target='$$TARGET'\
+ host='$$HOSTNAME'\
+ layer='$$COMPONENT_LAYER'\
+ component='$$COMPONENT_NAME'\
+ bldinf='$$COMPONENT_META' mmp='$$PROJECT_META'\
+ config='$$SBS_CONFIGURATION' platform='$$PLATFORM'\
+ phase='$$MAKEFILE_GROUP' source='$$SOURCE
+export TALON_RECIPEATTRIBUTES TALON_SHELL TALON_TIMEOUT
+USE_TALON:=%s
+
+""" % (self.talonshell, self.talontimeout, "1")
+		else:
+			talon_settings="""
+USE_TALON:=
+
+"""
+		
+
+		self.makefile_prologue = """
+# generated by %s %s
+
+HOSTPLATFORM:=%s
+HOSTPLATFORM_DIR:=%s
+OSTYPE:=%s
+FLMHOME:=%s
+SHELL:=%s
+
+%s
+
+include %s
+
+""" 		% (  raptor.name, raptor_version.Version(),
+			 " ".join(raptor.hostplatform),
+			 raptor.hostplatform_dir,
+			 self.raptor.filesystem,
+			 str(self.raptor.systemFLM),
+			 self.shellpath,
+			 talon_settings,
+			 self.raptor.systemFLM.Append('globals.mk') )
+
+
+		self.makefile_epilogue = """
+
+include %s
+
+""" 			% (self.raptor.systemFLM.Append('final.mk') )
+
+	def Write(self, toplevel, specs, configs):
+		"""Generate a set of makefiles, or one big Makefile."""
+
+		if not self.valid:
+			return
+
+		self.toplevel = toplevel
+
+		# create the top-level makefiles
+
+		try:
+			self.makefileset = MakefileSet(directory = str(toplevel.Dir()),
+										   selectors = self.selectors,
+										   filenamebase = str(toplevel.File()),
+										   prologue = self.makefile_prologue,
+										   epilogue = self.makefile_epilogue,
+										   defaulttargets = self.defaultTargets)
+
+			# are we pruning duplicates?
+			self.prune = self.raptor.pruneDuplicateMakefiles
+			self.hashes = set()
+
+			# are we writing one Makefile or lots?
+			self.many = not self.raptor.writeSingleMakefile
+
+			# add a makefile for each spec under each config
+			config_makefileset = self.makefileset
+
+			for c in configs:
+				if self.many:
+					config_makefileset = self.makefileset.createChild(c.name)
+
+				# make sure the config_wide spec item is put out first so that it
+				# can affect everything.
+				ordered_specs=[]
+				config_wide_spec = None
+				for s in specs:
+					if s.name == "config_wide":
+						config_wide_spec = s
+					else:
+						ordered_specs.append(s)
+
+				if config_wide_spec is not None:
+					config_wide_spec.Configure(c)
+					self.WriteConfiguredSpec(config_makefileset, config_wide_spec, c, True)
+
+				for s in ordered_specs:
+					s.Configure(c)
+					self.WriteConfiguredSpec(config_makefileset, s, c, False)
+
+			self.makefileset.close()
+		except Exception,e:
+			self.raptor.Error("Failed to write makefile '%s': %s" % (str(toplevel),str(e)))
+
+
+	def WriteConfiguredSpec(self, parentMakefileSet, spec, config, useAllInterfaces):
+		# ignore this spec if it is empty
+		hasInterface = spec.HasInterface()
+		childSpecs = spec.GetChildSpecs()
+
+		if not hasInterface and not childSpecs:
+			return
+
+		parameters = []
+		dupe = True
+		iface = None
+		guard = None
+		if hasInterface:
+			# find the Interface (it may be a ref)
+			iface = spec.GetInterface()
+
+			if iface == None:
+				self.raptor.Error("No interface for '%s'", spec.name)
+				return
+
+			if iface.abstract:
+				self.raptor.Error("Abstract interface '%s' for '%s'",
+								  iface.name, spec.name)
+				return
+
+			# we need to guard the FLM call with a hash based on all the
+			# parameter values so that duplicate calls cannot be made.
+			# So we need to find all the values before we can write
+			# anything out.
+			md5hash = hashlib.md5()
+			md5hash.update(iface.name)
+
+			# we need an Evaluator to get parameter values for this
+			# Specification in the context of this Configuration
+			evaluator = self.raptor.GetEvaluator(spec, config)
+
+			def addparam(k, value, default):
+				if value == None:
+					if p.default != None:
+						value = p.default
+					else:
+						self.raptor.Error("%s undefined for '%s'",
+										  k, spec.name)
+						value = ""
+
+				parameters.append((k, value))
+				md5hash.update(value)
+
+			# parameters required by the interface
+			for p in iface.GetParams():
+				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 k,v in evaluator.ResolveMatching(g.patternre):
+					addparam(k,v,g.default)
+
+			hash = md5hash.hexdigest()
+			dupe = hash in self.hashes
+
+			self.hashes.add(hash)
+
+		# we only create a Makefile if we have a new FLM call to contribute,
+		# OR we are not pruning duplicates (guarding instead)
+		# OR we have some child specs that need something to include them.
+		if dupe and self.prune and not childSpecs:
+			return
+
+		makefileset = parentMakefileSet
+		# Create a new layer of makefiles?
+		if self.many:
+			makefileset = makefileset.createChild(spec.name)
+
+		if not (self.prune and dupe):
+			if self.prune:
+				guard = ""
+			else:
+				guard = "guard_" + hash
+
+		# generate the call to the FLM
+		if iface is not None:
+			makefileset.addCall(spec.name, config.name, iface.name, useAllInterfaces, iface.GetFLMIncludePath(), parameters, guard)
+
+		# recursive includes
+
+		for child in childSpecs:
+			self.WriteConfiguredSpec(makefileset, child, config, useAllInterfaces)
+
+		if self.many:
+			makefileset.close() # close child set of makefiles as we'll never see them again.
+
+	def Make(self, makefileset):
+		"run the make command"
+
+		if not self.valid:
+			return False
+	
+		if self.usetalon:
+			# Always use Talon since it does the XML not
+			# just descrambling
+			if not self.StartTalon() and not self.raptor.keepGoing:
+				self.Tidy()
+				return False
+		else:
+			# use the descrambler if we are doing a parallel build on
+			# a make engine which does not buffer each agent's output
+			if self.raptor.jobs > 1 and self.scrambled:
+				self.StartDescrambler()
+				if  not self.descrambler_started and not self.raptor.keepGoing:
+					self.Tidy()
+					return False
+			
+		# run any initialisation script
+		if self.initCommand:
+			self.raptor.Info("Running %s", self.initCommand)
+			if os.system(self.initCommand) != 0:
+				self.raptor.Error("Failed in %s", self.initCommand)
+				self.Tidy()
+				return False
+
+		# Save file names to a list, to allow the order to be reversed
+		fileName_list = list(self.makefileset.makefileNames())
+
+		# Iterate through args passed to raptor, searching for CLEAN or REALLYCLEAN
+		clean_flag = False
+		for arg in self.raptor.args:
+			clean_flag = ("CLEAN" in self.raptor.args) or \
+			            ("REALLYCLEAN" in self.raptor.args)
+
+		# Files should be deleted in the opposite order to the order
+		# they were built. So reverse file order if cleaning
+		if clean_flag:
+			fileName_list.reverse()
+
+		# Process each file in turn
+		for makefile in fileName_list:
+			if not os.path.exists(makefile):
+				self.raptor.Info("Skipping makefile %s", makefile)
+				continue
+			self.raptor.Info("Making %s", makefile)
+			# assemble the build command line
+			command = self.buildCommand
+
+			if self.makefileOption:
+				command += " " + self.makefileOption + " " + '"' + str(makefile) + '"'
+
+			if self.raptor.keepGoing and self.keepGoingOption:
+				command += " " + self.keepGoingOption
+
+			if self.raptor.jobs > 1 and self.jobsOption:
+				command += " " + self.jobsOption +" "+ str(self.raptor.jobs)
+
+			# Set default options first so that they can be overridden by
+			# ones set by the --mo option on the raptor commandline:
+			command += " " + self.defaultMakeOptions
+			# Can supply options on the commandline to override default settings.
+			if len(self.raptor.makeOptions) > 0:
+				command += " " + " ".join(self.raptor.makeOptions)
+
+			# Switch off dependency file including?
+			if self.raptor.noDependInclude:
+				command += " NO_DEPEND_INCLUDE=1"
+			
+			if self.usetalon:
+				# use the descrambler if we set it up
+				command += ' TALON_DESCRAMBLE=' 
+				if self.scrambled:
+					command += '1 '
+				else:
+					command += '0 '
+			else:
+				if self.descrambler_started:
+					command += ' DESCRAMBLE="' + self.descrambler + '"'
+			
+			# use the retry mechanism if requested
+			if self.raptor.tries > 1:
+				command += ' RECIPETRIES=' + str(self.raptor.tries)
+				command += ' TALON_RETRIES=' + str(self.raptor.tries - 1)
+
+			# targets go at the end, if the makefile supports them
+			addTargets = self.raptor.targets[:]
+			ignoreTargets = self.makefileset.ignoreTargets(makefile)
+			if addTargets and ignoreTargets:
+				for target in self.raptor.targets:
+					if re.match(ignoreTargets, target):
+						addTargets.remove(target)
+
+			if addTargets:
+				command += " " + " ".join(addTargets)
+
+			self.raptor.Info("Executing '%s'", command)
+
+			# execute the build.
+			# the actual call differs between Windows and Unix.
+			# bufsize=1 means "line buffered"
+			#
+			try:
+				makeenv=os.environ.copy()
+				if self.usetalon:
+					makeenv['TALON_RECIPEATTRIBUTES']="none"
+					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,
+									     stdout=subprocess.PIPE,
+									     stderr=subprocess.STDOUT,
+									     close_fds=True, env=makeenv, shell=True)
+				else:
+					p = subprocess.Popen(command, bufsize=65535,
+									     stdout=subprocess.PIPE,
+									     stderr=subprocess.STDOUT,
+									     universal_newlines=True, env=makeenv)
+				stream = p.stdout
+
+
+				line = " "
+				while line:
+					line = stream.readline()
+					self.raptor.out.write(line)
+
+				# should be done now
+				returncode = p.wait()
+
+
+				if returncode != 0  and not self.raptor.keepGoing:
+					self.Tidy()
+					return False
+
+			except Exception,e:
+				self.raptor.Error("Exception '%s' during '%s'", str(e), command)
+				self.Tidy()
+				return False
+
+		# run any shutdown script
+		if self.shutdownCommand != None and self.shutdownCommand != "":
+			self.raptor.Info("Running %s", self.shutdownCommand)
+			if os.system(self.shutdownCommand) != 0:
+				self.raptor.Error("Failed in %s", self.shutdownCommand)
+				self.Tidy()
+				return False
+
+		self.Tidy()
+		return True
+
+	def Tidy(self):
+		if self.usetalon:
+			self.StopTalon() 
+		else:
+			"clean up after the make command"
+			self.StopDescrambler()
+
+	def StartTalon(self):
+		# the talon command
+		beginning = raptor.hostplatform_dir + "/bin"
+		if "win" in raptor.hostplatform:
+			end = ".exe"
+		else:
+			end = ""
+			
+		self.talonctl = str(self.raptor.home.Append(beginning, "talonctl"+end))
+			
+		# generate a unique build number
+		random.seed()
+		looking = True
+		tries = 0
+		while looking and tries < 100:
+			self.buildID = raptor.name + str(random.getrandbits(32))
+			
+			command = self.talonctl + " start"
+
+			os.environ["TALON_BUILDID"] = self.buildID
+			self.raptor.Info("Running %s", command)
+			looking = (os.system(command) != 0)
+			tries += 1
+		if looking:
+			self.raptor.Error("Failed to initilaise the talon shell for this build")
+			self.talonctl = ""
+			return False
+		
+		return True
+	
+	def StopTalon(self):
+		if self.talonctl:
+			command = self.talonctl + " stop"
+			self.talonctl = ""
+			
+			self.raptor.Info("Running %s", command)
+			if os.system(command) != 0:
+				self.raptor.Error("Failed in %s", command)
+				return False
+			
+		return True
+	
+	def StartDescrambler(self):
+		# the descrambler command
+		beginning = raptor.hostplatform_dir + "/bin"
+		if "win" in raptor.hostplatform:
+			end = ".exe"
+		else:
+			end = ""
+
+		self.descrambler = str(self.raptor.home.Append(beginning, "sbs_descramble"+end))
+			
+		# generate a unique build number
+		random.seed()
+		looking = True
+		tries = 0
+		while looking and tries < 100:
+			buildID = raptor.name + str(random.getrandbits(32))
+
+			command = self.descrambler + " " + buildID + " start"
+			self.raptor.Info("Running %s", command)
+			looking = (os.system(command) != 0)
+			tries += 1
+
+		if looking:
+			self.raptor.Error("Failed to start the log descrambler")
+			self.descrambler_started = True
+			return False
+
+		self.descrambler_started = True
+		self.descrambler +=	" " + buildID
+
+		return  True
+
+	def StopDescrambler(self):
+		if self.descrambler_started:
+			command = self.descrambler + " stop"
+			self.descrambler = ""
+
+			self.raptor.Info("Running %s", command)
+			if os.system(command) != 0:
+				self.raptor.Error("Failed in %s", command)
+				return False
+		return True
+
+# raptor_make module functions
+
+
+# end of the raptor_make module
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/python/raptor_makefile.py
--- a/sbsv2/raptor/python/raptor_makefile.py	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/python/raptor_makefile.py	Mon Nov 16 09:46:46 2009 +0000
@@ -1,213 +1,213 @@
-#
-# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# makefile module
-# This module is for writing calls to Function-Like Makefiles
-#
-
-import re
-import os
-import generic_path
-
-class MakefileSelector(object):
-	"""A "query" which is used to separate some flm interface calls
-	  into separate makefile trees."""
-	def __init__(self, name="default", interfacepattern=None, defaulttarget=None, ignoretargets=None):
-		self.name=name
-		if interfacepattern is not None:
-			self.interfacepattern=re.compile(interfacepattern, re.I)
-		else:
-			self.interfacepattern=None
-		self.defaulttarget=defaulttarget
-		self.ignoretargets=ignoretargets
-
-class Makefile(object):
-	"""Representation of the file that is created from the build specification 
-	   tree.
-	"""
-	def __init__(self, directory, selector, parent=None, filenamebase="Makefile", prologue=None, epilogue=None, defaulttargets=None):
-		self.filenamebase = filenamebase
-		self.directory = directory
-		if selector.name != "":
-			extension = "." + selector.name
-		else:
-			extension = ""
-		self.filename = generic_path.Join(directory,filenamebase + extension)
-		self.selector = selector
-		self.parent = parent
-		self.childlist = []
-		self.file = None
-		self.prologue = prologue
-		self.epilogue = epilogue
-		self.defaulttargets = defaulttargets
-		self.dead = False
-
-	def open(self):
-		if self.dead:
-			raise Exception, "Attempt to reopen completed makefile %s " % (self.filename)
-
-		if self.file is None:
-			directory = self.filename.Dir()
-			if not (str(directory) == "" or directory.Exists()):
-				try:
-					os.makedirs(directory.GetLocalString())
-				except Exception,e:
-					raise Exception, "Cannot make directory '%s' for file '%s' in '%s': %s " % (str(directory),str(self.filename),str(self.directory),str(e))
-
-			self.file = open(str(self.filename),"w+")
-			
-			self.file.write('# GENERATED MAKEFILE : DO NOT EDIT\n\n')
-			if self.selector.defaulttarget:
-				self.file.write('MAKEFILE_GROUP:=%s\n.PHONY:: %s\n%s:: # Default target\n' \
-							% (self.selector.defaulttarget, self.selector.defaulttarget, self.selector.defaulttarget))
-			else:
-				self.file.write('MAKEFILE_GROUP:=DEFAULT\n')
-			if self.prologue != None:
-				self.file.write(self.prologue)
-				
-			if self.defaulttargets != None:
-				self.file.write('# dynamic default targets\n')
-				for defaulttarget in self.defaulttargets:
-					self.file.write('.PHONY:: %s\n' % defaulttarget)
-					self.file.write('%s:\n' % defaulttarget)
-				self.file.write('\n')
-			
-	def addChild(self, child):
-		self.open()
-		self.file.write("include %s\n" % child.filename)
-		child.open()
-
-	def createChild(self, subdir):
-		child = Makefile(str(self.filename.Dir().Append(subdir)), self.selector, self, self.filenamebase, self.prologue, self.epilogue, self.defaulttargets)
-		self.addChild(child)
-		child.open()
-		return child
-
-	def addCall(self, specname, configname, ifname, useAllInterfaces, flmpath, parameters, guard = None):
-		"""Add an FLM call to the makefile.
-			specname is the name of the build specification (e.g. the mmp name)
-			configname is the name of the configuration which this call is made for
-			flmpath is the absolute path to the flm
-			parameters is an array of tuples, (paramname, paramvalue)	
-			guard is a hash value that should be unique to the FLM call
-
-		   This call will return False if the ifname does not match the selector for 
-		   the makefile. e.g. it prevents one from adding a resource FLM call to a
-		   makefile which is selecting export FLM calls. Selection is overridden if
-		   useAllInterfaces is True.
-		"""
-		# create the directory if it does not exist
-
-		if self.selector.interfacepattern is not None:
-			ifmatch = self.selector.interfacepattern.search(ifname)
-			if ifmatch == None and useAllInterfaces == False:
-				return False
-
-		self.open()
-		# now we can write the values into the makefile
-		self.file.write("# call %s\n" % flmpath)
-		self.file.write("SBS_SPECIFICATION:=%s\n" % specname)
-		self.file.write("SBS_CONFIGURATION:=%s\n\n" % configname)
-
-		if guard:
-			self.file.write("ifeq ($(%s),)\n%s:=1\n\n" % (guard, guard))
-		
-		for (p, value) in parameters:
-			self.file.write("%s:=%s\n" % (p, value))
-	
-		self.file.write("include %s\n" % flmpath)
-		self.file.write("MAKEFILE_LIST:= # work around potential gnu make stack overflow\n\n")
-		
-		if guard:
-			self.file.write("endif\n\n")
-
-		return True
-
-	def close(self):
-		if self.file is not None:
-			if self.epilogue != None:
-				self.file.write(self.epilogue)
-			self.file.write('# END OF GENERATED MAKEFILE : DO NOT EDIT\n')
-			self.file.close()
-			self.file = None
-			self.dead = True
-
-	def __del__(self):
-		self.close()
-			
-		
-
-class MakefileSet(object):
-	grouperselector = MakefileSelector(name="")
-	defaultselectors = [ 
-		MakefileSelector("export", '\.export$', "EXPORT"),
-		MakefileSelector("bitmap", '\.bitmap$', "BITMAP"),
-		MakefileSelector("resource", '\.resource$', "RESOURCE"),
-		MakefileSelector("default", '\.(?!export$|bitmap$|resource$).*$', "ALL")
-		]
-
-	def __init__(self, directory, selectors=defaultselectors, makefiles=None, parent=None, filenamebase="Makefile", prologue=None, epilogue=None, defaulttargets=None):
-		self.directory = generic_path.Path(directory)
-		self.filenamebase = filenamebase
-		self.parent = parent
-		if makefiles is not None:
-			self.makefiles = makefiles
-		else:
-			self.makefiles = []
-			for sel in selectors:
-				self.makefiles.append(Makefile(directory, sel, None, filenamebase, prologue, epilogue, defaulttargets))
-		self.groupermakefile = Makefile(directory, MakefileSet.grouperselector, None, filenamebase, "# GROUPER MAKEFILE\n\nALL::\n\n", "\n")
-		
-		for mf in self.makefiles:
-			self.groupermakefile.addChild(mf)
-
-
-	def createChild(self, subdir):
-		"""Create a set of "sub" makefiles that are included by this set."""
-		newmakefiles = []
-		for mf in self.makefiles:
-			newmf = mf.createChild(subdir)
-			newmakefiles.append(newmf)
-
-		newset = MakefileSet(str(self.directory.Append(subdir)), None, newmakefiles, self, self.filenamebase)
-		self.groupermakefile.addChild(newset.groupermakefile)
-
-		return newset
-
-	def addCall(self, specname, configname, ifname, useAllInterfaces, flmpath, parameters, guard = None):
-		"""Find out which makefiles to write this FLM call to 
-		   and write it to those (e.g. the exports makefile) """
-		for f in self.makefiles:
-			f.addCall(specname, configname, ifname, useAllInterfaces, flmpath, parameters, guard)
-
-	def makefileNames(self):
-		for mf in self.makefiles:
-			yield str(mf.filename)
-	
-	def ignoreTargets(self, makefile):
-		"""Get hold of a makefile's selector based on its name and
-		   determine whether it ignores targets based on a regexp."""
-		for mf in self.makefiles:
-			filename = str(mf.filename)			
-			if filename == makefile:
-				return mf.selector.ignoretargets 
-		return None
-
-	def close(self):
-		for mf in self.makefiles:
-			mf.close()
-		self.groupermakefile.close()
-
-	def __del__(self):
-		self.close()
+#
+# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# makefile module
+# This module is for writing calls to Function-Like Makefiles
+#
+
+import re
+import os
+import generic_path
+
+class MakefileSelector(object):
+	"""A "query" which is used to separate some flm interface calls
+	  into separate makefile trees."""
+	def __init__(self, name="default", interfacepattern=None, defaulttarget=None, ignoretargets=None):
+		self.name=name
+		if interfacepattern is not None:
+			self.interfacepattern=re.compile(interfacepattern, re.I)
+		else:
+			self.interfacepattern=None
+		self.defaulttarget=defaulttarget
+		self.ignoretargets=ignoretargets
+
+class Makefile(object):
+	"""Representation of the file that is created from the build specification 
+	   tree.
+	"""
+	def __init__(self, directory, selector, parent=None, filenamebase="Makefile", prologue=None, epilogue=None, defaulttargets=None):
+		self.filenamebase = filenamebase
+		self.directory = directory
+		if selector.name != "":
+			extension = "." + selector.name
+		else:
+			extension = ""
+		self.filename = generic_path.Join(directory,filenamebase + extension)
+		self.selector = selector
+		self.parent = parent
+		self.childlist = []
+		self.file = None
+		self.prologue = prologue
+		self.epilogue = epilogue
+		self.defaulttargets = defaulttargets
+		self.dead = False
+
+	def open(self):
+		if self.dead:
+			raise Exception, "Attempt to reopen completed makefile %s " % (self.filename)
+
+		if self.file is None:
+			directory = self.filename.Dir()
+			if not (str(directory) == "" or directory.Exists()):
+				try:
+					os.makedirs(directory.GetLocalString())
+				except Exception,e:
+					raise Exception, "Cannot make directory '%s' for file '%s' in '%s': %s " % (str(directory),str(self.filename),str(self.directory),str(e))
+
+			self.file = open(str(self.filename),"w+")
+			
+			self.file.write('# GENERATED MAKEFILE : DO NOT EDIT\n\n')
+			if self.selector.defaulttarget:
+				self.file.write('MAKEFILE_GROUP:=%s\n.PHONY:: %s\n%s:: # Default target\n' \
+							% (self.selector.defaulttarget, self.selector.defaulttarget, self.selector.defaulttarget))
+			else:
+				self.file.write('MAKEFILE_GROUP:=DEFAULT\n')
+			if self.prologue != None:
+				self.file.write(self.prologue)
+				
+			if self.defaulttargets != None:
+				self.file.write('# dynamic default targets\n')
+				for defaulttarget in self.defaulttargets:
+					self.file.write('.PHONY:: %s\n' % defaulttarget)
+					self.file.write('%s:\n' % defaulttarget)
+				self.file.write('\n')
+			
+	def addChild(self, child):
+		self.open()
+		self.file.write("include %s\n" % child.filename)
+		child.open()
+
+	def createChild(self, subdir):
+		child = Makefile(str(self.filename.Dir().Append(subdir)), self.selector, self, self.filenamebase, self.prologue, self.epilogue, self.defaulttargets)
+		self.addChild(child)
+		child.open()
+		return child
+
+	def addCall(self, specname, configname, ifname, useAllInterfaces, flmpath, parameters, guard = None):
+		"""Add an FLM call to the makefile.
+			specname is the name of the build specification (e.g. the mmp name)
+			configname is the name of the configuration which this call is made for
+			flmpath is the absolute path to the flm
+			parameters is an array of tuples, (paramname, paramvalue)	
+			guard is a hash value that should be unique to the FLM call
+
+		   This call will return False if the ifname does not match the selector for 
+		   the makefile. e.g. it prevents one from adding a resource FLM call to a
+		   makefile which is selecting export FLM calls. Selection is overridden if
+		   useAllInterfaces is True.
+		"""
+		# create the directory if it does not exist
+
+		if self.selector.interfacepattern is not None:
+			ifmatch = self.selector.interfacepattern.search(ifname)
+			if ifmatch == None and useAllInterfaces == False:
+				return False
+
+		self.open()
+		# now we can write the values into the makefile
+		self.file.write("# call %s\n" % flmpath)
+		self.file.write("SBS_SPECIFICATION:=%s\n" % specname)
+		self.file.write("SBS_CONFIGURATION:=%s\n\n" % configname)
+
+		if guard:
+			self.file.write("ifeq ($(%s),)\n%s:=1\n\n" % (guard, guard))
+		
+		for (p, value) in parameters:
+			self.file.write("%s:=%s\n" % (p, value))
+	
+		self.file.write("include %s\n" % flmpath)
+		self.file.write("MAKEFILE_LIST:= # work around potential gnu make stack overflow\n\n")
+		
+		if guard:
+			self.file.write("endif\n\n")
+
+		return True
+
+	def close(self):
+		if self.file is not None:
+			if self.epilogue != None:
+				self.file.write(self.epilogue)
+			self.file.write('# END OF GENERATED MAKEFILE : DO NOT EDIT\n')
+			self.file.close()
+			self.file = None
+			self.dead = True
+
+	def __del__(self):
+		self.close()
+			
+		
+
+class MakefileSet(object):
+	grouperselector = MakefileSelector(name="")
+	defaultselectors = [ 
+		MakefileSelector("export", '\.export$', "EXPORT"),
+		MakefileSelector("bitmap", '\.bitmap$', "BITMAP"),
+		MakefileSelector("resource", '\.resource$', "RESOURCE"),
+		MakefileSelector("default", '\.(?!export$|bitmap$|resource$).*$', "ALL")
+		]
+
+	def __init__(self, directory, selectors=defaultselectors, makefiles=None, parent=None, filenamebase="Makefile", prologue=None, epilogue=None, defaulttargets=None):
+		self.directory = generic_path.Path(directory)
+		self.filenamebase = filenamebase
+		self.parent = parent
+		if makefiles is not None:
+			self.makefiles = makefiles
+		else:
+			self.makefiles = []
+			for sel in selectors:
+				self.makefiles.append(Makefile(directory, sel, None, filenamebase, prologue, epilogue, defaulttargets))
+		self.groupermakefile = Makefile(directory, MakefileSet.grouperselector, None, filenamebase, "# GROUPER MAKEFILE\n\nALL::\n\n", "\n")
+		
+		for mf in self.makefiles:
+			self.groupermakefile.addChild(mf)
+
+
+	def createChild(self, subdir):
+		"""Create a set of "sub" makefiles that are included by this set."""
+		newmakefiles = []
+		for mf in self.makefiles:
+			newmf = mf.createChild(subdir)
+			newmakefiles.append(newmf)
+
+		newset = MakefileSet(str(self.directory.Append(subdir)), None, newmakefiles, self, self.filenamebase)
+		self.groupermakefile.addChild(newset.groupermakefile)
+
+		return newset
+
+	def addCall(self, specname, configname, ifname, useAllInterfaces, flmpath, parameters, guard = None):
+		"""Find out which makefiles to write this FLM call to 
+		   and write it to those (e.g. the exports makefile) """
+		for f in self.makefiles:
+			f.addCall(specname, configname, ifname, useAllInterfaces, flmpath, parameters, guard)
+
+	def makefileNames(self):
+		for mf in self.makefiles:
+			yield str(mf.filename)
+	
+	def ignoreTargets(self, makefile):
+		"""Get hold of a makefile's selector based on its name and
+		   determine whether it ignores targets based on a regexp."""
+		for mf in self.makefiles:
+			filename = str(mf.filename)			
+			if filename == makefile:
+				return mf.selector.ignoretargets 
+		return None
+
+	def close(self):
+		for mf in self.makefiles:
+			mf.close()
+		self.groupermakefile.close()
+
+	def __del__(self):
+		self.close()
diff -r be27ed110b50 -r e1eecf4d390d sbsv2/raptor/python/raptor_meta.py
--- a/sbsv2/raptor/python/raptor_meta.py	Wed Oct 28 14:39:48 2009 +0000
+++ b/sbsv2/raptor/python/raptor_meta.py	Mon Nov 16 09:46:46 2009 +0000
@@ -1,3245 +1,3247 @@
-#
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: 
-# This module includes classes that process bld.inf and .mmp files to
-# generate Raptor build specifications
-#
-
-import copy
-import re
-import os.path
-import shutil
-import stat
-import hashlib
-import base64
-
-import raptor
-import raptor_data
-import raptor_utilities
-import raptor_xml
-import generic_path
-import subprocess
-import zipfile
-from mmpparser import *
-
-import time
-
-
-PiggyBackedBuildPlatforms = {'ARMV5':['GCCXML']}
-
-PlatformDefaultDefFileDir = {'WINSCW':'bwins',
-				  'ARMV5' :'eabi',
-				  'ARMV5SMP' :'eabi',
-				  'GCCXML':'eabi',
-				  'ARMV6':'eabi',
-				  'ARMV7' : 'eabi',
-				  'ARMV7SMP' : 'eabi'}
-
-def getVariantCfgDetail(aEPOCROOT, aVariantCfgFile):
-	"""Obtain pertinent build related detail from the Symbian variant.cfg file.
-
-	This variant.cfg file, usually located relative to $(EPOCROOT), contains:
-	(1) The $(EPOCROOT) relative location of the primary .hrh file used to configure the specific OS variant build
-	(2) A flag determining whether ARMV5 represents an ABIV1 or ABIV2 build (currently unused by Raptor)."""
-
-	variantCfgDetails = {}
-	variantCfgFile = None
-
-	try:
-		variantCfgFile = open(str(aVariantCfgFile))
-	except IOError, (number, message):
-		raise MetaDataError("Could not read variant configuration file "+str(aVariantCfgFile)+" ("+message+")")
-
-	for line in variantCfgFile.readlines():
-		if re.search('^(\s$|\s*#)', line):
-			continue
-		# Note that this detection of the .hrh file matches the command line build i.e. ".hrh" somewhere
-		# in the specified line
-		elif re.search('\.hrh', line, re.I):
-			variantHrh = line.strip()
-			if variantHrh.startswith('\\') or variantHrh.startswith('/'):
-				variantHrh = variantHrh[1:]
-			variantHrh = aEPOCROOT.Append(variantHrh)
-			variantCfgDetails['VARIANT_HRH'] = variantHrh
-		else:
-			lineContent = line.split()
-
-			if len(lineContent) == 1:
-				variantCfgDetails[lineContent.pop(0)] = 1
-			else:
-				variantCfgDetails[lineContent.pop(0)] = lineContent
-
-	variantCfgFile.close()
-
-	if not variantCfgDetails.has_key('VARIANT_HRH'):
-		raise MetaDataError("No variant file specified in "+str(aVariantCfgFile))
-	if not variantHrh.isFile():
-		raise MetaDataError("Variant file "+str(variantHrh)+" does not exist")
-
-	return variantCfgDetails
-
-def getOsVerFromKifXml(aPathToKifXml):
-	"""Obtain the OS version from the kif.xml file located at $EPOCROOT/epoc32/data/kif.xml.
-
-	If successful, the function returns a string such as "v95" to indicate 9.5; None is
-	returned if for any reason the function cannot determine the OS version."""
-
-	releaseTagName = "ki:release"
-	osVersion = None
-
-	import xml.dom.minidom
-
-	try:
-		# Parsed document object
-		kifDom = xml.dom.minidom.parse(str(aPathToKifXml))
-
-		# elements - the elements whose names are releaseTagName
-		elements = kifDom.getElementsByTagName(releaseTagName)
-
-		# There should be exactly one of the elements whose name is releaseTagName
-		# If more than one, osVersion is left as None, since the version should be
-		# unique to the kif.xml file
-		if len(elements) == 1:
-			osVersionTemp = elements[0].getAttribute("version")
-			osVersion = "v" + osVersionTemp.replace(".", "")
-
-		kifDom.unlink() # Clean up
-
-	except:
-		# There's no documentation on which exceptions are raised by these functions.
-		# We catch everything and assume any exception means there was a failure to
-		# determine OS version. None is returned, and the code will fall back
-		# to looking at the buildinfo.txt file.
-		pass
-
-	return osVersion
-
-def getOsVerFromBuildInfoTxt(aPathToBuildInfoTxt):
-	"""Obtain the OS version from the buildinfo.txt file located at $EPOCROOT/epoc32/data/buildinfo.txt.
-
-	If successful, the function returns a string such as "v95" to indicate 9.5; None is
-	returned if for any reason the function cannot determine the OS version.
-
-	The file $EPOCROOT/epoc32/data/buildinfo.txt is presumed to exist. The client code should
-	handle existance/non-existance."""
-
-	pathToBuildInfoTxt = str(aPathToBuildInfoTxt) # String form version of path to buildinfo.txt
-
-	# Open the file for reading; throw an exception if it could not be read - note that
-	# it should exist at this point.
-	try:
-		buildInfoTxt = open(pathToBuildInfoTxt)
-	except IOError, (number, message):
-		raise MetaDataError("Could not read buildinfo.txt file at" + pathToBuildInfoTxt + ": (" + message + ")")
-
-	# Example buildinfo.txt contents:
-	#
-	# DeviceFamily               100
-	# DeviceFamilyRev            0x900
-	# ManufacturerSoftwareBuild  M08765_Symbian_OS_v9.5
-	#
-	# Regexp to match the line containing the OS version
-	# Need to match things like M08765_Symbian_OS_v9.5 and M08765_Symbian_OS_vFuture
-	# So for the version, match everything except whitespace after v. Whitespace
-	# signifies the end of the regexp.
-	osVersionMatcher = re.compile('.*_Symbian_OS_v([^\s]*)', re.I)
-	osVersion = None
-
-	# Search for a regexp match over all the times in the file
-	# Note: if two or more lines match the search pattern then
-	# the latest match will overwrite the osVersion string.
-	for line in buildInfoTxt:
-		matchResult = osVersionMatcher.match(line)
-		if matchResult:
-			result = matchResult.groups()
-			osVersion = "v" +  str(reduce(lambda x, y: x + y, result))
-			osVersion = osVersion.replace(".", "")
-
-	buildInfoTxt.close() # Clean-up
-
-	return osVersion
-
-def getBuildableBldInfBuildPlatforms(aBldInfBuildPlatforms,
-									aDefaultOSBuildPlatforms,
-									aBaseDefaultOSBuildPlatforms,
-									aBaseUserDefaultOSBuildPlatforms):
-	"""Obtain a set of build platform names supported by a bld.inf file
-
-	Build platform deduction is based on both the contents of the PRJ_PLATFORMS section of
-	a bld.inf file together with a hard-coded set of default build platforms supported by
-	the build system itself."""
-
-	expandedBldInfBuildPlatforms = []
-	removePlatforms = set()
-
-	for bldInfBuildPlatform in aBldInfBuildPlatforms:
-		if bldInfBuildPlatform.upper() == "DEFAULT":
-			expandedBldInfBuildPlatforms.extend(aDefaultOSBuildPlatforms.split())
-		elif bldInfBuildPlatform.upper() == "BASEDEFAULT":
-			expandedBldInfBuildPlatforms.extend(aBaseDefaultOSBuildPlatforms.split())
-		elif bldInfBuildPlatform.upper() == "BASEUSERDEFAULT":
-			expandedBldInfBuildPlatforms.extend(aBaseUserDefaultOSBuildPlatforms.split())
-		elif bldInfBuildPlatform.startswith("-"):
-			removePlatforms.add(bldInfBuildPlatform.lstrip("-").upper())
-		else:
-			expandedBldInfBuildPlatforms.append(bldInfBuildPlatform.upper())
-
-	if len(expandedBldInfBuildPlatforms) == 0:
-		expandedBldInfBuildPlatforms.extend(aDefaultOSBuildPlatforms.split())
-
-	# make a set of platforms that can be built
-	buildableBldInfBuildPlatforms = set(expandedBldInfBuildPlatforms)
-
-	# Add platforms that are buildable by virtue of the presence of another
-	for piggyBackedPlatform in PiggyBackedBuildPlatforms:
-		if piggyBackedPlatform in buildableBldInfBuildPlatforms:
-			buildableBldInfBuildPlatforms.update(PiggyBackedBuildPlatforms.get(piggyBackedPlatform))
-
-	# Remove platforms that were negated
-	buildableBldInfBuildPlatforms -= removePlatforms
-
-	return buildableBldInfBuildPlatforms
-
-
-def getPreProcessorCommentDetail (aPreProcessorComment):
-	"""Takes a preprocessor comment and returns an array containing the filename and linenumber detail."""
-
-	commentDetail = []
-	commentMatch = re.search('# (?P\d+) "(?P.*)"', aPreProcessorComment)
-
-	if commentMatch:
-		filename = commentMatch.group('FILENAME')
-		filename = os.path.abspath(filename)
-		filename = re.sub(r'\\\\', r'\\', filename)
-		filename = re.sub(r'//', r'/', filename)
-		filename = generic_path.Path(filename)
-		linenumber = int (commentMatch.group('LINENUMBER'))
-
-		commentDetail.append(filename)
-		commentDetail.append(linenumber)
-
-	return commentDetail
-
-
-# Classes
-
-class MetaDataError(Exception):
-	"""Fatal error wrapper, to be thrown directly back to whatever is calling."""
-
-	def __init__(self, aText):
-		self.Text = aText
-	def __str__(self):
-		return repr(self.Text)
-
-
-class PreProcessedLine(str):
-	"""Custom string class that accepts filename and line number information from
-	a preprocessed context."""
-
-	def __new__(cls, value, *args, **keywargs):
-		return str.__new__(cls, value)
-
-	def __init__(self, value, aFilename, aLineNumber):
-		self.filename = aFilename
-		self.lineNumber = aLineNumber
-
-	def getFilename (self):
-		return self.filename
-
-	def getLineNumber (self):
-		return self.lineNumber
-
-class PreProcessor(raptor_utilities.ExternalTool):
-	"""Preprocessor wrapper suitable for Symbian metadata file processing."""
-
-	def __init__(self, aPreProcessor,
-				 aStaticOptions,
-				 aIncludeOption,
-				 aMacroOption,
-				 aPreIncludeOption,
-				 aRaptor):
-		raptor_utilities.ExternalTool.__init__(self, aPreProcessor)
-		self.__StaticOptions = aStaticOptions
-		self.__IncludeOption = aIncludeOption
-		self.__MacroOption = aMacroOption
-		self.__PreIncludeOption = aPreIncludeOption
-
-		self.filename = ""
-		self.__Macros = []
-		self.__IncludePaths = []
-		self.__PreIncludeFile = ""
-		self.raptor = aRaptor
-
-	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)
-
-			# the actual call differs between Windows and Unix
-			if raptor_utilities.getOSFileSystem() == "unix":
-				p = subprocess.Popen(commandline, \
-									 shell=True, bufsize=65535, \
-									 stdin=subprocess.PIPE, \
-									 stdout=subprocess.PIPE, \
-									 stderr=subprocess.PIPE, \
-									 close_fds=True)
-			else:
-				p = subprocess.Popen(commandline, \
-									 bufsize=65535, \
-									 stdin=subprocess.PIPE, \
-									 stdout=subprocess.PIPE, \
-									 stderr=subprocess.PIPE, \
-									 universal_newlines=True)
-
-			# run the command and wait for all the output
-			(self._ExternalTool__Output, errors) = p.communicate()
-
-			if self.raptor.debugOutput:
-				self.raptor.Debug("Preprocessing Start %s", str(sourcefilename))
-				self.raptor.Debug("Output:\n%s", self._ExternalTool__Output)
-				self.raptor.Debug("Errors:\n%s", errors)
-				self.raptor.Debug("Preprocessing End %s", str(sourcefilename))
-
-			incRE = re.compile("In file included from")
-			fromRE = re.compile(r"\s+from")
-			warningRE = re.compile("warning:|pasting.+token|from.+:")
-			remarkRE = re.compile("no newline at end of file|does not give a valid preprocessing token")
-
-			actualErr = False
-			if errors != "":
-				for error in errors.splitlines():
-					if incRE.search(error) or fromRE.search(error):
-						continue
-					if not remarkRE.search(error):
-						if warningRE.search(error):
-							self.raptor.Warn("%s: %s", tool, error)
-						else:
-							self.raptor.Error("%s: %s", tool, error)
-							actualErr = True
-			if actualErr:
-				raise MetaDataError("Errors in %s" % str(sourcefilename))
-
-		except Exception,e:
-			raise MetaDataError("Preprocessor exception: %s" % str(e))
-
-		return 0	# all OK
-
-	def setMacros(self, aMacros):
-		self.__Macros = aMacros
-
-	def addMacro(self, aMacro):
-		self.__Macros.append(aMacro)
-
-	def addMacros(self, aMacros):
-		self.__Macros.extend(aMacros)
-
-	def getMacros(self):
-		return self.__Macros
-
-
-	def addIncludePath(self, aIncludePath):
-		p = str(aIncludePath)
-		if p == "":
-			self.raptor.Warn("attempt to set an empty preprocessor include path for %s" % str(self.filename))
-		else:
-			self.__IncludePaths.append(p)
-
-	def addIncludePaths(self, aIncludePaths):
-		for path in aIncludePaths:
-			self.addIncludePath(path)
-
-	def setIncludePaths(self, aIncludePaths):
-		self.__IncludePaths = []
-		self.addIncludePaths(aIncludePaths)
-
-	def setPreIncludeFile(self, aPreIncludeFile):
-		self.__PreIncludeFile = aPreIncludeFile
-
-	def preprocess(self):
-		preProcessorCall = self.__constructPreProcessorCall()
-		returnValue = self.call(preProcessorCall, self.filename)
-
-		return self.getOutput()
-
-	def __constructPreProcessorCall(self):
-
-		call = self.__StaticOptions
-
-		if self.__PreIncludeFile:
-			call += " " + self.__PreIncludeOption
-			call += " " + str(self.__PreIncludeFile)
-
-		for macro in self.__Macros:
-			call += " " + self.__MacroOption + macro
-
-		for includePath in self.__IncludePaths:
-			call += " " + self.__IncludeOption
-			call += " " + str(includePath)
-
-		return call
-
-
-class MetaDataFile(object):
-	"""A generic representation of a Symbian metadata file
-
-	Symbian metadata files are subject to preprocessing, primarily with macros based
-	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):
-		"""
-		@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 log 		A class with Debug(), Info() and Error() methods
-		"""
-		self.filename = aFilename
-		self.__RootLocation = aRootLocation
-		# Dictionary with key of build platform and a text string of processed output as values
-		self.__PreProcessedContent = {}
-		self.log = log
-
-		self.__gnucpp = gnucpp
-		if gnucpp is None:
-			raise ValueError('gnucpp must be set')
-
-	def depspath(self, platform):
-	   """ Where does dependency information go relative to platform's SBS_BUILD_DIR?
-	       Subclasses should redefine this
-	   """
-	   return str(platform['SBS_BUILD_DIR']) + "/" + str(self.__RootLocation) + "." + platform['key_md5'] + ".d"
-
-	def getContent(self, aBuildPlatform):
-
-		key = aBuildPlatform['key']
-
-		config_macros = []
-
-		adepfilename = self.depspath(aBuildPlatform)
-		generateDepsOptions = ""
-		if adepfilename:
-
-			if raptor_utilities.getOSPlatform().startswith("win"):
-				metatarget = "$(PARSETARGET)"
-			else:
-				metatarget = "'$(PARSETARGET)'"
-			generateDepsOptions = "-MD -MF%s -MT%s" % (adepfilename, metatarget)
-			aBuildPlatform['METADEPS'].append((adepfilename, metatarget))
-			try:
-				os.makedirs(os.path.dirname(adepfilename))
-			except Exception, e:
-				self.log.Debug("Couldn't make bldinf outputpath for dependency generation")
-
-		config_macros = (aBuildPlatform['PLATMACROS']).split()
-
-		if not key in self.__PreProcessedContent:
-
-			preProcessor = PreProcessor(self.__gnucpp, '-undef -nostdinc ' + generateDepsOptions + ' ',
-										'-I', '-D', '-include', self.log)
-			preProcessor.filename = self.filename
-
-			# always have the current directory on the include path
-			preProcessor.addIncludePath('.')
-
-			# the SYSTEMINCLUDE directories defined in the build config
-			# should be on the include path. This is added mainly to support
-			# Feature Variation as SYSTEMINCLUDE is usually empty at this point.
-			systemIncludes = aBuildPlatform['SYSTEMINCLUDE']
-			if systemIncludes:
-				preProcessor.addIncludePaths(systemIncludes.split())
-
-			preInclude = aBuildPlatform['VARIANT_HRH']
-
-			# for non-Feature Variant builds, the directory containing the HRH should
-			# be on the include path
-			if not aBuildPlatform['ISFEATUREVARIANT']:
-				preProcessor.addIncludePath(preInclude.Dir())
-
-			# and EPOCROOT/epoc32/include
-			preProcessor.addIncludePath(aBuildPlatform['EPOCROOT'].Append('epoc32/include'))
-
-			# and the directory containing the bld.inf file
-			if self.__RootLocation is not None and str(self.__RootLocation) != "":
-				preProcessor.addIncludePath(self.__RootLocation)
-
-			# and the directory containing the file we are processing
-			preProcessor.addIncludePath(self.filename.Dir())
-
-			# there is always a pre-include file
-			preProcessor.setPreIncludeFile(preInclude)
-
-			macros = ["SBSV2"]
-
-			if config_macros:
-				macros.extend(config_macros)
-
-			if macros:
-				for macro in macros:
-					preProcessor.addMacro(macro + "=_____" +macro)
-
-			# extra "raw" macros that do not need protecting
-			preProcessor.addMacro("__GNUC__=3")
-
-			preProcessorOutput = preProcessor.preprocess()
-
-			# Resurrect preprocessing replacements
-			pattern = r'([\\|/]| |) ?_____(('+macros[0]+')'
-			for macro in macros[1:]:
-				pattern += r'|('+macro+r')'
-
-			pattern += r'\s*)'
-			# Work on all Macros in one substitution.
-			text = re.sub(pattern, r"\1\2", preProcessorOutput)
-			text = re.sub(r"\n[\t ]*", r"\n", text)
-
-			self.__PreProcessedContent[key] = text
-
-		return self.__PreProcessedContent[key]
-
-class MMPFile(MetaDataFile):
-	"""A generic representation of a Symbian metadata file
-
-	Symbian metadata files are subject to preprocessing, primarily with macros based
-	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):
-		"""
-		@param aFilename	An MMP, bld.inf or other preprocessable build spec file
-		@param gnucpp 		location of GNU CPP
-		@param bldinf   	the bldinf file that this mmp comes from
-		@param log 			A class with Debug(), Info() and Error() methods
-		"""
-		super(MMPFile, self).__init__(aFilename, gnucpp, str(bldinf.filename.Dir()), log)
-		self.__bldinf = bldinf
-
-		self.__gnucpp = gnucpp
-		if gnucpp is None:
-			raise ValueError('gnucpp must be set')
-
-	def depspath(self, platform):
-	   """ Where does dependency information go relative to platform's SBS_BUILD_DIR?
-	       Subclasses should redefine this
-	   """
-	   return self.__bldinf.outputpath(platform) + "/" + self.filename.File() + '.' + platform['key_md5'] + ".d"
-
-class Export(object):
-	"""Single processed PRJ_EXPORTS or PRJ_TESTEXPORTS entry from a bld.inf file"""
-
-	def getPossiblyQuotedStrings(cls,spec):
-		""" 	Split a string based on whitespace
-			but keep double quoted substrings together.
-		"""
-		inquotes=False
-		intokengap=False
-		sourcedest=[]
-		word = 0
-		for c in spec:
-			if c == '"':
-				if inquotes:
-					inquotes = False
-					word += 1
-					intokengap = True
-				else:
-					inquotes = True
-					intokengap = False
-				pass
-			elif c == ' ' or c == '\t':
-				if inquotes:
-					if len(sourcedest) == word:
-						sourcedest.append(c)
-					else:
-						sourcedest[word] += c
-				else:
-					if intokengap:
-						# gobble unquoted spaces
-						pass
-					else:
-						word += 1
-						intokengap=True
-				pass
-			else:
-				intokengap = False
-				if len(sourcedest) == word:
-					sourcedest.append(c)
-				else:
-					sourcedest[word] += c
-
-		return sourcedest
-
-	getPossiblyQuotedStrings = classmethod(getPossiblyQuotedStrings)
-
-
-	def __init__(self, aBldInfFile, aExportsLine, aType):
-		"""
-		Rules from the OS library for convenience:
-
-		For PRJ_TESTEXPORTS
-		source_file_1 [destination_file]
-		source_file_n [destination_file]
-		If the source file is listed with a relative path, the path will
-	 	  be considered relative to the directory containing the bld.inf file.
-		If a destination file is not specified, the source file will be copied
-		  to the directory containing the bld.inf file.
-		If a relative path is specified with the destination file, the path
-		  will be considered relative to directory containing the bld.inf file.
-
-		For PRJ_EXPORTS
-		source_file_1 [destination_file]
-		source_file_n [destination_file]
-		:zip zip_file [destination_path]
-
-		Note that:
-		If a source file is listed with a relative path, the path will be
-		considered relative to the directory containing the bld.inf file.
-
-		If a destination file is not specified, the source file will be copied
-		to epoc32\include\.
-
-		If a destination file is specified with the relative path, the path will
-		be considered relative to directory epoc32\include\.
-
-		If a destination begins with a drive letter, then the file is copied to
-		epoc32\data\\. For example,
-
-			mydata.dat e:\appdata\mydata.dat
-			copies mydata.dat to epoc32\data\e\appdata\mydata.dat.
-			You can use any driveletter between A and Z.
-
-		A line can start with the preface :zip. This instructs the build tools
-		to unzip the specified zip file to the specified destination path. If a
-		destination path is not specified, the source file will be unzipped in
-		the root directory.
-
-
-		"""
-
-		# Work out what action is required - unzip or copy?
-		action = "copy"
-		typematch = re.match(r'^\s*(?P:zip\s+)?(?P[^\s].*[^\s])\s*$',aExportsLine, re.I)
-
-		spec = typematch.group('spec')
-		if spec == None:
-			raise ValueError('must specify at least a source file for an export')
-
-		if typematch.group('type') is not None:
-			action = "unzip"
-
-		# Split the spec into source and destination but take care
-		# to allow filenames with quoted strings.
-		exportEntries = Export.getPossiblyQuotedStrings(spec)
-
-		# Get the source path as specified by the bld.inf
-		source_spec = exportEntries.pop(0).replace(' ','%20')
-
-		# Resolve the source file
-		sourcepath = generic_path.Path(raptor_utilities.resolveSymbianPath(str(aBldInfFile), source_spec))
-
-		# Find it if the case of the filename is wrong:
-		# Carry on even if we don't find it
-		foundfile = sourcepath.FindCaseless()
-		if foundfile != None:
-			source = str(foundfile).replace(' ','%20')
-		else:
-			source = str(sourcepath).replace(' ','%20')
-
-
-		# Get the destination path as specified by the bld.inf
-		if len(exportEntries) > 0:
-			dest_spec = exportEntries.pop(0).replace(' ','%20')
-		else:
-			dest_spec = None
-		# Destination list - list of destinations. For the WINSCW resource building stage,
-		# files exported to the emulated drives and there are several locations, for example,
-		# PRJ_[TEST]EXPORTS
-		# 1234ABCD.SPD		z:/private/10009876/policy/1234ABCD.spd
-		# needs to end up copied in
-		# epoc32/data/z/private/10009876/policy/1234ABCD.spd *and* in
-		# epoc32/release/winscw/udeb/z/private/10009876/policy/1234ABCD.spd *and* in
-		# epoc32/release/winscw/urel/z/private/10009876/policy/1234ABCD.spd
-		dest_list = []
-
-		# Resolve the destination if one is specified
-		if dest_spec:
-			# check for troublesome characters
-			if ':' in dest_spec and not re.search('^[a-z]:', dest_spec, re.I):
-				raise ValueError("invalid filename " + dest_spec)
-
-			dest_spec = dest_spec.replace(' ','%20')
-			aSubType=""
-			if action == "unzip":
-				aSubType=":zip"
-				dest_spec = dest_spec.rstrip("\\/")
-
-			# Get the export destination(s) - note this can be a list of strings or just a string.
-			dest_list = raptor_utilities.resolveSymbianPath(str(aBldInfFile), dest_spec, aType, aSubType)
-
-			def process_dest(aDest):
-				if dest_spec.endswith('/') or  dest_spec.endswith('\\'):
-					m = generic_path.Path(source)
-					aDest += '/'+m.File()
-				return aDest
-
-			if isinstance(dest_list, list):
-				# Process each file in the list
-				dest_list = map(process_dest, dest_list)
-			else:
-				# Process the single destination
-				dest_list = process_dest(dest_list)
-
-		else:
-			# No destination was specified so we assume an appropriate one
-
-			dest_filename=generic_path.Path(source).File()
-
-			if aType == "PRJ_EXPORTS":
-				if action == "copy":
-					destination = '$(EPOCROOT)/epoc32/include/'+dest_filename
-				elif action == "unzip":
-					destination = '$(EPOCROOT)'
-			elif aType == "PRJ_TESTEXPORTS":
-				d = aBldInfFile.Dir()
-				if action == "copy":
-					destination = str(d.Append(dest_filename))
-				elif action == "unzip":
-					destination = "$(EPOCROOT)"
-			else:
-				raise ValueError("Export type should be 'PRJ_EXPORTS' or 'PRJ_TESTEXPORTS'. It was: "+str(aType))
-
-
-		self.__Source = source
-		if len(dest_list) > 0: # If the list has length > 0, this means there are several export destinations.
-			self.__Destination = dest_list
-		else: # Otherwise the list has length zero, so there is only a single export destination.
-			self.__Destination = destination
-		self.__Action = action
-
-	def getSource(self):
-		return self.__Source
-
-	def getDestination(self):
-		return self.__Destination # Note that this could be either a list, or a string, depending on the export destination
-
-	def getAction(self):
-		return self.__Action
-
-class ExtensionmakefileEntry(object):
-	def __init__(self, aGnuLine, aBldInfFile, tmp):
-
-		self.__BldInfFile = aBldInfFile
-		bldInfLocation = self.__BldInfFile.Dir()
-		biloc = str(bldInfLocation)
-		extInfLocation = tmp.filename.Dir()
-		eiloc = str(extInfLocation)
-
-		if eiloc is None or eiloc == "":
-			eiloc="." # Someone building with a relative raptor path
-		if biloc is None or biloc == "":
-			biloc="." # Someone building with a relative raptor path
-
-		self.__StandardVariables = {}
-		# Relative step-down to the root - let's try ignoring this for now, as it
-		# should amount to the same thing in a world where absolute paths are king
-		self.__StandardVariables['TO_ROOT'] = ""
-		# Top-level bld.inf location
-		self.__StandardVariables['TO_BLDINF'] = biloc
-		self.__StandardVariables['EXTENSION_ROOT'] = eiloc
-
-		# Get the directory and filename from the full path containing the extension makefile
-		self.__FullPath = generic_path.Join(eiloc,aGnuLine)
-		self.__FullPath = self.__FullPath.GetLocalString()
-		self.__Filename = os.path.split(self.__FullPath)[1]
-		self.__Directory = os.path.split(self.__FullPath)[0]
-
-	def getMakefileName(self):
-		return self.__Filename
-
-	def getMakeDirectory(self):
-		return self.__Directory
-
-	def getStandardVariables(self):
-		return self.__StandardVariables
-
-class Extension(object):
-	"""Single processed PRJ_EXTENSIONS or PRJ_TESTEXTENSIONS START EXTENSIONS...END block
-	from a bld.inf file"""
-
-	def __init__(self, aBldInfFile, aStartLine, aOptionLines, aBuildPlatform, aRaptor):
-		self.__BldInfFile = aBldInfFile
-		self.__Options = {}
-		self.interface = ""
-		self.__Raptor = aRaptor
-
-		makefile = ""
-		makefileMatch = re.search(r'^\s*START EXTENSION\s+(?P\S+)\s*(?P\S*)$', aStartLine, re.I)
-
-		self.__RawMakefile = ""
-
-		if (makefileMatch):
-			self.__RawMakefile = makefileMatch.group('MAKEFILE')
-			self.nametag = makefileMatch.group('NAMETAG').lower()
-
-			# Ensure all \'s are translated into /'s if required
-			self.interface = self.__RawMakefile
-			self.interface = self.interface.replace("\\", "/").replace("/", ".")
-
-		# To support standalone testing, '$(' prefixed TEMs  are assumed to  start with
-		# a makefile variable and hence be fully located in FLM operation
-		if self.__RawMakefile.startswith("$("):
-			self.__Makefile = self.__RawMakefile + ".mk"
-		else:
-			self.__Makefile = '$(MAKEFILE_TEMPLATES)/' + self.__RawMakefile + ".mk"
-
-		for optionLine in aOptionLines:
-			optionMatch = re.search(r'^\s*(OPTION\s+)?(?P\S+)\s+(?P\S+.*)$',optionLine, re.I)
-			if optionMatch:
-				self.__Options[optionMatch.group('VARIABLE').upper()] = optionMatch.group('VALUE')
-
-		bldInfLocation = self.__BldInfFile.Dir()
-
-		biloc = str(bldInfLocation)
-		if biloc is None or biloc == "":
-			biloc="." # Someone building with a relative raptor path
-
-		extInfLocation = aStartLine.filename.Dir()
-
-		eiloc = str(extInfLocation)
-		if eiloc is None or eiloc == "":
-			eiloc="." # Someone building with a relative raptor path
-
-		self.__StandardVariables = {}
-		# Relative step-down to the root - let's try ignoring this for now, as it
-		# should amount to the same thing in a world where absolute paths are king
-		self.__StandardVariables['TO_ROOT'] = ""
-		# Top-level bld.inf location
-		self.__StandardVariables['TO_BLDINF'] = biloc
-		# Location of bld.inf file containing the current EXTENSION block
-		self.__StandardVariables['EXTENSION_ROOT'] = eiloc
-
-		# If the interface exists, this means it's not a Template Extension Makefile so don't look for a .meta file for it;
-		# so do nothing if it's not a template extension makefile
-		try:
-			self.__Raptor.cache.FindNamedInterface(str(self.interface), aBuildPlatform['CACHEID'])
-		except KeyError: # This means that this Raptor doesn't have the interface self.interface, so we are in a TEM
-			# Read extension meta file and get default options from it.  The use of TEM meta file is compulsory if TEM is used
-			metaFilename = "%s/epoc32/tools/makefile_templates/%s.meta" % (aBuildPlatform['EPOCROOT'], self.__RawMakefile)
-			metaFile = None
-			try:
-				metaFile = open(metaFilename, "r")
-			except IOError, e:
-				self.__warn("Extension: %s - cannot open Meta file: %s" % (self.__RawMakefile, metaFilename))
-
-			if metaFile:
-				for line in metaFile.readlines():
-					defaultOptionMatch = re.search(r'^OPTION\s+(?P\S+)\s+(?P\S+.*)$',line, re.I)
-					if defaultOptionMatch and defaultOptionMatch.group('VARIABLE').upper() not in self.__Options.keys():
-						self.__Options[defaultOptionMatch.group('VARIABLE').upper()] = defaultOptionMatch.group('VALUE')
-
-				metaFile.close()
-
-	def __warn(self, format, *extras):
-		if (self.__Raptor):
-			self.__Raptor.Warn(format, *extras)
-
-	def getIdentifier(self):
-		return re.sub (r'\\|\/|\$|\(|\)', '_', self.__RawMakefile)
-
-	def getMakefile(self):
-		return self.__Makefile
-
-	def getOptions(self):
-		return self.__Options
-
-	def getStandardVariables(self):
-		return self.__StandardVariables
-
-class MMPFileEntry(object):
-	def __init__(self, aFilename, aTestOption, aARMOption):
-		self.filename = aFilename
-		self.testoption = aTestOption
-		if aARMOption:
-			self.armoption = True
-		else:
-			self.armoption = False
-
-
-class BldInfFile(MetaDataFile):
-	"""Representation of a Symbian bld.inf file"""
-
-	def __init__(self, aFilename, gnucpp, log=None):
-		MetaDataFile.__init__(self, aFilename, gnucpp, None, log)
-		self.__Raptor = log
-		self.testManual = 0
-		self.testAuto = 0
-	# Generic
-
-	def getBuildPlatforms(self, aBuildPlatform):
-		platformList = []
-
-		for platformLine in self.__getSection(aBuildPlatform, 'PRJ_PLATFORMS'):
-			for platformEntry in platformLine.split():
-				platformList.append(platformEntry)
-
-		return platformList
-
-	# Build Platform Specific
-	def getMMPList(self, aBuildPlatform, aType="PRJ_MMPFILES"):
-		mmpFileList=[]
-		gnuList = []
-		makefileList = []
-		extFound = False
-		m = None
-
-		hashValue = {'mmpFileList': [] , 'gnuList': [], 'makefileList' : []}
-
-		for mmpFileEntry in self.__getSection(aBuildPlatform, aType):
-
-			actualBldInfRoot = mmpFileEntry.getFilename()
-			n = re.match('\s*(?P(GNUMAKEFILE|N?MAKEFILE))\s+(?P[^ ]+)\s*(support|manual)?\s*(?P\S+.*)?\s*$',mmpFileEntry,re.I)
-			if n:
-
-				if (n.groupdict()['invalid']):
-					self.log.Error("%s (%d) : invalid .mmp file qualifier \"%s\"", mmpFileEntry.filename, mmpFileEntry.getLineNumber(), n.groupdict()['invalid'])
-				if raptor_utilities.getOSFileSystem() == "unix":
-					self.log.Warn("NMAKEFILE/GNUMAKEFILE/MAKEFILE keywords not supported on Linux")
-				else:
-					extmakefilearg = n.groupdict()['extmakefile']
-					bldInfDir = actualBldInfRoot.Dir()
-					extmakefilename = bldInfDir.Append(extmakefilearg)
-					extmakefile = ExtensionmakefileEntry(extmakefilearg, self.filename, mmpFileEntry)
-
-					if (n.groupdict()['makefiletype']).upper() == "GNUMAKEFILE":
-						gnuList.append(extmakefile)
-					else:
-						makefileList.append(extmakefile)
-			else:
-				# Currently there is only one possible option - build as arm.
-				# For TESTMMPFILES, the supported options are support, tidy, ignore, manual and build as arm
-				if aType.upper()=="PRJ_TESTMMPFILES":
-					if re.match('\s*(?P[^ ]+)\s*(?Pbuild_as_arm)?\s*(?Psupport)?\s*(?Pignore)?\s*(?Ptidy)?\s*(?Pmanual)?\s*(?P\S+.*)?\s*$', mmpFileEntry, re.I):
-						m = re.match('\s*(?P[^ ]+)\s*(?Pbuild_as_arm)?\s*(?Psupport)?\s*(?Pignore)?\s*(?Ptidy)?\s*(?Pmanual)?\s*(?P\S+.*)?\s*$', mmpFileEntry, re.I)
-				else:
-					if re.match('\s*(?P[^ ]+)\s*(?Pbuild_as_arm)?\s*(?P\S+.*)?\s*$', mmpFileEntry, re.I):
-						m = re.match('\s*(?P[^ ]+)\s*(?Pbuild_as_arm)?\s*(?P\S+.*)?\s*$', mmpFileEntry, re.I)
-
-			if m:
-				if (m.groupdict()['invalid']):
-					self.log.Error("%s (%d) : invalid .mmp file qualifier \"%s\"", mmpFileEntry.filename, mmpFileEntry.getLineNumber(), m.groupdict()['invalid'])
-
-				mmpFileName = m.groupdict()['name']
-				testmmpoption = "auto" # Setup tests to be automatic by default
-				tokens = m.groupdict()
-				for key,item in tokens.iteritems():
-					if key=="manual" and item=="manual":
-						testmmpoption = "manual"
-					elif key=="support" and item=="support":
-						testmmpoption = "support"
-					elif key=="ignore" and item=="ignore":
-						testmmpoption = "ignore"
-
-				buildasarm = False
-				if  m.groupdict()['baa']:
-					if m.groupdict()['baa'].lower() == 'build_as_arm':
-						buildasarm = True
-
-				if not mmpFileName.lower().endswith('.mmp'):
-					mmpFileName += '.mmp'
-				bldInfDir = actualBldInfRoot.Dir()
-				try:
-					mmpFileName = bldInfDir.Append(mmpFileName)
-					mmpfe = MMPFileEntry(mmpFileName, testmmpoption, buildasarm)
-					mmpFileList.append(mmpfe)
-				except ValueError, e:
-					self.log.Error("invalid .mmp file name: %s" % str(e))
-
-				m = None
-
-
-		hashValue['mmpFileList'] = mmpFileList
-		hashValue['gnuList'] = gnuList
-		hashValue['makefileList'] = makefileList
-
-		return hashValue
-
-	# Return a list of gnumakefiles used in the bld.inf
-	def getExtensionmakefileList(self, aBuildPlatform, aType="PRJ_MMPFILES",aString = ""):
-		extMakefileList=[]
-		m = None
-		for extmakeFileEntry in self.__getSection(aBuildPlatform, aType):
-
-			actualBldInfRoot = extmakeFileEntry.filename
-			if aType.upper()=="PRJ_TESTMMPFILES":
-				m = re.match('\s*GNUMAKEFILE\s+(?P[^ ]+)\s*(?Psupport)?\s*(?Pignore)?\s*(?Ptidy)?\s*(?Pmanual)?\s*(?P\S+.*)?\s*$',extmakeFileEntry,re.I)
-			else:
-				if aString == "gnumakefile":
-					m = re.match('\s*GNUMAKEFILE\s+(?P[^ ]+)\s*(?P\S+.*)?\s*$',extmakeFileEntry,re.I)
-				elif aString == "nmakefile":
-					m = re.match('\s*NMAKEFILE\s+(?P[^ ]+)\s*(?P\S+.*)?\s*$',extmakeFileEntry,re.I)
-				elif aString == "makefile":
-					m = re.match('\s*MAKEFILE\s+(?P[^ ]+)\s*(?P\S+.*)?\s*$',extmakeFileEntry,re.I)
-			if m:
-				if (m.groupdict()['invalid']):
-					self.log.Error("%s (%d) : invalid extension makefile qualifier \"%s\"", extmakeFileEntry.filename, extmakeFileEntry.getLineNumber(), m.groupdict()['invalid'])
-
-				extmakefilearg = m.groupdict()['extmakefile']
-				bldInfDir = actualBldInfRoot.Dir()
-				extmakefilename = bldInfDir.Append(extmakefilearg)
-				extmakefile = ExtensionmakefileEntry(extmakefilearg, self.filename, extmakeFileEntry)
-				extMakefileList.append(extmakefile)
-				m = None
-
-		return extMakefileList
-
-	def getTestExtensionmakefileList(self,aBuildPlatform,aString=""):
-		return self.getExtensionmakefileList(aBuildPlatform,"PRJ_TESTMMPFILES",aString)
-
-	def getTestMMPList(self, aBuildPlatform):
-		return self.getMMPList(aBuildPlatform, "PRJ_TESTMMPFILES")
-
-	def getRomTestType(self, aBuildPlatform):
-		testMMPList = self.getTestMMPList(aBuildPlatform)
-		for testMMPFileEntry in testMMPList['mmpFileList']:
-			if aBuildPlatform["TESTCODE"]:
-				# Calculate test type (manual or auto)
-				if testMMPFileEntry.testoption == "manual":
-					self.testManual += 1
-				if not (testMMPFileEntry.testoption == "support" or testMMPFileEntry.testoption == "manual" or testMMPFileEntry.testoption == "ignore"):
-					self.testAuto += 1
-		if self.testManual and self.testAuto:
-			return 'BOTH'
-		elif self.testAuto:
-			return 'AUTO'
-		elif self.testManual:
-			return 'MANUAL'
-		else:
-			return 'NONE'
-
-	def getExports(self, aBuildPlatform, aType="PRJ_EXPORTS"):
-		exportList = []
-
-		for exportLine in self.__getSection(aBuildPlatform, aType):
-
-			if not re.match(r'\S+', exportLine):
-				continue
-
-			try:
-				exportList.append(Export(exportLine.getFilename(), exportLine, aType))
-			except ValueError,e:
-				self.log.Error(str(e))
-
-		return exportList
-
-	def getTestExports(self, aBuildPlatform):
-		return self.getExports(aBuildPlatform, "PRJ_TESTEXPORTS")
-
-	def getExtensions(self, aBuildPlatform, aType="PRJ_EXTENSIONS"):
-		extensionObjects = []
-		start = ""
-		options = []
-
-		for extensionLine in self.__getSection(aBuildPlatform, aType):
-			if (re.search(r'^\s*START ',extensionLine, re.I)):
-				start = extensionLine
-			elif re.search(r'^\s*END\s*$',extensionLine, re.I):
-				extensionObjects.append(Extension(self.filename, start, options, aBuildPlatform, self.__Raptor))
-				start = ""
-				options = []
-			elif re.search(r'^\s*$',extensionLine, re.I):
-				continue
-			elif start:
-				options.append(extensionLine)
-
-		return extensionObjects
-
-	def getTestExtensions(self, aBuildPlatform):
-		return self.getExtensions(aBuildPlatform, "PRJ_TESTEXTENSIONS")
-
-	def __getSection(self, aBuildPlatform, aSection):
-
-		activeSection = False
-		sectionContent = []
-		lineContent = re.split(r'\n', self.getContent(aBuildPlatform));
-
-		currentBldInfFile = self.filename
-		currentLineNumber = 0
-
-		for line in lineContent:
-			if line.startswith("#"):
-				commentDetail = getPreProcessorCommentDetail(line)
-				currentBldInfFile = commentDetail[0]
-				currentLineNumber = commentDetail[1]-1
-				continue
-
-			currentLineNumber += 1
-
-			if not re.match(r'.*\S+', line):
-				continue
-			elif re.match(r'\s*' + aSection + r'\s*$', line, re.I):
-				activeSection = True
-			elif re.match(r'\s*PRJ_\w+\s*$', line, re.I):
-				activeSection = False
-			elif activeSection:
-				sectionContent.append(PreProcessedLine(line, currentBldInfFile, currentLineNumber))
-
-		return sectionContent
-
-	@staticmethod
-	def outputPathFragment(bldinfpath):
-		"""Return a relative path that uniquely identifies this bldinf file
-		   whilst being short so that it can be appended to epoc32/build.
-		   The  build product of a particular bld.inf may be placed in here.
-		   This affects its TEMs and its MMPs"""
-
-		absroot_str = os.path.abspath(str(bldinfpath)).lower().replace("\\","/")
-
-		uniqueid = hashlib.md5()
-		uniqueid.update(absroot_str)
-
-		specnamecomponents = (re.sub("^[A-Za-z]:", "", absroot_str)).split('/') # split, removing any drive identifier (if present)
-
-		pathlist=[]
-		while len(specnamecomponents) > 0:
-			top = specnamecomponents.pop()
-			if top.endswith('.inf'):
-				continue
-			elif top == 'group':
-				continue
-			else:
-				pathlist = [top]
-				break
-
-		pathlist.append("c_"+uniqueid.hexdigest()[:16])
-		return "/".join(pathlist)
-
-	def outputpath(self, platform):
-		""" The full path where product from this bldinf is created."""
-		return str(platform['SBS_BUILD_DIR']) + "/" + BldInfFile.outputPathFragment(self.filename)
-
-	def depspath(self, platform):
-	   """ Where does dependency information go relative to platform's SBS_BUILD_DIR?
-	       Subclasses should redefine this
-	   """
-	   return self.outputpath(platform) + "/bldinf." + platform['key_md5'] + ".d"
-
-
-
-class MMPRaptorBackend(MMPBackend):
-	"""A parser "backend" for the MMP language
-
-	This is used to map recognised MMP syntax onto a buildspec """
-
-	# Support priorities, with case-fixed mappings for use
-	epoc32priorities = {
-		'low':'Low',
-		'background':'Background',
-		'foreground':'Foreground',
-		'high':'High',
-		'windowserver':'WindowServer',
-		'fileserver':'FileServer',
-		'realtimeserver':'RealTimeServer',
-		'supervisor':'SuperVisor'
-		}
-
-	# Known capability flags with associated bitwise operations
-	supportedCapabilities = {
-		'tcb':(1<<0),
-		'commdd':(1<<1),
-		'powermgmt':(1<<2),
-		'multimediadd':(1<<3),
-		'readdevicedata':(1<<4),
-		'writedevicedata':(1<<5),
-		'drm':(1<<6),
-		'trustedui':(1<<7),
-		'protserv':(1<<8),
-		'diskadmin':(1<<9),
-		'networkcontrol':(1<<10),
-		'allfiles':(1<<11),
-		'swevent':(1<<12),
-		'networkservices':(1<<13),
-		'localservices':(1<<14),
-		'readuserdata':(1<<15),
-		'writeuserdata':(1<<16),
-		'location':(1<<17),
-		'surroundingsdd':(1<<18),
-		'userenvironment':(1<<19),
-	# Old capability names have zero value
-		'root':0,
-		'mediadd':0,
-		'readsystemdata':0,
-		'writesystemdata':0,
-		'sounddd':0,
-		'uidd':0,
-		'killanyprocess':0,
-		'devman':0,
-		'phonenetwork':0,
-		'localnetwork':0
-	  	}
-
-	library_re = re.compile(r"^(?P[^{]+?)(?P{(?P[0-9]+)\.(?P[0-9]+)})?(\.(lib|dso))?$",re.I)
-
-
-	def __init__(self, aRaptor, aMmpfilename, aBldInfFilename):
-		super(MMPRaptorBackend,self).__init__()
-		self.platformblock = None
-		self.__Raptor = aRaptor
-		self.BuildVariant = raptor_data.Variant()
-		self.ResourceVariants = []
-		self.BitmapVariants = []
-		self.StringTableVariants = []
-		self.__bldInfFilename = aBldInfFilename
-		self.__targettype = "UNKNOWN"
-		self.__currentMmpFile = aMmpfilename
-		self.__defFileRoot = self.__currentMmpFile
-		self.__currentLineNumber = 0
-		self.__sourcepath = raptor_utilities.resolveSymbianPath(self.__currentMmpFile, "")
-		self.__userinclude = ""
-		self.__systeminclude = ""
-		self.__bitmapSourcepath = self.__sourcepath
-		self.__current_resource = ""
-		self.__capabilities = []
-		self.__resourceFiles = []
-		self.__pageConflict = []
-		self.__debuggable = ""
-		self.sources = []
-
-		self.__TARGET = ""
-		self.__TARGETEXT = ""
-		self.deffile = ""
-		self.__LINKAS = ""
-		self.nostrictdef = False
-		self.featureVariant = False
-
-		self.__currentResourceVariant = None
-		self.__currentStringTableVariant = None
-		self.__explicitversion = False
-		self.__versionhex = ""
-
-		# "ALL" capability calculated based on the total capabilities currently supported
-		allCapabilities = 0
-		for supportedCapability in MMPRaptorBackend.supportedCapabilities.keys():
-			allCapabilities = allCapabilities | MMPRaptorBackend.supportedCapabilities[supportedCapability]
-		MMPRaptorBackend.supportedCapabilities['all'] = allCapabilities
-
-	# Permit unit-testing output without a Raptor context
-	def __debug(self, format, *extras):
-		if (self.__Raptor):
-			self.__Raptor.Debug(format, *extras)
-
-	def __warn(self, format, *extras):
-		if (self.__Raptor):
-			self.__Raptor.Warn(format, *extras)
-
-	def doPreProcessorComment(self,s,loc,toks):
-		commentDetail = getPreProcessorCommentDetail(toks[0])
-		self.__currentMmpFile = commentDetail[0].GetLocalString()
-		self.__currentLineNumber = commentDetail[1]
-		self.__debug("Current file %s, line number %s\n"  % (self.__currentMmpFile,str(self.__currentLineNumber)))
-		return "OK"
-
-	def doBlankLine(self,s,loc,toks):
-		self.__currentLineNumber += 1
-
-	def doStartPlatform(self,s,loc,toks):
-		self.__currentLineNumber += 1
-		self.__debug( "Start Platform block "+toks[0])
-		self.platformblock = toks[0]
-		return "OK"
-
-	def doEndPlatform(self,s,loc,toks):
-		self.__currentLineNumber += 1
-		self.__debug( "Finalise platform " + self.platformblock)
-		return "OK"
-
-	def doSetSwitch(self,s,loc,toks):
-		self.__currentLineNumber += 1
-		prefix=""
-		varname = toks[0].upper()
-
-		# A bright spark made the optionname the same as
-		# the env variable. One will override the other if we pass this
-		# on to make.  Add a prefix to prevent the clash.
-		if varname=='ARMINC':
-			prefix="SET_"
-			self.__debug( "Set switch "+toks[0]+" ON")
-			self.BuildVariant.AddOperation(raptor_data.Set(prefix+varname, "1"))
-
-		elif varname=='NOSTRICTDEF':
-			self.nostrictdef = True
-			self.__debug( "Set switch "+toks[0]+" ON")
-			self.BuildVariant.AddOperation(raptor_data.Set(prefix+varname, "1"))
-
-		elif varname == 'PAGED':
-			self.BuildVariant.AddOperation(raptor_data.Set(varname, "1"))
-			self.__debug( "Set switch PAGE ON")
-			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")
-			self.BuildVariant.AddOperation(raptor_data.Set("PAGEDCODE_OPTION", "unpaged"))
-			self.__debug( "Set switch PAGEDCODE OFF")
-			self.BuildVariant.AddOperation(raptor_data.Set("PAGEDDATA_OPTION", "unpaged"))
-			self.__debug( "Set data PAGEDDATA OFF")
-			self.__pageConflict.append("UNPAGEDCODE")
-			self.__pageConflict.append("UNPAGEDDATA")
-
-		elif varname == 'PAGEDCODE':
-			self.BuildVariant.AddOperation(raptor_data.Set("PAGEDCODE_OPTION", "paged"))
-			self.__debug( "Set switch " + varname + " ON")
-			self.__pageConflict.append(varname)
-
-		elif varname == 'PAGEDDATA':
-			self.BuildVariant.AddOperation(raptor_data.Set("PAGEDDATA_OPTION", "paged"))
-			self.__debug( "Set switch " + varname + " ON")
-			self.__pageConflict.append(varname)
-
-		elif varname == 'UNPAGEDCODE':
-			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")
-			self.__pageConflict.append(varname)
-
-		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")
-
-		elif varname == 'DEBUGGABLE':
-			if self.__debuggable != "udeb":
-				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
-		else:
-			self.__debug( "Set switch "+toks[0]+" ON")
-			self.BuildVariant.AddOperation(raptor_data.Set(prefix+varname, "1"))
-
-		return "OK"
-
-	def doAssignment(self,s,loc,toks):
-		self.__currentLineNumber += 1
-		varname = toks[0].upper()
-		if varname=='TARGET':
-			(self.__TARGET, self.__TARGETEXT) = os.path.splitext(toks[1])
-			self.__TARGETEXT = self.__TARGETEXT.lstrip('.')
-
-			self.BuildVariant.AddOperation(raptor_data.Set("REQUESTEDTARGETEXT", self.__TARGETEXT.lower()))
-
-			lowercase_TARGET = self.__TARGET.lower()
-			self.__debug("Set "+toks[0]+" to " + lowercase_TARGET)
-			self.__debug("Set REQUESTEDTARGETEXT to " + self.__TARGETEXT.lower())
-
-			self.BuildVariant.AddOperation(raptor_data.Set("TARGET", self.__TARGET))
-			self.BuildVariant.AddOperation(raptor_data.Set("TARGET_lower", lowercase_TARGET))
-			if  lowercase_TARGET !=  self.__TARGET:
-				self.__debug("TARGET is not lowercase: '%s' - might cause BC problems." % self.__TARGET)
-		elif varname=='TARGETTYPE':
-			self.__debug("Set "+toks[0]+" to " + str(toks[1]))
-			self.__targettype=toks[1]
-			if  self.__targettype.lower() == "none":
-				self.BuildVariant.AddOperation(raptor_data.Set("TARGET", ""))
-				self.BuildVariant.AddOperation(raptor_data.Set("TARGET_lower",""))
-				self.BuildVariant.AddOperation(raptor_data.Set("REQUESTEDTARGETEXT", ""))
-			self.BuildVariant.AddOperation(raptor_data.Set(varname,toks[1].lower()))
-
-		elif varname=='TARGETPATH':
-			value = toks[1].lower().replace('\\','/')
-			self.__debug("Set "+varname+" to " + value)
-			self.BuildVariant.AddOperation(raptor_data.Set(varname, value))
-
-		elif varname=='OPTION' or varname=='LINKEROPTION':
-			self.__debug("Set "+toks[1]+varname+" to " + str(toks[2]))
-			self.BuildVariant.AddOperation(raptor_data.Append(varname+"_"+toks[1].upper()," ".join(toks[2])))
-
-			# Warn about OPTION ARMASM
-			if "armasm" in toks[1].lower():
-				self.__Raptor.Warn(varname+" ARMASM has no effect (use OPTION ARMCC).")
-
-		elif varname=='OPTION_REPLACE':
-			# Warn about OPTION_REPLACE ARMASM
-			if "armasm" in toks[1].lower():
-				self.__Raptor.Warn("OPTION_REPLACE ARMASM has no effect (use OPTION_REPLACE ARMCC).")
-			else:
-				args = " ".join(toks[2])
-
-				searchReplacePairs = self.resolveOptionReplace(args)
-
-				for searchReplacePair in searchReplacePairs:
-					self.__debug("Append %s to OPTION_REPLACE_%s", searchReplacePair, toks[1].upper())
-					self.BuildVariant.AddOperation(raptor_data.Append(varname+"_"+toks[1].upper(),searchReplacePair))
-
-		elif varname=='SYSTEMINCLUDE' or varname=='USERINCLUDE':
-			for path in toks[1]:
-				resolved = raptor_utilities.resolveSymbianPath(self.__currentMmpFile, path)
-				self.BuildVariant.AddOperation(raptor_data.Append(varname,resolved))
-
-				if varname=='SYSTEMINCLUDE':
-					self.__systeminclude += ' ' + resolved
-					self.__debug("  %s = %s",varname, self.__systeminclude)
-				else:
-					self.__userinclude += ' ' + resolved
-					self.__debug("  %s = %s",varname, self.__userinclude)
-
-				self.__debug("Appending %s to %s",resolved, varname)
-
-			self.__systeminclude = self.__systeminclude.strip()
-			self.__systeminclude = self.__systeminclude.rstrip('\/')
-			self.__userinclude = self.__userinclude.strip()
-			self.__userinclude = self.__userinclude.rstrip('\/')
-
-		elif varname=='EXPORTLIBRARY':
-			# Remove extension from the EXPORTLIBRARY name
-			libName = toks[1].rsplit(".", 1)[0]
-			self.__debug("Set "+varname+" to " + libName)
-			self.BuildVariant.AddOperation(raptor_data.Set(varname,"".join(libName)))
-
-		elif varname=='CAPABILITY':
-			for cap in toks[1]:
-				self.BuildVariant.AddOperation(raptor_data.Append(varname,cap," "))
-				self.__debug("Setting  "+toks[0]+": " + cap)
-				self.__capabilities.append(cap.lower())
-		elif varname=='DEFFILE':
-			self.__defFileRoot = self.__currentMmpFile
-			self.deffile = toks[1]
-		elif varname=='LINKAS':
-			self.__debug("Set "+toks[0]+"  OPTION to " + str(toks[1]))
-			self.__LINKAS = toks[1]
-			self.BuildVariant.AddOperation(raptor_data.Set(varname, toks[1]))
-		elif varname=='SECUREID' or varname=='VENDORID':
-			hexoutput = MMPRaptorBackend.canonicalUID(toks[1])
-			self.__debug("Set "+toks[0]+"  OPTION to " + hexoutput)
-			self.BuildVariant.AddOperation(raptor_data.Set(varname, hexoutput))
-		elif varname=='VERSION':
-			if toks[-1] == "EXPLICIT":
-				self.__explicitversion = True
-				self.BuildVariant.AddOperation(raptor_data.Set("EXPLICITVERSION", "1"))
-
-			vm = re.match(r'^(\d+)(\.(\d+))?$', toks[1])
-			if vm is not None:
-				version = vm.groups()
-				# the major version number
-				major = int(version[0],10)
-
-				# add in the minor number
-				minor = 0
-				if len(version) >  1:
-					minor = int(version[2],10)
-
-				self.__versionhex = "%04x%04x" % (major, minor)
-				self.BuildVariant.AddOperation(raptor_data.Set(varname, "%d.%d" %(major, minor)))
-				self.BuildVariant.AddOperation(raptor_data.Set(varname+"HEX", self.__versionhex))
-				self.__debug("Set "+toks[0]+"  OPTION to " + toks[1])
-				self.__debug("Set "+toks[0]+"HEX OPTION to " + "%04x%04x" % (major,minor))
-
-			else:
-				self.__Raptor.Warn("Invalid version supplied to VERSION (%s), using default value" % toks[1])
-
-		elif varname=='EPOCHEAPSIZE':
-			# Standardise on sending hex numbers to the FLMS.
-
-			if toks[1].lower().startswith('0x'):
-				min = long(toks[1],16)
-			else:
-				min = long(toks[1],10)
-
-			if toks[2].lower().startswith('0x'):
-				max = long(toks[2],16)
-			else:
-				max = long(toks[2],10)
-
-			self.BuildVariant.AddOperation(raptor_data.Set(varname+"MIN", "%x" % min))
-			self.__debug("Set "+varname+"MIN  OPTION to '%x' (hex)" % min )
-			self.BuildVariant.AddOperation(raptor_data.Set(varname+"MAX", "%x" % max))
-			self.__debug("Set "+varname+"MAX  OPTION to '%x' (hex)" % max )
-
-			# Some toolchains require decimal versions of the min/max values, converted to KB and
-			# rounded up to the next 1KB boundary
-			min_dec_kb = (int(min) + 1023) / 1024
-			max_dec_kb = (int(max) + 1023) / 1024
-			self.BuildVariant.AddOperation(raptor_data.Set(varname+"MIN_DEC_KB", "%d" % min_dec_kb))
-			self.__debug("Set "+varname+"MIN  OPTION KB to '%d' (dec)" % min_dec_kb )
-			self.BuildVariant.AddOperation(raptor_data.Set(varname+"MAX_DEC_KB", "%d" % max_dec_kb))
-			self.__debug("Set "+varname+"MAX  OPTION KB to '%d' (dec)" % max_dec_kb )
-
-		elif varname=='EPOCSTACKSIZE':
-			if toks[1].lower().startswith('0x'):
-				stack = long(toks[1],16)
-			else:
-				stack = long(toks[1],10)
-			self.BuildVariant.AddOperation(raptor_data.Set(varname, "%x" % stack))
-			self.__debug("Set "+varname+"  OPTION to '%x' (hex)" % stack  )
-		elif varname=='EPOCPROCESSPRIORITY':
-			# low, background, foreground, high, windowserver, fileserver, realtimeserver or supervisor
-			# These are case insensitive in metadata entries, but must be mapped to a static case pattern for use
-			prio = toks[1].lower()
-
-			# NOTE: Original validation here didn't actually work.  This has been corrected to provide an error, but probably needs re-examination.
-			if not MMPRaptorBackend.epoc32priorities.has_key(prio):
-				self.__Raptor.Error("Priority setting '%s' is not a valid priority - should be one of %s.", prio, MMPRaptorBackend.epoc32priorities.values())
-			else:
-				self.__debug("Set "+toks[0]+" to " +  MMPRaptorBackend.epoc32priorities[prio])
-				self.BuildVariant.AddOperation(raptor_data.Set(varname,MMPRaptorBackend.epoc32priorities[prio]))
-		elif varname=='ROMTARGET' or varname=='RAMTARGET':
-			if len(toks) == 1:
-				self.__debug("Set "+toks[0]+" to " )
-				self.BuildVariant.AddOperation(raptor_data.Set(varname,""))
-			else:
-				toks1 = str(toks[1]).replace("\\","/")
-				if toks1.find(","):
-					toks1 = re.sub("[,'\[\]]", "", toks1).replace("//","/")
-				self.__debug("Set "+toks[0]+" to " + toks1)
-				self.BuildVariant.AddOperation(raptor_data.Set(varname,toks1))
-
-		else:
-			self.__debug("Set "+toks[0]+" to " + str(toks[1]))
-			self.BuildVariant.AddOperation(raptor_data.Set(varname,"".join(toks[1])))
-
-			if varname=='LINKAS':
-				self.__LINKAS = toks[1]
-
-		return "OK"
-
-	def doAppend(self,s,loc,toks):
-		self.__currentLineNumber += 1
-		"""MMP command
-		"""
-		name=toks[0].upper()
-		if len(toks) == 1:
-			# list can be empty e.g. MACRO _FRED_ when fred it defined in the HRH
-			# causes us to see just "MACRO" in the input - it is valid to ignore this
-			self.__debug("Empty append list for " + name)
-			return "OK"
-		self.__debug("Append to "+name+" the values: " +str(toks[1]))
-
-		if name=='MACRO':
-			name='MMPDEFS'
-		elif name=='LANG':
-			# don't break the environment variable
-			name='LANGUAGES'
-
-		for item in toks[1]:
-			if name=='MMPDEFS':
-				# Unquote any macros since the FLM does it anyhow
-				if item.startswith('"') and item.endswith('"') \
-				or item.startswith("'") and item.endswith("'"):
-					item = item.strip("'\"")
-			if name=='LIBRARY' or name=='DEBUGLIBRARY':
-				im = MMPRaptorBackend.library_re.match(item)
-				if not im:
-					self.__error("LIBRARY: %s Seems to have an invalid name.\nExpected xxxx.lib or xxxx.dso\n where xxxx might be\n\tname or \n\tname(n,m) where n is a major version number and m is a minor version number\n" %item)
-				d = im.groupdict()
-
-				item = d['name']
-				if d['version'] is not None:
-					item += "{%04x%04x}" % (int(d['major']), int(d['minor']))
-				item += ".dso"
-			elif name=='STATICLIBRARY':
-				# the FLM will decide on the ending appropriate to the platform
-				item = re.sub(r"^(.*)\.[Ll][Ii][Bb]$",r"\1", item)
-			elif name=="LANGUAGES":
-				item = item.lower()
-			elif (name=="WIN32_LIBRARY" and (item.startswith(".") or re.search(r'[\\|/]',item))) \
-				or (name=="WIN32_RESOURCE"):
-				# Relatively pathed win32 libraries, and all win32 resources, are resolved in relation
-				# to the wrapper bld.inf file in which their .mmp file is specified.  This equates to
-				# the current working directory in ABLD operation.
-				item = raptor_utilities.resolveSymbianPath(self.__bldInfFilename, item)
-				
-			self.BuildVariant.AddOperation(raptor_data.Append(name,item," "))
-			
-			# maintain a debug library list, the same as LIBRARY but with DEBUGLIBRARY values
-			# appended as they are encountered
-			if name=='LIBRARY' or name=='DEBUGLIBRARY':
-				self.BuildVariant.AddOperation(raptor_data.Append("LIBRARY_DEBUG",item," "))			
-
-		return "OK"
-
-	def canonicalUID(number):
-		""" convert a UID string into an 8 digit hexadecimal string without leading 0x """
-		if number.lower().startswith("0x"):
-			n = int(number,16)
-		else:
-			n = int(number,10)
-
-		return "%08x" % n
-
-	canonicalUID = staticmethod(canonicalUID)
-
-	def doUIDAssignment(self,s,loc,toks):
-		"""A single UID command results in a number of spec variables"""
-		self.__currentLineNumber += 1
-
-		hexoutput = MMPRaptorBackend.canonicalUID(toks[1][0])
-		self.__debug( "Set UID2 to %s" % hexoutput )
-		self.BuildVariant.AddOperation(raptor_data.Set("UID2", hexoutput))
-
-		if len(toks[1]) > 1:
-			hexoutput = MMPRaptorBackend.canonicalUID(toks[1][1])
-			self.__debug( "Set UID3 to %s" % hexoutput)
-			self.BuildVariant.AddOperation(raptor_data.Set("UID3", hexoutput))
-
-		self.__debug( "done set UID")
-		return "OK"
-
-	def doSourcePathAssignment(self,s,loc,toks):
-		self.__currentLineNumber += 1
-		self.__sourcepath = raptor_utilities.resolveSymbianPath(self.__currentMmpFile, toks[1])
-		self.__debug( "Remembering self.sourcepath state:  "+str(toks[0])+" is now " + self.__sourcepath)
-		self.__debug("selfcurrentMmpFile: " + self.__currentMmpFile)
-		return "OK"
-
-
-	def doSourceAssignment(self,s,loc,toks):
-		self.__currentLineNumber += 1
-		self.__debug( "Setting "+toks[0]+" to " + str(toks[1]))
-		for file in toks[1]:
-			# file is always relative to sourcepath but some MMP files
-			# have items that begin with a slash...
-			file = file.lstrip("/")
-			source = generic_path.Join(self.__sourcepath, file)
-
-			# If the SOURCEPATH itself begins with a '/', then dont look up the caseless version, since
-			# we don't know at this time what $(EPOCROOT) will evaluate to.
-			if source.GetLocalString().startswith('$(EPOCROOT)'):
-				self.sources.append(str(source))	
-				self.__debug("Append SOURCE " + str(source))
-
-			else:
-				foundsource = source.FindCaseless()
-				if foundsource == None:
-					# Hope that the file will be generated later
-					self.__debug("Sourcefile not found: %s" % source)
-					foundsource = source
-
-				self.sources.append(str(foundsource))	
-				self.__debug("Append SOURCE " + str(foundsource))
-
-
-		self.__debug("		sourcepath: " + self.__sourcepath)
-		return "OK"
-
-	# Resource
-
-	def doOldResourceAssignment(self,s,loc,toks):
-		# Technically deprecated, but still used, so...
-		self.__currentLineNumber += 1
-		self.__debug("Processing old-style "+toks[0]+" "+str(toks[1]))
-
-		sysRes = (toks[0].lower() == "systemresource")
-
-		for rss in toks[1]:
-			variant = raptor_data.Variant()
-
-			source = generic_path.Join(self.__sourcepath, rss)
-			variant.AddOperation(raptor_data.Set("SOURCE", str(source)))
-			self.__resourceFiles.append(str(source))
-
-			target = source.File().rsplit(".", 1)[0]	# remove the extension
-			variant.AddOperation(raptor_data.Set("TARGET", target))
-			variant.AddOperation(raptor_data.Set("TARGET_lower", target.lower()))
-
-			header = target.lower() + ".rsg"			# filename policy
-			variant.AddOperation(raptor_data.Set("HEADER", header))
-
-			if sysRes:
-				dsrtp = self.getDefaultSystemResourceTargetPath()
-				variant.AddOperation(raptor_data.Set("TARGETPATH", dsrtp))
-
-			self.ResourceVariants.append(variant)
-
-		return "OK"
-
-	def getDefaultSystemResourceTargetPath(self):
-		# the default systemresource TARGETPATH value should come from the
-		# configuration rather than being hard-coded here. Then again, this
-		# should really be deprecated away into oblivion...
-		return "system/data"
-
-
-	def getDefaultResourceTargetPath(self, targettype):
-		# the different default TARGETPATH values should come from the
-		# configuration rather than being hard-coded here.
-		if targettype == "plugin":
-			return "resource/plugins"
-		if targettype == "pdl":
-			return "resource/printers"
-		return ""
-
-	def resolveOptionReplace(self, content):
-		"""
-		Constructs search/replace pairs based on .mmp OPTION_REPLACE entries for use on tool command lines
-		within FLMS.
-
-		Depending on what's supplied to OPTION_REPLACE , the core part of the  command line
-		in the relevant FLM will have search and replace actions performed on it post-expansion (but pre-
-		any OPTION  additions).
-
-		In terms of logic, we try to follow what ABLD does, as the current behaviour is undocumented.
-		What happens is a little inconsistent, and best described by some generic examples:
-
-			OPTION_REPLACE TOOL existing_option replacement_value
-
-				Replace all instances of "option existing_value" with "option replacement_value"
-
-			OPTION_REPLACE TOOL existing_option replacement_option
-
-				Replace all instances of "existing_option" with "replacement_option".
-
-			If "existing_option" is present in isolation then a removal is performed.
-
-		Any values encountered that don't follow an option are ignored.
-		Options are identified as being prefixed with either '-' or '--'.
-
-		The front-end processes each OPTION_REPLACE entry and then appends one or more search/replace pairs
-		to an OPTION_REPLACE_ variable in the following format:
-
-		     search<->replace
-		"""
-		# Note that, for compatibility reasons, the following is mostly a port to Python of the corresponding
-		# ABLD Perl, and hence maintains ABLD's idiosyncrasies in what it achieves
-
-		searchReplacePairs = []
-		matches = re.findall("-{1,2}\S+\s*(?!-)\S*",content)
-
-		if matches:
-			# reverse so we can process as a stack whilst retaining original order
-			matches.reverse()
-
-			while (len(matches)):
-				match = matches.pop()
-
-				standaloneMatch = re.match('^(?P
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+'
++ echo '#pragma data_seg(".SYMBIAN")'
++ echo '__EMULATOR_IMAGE_HEADER2(0x1000007a,0x100039ce,0x00000001,EPriorityLow,0x00000b07u,0x00000000u,0x10003a5c,0x00000000,0x00010000,0)'
++ echo '#pragma data_seg()'
+
+]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+'
++ echo '#pragma data_seg(".SYMBIAN")'
++ echo '__EMULATOR_IMAGE_HEADER2(0x1000007a,0x100039ce,0x00000001,EPriorityLow,0x00000b07u,0x00000000u,0x10003a5c,0x00000000,0x00010000,0)'
++ echo '#pragma data_seg()'
+
+]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 
+
+