defs.mk:: Define variables empty, space and comma

Move definitions of empty, space and comma from targets-tools.mk into
defs.mk.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2019-06-21 09:32:54 +00:00
commit 5f396a1f95
2 changed files with 1 additions and 3 deletions

View file

@ -9,6 +9,7 @@ MAKEFLAGS += -r
empty := empty :=
space := $(empty) $(empty) space := $(empty) $(empty)
comma := ,
include $(MODDIR)/make/projects.mk include $(MODDIR)/make/projects.mk

View file

@ -70,9 +70,6 @@ CLANG_TIDY_EXTRA_ARGS += -cppcoreguidelines-pro-bounds-pointer-arithmetic
CLANG_TIDY_EXTRA_ARGS += -cppcoreguidelines-pro-bounds-constant-array-index CLANG_TIDY_EXTRA_ARGS += -cppcoreguidelines-pro-bounds-constant-array-index
CLANG_TIDY_FILTER = $(SED) 's%\[\([a-z-]\+\)\]$$%[https://clang.llvm.org/extra/clang-tidy/checks/\1.html]%' CLANG_TIDY_FILTER = $(SED) 's%\[\([a-z-]\+\)\]$$%[https://clang.llvm.org/extra/clang-tidy/checks/\1.html]%'
comma := ,
empty :=
space := $(empty) $(empty)
CLANG_TIDY_CHECKS ?= -$(subst $(space),,*,clang-analyzer-*,-clang-analyzer-cplusplus*,modernize-*,portability-*,cppcoreguidelines-*$(addprefix $(comma),$(CLANG_TIDY_EXTRA_ARGS))) CLANG_TIDY_CHECKS ?= -$(subst $(space),,*,clang-analyzer-*,-clang-analyzer-cplusplus*,modernize-*,portability-*,cppcoreguidelines-*$(addprefix $(comma),$(CLANG_TIDY_EXTRA_ARGS)))
CLANG_TIDY ?= clang-tidy -checks=$(CLANG_TIDY_CHECKS) CLANG_TIDY ?= clang-tidy -checks=$(CLANG_TIDY_CHECKS)