summaryrefslogtreecommitdiff
path: root/Master/tlpkg/libexec/ctan2tds
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/libexec/ctan2tds')
-rwxr-xr-xMaster/tlpkg/libexec/ctan2tds62
1 files changed, 47 insertions, 15 deletions
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds
index f5c14d86b38..79e304c32f8 100755
--- a/Master/tlpkg/libexec/ctan2tds
+++ b/Master/tlpkg/libexec/ctan2tds
@@ -30,6 +30,7 @@ use vars qw($opt_ctan_dir);
$MV = "mv";
$CP = "cp -p";
$RM = "rm -vf"; # just to get feedback from GNU rm on removals
+$MAKEINFO = "makeinfo";
$INSTALL = "install -D -m 664";
$| = 1;
@@ -2142,6 +2143,11 @@ $standardxmt='\.xmt';
'latex2man' => '\.info',
);
+# packages which have info files to build and then install.
+%specialtexinfos = (
+ 'mf2pt1' => '.*\.texi',
+);
+
# packages which have man pages to install.
%specialmans = (
'bundledoc' => '\.1$',
@@ -2565,6 +2571,7 @@ sub donormal {
&dosource;
&dotype1;
&doscripts;
+ &dotexinfos;
&doinfos;
&domans;
@@ -2823,25 +2830,31 @@ sub doinfos {
&install ("$TOPDEST/texmf/doc/info/", $infopatt);
}
-# xmltex files
-sub doxmt {
- my $xmtpatt = $specialxmt{$package} || $standardxmt;
- &install ("$DEST/tex/xmltex/$package", $xmtpatt);
-}
+
+# generate info files from .texi.
+#
+sub dotexinfos {
+ my $texipatt = $specialtexinfos{$package};
+ return unless $texipatt;
+
+ local *DOT;
+ opendir (DOT, ".") || die "opendir(.) failed: $! in " . `pwd`;
+ my @files = readdir (DOT);
+ my @texi_files = grep (/$texipatt/, @files);
+ die ("dotexinfos: no texi files match $texipatt (@files) in " . `pwd`)
+ if ! @texi_files;
-# build the font files
-sub domf {
- $mfpatt = $specialmf{$package} || $standardmf;
- &runmf ($mfpatt);
+ closedir (DOT) || die "closedir(.) failed: $! in " . `pwd`;
- my $mfdir = "$DEST/fonts/source/$Foundry/$package";
- #
- # don't use $mfpatt since that's only the tfm-able mf files; just
- # install all the .mf files.
- my $mf_inst_patt = $specialmfinstall{$package} || $standardmfinstall;
- &install ($mfdir, $mf_inst_patt);
+ print "tl_texi_to_info for: @texi_files\n";
+ &SYSTEM ("$MAKEINFO --no-split @texi_files");
+
+ # install() uses the @filenames global, ugh.
+ local @filenames = <*.info>;
+ &install ("$TOPDEST/texmf/doc/info/", '.info');
}
+
# man pages. We put these in texmf/doc/man/man1, a la info (see above).
#
sub domans {
@@ -2886,6 +2899,25 @@ sub tl_man_to_pdf {
}
+# xmltex files
+sub doxmt {
+ my $xmtpatt = $specialxmt{$package} || $standardxmt;
+ &install ("$DEST/tex/xmltex/$package", $xmtpatt);
+}
+
+# build the font files
+sub domf {
+ $mfpatt = $specialmf{$package} || $standardmf;
+ &runmf ($mfpatt);
+
+ my $mfdir = "$DEST/fonts/source/$Foundry/$package";
+ #
+ # don't use $mfpatt since that's only the tfm-able mf files; just
+ # install all the .mf files.
+ my $mf_inst_patt = $specialmfinstall{$package} || $standardmfinstall;
+ &install ($mfdir, $mf_inst_patt);
+}
+
sub rundvi {
local($thispatt) = @_;
$TEX = $specialTEX{$package};