summaryrefslogtreecommitdiff
path: root/source4/script/minimal_includes.pl
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r5321: added a program that works out the minimal set of #include linesAndrew Tridgell1-0/+150
needed for a C file in Samba. It tries compiling without each #include line in turn, and looks for any changes in the compiler output. Note that the output is not guaranteed correct, it might be that an include is needed onlyu on some platforms. To cope with this, it doesn't consider lines with the word "needed" on them. So add a comment like this: #include "foo.h" /* needed by systems without kerberos */ and it will know to skip it It also skips any include lines in a #if section. If you are brave, you can give it the option --remove and it will remove lines it thinks are not needed. Please review carefully before committing the results, and watch the build farm for breakage. (This used to be commit 348a5f1d4d272fffaad7680c8d24ef59829dbea2)