I have a medium sized project and have been working to lessen total compilation time. The biggest outstanding problem is some auto- generated code. We have a program that I'll call 'generate,' which takes a proprietary internal format and generates C++ code (you can imagine lex or yacc if that helps). We have a rule along the lines:
out.h out.cc: in.our_format generate generate --input in.our_format --output out In turn out.h is #included in a lot of downstream files, so whenever this rule runs, it causes many, many .cc files to recompile, and takes about 5-10 minutes. We're doing some refactoring and maintenance on 'generate.' If we make any change (even changing a comment), recompiling takes the full time. One possibility is to eliminate the dependance on generate, but then if we make a real change, either on purpose or by accident, we won't find it. What I'd like to do is something like this: out.h out.cc: in.our_format generate generate -i in.our_format -o tmp if (tmp.h != out.h OR tmp.cc != out.cc) { cp tmp.h out.h cp tmp.cc out.cc } The idea would be that whenever generate is run, 2 diffs are run (one on .h and one on .cc), and only if they've changed does it do the full recompile. Of course, this doesn't work as written. Has anyone done anything like this, and if so how? Michael _______________________________________________ help-gnu-utils mailing list help-gnu-utils@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-utils