diff options
Diffstat (limited to 'Master/texmf-dist/doc/plain/pwebmac/makeall')
-rw-r--r-- | Master/texmf-dist/doc/plain/pwebmac/makeall | 53 |
1 files changed, 30 insertions, 23 deletions
diff --git a/Master/texmf-dist/doc/plain/pwebmac/makeall b/Master/texmf-dist/doc/plain/pwebmac/makeall index 22e4f4662e0..0ceba6f5116 100644 --- a/Master/texmf-dist/doc/plain/pwebmac/makeall +++ b/Master/texmf-dist/doc/plain/pwebmac/makeall @@ -1,12 +1,17 @@ #!/bin/sh +# Test driver for 'pwebmac.tex' in combination with various TeX engines. +# Production tool for all major WEB programs in TeX Live (invoked as +# './makeall --new --pdftocfront --tex={pdftex,xetex}'). +# Public domain. Originally written by Andreas Scherer, 2020. -LONGOPTS=changes,new,pdftocfront,tex: -SHRTOPTS=cnpt: +LONGOPTS=changes,new,outdir:,pdftocfront,tex: +SHRTOPTS=cno:pt: -CHANGES=false -NEW=false -PDFTOCFRONT=false -TEX=tex +CHANGES=false # apply main changefile to WEB source +NEW=false # '\input pwebmac' instead of '\input webmac' +OUTDIR=. # path where the resulting tarballs are placed +PDFTOCFRONT=false # push table-of-contents to front of PDF output +TEX=tex # or 'pdftex' or 'xetex' getopt -T >/dev/null @@ -24,8 +29,8 @@ while true do case "$1" in -c | --changes ) CHANGES=true; shift ;; - -n | --new ) NEW=true; export TEXINPUTS=".:/opt/github/web//:" - shift ;; + -n | --new ) NEW=true; shift ;; + -o | --outdir ) OUTDIR="$2"; shift 2 ;; -p | --pdftocfront ) PDFTOCFRONT=true; shift ;; -t | --tex ) TEX="$2"; shift 2 ;; -- ) shift; break ;; @@ -43,14 +48,14 @@ for f in \ do if $CHANGES then - c=$(basename $f .web).ch + c=$(basename $f .web) case $c in - "pdftex.ch"|"xetex.ch" ) + "pdftex"|"xetex" ) c=$KNUTHWARE/$c c=$(echo $c | sed -e 's?\(texk/\)?Work/\1?') ;; * ) c=$KNUTHWARE/$c ;; esac - weave $f $c + weave $f $c.ch sed -i -e "s/\(\\\\let\\\\maybe=\)\\\\iftrue/\1\\\\iffalse/" \ $(basename $f .web).tex else @@ -74,7 +79,7 @@ do # purge conflict between bibtex.web and webmac.tex # 'E' no longer free to be active character # fix table-of-contents page for bibtex - "bibtex") sed -i -e "s/titlefalse/titletrue/" \ + "bibtex" ) sed -i -e "s/titlefalse/titletrue/" \ -e "70,77d" $f.tex ;; # make room for new material in weave.web @@ -104,6 +109,7 @@ FI r pdftex.patch }" $f.tex fi + # active links in PDF outlines/bookmarks cat > texmf-pdf.patch << FI \ifacro{\toksF={}\makeoutlinetoks{[#2] #3}\outlinedone\outlinedone}\fi FI @@ -124,7 +130,6 @@ FI if $PDFTOCFRONT then # shift table-of-contents pages to the front in PDF - export TEXINPUTS=".:/opt/github/cwebbin//:"$TEXINPUTS sed -i -e "1 s/\(webmac\)/\1\n\\\\input pdfwebtocfront/" $f.tex $TEX $f.tex # run TeX twice fi @@ -135,17 +140,19 @@ done if $PDFTOCFRONT then # create tarballs for publication - pax vftovp.pdf vptovf.pdf -wvzf etc.tar.gz -s ,^,etc/, - pax mf.pdf -wvzf mf.tar.gz -s ,^,mf/, + pax vftovp.pdf vptovf.pdf -wvzf $OUTDIR/etc.tar.gz -s ,^,etc/, + pax mf.pdf -wvzf $OUTDIR/mf.tar.gz -s ,^,mf/, pax gftodvi.pdf gftopk.pdf gftype.pdf mft.pdf \ - -wvzf mfware.tar.gz -s ,^,mfware/, - pax tex.pdf -wvzf tex.tar.gz -s ,^,tex/, + -wvzf $OUTDIR/mfware.tar.gz -s ,^,mfware/, + pax tex.pdf -wvzf $OUTDIR/tex.tar.gz -s ,^,tex/, pax dvitype.pdf pltotf.pdf pooltype.pdf tftopl.pdf \ - -wvzf texware.tar.gz -s ,^,texware/, - pax tangle.pdf weave.pdf -wvzf web.tar.gz -s ,^,web/, - pax bibtex.pdf -wvzf bibtex.tar.gz -s ,^,bibtex/, + -wvzf $OUTDIR/texware.tar.gz -s ,^,texware/, + pax tangle.pdf weave.pdf -wvzf $OUTDIR/web.tar.gz -s ,^,web/, + pax bibtex.pdf -wvzf $OUTDIR/bibtex.tar.gz -s ,^,bibtex/, pax dvicopy.pdf patgen.pdf pktogf.pdf pktype.pdf \ - -wvzf other.tar.gz -s ,^,other/, - pax pdftex.pdf -wvzf pdftex.tar.gz -s ,^,pdftex/, - pax xetex.pdf -wvzf xetex.tar.gz -s ,^,xetex/, + -wvzf $OUTDIR/other.tar.gz -s ,^,other/, + pax pdftex.pdf -wvzf $OUTDIR/pdftex.tar.gz -s ,^,pdftex/, + pax xetex.pdf -wvzf $OUTDIR/xetex.tar.gz -s ,^,xetex/, fi + +exit 0 |