diff options
author | Jean-Philippe Brucker <jean-philippe@linaro.org> | 2023-06-06 15:37:34 +0100 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2023-06-08 22:38:38 +0100 |
commit | 8f6cabb25d79c1a20e7fdf021339d200e9c901b7 (patch) | |
tree | 0e906261b0af812845fdb151543e3bdc49bc4234 | |
parent | b17552ee6c9728c20c9d0bd037ef134277daaa40 (diff) | |
download | kvmtool-8f6cabb25d79c1a20e7fdf021339d200e9c901b7.tar.gz |
Makefile: Refine -s handling in the make parameters
When looking for the silent flag 's' in MAKEFLAGS we accidentally catch
variable definitions like "ARCH=mips" or "CROSS_COMPILE=/cross/...",
causing several test builds to be silent.
MAKEFLAGS contains the single-letter make flags (without the dash),
followed by flags that don't have a single-letter equivalent such as
"--warn-undefined-variables" (with the dashes), followed by "--" and
command-line variables. For example `make ARCH=mips -k' results in
MAKEFLAGS "k -- ARCH=mips". Running $(filter-out --%) on this does not
discard ARCH=mips, only "--". However adding $(firstword) ensures that
we run the filter either on the single-letter flags or on something
beginning with "--", and avoids silent builds.
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Link: https://lore.kernel.org/r/20230606143733.994679-2-jean-philippe@linaro.org
Signed-off-by: Will Deacon <will@kernel.org>
-rw-r--r-- | Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3,7 +3,7 @@ # ifeq ($(strip $(V)),) - ifeq ($(findstring s,$(filter-out --%,$(MAKEFLAGS))),) + ifeq ($(findstring s,$(filter-out --%,$(firstword $(MAKEFLAGS)))),) E = @echo else E = @\# |