help-make
[Top][All Lists]
Advanced

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

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


From: Pete Johnson
Subject: A function to print instead of $(warning ) or $(error )
Date: Tue, 22 Feb 2005 20:22:22 -0800

In trying to add some help messages to my Makefiles I have come across the following problem. I would like a function just like $(warning ), except I don't want it to prefix the message with <makefile>:<line>:

For example, if I have a Makefile like this...

define foo
a multi
line
string
endef

$(warning $(foo))

nothing:


and I run make, I get the following...

% make
Makefile:6: a multi
line
string
make: Nothing to be done for `nothing'.

I would like to just see...

% make
a multi
line
string
make: Nothing to be done for `nothing'.

I have tried using something like $(shell echo $(foo) 1>&2) but this will not work with multi-line strings (although it works fine for one line strings).

Does anyone know how to do this? I am surprised that this is not a built-in function.

Thanks,

-Pete





reply via email to

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