ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/BuildSystem/ToolManager.pm
(Generate patch)

Comparing COMP/SCRAM/src/BuildSystem/ToolManager.pm (file contents):
Revision 1.10 by sashby, Tue Jun 28 19:08:55 2005 UTC vs.
Revision 1.11 by sashby, Fri Jul 15 15:27:27 2005 UTC

# Line 577 | Line 577 | sub scram_compiler()
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;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines