diff options
author | Vadim Konovalov <vkonovalov@lucent.com> | 2007-06-11 23:19:31 +0400 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-06-12 08:32:26 +0000 |
commit | d2d98f31b0d4b556ddadee260502d51e6877de96 (patch) | |
tree | 567614cde00153e038f4180ab070b309781a7723 /configpm | |
parent | 80365507967096955316527fd22b32ea3dc94765 (diff) | |
download | perl-d2d98f31b0d4b556ddadee260502d51e6877de96.tar.gz |
Re: [PATCH-at-31365] (was - configpm frustrations)
Message-ID: <466D6803.1020808@vkonovalov.ru>
p4raw-id: //depot/perl@31366
Diffstat (limited to 'configpm')
-rwxr-xr-x | configpm | 23 |
1 files changed, 7 insertions, 16 deletions
@@ -31,12 +31,9 @@ # on Config.pm should trigger even if only Config_heavy.pl has changed. sub usage { die <<EOF } -usage: $0 [ options ] [ Config_file ] [ Glossary_file ] +usage: $0 [ options ] --cross=PLATFORM cross-compile for a different platform --no-glossary don't include Porting/Glossary in lib/Config.pod - --heavy=FILE alternative name for lib/Config_heavy.pl - Config_file alternative name for lib/Config.pm - Glossary_file alternative name for Porting/Glossary EOF use strict; @@ -63,7 +60,6 @@ my %Allowed_Opts = ( 'cross' => '', # --cross=PLATFORM - crosscompiling for PLATFORM 'glossary' => 1, # --no-glossary - no glossary file inclusion, # for compactness - 'heavy' => '', # pathname of the Config_heavy.pl file ); sub opts { @@ -90,29 +86,24 @@ sub opts { my %Opts = opts(); my ($Config_SH, $Config_PM, $Config_heavy, $Config_POD); -my $Glossary = $ARGV[1] || 'Porting/Glossary'; +my $Glossary = 'Porting/Glossary'; if ($Opts{cross}) { # creating cross-platform config file mkdir "xlib"; mkdir "xlib/$Opts{cross}"; - $Config_PM = $ARGV[0] || "xlib/$Opts{cross}/Config.pm"; + $Config_PM = "xlib/$Opts{cross}/Config.pm"; $Config_POD = "xlib/$Opts{cross}/Config.pod"; $Config_SH = "Cross/config-$Opts{cross}.sh"; } else { - $Config_PM = $ARGV[0] || 'lib/Config.pm'; + $Config_PM = "lib/Config.pm"; $Config_POD = "lib/Config.pod"; $Config_SH = "config.sh"; } -if ($Opts{heavy}) { - $Config_heavy = $Opts{heavy}; -} -else { - ($Config_heavy = $Config_PM) =~ s!\.pm$!_heavy.pl!; - die "Can't automatically determine name for Config_heavy.pl from '$Config_PM'" - if $Config_heavy eq $Config_PM; -} +($Config_heavy = $Config_PM) =~ s/\.pm$/_heavy.pl/; +die "Can't automatically determine name for Config_heavy.pl from '$Config_PM'" + if $Config_heavy eq $Config_PM; my $config_txt; my $heavy_txt; |