[Top][All Lists]

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

Re: Makefile line number bug?

From: Jonny Grant
Subject: Re: Makefile line number bug?
Date: Fri, 13 Nov 2015 23:21:17 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 13/11/15 13:11, Paul Smith wrote:
On Thu, 2015-11-12 at 12:12 +0000, Jonny Grant wrote:
Is this a bug? line numbers are output as (2), but actually they are
different. Note that also the "Hello" is output in the wrong order.. I
presume this may be the OS rather than GNU Make.

$ make -f makefile.mak
makefile.mak:2: One
makefile.mak:2: Two
makefile.mak:2: Three

makefile.mak (not sure if the TABs have been lost)
         @echo Hello
         $(warning One)
         $(warning Two)
         $(warning Three)

The "mis-ordering" of output is as expected.  GNU make will always
expand the entire recipe (all lines) before it tries to invoke any shell
commands.  So, all the warning functions are expanded first, before the
echo command is invoked.

Probably the line number thing is an error: clearly it would be better
if the correct line number was preserved.

Hi Paul

Thank you for your reply.

Would it be useful for me to open a bug for this? on http://savannah.gnu.org/bugs/?group=make

Regards, Jonny

reply via email to

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