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

68 lines
1.3 KiB

all: mkoutdir build
ifeq "$(ROOT)" "/users/www/www"
13 years ago
OUTDIR = /srv/www-csc/$(RELDIR)
else
OUTDIR = $(ROOT)/build/$(RELDIR)
endif
OUTPUTS = $(addprefix $(OUTDIR),$(FILES))
.PHONY: force mkoutdir build clean
mkoutdir:
mkdir -p $(OUTDIR)
build: $(OUTPUTS)
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)"
XSLTPROC = $(ROOT)/scripts/xsltproc.py
15 years ago
$(OUTDIR)%.html: %.xml $(ROOT)/csc.dtd $(ROOT)/xsl/*.xsl directory.xml $(ROOT)/menu.xml
$(XSLTPROC) $< $(ROOT)/xsl/html.xsl $@ $(XSLTARGS)
$(OUTDIR)%.atom: %.xml xsl/atom.xsl
$(XSLTPROC) $< $(ROOT)/xsl/atom.xsl $@ $(XSLTARGS)
$(OUTDIR)%.ics: %.xml
$(XSLTPROC) $< $(ROOT)/xsl/ics.xsl $@ $(XSLTARGS)
$(OUTDIR)%.html: %.html
cp -f $< $@
$(OUTDIR)%.cgi: %.cgi
cp -f $< $@
14 years ago
$(OUTDIR).htaccess:
14 years ago
cp -f .htaccess $@
$(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)%.pdf: %.pdf
cp -f $< $@
$(OUTDIR)%.der: %.der
cp -f $< $@
$(OUTDIR)%.pem: %.pem
cp -f $< $@
$(OUTDIR)%.tar: %.tar
cp -f $< $@
$(OUTDIR)%.sh: %.sh
cp -f $< $@