]> granicus.if.org Git - cgit/commitdiff
Makefile: fix MAKEFLAGS tests with multiple flags
authorJohn Keeping <john@keeping.me.uk>
Sat, 5 Sep 2015 13:32:50 +0000 (14:32 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Fri, 9 Oct 2015 08:56:06 +0000 (10:56 +0200)
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

index 138fe5b3e49e9f6b3c2bf170567f2dcdefbccec6..77b9f60d3275a63da579624fb9c79d6f9707cb3e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -48,7 +48,7 @@ export CGIT_VERSION CGIT_SCRIPT_NAME CGIT_SCRIPT_PATH CGIT_DATA_PATH CGIT_CONFIG
 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 = :