imgtools/buildrom/tools/externaltools.pm
changeset 713 7b7f0409fc00
parent 706 5221386d044b
child 715 e0739b8406dd
--- a/imgtools/buildrom/tools/externaltools.pm	Tue Nov 30 13:59:58 2010 +0800
+++ b/imgtools/buildrom/tools/externaltools.pm	Tue Nov 30 14:05:41 2010 +0800
@@ -36,11 +36,22 @@
 	my @toolModules = split(/,/,$toolList);
 	foreach my $tool (@toolModules) {
 		# An optional command line can be passed to the tool if it is of the form "<toolname>[:<cmdline>]"
-		if ($tool !~ /^([^:]+)(:(.*))?$/) {
+		if ($tool !~ /^((\w:)?[^:]+)(:(.*))?$/) {
 			print "No tool specified as parameter for external tool invocation\n";
 		}
 		my $toolName = $1;
-		my $toolCmdLine = $3;
+		my $toolCmdLine = $4;
+		if($toolName =~ /^(.*)[\\\/]([^\\\/]+)$/){
+			$toolName = $2;
+			my $path = $1;
+			if($path =~ /^EPOCROOT/){
+				my $epocroot = $ENV{EPOCROOT};
+				$epocroot =~ s-\\-\/-g;
+				$epocroot .= "\/" unless ($epocroot =~ /\/$/);
+				$path =~ s-^EPOCROOT[\/\\]?-$epocroot-;
+			}
+			push (@INC, $path);
+		}
 		if($toolName =~ /configpaging/i){			 
 			my %info = (name=>"configpaging", args=>$toolCmdLine ); 
 			push @{$invocations{"invocationpoint2"}}, \%info;