577 |
|
} |
578 |
|
} |
579 |
|
|
580 |
+ |
sub updatecompiler() |
581 |
+ |
{ |
582 |
+ |
my $self=shift; |
583 |
+ |
my ($compilername, $compilerobj) = @_; |
584 |
+ |
|
585 |
+ |
# Replace the existing copy of the tool with the new one: |
586 |
+ |
if (exists $self->{SETUP}->{$compilername}) |
587 |
+ |
{ |
588 |
+ |
# Check to make sure that we were really passed a compiler with |
589 |
+ |
# the desired name: |
590 |
+ |
if ($compilerobj->toolname() eq $compilername) |
591 |
+ |
{ |
592 |
+ |
print "ToolManager: Updating the cached copy of ".$compilername."\n"; |
593 |
+ |
delete $self->{SETUP}->{$compilername}; |
594 |
+ |
$self->{SETUP}->{$compilername} = $compilerobj; |
595 |
+ |
$self->writecache(); |
596 |
+ |
} |
597 |
+ |
else |
598 |
+ |
{ |
599 |
+ |
print "WARNING: compiler name (".$compilername.") and tool obj name (".$compilerobj->toolname().") don't match!","\n"; |
600 |
+ |
print " Not making any changes.","\n"; |
601 |
+ |
} |
602 |
+ |
} |
603 |
+ |
else |
604 |
+ |
{ |
605 |
+ |
print "WARNING: No entry in cache for ".$compilername.". Not making any updates.\n"; |
606 |
+ |
} |
607 |
+ |
} |
608 |
+ |
|
609 |
|
1; |