diff --git a/installman b/installman index 71fe93a26f..f3670e22e7 100755 --- a/installman +++ b/installman @@ -48,6 +48,9 @@ GetOptions( \%opts, die $usage if $opts{help}; $opts{destdir} //= ''; +my $installman1 = defined $opts{man1dir} && $opts{man1dir} ne ''; +my $installman3 = defined $opts{man3dir} && $opts{man3dir} ne ''; + foreach my $pre (qw(man1 man3)) { $opts{"${pre}dir"} //= $opts{destdir} . $Config{"install${pre}dir"}; $opts{"${pre}ext"} //= $Config{"${pre}ext"}; @@ -55,7 +58,7 @@ foreach my $pre (qw(man1 man3)) { $opts{verbose} ||= $opts{notify}; # Explicitely disabled installation of man pages -if ($opts{man1dir} eq '' && $opts{man3dir} eq '') { +if (!$installman1 && !$installman3) { warn "Manual page installation was disabled by Configure\n"; exit 0; } @@ -76,14 +79,14 @@ $packlist = ExtUtils::Packlist->new("$opts{destdir}$Config{installarchlib}/.pack pod2man(\%man1, $opts{man1dir}, $opts{man1ext}, 'pod'); # Install the pods for library modules. -if ($opts{man3dir} ne '') { +if ($installman3) { my $found = pods_to_install(); pod2man($found->{$_}, $opts{man3dir}, $opts{man3ext}, 'lib') foreach qw(MODULE PRAGMA); } # Install the pods embedded in the installed scripts -my $has_man1dir = $opts{man1dir} ne '' && -d $opts{man1dir}; +my $has_man1dir = $installman1 && -d $opts{man1dir}; my $fh = open_or_die('utils.lst'); while (<$fh>) { next if /^#/;