help-make
[Top][All Lists]
Advanced

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

Re: Measure time spent in each target of a Makefile


From: David Boyce
Subject: Re: Measure time spent in each target of a Makefile
Date: Mon, 8 Aug 2011 15:56:18 -0400

On Mon, Aug 8, 2011 at 12:29 PM, Matthias Puech <address@hidden> wrote:
> Dear Greg,
>
> Thank you for your quick reply. I am sorry, my question was not clear
> enough. I am aware of the SHELL trick but it doesn't quite fit my needs. I
> need to be able to know the time taken by each *target*, not just the
> commands launched. For example if I have:

I'm not aware of any such feature natively available in make. You
could look and see if "remake" (an instrumented make variant) can do
this. The alternative is the SHELL hack and some of your own
scripting. If you haven't looked at
<http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make>,
do. Seems to me it might be possible to prefix the timings with the
target name using that technique and then collect and sum them up with
a script.

-David Boyce



reply via email to

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