# $Id: //depot/Build/cdbuild/tldocsource/czech/Makefile#1 $ 
# $Date: 2003/09/10 $  
doc = live

all: pdf html
#all: normal

dvi:
	rm -f *.aux *.toc
	latex '\nonstopmode\def\Status{0}\input $(doc)'
	latex '\nonstopmode\def\Status{0}\input $(doc)'
	latex '\nonstopmode\def\Status{0}\input $(doc)'

normal:	dvi
	dvips  live -o

pdf:  
	rm -f *.aux *.toc *.lof *.lot
	pdflatex '\nonstopmode\def\Status{1}\input $(doc)'
	pdflatex '\nonstopmode\def\Status{1}\input $(doc)'
	pdflatex '\nonstopmode\def\Status{1}\input $(doc)'

html:  
	rm -f *.aux *.toc *.lof *.lot
	-latex '\nonstopmode\def\Status{2}\input $(doc)'
	-latex '\nonstopmode\def\Status{2}\input $(doc)'
	-latex '\nonstopmode\def\Status{2}\input $(doc)'
	-latex '\nonstopmode\def\Status{2}\input $(doc)'
	-tex4ht live
	-t4ht live

#baskerville:  
#	rm -f *.aux *.toc
#	latex '\def\Status{3}\input $(doc)'
#	latex '\def\Status{3}\input $(doc)'
#	latex '\def\Status{3}\input $(doc)'

tugboat:  
	rm -f *.aux *.toc
	latex '\def\Status{4}\input $(doc)'
	latex '\def\Status{4}\input $(doc)'
	latex '\def\Status{4}\input $(doc)'

clean: 
	rm -f *.aux *.log *.blg *.toc *.out *.lot tex4ht.ps *.4*
	rm -f *.xref *.lg *.idv *.out *.otc *.tmp tmp.* *~ live.ps

realclean: clean
	rm -f live.dvi
	rm -f live.pdf live.ps
	rm -f *.html *.htm *.gif *.css


bib:  
	rm -f *.aux *.toc
	-latex live
	-bibtex live

nocites:
	find /texlive/texmf/lists -type f | \
	sed 's/$$/ /' | \
	sed 's/.texlive.texmf.lists.*free.//' | \
	sed 's/\// /' | \
	awk '{print "\\nocite{"$$2"}"}' | \
	sort | uniq > nocites.tex 


texlive:
	find /texlive/texmf/lists -type f | \
	sed 's/.texlive.texmf.lists.*free.//' | \
	sed 's/\// /' | \
	awk '{print "$$texlive{\""$$2"\"}=\""$$1"\";"}' | \
	sort | uniq > texlive.pl


catalogue:
	cat entries/*.bib > catalogue.bib

instdir=../../../../Master/texmf/doc/tldoc
install:
	lang=`pwd | sed 's/.*\///'`; echo tldoc install in $$lang; \
	for i in live*html live.css *.jpg live.pdf; do \
	  cmp -s $$i $(instdir)/$$lang/$$i && continue; \
	  p4 edit $(instdir)/$$lang/$$i; \
	  cp $$i $(instdir)/$$lang; \
	done
	@echo "Don't forget to p4 submit."
