From c2aa17e8fb39d10f8bc8a6dcfe19e9d8621a7ce0 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Mon, 6 Aug 2018 05:01:19 -0700 Subject: [PATCH] [make] better discovery of `-s` make flag Summary: Single-letter options that end up in `MAKEFLAGS` seem to be always the first word of `$MAKEFLAGS`. We can use this instead of dodgy filtering. Reviewed By: jeremydubreil Differential Revision: D9149899 fbshipit-source-id: a621c3137 --- Makefile.config | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile.config b/Makefile.config index 84fed31a1..3bb56193e 100644 --- a/Makefile.config +++ b/Makefile.config @@ -109,8 +109,7 @@ define copy_or_same_file endef INTERACTIVE = $(shell [ -t 0 ] && echo 1) -# remove "jobserver-fds" because it contains "s"... -SILENT = $(findstring s,$(subst jobserver-fds,,$(MAKEFLAGS))) +SILENT = $(findstring s,$(firstword $(MAKEFLAGS))) ifeq (1,$(INTERACTIVE)) TERM_ERROR = $(shell printf '\e[31;1m')