Lars Gullik Bjønnes wrote: > Or in compile and link time?
Ouch! > What we could do is to make these scripts (in particular if some of > them does not need human intervention to be correct) is to make a > "test" target that tests the source tree: > > - make sure that all .C files includes config.h Trivial: $ find . -name "*.C" | while read file; do grep '^ *# *include *<config\.h>' $file > /dev/null && continue; echo $file 'does not #include <config.h>!'; done ./graph.C does not #include <config.h>! ./support/gzstream.C does not #include <config.h>! > - make sure that all files has the correct header blurb I've done that over the last few weeks and months. I think that all are now up to data. Simple test: $ find . -name "*.[Ch]" | while read file; do grep 'Full author contact details are available in file CREDITS.' $file > /dev/null && continue; echo $file 'does not have correct header blurb'; done ./frontends/gnome/support.h does not have correct header blurb ./frontends/qt2/qgridview.C does not have correct header blurb ./frontends/qt2/qgridview.h does not have correct header blurb ./frontends/qt2/qttableview.C does not have correct header blurb ./frontends/qt2/qttableview.h does not have correct header blurb ./graphics/GraphicsTypes.C does not have correct header blurb ./support/filetools.C does not have correct header blurb ./support/nt_defines.h does not have correct header blurb ./support/os2_defines.h does not have correct header blurb ./support/os2_errortable.h does not have correct header blurb ./support/snprintf.h does not have correct header blurb ./support/sstream.h does not have correct header blurb ./support/filename.C does not have correct header blurb ./support/gzstream.C does not have correct header blurb ./support/gzstream.h does not have correct header blurb ./support/std_istream.h does not have correct header blurb ./support/std_ostream.h does not have correct header blurb Ok, I'll investigate. > - looks for unneeded using statements I wrote and posted a script that automates this to some extent. It's greedy in that it will automatically remove things inside deactivated macro blocks, but it is relatively easy to go through the diff file and put things back. This is exactly what I did last night. For two hours. > - looks for unneeded include statements Ditto. The point to note is that these last two are not painless. Nonetheless, I think that the source is now in a sufficiently clean state that they won;t be needed for some time to come. -- Angus