diff options
Diffstat (limited to 'Master/texmf-doc/doc/english/comprehensive/source/Makefile')
-rw-r--r-- | Master/texmf-doc/doc/english/comprehensive/source/Makefile | 155 |
1 files changed, 155 insertions, 0 deletions
diff --git a/Master/texmf-doc/doc/english/comprehensive/source/Makefile b/Master/texmf-doc/doc/english/comprehensive/source/Makefile new file mode 100644 index 00000000000..99c13ae44c9 --- /dev/null +++ b/Master/texmf-doc/doc/english/comprehensive/source/Makefile @@ -0,0 +1,155 @@ +############################################# +# Build the Comprehensive LaTeX Symbol List # +# By Scott Pakin <scott+clsl@pakin.org> # +############################################# + +# Define TARGETS as a list of all of the files we intend to generate. +# TARGETS is categorized into TARGETS_SOURCE and TARGETS_DIST. +# TARGETS_DIST comprise the prebuilt distribution of the Comprehensive +# LaTeX Symbol List. TARGETS_SOURCE are needed primarily to build +# TARGETS_DIST, although they are also distributed (in a "source" +# subdirectory). +TARGETS = $(TARGETS_SOURCE) $(TARGETS_DIST) + +TARGETS_DIST = symbols-letter.pdf symbols-a4.pdf SYMLIST README + +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 + +# We need FontForge (or the older PfaEdit) to generate lightbulb10.pfb. +FONTFORGE = fontforge + +# The following should be overwritten in a recursive call to Make. +SIZE = letter +EXT = pdf + +########################################################################### + +# Build all specified formats in all specified paper sizes. +all: $(TARGETS) + +.PHONY: symbols dist + +########################################################################### + +# 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 ; \ + 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 + +########################################################################### + +# Define specific rules for building different formats and sizes. +symbols-a4.pdf symbols-a4-pdf.log: symbols.tex + $(MAKE) $(MAKEFLAGS) SIZE=a4 LATEX=pdflatex EXT=pdf symbols + +symbols-letter.pdf symbols-letter-pdf.log: symbols.tex + $(MAKE) $(MAKEFLAGS) SIZE=letter LATEX=pdflatex EXT=pdf symbols + +symbols-a4.dvi symbols-a4-dvi.log: symbols.tex + $(MAKE) $(MAKEFLAGS) SIZE=a4 LATEX=latex EXT=dvi symbols + +symbols-letter.dvi symbols-letter-dvi.log: symbols.tex + $(MAKE) $(MAKEFLAGS) SIZE=letter LATEX=latex EXT=dvi symbols + +symbols-letter.ps: symbols-letter.dvi + dvips -t letter -Pamz -Pcmz -j0 -o symbols-letter.ps symbols-letter.dvi + +symbols-a4.ps: symbols-a4.dvi + dvips -t a4 -Pamz -Pcmz -j0 -o symbols-a4.ps symbols-a4.dvi + +########################################################################### + +# Define rules to produce a lightbulb proof figure. +mfplain.mem: + mpost -ini '\input mfplain; dump' + +lightbulb.eps: lightbulb10.mf lightbulb.mf mfplain.mem + mpost -mem mfplain '\mode:=proof; prologues:=2; labelfont cmr17; input lightbulb10' + mv lightbulb10.65 lightbulb.eps + +# Generate a FontForge script that makes the LightBulb10 PostScript +# names mixed case. +lightbulb10.pe: + echo 'Open($$1);' > $@ + echo 'LB = "LightBulb";' >> $@ + echo 'SetFontNames(LB+"10", LB, LB+"10");' >> $@ + echo 'Generate("lightbulb10.pfb");' >> $@ + +# Define a rule to produce a Type 1 version of the LightBulb10 font. +lightbulb10.pfb: lightbulb10.mf lightbulb10.pe + mftrace -V -fpfb --simplify lightbulb10 + $(FONTFORGE) -script lightbulb10.pe lightbulb10.pfb + +# Define a rule to produce a LightBulb font-mapping file. +lightbulb.map: + echo "lightbulb10 LightBulb10 <lightbulb10.pfb" > lightbulb.map + +########################################################################### + +# If we have MnSymbol.sty, generate a faked version which does not +# declare any new math alphabets. +fakeMnSymbol.sty: makefakeMnSymbol + if [ "`kpsewhich MnSymbol.sty`" ] ; then \ + makefakeMnSymbol `kpsewhich MnSymbol.sty` > $@ ; \ + else \ + makefakeMnSymbol /dev/null > $@ ; \ + fi + +########################################################################### + +# Create a list of all symbols. +SYMLIST: symbols.ind + cat symbols.ind | perl -ne 's/.*\\verb\+([^+]+)\+.*/$$1/g && print' | sort -u > SYMLIST + +# Create a README file. +README: makeREADME symbols-letter-pdf.log symbols.ind + makeREADME symbols-letter-pdf.log symbols.ind > README + +# Create a .tar.gz file. +comprehensive.tar.gz: $(TARGETS) $(EXTRADIST) + $(RM) -r comprehensive + mkdir comprehensive + mkdir comprehensive/source + install -m 664 $(TARGETS_DIST) comprehensive + install -m 664 $(TARGETS_SOURCE) $(EXTRADIST) comprehensive/source + cat symbols.tex | checksum > comprehensive/source/symbols.tex + chmod 664 comprehensive/source/symbols.tex + tar -czf comprehensive.tar.gz comprehensive + $(RM) -r comprehensive + +dist: comprehensive.tar.gz + +# Clean up our mess. +clean: mostlyclean + $(RM) comprehensive.tar.gz + $(RM) $(TARGETS) + $(RM) fakeMnSymbol.sty + $(RM) mfplain.{log,mem} + $(RM) lightbulb10*pk lightbulb10.{tfm,log,pe} + +mostlyclean: + $(RM) -r comprehensive + $(RM) $(INTERMEDIATES) $(TARGETS_DIST) + $(RM) symbols-letter.dvi symbols-a4.dvi + $(RM) symbols-*-*.log |