path: root/
diff options
authorRay Donnelly <>2013-07-10 11:40:21 (GMT)
committerRay Donnelly <>2013-07-10 11:40:21 (GMT)
commit4e45eb1093c734b81410ffec58edfe7cbba6a6ba (patch)
treedc1f23b4d30b188a28fc40aa63b36e21e02e4f64 /
parent3835e6b6ee85307fa6874af2e3e510cd367bbf9e (diff)
Allow reordered MAKEFLAGS
-R and -r (-Rr) can be reordered to -r and -R (-rR). This happens with MSYS1/2 gnu-make and mingw32-make, and triggers "Recursion detected, bailing out..." Signed-off-by: Ray Donnelly <> Message-Id: <> Patchwork-Id: 258027
Diffstat (limited to '')
1 files changed, 5 insertions, 0 deletions
diff --git a/ b/
index 29aff1c..09bbf7c 100644
--- a/
+++ b/
@@ -24,9 +24,14 @@ endif
# Note: dual test, because if -R and -r are given on the command line
# (who knows?), MAKEFLAGS contains 'Rr' instead of '-Rr', while adding
# '-Rr' to MAKEFLAGS adds it literaly ( and does not add 'Rr' )
+# Further: quad test because the flags 'rR' and '-rR' can be reordered.
ifeq ($(filter Rr,$(MAKEFLAGS)),)
ifeq ($(filter -Rr,$(MAKEFLAGS)),)
+ifeq ($(filter rR,$(MAKEFLAGS)),)
+ifeq ($(filter -rR,$(MAKEFLAGS)),)
+endif # No -rR
+endif # No rR
endif # No -Rr
endif # No Rr