2 # (Re)builds API documentation
4 # Mark Huang <mlhuang@cs.princeton.edu>
5 # Copyright (C) 2006 The Trustees of Princeton University
12 .PLCAPI.xml.valid: Methods.xml
14 API_SOURCES = ../PLC/__init__.py ../PLC/Methods/__init__.py
16 Methods.xml: DocBook.py DocBookLocal.py $(API_SOURCES)
17 PYTHONPATH=.. ./DocBookLocal.py > $@
25 xmllint --valid --output $@ $<
27 # Remove the temporary output file after compilation
28 .SECONDARY: .%.xml.valid
30 # Compile it into other formats
31 FORMATS := dvi html man ps pdf rtf tex texi txt
33 DOCBOOK2FLAGS := -V biblio-number=1
36 %.$(1): %.xml .%.xml.valid
37 docbook2$(1) --nochunks $$(DOCBOOK2FLAGS) $$<
40 $(foreach format,$(FORMATS),$(eval $(call docbook2,$(format))))
43 rm -f $(patsubst %,*.%,$(FORMATS)) .*.xml.valid Methods.xml