X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=doc%2FMakefile;h=508d3acc0bd682eac4b90a5fec61cdd768379fbe;hb=HEAD;hp=1340f8e9947de30224db08fab0bb3ef25f59469a;hpb=24d16d18acab3da7bccc3e09df4927e9cf2d3246;p=plcapi.git diff --git a/doc/Makefile b/doc/Makefile index 1340f8e..508d3ac 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -4,15 +4,31 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: plcsh,v 1.3 2006/01/09 19:57:24 mlhuang Exp $ -# -all: PLCAPI.pdf +all: PLCAPI.html + +# XML - as opposed to SGML - requires an identifier - see +# http://www.docbook.org/tdg/en/html/appb.html +# and, openjade opens http connections when using the official URL +# as an identifier; this is slow, and sometimes fails and breaks the build + +# locating locally installed docbook43 dtd - fedora-specific +remote-docbook-43 = http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd +local-docbook-43 = $(wildcard /usr/share/sgml/docbook/xml-dtd-4.3*/docbookx.dtd) +docbook-43=$(if $(local-docbook-43),$(local-docbook-43),$(remote-docbook-43)) + +PLCAPI.xml: PLCAPI.xml.in + $(if $(local-docbook-43), \ + echo Using locally installed DTD $(local-docbook-43), \ + echo WARNING - could not locate local DTD - using remote $(remote-docbook-43)) + sed -e "s,@DOCBOOK-43@,$(docbook-43)," $< > $@ .PLCAPI.xml.valid: Methods.xml -Methods.xml: DocBook.py ../PLC/__init__.py ../PLC/Methods/__init__.py - PYTHONPATH=.. python $< > $@ +API_SOURCES = ../PLC/__init__.py ../PLC/Methods/__init__.py + +Methods.xml: DocBook.py DocBookLocal.py $(API_SOURCES) + PYTHONPATH=.. ./DocBookLocal.py > $@ # # Documentation @@ -38,8 +54,6 @@ endef $(foreach format,$(FORMATS),$(eval $(call docbook2,$(format)))) clean: - rm -f $(patsubst %,*.%,$(FORMATS)) .*.xml.valid - -force: + rm -f $(patsubst %,*.%,$(FORMATS)) .*.xml.valid Methods.xml -.PHONY: force clean docclean +.PHONY: clean all