summaryrefslogtreecommitdiffstats
path: root/solenv/bin/create-tags
blob: 994aa1686c0257f55f7ba38a1972dd97a77b2fa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/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
if test "$1" = "-e"; then
    ctags=etags
fi

saloptions="-ISAL_DELETED_FUNCTION -ISAL_OVERRIDE -ISAL_FINAL"
omnicppoptions="--c++-kinds=+p --fields=+iaS --extra=+q"

$ctags -h "+.hdl.hrc" --langmap=c:+.hrc.src,c++:+.hdl $saloptions $omnicppoptions \
      --languages=-HTML,Java,JavaScript \
      -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