diff options
Diffstat (limited to 'Master/tlpkg/libexec/ctan2tds')
-rwxr-xr-x | Master/tlpkg/libexec/ctan2tds | 51 |
1 files changed, 40 insertions, 11 deletions
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index 70d414b0078..651cbc117cd 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -2008,7 +2008,8 @@ sub install } } -# build the documentation files + +# build the documentation files (we don't any more) sub dodvi { # packages which are doc themselves rarely rebuild cleanly, @@ -2154,17 +2155,9 @@ sub doinfos &install ("$TOPDEST/texmf/doc/info/", $infopatt); } -# man pages. We put these in texmf/doc/man/man1, a la info (see above). -# -sub domans -{ - my $manpatt = $specialmans{$package}; - return unless $manpatt; - &install ("$TOPDEST/texmf/doc/man/man1/", $manpatt); -} - # xmltex files -sub doxmt{ +sub doxmt +{ my $xmtpatt = $specialxmt{$package} || $standardxmt; &install ("$DEST/tex/xmltex/$package", $xmtpatt); } @@ -2182,6 +2175,40 @@ sub domf { &install ($mfdir, $mf_inst_patt); } +# man pages. We put these in texmf/doc/man/man1, a la info (see above). +# +sub domans +{ + my $manpatt = $specialmans{$package}; + return unless $manpatt; + &install ("$TOPDEST/texmf/doc/man/man1/", $manpatt); +} + +# When a package has man pages, we want to update the pdf versions of +# them that we distribute using our Makefile setup, so that they are +# all consistent. So we copy over our Makefiles, run make, and then +# remove them. +# +sub tl_man_to_pdf +{ + my $Master_man = "$Master/texmf/doc/man"; + my $pkg_man = "$TOPDEST/texmf/doc/man"; + &SYSTEM ("cd $Master_man && $CP --parents Makefile man1/Makefile $pkg_man/"); + + # Extra complication: we don't want to rebuild everything, only those + # that have changed. Therefore, also copy in the pdfs for the package + # being updated from the Master man dir. + for my $man (<$pkg_man/man1/*>) { + (my $pdf_man = $man) =~ s,^.*/,,; # just foo.1, no directories + $pdf_man =~ s/1$/man1.pdf/; # foo.1 -> foo.man1.pdf + &SYSTEM ("$CP $Master_man/man1/$pdf_man $pkg_man/man1"); # copy existing + } + + &SYSTEM ("cd $pkg_man && make DIR=man1"); # build new pdfs + &SYSTEM ("cd $pkg_man && $RM Makefile man1/Makefile"); # rm Makefiles +} + + sub rundvi { local($thispatt) = @_; $TEX = $specialTEX{$package}; @@ -3780,6 +3807,8 @@ sub POSTfontools &xmkdir ($encdir); &SYSTEM ("$MV share/* $encdir/"); &SYSTEM ("rmdir share"); # skip pdfs, we'll make our own + # + &tl_man_to_pdf (); } sub POSTfpl |