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

Comparing COMP/SCRAM/src/BuildSystem/BuildFile.pm (file contents):
Revision 1.21 by sashby, Mon Aug 5 11:54:07 2002 UTC vs.
Revision 1.22 by sashby, Fri Oct 4 17:38:15 2002 UTC

# Line 126 | Line 126 | sub _commontags
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  
# Line 1223 | Line 1227 | sub Store_start {
1227                          ."/".$dir.":".$ENV{RELEASETOP}."/".$dir."\n";
1228          }
1229   }
1230 +
1231 + sub CompilerMap_Start
1232 +   {
1233 +   ###############################################################
1234 +   # CompilerMap_Start                                           #
1235 +   ###############################################################
1236 +   # modified : Fri Oct  4 15:08:39 2002 / SFA                   #
1237 +   # params   :                                                  #
1238 +   #          :                                                  #
1239 +   #          :                                                  #
1240 +   #          :                                                  #
1241 +   # function : Create a map between a SUBARCH and specific      #
1242 +   #          : compiler and version.                            #
1243 +   #          :                                                  #
1244 +   #          :                                                  #
1245 +   ###############################################################
1246 +   my $self=shift;
1247 +   my $name=shift;
1248 +   my $hashref=shift;
1249 +
1250 +   $self->verbose(">> CompilerMap_Start: NM ".$name." <<");
1251 +
1252 +   # We can only map compilers to already-defined architectures, so
1253 +   # we check for 'Arch':
1254 +   if ( $self->{Arch} )
1255 +      {
1256 +      my @tagnames=keys %{$hashref};
1257 +      my @tagvalues=values %{$hashref};
1258 +      
1259 +      foreach my $tag ( @tagnames )
1260 +         {
1261 +         $self->{switch}->checktag($name,$hashref,$tag);
1262 +         print GNUmakefile $tag."=".$$hashref{$tag}."\n";
1263 + #       if ( defined $$hashref{'version'} ) {
1264 + #               print GNUmakefile "_V_".$$hashref{'version'};
1265 + #       }
1266 + #       print GNUmakefile "=true\n";
1267 +
1268 +         }
1269 + #        $self->{switch}->checktag($name,$hashref,'ref');
1270 +
1271 + #       # -- oo toolbox stuff
1272 + #       # - get the appropriate tool object
1273 + #       $$hashref{'ref'}=~tr[A-Z][a-z];
1274 + #       if ( ! exists $$hashref{'version'} ) {
1275 + #        $tool=$self->{toolbox}->gettool($$hashref{'ref'});
1276 + #       }
1277 + #       else {
1278 + #        $tool=$self->{toolbox}->gettool($$hashref{'ref'},$$hashref{'version'});
1279 + #       }
1280 + #       if ( ! defined $tool ) {
1281 + #         $self->{switch}->parseerror("Unknown Tool Specified ("
1282 + #                                                       .$$hashref{'ref'}.")");
1283 + #       }
1284 +
1285 + #       # -- old fashioned GNUmakefile stuff
1286 + #       print GNUmakefile $$hashref{'ref'};
1287 + #       if ( defined $$hashref{'version'} ) {
1288 + #               print GNUmakefile "_V_".$$hashref{'version'};
1289 + #       }
1290 + #       print GNUmakefile "=true\n";
1291 +        
1292 + #       # -- Sub system also specified?
1293 + #       if ( exists $$hashref{'use'} ) {
1294 + #          # -- look for a buildfile
1295 + #          my @paths=$tool->getfeature("INCLUDE");
1296 + #          my $file="";
1297 + #          my ($path,$testfile);
1298 + #          foreach $path ( @paths ) {
1299 + #            $testfile=$path."/".$$hashref{'use'}."/BuildFile" ;
1300 + #            if ( -f $testfile ) {
1301 + #               $file=$testfile;
1302 + #               $self->_pushremoteproject($path);
1303 + #            }
1304 + #          }
1305 + #          if ( $file eq "" ) {
1306 + #            $self->{switch}->parseerror("Unable to find SubSystem $testfile");
1307 + #          }
1308 + #          $self->ParseBuildFile_Export($file);
1309 + #          $self->_popremoteproject();
1310 + #        }
1311 +      }
1312 +   else
1313 +      {
1314 +      print "No architecture defined: not possible to define a compiler-to-subarch mapping.","\n";
1315 +      }
1316 +   }
1317 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines