filter-showIncludes: filter out system headers

A blacklist based approach doesn't seem easy since there are various
different SDKs, MFC, ATL and whatnot each potentially with an own
include path; so simply whitelist the known source and build dirs.

Change-Id: I93b27bd0ffbd57237da2d23afa95dea7c0785774
This commit is contained in:
Michael Stahl 2012-08-01 20:52:50 +02:00
parent 3514df0f78
commit e9da487938

View file

@ -43,6 +43,11 @@ while ( <STDIN> ) {
chomp;
s/\\/\//g;
# skip system headers, i.e. everything not under source or build dirs
if ( /$ENV{'SRCDIR'}|$ENV{'OUTDIR'}|$ENV{'WORKDIR'}/ )
{
# X: -> /cygdrive/x/
s/^(.):/\/cygdrive\/\l\1/;
@ -52,6 +57,7 @@ while ( <STDIN> ) {
$seen{$_} = 1;
print $OUT " \\\n $_";
}
}
}
else {
# skip the first line, it always just duplicates what is being