# Makefile for generation of manual documentation files # Setup for TeX Live 8 # TL8 = /media/texlive2003 # TL8.PATH = .:$(TL8)/bin/i386-linux:$(PATH) # TL8.VARTEXMF = /var/lib/texmf.texlive2003 TL = /media/texlive2008 TL.PATH = .:$(TL)/bin/i386-linux:$(PATH) TL.VARTEXMF = /var/lib/texmf.texlive2008 TL.TEXMFSYSVAR = /var/lib/texmf.texlive2008 JAVA = java # JAVA5 = /work/java-1.5.0/bin/java # Trying: JAVA5 = /opt/jdk1.6.0/bin/java JAR_PDFBOX_REWRITE = ../lib/pdfbox-rewrite.jar JAR_MULTIVALENT = ../lib/Multivalent20060102.jar # Validator program for XML files CHECK = xmllint --valid --noout # Spell checking ASPELL = aspell -C --encoding=iso8859-1 --lang=en -p `pwd`/spell.dict -c PPID = $(shell echo $$PPID) MANUAL_TEMP = __manual-$(PPID)__.tex GIF_FILES = $(addsuffix .gif, cmmi10-22 cmsy10-21) HTML_FILES = $(addprefix manual, .html 2.html 3.html .css) $(GIF_FILES) ALL_FILES = manual.pdf options.pdf $(HTML_FILES) CLEAN_FILES = *.aux *.dvi *.toc *.log *.out *.tpt *~ \ *.4ct *.4tc *.idv *.lg *.tmp *.xref *.fls \ tmp.pdf tmp-o.pdf \ gs ALLCLEAN_FILES = $(ALL_FILES) all: $(ALL_FILES) # manual.dvi: manual.tex # latex '\nonstopmode\input manual' manual.pdf: manual.tex bmhydoc.sty lualatex -draftmode manual lualatex -draftmode manual lualatex manual # $(JAVA) -jar $(JAR_PDFBOX_REWRITE) $@ tmp.pdf # $(JAVA5) -cp $(JAR_MULTIVALENT) tool.pdf.Compress -old tmp.pdf # mv tmp-o.pdf $@ # thumbpdf manual # pdflatex '\nonstopmode\input{manual}' bmhydoc.sty: ../bmhydoc.sty ln -s $< $@ options.pdf: options.tex lualatex -draftmode $< lualatex $< # $(JAVA) -jar $(JAR_PDFBOX_REWRITE) $@ tmp.pdf # $(JAVA5) -cp $(JAR_MULTIVALENT) tool.pdf.Compress -old tmp.pdf # mv tmp-o.pdf $@ $(HTML_FILES): manual.tex # htlatex uses convert that has problems with other gs versions # works: gs705 # 7.07? ln -fs `which gs` gs # TL8 setup PATH=$(TL.PATH) \ VARTEXMF=$(TL.VARTEXMF) \ TEXMFSYSVAR=$(TL.VARTEXMF) \ TEXMFMAIN= htlatex manual # htlatex manual for file in $(GIF_FILES); do \ if [[ -f $$file ]]; then touch $$file; fi \ done spell: manual.tex cp -p $< $(MANUAL_TEMP) $(ASPELL) $< (diff -q $< $(MANUAL_TEMP) && mv $(MANUAL_TEMP) $<) || rm $(MANUAL_TEMP) upload: check all ../admin/hyperref_upload.pl check: files.xml $(CHECK) $< clean: -$(RM) $(CLEAN_FILES) allclean: clean -$(RM) $(ALLCLEAN_FILES) .PHONY: all check clean allclean upload spell