]> git.proxmox.com Git - mirror_zfs.git/blame - config/CppCheck.am
Revert "Reduce dbuf_find() lock contention"
[mirror_zfs.git] / config / CppCheck.am
CommitLineData
0e6c493f 1#
c9823594 2# cppcheck for userspace – nodist_*_SOURCES are kernel code and cppcheck goes crazy on them.
0e6c493f
BB
3#
4
5PHONY += cppcheck
6
7CPPCHECKFLAGS = --std=c99 --quiet --max-configs=1 --error-exitcode=2
8CPPCHECKFLAGS += --inline-suppr -U_KERNEL
9
c8970f52
AZ
10CPPCHECKDIRS =
11CPPCHECKTARGETS =
12
13cppcheck-recursive-%:
0425d588 14 $(MAKE) -C $(subst cppcheck-recursive-,,$@) cppcheck
c8970f52 15
48f43799 16_CTGT = $(subst cppcheck-for-,,$@)
c8970f52 17cppcheck-for-%:
c9823594
AZ
18 @[ -n "$($(_CTGT)_SOURCES)$(dist_$(_CTGT)_SOURCES)" ]
19 $(CPPCHECK) -j$(CPU_COUNT) $(CPPCHECKFLAGS) $(patsubst -U%,,$(patsubst -D%,,$(filter-out $(AM_CPPFLAGS_NOCHECK),$(or $($(_CTGT)_CPPFLAGS),$(AM_CPPFLAGS))))) $($(_CTGT)_SOURCES) $(dist_$(_CTGT)_SOURCES)
c8970f52 20
48f43799 21cppcheck: $(addprefix cppcheck-for-,$(subst -,_,$(subst .,_,$(subst /,_,$(CPPCHECKTARGETS))))) $(addprefix cppcheck-recursive-,$(CPPCHECKDIRS))