help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A function to print instead of $(warning ) or $(error )


From: Pete Johnson
Subject: Re: A function to print instead of $(warning ) or $(error )
Date: Fri, 25 Feb 2005 17:08:15 -0800

I finally settled on this solution to printing a message. The drawbacks are that it spawns a process for each call, and the output goes to stderr. It does however handle tabs quotes multiple newlines without problems. There are some quoting issues (mostly with \) but users just typing in most text will not get surprised.

define newline


endif

output-message = $(shell printf "$(subst $(newline),\n,$(subst ",\",$1))\n" 1>&2)

Thanks for all your help.

-Pete


On Feb 24, 2005, at 10:33 AM, Boris Kolpackov wrote:

And after more experimenting, I don't see how to quote tabs because I
can't get them into a variable or literal, and multiple newlines get
collapsed into a single newline. It just kind of snowballs out of
control.

Tell us a little bit about the context. Maybe there is another way.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]