diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/latex-tds/build.pl')
-rwxr-xr-x | Master/texmf-dist/source/latex/latex-tds/build.pl | 239 |
1 files changed, 123 insertions, 116 deletions
diff --git a/Master/texmf-dist/source/latex/latex-tds/build.pl b/Master/texmf-dist/source/latex/latex-tds/build.pl index 58a0ba98975..1999ce282ff 100755 --- a/Master/texmf-dist/source/latex/latex-tds/build.pl +++ b/Master/texmf-dist/source/latex/latex-tds/build.pl @@ -4,10 +4,10 @@ $^W=1; my $prj = 'latex-tds'; my $file = 'build.pl'; -my $version = cvs('$Revision: 1.102 $'); -my $date = cvs('$Date: 2006/08/28 09:42:43 $'); +my $version = cvs('$Revision: 1.115 $'); +my $date = cvs('$Date: 2008/04/01 19:17:01 $'); my $author = 'Heiko Oberdiek'; -my $copyright = "Copyright 2006 $author"; +my $copyright = "Copyright 2006, 2007 $author"; chomp(my $license = <<"END_LICENSE"); % $copyright % @@ -83,13 +83,15 @@ my $prg_curl = 'curl'; my $prg_docstrip = 'tex -shell-escape'; my $prg_epstopdf = 'epstopdf'; my $prg_find = 'find'; -my $prg_java = 'java'; +my $prg_java = '/work/java-1.5.0/bin/java'; + # java 1.6 don't work with the used version of Multivalent my $prg_ls = "ls"; my $prg_makeindex = 'makeindex'; my $prg_mkdir = 'mkdir'; my $prg_mv = 'mv'; my $prg_patch = "patch"; my $prg_pdflatex = 'pdflatex'; +my $prg_pdflatextds = "pdflatex -fmt=$cwd/$dir_build/latex-tds"; my $prg_rm = "rm"; my $prg_rsync = "rsync"; my $prg_sed = "sed"; @@ -147,6 +149,16 @@ GetOptions( info("Build modules: @list_modules"); +### Format generation +if (@list_modules > 0) { + section('Format generation'); + + ensure_directory($dir_build); + chdir $dir_build; + run("$prg_pdflatex -ini -etex ../tex/latex-tds.ini"); + chdir $cwd; +} + ### Download { section('Download'); @@ -154,15 +166,18 @@ info("Build modules: @list_modules"); sub download_ctan ($$) { my $file = shift; my $ctan_path = shift; + $ctan_path .= '/' if $ctan_path ne ''; ensure_directory($dir_incoming_ctan); download("$dir_incoming_ctan/$file.zip", - "$url_ctan/$ctan_path/$file.zip"); + "$url_ctan/$ctan_path$file.zip"); } - sub download_ams ($) { - my $file = shift; + sub download_ams ($$) { + my $file = shift; + my $ams_path = shift; + $ams_path .= '/' if $ams_path ne ''; ensure_directory($dir_incoming_ams); download("$dir_incoming_ams/$file.zip", - "$url_ams/$file.zip"); + "$url_ams/$ams_path$file.zip"); } sub download ($$) { my $file = shift; @@ -185,10 +200,12 @@ info("Build modules: @list_modules"); download_ctan('cyrillic', 'macros/latex/required'); download_ctan('babel', 'macros/latex/required'); download_ctan('amslatex', 'macros/latex/required'); + download_ctan('amsrefs', 'macros/latex/contrib'); download_ctan('psnfss', 'macros/latex/required'); download_ctan('tds', ''); - download_ams('amslatex'); - download_ams('amsrefs'); + download_ams('amslatex', ''); + download_ams('amsrefs-tds', 'amslatex/amsrefs'); + download_ams('amsrefs-ctan', 'amslatex/amsrefs'); } ### Remove previous build @@ -204,6 +221,8 @@ section('Remove previous build'); ### Unpack section('Unpacking'); { + my $texmf_ams = "$dir_build/amslatex/texmf"; + sub unpacking ($$$) { my $pkg = shift; my $zipfile = shift; @@ -220,9 +239,10 @@ section('Unpacking'); sub unpack_ams ($) { my $name = shift; $modules{'amslatex'} or return 1; + ensure_directory($texmf_ams); unpacking('amslatex', "$dir_incoming_ams/$name.zip", - "$dir_build/amslatex/texmf"); + "$texmf_ams"); } sub unpack_psnfss ($) { my $name = shift; @@ -236,8 +256,14 @@ section('Unpacking'); ensure_directory($dir_build); unpack_ctan('base'); map { unpack_ctan($_); } @required_list; - unpack_ams('amslatex'); - unpack_ams('amsrefs'); + if ($modules{'amslatex'}) { + unpack_ams('amsrefs-tds'); + run("$prg_rm -rf $dir_build/amslatex/amsrefs"); + unpacking('amslatex', + "$dir_incoming_ams/amsrefs-ctan.zip", + "$dir_build/amslatex"); + unpack_ams('amslatex'); + } unpack_psnfss('lw35nfss'); unpack_psnfss('freenfss'); unpack_ctan('tds'); @@ -257,15 +283,13 @@ section('Patches'); run("$prg_checksum psfonts.dtx"); chdir $cwd; } - + if ($modules{'babel'}) { map { patch("babel/$_"); } qw[ - greek.ins - bbcompat.dtx - athnum.dtx - albanian.dtx - finnish.dtx - frenchb.dtx + babel.dtx + galician.dtx + danish.dtx + latin.dtx ]; } } @@ -327,12 +351,6 @@ section('Install source'); ]); # babel/manifest.txt: to be removed in a future release # already removed: bghyphen.tex, bghyphsi.tex - install_gen_source('generic', 'babel', qw[ - mik2t2.tex - catmik.tex - lahyph.tex - ]); - # *.tex install_gen_source('', 'tds', qw[ Makefile tds2texi.el @@ -407,8 +425,8 @@ section('Docstrip'); section('TDS cleanup'); { if ($modules{'amslatex'}) { + my $dir_tds = "$dir_build/amslatex/texmf"; sub cleanup_tds ($@) { - my $dir_tds = "$dir_build/amslatex/texmf"; my $sub_tree = shift; my @list = map { glob("$dir_tds/$sub_tree/$_"); } @_; @@ -416,10 +434,6 @@ section('TDS cleanup'); map { rmdir; } grep { -d $_; } @list; } - cleanup_tds 'bibtex', qw[ - bib/ams - bib - ]; cleanup_tds 'source/latex/amscls', qw[ *.bst *.template @@ -429,34 +443,31 @@ section('TDS cleanup'); diffs-m.txt amstex.sty ]; + run("$prg_mv $dir_tds/source/latex/amsrefs/amsrefs.faq" + . " $dir_tds/doc/latex/amsrefs/"); cleanup_tds 'source/latex/amsrefs', qw[ - *.dvi - *.pdf - amsrefs.faq cite-x*.tex jr.bib gktest.ltb ]; - cleanup_tds 'doc/latex/amscls', qw[ - amsrefs.dvi - textcmds.dvi - ]; # CTAN:macros/latex/required/amslatex/other/* run("$prg_cp $dir_build/amslatex/other/amsbooka.sty" . " $dir_build/amslatex/texmf/tex/latex/amscls/amsbooka.sty"); + cleanup_tds 'source/latex/amsltx2', qw[ + 00readme.txt + install.txt + ]; + cleanup_tds 'source/latex', qw[ + amsltx2 + ]; } if ($modules{'babel'}) { my $tds_dir = "$dir_build/babel/texmf"; - my $from_dir = "$tds_dir/tex/generic/babel"; + my $from_dir = "$tds_dir/source/generic/babel"; ### Correction for *.drv files run("$prg_mv $from_dir/*.drv $dir_build/babel"); - - ### Correction for *.ist files - my $dir_dest = "$tds_dir/makeindex/babel"; - ensure_directory($dir_dest); - run("$prg_mv $from_dir/*.ist $dir_dest"); } } @@ -549,10 +560,6 @@ section('Install tex doc'); *.skeleton install.OzTeX* ]); - install('texmf/tex/generic/hyphen', qw[ - iahyphen.tex - icehyph.tex - ]); chdir $cwd; } @@ -593,9 +600,9 @@ if ($modules{'base'}) { sub base_guide ($) { my $guide = "$_[0]guide"; - run("$prg_pdflatex $guide"); - run("$prg_pdflatex $guide"); - run("$prg_pdflatex $guide"); + run("$prg_pdflatextds -draftmode $guide"); + run("$prg_pdflatextds -draftmode $guide"); + run("$prg_pdflatextds $guide"); install_pdf('base', $guide); 1; } @@ -603,48 +610,48 @@ if ($modules{'base'}) { my $ext = shift; my $base = shift; my $file = "$base.$ext"; - run("$prg_pdflatex $file"); - run("$prg_pdflatex $file"); - run("$prg_pdflatex $file"); + run("$prg_pdflatextds -draftmode $file"); + run("$prg_pdflatextds -draftmode $file"); + run("$prg_pdflatextds $file"); install_pdf('base', $base); 1; } sub complex_dtx ($) { my $base = shift; my $dtx = "$base.dtx"; - run("$prg_pdflatex $dtx"); + run("$prg_pdflatextds -draftmode $dtx"); run_makeindex("$base.idx", 'gind.ist'); run_makeindex("$base.glo", 'gglo.ist', "$base.gls"); - run("$prg_pdflatex $dtx"); + run("$prg_pdflatextds -draftmode $dtx"); run_makeindex("$base.idx", 'gind.ist'); run_makeindex("$base.glo", 'gglo.ist', "$base.gls"); - run("$prg_pdflatex $dtx"); - run("$prg_pdflatex $dtx"); # hydestopt + run("$prg_pdflatextds -draftmode $dtx"); + run("$prg_pdflatextds $dtx"); # hydestopt install_pdf('base', "$base"); 1; } sub book_err ($) { my $base = shift; my $err = "$base.err"; - run("$prg_pdflatex $err"); + run("$prg_pdflatextds -draftmode $err"); run("$prg_sed -i -e '" . 's/\\\\endinput/\\\\input{errata.cfg}\\n\\\\endinput/' . "' $base.cfg"); - run("$prg_pdflatex $err"); - run("$prg_pdflatex $err"); - run("$prg_pdflatex $err"); # hydestopt + run("$prg_pdflatextds -draftmode $err"); + run("$prg_pdflatextds -draftmode $err"); + run("$prg_pdflatextds $err"); # hydestopt install_pdf('base', "$base"); 1; } chdir "$dir_build/base"; - run("$prg_pdflatex source2e"); + run("$prg_pdflatextds -draftmode source2e"); run_makeindex('source2e.idx', 'gind.ist'); run_makeindex('source2e.glo', 'gglo.ist', 'source2e.gls'); - run("$prg_pdflatex source2e"); + run("$prg_pdflatextds -draftmode source2e"); run_makeindex('source2e.idx', 'gind.ist'); run_makeindex('source2e.glo', 'gglo.ist', 'source2e.gls'); - run("$prg_pdflatex source2e"); - run("$prg_pdflatex source2e"); # hydestopt + run("$prg_pdflatextds -draftmode source2e"); + run("$prg_pdflatextds source2e"); # hydestopt install_pdf('base', 'source2e'); map { complex_dtx $_ } qw[ classes @@ -685,9 +692,9 @@ if ($modules{'base'}) { . 's/\\\\documentclass{article}/' . '\\\\documentclass{article}\\n\\\\input{manual.cfg}/' . "' manual.err"); - run("$prg_pdflatex manual.err"); - run("$prg_pdflatex manual.err"); - run("$prg_pdflatex manual.err"); # hydestopt + run("$prg_pdflatextds -draftmode manual.err"); + run("$prg_pdflatextds -draftmode manual.err"); + run("$prg_pdflatextds manual.err"); # hydestopt install_pdf('base', 'manual'); base_guide('cfg'); base_guide('cls'); @@ -696,13 +703,13 @@ if ($modules{'base'}) { base_guide('fnt'); base_guide('mod'); base_guide('usr'); - run("$prg_pdflatex doc_lppl"); - run("$prg_pdflatex doc_lppl"); - run("$prg_pdflatex doc_lppl"); # hydestopt + run("$prg_pdflatextds -draftmode doc_lppl"); + run("$prg_pdflatextds -draftmode doc_lppl"); + run("$prg_pdflatextds doc_lppl"); # hydestopt run("$prg_mv doc_lppl.pdf lppl.pdf"); install_pdf('base', 'lppl'); - run("$prg_pdflatex ltxcheck.drv"); - run("$prg_pdflatex ltxcheck.drv"); + run("$prg_pdflatextds -draftmode ltxcheck.drv"); + run("$prg_pdflatextds ltxcheck.drv"); install_pdf('base', 'ltxcheck'); my $code = <<'END_CODE'; \let\SavedDocumentclass\documentclass @@ -713,8 +720,8 @@ if ($modules{'base'}) { \input{ltx3info} END_CODE $code =~ s/\s//g; - run("$prg_pdflatex '$code'"); - run("$prg_pdflatex '$code'"); + run("$prg_pdflatextds -draftmode '$code'"); + run("$prg_pdflatextds -draftmode '$code'"); run("$prg_pdflatex '$code'"); # hydestopt install_pdf('base', 'ltx3info'); # for (my $i = 1; $i <= 17; $i++) { @@ -730,7 +737,7 @@ END_CODE map { $lastissue = $1 if /ltnews(\d+)\.tex/ and $lastissue < $1; } glob('ltnews*.tex'); my $cmd_ltnews = - "$prg_pdflatex '\\def\\lastissue{$lastissue}\\input{$ltnews}'"; + "$prg_pdflatextds '\\def\\lastissue{$lastissue}\\input{$ltnews}'"; run($cmd_ltnews); run($cmd_ltnews); run($cmd_ltnews); @@ -746,14 +753,14 @@ if ($modules{'tools'}) { my @list = glob("*.dtx"); map { s/\.dtx$//; } @list; foreach my $entry (@list) { - run("$prg_pdflatex $entry.dtx"); + run("$prg_pdflatextds -draftmode $entry.dtx"); run_makeindex("$entry.idx", 'gind.ist'); run_makeindex("$entry.glo", 'gglo.ist', "$entry.gls"); - run("$prg_pdflatex $entry.dtx"); + run("$prg_pdflatextds -draftmode $entry.dtx"); run_makeindex("$entry.idx", 'gind.ist'); run_makeindex("$entry.glo", 'gglo.ist', "$entry.gls"); - run("$prg_pdflatex $entry.dtx"); - run("$prg_pdflatex $entry.dtx"); # hydestopt + run("$prg_pdflatextds -draftmode $entry.dtx"); + run("$prg_pdflatextds $entry.dtx"); # hydestopt install_pdf('tools', $entry); } @@ -813,7 +820,7 @@ END_ENTRY \end{document} END_TRAILER close(OUT); - run("$prg_pdflatex tools.tex"); + run("$prg_pdflatextds tools.tex"); install_pdf('tools', 'tools'); chdir $cwd; } @@ -825,9 +832,9 @@ if ($modules{'cyrillic'}) { chdir "$dir_build/cyrillic"; my @list = (glob("*.dtx"), glob("*.fdd")); foreach my $entry (@list) { - run("$prg_pdflatex $entry"); - run("$prg_pdflatex $entry"); - run("$prg_pdflatex $entry"); # hydestopt + run("$prg_pdflatextds -draftmode $entry"); + run("$prg_pdflatextds -draftmode $entry"); + run("$prg_pdflatextds $entry"); # hydestopt $entry =~ s/\.(dtx|fdd)$//; install_pdf('cyrillic', $entry); } @@ -842,9 +849,9 @@ if ($modules{'graphics'}) { my @list = glob("*.dtx"); map { s/\.dtx$//; } @list; foreach my $entry (@list) { - run("$prg_pdflatex $entry.dtx"); - run("$prg_pdflatex $entry.dtx"); - run("$prg_pdflatex $entry.dtx"); # hydestopt + run("$prg_pdflatextds -draftmode $entry.dtx"); + run("$prg_pdflatextds -draftmode $entry.dtx"); + run("$prg_pdflatextds $entry.dtx"); # hydestopt install_pdf('graphics', $entry); } my $code = <<'END_CODE'; @@ -853,11 +860,11 @@ if ($modules{'graphics'}) { \input{grfguide} END_CODE $code =~ s/\s//g; - run("$prg_pdflatex '$code'"); + run("$prg_pdflatextds -draftmode '$code'"); run("$prg_epstopdf a.ps"); - run("$prg_pdflatex grfguide"); - run("$prg_pdflatex grfguide"); - run("$prg_pdflatex grfguide"); + run("$prg_pdflatextds -draftmode grfguide"); + run("$prg_pdflatextds -draftmode grfguide"); + run("$prg_pdflatextds grfguide"); install_pdf('graphics', 'grfguide'); chdir $cwd; } @@ -887,15 +894,15 @@ if ($modules{'amslatex'}) { my $ams_drv = "$cwd/$dir_tex/ams.drv"; symlink $ams_drv, "$doc.drv"; - run("$prg_pdflatex $doc.drv"); + run("$prg_pdflatextds -draftmode $doc.drv"); makeindex($doc); bibtex($doc); - run("$prg_pdflatex $doc.drv"); + run("$prg_pdflatextds -draftmode $doc.drv"); makeindex($doc); - run("$prg_pdflatex $doc.drv"); + run("$prg_pdflatextds -draftmode $doc.drv"); makeindex($doc); - run("$prg_pdflatex $doc.drv"); - run("$prg_pdflatex $doc.drv") if $doc eq 'amsrefs'; + run("$prg_pdflatextds -draftmode $doc.drv") if $doc eq 'amsrefs'; + run("$prg_pdflatextds $doc.drv"); install_pdf($amspkg, $doc); } @@ -917,7 +924,7 @@ if ($modules{'amslatex'}) { chdir "$dir_build/amslatex/amsrefs"; symlink '../texmf', 'texmf'; - map { generate_doc 'amscls', $_; } qw[ + map { generate_doc 'amsrefs', $_; } qw[ cite-xa cite-xb cite-xh cite-xs amsrefs amsxport ifoption mathscinet pcatcode rkeyval textcmds ]; @@ -930,13 +937,13 @@ if ($modules{'psnfss'}) { chdir "$dir_build/psnfss"; - run("$prg_pdflatex psfonts.dtx"); - run("$prg_pdflatex psfonts.dtx"); + run("$prg_pdflatextds -draftmode psfonts.dtx"); + run("$prg_pdflatextds psfonts.dtx"); install_pdf('psnfss', 'psfonts'); - run("$prg_pdflatex psnfss2e.drv"); - run("$prg_pdflatex psnfss2e.drv"); - run("$prg_pdflatex psnfss2e.drv"); + run("$prg_pdflatextds -draftmode psnfss2e.drv"); + run("$prg_pdflatextds -draftmode psnfss2e.drv"); + run("$prg_pdflatextds psnfss2e.drv"); install_pdf('psnfss', 'psnfss2e'); chdir $cwd; @@ -952,8 +959,8 @@ if ($modules{'babel'}) { sub simple_doc ($) { my $file = shift; - run("$prg_pdflatex $file"); - run("$prg_pdflatex $file"); + run("$prg_pdflatextds -draftmode $file"); + run("$prg_pdflatextds $file"); $file =~ s/\.\w{3}$//; install_babel_pdf($file); } @@ -962,10 +969,10 @@ if ($modules{'babel'}) { my $drv = "$cwd/$dir_tex/ams.drv"; symlink $drv, "$doc.drv"; - run("$prg_pdflatex $doc.drv"); - run("$prg_pdflatex $doc.drv"); - run("$prg_pdflatex $doc.drv"); - run("$prg_pdflatex $doc.drv"); + run("$prg_pdflatextds -draftmode $doc.drv"); + run("$prg_pdflatextds -draftmode $doc.drv"); + run("$prg_pdflatextds -draftmode $doc.drv"); + run("$prg_pdflatextds $doc.drv"); install_babel_pdf($doc); } @@ -992,14 +999,14 @@ if ($modules{'babel'}) { tb1604 ]; - run("$prg_pdflatex babel.tex"); + run("$prg_pdflatextds -draftmode babel.tex"); run_makeindex('babel.idx', 'bbind.ist'); run_makeindex('babel.glo', 'bbglo.ist', 'babel.gls'); - run("$prg_pdflatex babel.tex"); + run("$prg_pdflatextds -draftmode babel.tex"); run_makeindex('babel.idx', 'bbind.ist'); run_makeindex('babel.glo', 'bbglo.ist', 'babel.gls'); - run("$prg_pdflatex babel.tex"); - run("$prg_pdflatex babel.tex"); + run("$prg_pdflatextds -draftmode babel.tex"); + run("$prg_pdflatextds babel.tex"); install_babel_pdf('babel'); chdir $cwd; @@ -1033,9 +1040,9 @@ END_TEXT close(IN); unlink('tds.aux'); - run("$prg_pdflatex $file_tds_new"); - run("$prg_pdflatex $file_tds_new"); - run("$prg_pdflatex $file_tds_new"); + run("$prg_pdflatextds -draftmode $file_tds_new"); + run("$prg_pdflatextds -draftmode $file_tds_new"); + run("$prg_pdflatextds $file_tds_new"); install_gen_pdf('', 'tds', 'tds'); chdir $cwd; |