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.
精彩评论