changeset 13376:c22f7afc2eec

maint.mk: avoid echo -e There are still other potentially non-portable uses of echo throughout this file, if $(ME) contains \ or starts with -, but this patch is a trivial step in the right direction. * top/maint.mk (gzip_rsyncable): Convert all uses of echo -* to printf. Reported by Matthias Bolte. Signed-off-by: Eric Blake <eblake@redhat.com>
author Eric Blake <eblake@redhat.com>
date Wed, 26 May 2010 11:47:22 -0600
parents 50baf3ea29fa
children d810a6f1c43c
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,10 @@
+2010-05-26  Eric Blake  <eblake@redhat.com>
+
+	maint.mk: avoid echo -e
+	* top/maint.mk (gzip_rsyncable): Convert all uses of echo -* to
+	printf.
+	Reported by Matthias Bolte.
+
 2010-05-25  Bruno Haible  <bruno@clisp.org>
 
 	Update to GNU gettext 0.18, part 2.
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -27,7 +27,8 @@
 # Do not save the original name or timestamp in the .tar.gz file.
 # Use --rsyncable if available.
 gzip_rsyncable := \
-  $(shell gzip --help 2>/dev/null|grep rsyncable >/dev/null && echo --rsyncable)
+  $(shell gzip --help 2>/dev/null|grep rsyncable >/dev/null \
+    && printf %s --rsyncable)
 GZIP_ENV = '--no-name --best $(gzip_rsyncable)'
 
 GIT = git
@@ -187,11 +188,11 @@
 
 # By default, _sc_search_regexp does not ignore case.
 export ignore_case =
-_ignore_case = $$(test -n "$$ignore_case" && echo -i || :)
+_ignore_case = $$(test -n "$$ignore_case" && printf %s -i || :)
 
 define _sc_say_and_exit
    dummy=; : so we do not need a semicolon before each use;		\
-   { echo -e "$(ME): $$msg" 1>&2; exit 1; };
+   { printf '%s\n' "$(ME): $$msg" 1>&2; exit 1; };
 endef
 
 # _sc_search_regexp used to be named _prohibit_regexp.  However,