Fix some bugs that occured after merging
This commit is contained in:
parent
23fe8710e4
commit
90a860f2d7
22
Makefile
22
Makefile
|
@ -1,14 +1,20 @@
|
||||||
FILES = events.ics events.atom news.atom index.html \
|
FILES = events.ics events.atom news.atom index.html \
|
||||||
favicon.ico default.css robots.txt csclub.der csclub.pem
|
favicon.ico default.css robots.txt csclub.der csclub.pem
|
||||||
SUBDIRS = about events office news services media buttons logos flash
|
SUBDIRS = about events office news services media buttons logos flash
|
||||||
|
|
||||||
include common.mk
|
include common.mk
|
||||||
|
|
||||||
|
common.mk: common.mk.in
|
||||||
|
echo 'ROOT = '`pwd` > $@
|
||||||
|
cat $< >> $@
|
||||||
|
|
||||||
build: noroot mkoutdir common.mk $(OUTPUTS)
|
build: noroot mkoutdir common.mk $(OUTPUTS)
|
||||||
@for i in $(SUBDIRS) ; do ($(MAKE) -C $$i || exit 1); done
|
@for i in $(SUBDIRS) ; do ($(MAKE) -C $$i || exit 1); done
|
||||||
find ! -regex '.*/\..*' -type f ! -perm -0664 -print0 | xargs -r0 chmod u=rwX,g=rwX,o=rX || true
|
find ! -regex '.*/\..*' -type f ! -perm -0664 -print0 | xargs -r0 chmod u=rwX,g=rwX,o=rX || true
|
||||||
find ! -regex '.*/\..*' -type d ! -perm 2775 -print0 | xargs -r0 chmod 2775 || true
|
find ! -regex '.*/\..*' -type d ! -perm 2775 -print0 | xargs -r0 chmod 2775 || true
|
||||||
find ! -regex '.*/\..*' -type d ! -group www -print0 | xargs -r0 chgrp www || true
|
find ! -regex '.*/\..*' -type d ! -group www -print0 | xargs -r0 chgrp www || true
|
||||||
|
|
||||||
|
.PHONY += noroot
|
||||||
noroot:
|
noroot:
|
||||||
if test $$UID = 0; then echo "don't build as root!"; exit 1; fi
|
if test $$UID = 0; then echo "don't build as root!"; exit 1; fi
|
||||||
|
|
||||||
|
@ -21,19 +27,3 @@ members.xml:
|
||||||
|
|
||||||
events.ics:
|
events.ics:
|
||||||
perl scripts/xml2ics.pl events.xml > events.ics
|
perl scripts/xml2ics.pl events.xml > events.ics
|
||||||
|
|
||||||
include default.mk
|
|
||||||
|
|
||||||
%.atom: %.xml xsl/atom.xsl
|
|
||||||
java -classpath $(CLASSPATH) net.sf.saxon.Transform -o $@ $< $(ROOT)/xsl/atom.xsl $(XSLTARGS)
|
|
||||||
sed -i 's| xmlns=""||' $@
|
|
||||||
|
|
||||||
default.mk: default.mk.in
|
|
||||||
echo 'ROOT = '`pwd` > $@
|
|
||||||
cat $< >> $@
|
|
||||||
make
|
|
||||||
exit $?
|
|
||||||
|
|
||||||
.PHONY: noroot
|
|
||||||
noroot:
|
|
||||||
if test $$UID = 0; then echo "don't build as root!"; exit 1; fi
|
|
||||||
|
|
14
common.mk.in
14
common.mk.in
|
@ -1,7 +1,11 @@
|
||||||
|
|
||||||
all: mkoutdir build
|
all: mkoutdir build
|
||||||
|
|
||||||
OUTDIR = $(ROOT)/build/$(RELDIR)
|
ifeq "$(ROOT)" "/users/www/www"
|
||||||
|
OUTDIR = /var/www-csc/$(RELDIR)
|
||||||
|
else
|
||||||
|
OUTDIR = $(ROOT)/build/$(RELDIR)
|
||||||
|
endif
|
||||||
OUTPUTS = $(addprefix $(OUTDIR),$(FILES))
|
OUTPUTS = $(addprefix $(OUTDIR),$(FILES))
|
||||||
|
|
||||||
.PHONY += mkoutdir
|
.PHONY += mkoutdir
|
||||||
|
@ -13,10 +17,14 @@ build: $(OUTPUTS)
|
||||||
|
|
||||||
.PHONY += clean
|
.PHONY += clean
|
||||||
clean:
|
clean:
|
||||||
|
ifeq "$(ROOT)" "/users/www/www"
|
||||||
|
rm -rf $(OUTDIR)/*
|
||||||
|
else
|
||||||
rm -rf $(OUTDIR)
|
rm -rf $(OUTDIR)
|
||||||
|
endif
|
||||||
|
|
||||||
XSLTARGS=g_date=`date -I` g_time=`date +%H:%M:%S`
|
XSLTARGS=g_date=`date -I` g_time=`date +%H:%M:%S` g_outdir="$(OUTDIR)" \
|
||||||
g_datetime="`date --rfc-3339=seconds`" pwd="$$(pwd)" g_root="$(ROOT)"
|
g_datetime="`date --rfc-3339=seconds`" g_pwd="$$(pwd)" g_root="$(ROOT)"
|
||||||
CLASSPATH = /users/www/saxon8/saxon8.jar
|
CLASSPATH = /users/www/saxon8/saxon8.jar
|
||||||
|
|
||||||
$(OUTDIR)%.html: %.xml $(ROOT)/csc.dtd $(ROOT)/xsl/*.xsl $(ROOT)/events.xml $(ROOT)/news.xml directory.xml
|
$(OUTDIR)%.html: %.xml $(ROOT)/csc.dtd $(ROOT)/xsl/*.xsl $(ROOT)/events.xml $(ROOT)/news.xml directory.xml
|
||||||
|
|
Loading…
Reference in New Issue