将我的构建的持续时间添加到Makefile中 [英] Adding time duration of my build into Makefile
问题描述
构建完成后,我想将Makefile构建的构建持续时间添加到打印输出中.
构建持续时间:1:23.45
我没有找到任何有关此操作的信息,但它必须是可行的..现在我打印以$(TIME)完成的时间,但我想打印多长时间构建完成.我正在使用clearmake.
time
二进制文件提供了此功能.您需要专门执行它来绕过外壳程序内置的任何时间命令(如bash中一样):
/usr/bin/time --format="Build Duration: %E" make
I would like to add the build time duration of my Makefile build to the printout when the build is done.. something like this:
Build Duration: 1:23.45
I haven't been able to find anything about doing this but it has to be do-able.. Right now i print the time in which is completes with $(TIME), but i'd like to print how long the build took to complete. I am using clearmake.
The time
binary supplies this functionality. You need to specifically execute it to bypass any time command built into your shell (as in bash):
/usr/bin/time --format="Build Duration: %E" make
这篇关于将我的构建的持续时间添加到Makefile中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!