126 |
|
\&IncludePath_Start,$self, |
127 |
|
\&OutToMakefile, $self, |
128 |
|
"",$self); |
129 |
+ |
$switch->addtag($parse,"CompilerMap", |
130 |
+ |
\&CompilerMap_Start,$self, |
131 |
+ |
\&OutToMakefile, $self, |
132 |
+ |
"",$self); |
133 |
|
return $switch; |
134 |
|
} |
135 |
|
|
917 |
|
} |
918 |
|
} |
919 |
|
|
920 |
< |
sub Arch_Start { |
921 |
< |
my $self=shift; |
922 |
< |
my $name=shift; |
923 |
< |
my $hashref=shift; |
924 |
< |
|
925 |
< |
$self->verbose(">> Arch_Start: NM ".$name." <<"); |
926 |
< |
|
927 |
< |
$self->{switch}->checktag($name, $hashref,'name'); |
928 |
< |
( ($ENV{SCRAM_ARCH}=~/$$hashref{name}.*/) )? ($self->{Arch}=1) |
929 |
< |
: ($self->{Arch}=0); |
930 |
< |
push @{$self->{ARCHBLOCK}}, $self->{Arch}; |
931 |
< |
} |
920 |
> |
sub Arch_Start |
921 |
> |
{ |
922 |
> |
my $self=shift; |
923 |
> |
my $name=shift; |
924 |
> |
my $hashref=shift; |
925 |
> |
|
926 |
> |
$self->verbose(">> Arch_Start: NM ".$name." <<"); |
927 |
> |
|
928 |
> |
$self->{switch}->checktag($name, $hashref,'name'); |
929 |
> |
|
930 |
> |
# if ($ENV{SCRAM_ARCH} =~ /$$hashref{name}$/) |
931 |
> |
if ( $$hashref{name} eq $ENV{SCRAM_ARCH} ) |
932 |
> |
{ |
933 |
> |
# print "HASHREFNAME= ",$$hashref{name},"\n"; # The tag read from BuildFile |
934 |
> |
# print "Scram arch()? ",$ENV{SCRAM_ARCH},"\n"; # Also SCRAM_ARCH |
935 |
> |
$self->{Arch}=1; |
936 |
> |
} |
937 |
> |
else |
938 |
> |
{ |
939 |
> |
$self->{Arch}=0; |
940 |
> |
} |
941 |
> |
# ( ($ENV{SCRAM_ARCH}=~/$$hashref{name}.*/) )? ($self->{Arch}=1) |
942 |
> |
# : ($self->{Arch}=0); |
943 |
> |
|
944 |
> |
$self->verbose(($self->{Arch}?"OK":"skipping")." ".$$hashref{name}); |
945 |
> |
push @{$self->{ARCHBLOCK}}, $self->{Arch}; |
946 |
> |
} |
947 |
|
|
948 |
|
sub Arch_End { |
949 |
|
my $self=shift; |
1242 |
|
."/".$dir.":".$ENV{RELEASETOP}."/".$dir."\n"; |
1243 |
|
} |
1244 |
|
} |
1245 |
+ |
|
1246 |
+ |
sub CompilerMap_Start |
1247 |
+ |
{ |
1248 |
+ |
############################################################### |
1249 |
+ |
# CompilerMap_Start # |
1250 |
+ |
############################################################### |
1251 |
+ |
# modified : Fri Oct 4 15:08:39 2002 / SFA # |
1252 |
+ |
# params : # |
1253 |
+ |
# : # |
1254 |
+ |
# : # |
1255 |
+ |
# : # |
1256 |
+ |
# function : Create a map between a SUBARCH and specific # |
1257 |
+ |
# : compiler and version. # |
1258 |
+ |
# : # |
1259 |
+ |
# : # |
1260 |
+ |
############################################################### |
1261 |
+ |
my $self=shift; |
1262 |
+ |
my $name=shift; |
1263 |
+ |
my $hashref=shift; |
1264 |
+ |
|
1265 |
+ |
$self->verbose(">> CompilerMap_Start: NM ".$name." <<"); |
1266 |
+ |
# We can only map compilers to already-defined architectures, so |
1267 |
+ |
# we check for 'Arch': |
1268 |
+ |
if ( $self->{Arch} ) |
1269 |
+ |
{ |
1270 |
+ |
my @tagnames=keys %{$hashref}; |
1271 |
+ |
my @tagvalues=values %{$hashref}; |
1272 |
+ |
|
1273 |
+ |
foreach my $tag ( @tagnames ) |
1274 |
+ |
{ |
1275 |
+ |
$self->{switch}->checktag($name,$hashref,$tag); |
1276 |
+ |
print GNUmakefile $tag."=".$$hashref{$tag}."\n"; |
1277 |
+ |
|
1278 |
+ |
if ( defined $$hashref{'version'} ) |
1279 |
+ |
{ |
1280 |
+ |
print GNUmakefile "_V_".$$hashref{'version'}; |
1281 |
+ |
} |
1282 |
+ |
print GNUmakefile "=true\n"; |
1283 |
+ |
} |
1284 |
+ |
# $self->{switch}->checktag($name,$hashref,'ref'); |
1285 |
+ |
|
1286 |
+ |
# # -- oo toolbox stuff |
1287 |
+ |
# # - get the appropriate tool object |
1288 |
+ |
# $$hashref{'ref'}=~tr[A-Z][a-z]; |
1289 |
+ |
# if ( ! exists $$hashref{'version'} ) { |
1290 |
+ |
# $tool=$self->{toolbox}->gettool($$hashref{'ref'}); |
1291 |
+ |
# } |
1292 |
+ |
# else { |
1293 |
+ |
# $tool=$self->{toolbox}->gettool($$hashref{'ref'},$$hashref{'version'}); |
1294 |
+ |
# } |
1295 |
+ |
# if ( ! defined $tool ) { |
1296 |
+ |
# $self->{switch}->parseerror("Unknown Tool Specified (" |
1297 |
+ |
# .$$hashref{'ref'}.")"); |
1298 |
+ |
# } |
1299 |
+ |
|
1300 |
+ |
# # -- old fashioned GNUmakefile stuff |
1301 |
+ |
# print GNUmakefile $$hashref{'ref'}; |
1302 |
+ |
# if ( defined $$hashref{'version'} ) { |
1303 |
+ |
# print GNUmakefile "_V_".$$hashref{'version'}; |
1304 |
+ |
# } |
1305 |
+ |
# print GNUmakefile "=true\n"; |
1306 |
+ |
|
1307 |
+ |
# # -- Sub system also specified? |
1308 |
+ |
# if ( exists $$hashref{'use'} ) { |
1309 |
+ |
# # -- look for a buildfile |
1310 |
+ |
# my @paths=$tool->getfeature("INCLUDE"); |
1311 |
+ |
# my $file=""; |
1312 |
+ |
# my ($path,$testfile); |
1313 |
+ |
# foreach $path ( @paths ) { |
1314 |
+ |
# $testfile=$path."/".$$hashref{'use'}."/BuildFile" ; |
1315 |
+ |
# if ( -f $testfile ) { |
1316 |
+ |
# $file=$testfile; |
1317 |
+ |
# $self->_pushremoteproject($path); |
1318 |
+ |
# } |
1319 |
+ |
# } |
1320 |
+ |
# if ( $file eq "" ) { |
1321 |
+ |
# $self->{switch}->parseerror("Unable to find SubSystem $testfile"); |
1322 |
+ |
# } |
1323 |
+ |
# $self->ParseBuildFile_Export($file); |
1324 |
+ |
# $self->_popremoteproject(); |
1325 |
+ |
# } |
1326 |
+ |
} |
1327 |
+ |
else |
1328 |
+ |
{ |
1329 |
+ |
return; |
1330 |
+ |
} |
1331 |
+ |
} |
1332 |
+ |
|
1333 |
+ |
|