diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:54:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:54:39 +0000 |
commit | 267c6f2ac71f92999e969232431ba04678e7437e (patch) | |
tree | 358c9467650e1d0a1d7227a21dac2e3d08b622b2 /solenv/bin/create-tags | |
parent | Initial commit. (diff) | |
download | libreoffice-267c6f2ac71f92999e969232431ba04678e7437e.tar.xz libreoffice-267c6f2ac71f92999e969232431ba04678e7437e.zip |
Adding upstream version 4:24.2.0.upstream/4%24.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'solenv/bin/create-tags')
-rwxr-xr-x | solenv/bin/create-tags | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/solenv/bin/create-tags b/solenv/bin/create-tags new file mode 100755 index 0000000000..4adf3db114 --- /dev/null +++ b/solenv/bin/create-tags @@ -0,0 +1,47 @@ +#!/usr/bin/env bash +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +ctags="ctags $@" +saloptions="-ISAL_DELETED_FUNCTION -ISAL_OVERRIDE -ISAL_FINAL" +omnicppoptions="--c++-kinds=+p --fields=+iaS --extra=+q" + +if LC_ALL=C ${ctags} -D "foo=bar" --license 2>&1 >/dev/null | grep -q -- 'ctags: Unknown option: -D'; then + echo "note: your ctags does not support defining macros with -D" + no_defines=" " +fi + +$ctags -h "+.hdl.hrc" --langmap=c:+.hrc.src,c++:+.hdl $saloptions $omnicppoptions \ + ${no_defines:-"-D CPPUNIT_TEST_FIXTURE(TestClass, TestName)=class TestName : public TestClass {};"} \ + --languages=-HTML,Java,JavaScript \ + --langdef=UNOIDL \ + --langmap=UNOIDL:.idl \ + --regex-UNOIDL="/^[ \t]*(published)?[ \t]*interface[ \t]*([a-zA-Z0-9_]+[ \t]*::[ \t]*)*([a-zA-Z0-9_]+)[ \t]*(:[^:]|\{|$)/\3/i,interface/" \ + --regex-UNOIDL="/^[ \t]*([a-zA-Z0-9:]+)[ \t]+([a-zA-Z0-9]+)\(.*\)/\2/f,function/" \ + --regex-UNOIDL="/^[ \t]*\[.*property.*\][ \t]+([a-zA-Z0-9_]+)[ \t]+([a-zA-Z0-9]+);/\2/p,property/" \ + --regex-UNOIDL="/^[ \t]*(published)?[ \t]*service[ \t]+([a-zA-Z0-9_]+)[ \t]*(:[^:]|\{|$)/\2/g,service/" \ + --regex-UNOIDL="/^[ \t]*(published)?[ \t]*singleton[ \t]+([a-zA-Z0-9_]+)[ \t]*(:[^:]|\{|$)/\2/g,singleton/" \ + --regex-UNOIDL="/^[ \t]*(published)?[ \t]*struct[ \t]+([a-zA-Z0-9_]+)[ \t]*(:[^:]|\{|\<|$)/\2/s,struct/" \ + --regex-UNOIDL="/^[ \t]*(published)?[ \t]*enum[ \t]+([a-zA-Z0-9_]+)[ \t]*(\{|$)/\2/e,enum/" \ + --regex-UNOIDL="/^[ \t]*(published)?[ \t]*exception[ \t]+([a-zA-Z0-9_]+)[ \t]*(:[^:]|\{|$)/\2/x,exception/" \ + --regex-UNOIDL="/^[ \t]*([a-zA-Z0-9_]+)[ \t]+([a-zA-Z0-9_]+);/\2/m,member/" \ + -R --exclude=instdir --exclude=instdir_for_build --exclude=workdir --exclude=workdir_for_build \ + --exclude=external --totals=yes ${SRCDIR:-*} + +if test -d workdir_for_build; then + w=workdir_for_build +else + w=workdir +fi + +$ctags -h "+.hdl.hrc" --langmap=c:+.hrc.src,c++:+.hdl $saloptions $omnicppoptions \ + --languages=-HTML,Java,JavaScript \ + -R --append=yes --totals=yes \ + $w/UnoApiHeadersTarget/udkapi/normal \ + $w/UnoApiHeadersTarget/offapi/normal \ + $w/CustomTarget/officecfg/registry |