diff options
Diffstat (limited to 'Master/texmf-dist/doc/pdftex/manual/Makefile')
-rw-r--r-- | Master/texmf-dist/doc/pdftex/manual/Makefile | 117 |
1 files changed, 80 insertions, 37 deletions
diff --git a/Master/texmf-dist/doc/pdftex/manual/Makefile b/Master/texmf-dist/doc/pdftex/manual/Makefile index 6436f8817d1..001768d614b 100644 --- a/Master/texmf-dist/doc/pdftex/manual/Makefile +++ b/Master/texmf-dist/doc/pdftex/manual/Makefile @@ -1,41 +1,33 @@ -# $Id: Makefile 709 2014-04-04 16:53:17Z karl $ +# $Id: Makefile 745 2016-04-25 18:06:57Z karl $ # Makefile for pdfTeX documentation. Public domain. -mandir=manual -distdate=`date +%y%m%d` -distrev=`awk '/Id:/{print $$4; exit}' $(mandir)/pdftex-t.tex` - # Get version we're documenting from the \def in the manual. pdftexversion=`sed -n 's,^.def.currentpdftex{\(.*\)},\1,p' manual/pdftex-t.tex` -distall=$(distnopdf) pdftex-a.pdf pdftex-l.pdf pdftex-s.pdf - -distnopdf=pdftex-w.tex pdftex-t.txt pdftex-t.tex \ - pdftex-i.tex syntaxform.awk Makefile makefiles.cmd \ - pdftex-syntax.txt README ChangeLog - context = texexec --batchmode # context does not have \setupoutput. # texmfstart exits immediately. -default: all - -all: pdftex-a.pdf \ - pdftex-l.pdf \ - pdftex-s.pdf \ - pdftex-syntax.txt +# what we distribute in TeX Live. +default: pdftex-a.pdf pdftex-syntax.txt -booklet: pdftex-b.pdf pdftex-b-e.pdf pdftex-b-o.pdf +# the other formats (everything that can be built). +all: pdftex-l.pdf pdftex-s.pdf booklet -pdftex-a.pdf a: pdftex-t.tex pdftex-t.txt +common_deps = pdftex-t.tex pdftex-w.txt pdftex-help.txt pdftex-syntax.tex +pdftex-a.pdf a: $(common_deps) $(context) --result=$@ $< -pdftex-l.pdf l: pdftex-t.tex pdftex-t.txt +pdftex-l.pdf l: $(common_deps) $(context) --mode=letter --result=$@ $< -pdftex-s.pdf s: pdftex-t.tex pdftex-i.tex +pdftex-s.pdf s: $(common_deps) pdftex-i.tex $(context) --mode=screen --result=$@ $< + +# booklet version is not made by default. +booklet: pdftex-b.pdf pdftex-b-e.pdf pdftex-b-o.pdf + pdftex-b.pdf b: pdftex-a.pdf $(context) --pdfarrange --paper=a5a4 --print=up --addempty=1,2 \ --result=$@ $< @@ -48,21 +40,71 @@ pdftex-b-o.pdf: pdftex-a.pdf $(context) --pdfarrange --paper=a5a4 --print=up --addempty=1,2 \ --pages=odd --result=$@ $< -pdftex-t.txt: pdftex-w.pdf Makefile + +# Creating the subsidiary/dependent files. + +# TeXable text for the title page. +pdftex-w.txt: pdftex-w.pdf cat $< \ | expand \ | fmt -s -w36 \ - | env GREP_OPTIONS=--text grep . \ - | expand \ - | cat > $@ + | grep --text . \ + | expand >$@ || rm -f $@ + wc -l pdftex-w.txt # set titlepagelines=half of this -pdftex-w.pdf: pdftex-w.tex +# PDF for the title page. +pdftex-w.pdf: pdftex-w.tex pdftex $< -pdftex-syntax.txt: pdftex-t.tex syntaxform.awk - gawk -f syntaxform.awk $< > $@ -# tar/zip including pdftex-a.pdf, pdftex-l.pdf, pdftex-s.pdf: +# Too annoying to remake help text every time; check by hand when needed. +pdftex-help.txt: + $(pdftex_binary) --help >$@ || rm -f $@ + +# if we don't have a build tree around, just try from the path. +build_binary := ../../source/build-pdftex/texk/web2c/pdftex +ifneq "$(realpath $(build_binary))" "" +pdftex_binary := $(build_binary) +else +pdftex_binary := pdftex +endif + +# Primitives and syntax, in TeX for the printed manual, and then in +# plain text for human convenience. +pdftex-syntax.tex: pdftex-t.tex syntaxform.pl + perl syntaxform.pl pdftex-t.tex >pdftex-syntax.tex || rm -f $@ + +pdftex-syntax.txt: pdftex-t.tex pdftex-syntax.tex syntaxform.awk + gawk -f syntaxform.awk pdftex-syntax.tex $< >$@ || rm -f $@ + + +# Install from this source directory to TL. + +tltree = /home/texlive/karl/Master/texmf-dist +dest = $(tltree)/doc/pdftex/manual + +INSTALL_DATA = cp -p + +install: default + $(INSTALL_DATA) ChangeLog Makefile README makefiles.cmd $(dest) + $(INSTALL_DATA) pdftex-a.pdf pdftex-syntax.txt $(dest) + $(INSTALL_DATA) pdftex-t.tex pdftex-w.tex pdftex-i.tex $(dest) + $(INSTALL_DATA) syntaxform.awk syntaxform.pl $(dest) + + +# Dist and clean. +# tar/zip including pdftex-a.pdf, pdftex-l.pdf, pdftex-s.pdf, +# although we don't ever make such distributions any more. + +distall=$(distnopdf) pdftex-a.pdf pdftex-l.pdf pdftex-s.pdf + +mandir=manual +distdate=`date +%y%m%d` +distrev=`awk '/Id:/{print $$4; exit}' $(mandir)/pdftex-t.tex` + +distnopdf=pdftex-w.tex pdftex-w.txt pdftex-t.tex \ + pdftex-i.tex syntaxform.awk Makefile makefiles.cmd \ + pdftex-syntax.txt pdftex-help.txt README ChangeLog alltar: $(distall) cd .. && tar cvjf $(mandir)/pdftex-$(pdftexversion)-userman-$(distrev).tar.bz2 \ @@ -72,6 +114,7 @@ allzip: $(distall) cd .. && zip $(mandir)/pdftex-$(pdftexversion)-userman-$(distrev).zip \ $(patsubst %, $(mandir)/%, $(distall)) + # tar/zip without PDF files: tar: $(distnopdf) @@ -83,14 +126,14 @@ zip: $(distnopdf) cd .. && zip $(mandir)/pdftex-$(pdftexversion)-userman-$(distrev)-src.zip \ $(patsubst %, $(mandir)/%, $(distnopdf)) + clean: - texutil --purge + rm -f *.log *.tuo *.tui *.top *.tmp *-mpgraph.mp -allclean: - - rm -f pdftex-a.pdf pdftex-l.pdf pdftex-s.pdf - - rm -f pdftex-b.pdf pdftex-b-e.pdf pdftex-b-o.pdf - - rm -f pdftex-syntax.txt - - rm -f pdftex-w.pdf pdftex-t.txt - make clean +maintainer-clean: clean + rm -f pdftex-a.pdf pdftex-l.pdf pdftex-s.pdf + rm -f pdftex-b.pdf pdftex-b-e.pdf pdftex-b-o.pdf + rm -f pdftex-help.txt pdftex-syntax.txt pdftex-syntax.tex + rm -f pdftex-w.pdf pdftex-w.txt -clobber: allclean +clobber allclean realclean distclean: maintainer-clean |