On Saturday 07 November 2009 08:37:30 Pavel Sanda wrote: > hi, > > if there is somebody who would like to contribute to lyx and like to tackle > with some python/bash scripting, consider fixing the bug > http://www.lyx.org/trac/ticket/6305 . > > pavel
Hi Pavel, The part where you remove .h includes from .cpp is dead bang easy if rather slow. Not so with the .h includes inside other .h files. For each #include removal from a .h file, you'd have to compile every .cpp that includes the including .h. 1.5.4 has 539 .h files and 463 .cpp files. That's roughly a quarter million combinations. Multiply that by each #include within each .h file. Ugh! Check this out: sl...@mydesk:~/junk/lyx-1.5.4$ find . | grep \.h$ | xargs grep \#include | wc 1694 3604 90852 sl...@mydesk:~/junk/lyx-1.5.4$ On the positive side, short circuit logic means that on non-extraneous includes, the error will probably appear before all .cpp files have been compiled. Also, I'm pretty sure that some #includes aren't necessary for compile, but WILL eliminate some warnings. So the test would need to fail if any output occurs on the gcc -Wall command. I'm wondering if there's a less compute intensive method than the brute force method of removing a #include from a .h, and then recompiling every .cpp file. SteveT Steve Litt Recession Relief Package http://www.recession-relief.US Twitter: http://www.twitter.com/stevelitt