
OUTPUTS=$(INPUTS:.xml=.html)
XSLTARGS=g_date=`date -I` g_time=`date +%H:%M:%S` \
	g_pwd="$$(pwd)" g_root="$(ROOT)"
CLASSPATH=/users/www/saxon8/saxon8.jar

all: $(OUTPUTS)
	@for i in $(SUBDIRS) ; do cd $$i && ($(MAKE) || exit 1) && cd .. ; done

clean:
	@for i in $(SUBDIRS) ; do cd $$i && ($(MAKE) clean || exit 1) && cd .. ; done
	rm -f *.html events.ics

%.html: %.xml $(ROOT)/csc.dtd $(ROOT)/cscweb.xsl $(ROOT)/xsl/*.xsl $(ROOT)/events.xml $(ROOT)/news.xml $(ROOT)/menu.xml $(ROOT)/default.mk directory.xml
	java -classpath $(CLASSPATH) net.sf.saxon.Transform -o $@ $< $(ROOT)/cscweb.xsl $(XSLTARGS)
	sed -i 's| xmlns=""||' $@
