From 6092793de4f40942ebab22cc146de2de2ecb275f Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Wed, 26 May 2010 11:47:22 -0600 Subject: [PATCH] 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 --- ChangeLog | 7 +++++++ top/maint.mk | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 29107170af..91f1cf153a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-05-26 Eric Blake + + 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 Update to GNU gettext 0.18, part 2. diff --git a/top/maint.mk b/top/maint.mk index 3bcab0c2d8..045537f8ac 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -27,7 +27,8 @@ build_aux ?= $(srcdir)/build-aux # 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 @@ syntax-check: $(local-check) # 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, -- 2.30.2