dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] build: Add --disable-manpages configure option
@ 2013-01-10  0:46 Colin Walters
  2013-01-16 18:34 ` David Herrmann
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Walters @ 2013-01-10  0:46 UTC (permalink / raw)
  To: dri-devel

[-- Attachment #1: Type: text/plain, Size: 431 bytes --]

It's not enough to check for xsltproc - the system may not have the
docbook stylesheets installed.  This patch also allows builders to
override the generation/installation of manpages entirely; for
example, manpages are of no use for embedded systems, so it's better
to not even waste the power building them.
---
 configure.ac    |   10 ++++++++--
 man/Makefile.am |    4 ++--
 2 files changed, 10 insertions(+), 4 deletions(-)



[-- Attachment #2: 0001-build-Add-disable-manpages-configure-option.patch --]
[-- Type: text/x-patch, Size: 2070 bytes --]

>From eb0f352dc35e5b4a75abd27f1877b37bd1d536c6 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Wed, 9 Jan 2013 19:35:05 -0500
Subject: [PATCH] build: Add --disable-manpages configure option

It's not enough to check for xsltproc - the system may not have the
docbook stylesheets installed.  This patch also allows builders to
override the generation/installation of manpages entirely; for
example, manpages are of no use for embedded systems, so it's better
to not even waste the power building them.

This is equivalent to the code in systemd and kmod's configure.ac.
---
 configure.ac    |   10 ++++++++--
 man/Makefile.am |    4 ++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0e6db86..273b9b8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -226,8 +226,14 @@ if test "x$HAVE_LIBUDEV" = xyes; then
 fi
 AM_CONDITIONAL(HAVE_LIBUDEV, [test "x$HAVE_LIBUDEV" = xyes])
 
-AC_PATH_PROG(XSLTPROC, xsltproc)
-AM_CONDITIONAL([HAVE_XSLTPROC], [test "x$XSLTPROC" != "x"])
+AC_ARG_ENABLE([manpages],
+        AS_HELP_STRING([--disable-manpages], [disable manpages @<:@default=enabled@:>@]),
+	[], enable_manpages=yes)
+AM_CONDITIONAL([BUILD_MANPAGES], [test "x$enable_manpages" = "xyes"])
+AC_PATH_PROG([XSLTPROC], [xsltproc], [no])
+AS_IF([test "x$XSLTPROC" = "xno" && test "x$enable_manpages" = "xyes"], [
+	AC_MSG_ERROR([xsltproc command not found, try ./configure --disable-manpages])
+])
 
 if test "x$INTEL" != "xno" -o "x$RADEON" != "xno" -o "x$NOUVEAU" != "xno" -o "x$OMAP" != "xno"; then
     # Check for atomic intrinsics
diff --git a/man/Makefile.am b/man/Makefile.am
index 32acd07..42c3616 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -22,7 +22,7 @@ CLEANFILES =
 EXTRA_DIST =
 man_MANS =
 
-if HAVE_XSLTPROC
+if BUILD_MANPAGES
 
 CLEANFILES += $(MANPAGES) $(MANPAGES_ALIASES)
 EXTRA_DIST += $(MANPAGES) $(MANPAGES_ALIASES) $(XML_FILES)
@@ -51,4 +51,4 @@ XSLTPROC_PROCESS_MAN = \
 %.7: %.xml
 	$(XSLTPROC_PROCESS_MAN)
 
-endif # HAVE_XSLTPROC
+endif # BUILD_MANPAGES
-- 
1.7.1


[-- Attachment #3: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] build: Add --disable-manpages configure option
  2013-01-10  0:46 [PATCH] build: Add --disable-manpages configure option Colin Walters
@ 2013-01-16 18:34 ` David Herrmann
  0 siblings, 0 replies; 2+ messages in thread
From: David Herrmann @ 2013-01-16 18:34 UTC (permalink / raw)
  To: Colin Walters; +Cc: dri-devel

Hi Colin

On Thu, Jan 10, 2013 at 1:46 AM, Colin Walters <walters@verbum.org> wrote:
> It's not enough to check for xsltproc - the system may not have the
> docbook stylesheets installed.  This patch also allows builders to
> override the generation/installation of manpages entirely; for
> example, manpages are of no use for embedded systems, so it's better
> to not even waste the power building them.
> ---
>  configure.ac    |   10 ++++++++--
>  man/Makefile.am |    4 ++--
>  2 files changed, 10 insertions(+), 4 deletions(-)

Sorry for the delay. I picked this up and integrated it into a rewrite
of the man-pages build-instructions. Just sent it today "man: fix
manpage build instructions"

Thanks
David

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

end of thread, other threads:[~2013-01-16 18:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-10  0:46 [PATCH] build: Add --disable-manpages configure option Colin Walters
2013-01-16 18:34 ` David Herrmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).