并行子制造商
我一直在使用 makefile 来减少编译时间。我有 2 个问题
1)我发现如果我在主目录的子目录中运行 make,它会完美运行。这是否意味着该子目录独立于其他子目录并且可以并行运行?
2)如何并行递归调用子函数?告诉我除 -j 之外的其他信息
I have been working with makefiles to reduce their compilation time. I have 2 questions
1) I found that if i run make in a sub directory of the main directory, it runs perfectly. Does it mean the subdirectory is independent of the other sub-directories and can be run in parallel?
2) how to run sub-makes being called recursively in parallel? tell me something other than -j
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最近,我简化了一个 makefile,作为添加功能和加快速度的其他更改的先决条件。
简化包括删除使用或递归 make。我惊讶地发现构建速度现在提高了一倍(从 40 分钟缩短到 20 分钟)。我现在还可以使用 -j 选项,从而进一步提高速度。
然后我做了一些其他影响较小的改变。
Recently I simplified a makefile, as a prerequisite to other changes to add features and speed things up.
The simplification included removing use or recursive make. I was surprised to discover that the build was now twice as fast (from 40 minutes to 20 minutes). I could also now use the -j option, thus improving speed even more.
I then made some other changes that had a smaller effect.