[FFmpeg-devel] [PATCH] build: check for perl presence and compile POD pages only in that case

Clément Bœsch ubitux at gmail.com
Mon Aug 13 07:41:01 CEST 2012


On Sat, Aug 11, 2012 at 12:01:18PM +0200, Stefano Sabatini wrote:
> On date Friday 2012-08-10 11:54:53 +0200, Stefano Sabatini encoded:
> [...]
> > From b6b227e94bcb010b849b46d3e07e79e200fbc4b9 Mon Sep 17 00:00:00 2001
> > From: Stefano Sabatini <stefasab at gmail.com>
> > Date: Thu, 9 Aug 2012 23:37:28 +0200
> > Subject: [PATCH] build: extend documentation building mechanism
> > 
> > Allow to select specific documentation components, and reliably check for
> > component dependencies.
> > 
> > In particular, check for perl presence on the system.
> > ---
> >  configure    |   19 ++++++++++++++++++-
> >  doc/Makefile |    9 +++++----
> >  2 files changed, 23 insertions(+), 5 deletions(-)
> 
> Updated with more docs.
> -- 
> FFmpeg = Formidable and Funny Monstrous Pitiless Enhancing Gem

[...]
>  PROGRAM_LIST="
>      ffplay
>      ffprobe
> @@ -1052,6 +1066,7 @@ PROGRAM_LIST="
>  
>  CONFIG_LIST="
>      $COMPONENT_LIST
> +    $DOCUMENT_LIST
>      $PROGRAM_LIST
>      avcodec
>      avdevice
> @@ -1062,7 +1077,6 @@ CONFIG_LIST="
>      bzlib
>      crystalhd
>      dct
> -    doc
>      dwt
>      dxva2
>      fast_unaligned
> @@ -1285,6 +1299,7 @@ HAVE_LIST="
>      mmap
>      nanosleep
>      PeekNamedPipe
> +    perl
>      pod2man
>      poll_h
>      posix_memalign
> @@ -1848,7 +1863,12 @@ ffprobe_deps="avcodec avformat"
>  ffserver_deps="avformat ffm_muxer fork rtp_protocol rtsp_demuxer"
>  ffserver_extralibs='$ldl'
>  
> -doc_deps_any="texi2html makeinfo pod2man"
> +# documents

nit: documentation

> +podpages_deps="perl"
> +manpages_deps="perl pod2man"
> +htmlpages_deps="texi2html"
> +txtpages_deps="makeinfo"
> +doc_deps_any="manpages htmlpages podpages txtpages"
>  
>  # tests
>  colormatrix1_test_deps="colormatrix_filter"
> @@ -1951,6 +1971,7 @@ ALT_PP_VER=$ALT_PP_VER_MAJOR.$ALT_PP_VER_MINOR.$ALT_PP_VER_MICRO
>  
>  # configurable options
>  enable $PROGRAM_LIST
> +enable $DOCUMENT_LIST
>  
>  enable avcodec
>  enable avdevice
> @@ -3525,6 +3546,7 @@ enabled sdl && add_cflags $sdl_cflags && add_extralibs $sdl_libs
>  
>  texi2html --help 2> /dev/null | grep -q 'init-file' && enable texi2html || disable texi2html
>  makeinfo --version > /dev/null 2>&1 && enable makeinfo  || disable makeinfo
> +perl --version > /dev/null 2>&1 && enable perl || disable perl
>  pod2man --help > /dev/null 2>&1 && enable pod2man || disable pod2man
>  
>  check_header linux/fb.h
> @@ -3867,6 +3889,7 @@ echo "openssl enabled           ${openssl-no}"
>  echo "zlib enabled              ${zlib-no}"
>  echo "bzlib enabled             ${bzlib-no}"
>  echo "texi2html enabled         ${texi2html-no}"
> +echo "perl enabled              ${perl-no}"
>  echo "pod2man enabled           ${pod2man-no}"
>  echo "makeinfo enabled          ${makeinfo-no}"
>  test -n "$random_seed" &&
> diff --git a/doc/Makefile b/doc/Makefile
> index 723b05e..3fe6921 100644
> --- a/doc/Makefile
> +++ b/doc/Makefile
> @@ -12,9 +12,10 @@ HTMLPAGES   = $(PROGS-yes:%=doc/%.html)                                 \
>  TXTPAGES    = doc/fate.txt                                              \
>  
>  
> -DOCS-$(HAVE_TEXI2HTML)  += $(HTMLPAGES)
> -DOCS-$(HAVE_POD2MAN)    += $(MANPAGES) $(PODPAGES)
> -DOCS-$(HAVE_MAKEINFO)   += $(TXTPAGES)
> +DOCS-$(CONFIG_HTMLPAGES) += $(HTMLPAGES)
> +DOCS-$(CONFIG_PODPAGES)  += $(PODPAGES)
> +DOCS-$(CONFIG_MANPAGES)  += $(MANPAGES)
> +DOCS-$(CONFIG_TXTPAGES)  += $(TXTPAGES)
>  DOCS = $(DOCS-yes)
>  
>  all-$(CONFIG_DOC): documentation
> @@ -53,7 +54,7 @@ $(DOCS): | doc/
>  
>  install-man:
>  
> -ifdef HAVE_POD2MAN
> +ifdef CONFIG_MANPAGES

won't that be always defined?

[...]

The rest LGTM if tested, thanks.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120813/62d1aca9/attachment.asc>


More information about the ffmpeg-devel mailing list