Changeset 8747e99a in rtems


Ignore:
Timestamp:
07/20/06 05:16:29 (16 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
c29d0a21
Parents:
40459fbf
Message:

Add --enable/disable-infos.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • contrib/crossrpms/specstrip

    r40459fbf r8747e99a  
    4040GetOptions(
    4141  \%options,
    42   'infos!',
     42  'prefix=s' => \$prefix,
     43  'enable-infos' => sub { $options{infos} = 1 },
     44  'disable-infos' => sub { $options{infos} = 0 },
    4345  'newlib!',
    4446  'languages=s' => \@languages,
    45   'prefix=s' => \$prefix,
    4647  'sources!',
    4748  'verbose+' => \$verbose
    4849) or die( "failed to GetOptions" );
    4950
    50 if ( defined($options{infos}) )
    51 {
    52   $infos = $options{infos};
     51if ( !defined($options{infos}) )
     52{ # User did not override, use defaults
     53  if ( $prefix =~ m/^\/usr$/ ) {
     54    $infos = 0;
     55  } elsif ( $prefix =~ m/^\/usr\/local$/ ) {
     56    $infos = 0;
     57  } else {
     58    $infos = 1;
     59  }
    5360} else {
    54   $infos = ( $prefix =~ m/\/opt\/rtems.*/ ) ? 1 : 0;
     61  $infos = int($options{infos});
    5562}
    5663
Note: See TracChangeset for help on using the changeset viewer.