summarylogtreecommitdiffstats
path: root/fix-installman.patch
blob: 4e372208532ed196069a4ea809a50c661ec2bcb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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 /^#/;