460debad79
- split awk script into separate file - make awk work on older awk version - create new target in main Makefile.in to generate iwyudummy Makefile so we don't have to manually uncomment stuff - exclude /usr includes from the generated makefile - disable unused macros warnings to reduce noise - add some sanity checking - prevent using the generated makefile with compiler-plugins enabled - add new target for generating iwyu Makefile so we don't need to edit the Makefile when using it Change-Id: I4af8eb7d1aa5419e546acb9ef905a0fe623db57d Reviewed-on: https://gerrit.libreoffice.org/12980 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
34 lines
543 B
Awk
34 lines
543 B
Awk
BEGIN { domatch = 0; }
|
|
|
|
{
|
|
if ($0 ~ /use_external(s)?,/ )
|
|
{
|
|
if (index($0, "))"))
|
|
{
|
|
gsub(/.*,/, "");
|
|
gsub(/\)+/, "");
|
|
if (!($0 in exts))
|
|
{
|
|
exts[$0];
|
|
print $0;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
domatch = 1;
|
|
}
|
|
}
|
|
else if ($0 ~ /\)\)/ )
|
|
{
|
|
domatch = 0;
|
|
}
|
|
else if (domatch == 1)
|
|
{
|
|
if (!($1 in exts))
|
|
{
|
|
exts[$1];
|
|
print $1;
|
|
}
|
|
}
|
|
}
|
|
|