# Makefile for TDS document
# $Id: Makefile,v 1.9 2000/12/13 10:40:04 tom Exp $
################################################################

LATEX_JCODE	=	e

.SUFFIXES: .tdf .html .tex

.tdf.html:
	perl tdf2html.pl -s skelton.html $? > /tmp/$@
	cp /tmp/$@ $@
	@rm /tmp/$@

.tdf.tex:
	perl tdf2html.pl -s skelton.tex -t template-latex.ph $? | nkf -${LATEX_JCODE} > /tmp/$@
	cp /tmp/$@ $@
	@rm /tmp/$@


TARGET		= $(TARGET_HTML) $(TARGET_TEX)
TARGET_HTML	=	${CONTENT_HTML} index.html 
CONTENT_HTML	=	announce.html abstract.html install.html tdf.html \
			daily.html files.html attention.html\
			function.html customize.html technical.html \
			user_agent.html config_file.html \
			appendix.html case_study.html contrib.html \
			tips.html advanced_setting.html \
			author_management.html FAQ.html developers.html \
			anti-DoS.html

 
TARGET_TEX	=	abstract.tex announce.tex install.tex tdf.tex tdf.tex \
			function.tex customize.tex technical.tex \
			user_agent.tex config_file.tex \
			daily.tex files.tex attention.tex \
			appendix.tex case_study.tex contrib.tex \
			tips.tex advanced_setting.html \
			author_management.tex FAQ.tex developers.tex \
			anti-DoS.tex

all:  html tex

html: $(TARGET_HTML)
	perl static.pl -d

tex: $(TARGET_TEX)

clean-tex:
	rm -f $(TARGET_TEX)  *.aux *.log *.toc *.dvi *.ps

clean-html:
	rm -f $(TARGET_HTML)

clean: clean-tex clean-html
	rm -f *~

