diff options
author | Christian Heimes <christian@cheimes.de> | 2012-09-07 00:55:33 +0200 |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2012-09-07 00:55:33 +0200 |
commit | 7a1669fe70e9613d08de20e93b02607eb124e34d (patch) | |
tree | 8736bbd96b16f44bb6e2e5b7527560872435600f /Makefile.pre.in | |
parent | 2bd98831c240463069c93054b725dfad22defb40 (diff) | |
download | cpython-7a1669fe70e9613d08de20e93b02607eb124e34d.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.in | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in index 63ffc7d5b9..41dabd4c4a 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 |