##  Thesis Adm directory Makefile example.  Adm makes the whole book. 
##  All chapters get their own directory. 
##     Brad Artman, 2/2007
include ${SEPINC}/SEP.top
TITLE = Passive seismic imaging
AUTHOR = 'Brad Artman'
REPORT = SEP128
PAPERS= Concl Intro TimeSynth TimeShot TimeCMP DepthSyn DepthVal DepthMult
#HTMLDIR= /net/sepwww/public/docs/sep128

##    For twosided formats, make sure p.1 of Ch.1 
##       is an odd page after the preface/TOC pages.
##    Easiest way is to add/remove a \cleardoublepage 
##       after abstract or preface inclusion.

##  ----------     PRINTING FORMATS    --------------
##    University thesis, onesided printing
#LATOPTS = option=thesis-oneside style=makeidx,html,amsmath

##    University thesis, twosided printing
#LATOPTS = option=thesis-twoside style=html,amsmath

##    SEP report, twosided printing
LATOPTS = option=thesis-report style=html,amsmath 

include ${SEPINC}/Doc.rules.book
### Doc.rules.book has a rule to make a paper.tex
###  for reports that you want to invalidate
paper.tex:  macros_act.tex abs_act.tex pref_act.tex ack_act.tex
	@echo "Do nothing to regenerate a perfectly good paper.tex file."
#	touch $@
#paper.pdf:paper.ltx
#	pdflatex -interaction=nonstopmode  paper.ltx
##  Default paper build is SEP report style
$(REPORT).pdf ../$(REPORT).pdf:paper.tex
	make paper.pdf
	mv paper.dvi $(REPORT).dvi --reply=y
	mv paper.ps  $(REPORT).ps  --reply=y
	mv paper.pdf $(REPORT).pdf --reply=y
	cp $(REPORT).pdf ../$(REPORT).pdf --reply=y
	make texclean

## The two scripts set and use environment variable for LATOPTS 
##    to make and name files correctly.
## As of 2/07, the Registrar wants 2 copies (one- or two-sided) on fancy paper
SU.2side.paper.pdf ../SU.2side.paper.pdf: paper.tex#LATOPTS = option=thesis-twoside style=html,amsmath
	./suthesis2side.sh 
	mv paper.dvi SU.2side.paper.dvi --reply=y
	mv paper.ps  SU.2side.paper.ps  --reply=y
	mv paper.pdf SU.2side.paper.pdf --reply=y
	cp SU.2side.paper.pdf ../SU.2side.paper.pdf --reply=y
	make texclean

## As of 2/07, the Registrar wants 1 copy (one-sided) on plain paper
SU.1side.paper.pdf ../SU.1side.paper.pdf: paper.tex#LATOPTS = option=thesis style=makeidx,html,amsmath
	./suthesis1side.sh 
	mv paper.dvi SU.1side.paper.dvi --reply=y
	mv paper.ps  SU.1side.paper.ps  --reply=y
	mv paper.pdf SU.1side.paper.pdf --reply=y
	cp SU.1side.paper.pdf ../SU.1side.paper.pdf --reply=y
	make texclean
prints:../SU.1side.paper.pdf ../SU.2side.paper.pdf ../$(REPORT).pdf
	xmessage -nearmouse -buttons "Thesis Done" "Finished TeXing. Go Print " &

killps:
	rm -f *paper.ps


include ${SEPINC}/SEP.bottom
