Patchwork [1,of,1] Allow reordered MAKEFLAGS

login
register
mail settings
Submitter Ray Donnelly
Date July 10, 2013, 11:55 a.m.
Message ID <CAOYw7dsdsg-XaDOwwEWJeUUSo2Vu_UD5GtkSgNTu59ai7yx0cQ@mail.gmail.com>
Download mbox | patch
Permalink /patch/258027/
State Accepted
Commit 58ca31386bfb
Headers show

Comments

Ray Donnelly - July 10, 2013, 11:55 a.m.
# HG changeset patch
# User Ray Donnelly <mingw.android@gmail.com>
# Date 1373456421 -3600
#      Wed Jul 10 12:40:21 2013 +0100
# Node ID 4972bd801ee6942dd1a27d4ffdd06f15482a7c45
# Parent  2685dfa9de14fbe356ba76cb201bf5c039cf6860
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 <mingw.android@gmail.com>

--
For unsubscribe information see http://sourceware.org/lists.html#faq
Yann E. MORIN - July 15, 2013, 9:06 p.m.
Ray, All,

Your patch:
    Allow reordered MAKEFLAGS

has been applied as: #58ca31386bfb
    http://crosstool-ng.org/hg/crosstool-ng/rev/58ca31386bfb

Thank you!

Regards,
Yann E. MORIN.



--
For unsubscribe information see http://sourceware.org/lists.html#faq

Patch

diff -r 2685dfa9de14 -r 4972bd801ee6 Makefile.in
--- a/Makefile.in Thu May 23 17:51:15 2013 +0200
+++ b/Makefile.in Wed Jul 10 12:40:21 2013 +0100
@@ -24,9 +24,14 @@ 
 # 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