NSGMLS=SP_CHARSET_FIXED=YES SP_ENCODING=XML nsgmls -wxml -mdeclaration/xml.soc -gues

TARGET=wd-wsa-arch-review2.html
XML=$(TARGET:.html=.xml)
XSLT=../xmlspec-v24/xmlspec.xsl
ENTITIES=entitieswd.dtd

spec: $(TARGET)

all: spec
	@cd images && make

alt: wsa.ps wsa.pdf

wsa.ps: $(TARGET)
	html2ps -f html2psrc wd-wsa-arch-review2.html > wsa.ps
	ps2pdf wsa.ps
	pdftops wsa.pdf

wsa.pdf: $(TARGET)
	ps2pdf wsa.ps

$(TARGET): $(XML) $(XSLT) $(ENTITIES) 
	xsltproc $(XSLT) $(XML) > $(TARGET)

check: checkxml checkhtml

checkxml:
	$(NSGMLS) $(XML)

checkhtml:
	$(NSGMLS) $(TARGET)

commit: spec
	cvs commit -m 'Regenerated from XML' $(TARGET)

commitall: all
	@cd images && make commit

clean:
	rm -fv $(TARGET) wsa.ps wsa.pdf

.PHONY: commit check checkhtml checkxml spec all alt clean commitall
