diff --git a/Makefile.am b/Makefile.am index 7f0b2f1c11a88bf4e64cd885f80d74e70a860f79..bd3be18f6e2690f8bfb9c03439aac8b0796d2a2a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -22,6 +22,7 @@ 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_HEADER = $(top_srcdir)/autotools/check-header +CHECK_MAN_DASHES = $(top_srcdir)/autotools/check-man-dashes CHECK_MAN_WARNINGS = $(top_srcdir)/autotools/check-man-warnings CHECK_VERSION = $(top_srcdir)/autotools/check-version CHECK_NEWS = $(top_srcdir)/autotools/check-news @@ -590,6 +591,7 @@ EXTRA_DIST = \ autotools/check-header \ autotools/check-python-code \ autotools/check-imports \ + autotools/check-man-dashes \ autotools/check-man-warnings \ autotools/check-news \ autotools/check-tar \ @@ -923,6 +925,7 @@ man/%.7.in man/%.8.in man/%.1.in: man/%.gen man/footer.man $(PANDOC) -s -f rst -t man -A man/footer.man $< | \ sed -e 's/\\@/@/g' > $@; \ if test -n "$(MAN_HAS_WARNINGS)"; then $(CHECK_MAN_WARNINGS) $@; fi; \ + $(CHECK_MAN_DASHES) $@; \ trap - EXIT diff --git a/autotools/check-man-dashes b/autotools/check-man-dashes new file mode 100755 index 0000000000000000000000000000000000000000..3ddd3ba8674b965a26737a1b99dd142ebefffcfa --- /dev/null +++ b/autotools/check-man-dashes @@ -0,0 +1,24 @@ +#!/bin/bash +# + +# Copyright (C) 2012 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 + +! grep -F -q '\[em]' "$1" || \ + { echo "Unescaped dashes found in $1, use \\-- instead of --" 1>&2; exit 1; } diff --git a/autotools/check-man-warnings b/autotools/check-man-warnings index 11205fd3a02bbd4bda11e3fc499882be813903ac..8c8235e0a0b9392e2dd47294317d6b7ab1e0dfb6 100755 --- a/autotools/check-man-warnings +++ b/autotools/check-man-warnings @@ -24,6 +24,3 @@ set -e man --warnings --encoding=utf8 --local-file "$1" 2>&1 >/dev/null | \ grep -v -e "cannot adjust line" -e "can't break line" | \ grep . - -! grep -F -q '\[em]' "$1" || \ - { echo "Unescaped dashes found in $1, use \\-- instead of --" 1>&2; exit 1; }