3 ms·
you can use most C compilers to autogenerate the dependencies in make format (see http://hastebin.com/kufajaqeso.sh http://hastebin.com/kufajaqeso.sh for a samp
by niggler 14y ago
you can use most C compilers to autogenerate the dependencies in make format (see http://hastebin.com/kufajaqeso.sh http://hastebin.com/kufajaqeso.sh for a sample makefile and script to generate the relevant code -- there's a commented line in header10.h that you should remove to prove to yourself that it indeed does the right thing)
- Peaker 14y agoYour solution isn't a solution, because it is not actually a Makefile. Your shell script and Makefile both need to be run, in the correct order, by a meta build-system. It won't re-generate just the right files when things change. Unless you always regenerate all the code, and that's gonna be very wasteful. It won't parallelize things as possible. The code generation can be parallelized with parts of the build that don't depend on it. It won't rescan just the right files (it will do more work than necessary). Compare that with a real build system, such as tup or shake, that gets all of these properties right.