#
-# Default rules for running cppcheck against the user space components.
+# cppcheck for userspace – nodist_*_SOURCES are kernel code and cppcheck goes crazy on them.
#
PHONY += cppcheck
_CTGT = $(subst cppcheck-for-,,$@)
cppcheck-for-%:
- @[ -n "$($(_CTGT)_SOURCES)$(dist_$(_CTGT)_SOURCES)$(nodist_$(_CTGT)_SOURCES)" ]
- $(CPPCHECK) -j$(CPU_COUNT) $(CPPCHECKFLAGS) $(patsubst -U%,,$(patsubst -D%,,$(filter-out $(AM_CPPFLAGS_NOCHECK),$(or $($(_CTGT)_CPPFLAGS),$(AM_CPPFLAGS))))) $($(_CTGT)_SOURCES) $(dist_$(_CTGT)_SOURCES) $(nodist_$(_CTGT)_SOURCES)
+ @[ -n "$($(_CTGT)_SOURCES)$(dist_$(_CTGT)_SOURCES)" ]
+ $(CPPCHECK) -j$(CPU_COUNT) $(CPPCHECKFLAGS) $(patsubst -U%,,$(patsubst -D%,,$(filter-out $(AM_CPPFLAGS_NOCHECK),$(or $($(_CTGT)_CPPFLAGS),$(AM_CPPFLAGS))))) $($(_CTGT)_SOURCES) $(dist_$(_CTGT)_SOURCES)
cppcheck: $(addprefix cppcheck-for-,$(subst -,_,$(subst .,_,$(subst /,_,$(CPPCHECKTARGETS))))) $(addprefix cppcheck-recursive-,$(CPPCHECKDIRS))
libavl_la_CFLAGS += -fvisibility=hidden
noinst_LTLIBRARIES += libavl.la
-CPPCHECKTARGETS += libavl.la
nodist_libavl_la_SOURCES = \
module/avl/avl.c
libicp_la_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS) $(LIBRARY_CFLAGS)
noinst_LTLIBRARIES += libicp.la
-CPPCHECKTARGETS += libicp.la
nodist_libicp_la_SOURCES = \
module/icp/spi/kcf_spi.c \
libunicode_la_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS) $(LIBRARY_CFLAGS)
noinst_LTLIBRARIES += libunicode.la
-CPPCHECKTARGETS += libunicode.la
nodist_libunicode_la_SOURCES = \
module/unicode/u8_textprep.c \
libzstd_la_CFLAGS += -fno-tree-vectorize
noinst_LTLIBRARIES += libzstd.la
-CPPCHECKTARGETS += libzstd.la
nodist_libzstd_la_SOURCES = \
module/zstd/lib/common/entropy_common.c \