# optional (e.g., '-O'). This *vastly* simplifies the implementation
# of this macro.
am.make.is-running-with-option = \
- $(if $(findstring $(strip $1),filter-out --%,$(MFLAGS)),true,false)
+ $(if $(findstring $(strip $1),$(filter-out --%,$(MFLAGS))),true,false)
-# Tell whether make is running in "dry mode".
+# Tell whether make is running in dry mode ("make -n") or not.
am.make.dry-run := $(call am.make.is-running-with-option, n)
-# Shell code that determines whether make is running in "keep-going mode"
-# ("make -k") or not. Useful in rules that must recursively descend into
-# subdirectories, and decide whether to stop at the first error or not.
+# Tell whether make is running in "keep-going mode" ("make -k") or not.
+# Useful in rules that must recursively descend into subdirectories,
+# and decide whether to stop at the first error or not.
am.make.keep-going := $(call am.make.is-running-with-option, k)
am.util.strip-first-word = $(wordlist 2,$(words $(1)),$(1))