help-make
[Top][All Lists]
Advanced

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

Re: flushing output in make


From: ma
Subject: Re: flushing output in make
Date: Mon, 17 Jul 2006 20:02:00 +0100

"Philip Guenther" <address@hidden> wrote in message 
news:address@hidden
> On 7/17/06, ma <address@hidden> wrote:
>>     I have a make file that is similar to this one:
>>
>> foo:
>>     @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
>     constructs
> 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

Hello Philip,
   Thanks for your information. here is the code that I have:
rtlib.lib: $(rtLibModules)
    @echo Building $@ please wait
    $(foreach n, $(rtLibModules), $(shell $(AR) -qur $@ $(n)))

This is the only way that I could manage to run the make without problem. 
Look at my other post on command line limitation.
As I am working on an add on project and the original product shipped with 
gmake version 3.8, I can't update to gmake 3.81

Best regards







reply via email to

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