summaryrefslogtreecommitdiffstats
path: root/Makefile.pre.in
diff options
context:
space:
mode:
authorMatthias Klose <doko@ubuntu.com>2012-08-28 16:55:07 (GMT)
committerMatthias Klose <doko@ubuntu.com>2012-08-28 16:55:07 (GMT)
commit25b10a28f51bc6125946c5fad0c3cfad38227928 (patch)
treed9ea7f18841cfc735a12850c8c5f01a96d3893d8 /Makefile.pre.in
parent72b1426cfb6c19932f8303614720b2a528d1dd3c (diff)
downloadcpython-25b10a28f51bc6125946c5fad0c3cfad38227928.zip
cpython-25b10a28f51bc6125946c5fad0c3cfad38227928.tar.gz
cpython-25b10a28f51bc6125946c5fad0c3cfad38227928.tar.bz2
- Issue #15591: Fix parsing MAKEFLAGS in the sharedmods target.
Diffstat (limited to 'Makefile.pre.in')
-rw-r--r--Makefile.pre.in12
1 files changed, 8 insertions, 4 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 318bbad..62db9c1 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