diff options
author | Noel Grandin <noel@peralex.com> | 2014-11-20 09:47:17 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-11-24 14:12:51 +0000 |
commit | 460debad7968961084546e02eb2ac0750a63a7f4 (patch) | |
tree | be794fb18dd87c53be69c1e4ef7127212e83b97f /bin/gen-iwyu-dummy-lib.awk | |
parent | 6796db4cc6c1b8d32a655de5343b9883b07d0aa8 (diff) |
improvements to iwyudummy target
- 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>
Diffstat (limited to 'bin/gen-iwyu-dummy-lib.awk')
-rw-r--r-- | bin/gen-iwyu-dummy-lib.awk | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/bin/gen-iwyu-dummy-lib.awk b/bin/gen-iwyu-dummy-lib.awk new file mode 100644 index 000000000000..464d9515c7ef --- /dev/null +++ b/bin/gen-iwyu-dummy-lib.awk @@ -0,0 +1,34 @@ +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; + } + } +} + |