Allow multiple config files in joinsysdef.pl. Support ignoring items by namespace on the command line in sysmodelgen HighFidelityModel
authorBob Rosenberg <bob.rosenberg@nokia.com>
Wed, 02 Jun 2010 12:12:18 +0100
branchHighFidelityModel
changeset 276 d9662ec4599f
parent 265 a2b996399a2f
child 281 f724a8f06cbe
Allow multiple config files in joinsysdef.pl. Support ignoring items by namespace on the command line in sysmodelgen
sysdeftools/joinsysdef.pl
sysmodelgen/src/SysModelGen.pm
--- a/sysdeftools/joinsysdef.pl	Tue Jun 01 16:18:31 2010 +0100
+++ b/sysdeftools/joinsysdef.pl	Wed Jun 02 12:12:18 2010 +0100
@@ -30,7 +30,7 @@
 
 my $output;
 my $path;
-my $config;
+my @config;
 my @includes;
 my %defineParams;
 my %defines;
@@ -58,7 +58,7 @@
 	(
 	 'path=s' => \$path,
 	'output=s' => \$output,
-	'config=s' => \$config,
+	'config=s' => \@config,
 	'exclude-meta=s' => \@excludeMetaList
 	);
 
@@ -96,9 +96,9 @@
 my %nsmap;
 my %urimap;
 
-if($config ne '') 
+foreach my $conf (@config) 
 	{ # run cpp to get all #defines
-	&getDefines($config);
+	&getDefines($conf);
 	}
 
 my $parser = new XML::DOM::Parser;
@@ -340,7 +340,7 @@
 		$checkversion = $checkversion  || ($tag eq 'component' &&  $item->getNodeType==1 && $item->getAttribute('version') ne '');
 		}
 
-	if($checkversion && $config ne '')
+	if($checkversion && scalar(@config))
 		{ # need to check the conf metadata on the units in this component
 		&doCmpConfig($node);
 		}
@@ -647,7 +647,7 @@
 	my $metanode = shift;
 
 	my $rel = $metanode->getAttribute('rel') || 'Generic';
-	if($rel eq 'config' && $config ne '')
+	if($rel eq 'config' && scalar(@config))
 		{ # only process if there is something to configure
 		&doconfig($metanode);
 		}
--- a/sysmodelgen/src/SysModelGen.pm	Tue Jun 01 16:18:31 2010 +0100
+++ b/sysmodelgen/src/SysModelGen.pm	Wed Jun 02 12:12:18 2010 +0100
@@ -717,7 +717,8 @@
 		"<template name=\"filter\">\n";
 	foreach my $ig (@{$self->{'iIgnore'}}) {
 		print XSLT "\t<ignore xmlns='' ";
-		if($ig=~/^(.*):(.*)$/) {print XSLT "type='$1' name='$2'/>\n"}
+		if($ig=~/^(layer|package|block|logicalset|logicalsubset|subblock|collection|module|component):(.*)$/) {print XSLT "type='$1' name='$2'/>\n"}
+		elsif($ig=~/:.*\//) {print XSLT "namespace='$ig'/>\n"} # assume it's a namespace if it has a colon and a slash
 		else {print XSLT "ref='$ig'/>\n"}
 	}
 	foreach my $ig (@{$self->{'iIgnoreMeta'}}) {