| | 18 | |
| | 19 | # Work around a bug in ExtUtils::MM_Any::manifypods_target(). |
| | 20 | sub MY::manifypods_target { |
| | 21 | my($self) = shift; |
| | 22 | |
| | 23 | my $man1pods = ''; |
| | 24 | my $man3pods = ''; |
| | 25 | my $dependencies = ''; |
| | 26 | |
| | 27 | # populate manXpods & dependencies: |
| | 28 | foreach my $name (keys %{$self->{MAN1PODS}}) { |
| | 29 | $dependencies .= " \\\n\t$name"; |
| | 30 | } |
| | 31 | |
| | 32 | foreach my $name (keys %{$self->{MAN3PODS}}) { |
| | 33 | $dependencies .= " \\\n\t$name" |
| | 34 | } |
| | 35 | |
| | 36 | my $manify = <<END; |
| | 37 | manifypods : pure_all $dependencies |
| | 38 | END |
| | 39 | |
| | 40 | my @man_cmds; |
| | 41 | foreach my $section (qw(1 3)) { |
| | 42 | my $pods = $self->{"MAN${section}PODS"}; |
| | 43 | push @man_cmds, $self->split_command(<<CMD, %$pods); |
| | 44 | \$(NOECHO) \$(POD2MAN) --section=$section --perm_rw=\$(PERM_RW) |
| | 45 | CMD |
| | 46 | } |
| | 47 | |
| | 48 | $manify .= "\t\$(NOECHO) \$(NOOP)\n" unless @man_cmds; |
| | 49 | $manify .= join '', map { "$_\n" } @man_cmds; |
| | 50 | |
| | 51 | return $manify; |
| | 52 | } |