.SUFFIXES: .xml .html
DATECODE=20031030
#DEEPSRCS=deeplinking.xml
#DEEPOBJS=deeplinking.html deeplinking-$(DATECODE).html
#GETSRCS=get7.xml
#GETOBJS=whenToUseGet.html whenToUseGet-$(DATECODE).html
#MIMESRCS=mime-respect.xml
#MIMEOBJS=mime-respect.html mime-respect-$(DATECODE).html
ABSSRCS=abstractComponentRefs.xml
ABSOBJS=abstractComponentRefs.html abstractComponentRefs-$(DATECODE).html
ALLSRCS=$(ABSSRCS)
ALLOBJS=$(ABSOBJS)

#Norm began a tradition of creating findings in xmlspec.
XSLTSRC=http://www.w3.org/2002/xmlspec/html/1.7/xmlspec.xsl

all: $(ALLOBJS)

.xml.html:
	-@echo "Building $@."
	xsltproc --output $@ $(XSLTSRC) $<

mime-respect-$(DATECODE).html: mime-respect.html
	-@echo "Building $@."
	cp $< $@

deeplinking-$(DATECODE).html: deeplinking.html
	-@echo "Building $@."
	cp $< $@

metaDataInURI-31-$(DATECODE).html: metaDataInURI-31.html
	-@echo "Building $@."
	cp $< $@

whenToUseGet.html: get7.xml
	-@echo "Building $@."
	xsltproc --output $@ $(XSLTSRC) $<

whenToUseGet-$(DATECODE).html: whenToUseGet.html
	-@echo "Building $@."
	cp $< $@

abstractComponentRefs-$(DATECODE).html: abstractComponentRefs.html
	-@echo "Building $@."
	cp $< $@

install: $(ALLOBJS)
	cvs ci $(ALLSRCS) $(ALLOBJS)

clean: 
	rm -f $(ALLOBJS)

af.pdf: af.ps
	ps2pdf $<

af.ps: af.dvi
	dvips -Pwww $<

af.dvi: af.tex
	latex $<

hash-in-url.html: hash-in-url.xml
	xsltproc xmlspec.xsl $< > $@
