[PATCH] Makefile: fix MAKEFLAGS tests with multiple flags
- From
John Keeping <john@keeping.me.uk>
- Date
- Sep 5, 2015, 12:22 UTC
- Message-ID
- <5c25f77717582a8f38a089da343b4cd2d6af345d.1441455709.git.john@keeping.me.uk>
findstring is defined as $(findstring FIND,IN) so if multiple flags are set these tests do the wrong thing unless $(MAKEFLAGS) is the second argument.
Signed-off-by: John Keeping <john@keeping.me.uk> --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile index 34101e2..a556be6 100644 --- a/Makefile +++ b/Makefile @@ -1463,13 +1463,13 @@ endif QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir QUIET_SUBDIR1 = -ifneq ($(findstring $(MAKEFLAGS),w),w) +ifneq ($(findstring w,$(MAKEFLAGS)),w) PRINT_DIR = --no-print-directory else # "make -w" NO_SUBDIR = : endif -ifneq ($(findstring $(MAKEFLAGS),s),s) +ifneq ($(findstring s,$(MAKEFLAGS)),s) ifndef V QUIET_CC = @echo ' ' CC $@; QUIET_AR = @echo ' ' AR $@;
-- 2.5.0.466.g9af26fa