check-includes.pl revision bfb35cfda11d529f02c698e87ae298309a776305
#
# checkincludes: Find files included more than once in (other) files.
# Copyright abandoned, 2000, Niels Kristian Bech Jensen <nkbj@image.dk>.
my %includedfiles = ();
while (<FILE>) {
if (m/^\s*#\s*include\s*[<"](\S*)[>"]/o) {
++$includedfiles{$1};
}
}
foreach $filename (keys %includedfiles) {
print "$file: $filename is included more than once.\n";
}
}
close(FILE);
}