2 # (Re)builds API documentation
4 # Mark Huang <mlhuang@cs.princeton.edu>
5 # Copyright (C) 2006 The Trustees of Princeton University
7 # $Id: Makefile,v 1.2 2006/11/03 20:36:05 thierry Exp $
12 .PLCAPI.xml.valid: Methods.xml
14 Methods.xml: DocBook.py ../PLC/__init__.py ../PLC/Methods/__init__.py
15 PYTHONPATH=.. python $< > $@
23 xmllint --valid --output $@ $<
25 # Remove the temporary output file after compilation
26 .SECONDARY: .%.xml.valid
28 # Compile it into other formats
29 FORMATS := dvi html man ps pdf rtf tex texi txt
31 DOCBOOK2FLAGS := -V biblio-number=1
34 %.$(1): %.xml .%.xml.valid
35 docbook2$(1) --nochunks $$(DOCBOOK2FLAGS) $$<
38 $(foreach format,$(FORMATS),$(eval $(call docbook2,$(format))))
41 rm -f $(patsubst %,*.%,$(FORMATS)) .*.xml.valid Methods.xml
45 .PHONY: force clean docclean