You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
old-website/common.mk.in

57 lines
1.2 KiB

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)"
CLASSPATH = /users/www/saxon8/saxon8.jar
$(OUTDIR)%.html: %.xml $(ROOT)/csc.dtd $(ROOT)/xsl/*.xsl directory.xml
java -classpath $(CLASSPATH) net.sf.saxon.Transform -o $@ $< $(ROOT)/xsl/html.xsl $(XSLTARGS)
$(OUTDIR)%.atom: %.xml xsl/atom.xsl
java -classpath $(CLASSPATH) net.sf.saxon.Transform -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 $< $@