#! gnumake
#

HEAD = chapter6

EPS  =  ch6_4g.eps ch6_adcfits.eps ch6_angdet3.eps ch6_angdet4.eps ch6_babarside.eps \
	ch6_barbox_new.eps ch6_bcal48.eps ch6_bcal_fiberends.eps \
	ch6_bcal_lengthcompare.eps ch6_bcal_ooi3.eps ch6_bcal_ooi4.eps \
	ch6_bcal_sipm2.eps ch6_bcal_sipm6.eps \
	ch6_block407.eps ch6_cdc_arco2.eps ch6_cdc_areth.eps ch6_cdc_crimp.eps \
	ch6_cdc_drift_01.eps ch6_cdc_drift_02.eps ch6_cdc_drift_03.eps \
	ch6_cdc_drift_04.eps ch6_cdc_drift_05.eps ch6_cdc_drift_06.eps \
	ch6_cdc_drill.eps ch6_cdc_efield.eps ch6_cdc_new.eps ch6_cdc_proto.eps \
	ch6_cdc_stereo.eps ch6_cdc_tvsd_co2_b0.eps ch6_cdc_tvsd_co2_bf.eps \
	ch6_cdc_tvsd_co2_bf.eps ch6_Ceff.eps ch6_chamber_insert.eps \
	ch6_cherenkov.eps ch6_csc_elec.eps ch6_csc_fig1.eps ch6_csc_garfield.eps \
	ch6_csc_schem.eps ch6_csc_strips-2.eps ch6_cylinder.eps ch6_delE.eps \
	ch6_detector_3d.eps ch6_detect_pb-bgv.eps ch6_dirc-2-1.eps \
	ch6_dirc-2-2.eps ch6_dirc-2-3d-2.eps ch6_dirc_diff.eps ch6_dirc_princ.eps \
	ch6_dirc_repem.eps ch6_dirc_resol.eps ch6_dirc_rphotons.eps \
	ch6_eppn.eps ch6_eresl.eps ch6_fdc_cath.eps ch6_fdc_exploded.eps \
	ch6_fdc_mc1.eps ch6_fdc_proto.eps ch6_fdc_side.eps ch6_fdc_signals.eps \
	ch6_fdc_tstand.eps ch6_feedthrough_expand.eps ch6_feedthrough_fit.eps \
	ch6_geom_cdc_01c.eps ch6_geom_cdc_01f.eps ch6_gluex_detector.eps \
	ch6_gluex_trackplan.eps ch6_halld_plan.eps ch6_hd_exploded3.eps \
	ch6_hd_pbglass.eps ch6_heat_lgd.eps ch6_lgdrates.eps ch6_magnet_bcal.eps \
	ch6_mms.eps ch6_pdet3.eps ch6_pdet4.eps ch6_pid_anglerate.eps \
	ch6_pid_central.eps ch6_pid_centralrate.eps ch6_pid_chart.eps \
	ch6_pid_combinedrate.eps ch6_pid_forward.eps ch6_pid_forwardrate.eps \
	ch6_pid_proton.eps ch6_pid_protonrate.eps ch6_piopio.eps ch6_piopioresult.eps \
	ch6_platform_left.eps ch6_plong_pion.eps ch6_plong_prot.eps ch6_pperp_pion.eps \
	ch6_pperp_prot.eps ch6_ppvspl_pion.eps ch6_ppvspl_prot.eps \
	ch6_proto_photo_01.eps ch6_proto_photo_02.eps ch6_proto_photo_03.eps \
	ch6_proto_photo_04.eps ch6_pvsth_pion.eps ch6_pvsth_prot.eps \
	ch6_rad_2g.eps ch6_resol.eps ch6_ris7.eps ch6_ru106.eps \
	ch6_sigma.eps ch6_spectro1.eps \
	ch6_startD_overview.eps ch6_tdcfits.eps ch6_telescope.eps ch6_tgtfig.eps \
	ch6_tof.2.eps ch6_tof.3.eps ch6_tof.4.eps ch6_tof.5.eps ch6_tof.6.eps \
	ch6_turns.eps ch6_upv-bullseye.eps ch6_upv.eps ch6_upv_geant.eps \
	ch6_upv_mod2.eps ch6_upv-site.eps ch6_yepem100z1.eps ch6_yepem10z1.eps \
	ch6_yg100z1.eps ch6_yg10z1.eps

DOC  = chapter6.tex ch6_main.tex ch6_bcalo.tex ch6_fcal.tex ch6_intro.tex \
	ch6_target.tex ch6_tracking.tex ch6_cdc.tex ch6_fdc.tex \
	ch6_calintro.tex ch6_start.tex ch6_upv.tex ch6_installation.tex \
	ch6_pid_intro.tex ch6_pid_tof.tex ch6_pid_dirc.tex \
	ch6_pid_gaschv.tex ch6_pid_acceptance.tex chapter6.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	
	dvipdf $(HEAD).dvi 

bibliography:
	cp -pf ../halld.bib halld.bib
	cp -pf ../standard_symbols.tex standard_symbols.tex
	rm -f $(HEAD).bbl
	rm -f $(HEAD).blg
	latex $(HEAD).tex
	bibtex $(HEAD)	
	latex $(HEAD).tex	

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

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

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