]> granicus.if.org Git - python/commitdiff
- Issue #15591: Fix parsing MAKEFLAGS in the sharedmods target.
authorMatthias Klose <doko@ubuntu.com>
Tue, 28 Aug 2012 16:52:28 +0000 (18:52 +0200)
committerMatthias Klose <doko@ubuntu.com>
Tue, 28 Aug 2012 16:52:28 +0000 (18:52 +0200)
Makefile.pre.in

index 484ae0141685f1d233353da7db4ef71df0d8d58b..d4b0e1c4dde48ebd2c4f2e65df43b5ff674c877e 100644 (file)
@@ -407,10 +407,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 2>&1; 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