all: mkoutdir build ifeq "$(ROOT)" "/users/www/www" OUTDIR = /var/www-csc/$(RELDIR) else OUTDIR = $(ROOT)/build/$(RELDIR) endif OUTPUTS = $(addprefix $(OUTDIR),$(FILES)) .PHONY: mkoutdir mkoutdir: mkdir -p $(OUTDIR) .PHONY: build build: $(OUTPUTS) .PHONY: clean clean: ifeq "$(ROOT)" "/users/www/www" rm -rf $(OUTDIR)/* else rm -rf $(OUTDIR) endif XSLTARGS=g_date=`date -I` g_time=`date +%H:%M:%S` g_outdir="$(OUTDIR)" \ g_datetime="`date --rfc-3339=seconds`" g_pwd="$$(pwd)" g_root="$(ROOT)" SAXON = /users/www/saxon9/saxon9.bin $(OUTDIR)%.html: %.xml $(ROOT)/csc.dtd $(ROOT)/xsl/*.xsl directory.xml $(ROOT)/menu.xml $(SAXON) -o $@ $< $(ROOT)/xsl/html.xsl $(XSLTARGS) $(OUTDIR)%.atom: %.xml xsl/atom.xsl $(SAXON) -o $@ $< $(ROOT)/xsl/atom.xsl $(XSLTARGS) $(OUTDIR)%.ics: %.xml perl scripts/xml2ics.pl $< > $@ $(OUTDIR)%.ico: %.ico cp -f $< $@ $(OUTDIR)%.css: %.css cp -f $< $@ $(OUTDIR)%.gif: %.gif cp -f $< $@ $(OUTDIR)%.png: %.png cp -f $< $@ $(OUTDIR)%.swf: %.swf cp -f $< $@ $(OUTDIR)%.js: %.js cp -f $< $@ $(OUTDIR)%.txt: %.txt cp -f $< $@ $(OUTDIR)%.der: %.der cp -f $< $@ $(OUTDIR)%.pem: %.pem cp -f $< $@