Makefile: fix MAKEFLAGS tests with multiple flags
[gitweb.git] / Makefile
index bab75655635b17db80de05e04417c8e95fe70eb0..ef95ada06c1a09da9c71da83856e8d6a957e4b49 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -608,13 +608,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 $@;