r5321: added a program that works out the minimal set of #include lines
authorAndrew Tridgell <tridge@samba.org>
Fri, 11 Feb 2005 02:07:41 +0000 (02:07 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:09:41 +0000 (13:09 -0500)
commitecbde2c1c697f756743fb1b1a489373ee06deb65
tree266ccaefb6a7717cb8c21286426318d6597ef8b0
parent0de6851e83d075e8c001255990b2018acc4a56c2
r5321: added a program that works out the minimal set of #include lines
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)
source4/script/minimal_includes.pl [new file with mode: 0755]