3 ms·
When would you make over a bash script?
by Siecje 13y ago
When would you make over a bash script?
- michael_h 13y agoWell, for starters: make does dependency resolution. If you change a single file and recompile, it will figure out what needs to be rebuilt instead of rebuilding everything. It will also figure out what can be built in parallel if you give it the -j option. It also has implicit build rules so you don't have to write a line in a bash script for every single file. EDIT: To answer your question more directly: when you have a large project, or a project that needs to build on many platforms. Probably a whole load of other situations as well, but those are the two that stick out.
- pavanky 13y agoMake makes it possible to compile only the files you have changed in your code base to produce the library / output you want. bash scripts usually end up compiling the entire codebase even if there is only one file that has changed. TL;DR faster turn around times using make.