diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-02-07 14:01:38 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2020-02-07 18:24:01 +0100 |
commit | cbfa11ab8f429bf0cb279c732ec7a8dba0090104 (patch) | |
tree | 6ca708536c8f4ef7e826a501960570a18b0b0b08 /solenv/bin | |
parent | 8d7b3398fc1aadb5411060b222af330cde40c72c (diff) |
create-tags: Exuberant Ctags 5.8 lacks -D, try to detect that
Change-Id: I1abc60184e0e5b68c41f5a3517f0877889d8f43a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88195
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'solenv/bin')
-rwxr-xr-x | solenv/bin/create-tags | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/solenv/bin/create-tags b/solenv/bin/create-tags index bf788e26cd13..4adf3db114d9 100755 --- a/solenv/bin/create-tags +++ b/solenv/bin/create-tags @@ -11,8 +11,13 @@ 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 \ - -D "CPPUNIT_TEST_FIXTURE(TestClass, TestName)=class TestName : public TestClass {};" \ + ${no_defines:-"-D CPPUNIT_TEST_FIXTURE(TestClass, TestName)=class TestName : public TestClass {};"} \ --languages=-HTML,Java,JavaScript \ --langdef=UNOIDL \ --langmap=UNOIDL:.idl \ |