[Top][All Lists]

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

Re: flushing output in make

From: Philip Guenther
Subject: Re: flushing output in make
Date: Mon, 17 Jul 2006 11:41:04 -0600

On 7/17/06, ma <address@hidden> wrote:
    I have a make file that is similar to this one:

    @echo please wait...
    $(foreach ..... )  # a lengthy work

It is working but I the output of echo appears only after foreach
finished! But I need it to appear before foreach started. What can I do?

Make expands all of its variables and functions in the commands for a
target before executing any of them; it isn't done on a line-by-line
basis.  So, you have two choices:

1) do the "lengthy work" using shell constructs instead of make
2) do the echo using make's $(info) function which was added in 3.81

Since you don't actually show the real commands, it's impossible for
us to say which choice will be more maintainable.  Choice (2) will
certainly be faster to implement...if you can upgrade to 3.81.

Philip Guenther

reply via email to

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