2010-06-14 11:01:44

by Andy Whitcroft

[permalink] [raw]
Subject: [PATCH 1/1] docbook: need xmldoclinks for all doc types

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

Signed-off-by: Andy Whitcroft <[email protected]>
---
Documentation/DocBook/Makefile | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index c7e5dc7..f918d4a 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -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)

--
1.7.0.4


2010-06-14 11:15:54

by Ben Hutchings

[permalink] [raw]
Subject: Re: [PATCH 1/1] docbook: need xmldoclinks for all doc types

On Mon, 2010-06-14 at 12:01 +0100, Andy Whitcroft wrote:
> 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:

diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 9d6f1a4..e9d75e6 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -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.

--
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.


Attachments:
signature.asc (828.00 B)
This is a digitally signed message part

2010-06-14 12:20:59

by Andy Whitcroft

[permalink] [raw]
Subject: Re: [PATCH 1/1] docbook: need xmldoclinks for all doc types

On Mon, Jun 14, 2010 at 12:15:42PM +0100, Ben Hutchings wrote:
> On Mon, 2010-06-14 at 12:01 +0100, Andy Whitcroft wrote:
> > 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.

> diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
> index 9d6f1a4..e9d75e6 100644
> --- a/Documentation/DocBook/Makefile
> +++ b/Documentation/DocBook/Makefile
> @@ -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)

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.

Acked-by: Andy Whitcroft <[email protected]>

-apw

2010-06-15 00:55:22

by Ben Hutchings

[permalink] [raw]
Subject: [PATCH] docbook: need xmldoclinks for all doc types

Andy Whitcroft wrote:
> 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.

Signed-off-by: Ben Hutchings <[email protected]>
Acked-by: Andy Whitcroft <[email protected]>
---
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -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)

###

--
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.

2010-06-15 15:36:26

by Randy Dunlap

[permalink] [raw]
Subject: Re: [PATCH] docbook: need xmldoclinks for all doc types

On Tue, 15 Jun 2010 01:55:14 +0100 Ben Hutchings wrote:

> Andy Whitcroft wrote:
> > 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.

> Signed-off-by: Ben Hutchings <[email protected]>
> Acked-by: Andy Whitcroft <[email protected]>
> ---
> --- a/Documentation/DocBook/Makefile
> +++ b/Documentation/DocBook/Makefile
> @@ -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)
>
> ###
>
> --
> 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 ***

2010-06-16 00:46:42

by Ben Hutchings

[permalink] [raw]
Subject: Re: [PATCH] docbook: need xmldoclinks for all doc types

On Tue, 2010-06-15 at 08:36 -0700, Randy Dunlap wrote:
> On Tue, 15 Jun 2010 01:55:14 +0100 Ben Hutchings wrote:
>
> > Andy Whitcroft wrote:
> > > 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.

> 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.

--
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.


Attachments:
signature.asc (828.00 B)
This is a digitally signed message part