old-website/Makefile

40 lines
1.5 KiB
Makefile
Raw Normal View History

FILES = events.ics events.atom news.atom index.html \
favicon.ico default.css robots.txt csclub.der csclub.pem
SUBDIRS = about events office news services media buttons logos flash
include common.mk
2002-03-11 15:39:54 -05:00
build: noroot mkoutdir common.mk $(OUTPUTS)
@for i in $(SUBDIRS) ; do ($(MAKE) -C $$i || exit 1); done
2007-06-30 19:06:12 -04:00
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 ! -group www -print0 | xargs -r0 chgrp www || true
2007-06-30 18:26:17 -04:00
noroot:
if test $$UID = 0; then echo "don't build as root!"; exit 1; fi
2002-04-15 18:31:30 -04:00
members.xml:
test -e /usr/bin/ceoquery || (echo 'Error: ceoquery not found'; exit 1)
2002-04-15 18:31:30 -04:00
echo '<?xml version='\''1.0'\''?>' > $@
echo '<memberlist>' >> $@
2007-07-16 09:09:19 -04:00
ceoquery memberlist | sort | awk -F \| '{ name = $$1; program = $$2; userid = $$3; gsub(/&/, "\\&amp;", name); gsub(/&/, "\\&amp;", program); gsub(/"/, "\\&quot;", name); gsub(/"/, "\\&quot;", program); print "<member name=\"" name "\" program=\"" program "\" userid=\"" userid "\" />"; }' >> $@
2002-04-15 18:31:30 -04:00
echo '</memberlist>' >> $@
2007-03-23 23:55:56 -04:00
events.ics:
2007-07-07 04:03:27 -04:00
perl scripts/xml2ics.pl events.xml > events.ics
2007-03-23 23:55:56 -04:00
2002-03-11 15:39:54 -05:00
include default.mk
2007-09-25 01:21:12 -04:00
%.atom: %.xml xsl/atom.xsl
2007-09-21 21:02:46 -04:00
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