summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2012-09-06 22:55:33 (GMT)
committerChristian Heimes <christian@cheimes.de>2012-09-06 22:55:33 (GMT)
commit0897683381092a061e2c294389185bd638d72d47 (patch)
tree47835be74df4ef61d2eab4636a5075582089bebf
parent7dd06e1dc038ffb8c765a024910f24be21fb2c8f (diff)
downloadcpython-0897683381092a061e2c294389185bd638d72d47.zip
cpython-0897683381092a061e2c294389185bd638d72d47.tar.gz
cpython-0897683381092a061e2c294389185bd638d72d47.tar.bz2
Issue #15591 and Issue #11715: silence output of setup.py when make is run with -s option.
-rw-r--r--Makefile.pre.in16
1 files changed, 9 insertions, 7 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 63ffc7d..41dabd4 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -198,6 +198,14 @@ BUILDPYTHON= python$(BUILDEXE)
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 ===
@@ -438,14 +446,8 @@ platform: $(BUILDPYTHON)
# Build the shared modules
sharedmods: $(BUILDPYTHON)
- 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
+ ./$(BUILDPYTHON) -E $(srcdir)/setup.py $(QUIET) build
# Build static library
# avoid long command lines, same as LIBRARY_OBJS