This adds man page installation when using NO_PERL_MAKEMAKER to ensure
parity with the normal case where ExtUtils::MakeMaker is used.

Signed-off-by: Tom G. Christensen <t...@jupiterrise.com>
---
 perl/Makefile | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/perl/Makefile b/perl/Makefile
index ce53a240c..c4b96b058 100644
--- a/perl/Makefile
+++ b/perl/Makefile
@@ -31,6 +31,11 @@ perllib = $(INSTALLDIRS)
 endif
 perlinstdir := $(shell sh -c "$(PERL_PATH_SQ) -V:install$(perllib)lib | cut 
-d\' -f2")
 instdir_SQ = $(subst ','\'',$(perlinstdir))
+ifdef mandir
+mandir_SQ = $(subst ',''\'',$(mandir))
+else
+mandir_SQ = /usr/share/man
+endif
 
 modules += Git
 modules += Git/I18N
@@ -74,9 +79,17 @@ $(makfile): ../GIT-CFLAGS Makefile
                else \
                        subdir=/$${i%/*}; \
                fi; \
+               if test -z $$subdir; \
+               then \
+                       manpage=$$i; \
+               else \
+                       manpage=$$(echo $$i|sed 's#/#::#g'); \
+               fi; \
                echo '  $(RM) "$$(DESTDIR)$(instdir_SQ)/'$$i'.pm"' >> $@; \
                echo '  mkdir -p "$$(DESTDIR)$(instdir_SQ)'$$subdir'"' >> $@; \
                echo '  cp '$$i'.pm "$$(DESTDIR)$(instdir_SQ)/'$$i'.pm"' >> $@; 
\
+               echo '  mkdir -p "$$(DESTDIR)$(mandir_SQ)/man3"' >> $@; \
+               echo '  pod2man '$$i'.pm 
"$$(DESTDIR)$(mandir_SQ)/man3/'$$manpage'.3pm"' >> $@; \
        done
        echo '  $(RM) "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
        '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
-- 
2.12.2

Reply via email to