summaryrefslogtreecommitdiffstats
path: root/Makefile.PL
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.PL')
-rw-r--r--Makefile.PL11
1 files changed, 10 insertions, 1 deletions
diff --git a/Makefile.PL b/Makefile.PL
index 8a3207ab..c41c9f03 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -9,6 +9,7 @@ use ExtUtils::MakeMaker;
# --without-rpm : don't use rpm to find some paths, and generate make targets
# to produce an rpm of this
# --install-po : compile .po files and install locale files
+# also, install localized man pages
# --install-gui : install gurpmi
my $with_rpm = 1; $with_rpm = 0 if grep $_ eq '--without-rpm', @ARGV;
my $with_po = 0; $with_po = 1 if grep $_ eq '--install-po', @ARGV;
@@ -74,6 +75,14 @@ sub special_targets {
$inherited;
}
+sub manifypods {
+ my $inherited = shift->SUPER::manifypods(@_);
+ #- TODO repartition of man pages in sections by pod2man is incorrect
+ #- TODO as more languages are added adapt the following quick hack
+ $with_po and $inherited =~ s/\t\$/\t\$(NOECHO) \$(MKPATH) \$(INST_MAN8DIR)\/fr\n$&/;
+ $inherited;
+}
+
# Additional targets
sub postamble {
<<"**MM**";
@@ -147,7 +156,7 @@ WriteMakefile(
$targ =~ s/\.(\d)\.pod$//;
my $section = $1 || 1;
( $_ => "\$(INST_MAN${section}DIR)/$targ.$section" );
- } <pod/*.pod>
+ } <pod/*.pod>, $with_po ? <pod/*/*.pod> : ()
},
dist => { COMPRESS => "bzip2", SUFFIX => ".bz2" },
);