Skip to contentSkip to conversation

docbook: need xmldoclinks for all doc types

PATCH In review Andy Whitcroft 3 participants 6 messages Jun 14, 2010 – Jun 16, 2010 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 docbook: need xmldoclinks for all doc types

We need the xmldoclinks built for any document types built from the XML sources.

---
 Documentation/DocBook/Makefile |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
Documentation/DocBook/Makefile +4 -4
index c7e5dc7..f918d4a 100644
@@ -35,17 +35,17 @@ PS_METHOD	= $(prefer-db2x)
 PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs xmldoclinks
 
 BOOKS := $(addprefix $(obj)/,$(DOCBOOKS))
-xmldocs: $(BOOKS) xmldoclinks
+xmldocs: xmldoclinks $(BOOKS)
 sgmldocs: xmldocs
 
 PS := $(patsubst %.xml, %.ps, $(BOOKS))
-psdocs: $(PS)
+psdocs: xmldoclinks $(PS)
 
 PDF := $(patsubst %.xml, %.pdf, $(BOOKS))
-pdfdocs: $(PDF)
+pdfdocs: xmldoclinks $(PDF)
 
 HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS)))
-htmldocs: $(HTML)
+htmldocs: xmldoclinks $(HTML)
 	$(call build_main_index)
 	$(call build_images)
 
Signature · 1 line
1.7.0.4
#1 lore raw
Quoted 2 lines · Andy Whitcroft

We need the xmldoclinks built for any document types built from the XML sources.

[...]

Yes, you're right, I don't know why I put xmldoclinks there. It Worked For Me when building the linux-doc package in Debian.

However, the dependencies you're introducing seem to assume a serial make. I think this (untested) change would get the dependencies right:

Documentation/DocBook/Makefile +2 -2
index 9d6f1a4..e9d75e6 100644
@@ -35,7 +35,7 @@ PS_METHOD	= $(prefer-db2x)
 PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs xmldoclinks
 
 BOOKS := $(addprefix $(obj)/,$(DOCBOOKS))
-xmldocs: $(BOOKS) xmldoclinks
+xmldocs: $(BOOKS)
 sgmldocs: xmldocs
 
 PS := $(patsubst %.xml, %.ps, $(BOOKS))
@@ -95,7 +95,7 @@ define rule_docproc
         ) > $(dir $@).$(notdir $@).cmd
 endef
 
-%.xml: %.tmpl FORCE
+%.xml: %.tmpl xmldoclinks FORCE
 	$(call if_changed_rule,docproc)
 
 ###

--- END ---

Ben.

Signature · 2 lines
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
author Acked-by
#2 lore raw
Quoted 10 lines · Ben Hutchings
Quoted 2 lines · Andy Whitcroft

We need the xmldoclinks built for any document types built from the XML sources.

[...]

Yes, you're right, I don't know why I put xmldoclinks there. It Worked For Me when building the linux-doc package in Debian.

However, the dependencies you're introducing seem to assume a serial make. I think this (untested) change would get the dependencies right:

Bah, yeah and it just so happens that doc generation is occuring -j1.

Quoted 14 lines
Documentation/DocBook/Makefile +1 -1
index 9d6f1a4..e9d75e6 100644
@@ -35,7 +35,7 @@ PS_METHOD	= $(prefer-db2x)
 PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs xmldoclinks
 
 BOOKS := $(addprefix $(obj)/,$(DOCBOOKS))
-xmldocs: $(BOOKS) xmldoclinks
+xmldocs: $(BOOKS)
 sgmldocs: xmldocs
 
 PS := $(patsubst %.xml, %.ps, $(BOOKS))

Documentation/DocBook/Makefile define rule_docproc · line 99

Quoted 6 lines
Documentation/DocBook/Makefile +1 -1
@@ -95,7 +95,7 @@ define rule_docproc
         ) > $(dir $@).$(notdir $@).cmd
 endef
 
-%.xml: %.tmpl FORCE
+%.xml: %.tmpl xmldoclinks FORCE
 	$(call if_changed_rule,docproc)

Seems to work here in my testing. Dependancy ordering wise it looks more sensibl too. Will you be sending this version out or do you want me to roll it.

-apw

#3 lore raw

PATCH 1/1 docbook: need xmldoclinks for all doc types

In reply to Ben Hutchings
Quoted 2 lines · Andy Whitcroft

We need the xmldoclinks built for any document types built from the XML sources.

Indeed we do. So make the XML files depend on xmldoclinks.

---

Documentation/DocBook/Makefile +2 -2
@@ -35,7 +35,7 @@ PS_METHOD	= $(prefer-db2x)
 PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs xmldoclinks
 
 BOOKS := $(addprefix $(obj)/,$(DOCBOOKS))
-xmldocs: $(BOOKS) xmldoclinks
+xmldocs: $(BOOKS)
 sgmldocs: xmldocs
 
 PS := $(patsubst %.xml, %.ps, $(BOOKS))
@@ -95,7 +95,7 @@ define rule_docproc
         ) > $(dir $@).$(notdir $@).cmd
 endef
 
-%.xml: %.tmpl FORCE
+%.xml: %.tmpl xmldoclinks FORCE
 	$(call if_changed_rule,docproc)
 
 ###
Signature · 2 lines
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
#4 lore raw
Quoted 5 lines · On Tue, 15 Jun 2010 01:55:14 +0100 Ben Hutchings wrote:
Quoted 2 lines · Andy Whitcroft

We need the xmldoclinks built for any document types built from the XML sources.

Indeed we do. So make the XML files depend on xmldoclinks.

The patch description tells me what but not why.

IOW, what error is this fixing and how do I produce that error when this patch is not applied?

Thanks.

Quoted 27 lines

---

Documentation/DocBook/Makefile +2 -2
@@ -35,7 +35,7 @@ PS_METHOD	= $(prefer-db2x)
 PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs xmldoclinks
 
 BOOKS := $(addprefix $(obj)/,$(DOCBOOKS))
-xmldocs: $(BOOKS) xmldoclinks
+xmldocs: $(BOOKS)
 sgmldocs: xmldocs
 
 PS := $(patsubst %.xml, %.ps, $(BOOKS))
@@ -95,7 +95,7 @@ define rule_docproc
         ) > $(dir $@).$(notdir $@).cmd
 endef
 
-%.xml: %.tmpl FORCE
+%.xml: %.tmpl xmldoclinks FORCE
 	$(call if_changed_rule,docproc)
 
 ###
Signature · 3 lines
-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

#5 lore raw
Quoted 9 lines · Randy Dunlap
Quoted 5 lines · On Tue, 15 Jun 2010 01:55:14 +0100 Ben Hutchings wrote:
Quoted 2 lines · Andy Whitcroft

We need the xmldoclinks built for any document types built from the XML sources.

Indeed we do. So make the XML files depend on xmldoclinks.

The patch description tells me what but not why.

The quoted text from Andy says why.

Quoted 2 lines

IOW, what error is this fixing and how do I produce that error when this patch is not applied?

$ rm -rf build
$ mkdir build
$ cp .config build
$ make O=build htmldocs
...
xmlto: /home/ben/src/linux-2.6/build/Documentation/DocBook/media.xml
does not validate (status 3)
xmlto: Fix document syntax or use --skip-validation option
/home/ben/src/linux-2.6/build/Documentation/DocBook/media.xml:4:
warning: failed to load external entity
"/home/ben/src/linux-2.6/build/Documentation/DocBook/media-entities.tmpl"
...

Ben.

Signature · 2 lines
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.