From 5cd33df79bf202ab285cf83cafd0c679927022d9 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Wed, 14 May 2008 01:44:39 +0000 Subject: [PATCH] myplc-docs build from local dtds - more robust, and much faster too --- doc/Makefile | 16 ++++++++++++++++ doc/{NMAPI.xml => NMAPI.xml.in} | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) rename doc/{NMAPI.xml => NMAPI.xml.in} (98%) diff --git a/doc/Makefile b/doc/Makefile index 9ac5aea..36b2c1e 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -9,6 +9,22 @@ 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 NM_SOURCES = ../api_calls.py diff --git a/doc/NMAPI.xml b/doc/NMAPI.xml.in similarity index 98% rename from doc/NMAPI.xml rename to doc/NMAPI.xml.in index 454650d..dd38353 100644 --- a/doc/NMAPI.xml +++ b/doc/NMAPI.xml.in @@ -1,6 +1,6 @@ ]> -- 2.43.0