# 
# TransFig makefile
FIGS = $(wildcard *.fig)

all: st.ps

.dvi.ps:
	dvips -o $* $<  

.tex.dvi:
	latex $<

$(FIGS:.fig=.pstex): $(FIGS)
	fig2dev -L pstex $< $@

$(FIGS:.fig=.pstex_t): $(FIGS)
	fig2dev -L pstex_t $< $@


st.ps: $(FIGS:.fig=.pstex) $(FIGS:.fig=.pstex_t) st.dvi
	dvips -o st.ps st.dvi

st.dvi: st.tex
	latex $<
	latex $<
#	Two times to get cross-references right
	latex $<
#	Third time to make sure...	

clean:
	-rm $(FIGS:.fig=.pstex) $(FIGS:.fig=.pstex_t) *.toc *.aux *.log
