checkmake
checkmake copied to clipboard
Support VAR:=value
Support:
VAR:=value
It currently treats VAR as a target:
Target "VAR" should be declared PHONY
This check trips on the Linux kernel's stock Makefile, saying silence
should be declared PHONY.
As a workaround, adding space, so it's silence :=
fixes the problem, so it sounds like the parser has a bug.
ifeq ("$(origin V)", "command line")
KBUILD_VERBOSE = $(V)
endif
ifndef KBUILD_VERBOSE
KBUILD_VERBOSE = 0
endif
ifeq ($(KBUILD_VERBOSE),1)
quiet =
Q =
else
quiet=quiet_
Q = @
endif
ifeq ($(filter 3.%,$(MAKE_VERSION)),)
silence:=$(findstring s,$(firstword -$(MAKEFLAGS)))
else
silence:=$(findstring s,$(filter-out --%,$(MAKEFLAGS)))
endif
export quiet Q KBUILD_VERBOSE