summaryrefslogtreecommitdiffstats
path: root/bin/gen-iwyu-dummy-lib.awk
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
commited5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch)
tree7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /bin/gen-iwyu-dummy-lib.awk
parentInitial commit. (diff)
downloadlibreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz
libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'bin/gen-iwyu-dummy-lib.awk')
-rw-r--r--bin/gen-iwyu-dummy-lib.awk34
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 000000000..464d9515c
--- /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;
+ }
+ }
+}
+