2 # (Re)builds API documentation
4 # Mark Huang <mlhuang@cs.princeton.edu>
5 # Copyright (C) 2006 The Trustees of Princeton University
7 # $Id: Makefile 5574 2007-10-25 20:33:17Z thierry $
12 .NMAPI.xml.valid: Methods.xml
14 NM_SOURCES = ../api_calls.py
16 # path needs to mention PLCAPI/doc (for DocBook) and PLCAPI/ (for PLC.Parameter)
17 Methods.xml: DocBookLocal.py $(NM_SOURCES)
18 PYTHONPATH=..:../../PLCAPI:../../PLCAPI/doc DocBookLocal.py > $@
26 xmllint --valid --output $@ $<
28 # Remove the temporary output file after compilation
29 .SECONDARY: .%.xml.valid
31 # Compile it into other formats
32 FORMATS := dvi html man ps pdf rtf tex texi txt
34 DOCBOOK2FLAGS := -V biblio-number=1
37 %.$(1): %.xml .%.xml.valid
38 docbook2$(1) --nochunks $$(DOCBOOK2FLAGS) $$<
41 $(foreach format,$(FORMATS),$(eval $(call docbook2,$(format))))
44 rm -f $(patsubst %,*.%,$(FORMATS)) .*.xml.valid Methods.xml