diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-11-25 17:10:09 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-11-25 17:10:09 +0000 |
commit | bf1ee2ba28fe97d6143744a53d7e6d6c9b174b60 (patch) | |
tree | 39a1c85a874861203f7631f73f9b780addce5b22 /installman | |
parent | 8c51524e7bd4fdfb39d09396e64d52795d2775af (diff) | |
download | perl-bf1ee2ba28fe97d6143744a53d7e6d6c9b174b60.tar.gz |
Skip the link= directives of utils.lst if no mandir
(if no manpages).
p4raw-id: //depot/perl@13262
Diffstat (limited to 'installman')
-rwxr-xr-x | installman | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/installman b/installman index d871dc987f..47551623d0 100755 --- a/installman +++ b/installman @@ -77,6 +77,7 @@ pod2man('pod', $opts{man1dir}, $opts{man1ext}); pod2man('lib', $opts{man3dir}, $opts{man3ext}); # Install the pods embedded in the installed scripts +my $has_man1dir = $opts{man1dir} ne '' && -d $opts{man1dir}; open UTILS, "utils.lst" or die "Can't open 'utils.lst': $!"; while (<UTILS>) { next if /^#/; @@ -84,11 +85,13 @@ while (<UTILS>) { $_ = $1 if /#.*pod\s*=\s*(\S+)/; my ($where, $what) = m|^(.*?)/(\S+)|; pod2man($where, $opts{man1dir}, $opts{man1ext}, $what); - if (my ($where2, $what2) = m|#.*link\s*=\s*(\S+)/(\S+)|) { - my $old = "$opts{man1dir}/$what.$opts{man1ext}"; - my $new = "$opts{man1dir}/$what2.$opts{man1ext}"; - unlink($new); - link($old, $new); + if ($has_man1dir) { + if (my ($where2, $what2) = m|#.*link\s*=\s*(\S+)/(\S+)|) { + my $old = "$opts{man1dir}/$what.$opts{man1ext}"; + my $new = "$opts{man1dir}/$what2.$opts{man1ext}"; + unlink($new); + link($old, $new); + } } } |