mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 19:19:32 +03:00
c982359460
Thus extracting the final shred of utility Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13316
22 lines
800 B
Plaintext
22 lines
800 B
Plaintext
#
|
||
# cppcheck for userspace – nodist_*_SOURCES are kernel code and cppcheck goes crazy on them.
|
||
#
|
||
|
||
PHONY += cppcheck
|
||
|
||
CPPCHECKFLAGS = --std=c99 --quiet --max-configs=1 --error-exitcode=2
|
||
CPPCHECKFLAGS += --inline-suppr -U_KERNEL
|
||
|
||
CPPCHECKDIRS =
|
||
CPPCHECKTARGETS =
|
||
|
||
cppcheck-recursive-%:
|
||
$(MAKE) -C $(subst cppcheck-recursive-,,$@) cppcheck
|
||
|
||
_CTGT = $(subst cppcheck-for-,,$@)
|
||
cppcheck-for-%:
|
||
@[ -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))
|