开发者

PARALLEL submakes

开发者 https://www.devze.com 2023-02-10 00:15 出处:网络
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 sub

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 ca开发者_如何学Clled recursively in parallel? tell me something other than -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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号