X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=installman;h=2260c26d4249b7fcb43557b9d89ba7cc6c1672d5;hb=61de9fb5aad39c2904a43125c7c70031be6bc679;hp=d871dc987f02ba52e01e20fdb8b47d58dcd77d96;hpb=b48e406ff01332b3eaa30403da21cfb796a1f567;p=p5sagit%2Fp5-mst-13.2.git diff --git a/installman b/installman index d871dc9..2260c26 100755 --- a/installman +++ b/installman @@ -77,18 +77,21 @@ 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 () { next if /^#/; chomp; $_ = $1 if /#.*pod\s*=\s*(\S+)/; - my ($where, $what) = m|^(.*?)/(\S+)|; + my ($where, $what) = m|^(\S*)/(\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); + } } } @@ -136,6 +139,7 @@ sub pod2man { my $tmp; # Skip .pm files that have corresponding .pod files, and Functions.pm. next if (($tmp = $mod) =~ s/\.pm$/.pod/ && -f $tmp); + next if $mod =~ m:/t/:; # no pods from test directories next if ($manpage eq 'Pod/Functions.pm'); #### Used only by pod itself # Convert name from File/Basename.pm to File::Basename.3 format,