diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/comprehensive/source/Makefile')
-rw-r--r-- | Master/texmf-dist/doc/latex/comprehensive/source/Makefile | 69 |
1 files changed, 41 insertions, 28 deletions
diff --git a/Master/texmf-dist/doc/latex/comprehensive/source/Makefile b/Master/texmf-dist/doc/latex/comprehensive/source/Makefile index 99c13ae44c9..677b65b205e 100644 --- a/Master/texmf-dist/doc/latex/comprehensive/source/Makefile +++ b/Master/texmf-dist/doc/latex/comprehensive/source/Makefile @@ -17,14 +17,9 @@ TARGETS_SOURCE = lightbulb.eps lightbulb10.pfb lightbulb.map # There are a few files that we didn't generate but that need to be # distributed. -EXTRADIST = symbols.tex lightbulb10.mf lightbulb.mf makefakeMnSymbol \ - epsdice.eps Makefile - -# Define INTERMEDIATES as a list of all of the intermediate files -# generated by both latex and pdflatex while producing TARGETS. -INTERMEDIATES = symbols.aux symbols.idx symbols.ilg \ - symbols.ind symbols.log symbols.toc \ - symbols.pts +EXTRADIST = symbols.tex lightbulb10.mf lightbulb.mf \ + symbols.ist versicle.eps response.eps \ + makefakeMnSymbol teubner-subset.sty Makefile # We need FontForge (or the older PfaEdit) to generate lightbulb10.pfb. FONTFORGE = fontforge @@ -38,38 +33,50 @@ EXT = pdf # Build all specified formats in all specified paper sizes. all: $(TARGETS) -.PHONY: symbols dist +.PHONY: all symbols dist clean mostlyclean ########################################################################### # Define generic rules for building pdf/dvi/ps in letter/a4 size. -symbols $(INTERMEDIATES): symbols.tex lightbulb.eps lightbulb10.pfb lightbulb.map fakeMnSymbol.sty - $(LATEX) '\PassOptionsToClass{$(SIZE)paper}{article}\input symbols' - $(LATEX) '\PassOptionsToClass{$(SIZE)paper}{article}\input symbols' - makeindex -s gind.ist symbols - $(LATEX) '\PassOptionsToClass{$(SIZE)paper}{article}\input symbols' - totalsymbols=`fgrep -c '\item \verb' symbols.ind` ; \ - ( fgrep -v prevtotalsymbols symbols.aux > symbols.pts ; \ +symbols: symbols.tex symbols.ist fakeMnSymbol.sty \ + lightbulb.eps lightbulb10.pfb lightbulb.map + # Pass 1: Produce a list of extra files to include in the custom dump. + $(LATEX) -jobname symbols-$(SIZE)-$(EXT) '\RequirePackage{snapshot}\PassOptionsToClass{$(SIZE)paper}{article}\input symbols' + cat symbols-$(SIZE)-$(EXT).dep | fgrep -v cmll | \ + perl -ne '/\{(\w+\.fd)\}/ && print "\\input{$$1}\n"' > symbols-$(SIZE)-$(EXT).inc + # Pass 2: Dump a custom latex format. + $(LATEX) -jobname symbols-$(SIZE)-$(EXT) -ini \&$(LATEX) mylatex.ltx '\PassOptionsToClass{$(SIZE)paper}{article}\input symbols' + # Pass 3: Build a second time using the custom format to produce a + # final page layout (one hopes). Create an index based on that layout. + $(LATEX) -jobname symbols-$(SIZE)-$(EXT) \&symbols-$(SIZE)-$(EXT) symbols + makeindex -s symbols.ist symbols-$(SIZE)-$(EXT) + # Pass 4a: Build the document with the newly generated index. + $(LATEX) -jobname symbols-$(SIZE)-$(EXT) \&symbols-$(SIZE)-$(EXT) symbols + # Pass 4b: Get a final symbol count, and put it in the .aux file. + totalsymbols=`fgrep -c '\item \verb' symbols-$(SIZE)-$(EXT).ind` ; \ + ( fgrep -v prevtotalsymbols symbols-$(SIZE)-$(EXT).aux > symbols-$(SIZE)-$(EXT).pts ; \ echo "\\gdef\\prevtotalsymbols{$$totalsymbols}" ; \ - echo "\\gdef\\approxcount{}" ) >> symbols.pts ; \ - mv symbols.pts symbols.aux - $(LATEX) '\PassOptionsToClass{$(SIZE)paper}{article}\input symbols' - mv symbols.$(EXT) symbols-$(SIZE).$(EXT) - mv symbols.log symbols-$(SIZE)-$(EXT).log + echo "\\gdef\\approxcount{}" ) >> symbols-$(SIZE)-$(EXT).pts ; \ + mv symbols-$(SIZE)-$(EXT).pts symbols-$(SIZE)-$(EXT).aux + # Pass 5: Build the final document using the final symbol count + # and with the table of contents and PDF bookmarks correctly + # reflecting the index pages. + $(LATEX) -jobname symbols-$(SIZE)-$(EXT) \&symbols-$(SIZE)-$(EXT) symbols + mv symbols-$(SIZE)-$(EXT).$(EXT) symbols-$(SIZE).$(EXT) ########################################################################### # Define specific rules for building different formats and sizes. -symbols-a4.pdf symbols-a4-pdf.log: symbols.tex +symbols-a4.pdf symbols-a4-pdf.log symbols-a4-pdf.ind: symbols.tex $(MAKE) $(MAKEFLAGS) SIZE=a4 LATEX=pdflatex EXT=pdf symbols -symbols-letter.pdf symbols-letter-pdf.log: symbols.tex +symbols-letter.pdf symbols-letter-pdf.log symbols-letter-pdf.ind: symbols.tex $(MAKE) $(MAKEFLAGS) SIZE=letter LATEX=pdflatex EXT=pdf symbols -symbols-a4.dvi symbols-a4-dvi.log: symbols.tex +symbols-a4.dvi symbols-a4-dvi.log symbols-a4-dvi.ind: symbols.tex $(MAKE) $(MAKEFLAGS) SIZE=a4 LATEX=latex EXT=dvi symbols -symbols-letter.dvi symbols-letter-dvi.log: symbols.tex +symbols-letter.dvi symbols-letter-dvi.log symbols-letter-dvi.ind: symbols.tex $(MAKE) $(MAKEFLAGS) SIZE=letter LATEX=latex EXT=dvi symbols symbols-letter.ps: symbols-letter.dvi @@ -118,6 +125,11 @@ fakeMnSymbol.sty: makefakeMnSymbol ########################################################################### +# The index is needed to produce a list of symbols. We arbitrarily +# use the symbols-letter-pdf.ind version of the index. +symbols.ind: symbols-letter-pdf.ind + cp symbols-letter-pdf.ind symbols.ind + # Create a list of all symbols. SYMLIST: symbols.ind cat symbols.ind | perl -ne 's/.*\\verb\+([^+]+)\+.*/$$1/g && print' | sort -u > SYMLIST @@ -134,6 +146,7 @@ comprehensive.tar.gz: $(TARGETS) $(EXTRADIST) install -m 664 $(TARGETS_DIST) comprehensive install -m 664 $(TARGETS_SOURCE) $(EXTRADIST) comprehensive/source cat symbols.tex | checksum > comprehensive/source/symbols.tex + chmod 755 comprehensive/source/makefakeMnSymbol chmod 664 comprehensive/source/symbols.tex tar -czf comprehensive.tar.gz comprehensive $(RM) -r comprehensive @@ -150,6 +163,6 @@ clean: mostlyclean mostlyclean: $(RM) -r comprehensive - $(RM) $(INTERMEDIATES) $(TARGETS_DIST) - $(RM) symbols-letter.dvi symbols-a4.dvi - $(RM) symbols-*-*.log + $(RM) $(TARGETS_DIST) + $(RM) symbols-*-*.{aux,dep,dvi,fmt,idx,ilg,inc,ind,log,out,pts,toc} + $(RM) symbols.ind |