help-make
[Top][All Lists]
Advanced

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

Re: multi-line message to $(error )


From: David
Subject: Re: multi-line message to $(error )
Date: Wed, 16 Dec 2020 20:22:35 +1100

On Wed, 16 Dec 2020 at 17:00, Masahiro Yamada <masahiroy@kernel.org> wrote:

> Is there a good idea to make
> $(error ) display a multi-line message?

A variable can be defined to contain a newline.

[david@kablamm]$ cat Makefile

define newline


endef


n:=$(newline)
m1:=This message
m2:=has several lines

$(error $(n)$(m1)$(n)$(m2))
[david@kablamm]$ make
Makefile:12: ***
This message
has several lines.  Stop.
[david@kablamm]$



reply via email to

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