3 ms·
I've done it. I have a large project that involves generating .cc and .h files from other files. I wrote a custom script in Javascript (for node.js) that drives
by tlb 7y ago
I've done it. I have a large project that involves generating .cc and .h files from other files. I wrote a custom script in Javascript (for node.js) that drives the build process, and it handles all the dependencies and parallel builds.
One tricky part was getting the header dependencies right. I run the compiler with -MD and it outputs a .d file listing dependencies, which my script parses.
I wish there were a simple library to build this kind of stuff on top of. Often you need a real programming language (which Make is not) and parallel dependency tracking (which is tricky to get 100% correct when you write it from scratch each time.)