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

Comparing COMP/SCRAM/src/BuildSystem/ToolData.pm (file contents):
Revision 1.5 by sashby, Fri Jul 15 15:27:27 2005 UTC vs.
Revision 1.8 by sashby, Mon Sep 11 14:53:39 2006 UTC

# Line 324 | Line 324 | sub addreleasetoself()
324    
325     foreach my $libdir (@locallibdirs)
326        {
327 <      # Convert LOCAL to RELEASE top:
328 <      $libdir =~ s/$ENV{LOCALTOP}/$ENV{RELEASETOP}/g;
327 >      # Convert LOCAL to RELEASE top, quoting the LOCALTOP
328 >      # value in case funny characters have been used (e.g. ++):
329 >      $libdir =~ s/\Q$ENV{LOCALTOP}\E/$ENV{RELEASETOP}/g;
330        push(@$relldir, $libdir);
331        }
332    
# Line 334 | Line 335 | sub addreleasetoself()
335    
336     foreach my $incdir (@localincdirs)
337        {
338 <      # Convert LOCAL to RELEASE top:
339 <      $incdir =~ s/$ENV{LOCALTOP}/$ENV{RELEASETOP}/g;
338 >      # Convert LOCAL to RELEASE top, quoting the LOCALTOP
339 >      # value in case funny characters have been used (e.g. ++):
340 >      $incdir =~ s/\Q$ENV{LOCALTOP}\E/$ENV{RELEASETOP}/g;
341        push(@$relinc, $incdir);
342        }
343    
# Line 360 | Line 362 | sub addreleasetoself()
362              # Process the values for this path:
363              foreach my $rtpath (@PATHS)
364                 {
365 <               $rtpath =~ s/$ENV{LOCALTOP}/$ENV{RELEASETOP}/g;
365 >               $rtpath =~ s/\Q$ENV{LOCALTOP}\E/$ENV{RELEASETOP}/g;
366                 push(@$RELPATHS,$rtpath);
367                 }
368              
# Line 372 | Line 374 | sub addreleasetoself()
374    
375     }
376  
377 + sub allfeatures()
378 +   {
379 +   my $self=shift;
380 +   my @feature_vars=$self->list_variables();
381 +   my @features;
382 +   push (@features, @feature_vars, qw(LIB LIBDIR INCLUDE USE));  
383 +
384 +   # Make sure feature name is uppercase:
385 +   $feature =~ tr/a-z/A-Z/;
386 +   $feature_data={};
387 +   map
388 +      {
389 +      if (exists ($self->{$_}))
390 +         {
391 +         if (ref($self->{$_}) eq 'ARRAY')
392 +            {
393 +            $feature_data->{$_} = join(" ",@{$self->{$_}});
394 +            }
395 +         else
396 +            {
397 +            $feature_data->{$_} = $self->{$_}; # A string
398 +            }
399 +         }
400 +      } @features;
401 +   return $feature_data;
402 +   }
403 +
404 + sub reset()
405 +   {
406 +   my $self=shift;
407 +   my ($entryname)=@_;
408 +
409 +   if (exists($self->{$entryname}))
410 +      {
411 +      $self->{$entryname} = undef;
412 +      }  
413 +   }
414 +
415   1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines