2007-10-05 21:55:10 -04:00
|
|
|
|
|
|
|
all: mkoutdir build
|
|
|
|
|
2007-10-06 17:23:47 -04:00
|
|
|
ifeq "$(ROOT)" "/users/www/www"
|
2009-11-13 20:16:39 -05:00
|
|
|
OUTDIR = /srv/www-csc/$(RELDIR)
|
2007-10-06 17:23:47 -04:00
|
|
|
else
|
|
|
|
OUTDIR = $(ROOT)/build/$(RELDIR)
|
|
|
|
endif
|
2007-10-05 21:55:10 -04:00
|
|
|
OUTPUTS = $(addprefix $(OUTDIR),$(FILES))
|
|
|
|
|
2007-11-14 22:55:12 -05:00
|
|
|
.PHONY: force mkoutdir build clean
|
|
|
|
|
2007-10-05 21:55:10 -04:00
|
|
|
mkoutdir:
|
|
|
|
mkdir -p $(OUTDIR)
|
|
|
|
|
|
|
|
build: $(OUTPUTS)
|
|
|
|
|
|
|
|
clean:
|
2007-10-06 17:23:47 -04:00
|
|
|
ifeq "$(ROOT)" "/users/www/www"
|
|
|
|
rm -rf $(OUTDIR)/*
|
|
|
|
else
|
2007-10-05 21:55:10 -04:00
|
|
|
rm -rf $(OUTDIR)
|
2007-10-06 17:23:47 -04:00
|
|
|
endif
|
2007-10-05 21:55:10 -04:00
|
|
|
|
2007-11-10 00:55:15 -05:00
|
|
|
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)"
|
|
|
|
XSLTPROC = $(ROOT)/scripts/xsltproc.py
|
2007-10-05 21:55:10 -04:00
|
|
|
|
2007-10-10 01:43:02 -04:00
|
|
|
$(OUTDIR)%.html: %.xml $(ROOT)/csc.dtd $(ROOT)/xsl/*.xsl directory.xml $(ROOT)/menu.xml
|
2007-11-10 00:55:15 -05:00
|
|
|
$(XSLTPROC) $< $(ROOT)/xsl/html.xsl $@ $(XSLTARGS)
|
2007-10-05 21:55:10 -04:00
|
|
|
|
|
|
|
$(OUTDIR)%.atom: %.xml xsl/atom.xsl
|
2007-11-10 00:55:15 -05:00
|
|
|
$(XSLTPROC) $< $(ROOT)/xsl/atom.xsl $@ $(XSLTARGS)
|
2007-10-05 21:55:10 -04:00
|
|
|
|
|
|
|
$(OUTDIR)%.ics: %.xml
|
2008-02-02 23:00:50 -05:00
|
|
|
$(XSLTPROC) $< $(ROOT)/xsl/ics.xsl $@ $(XSLTARGS)
|
2007-10-05 21:55:10 -04:00
|
|
|
|
2007-12-04 22:54:37 -05:00
|
|
|
$(OUTDIR)%.html: %.html
|
|
|
|
cp -f $< $@
|
2009-03-10 23:47:28 -04:00
|
|
|
$(OUTDIR)%.cgi: %.cgi
|
2009-03-10 23:50:43 -04:00
|
|
|
cp -f $< $@
|
2009-03-10 23:56:22 -04:00
|
|
|
$(OUTDIR).htaccess:
|
2009-03-10 23:56:59 -04:00
|
|
|
cp -f .htaccess $@
|
2007-10-05 21:55:10 -04:00
|
|
|
$(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 $< $@
|