| | 17 | # On Win32 using nmake-1.5 the Makefile produced will die. |
| | 18 | # This is a result of a hueristic in ExtUtils::MM_Any::split_command(). |
| | 19 | # There is a bug open on this |
| | 20 | # |
| | 21 | # http://rt.cpan.org/Public/Bug/Display.html?id=20145 |
| | 22 | # |
| | 23 | # Install a cheat until a real fix comes along. |
| | 24 | my $holdme = \&ExtUtils::MM_Win32::max_exec_len; |
| | 25 | |
| | 26 | *ExtUtils::MM_Win32::max_exec_len = sub { |
| | 27 | my $self = shift; |
| | 28 | $self->{_MAX_EXEC_LEN} ||= 1.67 * 1024; |
| | 29 | }; |
| | 30 | |
| | 31 | # Do the needful for writing the Makefile. |
| 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 | | } |
| | 34 | # Remove our cheat so other modules get expected behavior. |
| | 35 | *ExtUtils::MM_Win32::max_exec_len = $holdme; |