]> git.proxmox.com Git - mirror_ovs.git/commitdiff
ctags: include symbols with locking annotations.
authorFlavio Leitner <fbl@redhat.com>
Tue, 27 Jun 2017 00:55:50 +0000 (21:55 -0300)
committerBen Pfaff <blp@ovn.org>
Thu, 13 Jul 2017 17:57:14 +0000 (10:57 -0700)
OVS uses extensively clang annotations for thread safety
checks. The ctags tool can't parse them, so they are not
included in the tag file.

This patch improves the configure script to generate a list
of identifiers from the header compiler.h to be ignored by
ctags.

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Reviewed-by: Aaron Conole <aconole@redhat.com>
Makefile.am
acinclude.m4
configure.ac

index 7e11e04ac748881e1f514038d146b931e33697e6..9679379defef755ac1c1c413a29cec955d0d7c92 100644 (file)
@@ -42,6 +42,8 @@ AM_CPPFLAGS += -DNDEBUG
 AM_CFLAGS += -fomit-frame-pointer
 endif
 
+AM_CTAGSFLAGS = $(OVS_CTAGS_IDENTIFIERS_LIST)
+
 if WIN32
 psep=";"
 else
index f6e80292d5d921882d1fab0624328e2669c26343..48fc8566c0e8c88f6188d4f21614876836464f2e 100644 (file)
@@ -962,6 +962,14 @@ AC_DEFUN([OVS_ENABLE_SPARSE],
    AC_CONFIG_COMMANDS_PRE(
      [CC='$(if $(C),env REAL_CC="'"$CC"'" CHECK="$(SPARSE) -I $(top_srcdir)/include/sparse $(SPARSEFLAGS) $(SPARSE_EXTRA_INCLUDES) " cgcc $(CGCCFLAGS),'"$CC"')'])])
 
+dnl OVS_CTAGS_IDENTIFIERS
+dnl
+dnl ctags ignores symbols with extras identifiers. This builds a list of
+dnl specially handled identifiers to be ignored.
+AC_DEFUN([OVS_CTAGS_IDENTIFIERS],
+    AC_SUBST([OVS_CTAGS_IDENTIFIERS_LIST],
+           [`echo -n '-I "'; sed -n 's/^#define \(OVS_[A-Z_]\+\)(\.\.\.)$/\1+/p' ${srcdir}/include/openvswitch/compiler.h  | tr \\\n ' ' ; echo -n '"'`] ))
+
 dnl OVS_PTHREAD_SET_NAME
 dnl
 dnl This checks for three known variants of pthreads functions for setting
index 9ef6aad3a36e1b516d4d6febe2cfb8a38c7f5e62..23afe4c7129ddb988e5cf3363ed49e6d47fca8c4 100644 (file)
@@ -171,6 +171,7 @@ OVS_CONDITIONAL_CC_OPTION([-Wno-unused], [HAVE_WNO_UNUSED])
 OVS_CONDITIONAL_CC_OPTION([-Wno-unused-parameter], [HAVE_WNO_UNUSED_PARAMETER])
 OVS_ENABLE_WERROR
 OVS_ENABLE_SPARSE
+OVS_CTAGS_IDENTIFIERS
 
 AC_ARG_VAR(KARCH, [Kernel Architecture String])
 AC_SUBST(KARCH)