summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2012-09-07 00:58:26 +0200
committerChristian Heimes <christian@cheimes.de>2012-09-07 00:58:26 +0200
commitf2acf63487214c1ca4e2f35d622a76c3595edbc0 (patch)
treee68f48da9854ace06a056215201c02b7813d9a19
parent6fd3248855f8a4c8edee2fe005a80c4e5c87e7f1 (diff)
downloadcpython-git-f2acf63487214c1ca4e2f35d622a76c3595edbc0.tar.gz
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 7d659dc6d3..d97c9e62eb 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -189,6 +189,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 ===
@@ -409,14 +417,8 @@ platform: $(BUILDPYTHON)
# Build the shared modules
sharedmods: $(BUILDPYTHON)
- 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
+ ./$(BUILDPYTHON) -E $(srcdir)/setup.py $(QUIET) build
# Build static library
# avoid long command lines, same as LIBRARY_OBJS