grim/purple-objects-docbook

cleaned up the hierarchy template a bit (was kind of messy, more cleaning is possible, but right now it works
made the title for the hierarchy template optional
removed the titles from the object key and the relationship key
cleaned up the graphs page and added xref's to the newly created figures
TRANSFORM=xsltproc
TRANSFORM_OPTS=--nonet --xinclude
OUTPUT=html/
OUTPUT_GRAPHS=$(OUTPUT)graphs
BOOK=xml/purple-objects.xml
SHEETS=\
sheets/class.xsl \
sheets/enum.xsl \
sheets/purple-objects.xsl
BOOK_SOURCES=\
xml/about.xml \
xml/accounts.xml \
xml/ciphers.xml \
xml/connections.xml \
xml/conversations.xml \
xml/filetransfers.xml \
xml/graphs.xml \
xml/plugins.xml \
xml/plugin-loaders.xml \
xml/pounces.xml \
xml/purple-objects.xml \
xml/revhistory.xml \
xml/whiteboards.xml
BOOK_BUILT_SOURCES=\
xml/todo.xml
HIERARCHIES=\
graphs/accounts.hierarchy \
graphs/blistnodes.hierarchy \
graphs/ciphers.hierarchy \
graphs/connections.hierarchy \
graphs/conversations-interfaces.hierarchy \
graphs/conversations-objects.hierarchy \
graphs/filetransfers.hierarchy \
graphs/plugin-loaders.hierarchy \
graphs/plugins.hierarchy \
graphs/pounces.hierarchy \
graphs/proxies.hierarchy \
graphs/whiteboards.hierarchy
CLASSES=\
graphs/plugin.class \
graphs/plugin-info.class \
graphs/plugin-loader.class
ENUMS=\
graphs/plugin-state.enum
KEYS=\
graphs/objects.key \
graphs/relationships.key
GRAPHS=$(HIERARCHIES:%.hierarchy=%.png) $(CLASSES:%.class=%.png) $(ENUMS:%.enum=%.png) $(KEYS:%.key=%.png)
###############################################################################
# basic rules
###############################################################################
all: xml/xml.stamp graphs/graphs.stamp dir.stamp $(SHEETS) $(BOOK_SOURCES)
clean:
rm -rf $(OUTPUT) xml/xml.stamp graphs/graphs.stamp dir.stamp $(BOOK_BUILT_SOURCES)
###############################################################################
# graph rules
###############################################################################
.SUFFIXES: .png .fdp .dot .enum .class .hierarchy .key .neato
.fdp.png: dir.stamp
fdp -Tpng -o $(OUTPUT)$@ $<
rm -f $<
.dot.png: dir.stamp
dot -Tpng -o $(OUTPUT)$@ $<
rm -f $<
.neato.dot: dir.stamp
neato -o $@ $<
rm -f $<
.key.dot:
$(TRANSFORM) $(TRANSFORM_OPTS) -o $@ sheets/hierarchy.xsl $<
.enum.dot:
$(TRANSFORM) $(TRANSFORM_OPTS) -o $@ sheets/enum.xsl $<
.class.dot:
$(TRANSFORM) $(TRANSFORM_OPTS) -o $@ sheets/class.xsl $<
.hierarchy.neato:
$(TRANSFORM) $(TRANSFORM_OPTS) -o $@ sheets/hierarchy.xsl $<
$(GRAPHS): dir.stamp
graphs/graphs.stamp: $(GRAPHS)
touch graphs/graphs.stamp
dir.stamp: $(OUTPUT_GRAPHS)
touch dir.stamp
$(OUTPUT_GRAPHS):
mkdir -p $(OUTPUT_GRAPHS)
###############################################################################
# book stuff
###############################################################################
xml/xml.stamp: $(BOOK_SOURCES) $(BOOK_BUILT_SOURCES) sheets/purple-objects.xsl
$(TRANSFORM) $(TRANSFORM_OPTS) -o $(OUTPUT) sheets/purple-objects.xsl $(BOOK)
touch xml/xml.stamp
xml/todo.xml: .todo sheets/devtodo.xsl
$(TRANSFORM) $(TRANSFORM_OPTS) -o $@ sheets/devtodo.xsl $<