summaryrefslogtreecommitdiff
path: root/Makefile.pre.in
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2012-09-07 00:56:56 +0200
committerChristian Heimes <christian@cheimes.de>2012-09-07 00:56:56 +0200
commit7606b3516270bdbe079e2c0e76407816b06a2ad3 (patch)
tree3ad1ef885e75e06e8ff8908501eb83987e405c31 /Makefile.pre.in
parente3bd5f832b132e22836dde7e7a8da688d3e546d2 (diff)
parent7a1669fe70e9613d08de20e93b02607eb124e34d (diff)
downloadcpython-7606b3516270bdbe079e2c0e76407816b06a2ad3.tar.gz
Issue #15591 and Issue #11715: silence output of setup.py when make is run with -s option.
Diffstat (limited to 'Makefile.pre.in')
-rw-r--r--Makefile.pre.in16
1 files changed, 9 insertions, 7 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 681286598d..aa091fb8fa 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -202,6 +202,14 @@ HOST_GNU_TYPE= @host@
PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
#PROFILE_TASK= $(srcdir)/Lib/test/regrtest.py
+# Find the silent flag in MAKEFLAGS. The flags are sorted and normalized
+# by GNU make. The 's' flag is always in the first word.
+ifneq (,$(findstring s,$(word 1,$(MAKEFLAGS))))
+ QUIET=-q
+else
+ QUIET=
+endif
+
# === Definitions added by makesetup ===
@@ -475,14 +483,8 @@ $(SYSCONFIGDATA): $(BUILDPYTHON)
# Build the shared modules
sharedmods: $(BUILDPYTHON) $(SYSCONFIGDATA)
- 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)' \
- $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
+ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $(QUIET) build
# Build static library
# avoid long command lines, same as LIBRARY_OBJS