[make] do not take `--flags` into account when looking for `-s`

Summary:
In some `make` versions, when not passing any single-letter options explicitly
from the command line it could be that the first word of `MAKEFLAGS` is some
`--long-option` instead, and this trips the detections of `-s`. If the first
word starts with `-` it will now be ignored.

Reviewed By: ddino

Differential Revision: D9239290

fbshipit-source-id: c1120e055
master
Jules Villard 7 years ago committed by Facebook Github Bot
parent 74c79c1626
commit 0944763dc1

@ -111,7 +111,7 @@ define copy_or_same_file
endef endef
INTERACTIVE = $(shell [ -t 0 ] && echo 1) INTERACTIVE = $(shell [ -t 0 ] && echo 1)
SILENT = $(findstring s,$(firstword $(MAKEFLAGS))) SILENT = $(findstring s,$(filter-out -%,$(firstword $(MAKEFLAGS))))
ifeq (1,$(INTERACTIVE)) ifeq (1,$(INTERACTIVE))
TERM_ERROR = $(shell printf '\e[31;1m') TERM_ERROR = $(shell printf '\e[31;1m')

Loading…
Cancel
Save