CURRENT=fwarch1

PSTEX = ../pstex
XFIG=../bin/xfig
FIG2TEX=../bin/fig2tex
FIG2PL=../bin/fig2pl
MV=mv -f
RM=rm -f


.PHONY: default all f t touch bak clean

default: all

all:\
$(PSTEX)/screenedhost.tex\
$(PSTEX)/screenedsubnet1.tex\
$(PSTEX)/screenedsubnet2.tex\
$(PSTEX)/fwarch1.tex\
$(PSTEX)/proempty.tex


f:
	@f $(CURRENT).fig

t: touch all

touch:
	touch *

bak:
	$(RM) *.bak

clean: bak


$(PSTEX)/screenedhost.tex: screenedhost.fig
	@echo "screenedhost.fig => screenedhost.tex screenedhost.ps"
	@$(FIG2TEX) screenedhost
	@$(MV) screenedhost.ps $(PSTEX)
	@$(FIG2PL) < screenedhost.tex > $(PSTEX)/screenedhost.tex
	@$(MV) screenedhost.tex .tex

$(PSTEX)/screenedsubnet1.tex: screenedsubnet1.fig
	@echo "screenedsubnet1.fig => screenedsubnet1.tex screenedsubnet1.ps"
	@$(FIG2TEX) screenedsubnet1
	@$(MV) screenedsubnet1.ps $(PSTEX)
	@$(FIG2PL) < screenedsubnet1.tex > $(PSTEX)/screenedsubnet1.tex
	@$(MV) screenedsubnet1.tex .tex

$(PSTEX)/screenedsubnet2.tex: screenedsubnet2.fig
	@echo "screenedsubnet2.fig => screenedsubnet2.tex screenedsubnet2.ps"
	@$(FIG2TEX) screenedsubnet2
	@$(MV) screenedsubnet2.ps $(PSTEX)
	@$(FIG2PL) < screenedsubnet2.tex > $(PSTEX)/screenedsubnet2.tex
	@$(MV) screenedsubnet2.tex .tex

$(PSTEX)/fwarch1.tex: fwarch1.fig
	@echo "fwarch1.fig => fwarch1.tex fwarch1.ps"
	@$(FIG2TEX) fwarch1
	@$(MV) fwarch1.ps $(PSTEX)
	@$(FIG2PL) < fwarch1.tex > $(PSTEX)/fwarch1.tex
	@$(MV) fwarch1.tex .tex

$(PSTEX)/proempty.tex: proempty.fig
	@echo "proempty.fig => proempty.tex proempty.ps"
	@$(FIG2TEX) proempty
	@$(MV) proempty.ps $(PSTEX)
	@$(FIG2PL) < proempty.tex > $(PSTEX)/proempty.tex
	@$(MV) proempty.tex .tex

