From: Matthias Klose Date: Tue, 28 Aug 2012 16:55:07 +0000 (+0200) Subject: - Issue #15591: Fix parsing MAKEFLAGS in the sharedmods target. X-Git-Tag: v3.3.1rc1~813^2~131 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=25b10a28f51bc6125946c5fad0c3cfad38227928;p=python - Issue #15591: Fix parsing MAKEFLAGS in the sharedmods target. --- diff --git a/Makefile.pre.in b/Makefile.pre.in index 318bbadfbf..62db9c1374 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -436,10 +436,14 @@ platform: $(BUILDPYTHON) # Build the shared modules sharedmods: $(BUILDPYTHON) - @case $$MAKEFLAGS in \ - *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \ - *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \ - esac + if which getopt >/dev/null; then \ + mflags=`getopt s $$MAKEFLAGS 2>/dev/null | sed 's/ --.*/ /'`; \ + else \ + mflags=" $$MAKEFLAGS "; \ + fi; \ + case $$mflags in "* -s *") quiet=-q; esac; \ + $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ + ./$(BUILDPYTHON) -E $(srcdir)/setup.py $$quiet build # Build static library # avoid long command lines, same as LIBRARY_OBJS