TEX_FORMATS=/home/drr/texmf/web2c
TEX_SRCS=\
	news.tex \
	catcodes.tex allocation.tex parameters.tex hyphens.tex \
	util.tex array.tex cps.tex \
	fonts.tex paper.tex \
	point.tex rectangle.tex \
	region.tex geometry.tex \
	output.tex article.tex headline.tex picture.tex

targets:
	@echo "This directory makes:"
	@echo "	news.fmt - the TeX format file for newspaper layouts"
	@echo "	install - squirrel everything away so TeX can find it"
	@echo "	clean - clean up junk"
	@echo "	tarball - something to save on other media"
	@echo " LOC - Lines Of Code in the format"

clean:
	-rm *~
	-rm *.log
	-rm *.dvi
	-rm *.fmt
	-rm *.tar.gz

news.fmt: $(TEX_SRCS)
	initex "\input news\dump"

pdfnews.fmt: $(TEX_SRCS)
	pdfinitex "\input news\dump"
	mv news.fmt pdfnews.fmt

install: pdfnews.fmt news.fmt
	cp news.fmt $(TEX_FORMATS)
	cp pdfnews.fmt $(TEX_FORMATS)

tarball: news.tar.gz
news.tar.gz: $(TEX_SRCS) Makefile
	tar -czvf news.tar.gz Makefile ${TEX_SRCS}

LOC:
	wc $(TEX_SRCS)