[Python-checkins] cpython (3.2): - Issue #15591: Fix parsing MAKEFLAGS in the sharedmods target.

matthias.klose python-checkins at python.org
Tue Aug 28 19:03:07 CEST 2012


http://hg.python.org/cpython/rev/763d188a96bb
changeset:   78784:763d188a96bb
branch:      3.2
parent:      78780:5bff555168ab
user:        Matthias Klose <doko at ubuntu.com>
date:        Tue Aug 28 18:55:07 2012 +0200
summary:
  - Issue #15591: Fix parsing MAKEFLAGS in the sharedmods target.

files:
  Makefile.pre.in |  12 ++++++++----
  1 files changed, 8 insertions(+), 4 deletions(-)


diff --git a/Makefile.pre.in b/Makefile.pre.in
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -436,10 +436,14 @@
 
 # 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

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list