We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 9 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
您可以很好地与自动工具同时构建东西。您只需要避免对要并行构建的内容进行递归 make 即可。基本思想是有一个
Makefile.am
像:和
here1/Makefile-files
像:然后子目录中的东西
sub1/
和sub2/
将与当前目录及其之前的目录分开构建(即使各个构建可能会使用相同的技巧并行执行某些操作!),然后当前目录将开始在当前目录的Makefile.am
和here[12]/Makefile-files
并行。例如
libgphoto2
使用该机制 在构建了一些先决条件后,并行构建 50 多个相机驱动程序。这显着加快了总构建时间。好的,configure 脚本本身不会因此而加速,但至少这仍然会进行交叉编译(与某些替代构建系统不同)。 (您将可移植列为您的要求之一,这通常意味着交叉编译。)
You can very well build stuff concurrently with autotools. You just need to avoid doing recursive make for the stuff you want to build in parallel. The basic idea is to have a
Makefile.am
like:and
here1/Makefile-files
like:Then the stuff in the subdirectories
sub1/
andsub2/
will be built separately from the current directory and before it (even though the respective builds might do stuff in parallel with the same trick!), and then the current directory will start building the stuff in the current dir'sMakefile.am
andhere[12]/Makefile-files
in parallel.E.g.
libgphoto2
use that mechanism to build 50+ camera drivers in parallel after a few prerequesites have been built. This significantly speeds up the total build time.OK, the
configure
script itself will not be sped up by this, but at least this will still do cross-compiling (unlike some of the alternative build systems). (You are listing portable as one of your requirements, and that often implies cross-compilation.)还可以考虑将 CMAKE 用于高度模块化的项目。
Consider also using CMAKE for highly modular projects.