# HG changeset patch
# User kelvzhu
# Date 1284354679 -28800
# Node ID ac0bbc1e5d7930fb5a3099db97e3eb9efdbc6abb
# Parent 0e65f93be3cb5a40714c9ca97f69ad3e64a7bbf3# Parent a4eca1f021ac447b718ca7e945166a200e147e91
Merge sysdeftools's addtion
diff -r a4eca1f021ac -r ac0bbc1e5d79 metatools/sysdeftools/checklinks.bat
--- 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" %*
diff -r a4eca1f021ac -r ac0bbc1e5d79 metatools/sysdeftools/filtering.bat
--- 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
diff -r a4eca1f021ac -r ac0bbc1e5d79 metatools/sysdeftools/filtering.xsl
--- 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
-->
-
-
-
-
+
+
only
-
+
+
+
-
+
+
+
@@ -55,8 +92,8 @@
-
-
+
+
diff -r a4eca1f021ac -r ac0bbc1e5d79 metatools/sysdeftools/group/bld.inf
--- 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
diff -r a4eca1f021ac -r ac0bbc1e5d79 metatools/sysdeftools/group/contents.xml
--- /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 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff -r a4eca1f021ac -r ac0bbc1e5d79 metatools/sysdeftools/group/perl.bat
--- /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" %*
+
diff -r a4eca1f021ac -r ac0bbc1e5d79 metatools/sysdeftools/group/unixxslcmd.bat
--- /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
diff -r a4eca1f021ac -r ac0bbc1e5d79 metatools/sysdeftools/group/unixxsltccmd.bat
--- /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
diff -r a4eca1f021ac -r ac0bbc1e5d79 metatools/sysdeftools/joinandparesysdef.bat
--- 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
diff -r a4eca1f021ac -r ac0bbc1e5d79 metatools/sysdeftools/joinsysdef.bat
--- 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" %*
diff -r a4eca1f021ac -r ac0bbc1e5d79 metatools/sysdeftools/joinsysdef.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
diff -r a4eca1f021ac -r ac0bbc1e5d79 metatools/sysdeftools/lib/joinsysdef-module.xsl
--- 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 @@
-
+
+
diff -r a4eca1f021ac -r ac0bbc1e5d79 metatools/sysdeftools/lib/mergesysdef-module.xsl
--- 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 @@
+
+
+
+
+
+
+
+
+
@@ -490,15 +499,6 @@
-
-
-
-
-
-
-
-
-
diff -r a4eca1f021ac -r ac0bbc1e5d79 metatools/sysdeftools/mergesysdef.bat
--- 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
diff -r a4eca1f021ac -r ac0bbc1e5d79 metatools/sysdeftools/rootsysdef.bat
--- 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" %*
diff -r a4eca1f021ac -r ac0bbc1e5d79 metatools/sysdeftools/rootsysdef.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 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
diff -r a4eca1f021ac -r ac0bbc1e5d79 metatools/sysdeftools/sysdefdowngrade.bat
--- 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
diff -r a4eca1f021ac -r ac0bbc1e5d79 metatools/sysdeftools/validate-sysdef.bat
--- 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