22 |
|
@ISA=qw(BuildSystem::ToolCache Utilities::Verbose); |
23 |
|
@EXPORT_OK=qw( ); |
24 |
|
# |
25 |
< |
# |
25 |
> |
|
26 |
|
sub new |
27 |
|
############################################################### |
28 |
|
# new # |
227 |
|
# Make sure that we have this tool in the list of selected tools (just in case this tool was |
228 |
|
# set up by hand afterwards): |
229 |
|
$self->addtoselected($toolname); |
230 |
+ |
|
231 |
+ |
# Check to see if this tool is a compiler. If so, store it. |
232 |
+ |
# Also store the language that this compiler supprots, and a |
233 |
+ |
# compiler name (e.g. gcc323) which, in conjunction with a stem |
234 |
+ |
# architecture name like slc3_ia32_, can be used to build a complete arch string: |
235 |
+ |
if ($store->scram_compiler() == 1) |
236 |
+ |
{ |
237 |
+ |
my @supported_language = $store->flags("SCRAM_LANGUAGE_TYPE"); |
238 |
+ |
my @compilername = $store->flags("SCRAM_COMPILER_NAME"); |
239 |
+ |
$self->scram_compiler($supported_language[0],$toolname,$compilername[0]); |
240 |
+ |
} |
241 |
+ |
|
242 |
|
# Store the ToolData object in the cache: |
243 |
|
$self->storeincache($toolparser->toolname(),$store); |
244 |
|
return $self; |
332 |
|
# Copy the downloaded tool file to InstalledTools directory: |
333 |
|
if ( ! -f $filename ) |
334 |
|
{ |
335 |
< |
# If the URL is empty, the chances are that this tool was not downloaded to .SCRAM/InstalledTools. We |
336 |
< |
# give a warning and continue: |
335 |
> |
# If the URL is empty, the chances are that this tool was not downloaded to .SCRAM/InstalledTools. |
336 |
> |
# We signal an error and exit: |
337 |
|
if ($url eq '') |
338 |
|
{ |
339 |
< |
$::scram->scramerror("$toolname was selected in project requirements but is not in the configuration."); |
339 |
> |
$::scram->scramerror("$toolname was selected in project requirements but is not in the configuration!"); |
340 |
|
} |
341 |
|
else |
342 |
|
{ |
538 |
|
return $scram_projects; |
539 |
|
} |
540 |
|
|
541 |
+ |
sub scram_compiler() |
542 |
+ |
{ |
543 |
+ |
my $self=shift; |
544 |
+ |
my ($langtype, $toolname, $compilername)=@_; |
545 |
+ |
|
546 |
+ |
if ($langtype) |
547 |
+ |
{ |
548 |
+ |
# Store the compiler info according to supported |
549 |
+ |
# language types. |
550 |
+ |
# |
551 |
+ |
# ---------------------- e.g C++ cxxcompiler gcc323 |
552 |
+ |
$self->{SCRAM_COMPILER}->{$langtype}=[ $toolname, $compilername ]; |
553 |
+ |
} |
554 |
+ |
else |
555 |
+ |
{ |
556 |
+ |
return $self->{SCRAM_COMPILER}; |
557 |
+ |
} |
558 |
+ |
} |
559 |
+ |
|
560 |
|
1; |