Merge sysdeftools's addtion
authorkelvzhu
Mon, 13 Sep 2010 13:11:19 +0800
changeset 640 ac0bbc1e5d79
parent 639 0e65f93be3cb (diff)
parent 633 a4eca1f021ac (current diff)
child 641 8dd670a9f34f
child 656 88e01c8f013e
Merge sysdeftools's addtion
buildframework/helium/config/diamonds_config.xml.ftl
buildframework/helium/config/ivy/modules/7zip-4.ivy.xml
buildframework/helium/config/ivy/modules/ant-1.7.ivy.xml
buildframework/helium/config/ivy/modules/ccm-6.5_7.1.ivy.xml
buildframework/helium/config/ivy/modules/codescanner-2.0.ivy.xml
buildframework/helium/config/ivy/modules/codescanner-2.1.ivy.xml
buildframework/helium/config/ivy/modules/ctc-6.5.ivy.xml
buildframework/helium/config/ivy/modules/java-1.6.ivy.xml
buildframework/helium/config/ivy/modules/java13-1.3.1.ivy.xml
buildframework/helium/config/ivy/modules/perl-5.6.1.ivy.xml
buildframework/helium/config/ivy/modules/python-2.5.ivy.xml
buildframework/helium/config/ivy/modules/python-2.6.ivy.xml
buildframework/helium/config/ivy/modules/sbs-2.12.ivy.xml
buildframework/helium/config/ivy/modules/symsee-7.2.ivy.xml
buildframework/helium/config/ivy/modules/unzip-5.40.ivy.xml
buildframework/helium/doc/src/manual/debugging.rst
buildframework/helium/external/python/lib/2.5/4Suite_XML-1.0.2-py2.5-win32.egg
buildframework/helium/external/python/lib/2.5/PyXML-0.8.4-py2.5-win32.egg
buildframework/helium/external/python/lib/2.5/lxml-1.3.5-py2.5-win32.egg
buildframework/helium/external/python/lib/2.6/4Suite_XML-1.0.2-py2.6-win32.egg
buildframework/helium/external/python/lib/2.6/PyXML-0.8.4-py2.6-win32.egg
buildframework/helium/external/python/lib/2.6/easy-install.pth
buildframework/helium/external/python/lib/2.6/lxml-2.2.1-py2.6-win32.egg
buildframework/helium/external/python/lib/common/Amara-1.2.0.1-py2.5.egg
buildframework/helium/external/python/lib/common/Jinja2-2.2.1-py2.5.egg
buildframework/helium/external/python/lib/common/path-2.2-py2.5.egg
buildframework/helium/external/python/lib/common/threadpool.py
buildframework/helium/external/python/lib/linux/4Suite-XML-1.0.2.tar.gz
buildframework/helium/external/python/lib/linux/PyXML-0.8.4.tar.gz
buildframework/helium/external/python/lib/linux/easy-install.pth
buildframework/helium/external/python/lib/linux/lxml-1.3.6.tgz
buildframework/helium/sf/deps/amara/4Suite_XML/1.0.2/4Suite-XML-1.0.2.tar.gz
buildframework/helium/sf/deps/amara/4Suite_XML/1.0.2/4Suite_XML-1.0.2.py2.6-win32.egg
buildframework/helium/sf/deps/amara/4Suite_XML/1.0.2/ivy.xml
buildframework/helium/sf/deps/amara/amara/1.2.0.1/amara-1.2.0.1.egg
buildframework/helium/sf/deps/amara/amara/1.2.0.1/ivy.xml
buildframework/helium/sf/deps/org.apache.xml/serializer/1.0/serializer-1.0.jar
buildframework/helium/sf/deps/org.apache.xml/xalan/1.0/xalan-1.0.jar
buildframework/helium/sf/doc/src/structure.rst
buildframework/helium/sf/java/core/src/com/nokia/helium/core/HlmAntLibException.java
buildframework/helium/sf/java/core/src/com/nokia/helium/core/PPHash.java
buildframework/helium/sf/java/core/src/com/nokia/helium/core/PPInputSource.java
buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/HlmDefinition.java
buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/ConditionType.java
buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/HlmPostDefImpl.java
buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/HlmPreDefImpl.java
buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsProperties.java
buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/Stage.java
buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/Target.java
buildframework/helium/sf/java/diamonds/tests/config/diamonds_config.xml.ftl
buildframework/helium/sf/java/diamonds/tests/scenarii/invalid-templates-1/diamonds_config.xml.ftl
buildframework/helium/sf/java/internaldata/src/com/nokia/helium/internaldata/ant/listener/TreeDumper.java
buildframework/helium/sf/java/jpa/build.xml
buildframework/helium/sf/java/jpa/ivy.xml
buildframework/helium/sf/java/jpa/src/META-INF/persistence.xml
buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/ORMCommitCount.java
buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/ORMEntityManager.java
buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/ORMReader.java
buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/ORMUtil.java
buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/Version.java
buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/Component.java
buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/ComponentTime.java
buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/ExecutionTime.java
buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/LogFile.java
buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/Metadata.java
buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/MetadataEntry.java
buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/MetadataUtil.java
buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/Priority.java
buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/WhatLogEntry.java
buildframework/helium/sf/java/jpa/src/log4j.xml
buildframework/helium/sf/java/legacy/src/com/nokia/ivy/ToolResolver.java
buildframework/helium/sf/java/legacy/tests/data/ivy/ivy.xml
buildframework/helium/sf/java/legacy/tests/data/ivy/modules/ant-1.6.2.ivy.xml
buildframework/helium/sf/java/legacy/tests/data/ivy/modules/ant-1.7.ivy.xml
buildframework/helium/sf/java/legacy/tests/data/ivy/tools_ivy_settings.xml
buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/types/Stage.java
buildframework/helium/sf/java/metadata/metadata.rst
buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/CustomMetaDataProvider.java
buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/SBSLogMetaDataInput.java
buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/XMLLogMetaDataInput.java
buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/db/ORMMetadataDB.java
buildframework/helium/sf/java/metadata/src/templates/build_status.xml.ftl
buildframework/helium/sf/java/metadata/src/templates/cc_summary.html.ftl
buildframework/helium/sf/java/metadata/src/templates/cc_summary_metadata.html.ftl
buildframework/helium/sf/java/metadata/src/templates/diamonds_faults.ftl
buildframework/helium/sf/java/metadata/src/templates/diamonds_macro.ftl
buildframework/helium/sf/java/metadata/src/templates/email_new.html.ftl
buildframework/helium/sf/java/metadata/src/templates/faults.txt.ftl
buildframework/helium/sf/java/metadata/src/templates/general_category.txt.ftl
buildframework/helium/sf/java/metadata/src/templates/macro/expand3.js
buildframework/helium/sf/java/metadata/src/templates/macro/log3.css
buildframework/helium/sf/java/metadata/src/templates/macro/logger.ftl
buildframework/helium/sf/java/metadata/src/templates/readdata.xml.ftl
buildframework/helium/sf/java/metadata/src/templates/scan2.html.ftl
buildframework/helium/sf/java/metadata/src/templates/summary.html.ftl
buildframework/helium/sf/java/metadata/tests/antunit/test_validity.ant.xml
buildframework/helium/sf/java/metadata/tests/data/IDO_lcdo_tb92-ci_MCL.92.64_ant_build.log
buildframework/helium/sf/java/metadata/tests/data/build_roms_sample.log
buildframework/helium/sf/java/metadata/tests/data/build_whatlog.log
buildframework/helium/sf/java/metadata/tests/data/build_whatlog.whatlog.log
buildframework/helium/sf/java/metadata/tests/data/categorization.log
buildframework/helium/sf/java/metadata/tests/data/categorization_clean.log
buildframework/helium/sf/java/metadata/tests/data/categorization_compile.log
buildframework/helium/sf/java/metadata/tests/data/categorization_failed_empty_recipe.log
buildframework/helium/sf/java/metadata/tests/data/categorization_failed_error_in_recipe.log
buildframework/helium/sf/java/metadata/tests/data/ido_abs_mcl_devlon70_robot_MCL.70.500_fixslashes_raptor.log
buildframework/helium/sf/java/metadata/tests/data/ido_abs_mcl_devlon70_robot_MCL.70.500_info.log
buildframework/helium/sf/java/metadata/tests/data/ido_abs_tb92-nightly_5.2.58_validate_policy.log
buildframework/helium/sf/java/metadata/tests/data/log-with-same-root-name.log
buildframework/helium/sf/java/metadata/tests/data/log-with-same-root-name.log.log
buildframework/helium/sf/java/metadata/tests/data/metadatacount_error_and_missing_files.log
buildframework/helium/sf/java/metadata/tests/data/metadatacount_missing_files.log
buildframework/helium/sf/java/metadata/tests/data/parser_error.log
buildframework/helium/sf/java/metadata/tests/data/parsing_result.ini.ftl
buildframework/helium/sf/java/metadata/tests/data/receipe_lengthy_warn.log
buildframework/helium/sf/java/metadata/tests/data/sample_abld.log
buildframework/helium/sf/java/metadata/tests/data/whatlog_result.ini.ftl
buildframework/helium/sf/java/metadata/tests/functionality/func_add_test.ant.xml
buildframework/helium/sf/java/quality/coverity.rst
buildframework/helium/sf/java/sbs/sbs.rst
buildframework/helium/sf/java/sbs/sbscoverity.rst
buildframework/helium/sf/java/sbs/sbsctc.rst
buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/filter-module.xsl
buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/joinsysdef-module.xsl
buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/mergesysdef-module.xsl
buildframework/helium/tools/common/python/scripts/filter_metadatalog.py
buildframework/helium/tools/common/python/scripts/sbsscanlogmetadata.py
buildframework/helium/tools/common/python/scripts/scripttests/__init__.py
buildframework/helium/tools/common/python/scripts/scripttests/test_filter_metadatalog.py
buildframework/helium/tools/common/python/scripts/scripttests/test_sbs.py
sbsv2/raptor/test/config/api.xml
sbsv2/raptor/util/ext/Python-2.6.2.tgz
--- a/metatools/sysdeftools/checklinks.bat	Thu Sep 09 19:09:10 2010 +0800
+++ b/metatools/sysdeftools/checklinks.bat	Mon Sep 13 13:11:19 2010 +0800
@@ -13,5 +13,5 @@
 @rem Description: 
 @rem
 @setlocal
-@perl %~dpn0.pl %*
+@perl "%~dpn0.pl" %*
 
--- a/metatools/sysdeftools/filtering.bat	Thu Sep 09 19:09:10 2010 +0800
+++ b/metatools/sysdeftools/filtering.bat	Mon Sep 13 13:11:19 2010 +0800
@@ -14,8 +14,8 @@
 @rem
 @setlocal
 @if .%1==. goto use
-@ java -jar %~dp0xalanj\xalan.jar -xsl %~dpn0.xsl %* 
+@ java -jar "%~dp0xalanj\xalan.jar" -xsl "%~dpn0.xsl" %* 
 @goto end
 :use
-@ java -jar %~dp0xalanj\xalan.jar -in %~dpn0.xsl -xsl %~dp0lib\usage.xsl -param usage "%~n0"
+@ java -jar "%~dp0xalanj\xalan.jar" -in "%~dpn0.xsl" -xsl "%~dp0lib\usage.xsl" -param usage "%~n0"
 :end
\ No newline at end of file
--- a/metatools/sysdeftools/filtering.xsl	Thu Sep 09 19:09:10 2010 +0800
+++ b/metatools/sysdeftools/filtering.xsl	Mon Sep 13 13:11:19 2010 +0800
@@ -16,28 +16,65 @@
 	The filtering concepts here may not be carried forward in future system definition processing tools
 -->
 <!--Description:This filters a sysdef in either the 2.0 or 3.0 syntax
+If using the 3.0 syntax, specific IDs optionally be included verbatim
 -->
 
-<!--Input:<sysdef> - (required) The system definition XML file to process. Can be in the 2.0 or 3.0 format, and can be a fragment or stand-alone.-->
-<!--Output:<sysdef> - (optional) The system definition XML file to save the output as. If not present it will write to stdout.-->
-
-
+<!--Input:<sysdef> - (required) The system definition XML file to process.
+		Can be in the 2.0 or 3.0 format, and can be a fragment or
+		stand-alone.-->
+<!--Output:<sysdef> - (optional) The system definition XML file to save the
+		output as. If not present it will write to stdout.-->
 
 <xsl:output method="xml" indent="yes"/>
 
 <xsl:param name="filter-type">only</xsl:param>
 <!-- <type> - The method of filtering. Legal values are:
-		"only" = every component/unit can only have zero or more of these specified filters. ie, it can only have filters from this list, no other filters are allowed. This covers the common use case of "I want anything with gt and or techview, but no other filters" that was the first step in all old symbian.com builds. 
+		"only" = every component/unit can only have zero or more of
+			these specified filters. ie, it can only have filters
+			from this list, no other filters are allowed. This
+			covers the common use case of "I want anything with gt
+			and or techview, but no other filters" that was the
+			first step in all old symbian.com builds. 
 
-		"has" =  every component/unit must have all of these filters. ie it can have any other filters, but all specified filters must all be present. This covers the case where filter="test" identifies tests and there is no special filter to identify things that are not tests. So a filter for "!test" will strip out anything with filter="test" (plus any other filters) for a production build, and a filter of "test" will strip out everything that does not have filter="test" (plus any other filters) for a test build. Opposite filters will generate sets that are exactly opposite to each other.
+		"has" =  every component/unit must have all of these filters.
+			ie it can have any other filters, but all specified
+			filters must all be present. This covers the case where
+			filter="test" identifies tests and there is no special
+			filter to identify things that are not tests. So a
+			filter for "!test" will strip out anything with
+			filter="test" (plus any other filters) for a production
+			build, and a filter of "test" will strip out everything
+			that does not have filter="test" (plus any other
+			filters) for a test build. Opposite filters will
+			generate sets that are exactly opposite to each other.
 
-		"with" =  components/units that have the opposite filter are removed. This covers the old symbian.com case of java, !java and "don't care" components. In other words we have a global feature that every item can be built only when the feature is set, only when the feature is not set, or it does not care and will always be built. So for a !java build only items containing filter="java" are stripped out. For a java build, only items with filter="!java" are stripped out. Anything which does not explicitly mention java are always unaffected. Opposite filters will generate sets which overlap.
+		"with" =  components/units that have the opposite filter are
+			removed. This covers the old symbian.com case of
+			java, !java and "don't care" components. In other words
+			we have a global feature that every item can be built
+			only when the feature is set, only when the feature is
+			not set, or it does not care and will always be built.
+			So for a !java build only items containing filter="java"
+			are stripped out. For a java build, only items with
+			filter="!java" are stripped out. Anything which does not
+			explicitly mention java are always unaffected. Opposite
+			filters will generate sets which overlap.
 -->
 
 
-<xsl:param name="filter"/> <!-- <list> - (required) A comma-separated list of filters used to process the sysdef.-->
+<xsl:param name="filter"/> <!-- <list> - (required) A comma-separated list of filters
+		used to process the sysdef.-->
+
+<xsl:param name="addbuild" select="0"/> <!--1 - (optional) If present, it will add a system build
+		section that accepts everything. This is needed for genxml
+		processing -->
 
-<xsl:param name="addbuild" select="0"/> <!--1 - (optional) If present, it will add a system build section that accepts everything. This is needed for genxml processing -->
+<xsl:param name="verbatim"/> <!-- <list> - (optional) A comma-separated list of system
+		model IDs to include unfiltered. IDs must take the form as in
+		the document they appear (ie using the same namespace prefix).
+		This does not work on 2.0 syntax sysdefs. -->
+
+<xsl:variable name="ID-list" select="concat(',',translate(normalize-space($verbatim),' ',''),',')"/> <!-- remove all spaces from $idlist and add surrounding commas for easier processing-->
 
 <xsl:template match="node()|@*"><xsl:copy-of select="."/></xsl:template>
 <xsl:template match="*"><xsl:param name="data"/>
@@ -55,8 +92,8 @@
 			<xsl:with-param name="item" select="current()"/>
 		</xsl:apply-templates>
 	 </xsl:variable>
-	 
-	 <xsl:if test="$display != 'hide' "> <!-- if hide, remove completely from the output-->
+	 <xsl:if test="$display != 'hide' or ($verbatim != '' and ancestor-or-self::*[contains($ID-list,concat(',',@id,','))])"> 
+		<!-- if 'hide', remove completely from the output, but always include any ID listed as a $ID-list item-->
 		<xsl:copy>
 			<xsl:copy-of select="@*"/>
 			<xsl:apply-templates select="node()">
--- a/metatools/sysdeftools/group/bld.inf	Thu Sep 09 19:09:10 2010 +0800
+++ b/metatools/sysdeftools/group/bld.inf	Mon Sep 13 13:11:19 2010 +0800
@@ -28,52 +28,52 @@
 
 //  raw scripts 
 
-../checklinks.pl		/epoc32/tools/build/checklinks.pl
-../filtering.xsl		/epoc32/tools/build/filtering.xsl
-../joinandparesysdef.xsl		/epoc32/tools/build/joinandparesysdef.xsl
-../joinsysdef.pl		/epoc32/tools/build/joinsysdef.pl
-../joinsysdef.xsl		/epoc32/tools/build/joinsysdef.xsl
-../mergesysdef.xsl		/epoc32/tools/build/mergesysdef.xsl
-../rootsysdef.pl		/epoc32/tools/build/rootsysdef.pl
-../sysdefdowngrade.xsl		/epoc32/tools/build/sysdefdowngrade.xsl
-../validate-sysdef.xsl		/epoc32/tools/build/validate-sysdef.xsl
+../checklinks.pl		/epoc32/tools/sysdeftools/checklinks.pl
+../filtering.xsl		/epoc32/tools/sysdeftools/filtering.xsl
+../joinandparesysdef.xsl		/epoc32/tools/sysdeftools/joinandparesysdef.xsl
+../joinsysdef.pl		/epoc32/tools/sysdeftools/joinsysdef.pl
+../joinsysdef.xsl		/epoc32/tools/sysdeftools/joinsysdef.xsl
+../mergesysdef.xsl		/epoc32/tools/sysdeftools/mergesysdef.xsl
+../rootsysdef.pl		/epoc32/tools/sysdeftools/rootsysdef.pl
+../sysdefdowngrade.xsl		/epoc32/tools/sysdeftools/sysdefdowngrade.xsl
+../validate-sysdef.xsl		/epoc32/tools/sysdeftools/validate-sysdef.xsl
 
 
 //  reusable modules and internal utilities 
 
-../lib/filter-module.xsl		/epoc32/tools/build/lib/filter-module.xsl
-../lib/joinsysdef-module.xsl		/epoc32/tools/build/lib/joinsysdef-module.xsl
-../lib/mergesysdef-module.xsl		/epoc32/tools/build/lib/mergesysdef-module.xsl
-../lib/modelcheck.xsl		/epoc32/tools/build/lib/modelcheck.xsl
-../lib/path-module.xsl		/epoc32/tools/build/lib/path-module.xsl
-../lib/test-model.xsl		/epoc32/tools/build/lib/test-model.xsl
-../lib/usage.xsl		/epoc32/tools/build/lib/usage.xsl
+../lib/filter-module.xsl		/epoc32/tools/sysdeftools/lib/filter-module.xsl
+../lib/joinsysdef-module.xsl		/epoc32/tools/sysdeftools/lib/joinsysdef-module.xsl
+../lib/mergesysdef-module.xsl		/epoc32/tools/sysdeftools/lib/mergesysdef-module.xsl
+../lib/modelcheck.xsl		/epoc32/tools/sysdeftools/lib/modelcheck.xsl
+../lib/path-module.xsl		/epoc32/tools/sysdeftools/lib/path-module.xsl
+../lib/test-model.xsl		/epoc32/tools/sysdeftools/lib/test-model.xsl
+../lib/usage.xsl		/epoc32/tools/sysdeftools/lib/usage.xsl
 
 //  Xalan jar files 
-../xalanj/serializer.jar		/epoc32/tools/build/xalanj/serializer.jar
-../xalanj/xalan.jar		/epoc32/tools/build/xalanj/xalan.jar
-../xalanj/xercesImpl.jar		/epoc32/tools/build/xalanj/xercesImpl.jar
-../xalanj/xml-apis.jar		/epoc32/tools/build/xalanj/xml-apis.jar
+../xalanj/serializer.jar		/epoc32/tools/sysdeftools/xalanj/serializer.jar
+../xalanj/xalan.jar		/epoc32/tools/sysdeftools/xalanj/xalan.jar
+../xalanj/xercesImpl.jar		/epoc32/tools/sysdeftools/xalanj/xercesImpl.jar
+../xalanj/xml-apis.jar		/epoc32/tools/sysdeftools/xalanj/xml-apis.jar
 
 
 
 
 // Perl-calling .bat files (identical, can export from any single one of these).
-../checklinks.bat		/epoc32/tools/build/checklinks.bat
-../joinsysdef.bat		/epoc32/tools/build/joinsysdef.bat
-../rootsysdef.bat		/epoc32/tools/build/rootsysdef.bat
+../checklinks.bat		/epoc32/tools/sysdeftools/checklinks.bat
+../joinsysdef.bat		/epoc32/tools/sysdeftools/joinsysdef.bat
+../rootsysdef.bat		/epoc32/tools/sysdeftools/rootsysdef.bat
 
 // Xalan-calling .bat/unix files (identical, can export from single file)
-../joinandparesysdef.bat		/epoc32/tools/build/joinandparesysdef.bat
-../filtering.bat		/epoc32/tools/build/filtering.bat
-../validate-sysdef.bat		/epoc32/tools/build/validate-sysdef.bat
-unixxslcmd 		/epoc32/tools/build/joinandparesysdef
-unixxslcmd 		/epoc32/tools/build/filtering
-unixxslcmd 		/epoc32/tools/build/validate-sysdef
+../joinandparesysdef.bat		/epoc32/tools/sysdeftools/joinandparesysdef.bat
+../filtering.bat		/epoc32/tools/sysdeftools/filtering.bat
+../validate-sysdef.bat		/epoc32/tools/sysdeftools/validate-sysdef.bat
+unixxslcmd 		/epoc32/tools/sysdeftools/joinandparesysdef
+unixxslcmd 		/epoc32/tools/sysdeftools/filtering
+unixxslcmd 		/epoc32/tools/sysdeftools/validate-sysdef
 
 // Xalan-calling .bat/unix files that use XSLTC (identical, can export from single file)
-../mergesysdef.bat		/epoc32/tools/build/mergesysdef.bat
-../sysdefdowngrade.bat		/epoc32/tools/build/sysdefdowngrade.bat
-unixxsltccmd		/epoc32/tools/build/mergesysdef
-unixxsltccmd		/epoc32/tools/build/sysdefdowngrade
+../mergesysdef.bat		/epoc32/tools/sysdeftools/mergesysdef.bat
+../sysdefdowngrade.bat		/epoc32/tools/sysdeftools/sysdefdowngrade.bat
+unixxsltccmd		/epoc32/tools/sysdeftools/mergesysdef
+unixxsltccmd		/epoc32/tools/sysdeftools/sysdefdowngrade
  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/metatools/sysdeftools/group/contents.xml	Mon Sep 13 13:11:19 2010 +0800
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ProductsDefinition schema="3.0.0">
+	<product name="BuildEnvironment" long-name="Build Environment">
+		<tool name="sysdeftools" long-name="System Definition Tools" default-src="metatools/sysdeftools" default-dst="/" version="1.0.2">
+
+			<!-- core functionality -->
+			<file filename="*.pl"/> 
+			<file filename="*.xsl"/> 
+
+				<!-- reusable modules and internal utilities -->
+		  <file filename="*.xsl" src="metatools/sysdeftools/lib/" dst="lib/"/> 
+
+				<!-- Xalan jar files -->
+		  <file filename="*" src="metatools/sysdeftools/xalanj/" dst="xalanj/"/> 
+
+			<windows>
+			  <file filename="perl.bat" src="metatools/sysdeftools/group/" dstFile="/checklinks.bat"/> 
+			  <file filename="perl.bat" src="metatools/sysdeftools/group/" dstFile="/joinsysdef.bat"/> 
+			  <file filename="perl.bat" src="metatools/sysdeftools/group/" dstFile="/rootsysdef.bat"/> 
+
+				<!-- Xalan-calling .bat files -->
+			  <file filename="unixxslcmd.bat" src="metatools/sysdeftools/group/" dstFile="/joinandparesysdef.bat"/> 
+			  <file filename="unixxslcmd.bat" src="metatools/sysdeftools/group/" dstFile="/filtering.bat"/> 
+			  <file filename="unixxslcmd.bat" src="metatools/sysdeftools/group/" dstFile="/validate-sysdef.bat"/> 
+
+				<!-- Xalan-calling .bat files that use XSLTC -->
+			  <file filename="unixxsltccmd.bat" src="metatools/sysdeftools/group/" dstFile="/mergesysdef.bat"/> 
+			  <file filename="unixxsltccmd.bat" src="metatools/sysdeftools/group/" dstFile="/sysdefdowngrade.bat"/> 
+			</windows>
+		
+			<linux>
+				<!-- Xalan-calling unix files -->
+			  <file filename="unixxslcmd" src="metatools/sysdeftools/group/" dstFile="/joinandparesysdef"/> 
+			  <file filename="unixxslcmd" src="metatools/sysdeftools/group/" dstFile="/filtering"/> 
+			  <file filename="unixxslcmd" src="metatools/sysdeftools/group/" dstFile="/validate-sysdef"/> 
+
+				<!-- Xalan-calling unix files that use XSLTC -->
+			  <file filename="unixxsltccmd" src="metatools/sysdeftools/group/" dstFile="/mergesysdef"/> 
+			  <file filename="unixxsltccmd" src="metatools/sysdeftools/group/" dstFile="/sysdefdowngrade"/> 
+			</linux>
+		</tool>
+	</product>
+</ProductsDefinition>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/metatools/sysdeftools/group/perl.bat	Mon Sep 13 13:11:19 2010 +0800
@@ -0,0 +1,17 @@
+@rem Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@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
+@perl "%~dpn0.pl" %*
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/metatools/sysdeftools/group/unixxslcmd.bat	Mon Sep 13 13:11:19 2010 +0800
@@ -0,0 +1,21 @@
+@rem Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@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
+@if .%1==. goto use
+@ java -jar "%~dp0xalanj\xalan.jar" -xsl "%~dpn0.xsl" %* 
+@goto end
+:use
+@ java -jar "%~dp0xalanj\xalan.jar" -in "%~dpn0.xsl" -xsl "%~dp0lib\usage.xsl" -param usage "%~n0"
+:end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/metatools/sysdeftools/group/unixxsltccmd.bat	Mon Sep 13 13:11:19 2010 +0800
@@ -0,0 +1,21 @@
+@rem Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of the License "Eclipse Public License v1.0"
+@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
+@if .%1==. goto use
+@ java -jar "%~dp0xalanj\xalan.jar" -xsl "%~dpn0.xsl" %*  -XSLTC
+@goto end
+:use
+@ java -jar "%~dp0xalanj\xalan.jar" -in "%~dpn0.xsl" -xsl "%~dp0lib\usage.xsl" -param usage "%~n0"
+:end
--- a/metatools/sysdeftools/joinandparesysdef.bat	Thu Sep 09 19:09:10 2010 +0800
+++ b/metatools/sysdeftools/joinandparesysdef.bat	Mon Sep 13 13:11:19 2010 +0800
@@ -14,8 +14,8 @@
 @rem
 @setlocal
 @if .%1==. goto use
-@ java -jar %~dp0xalanj\xalan.jar -xsl %~dpn0.xsl %* 
+@ java -jar "%~dp0xalanj\xalan.jar" -xsl "%~dpn0.xsl" %* 
 @goto end
 :use
-@ java -jar %~dp0xalanj\xalan.jar -in %~dpn0.xsl -xsl %~dp0lib\usage.xsl -param usage "%~n0"
+@ java -jar "%~dp0xalanj\xalan.jar" -in "%~dpn0.xsl" -xsl "%~dp0lib\usage.xsl" -param usage "%~n0"
 :end
--- a/metatools/sysdeftools/joinsysdef.bat	Thu Sep 09 19:09:10 2010 +0800
+++ b/metatools/sysdeftools/joinsysdef.bat	Mon Sep 13 13:11:19 2010 +0800
@@ -13,5 +13,5 @@
 @rem Description: 
 @rem
 @setlocal
-@perl %~dpn0.pl %*
+@perl "%~dpn0.pl" %*
 
--- a/metatools/sysdeftools/joinsysdef.pl	Thu Sep 09 19:09:10 2010 +0800
+++ b/metatools/sysdeftools/joinsysdef.pl	Mon Sep 13 13:11:19 2010 +0800
@@ -38,6 +38,7 @@
 my @excludeMetaList;
 my @cannotExclude= ('link-mapping', 'config');
 my %ID;	# list of all IDs
+my $errCount=0;
 
 my @newarg;
 foreach my $a (@ARGV)
@@ -86,7 +87,11 @@
 foreach (@excludeMetaList) {$excludeMeta{$_}=1}	# make list a hash table
 foreach (@cannotExclude)
 	{
-	$excludeMeta{$_} && print STDERR "Error: Cannot exclude meta rel=\"$_\"\n";
+	if($excludeMeta{$_})
+		{
+		print STDERR "Error: Cannot exclude meta rel=\"$_\"\n";
+		$errCount++;
+		}
 	$excludeMeta{$_}=0
 	}	# cannot exclude any of these rel types
 
@@ -167,6 +172,7 @@
 	$sysdefdoc->printToFile($output);
 	}
 
+$errCount && die "Fatal syntax errors";
  
 sub abspath
 	{ 	# normalize the path into an absolute one
@@ -256,6 +262,7 @@
 			if(defined $ID{$id})
 				{
 				print STDERR "Error: duplicate ID: $tag \"$id\" in $ptext matches $ID{$id}\n";
+				$errCount++;
 				}
 			else 
 				{
@@ -320,6 +327,7 @@
 			if(!$item)
 				{
 				print STDERR "Error: Could not process metadata file: $link\n";
+				$errCount++;
 				next; # do not alter children
 				}
 			$node->removeAttribute('href');
@@ -582,6 +590,7 @@
 	if($file=~m,^([a-z0-9][a-z0-9]+):,i)
 		{
 		print STDERR "ERROR: $1 scheme not supported\n";
+		$errCount++;
 		return;  # return empty string if not supported.
 		} 
 	return $file
@@ -661,7 +670,7 @@
 	{ # configure in or out the units in a component
 	my $cmp = shift;	# the component node
 	my @unversioned;	# list of all units with no version attribute (if more than one, they should all have filters defined)
-	my %versioned;		# hash table of all units with a specified version, it's a fatal error to hav the same verison twice in one component
+	my %versioned;		# hash table of all units with a specified version, it's a fatal error to have the same verison twice in one component
 	foreach my $item (@{$cmp->getChildNodes})
 		{ # populate %versioned and @unversioned to save processsing later
 		if($item->getNodeType==1 && $item->getTagName eq 'unit')
@@ -793,7 +802,7 @@
 		else {die "cannot process $_";}
 		}
 	close CPP;
-	$? && die "Call to cpp produced an error";
+	$? && die "Error: Call to cpp produced an error";
 	}
 
 sub  checkSyntaxVersion
--- a/metatools/sysdeftools/lib/joinsysdef-module.xsl	Thu Sep 09 19:09:10 2010 +0800
+++ b/metatools/sysdeftools/lib/joinsysdef-module.xsl	Mon Sep 13 13:11:19 2010 +0800
@@ -215,7 +215,8 @@
 
 <xsl:template name="compare-versions"><xsl:param name="v1"/><xsl:param name="v2"/>
 			<xsl:choose>
-				<xsl:when test="$v1=$v2"><xsl:value-of select="$v1"/></xsl:when>
+				<xsl:when test="$v1=''"><xsl:value-of select="$v2"/></xsl:when>
+				<xsl:when test="$v1=$v2 or $v2=''"><xsl:value-of select="$v1"/></xsl:when>
 				<xsl:when test="substring-before($v1,'.') &gt; substring-before($v2,'.')"><xsl:value-of select="$v1"/></xsl:when>
 				<xsl:when test="substring-before($v1,'.') &lt; substring-before($v2,'.')"><xsl:value-of select="$v2"/></xsl:when>
 				<xsl:when test="substring-before(substring-after($v1,'.'),'.') &gt; substring-before(substring-after($v2,'.'),'.')"><xsl:value-of select="$v1"/></xsl:when>
--- a/metatools/sysdeftools/lib/mergesysdef-module.xsl	Thu Sep 09 19:09:10 2010 +0800
+++ b/metatools/sysdeftools/lib/mergesysdef-module.xsl	Mon Sep 13 13:11:19 2010 +0800
@@ -11,7 +11,7 @@
 	Contributors:
 	Description:
 	XSLT module for merging only two sysdef files according to the 3.0.1 rules. 
-		2.x and older syntax not supported and must be converetd before calling.
+		2.x and older syntax not supported and must be converted before calling.
 
 		Requires the including XSLT to also include path-module.xsl
 -->
@@ -212,6 +212,15 @@
 			<xsl:with-param name="down" select="$down"/>
 			<xsl:with-param name="replaces" select="$replaces"/>
 		</xsl:apply-templates>
+
+
+		<!-- tack on any remaining layers -->
+		<xsl:apply-templates mode="merge-copy-of" select="$other/systemModel/layer[not(@before) and not(following-sibling::*[@id=current()/layer/@id]) and not(@id=current()/layer/@id)]">
+			<xsl:with-param name="origin" select="$down"/>
+			<xsl:with-param name="root" select="current()/.."/>
+			<xsl:with-param name="replaces" select="$replaces"/>
+		</xsl:apply-templates>		
+
 	</xsl:copy>
 </xsl:template>
 
@@ -490,15 +499,6 @@
 
 		</xsl:otherwise>
 	</xsl:choose>
-	
-	<xsl:if test="self::layer and not(following-sibling::layer)">	
-		<!-- for the last layer, tack on any remaining layers -->
-		<xsl:apply-templates mode="merge-copy-of" select="$other/layer[not(@before) and not(following-sibling::*[@id=$this/../layer/@id]) and not(@id=$this/../layer/@id)]">
-			<xsl:with-param name="origin" select="$down"/>
-			<xsl:with-param name="root" select="$this/ancestor::SystemDefinition"/>			
-			<xsl:with-param name="replaces" select="$replaces"/>
-		</xsl:apply-templates>		
-	</xsl:if>
 </xsl:template>
 
 
--- a/metatools/sysdeftools/mergesysdef.bat	Thu Sep 09 19:09:10 2010 +0800
+++ b/metatools/sysdeftools/mergesysdef.bat	Mon Sep 13 13:11:19 2010 +0800
@@ -14,8 +14,8 @@
 @rem
 @setlocal
 @if .%1==. goto use
-@ java -jar %~dp0xalanj\xalan.jar -xsl %~dpn0.xsl %*  -XSLTC
+@ java -jar "%~dp0xalanj\xalan.jar" -xsl "%~dpn0.xsl" %*  -XSLTC
 @goto end
 :use
-@ java -jar %~dp0xalanj\xalan.jar -in %~dpn0.xsl -xsl %~dp0lib\usage.xsl -param usage "%~n0"
+@ java -jar "%~dp0xalanj\xalan.jar" -in "%~dpn0.xsl" -xsl "%~dp0lib\usage.xsl" -param usage "%~n0"
 :end
--- a/metatools/sysdeftools/rootsysdef.bat	Thu Sep 09 19:09:10 2010 +0800
+++ b/metatools/sysdeftools/rootsysdef.bat	Mon Sep 13 13:11:19 2010 +0800
@@ -13,5 +13,5 @@
 @rem Description: 
 @rem
 @setlocal
-@perl %~dpn0.pl %*
+@perl "%~dpn0.pl" %*
 
--- a/metatools/sysdeftools/rootsysdef.pl	Thu Sep 09 19:09:10 2010 +0800
+++ b/metatools/sysdeftools/rootsysdef.pl	Mon Sep 13 13:11:19 2010 +0800
@@ -55,7 +55,7 @@
 		"  -w [Note|Warning|Error]\tspecifies prefix text for any notifications. Defautls to Error\n\n",
 		"  -root [dir]\tspecifies the root directory of the filesystem. All globbing will be done relative to this path\n\n",
 
-		"  -glob [wildcard path]\tThe wildcard search to look for pkgdef files. eg  \"\\*\\*\package_definition.xml\". Can specify any number of these.\n",
+		"  -glob [wildcard path]\tThe wildcard search to look for pkgdef files. eg  \"\\*\\*\\package_definition.xml\". Can specify any number of these.\n",
 		"  -placeholders [bool]\tif set, all packages not found in the template will be left in as empty placeholders\n";
 		"  -name [text]\tthe name in <systemModel> to use for the generated root sysdef. If not present, this will use the name from the templat\n";
 	exit(1);
@@ -164,7 +164,13 @@
 
 foreach(keys %add)
 	{
-	my   $fragment = $parser->parsefile ($_);
+
+	my   $fragment;
+	
+	eval {
+		$fragment  = $parser->parsefile ($_);
+	};
+	$fragment || die "could not parse $_";
 	my $fdoc = $fragment->getDocumentElement();
 	my $topmost =&firstElement($fdoc);
 	if(!$topmost) {
@@ -408,7 +414,7 @@
 				}
 			}
 		}
-	elsif($tag eq 'meta')
+	elsif($tag eq 'meta' && $node->getAttribute('href'))
 		{
 		&fixHref($node,$file);
 		foreach my $child (@{$node->getChildNodes}) {$node->removeChild($child)} # can't have children
--- a/metatools/sysdeftools/sysdefdowngrade.bat	Thu Sep 09 19:09:10 2010 +0800
+++ b/metatools/sysdeftools/sysdefdowngrade.bat	Mon Sep 13 13:11:19 2010 +0800
@@ -14,8 +14,8 @@
 @rem
 @setlocal
 @if .%1==. goto use
-@ java -jar %~dp0xalanj\xalan.jar -xsl %~dpn0.xsl %*  -XSLTC
+@ java -jar "%~dp0xalanj\xalan.jar" -xsl "%~dpn0.xsl" %*  -XSLTC
 @goto end
 :use
-@ java -jar %~dp0xalanj\xalan.jar -in %~dpn0.xsl -xsl %~dp0lib\usage.xsl -param usage "%~n0"
+@ java -jar "%~dp0xalanj\xalan.jar" -in "%~dpn0.xsl" -xsl "%~dp0lib\usage.xsl" -param usage "%~n0"
 :end
--- a/metatools/sysdeftools/validate-sysdef.bat	Thu Sep 09 19:09:10 2010 +0800
+++ b/metatools/sysdeftools/validate-sysdef.bat	Mon Sep 13 13:11:19 2010 +0800
@@ -14,8 +14,8 @@
 @rem
 @setlocal
 @if .%1==. goto use
-@ java -jar %~dp0xalanj\xalan.jar   -xsl %~dpn0.xsl %*
+@ java -jar "%~dp0xalanj\xalan.jar"   -xsl "%~dpn0.xsl" %*
 @goto end
 :use
-@ java -jar %~dp0xalanj\xalan.jar -in %~dpn0.xsl -xsl %~dp0lib\usage.xsl -param usage "%~n0"
+@ java -jar "%~dp0xalanj\xalan.jar" -in "%~dpn0.xsl" -xsl "%~dp0lib\usage.xsl" -param usage "%~n0"
 :end