imgtools/buildrom/tools/externaltools.pm
changeset 713 7b7f0409fc00
parent 706 5221386d044b
child 715 e0739b8406dd
equal deleted inserted replaced
712:df89378e9223 713:7b7f0409fc00
    34 	
    34 	
    35 	my $toolList = shift;
    35 	my $toolList = shift;
    36 	my @toolModules = split(/,/,$toolList);
    36 	my @toolModules = split(/,/,$toolList);
    37 	foreach my $tool (@toolModules) {
    37 	foreach my $tool (@toolModules) {
    38 		# An optional command line can be passed to the tool if it is of the form "<toolname>[:<cmdline>]"
    38 		# An optional command line can be passed to the tool if it is of the form "<toolname>[:<cmdline>]"
    39 		if ($tool !~ /^([^:]+)(:(.*))?$/) {
    39 		if ($tool !~ /^((\w:)?[^:]+)(:(.*))?$/) {
    40 			print "No tool specified as parameter for external tool invocation\n";
    40 			print "No tool specified as parameter for external tool invocation\n";
    41 		}
    41 		}
    42 		my $toolName = $1;
    42 		my $toolName = $1;
    43 		my $toolCmdLine = $3;
    43 		my $toolCmdLine = $4;
       
    44 		if($toolName =~ /^(.*)[\\\/]([^\\\/]+)$/){
       
    45 			$toolName = $2;
       
    46 			my $path = $1;
       
    47 			if($path =~ /^EPOCROOT/){
       
    48 				my $epocroot = $ENV{EPOCROOT};
       
    49 				$epocroot =~ s-\\-\/-g;
       
    50 				$epocroot .= "\/" unless ($epocroot =~ /\/$/);
       
    51 				$path =~ s-^EPOCROOT[\/\\]?-$epocroot-;
       
    52 			}
       
    53 			push (@INC, $path);
       
    54 		}
    44 		if($toolName =~ /configpaging/i){			 
    55 		if($toolName =~ /configpaging/i){			 
    45 			my %info = (name=>"configpaging", args=>$toolCmdLine ); 
    56 			my %info = (name=>"configpaging", args=>$toolCmdLine ); 
    46 			push @{$invocations{"invocationpoint2"}}, \%info;
    57 			push @{$invocations{"invocationpoint2"}}, \%info;
    47 		}else{
    58 		}else{
    48 			&FlexLoad_ModuleL($toolName);
    59 			&FlexLoad_ModuleL($toolName);