INPUTS = index.xml
SUBDIRS = about events docs office news users clubs
# the following two rules are there so cow gets built first.
cow-first: recurse-cow books.xml members.xml all
recurse-cow:
cd cow && $(MAKE) && cd ..
members.xml:
echo '' > $@
echo '' >> $@
ceoquery memberlist | awk -F \| '{ id = $$1; name = $$2; program = $$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 '' >> $@
include default.mk
default.mk: default.mk.in
echo 'ROOT = '`pwd` > $@
cat $< >> $@
.PHONY: members.xml books.xml