#! gnumake
#

HEAD = chapter8

EPS  = ch8_fadc.eps ch8_gpsigADR.eps ch8_luminosity.eps ch8_FEU84-3_250_8.eps ch8_level1.eps ch8_rates.eps

DOC  = chapter8.tex ch8_main.tex ch8_rate.tex ch8_trigger.tex ch8_daq.tex chapter8.bbl

CNT  = halld.bib standard_symbols.tex

chapter:
	cp -pf ../halld.bib halld.bib
	cp -pf ../standard_symbols.tex standard_symbols.tex
	latex $(HEAD).tex	
	latex $(HEAD).tex	
	dvips -o $(HEAD).ps $(HEAD).dvi
	#dvipdf $(HEAD).dvi $(HEAD).pdf
	ps2pdf $(HEAD).ps $(HEAD).pdf
	rm -f $(HEAD).ps.gz
	gzip  $(HEAD).ps


tarball:
	rm -f $(HEAD).tar.gz
	cp -pf ../halld.bib halld.bib
	cp -pf ../standard_symbols.tex standard_symbols.tex
	tar cfz $(HEAD).tar.gz $(DOC) $(CNT) $(EPS) Makefile
	@rm -f halld.bib standard_symbols.tex

distclean:
	@rm -f *.dvi *.ps *.pdf *~ *.aux *.log *.lot *.lof *.gz *.toc
	@rm -f halld.bib standard_symbols.tex

clean:
	@rm -f *.dvi *.ps *~ *.aux *.log *.lot *.lof *.toc
	@rm -f halld.bib standard_symbols.tex
