X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=doc%2FMakefile;h=5d3870fe7c293ad62ddd39ac562119fb61297af9;hb=f39100f35e48369b47cab7dd85918dc948f2af44;hp=0a900552f476778e9cd4d5024eed2cf1a8980f3e;hpb=2a13c605a149d7ee4568f8eb103627f63dd89d45;p=nodemanager.git diff --git a/doc/Makefile b/doc/Makefile index 0a90055..5d3870f 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -4,24 +4,39 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: Makefile,v 1.2 2006/11/03 20:36:05 thierry Exp $ +# $Id: Makefile 5574 2007-10-25 20:33:17Z thierry $ # -all: NMAPI.html end +all: NMAPI.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)) + +NMAPI.xml: NMAPI.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), $< > $@ .NMAPI.xml.valid: Methods.xml -Methods.xml: DocBook.py ../api_calls.py - PYTHONPATH=..:../../../PLCAPI python $< > $@ +NM_SOURCES = ../api_calls.py + +# path needs to mention PLCAPI/doc (for DocBook) and PLCAPI/ (for PLC.Parameter) +Methods.xml: DocBookLocal.py $(NM_SOURCES) + PYTHONPATH=..:../../PLCAPI:../../PLCAPI/doc ./DocBookLocal.py > $@ # # Documentation # -# TODO: figure out where to put this command to strip out the unnecessary bits for PlanetLab Drupal page: -end: - awk 'BEGIN { print " 29 && $$0 != "> out.html - # Validate the XML .%.xml.valid: %.xml xmllint --valid --output $@ $< @@ -44,6 +59,4 @@ $(foreach format,$(FORMATS),$(eval $(call docbook2,$(format)))) clean: rm -f $(patsubst %,*.%,$(FORMATS)) .*.xml.valid Methods.xml -force: - -.PHONY: force clean docclean +.PHONY: clean all