git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[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
Message 1 of 1 in “Makefile: fix MAKEFLAGS tests with multiple flags”
  1. Makefile: fix MAKEFLAGS tests with multiple flagsJohn Keeping, Sep 5, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.