[PATCH xts] doc: fix man page installation and distcheck

Peter Hutterer peter.hutterer at who-t.net
Thu Jul 26 21:23:49 PDT 2012


On Wed, Jul 25, 2012 at 11:29:02PM -0700, Aaron Plattner wrote:
> When asciidoc and xmlto are available, HAVE_DOCTOOLS.  This turns on code that
> defines miscmandir = $(MISC_MAN_DIR) and sets miscman_DATA =
> XTS.$(MISC_MAN_SUFFIX).  However, $(MISC_MAN_DIR) is never defined, presumably
> because the corresponding lines from xorg-macros.m4.

simple fix appears to be to use XORG_DEFAULT_OPTIONS (or, alternatively,
XORG_MANPAGE_SECTIONS)
> 
> In addition, the target file XTS.7 and intermediate file XTS.txt are not cleaned
> up during distclean because XTS.7 is not listed in any clean target.  This
> causes distcheck failures.  Fix this by moving all of the man page intermediate
> files to CLEANFILES.
> 
> Finally, use $^ and $@ rather than $(srcdir)/README and XTS.txt in the rule to
> copy the README to XTS.txt.
> 
> Signed-off-by: Aaron Plattner <aplattner at nvidia.com>
> ---
>  Makefile.am  |    4 ++--
>  configure.ac |    4 ++++
>  2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/Makefile.am b/Makefile.am
> index 87040d2..9083bb6 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -32,7 +32,7 @@ miscman_DATA = $(xtsman_pre:.man=.$(MISC_MAN_SUFFIX))
>  SUFFIXES = .man .$(MISC_MAN_SUFFIX) .txt .xml
>  
>  XTS.txt: README
> -	cp $(srcdir)/README XTS.txt
> +	cp $^ $@

Acked-by: Peter Hutterer <peter.hutterer at who-t.net> for this hunk

>  
>  .man.$(MISC_MAN_SUFFIX):
>  	sed -e 's|miscmansuffix|$(MISC_MAN_SUFFIX)|' < $< > $@
> @@ -42,6 +42,6 @@ XTS.txt: README
>  	$(XMLTO) man $<
>  	mv -f $(@:.man=.miscmansuffix) $@
>  
> -MAINTAINERCLEANFILES = *.xml $(xtsman_pre) $(xtsman_txt)
> +CLEANFILES = $(miscman_DATA) $(xtsman_xml) $(xtsman_pre) $(xtsman_txt)

Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net> for this hunk :)

>  endif
>  
> diff --git a/configure.ac b/configure.ac
> index 07abff3..0601758 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -141,6 +141,10 @@ else
>          esac
>      fi
>      AC_SUBST(MISC_MAN_SUFFIX)
> +    if test x$MISC_MAN_DIR = x    ; then
> +        MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
> +    fi
> +    AC_SUBST(MISC_MAN_DIR)

how about this patch here, it passes make distcheck. too lazy to look up
with xorg-macros version we really need here, so I just used the latest
 
>From 878d66806b2b0383813467e7e3860c8361484ad0 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer at who-t.net>
Date: Fri, 27 Jul 2012 14:20:25 +1000
Subject: [PATCH] Use xorg-macros to drag in man page build dependencies

And make sure to remove generated man page files during make clean.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 Makefile.am  |    2 +-
 configure.ac |   27 +++++++++------------------
 2 files changed, 10 insertions(+), 19 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 87040d2..59f9951 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -42,6 +42,6 @@ XTS.txt: README
 	$(XMLTO) man $<
 	mv -f $(@:.man=.miscmansuffix) $@
 
-MAINTAINERCLEANFILES = *.xml $(xtsman_pre) $(xtsman_txt)
+CLEANFILES = *.xml $(xtsman_pre) $(xtsman_txt) $(miscman_DATA)
 endif
 
diff --git a/configure.ac b/configure.ac
index 07abff3..777d652 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,6 +30,12 @@ AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_AUX_DIR(.)
 AM_INIT_AUTOMAKE([dist-bzip2 foreign])
 
+# Initialize X.Org macros
+m4_ifndef([XORG_MACROS_VERSION],
+          [m4_fatal([must install xorg-macros 1.17 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.17)
+XORG_DEFAULT_OPTIONS
+
 AM_MAINTAINER_MODE
 
 AM_CONFIG_HEADER([config.h])
@@ -121,26 +127,11 @@ if test "x$PERL" = x || test "x$XSET" = x || test "x$XDPYINFO" = x; then
     AC_MSG_ERROR([perl, xset and xdpyinfo are required to run xts-config])
 fi
 
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
-    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
-
-# Generate man page if asciidoc and xmlto are available.
-AC_ARG_VAR([XMLTO], [Path to xmlto command])
-AC_PATH_PROG([XMLTO], [xmlto])
-AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
-AC_PATH_PROG([ASCIIDOC], [asciidoc])
-
-AM_CONDITIONAL([HAVE_DOCTOOLS], [test "x$XMLTO" != "x" && test "x$ASCIIDOC" != "x"])
+XORG_WITH_ASCIIDOC
+XORG_WITH_XMLTO
+AM_CONDITIONAL(HAVE_DOCTOOLS, [test "x$XMLTO" != "x" && test "x$ASCIIDOC" != "x"])
 if test "x$XMLTO" = "x" || test "x$ASCIIDOC" = "x"; then
     AC_MSG_WARN([xmlto or asciidoc not found - cannot create man pages without it])
-else
-    if test x$MISC_MAN_SUFFIX = x    ; then
-        case $host_os in
-            solaris*)       MISC_MAN_SUFFIX=5  ;;
-            *)              MISC_MAN_SUFFIX=7  ;;
-        esac
-    fi
-    AC_SUBST(MISC_MAN_SUFFIX)
 fi
 
 AC_CONFIG_FILES([
-- 
1.7.10.4



More information about the xorg-devel mailing list