[BACK]Return to libtool CVS log [TXT][DIR] Up to [local] / src / usr.bin / libtool

Diff for /src/usr.bin/libtool/libtool between version 1.28 and 1.29

version 1.28, 2012/07/09 12:53:05 version 1.29, 2012/07/09 13:38:37
Line 77 
Line 77 
 sub new  sub new
 {  {
         my ($class, $origin) = @_;          my ($class, $origin) = @_;
         # XXX autoload *if needed*.  
         eval "require $class; ";  
         bless {origin => $origin }, $class;          bless {origin => $origin }, $class;
 }  }
   
Line 94 
Line 92 
 {  {
         my ($class, $mode, $origin) = @_;          my ($class, $mode, $origin) = @_;
         if (defined $mode_maker->{$mode}) {          if (defined $mode_maker->{$mode}) {
                   eval "require $mode_maker->{$mode};";
                 return $mode_maker->{$mode}->new($origin);                  return $mode_maker->{$mode}->new($origin);
         } else {          } else {
                 shortdie "Mode=$mode not implemented yet.\n";                  shortdie "Mode=$mode not implemented yet.\n";
Line 113 
Line 112 
         }          }
 }  }
   
 package LT::Mode::Compile;  
 our @ISA = qw(LT::Mode);  
 package LT::Mode::Install;  
 our @ISA = qw(LT::Mode);  
 package LT::Mode::Link;  
 our @ISA = qw(LT::Mode);  
   
 package LT::Mode::Empty;  package LT::Mode::Empty;
 our @ISA = qw(LT::Mode);  our @ISA = qw(LT::Mode);
 sub run  sub run
Line 258 
Line 250 
         my $m;          my $m;
         for my $a (@$ltprog) {          for my $a (@$ltprog) {
            if ($a =~ m/(install([.-]sh)?|cp)$/) {             if ($a =~ m/(install([.-]sh)?|cp)$/) {
                 $m = LT::Mode::Install->new("implicit $a");                  $m = LT::Mode->factory('install', "implicit $a");
            } elsif ($a =~ m/cc|c\+\+/) {        # XXX improve test             } elsif ($a =~ m/cc|c\+\+/) {        # XXX improve test
                 if (grep { $_ eq '-c' } @ARGV) {                  if (grep { $_ eq '-c' } @ARGV) {
                         $m = LT::Mode::Compile->new("implicit");                          $m = LT::Mode->factory('compile', "implicit");
                 } else {                  } else {
                         $m = LT::Mode::Link->new("implicit");                          $m = LT::Mode->factory('link',  "implicit");
                 }                  }
            }             }
         }          }
Line 312 
Line 304 
                 say "enable static libraries";                  say "enable static libraries";
                 exit 0;                  exit 0;
             },              },
     '-finish' => sub { $mode = LT::Mode::Finish->new('--finish'); },      '-finish' => sub { $mode = LT::Mode->factory('finish', '--finish'); },
     '-help|?|h' => sub { $help = 1; },      '-help|?|h' => sub { $help = 1; },
     '-help-all' => sub { basic_help(); LT::Mode->help_all; exit 0; },      '-help-all' => sub { basic_help(); LT::Mode->help_all; exit 0; },
     '-mode=' => sub {      '-mode=' => sub {
Line 385 
Line 377 
 }  }
   
 if (!$mode->isa("LT::Mode::Execute")) {  if (!$mode->isa("LT::Mode::Execute")) {
         if ($gp->dlopen > 0)  {          if ($gp->dlopen)  {
                 shortdie "Error: -dlopen FILE  in generic libtool options is an error in non execute mode";                  shortdie "Error: -dlopen FILE  in generic libtool options is an error in non execute mode";
         }          }
 }  }

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.29