unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] makefile: Tell echo to interpret escape sequences.
@ 2009-11-22 12:44 Jan Janak
  2009-11-23  2:41 ` Carl Worth
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Janak @ 2009-11-22 12:44 UTC (permalink / raw)
  To: notmuch

The initial message that informs the user about the possibility to use
make V=1 contains a \n at the end, but echo wouldn't interpret that
properly without the -e command line option.
---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index ae8bff1..3553ff4 100644
--- a/Makefile
+++ b/Makefile
@@ -41,7 +41,7 @@ include Makefile.config
 # user how to enable verbose compiles.
 ifeq ($(V),)
 quiet_DOC := "Use \"$(MAKE) V=1\" to see the verbose compile lines.\n"
-quiet = @echo $(quiet_DOC)$(eval quiet_DOC:=)"  $1	$@"; $($1)
+quiet = @echo -e $(quiet_DOC)$(eval quiet_DOC:=)"  $1	$@"; $($1)
 endif
 # The user has explicitly enabled quiet compilation.
 ifeq ($(V),0)
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] makefile: Tell echo to interpret escape sequences.
  2009-11-22 12:44 [PATCH] makefile: Tell echo to interpret escape sequences Jan Janak
@ 2009-11-23  2:41 ` Carl Worth
  2009-11-23  3:02   ` Jan Janak
  2009-11-23  7:05   ` Karl Wiberg
  0 siblings, 2 replies; 4+ messages in thread
From: Carl Worth @ 2009-11-23  2:41 UTC (permalink / raw)
  To: Jan Janak, notmuch

On Sun, 22 Nov 2009 13:44:37 +0100, Jan Janak <jan@ryngle.com> wrote:
> The initial message that informs the user about the possibility to use
> make V=1 contains a \n at the end, but echo wouldn't interpret that
> properly without the -e command line option.

Patch doesn't work for me.

Before patch:

	0:~/src/notmuch:(master)$ make
	Use "make V=1" to see the verbose compile lines.
	  CC	notmuch-new.o
	  CXX	notmuch

After patch:

	0:~/src/notmuch:(master)$ make 
	-e Use "make V=1" to see the verbose compile lines.
	  CC	debugger.o
	-e   CC	gmime-filter-reply.o
	-e   CC	notmuch.o

It's a shame that simple things like "echo" aren't easy to use portably.
(And yes, I know that autoconf has a bunch of tests for echo, such as
how to get the behavior of "echo -n", etc.)

-Carl

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] makefile: Tell echo to interpret escape sequences.
  2009-11-23  2:41 ` Carl Worth
@ 2009-11-23  3:02   ` Jan Janak
  2009-11-23  7:05   ` Karl Wiberg
  1 sibling, 0 replies; 4+ messages in thread
From: Jan Janak @ 2009-11-23  3:02 UTC (permalink / raw)
  To: Carl Worth; +Cc: notmuch

On Mon, Nov 23, 2009 at 3:41 AM, Carl Worth <cworth@cworth.org> wrote:
> On Sun, 22 Nov 2009 13:44:37 +0100, Jan Janak <jan@ryngle.com> wrote:
>> The initial message that informs the user about the possibility to use
>> make V=1 contains a \n at the end, but echo wouldn't interpret that
>> properly without the -e command line option.
>
> Patch doesn't work for me.
>
> Before patch:
>
>        0:~/src/notmuch:(master)$ make
>        Use "make V=1" to see the verbose compile lines.
>          CC    notmuch-new.o
>          CXX   notmuch
>
> After patch:
>
>        0:~/src/notmuch:(master)$ make
>        -e Use "make V=1" to see the verbose compile lines.
>          CC    debugger.o
>        -e   CC gmime-filter-reply.o
>        -e   CC notmuch.o
>
> It's a shame that simple things like "echo" aren't easy to use portably.
> (And yes, I know that autoconf has a bunch of tests for echo, such as
> how to get the behavior of "echo -n", etc.)

It seems your echo interprets escape sequences by default. When I run
make, the first line of output looks like this:

Use "make V=1" to see the verbose compile lines.\n  CC	debugger.o
  CC	gmime-filter-reply.o
  CC	notmuch.o

This is on Debian Lenny. Anyway, this one is not important either.

  -- Jan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] makefile: Tell echo to interpret escape sequences.
  2009-11-23  2:41 ` Carl Worth
  2009-11-23  3:02   ` Jan Janak
@ 2009-11-23  7:05   ` Karl Wiberg
  1 sibling, 0 replies; 4+ messages in thread
From: Karl Wiberg @ 2009-11-23  7:05 UTC (permalink / raw)
  To: Carl Worth; +Cc: notmuch

On Mon, Nov 23, 2009 at 3:41 AM, Carl Worth <cworth@cworth.org> wrote:

> It's a shame that simple things like "echo" aren't easy to use portably.
> (And yes, I know that autoconf has a bunch of tests for echo, such as
> how to get the behavior of "echo -n", etc.)

I think the standard workaround is to use "printf" instead.

-- 
Karl Wiberg, kha@treskal.com
   subrabbit.wordpress.com
   www.treskal.com/kalle

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-11-23  7:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-22 12:44 [PATCH] makefile: Tell echo to interpret escape sequences Jan Janak
2009-11-23  2:41 ` Carl Worth
2009-11-23  3:02   ` Jan Janak
2009-11-23  7:05   ` Karl Wiberg

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).