public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] DocBook: Add a help message for DOCBOOKS env var
       [not found] <cover.1447943571.git.mchehab@osg.samsung.com>
@ 2015-11-19 14:38 ` Mauro Carvalho Chehab
  2015-11-19 14:38 ` [PATCH 2/3] DocBook: Cleanup: remove an unused $(call) line Mauro Carvalho Chehab
  2015-11-19 14:38 ` [PATCH 3/3] DocBook: make index.html generation less verbose by default Mauro Carvalho Chehab
  2 siblings, 0 replies; 5+ messages in thread
From: Mauro Carvalho Chehab @ 2015-11-19 14:38 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List,
	Mauro Carvalho Chehab, Ben Hutchings, Daniel Vetter, Dave Airlie,
	Michal Marek, Danilo Cesar Lemes de Paula, linux-doc

Sometimes, it is needed to compile only a subset of the possible
DocBooks. This is supported by the building system, but it is not
docummented. Add a documentation for it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
---
 Documentation/DocBook/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 91f6d89bb19f..bab296c5f565 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -227,6 +227,10 @@ dochelp:
 	@echo  '  mandocs         - man pages'
 	@echo  '  installmandocs  - install man pages generated by mandocs'
 	@echo  '  cleandocs       - clean all generated DocBook files'
+	@echo
+	@echo  'make DOCBOOKS="s1.xml s2.xml" [target] Generate only docs s1.xml s2.xml'
+	@echo  '  valid values for DOCBOOKS are: $(DOCBOOKS)'
+
 
 ###
 # Temporary files left by various tools
-- 
2.5.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] DocBook: Cleanup: remove an unused $(call) line
       [not found] <cover.1447943571.git.mchehab@osg.samsung.com>
  2015-11-19 14:38 ` [PATCH 1/3] DocBook: Add a help message for DOCBOOKS env var Mauro Carvalho Chehab
@ 2015-11-19 14:38 ` Mauro Carvalho Chehab
  2015-11-19 14:38 ` [PATCH 3/3] DocBook: make index.html generation less verbose by default Mauro Carvalho Chehab
  2 siblings, 0 replies; 5+ messages in thread
From: Mauro Carvalho Chehab @ 2015-11-19 14:38 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List,
	Mauro Carvalho Chehab, Ben Hutchings, Daniel Vetter, Michal Marek,
	Daniel Baluta, Jim Davis, Danilo Cesar Lemes de Paula, linux-doc

There's no build_images function to call. So remove it.

This is just a cleanup patch, with doesn't affect the build.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
---
 Documentation/DocBook/Makefile | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index bab296c5f565..5b4176673ada 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -51,7 +51,6 @@ pdfdocs: $(PDF)
 HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS)))
 htmldocs: $(HTML)
 	$(call build_main_index)
-	$(call build_images)
 	$(call install_media_images)
 
 MAN := $(patsubst %.xml, %.9, $(BOOKS))
-- 
2.5.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] DocBook: make index.html generation less verbose by default
       [not found] <cover.1447943571.git.mchehab@osg.samsung.com>
  2015-11-19 14:38 ` [PATCH 1/3] DocBook: Add a help message for DOCBOOKS env var Mauro Carvalho Chehab
  2015-11-19 14:38 ` [PATCH 2/3] DocBook: Cleanup: remove an unused $(call) line Mauro Carvalho Chehab
@ 2015-11-19 14:38 ` Mauro Carvalho Chehab
  2015-11-25 11:40   ` Daniel Vetter
  2 siblings, 1 reply; 5+ messages in thread
From: Mauro Carvalho Chehab @ 2015-11-19 14:38 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List,
	Mauro Carvalho Chehab, Ben Hutchings, Daniel Vetter, Lukas Wunner,
	Daniel Baluta, Michal Marek, Danilo Cesar Lemes de Paula,
	linux-doc

When make htmldocs is called on non-verbose mode, it will still be
verbose with index.html generation for no good reason, printing:

	rm -rf Documentation/DocBook/index.html; echo '<h1>Linux Kernel HTML Documentation</h1>' >> Documentation/DocBook/index.html && echo '<h2>Kernel Version: 4.4.0-rc1</h2>' >> Documentation/DocBook/index.html && cat Documentation/DocBook/iio.html >> Documentation/DocBook/index.html

Instead, use the standard non-verbose mode, using:

	  HTML    Documentation/DocBook/index.html

if not called with V=1.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
---
 Documentation/DocBook/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 5b4176673ada..d70f9b68174e 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -50,7 +50,7 @@ pdfdocs: $(PDF)
 
 HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS)))
 htmldocs: $(HTML)
-	$(call build_main_index)
+	$(call cmd,build_main_index)
 	$(call install_media_images)
 
 MAN := $(patsubst %.xml, %.9, $(BOOKS))
@@ -138,7 +138,8 @@ quiet_cmd_db2pdf = PDF     $@
 
 index = index.html
 main_idx = $(obj)/$(index)
-build_main_index = rm -rf $(main_idx); \
+quiet_cmd_build_main_index = HTML    $(main_idx)
+      cmd_build_main_index = rm -rf $(main_idx); \
 		   echo '<h1>Linux Kernel HTML Documentation</h1>' >> $(main_idx) && \
 		   echo '<h2>Kernel Version: $(KERNELVERSION)</h2>' >> $(main_idx) && \
 		   cat $(HTML) >> $(main_idx)
-- 
2.5.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 3/3] DocBook: make index.html generation less verbose by default
  2015-11-19 14:38 ` [PATCH 3/3] DocBook: make index.html generation less verbose by default Mauro Carvalho Chehab
@ 2015-11-25 11:40   ` Daniel Vetter
  2015-11-25 14:24     ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Vetter @ 2015-11-25 11:40 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Jonathan Corbet, Linux Media Mailing List, Mauro Carvalho Chehab,
	Ben Hutchings, Lukas Wunner, Daniel Baluta, Michal Marek,
	Danilo Cesar Lemes de Paula, linux-doc

On Thu, Nov 19, 2015 at 3:38 PM, Mauro Carvalho Chehab <mchehab@osg.samsung.com> wrote:
> When make htmldocs is called on non-verbose mode, it will still be
> verbose with index.html generation for no good reason, printing:
>
>         rm -rf Documentation/DocBook/index.html; echo '<h1>Linux Kernel HTML Documentation</h1>' >> Documentation/DocBook/index.html && echo '<h2>Kernel Version: 4.4.0-rc1</h2>' >> Documentation/DocBook/index.html && cat Documentation/DocBook/iio.html >> Documentation/DocBook/index.html
>
> Instead, use the standard non-verbose mode, using:
>
>           HTML    Documentation/DocBook/index.html
>
> if not called with V=1.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

Interesting, but seems to fail for e.g. gpu.xml:

$ git clean -dfx Documentation/
$ make DOCBOOKS="gpu.xml" htmldocs
 HOSTCC  scripts/basic/fixdep
 HOSTCC  scripts/docproc
 HOSTCC  scripts/check-lc_ctype
 DOCPROC Documentation/DocBook/gpu.xml

... lots of warnings about kerneldoc issues in gpu.xml

 XMLREF  Documentation/DocBook/gpu.aux.xml
 HTML    Documentation/DocBook/gpu.html
rm -rf Documentation/DocBook/index.html; echo '<h1>Linux Kernel HTML Documentation</h1>' >> Documentation/DocBook/index.html && echo '<h2>Kernel Version: 4.4.0-rc2</h2>' >> Documentation/DocBook/index.html && cat Documentation/DocBook/gpu.html >> Documentation/DocBook/index.html
cp: cannot stat ‘./Documentation/DocBook//bayer.png’: No such file or directory
cp: cannot stat ‘./Documentation/DocBook//constraints.png’: No such file or directory
cp: cannot stat ‘./Documentation/DocBook//crop.gif’: No such file or directory
cp: cannot stat ‘./Documentation/DocBook//dvbstb.png’: No such file or directory
cp: cannot stat ‘./Documentation/DocBook//fieldseq_bt.gif’: No such file or directory
cp: cannot stat ‘./Documentation/DocBook//fieldseq_tb.gif’: No such file or directory
cp: cannot stat ‘./Documentation/DocBook//nv12mt.gif’: No such file or directory
cp: cannot stat ‘./Documentation/DocBook//nv12mt_example.gif’: No such file or directory
cp: cannot stat ‘./Documentation/DocBook//pipeline.png’: No such file or directory
cp: cannot stat ‘./Documentation/DocBook//selection.png’: No such file or directory
cp: cannot stat ‘./Documentation/DocBook//vbi_525.gif’: No such file or directory
cp: cannot stat ‘./Documentation/DocBook//vbi_625.gif’: No such file or directory
cp: cannot stat ‘./Documentation/DocBook//vbi_hsync.gif’: No such file or directory
Documentation/DocBook/Makefile:55: recipe for target 'htmldocs' failed
make[1]: [htmldocs] Error 1 (ignored)

Once I've built media_api.xml the above goes away and then I get a new warning when trying to rebuild:

$ make DOCBOOKS="media_api.xml" htmldocs      

... output cut ...

$ make DOCBOOKS="gpu.xml" htmldocs      
rm -rf Documentation/DocBook/index.html; echo '<h1>Linux Kernel HTML Documentation</h1>' >> Documentation/DocBook/index.html && echo '<h2>Kernel Version: 4.4.0-rc2</h2>' >> Documentation/DocBook/index.html && cat Documentation/DocBook/gpu.html >> Documentation/DocBook/index.html
mkdir: cannot create directory ‘./Documentation/DocBook//media_api’: File exists

Cheers, Daniel


> ---
>  Documentation/DocBook/Makefile | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
> index 5b4176673ada..d70f9b68174e 100644
> --- a/Documentation/DocBook/Makefile
> +++ b/Documentation/DocBook/Makefile
> @@ -50,7 +50,7 @@ pdfdocs: $(PDF)
>
>  HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS)))
>  htmldocs: $(HTML)
> -       $(call build_main_index)
> +       $(call cmd,build_main_index)
>         $(call install_media_images)
>
>  MAN := $(patsubst %.xml, %.9, $(BOOKS))
> @@ -138,7 +138,8 @@ quiet_cmd_db2pdf = PDF     $@
>
>  index = index.html
>  main_idx = $(obj)/$(index)
> -build_main_index = rm -rf $(main_idx); \
> +quiet_cmd_build_main_index = HTML    $(main_idx)
> +      cmd_build_main_index = rm -rf $(main_idx); \
>                    echo '<h1>Linux Kernel HTML Documentation</h1>' >> $(main_idx) && \
>                    echo '<h2>Kernel Version: $(KERNELVERSION)</h2>' >> $(main_idx) && \
>                    cat $(HTML) >> $(main_idx)
> --
> 2.5.0
>
>



-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 3/3] DocBook: make index.html generation less verbose by default
  2015-11-25 11:40   ` Daniel Vetter
@ 2015-11-25 14:24     ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 5+ messages in thread
From: Mauro Carvalho Chehab @ 2015-11-25 14:24 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Jonathan Corbet, Linux Media Mailing List, Mauro Carvalho Chehab,
	Ben Hutchings, Lukas Wunner, Daniel Baluta, Michal Marek,
	Danilo Cesar Lemes de Paula, linux-doc

Em Wed, 25 Nov 2015 12:40:38 +0100
Daniel Vetter <daniel.vetter@ffwll.ch> escreveu:

> On Thu, Nov 19, 2015 at 3:38 PM, Mauro Carvalho Chehab <mchehab@osg.samsung.com> wrote:
> > When make htmldocs is called on non-verbose mode, it will still be
> > verbose with index.html generation for no good reason, printing:
> >
> >         rm -rf Documentation/DocBook/index.html; echo '<h1>Linux Kernel HTML Documentation</h1>' >> Documentation/DocBook/index.html && echo '<h2>Kernel Version: 4.4.0-rc1</h2>' >> Documentation/DocBook/index.html && cat Documentation/DocBook/iio.html >> Documentation/DocBook/index.html
> >
> > Instead, use the standard non-verbose mode, using:
> >
> >           HTML    Documentation/DocBook/index.html
> >
> > if not called with V=1.
> >
> > Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
> 
> Interesting, but seems to fail for e.g. gpu.xml:
> 
> $ git clean -dfx Documentation/
> $ make DOCBOOKS="gpu.xml" htmldocs
>  HOSTCC  scripts/basic/fixdep
>  HOSTCC  scripts/docproc
>  HOSTCC  scripts/check-lc_ctype
>  DOCPROC Documentation/DocBook/gpu.xml
> 
> ... lots of warnings about kerneldoc issues in gpu.xml
> 
>  XMLREF  Documentation/DocBook/gpu.aux.xml
>  HTML    Documentation/DocBook/gpu.html
> rm -rf Documentation/DocBook/index.html; echo '<h1>Linux Kernel HTML Documentation</h1>' >> Documentation/DocBook/index.html && echo '<h2>Kernel Version: 4.4.0-rc2</h2>' >> Documentation/DocBook/index.html && cat Documentation/DocBook/gpu.html >> Documentation/DocBook/index.html
> cp: cannot stat ‘./Documentation/DocBook//bayer.png’: No such file or directory
> cp: cannot stat ‘./Documentation/DocBook//constraints.png’: No such file or directory
> cp: cannot stat ‘./Documentation/DocBook//crop.gif’: No such file or directory
> cp: cannot stat ‘./Documentation/DocBook//dvbstb.png’: No such file or directory
> cp: cannot stat ‘./Documentation/DocBook//fieldseq_bt.gif’: No such file or directory
> cp: cannot stat ‘./Documentation/DocBook//fieldseq_tb.gif’: No such file or directory
> cp: cannot stat ‘./Documentation/DocBook//nv12mt.gif’: No such file or directory
> cp: cannot stat ‘./Documentation/DocBook//nv12mt_example.gif’: No such file or directory
> cp: cannot stat ‘./Documentation/DocBook//pipeline.png’: No such file or directory
> cp: cannot stat ‘./Documentation/DocBook//selection.png’: No such file or directory
> cp: cannot stat ‘./Documentation/DocBook//vbi_525.gif’: No such file or directory
> cp: cannot stat ‘./Documentation/DocBook//vbi_625.gif’: No such file or directory
> cp: cannot stat ‘./Documentation/DocBook//vbi_hsync.gif’: No such file or directory
> Documentation/DocBook/Makefile:55: recipe for target 'htmldocs' failed
> make[1]: [htmldocs] Error 1 (ignored)
> 
> Once I've built media_api.xml the above goes away

There's actually one patch fixing this at media tree:

>From d01b2d53a5a4db38c7c95651ca9ff23bb930844e Mon Sep 17 00:00:00 2001
From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Date: Thu, 19 Nov 2015 07:41:40 -0200
Subject: [PATCH] DocBook: only copy stuff to media_api if media xml is
 generated

It is possible to use:
	make DOCBOOKS=device-drivers.xml htmldocs

To produce just a few docbooks. In such case, the media docs
won't be built, causing the makefile target to return an error.

While this is ok for human eyes, if the above is used on an script,
it would cause troubles.

Fix it by only creating/filling the media_api directory if the
media_api.xml is found at DOCBOOKS.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

diff --git a/Documentation/DocBook/media/Makefile b/Documentation/DocBook/media/Makefile
index 02848146fc3a..2840ff483d5a 100644
--- a/Documentation/DocBook/media/Makefile
+++ b/Documentation/DocBook/media/Makefile
@@ -199,8 +199,10 @@ DVB_DOCUMENTED = \
 #
 
 install_media_images = \
-	$(Q)-mkdir -p $(MEDIA_OBJ_DIR)/media_api; \
-	cp $(OBJIMGFILES) $(MEDIA_SRC_DIR)/*.svg $(MEDIA_SRC_DIR)/v4l/*.svg $(MEDIA_OBJ_DIR)/media_api
+	$(Q)if [ "x$(findstring media_api.xml,$(DOCBOOKS))" != "x" ]; then \
+		mkdir -p $(MEDIA_OBJ_DIR)/media_api; \
+		cp $(OBJIMGFILES) $(MEDIA_SRC_DIR)/*.svg $(MEDIA_SRC_DIR)/v4l/*.svg $(MEDIA_OBJ_DIR)/media_api; \
+	fi
 
 $(MEDIA_OBJ_DIR)/%: $(MEDIA_SRC_DIR)/%.b64
 	$(Q)base64 -d $< >$@


> and then I get a new warning when trying to rebuild:
> 
> $ make DOCBOOKS="media_api.xml" htmldocs      
> 
> ... output cut ...
> 
> $ make DOCBOOKS="gpu.xml" htmldocs      
> rm -rf Documentation/DocBook/index.html; echo '<h1>Linux Kernel HTML Documentation</h1>' >> Documentation/DocBook/index.html && echo '<h2>Kernel Version: 4.4.0-rc2</h2>' >> Documentation/DocBook/index.html && cat Documentation/DocBook/gpu.html >> Documentation/DocBook/index.html
> mkdir: cannot create directory ‘./Documentation/DocBook//media_api’: File exists

There are two other patches for Documentation/DocBook/media/Makefile
that will fix this trouble.

Those patches are already at linux-next, via my tree.

Regards,
Mauro

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-11-25 14:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <cover.1447943571.git.mchehab@osg.samsung.com>
2015-11-19 14:38 ` [PATCH 1/3] DocBook: Add a help message for DOCBOOKS env var Mauro Carvalho Chehab
2015-11-19 14:38 ` [PATCH 2/3] DocBook: Cleanup: remove an unused $(call) line Mauro Carvalho Chehab
2015-11-19 14:38 ` [PATCH 3/3] DocBook: make index.html generation less verbose by default Mauro Carvalho Chehab
2015-11-25 11:40   ` Daniel Vetter
2015-11-25 14:24     ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox