[PATCH libXcomposite 2/2] man: skip man pages installation when xmlto is not present
Dan Nicholson
dbn.lists at gmail.com
Thu Jan 21 09:26:21 PST 2010
On Thu, Jan 21, 2010 at 7:33 AM, Gaetan Nadon <memsize at videotron.ca> wrote:
> When doing a regular git build with xmlto missing, 'make all'
> and 'make install' fails as it is trying to install man pages
> that were not built.
>
> The patch uses the same techinique used in libXtst and libXi.
> However, this introduces a new problem whereby man pages
> are not created or installed when Xcomposite.man is present
> (which is shipped in a tarball).
>
> Both libraries work the same way now. The make dist will fail
> when xmlto is missing unless Xcomposite.man is present. This is
> what we want, not being able to create a crippled tarball.
>
> Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
> ---
> man/Makefile.am | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/man/Makefile.am b/man/Makefile.am
> index 13a75c5..2438efa 100644
> --- a/man/Makefile.am
> +++ b/man/Makefile.am
> @@ -21,8 +21,10 @@ Xcomposite_man_aliases = \
>
> Xcomposite_shadowmen = $(Xcomposite_man_aliases:=. at LIB_MAN_SUFFIX@)
>
> +if HAVE_XMLTO
> libman_DATA = $(libman_PRE:man=@LIB_MAN_SUFFIX@) \
> $(Xcomposite_shadowmen)
> +endif
>
> EXTRA_DIST = $(libman_PRE) $(libman_xml)
>
This is not the right approach. The entire purpose of distributing the
generated pages is so that people installing from a tarball can get
the man pages without needing xml doc tools. What needs to happen is
another AM_CONDITIONAL that checks for either xmlto or existence of
processed man pages. Something like this:
configure.ac:
AM_CONDITIONAL([INSTALL_XML_DOCS], [test -f
"$srcdir/man/Xcomposite.man" || test "x$have_xmlto" = xyes])
man/Makefile.am:
if INSTALL_XML_DOCS
libman_DATA = ...
endif
That way we cover all three important cases:
1. Developer with a git checkout who does not have doc tools and
doesn't want to build docs.
2. Developer with a git checkout who does have the doc tools and wants
to build docs (e.g., for make dist)
3. User installing from tarball who does not have doc tools but wants
to install the pregenerated docs.
The only use case not catered for is the user installing from tarball
who has doc tools and wants to rebuild the docs themselves. I'll argue
that this case is not important and they can figure out how to get
make to rebuild the pages themselves.
--
Dan
More information about the xorg-devel
mailing list