changeset 13058:837c718e0708

top/maint.mk (sc_texinfo_acronym): Don't infloop if there is no *.texi files. Reported by Eric Blake <eblake@redhat.com>.
author Simon Josefsson <simon@josefsson.org>
date Fri, 26 Mar 2010 09:14:34 +0100
parents 3c38f226939d
children 64b57ae70f5e
files ChangeLog top/maint.mk
diffstat 2 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-03-26  Simon Josefsson  <simon@josefsson.org>
+
+	* top/maint.mk (sc_texinfo_acronym): Don't infloop if there is
+	no *.texi files.  Reported by Eric Blake <eblake@redhat.com>.
+
 2010-03-25  Eric Blake  <eblake@redhat.com>
 
 	maint: use pragma consistently across replacement headers
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -563,10 +563,13 @@
 
 # Don't use Texinfo @acronym{} as it is not a good idea.
 sc_texinfo_acronym:
-	@grep -nE '@acronym{'						\
-	    $$($(VC_LIST_EXCEPT) | grep -E '\.texi$$') &&		\
+	@if $(VC_LIST_EXCEPT) | grep -lE '\.texi$$' >/dev/null; then	\
+		grep -nE '@acronym{'					\
+			$$($(VC_LIST_EXCEPT) | grep -E '\.texi$$') &&	\
 	  { echo '$(ME): found use of Texinfo @acronym{}' 1>&2;		\
-	    exit 1; } || :
+	    exit 1; } || :;						\
+	else :;								\
+	fi
 
 cvs_keywords = \
   Author|Date|Header|Id|Name|Locker|Log|RCSfile|Revision|Source|State