summaryrefslogtreecommitdiff
path: root/web/pwebmac/makeall
diff options
context:
space:
mode:
Diffstat (limited to 'web/pwebmac/makeall')
-rwxr-xr-xweb/pwebmac/makeall29
1 files changed, 19 insertions, 10 deletions
diff --git a/web/pwebmac/makeall b/web/pwebmac/makeall
index fbe95ae54d..546c3984aa 100755
--- a/web/pwebmac/makeall
+++ b/web/pwebmac/makeall
@@ -28,6 +28,7 @@ LONGOPTS=changes,files:,help,new,outdir:,pdftocfront,tex:
SHRTOPTS=cf:hno:pt:
CHANGES=false # apply changefile to C/WEB source
+FILESELECT=false # user-defined '--files' selection
NEW=false # '\input pwebmac' instead of '\input webmac' for PDF et al.
OUTDIR=. # path where the resulting tarballs are placed
PDFTOCFRONT=false # push table-of-contents to front of PDF output
@@ -43,7 +44,7 @@ KNUTHWARE=$(dirname $KNUTHWHERE)
FILES="$KNUTHWARE/*.web pdftex.web xetex.web"
WEBINPUTS=$KNUTHWARE//:
-FILES="$FILES common ctangle cweave ctwill ctie tie"
+FILES="$FILES common ctangle cweave ctwill refsort twinx ctie tie"
CWEBINPUTS=$KNUTHWARE//:
KNUTHWHERE=$(locate /glue.web)
@@ -71,7 +72,7 @@ while true
do
case "$1" in
-c | --changes ) CHANGES=true; shift ;;
- -f | --files ) FILES="$2"; shift 2 ;;
+ -f | --files ) FILES="$2"; FILESELECT=true; shift 2 ;;
-h | --help ) usage; exit 0 ;;
-n | --new ) NEW=true; shift ;;
-o | --outdir ) OUTDIR="$2"; shift 2 ;;
@@ -111,6 +112,7 @@ do
common ) $CWEAVE $f comm-w2c ;;
ctangle ) $CWEAVE $f ctang-w2c ;;
cweave ) $CWEAVE $f cweav-w2c ;;
+ refsort | twinx ) $CWEAVE $f $f ;;
ctie ) $CWEAVE $f $f-k ;;
tie ) $CWEAVE $f $f-w2c ;;
@@ -136,7 +138,7 @@ do
$f.tex
else
case $f in
- c* | tie ) $CWEAVE $f ;;
+ c* | refsort | twinx | tie ) $CWEAVE $f ;;
* ) weave $f ;;
esac
fi
@@ -148,7 +150,8 @@ do
# timestamp on table-of-contents page or the first page
case $f in
- c* | tie ) ;; # do nothing for CWEB programs
+ # do nothing for CWEB programs
+ c* | refsort | twinx | tie ) ;;
bibtex | patgen | tangle | weave )
$SED_I -e "s/\(\\\\def\\\\title\)/\\\\datecontentspage\n\1/" $f.tex ;;
@@ -218,8 +221,8 @@ FI
# FIX: purge obsolete macros from XeTeX.
xetex ) $SED_I -e "/\\\\input xewebmac/d" $f.tex ;;
- # Use nicer format for C comments and assignment
- common | ctangle | cweave | ctie | tie ) # sans ctwill
+ # Use nicer format for C comments and assignment; sans ctwill
+ common | ctangle | cweave | refsort | twinx | ctie | tie )
$SED_I -e "1 s/\(cwebmac\)/\1\n\\\\input Xcwebmac/" \
$f.tex ;;
esac
@@ -245,6 +248,8 @@ FI
# only XeTeX can process XETEX.WEB
if [ xetex = $f ]
then $f $f
+ elif [ refsort = $f ]
+ then $TEX -interaction nonstopmode $f
else $TEX $f
fi
@@ -256,7 +261,7 @@ FI
fi
done
-if $PDFTOCFRONT
+if $PDFTOCFRONT && ! $FILESELECT
then
# create tarballs w/o changes for publication
if $CHANGES
@@ -297,7 +302,8 @@ then
tie-changes.pdf
$PAX "$OUTDIR/cweb-changes.tar.gz" -s ,^,cweb/, \
common-changes.pdf ctangle-changes.pdf \
- cweave-changes.pdf
+ cweave-changes.pdf refsort-changes.pdf \
+ twinx-changes.pdf
else
# Finally, build the remaining documents
# * TeX and Metafont test routines
@@ -356,7 +362,8 @@ then
$PAX "$OUTDIR/ctie.tar.gz" -s ,^,ctie/, ctie.pdf
$PAX "$OUTDIR/tie.tar.gz" -s ,^,tie/, tie.pdf
$PAX "$OUTDIR/cweb.tar.gz" -s ,^,cweb/, \
- cwebman.pdf common.pdf ctangle.pdf cweave.pdf ctwill.pdf
+ cwebman.pdf common.pdf ctangle.pdf cweave.pdf \
+ ctwill.pdf refsort.pdf twinx.pdf
fi
# Notes to self:
@@ -366,7 +373,9 @@ then
# pandoc index.tex -s -o index.html;
# rm index.tex
# (2) Prepare a super-tarball from all the contents of these
- # individual tarballs with 'pax -wzf knuth-lib.tar.gz'.
+ # individual tarballs (27/31) with either of
+ # (a) pax -wzf knuth-pdf.tar.gz knuth-pdf
+ # (b) zip -r knuth-pdf.zip knuth-pdf
fi
exit 0