Bump version to 24.04.3.4
[LibreOffice.git] / solenv / bin / create-tags
blob4adf3db114d98655fa5ff7160096161afaa3cc44
1 #!/usr/bin/env bash
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 ctags="ctags $@"
11 saloptions="-ISAL_DELETED_FUNCTION -ISAL_OVERRIDE -ISAL_FINAL"
12 omnicppoptions="--c++-kinds=+p --fields=+iaS --extra=+q"
14 if LC_ALL=C ${ctags} -D "foo=bar" --license 2>&1 >/dev/null | grep -q -- 'ctags: Unknown option: -D'; then
15 echo "note: your ctags does not support defining macros with -D"
16 no_defines=" "
19 $ctags -h "+.hdl.hrc" --langmap=c:+.hrc.src,c++:+.hdl $saloptions $omnicppoptions \
20 ${no_defines:-"-D CPPUNIT_TEST_FIXTURE(TestClass, TestName)=class TestName : public TestClass {};"} \
21 --languages=-HTML,Java,JavaScript \
22 --langdef=UNOIDL \
23 --langmap=UNOIDL:.idl \
24 --regex-UNOIDL="/^[ \t]*(published)?[ \t]*interface[ \t]*([a-zA-Z0-9_]+[ \t]*::[ \t]*)*([a-zA-Z0-9_]+)[ \t]*(:[^:]|\{|$)/\3/i,interface/" \
25 --regex-UNOIDL="/^[ \t]*([a-zA-Z0-9:]+)[ \t]+([a-zA-Z0-9]+)\(.*\)/\2/f,function/" \
26 --regex-UNOIDL="/^[ \t]*\[.*property.*\][ \t]+([a-zA-Z0-9_]+)[ \t]+([a-zA-Z0-9]+);/\2/p,property/" \
27 --regex-UNOIDL="/^[ \t]*(published)?[ \t]*service[ \t]+([a-zA-Z0-9_]+)[ \t]*(:[^:]|\{|$)/\2/g,service/" \
28 --regex-UNOIDL="/^[ \t]*(published)?[ \t]*singleton[ \t]+([a-zA-Z0-9_]+)[ \t]*(:[^:]|\{|$)/\2/g,singleton/" \
29 --regex-UNOIDL="/^[ \t]*(published)?[ \t]*struct[ \t]+([a-zA-Z0-9_]+)[ \t]*(:[^:]|\{|\<|$)/\2/s,struct/" \
30 --regex-UNOIDL="/^[ \t]*(published)?[ \t]*enum[ \t]+([a-zA-Z0-9_]+)[ \t]*(\{|$)/\2/e,enum/" \
31 --regex-UNOIDL="/^[ \t]*(published)?[ \t]*exception[ \t]+([a-zA-Z0-9_]+)[ \t]*(:[^:]|\{|$)/\2/x,exception/" \
32 --regex-UNOIDL="/^[ \t]*([a-zA-Z0-9_]+)[ \t]+([a-zA-Z0-9_]+);/\2/m,member/" \
33 -R --exclude=instdir --exclude=instdir_for_build --exclude=workdir --exclude=workdir_for_build \
34 --exclude=external --totals=yes ${SRCDIR:-*}
36 if test -d workdir_for_build; then
37 w=workdir_for_build
38 else
39 w=workdir
42 $ctags -h "+.hdl.hrc" --langmap=c:+.hrc.src,c++:+.hdl $saloptions $omnicppoptions \
43 --languages=-HTML,Java,JavaScript \
44 -R --append=yes --totals=yes \
45 $w/UnoApiHeadersTarget/udkapi/normal \
46 $w/UnoApiHeadersTarget/offapi/normal \
47 $w/CustomTarget/officecfg/registry