简体   繁体   English

是否可以从“配置”和自动工具生成的“ Makefile”中获取进度?

[英]Can progress be fetched from “configure” and autotools-generated “Makefile”?

I'm building tons of projects at once, and while they're being built, I'd like to do other stuff on the same machine, while being able to monitor the progress. 我正在一次构建大量项目,并且在构建项目时,我想在同一台机器上做其他事情,同时能够监视进度。

Is there a way to fetch current progress from configure script as generated by autoconf, and from Makefile generated by autotools? 有没有办法从autoconf生成的configure脚本和autotools生成的Makefile中获取当前进度?

The short answer is probably "no". 简短的答案可能是“否”。 But, it depends on what sort of monitoring you want. 但是,这取决于您想要哪种监视。 If you just want to be alerted when each step is finished, you can easily just run: 如果您只想在每个步骤完成时收到警告,则可以轻松运行:

$ configure && alert-me && make && alert-me

where alert-me is some script that sends you the alert. 其中alert-me是一些向您发送警报的脚本。 As a concrete example, if you are using gnu-screen, you could set up monitoring for a window, then run 举一个具体的例子,如果您使用的是gnu-screen,则可以为窗口设置监视,然后运行

$ configure > config.output && echo done

When configure is done, the echo will trigger an alert on all the other windows. 配置完成后,回声将在所有其他窗口上触发警报。

If you will be doing this multiple times with each package, you could record the number of lines of output from a run of configure, and get a percentage progress report of the current run by comparing the lines of output. 如果要对每个软件包多次执行此操作,则可以记录一次configure运行的输出行数,并通过比较输出行来获取当前运行的进度报告。 (That seems like a hassle.) (这似乎很麻烦。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM