diff options
| author | Josh Poimboeuf <jpoimboe@redhat.com> | 2017-01-18 23:16:55 -0500 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-01-26 14:29:00 -0500 |
| commit | e572d0887137acfc53f18175522964ec19d88175 (patch) | |
| tree | 7733ccd37bfbd4888304469434eaed9e2bd58acd /tools/scripts/Makefile.include | |
| parent | bf062bd20e6c4988a9c593824ea6bb58730b6289 (diff) | |
tools build: Add tools tree support for 'make -s'
When doing a kernel build with 'make -s', everything is silenced except
the objtool build. That's because the tools tree support for silent
builds is some combination of missing and broken.
Three changes are needed to fix it:
- Makefile: propagate '-s' to the sub-make's MAKEFLAGS variable so the
tools Makefiles can see it.
- tools/scripts/Makefile.include: fix the tools Makefiles' ability to
recognize '-s'. The MAKE_VERSION and MAKEFLAGS checks are copied from
the top-level Makefile. This silences the "DESCEND objtool" message.
- tools/build/Makefile.build: add support to the tools Build files for
recognizing '-s'. Again the MAKE_VERSION and MAKEFLAGS checks are
copied from the top-level Makefile. This silences all the object
compile/link messages.
Reported-and-Tested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Michal Marek <mmarek@suse.com>
Link: http://lkml.kernel.org/r/e8967562ef640c3ae9a76da4ae0f4e47df737c34.1484799200.git.jpoimboe@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/scripts/Makefile.include')
| -rw-r--r-- | tools/scripts/Makefile.include | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include index 8abbef164b4e..19edc1a7a232 100644 --- a/tools/scripts/Makefile.include +++ b/tools/scripts/Makefile.include | |||
| @@ -46,6 +46,16 @@ else | |||
| 46 | NO_SUBDIR = : | 46 | NO_SUBDIR = : |
| 47 | endif | 47 | endif |
| 48 | 48 | ||
| 49 | ifneq ($(filter 4.%,$(MAKE_VERSION)),) # make-4 | ||
| 50 | ifneq ($(filter %s ,$(firstword x$(MAKEFLAGS))),) | ||
| 51 | silent=1 | ||
| 52 | endif | ||
| 53 | else # make-3.8x | ||
| 54 | ifneq ($(filter s% -s%,$(MAKEFLAGS)),) | ||
| 55 | silent=1 | ||
| 56 | endif | ||
| 57 | endif | ||
| 58 | |||
| 49 | # | 59 | # |
| 50 | # Define a callable command for descending to a new directory | 60 | # Define a callable command for descending to a new directory |
| 51 | # | 61 | # |
| @@ -58,7 +68,7 @@ descend = \ | |||
| 58 | QUIET_SUBDIR0 = +$(MAKE) $(COMMAND_O) -C # space to separate -C and subdir | 68 | QUIET_SUBDIR0 = +$(MAKE) $(COMMAND_O) -C # space to separate -C and subdir |
| 59 | QUIET_SUBDIR1 = | 69 | QUIET_SUBDIR1 = |
| 60 | 70 | ||
| 61 | ifneq ($(findstring $(MAKEFLAGS),s),s) | 71 | ifneq ($(silent),1) |
| 62 | ifneq ($(V),1) | 72 | ifneq ($(V),1) |
| 63 | QUIET_CC = @echo ' CC '$@; | 73 | QUIET_CC = @echo ' CC '$@; |
| 64 | QUIET_CC_FPIC = @echo ' CC FPIC '$@; | 74 | QUIET_CC_FPIC = @echo ' CC FPIC '$@; |
