[Python-checkins] cpython (3.2): Issue #15591 and Issue #11715: silence output of setup.py when make is run with

christian.heimes python-checkins at python.org
Fri Sep 7 01:19:05 CEST 2012


http://hg.python.org/cpython/rev/b9261dd34289
changeset: 78865:b9261dd34289
branch: 3.2
parent: 78861:048e13546a7c
user: Christian Heimes <christian at cheimes.de>
date: Fri Sep 07 00:55:33 2012 +0200
summary:
 Issue #15591 and Issue #11715: silence output of setup.py when make is run with -s option.
files:
 Makefile.pre.in | 16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -198,6 +198,14 @@
 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 @@
 
 # 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
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /