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

Aaron Plattner aplattner at nvidia.com
Wed Jul 25 23:34:18 PDT 2012


On 07/25/2012 11:29 PM, Aaron Plattner wrote:
> When asciidoc and xmlto are available, HAVE_DOCTOOLS.  This turns on code that

Whoops, sent this too soon.  This sentence no verb.  This should read, 
"HAVE_DOCTOOLS is enabled"

> 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.

corresponding lines from xorg-macros.m4 *were not copied*.

I'm not sure how this man page stuff ever worked.  Did it actually 
install the generated man page on your system?  On mine, the 
install-miscmanDATA target does this:

test -z "" || /bin/mkdir -p ""

With this change, it does this instead:

test -z "/tmp/xts5/share/man/man7" || /bin/mkdir -p 
"/tmp/xts5/share/man/man7"
  /usr/bin/install -c -m 644 XTS.7 '/tmp/xts5/share/man/man7'

-- Aaron

> 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 $^ $@
>
>   .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)
>   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)
>   fi
>
>   AC_CONFIG_FILES([
>



More information about the xorg-test mailing list