From 4e45eb1093c734b81410ffec58edfe7cbba6a6ba Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Wed, 10 Jul 2013 12:40:21 +0100 Subject: 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 diff --git a/Makefile.in b/Makefile.in index 29aff1c..09bbf7c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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)),) CT_MAKEFLAGS += -Rr +endif # No -rR +endif # No rR endif # No -Rr endif # No Rr -- cgit v0.10.2-6-g49f6