Added $SUBSUBDIRS to allow make clean-recurse to recurse to all levels
[www/www.git] / Makefile
1 INPUTS = index.xml 
2 SUBDIRS = about events docs office news
3 SUBSUBDIRS = office/books docs/editing-example1 docs/editing-example2 docs/editing-example3
4
5 # the following two rules are there so cow gets built first.
6 cow-first: recurse-cow books.xml members.xml all
7
8 recurse-cow:
9         cd cow && $(MAKE) && cd ..
10
11 members.xml:
12         echo '<?xml version='\''1.0'\''?>' > $@
13         echo '<memberlist>' >> $@
14         ceoquery memberlist | awk -F \| '{ id = $$1; name = $$2; program = $$3; gsub(/&/, "\\&amp;", name); gsub(/&/, "\\&amp;", program); gsub(/"/, "\\&quot;", name); gsub(/"/, "\\&quot;", program); print "<member id=\"" id "\" name=\"" name "\" program=\"" program "\" />"; }' >> $@
15         echo '</memberlist>' >> $@
16
17 books.xml:
18         echo '<?xml version='\''1.0'\'' encoding="ISO-8859-1"?>' > $@
19         echo '<booklist>' >> $@
20         ceoquery booklist | awk -F \| '{ isbn = $$1; title = $$2; author = $$3; edition = $$4; published = $$5; gsub(/&/, "\\&amp;", title); gsub(/&/, "\\&amp;", author); gsub(/&/, "\\&amp;", published); gsub(/&/, "\\&amp;", edition); gsub(/"/, "\\&quot;", title); gsub(/"/, "\\&quot;", author); gsub(/"/, "\\&quot;", published); gsub(/"/, "\\&quot;", edition); print "<book isbn=\"" isbn "\" title=\"" title "\" author=\"" author "\" edition=\"" edition "\" published=\"" published "\"/>"; }' >> $@
21         echo '</booklist>' >> $@
22
23 include default.mk
24
25 default.mk: default.mk.in
26         echo 'ROOT = '`pwd` > $@
27         cat $< >> $@
28
29 .PHONY: members.xml books.xml