INPUTS = index.xml SUBDIRS = about events docs office news users clubs media first: noroot events.ics books.xml members.xml menu.xml all 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 noroot: if test $$UID = 0; then echo "don't build as root!"; exit 1; fi members.xml: echo '' > $@ echo '' >> $@ ceoquery memberlist | sort | awk -F \| '{ name = $$1; program = $$2; userid = $$3; gsub(/&/, "\\&", name); gsub(/&/, "\\&", program); gsub(/"/, "\\"", name); gsub(/"/, "\\"", program); print ""; }' >> $@ echo '' >> $@ books.xml: echo '' > $@ echo '' >> $@ ceoquery booklist | awk -F \| '{ isbn = $$1; title = $$2; author = $$3; edition = $$4; published = $$5; gsub(/&/, "\\&", title); gsub(/&/, "\\&", author); gsub(/&/, "\\&", published); gsub(/&/, "\\&", edition); gsub(/"/, "\\"", title); gsub(/"/, "\\"", author); gsub(/"/, "\\"", published); gsub(/"/, "\\"", edition); print ""; }' >> $@ echo '' >> $@ events.ics: perl scripts/xml2ics.pl events.xml > events.ics include default.mk default.mk: default.mk.in echo 'ROOT = '`pwd` > $@ cat $< >> $@ .PHONY: members.xml books.xml