2002-04-22 21:02:42 -04:00
|
|
|
INPUTS = index.xml
|
2003-05-05 22:14:20 -04:00
|
|
|
SUBDIRS = about events docs office news u clubs
|
2002-03-11 15:39:54 -05:00
|
|
|
|
2002-04-15 17:20:33 -04:00
|
|
|
# the following two rules are there so cow gets built first.
|
2002-04-22 21:02:42 -04:00
|
|
|
cow-first: recurse-cow books.xml members.xml all
|
2002-04-15 17:20:33 -04:00
|
|
|
|
|
|
|
recurse-cow:
|
|
|
|
cd cow && $(MAKE) && cd ..
|
|
|
|
|
2002-04-15 18:31:30 -04:00
|
|
|
members.xml:
|
|
|
|
echo '<?xml version='\''1.0'\''?>' > $@
|
|
|
|
echo '<memberlist>' >> $@
|
2002-04-22 21:02:42 -04:00
|
|
|
ceoquery memberlist | awk -F \| '{ id = $$1; name = $$2; program = $$3; gsub(/&/, "\\&", name); gsub(/&/, "\\&", program); gsub(/"/, "\\"", name); gsub(/"/, "\\"", program); print "<member id=\"" id "\" name=\"" name "\" program=\"" program "\" />"; }' >> $@
|
2002-04-15 18:31:30 -04:00
|
|
|
echo '</memberlist>' >> $@
|
|
|
|
|
2002-04-22 21:02:42 -04:00
|
|
|
books.xml:
|
|
|
|
echo '<?xml version='\''1.0'\'' encoding="ISO-8859-1"?>' > $@
|
|
|
|
echo '<booklist>' >> $@
|
|
|
|
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 "<book isbn=\"" isbn "\" title=\"" title "\" author=\"" author "\" edition=\"" edition "\" published=\"" published "\"/>"; }' >> $@
|
|
|
|
echo '</booklist>' >> $@
|
|
|
|
|
2002-03-11 15:39:54 -05:00
|
|
|
include default.mk
|
|
|
|
|
2002-04-15 11:33:38 -04:00
|
|
|
default.mk: default.mk.in
|
|
|
|
echo 'ROOT = '`pwd` > $@
|
|
|
|
cat $< >> $@
|
|
|
|
|
2002-04-22 21:02:42 -04:00
|
|
|
.PHONY: members.xml books.xml
|