#
#	$Id$
#
#	Make and install the private network guide
#
%.html: %.htex
	htmlex -c $<

VERSION=1.1.1

DEST=/home/doug/public_html/network

FILES=network.pdf network.ps.gz network-$(VERSION).tar.gz index.html

SOURCES=network.tex network.bib url.bst \
	theory1.fig incoming.fig outgoing.fig \
	Makefile

%.eps:	%.fig
	fig2dev -L eps $*.fig $*.eps

all:	$(FILES) network.html

install:	all
	rm -rf $(DEST)
	mkdir -p $(DEST)
	cp -p $(FILES) $(DEST)
	cp -pr html $(DEST)

clean:
	rm -f *.log *.blg *.eps *.bbl *.pdf *.ps *.gz *.lof *.toc *.out *.aux *.html
	rm -rf html

network.html:	network.dvi
	rm -rf html
	mkdir html
	latex2html -local_icons -dir html -split +2 network.tex 
	touch network.html

network.ps:	network.dvi
	dvips -o network.ps network.dvi

network.dvi:	network.tex network.bib url.bst incoming.eps outgoing.eps theory1.eps
	latex network.tex
	bibtex network
	latex network.tex
	latex network.tex

network.pdf:	network.ps
	ps2pdf network.ps network.pdf

network.ps.gz:	network.ps
	cat network.ps | gzip -9 > network.ps.gz

network-$(VERSION).tar.gz:	$(SOURCES)
	tar cvf - $(SOURCES) | gzip -9 > network-$(VERSION).tar.gz
