3 ms·
I don't understand, with gcc -MM (to generate .d files), -include to include them, and VPATH for source file discovery, a typical small project makefile is abou
by buserror 3y ago
I don't understand, with gcc -MM (to generate .d files), -include to include them, and VPATH for source file discovery, a typical small project makefile is about 1/2 page and requires very little maintenance.
More complicated project? Might shoot out to 2 pages. It'll still work in 20 years time too, the tools won't change under you (I'm looking at you, pretty much all other build systems)
- quelsolaar 3y agoHere is the fundamental problem it solves for me: my code in 99% pure C code without dependencies. Then i have a few wrappers for platform specific stuff. I have many many projects that use the same wrappers. Make files store both what files are used and what dependencies there are, but that creates a lot of duplication. Its better if the wrappers themselves can say what dependencies they have. Then thats stored in one place, and a change affects all projects. Then we have the issue of what files are needed. That information already exists in the .c files, so again why duplicate it? Its better to parse it out.
- ReleaseCandidat 3y agoYes, even MS' cl has `/sourceDependencies` and `/scanDependencies` by now, which generate JSON files with the needed information.