[PATCH libXcomposite 2/2] man: skip man pages installation when xmlto is not present
memsize at videotron.ca
Thu Jan 21 07:33:37 PST 2010
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
@@ -21,8 +21,10 @@ Xcomposite_man_aliases = \
Xcomposite_shadowmen = $(Xcomposite_man_aliases:=. at LIB_MAN_SUFFIX@)
libman_DATA = $(libman_PRE:man=@LIB_MAN_SUFFIX@) \
EXTRA_DIST = $(libman_PRE) $(libman_xml)
Initial post for review
Some platforms don't have xmlto, so they turn it off with --without-xmlto.
When building from git, without xmlto:
# it's not possible to create Xcomposite.man
# it's not possible to create Xcomposite.3
# 'make install' must not fail as libraries must be installed in lib
# 'make dist' must fail as Xcomposite.man would be missing in the newly created tarball
When building from tarball, without xmlto, but with Xcomposite.man:
# it's not possible to create Xcomposite.man, but it's already there (MAINTAINERCLEAN)
# 'make install' is sucessful but no man pages are created or installed (that's the trade-off)
# 'make dist' is successful, as Xcomposite.man is available
The complexity comes from the fact that Xcomposite.man is a generated intermediate source included in the tarball.
The platform may or may not have xmlto and it may or may not have Xcomposite.man (git or tarball)
When this platform is used to create tarballs, it must be allowed to create a tarball without Xcomposite.man.
The trade-off can be eliminated but it will increase the complexity of the makefile and introducing a new problem.
More information about the xorg-devel