myplc-docs build from local dtds - more robust, and much faster too
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 14 May 2008 01:44:39 +0000 (01:44 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 14 May 2008 01:44:39 +0000 (01:44 +0000)
doc/Makefile
doc/myplc.xml.in [moved from doc/myplc.xml with 99% similarity]
myplc-native.spec

index 5c09b91..feb5a7c 100644 (file)
@@ -9,6 +9,22 @@
 
 all: myplc.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))
+
+myplc.xml: myplc.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): $< > $@
+
 # Dependencies
 .myplc.xml.valid: architecture.eps architecture.png plc_variables.xml 
 
similarity index 99%
rename from doc/myplc.xml
rename to doc/myplc.xml.in
index 9ce2cd9..3289098 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
-"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+"@DOCBOOK-43@" [
   <!ENTITY Variables SYSTEM "plc_variables.xml">
 ]>
 <article>
index 0a55a43..dce41d4 100644 (file)
@@ -69,8 +69,7 @@ Requires: PLCWWW
 Requires: nodeconfig
 Requires: PLCAPI
 Requires: bootstrapfs-%{pldistro}-%{_arch}
-#tmp, while we get the doc's build fixed
-#Requires: myplc-docs
+Requires: myplc-docs
 
 Provides: myplc