# makefile for '数学セミナー' tex files
SHELL = /bin/sh
.PHONY: expose
.SUFFIXES:
.SUFFIXES: .ps .obj .dvi .png .mupad .tex .sed
.PRECIOUS: %.obj %.ps
X=$(shell \
count=01; \
cd ..; while [ -f $(TARGET)-$$count.tar.gz ] ;do \
x=`expr $$count + 1`;\
count=`printf "%02d" $$x` ; done; echo $$count)
REL=$(shell \
count=01; \
cd ..; while [ -f $(TARGET)-rel$$count.tar.gz ] ;do \
x=`expr $$count + 1`;\
count=`printf "%02d" $$x` ; done; echo $$count)
TARGET :=xx12
EPSFILES :=fourD.eps fourD2.eps sqrt.eps sqrt2.eps tsunageru.eps \
tangent.eps graph.eps exp0.eps cover.eps
##################################################################
all:: $(TARGET).ps.gz
html:: html_stamp
html_stamp: $(TARGET).ps.gz
/usr/local/latex2html/latex2html -no_math $(TARGET).tex
touch html_stamp
clean:
rm -f *~
rm -f core
rm -f \#*\#
rm -f *.bak
rm -f .??*.bak
rm -f *.dvi_tmp *.eps_tmp
rm -f *.beuc
.tex.dvi:: super.bib
platex $*.tex
zsh -c '! grep -c " Rerun to" $*.log >/dev/null || platex $*.tex '
.mupad.png:
xmupad $*.mupad
.png.obj::
echo 'please run tgif and make $*.obj' && false
.obj.ps::
tgif -print -ps -color $*.obj
.dvi.ps::
dvips $*.dvi
%.eps: %.ps %.ptex %.sed
platex $*.ptex; mv -f $*.dvi $*.dvi_tmp
dvips -f -E $*.dvi_tmp >$*.eps_tmp
rm -f $*.dvi_tmp
sed -f $*.sed $*.eps_tmp >$*.eps
rm -f $*.eps_tmp
preview: $(TARGET).dvi
xdvi -s 5 -expert -nopostscript $(TARGET) 1>/dev/null 2>/dev/null &
psview: $(TARGET).ps
gv -antialias $(TARGET) 1>/dev/null 2>/dev/null &
expose:
cp -f $(TARGET).tex expose/
cp -f $(TARGET).aux expose/
cp -f $(TARGET).dvi expose/
chmod a+r expose/*.dvi
make -C expose html
print: $(TARGET).dvi
lpr $(TARGET).dvi
links:
scripts/makelinks.sh
$(TARGET).dvi: $(EPSFILES) stddefs.tex
$(TARGET).ps: $(TARGET).dvi
$(TARGET).ps.gz:$(TARGET).ps
gzip -c -9 $(TARGET).ps >$(TARGET).ps.gz 2>/dev/null &
snapshot:
scripts/makelinks.sh
make html
echo $X
cd ..; tar -zcvf $(TARGET)-$X.tar.gz $(TARGET)
echo 'スナップショット$X \
$(TARGET)-$X.tar.gz
'\
>>../list$(TARGET).html
release:
scripts/makelinks.sh
make html
echo $X
cd ..; tar -zcvf $(TARGET)-rel$(REL).tar.gz $(TARGET)
echo 'リリース候補$(REL) \
$(TARGET)-rel$(REL).tar.gz
'\
>>../list$(TARGET).html