Commit a4f12da4 authored by Michael Hanselmann's avatar Michael Hanselmann

Check built manpages for errors

One fix is necessary in gnt-cluster.sgml. Also adding “DELETE_ON_ERROR”
target to remove output file if an error occurred while building it (in
this case the manpage).

This was reported by Iustin Pop in issue 87 and proposed check method
taken from Lintian.
http://code.google.com/p/ganeti/issues/detail?id=87Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 7ea7bcf6
......@@ -14,6 +14,7 @@ DOCBOOK_WRAPPER = $(top_srcdir)/autotools/docbook-wrapper
BUILD_BASH_COMPLETION = $(top_srcdir)/autotools/build-bash-completion
RUN_IN_TEMPDIR = $(top_srcdir)/autotools/run-in-tempdir
CHECK_PYTHON_CODE = $(top_srcdir)/autotools/check-python-code
CHECK_MAN = $(top_srcdir)/autotools/check-man
REPLACE_VARS_SED = autotools/replace_vars.sed
hypervisordir = $(pkgpythondir)/hypervisor
......@@ -23,6 +24,9 @@ rapidir = $(pkgpythondir)/rapi
toolsdir = $(pkglibdir)/tools
docdir = $(datadir)/doc/$(PACKAGE)
# Delete output file if an error occurred while building it
.DELETE_ON_ERROR:
DIRS = \
autotools \
daemons \
......@@ -239,6 +243,7 @@ EXTRA_DIST = \
pylintrc \
autotools/build-bash-completion \
autotools/check-python-code \
autotools/check-man \
autotools/docbook-wrapper \
$(RUN_IN_TEMPDIR) \
daemons/daemon-util.in \
......@@ -399,9 +404,11 @@ man/%.html.in: man/%.sgml man/footer.sgml $(DOCBOOK_WRAPPER)
man/%.7: man/%.7.in $(REPLACE_VARS_SED)
sed -f $(REPLACE_VARS_SED) < $< > $@
$(CHECK_MAN) $@
man/%.8: man/%.8.in $(REPLACE_VARS_SED)
sed -f $(REPLACE_VARS_SED) < $< > $@
$(CHECK_MAN) $@
man/%.html: man/%.html.in $(REPLACE_VARS_SED)
sed -f $(REPLACE_VARS_SED) < $< > $@
......
#!/bin/bash
#
# Copyright (C) 2010 Google Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
set -e
! LC_ALL=C MANWIDTH=80 \
man --warnings --encoding=utf8 --local-file "$1" 2>&1 >/dev/null | grep .
......@@ -723,8 +723,8 @@
<para>
Note that only active disks can be checked by this command; in
case a disk cannot be activated it's advised to use
<command>gnt-instance activate-disks --ignore-size
...</command> to force activation without regard to the
<command>gnt-instance activate-disks --ignore-size ...</command> to
force activation without regard to the
current size.
</para>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment