[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
master
Jules Villard 6 years ago committed by Facebook Github Bot
parent 96323b68e6
commit c2aa17e8fb

@ -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')

Loading…
Cancel
Save