Changeset 31484


Ignore:
Timestamp:
2012-04-26T19:53:56+02:00 (6 years ago)
Author:
nbd
Message:

build: rework verbosity level selection

V=99 and V=1 are now deprecated in favor of a new verbosity class system,
though the old flags are still supported.
You can set the V variable on the command line (or OPENWRT_VERBOSE in the
environment) to one or more of the following characters:

  • s: stdout+stderr (equal to the old V=99)
  • c: commands (for build systems that suppress commands by default, e.g. kbuild)
  • w: warnings/errors only (equal to the old V=1)
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/kernel-defaults.mk

    r31466 r31484  
    1010        ARCH="$(LINUX_KARCH)" \ 
    1111        KBUILD_HAVE_NLS=no \ 
    12         CONFIG_SHELL="$(BASH)" 
     12        CONFIG_SHELL="$(BASH)" \ 
     13        $(if $(findstring c,$(OPENWRT_VERBOSE)),V=1) 
    1314 
    1415ifdef CONFIG_STRIP_KERNEL_EXPORTS 
     
    2122ifneq (,$(KERNEL_CC)) 
    2223  KERNEL_MAKEOPTS += CC="$(KERNEL_CC)" 
    23 endif 
    24  
    25 ifeq ($(KBUILD_VERBOSE),99) 
    26   KERNEL_MAKEOPTS += V=1 
    2724endif 
    2825 
  • trunk/include/verbose.mk

    r19560 r31484  
    66# 
    77 
    8 ifeq ($(NO_TRACE_MAKE),) 
    9 NO_TRACE_MAKE := $(MAKE) V=99 
    10 export NO_TRACE_MAKE 
     8ifndef OPENWRT_VERBOSE 
     9  OPENWRT_VERBOSE:= 
     10endif 
     11ifeq ("$(origin V)", "command line") 
     12  OPENWRT_VERBOSE:=$(V) 
    1113endif 
    1214 
    13 ifndef KBUILD_VERBOSE 
    14   KBUILD_VERBOSE:=0 
     15ifeq ($(OPENWRT_VERBOSE),1) 
     16  OPENWRT_VERBOSE:=w 
    1517endif 
    16 ifeq ("$(origin V)", "command line") 
    17   KBUILD_VERBOSE:=$(V) 
     18ifeq ($(OPENWRT_VERBOSE),99) 
     19  OPENWRT_VERBOSE:=s 
     20endif 
     21 
     22ifeq ($(NO_TRACE_MAKE),) 
     23NO_TRACE_MAKE := $(MAKE) V=$(subst w,s,$(OPENWRT_VERBOSE)) 
     24export NO_TRACE_MAKE 
    1825endif 
    1926 
     
    2532endif 
    2633 
    27 ifneq ($(KBUILD_VERBOSE),99) 
     34ifeq ($(findstring s,$(OPENWRT_VERBOSE)),) 
    2835  define MESSAGE 
    2936        printf "$(_Y)%s$(_N)\n" "$(1)" >&8 
     
    4148    SUBMAKE=$(MAKE) 
    4249  else 
    43     ifeq ($(KBUILD_VERBOSE),0) 
    44       SILENT:=>/dev/null 2>&1 
    45     else 
    46       SILENT:= 
    47     endif 
     50    SILENT:=>/dev/null $(if $(findstring w,$(OPENWRT_VERBOSE)),,2>&1) 
    4851    export QUIET:=1 
    49     SUBMAKE=cmd() { $(SILENT) $(MAKE) -s $$* < /dev/null || { echo "make $$*: build failed. Please re-run make with V=99 to see what's going on"; false; } } 8>&1 9>&2; cmd 
     52    SUBMAKE=cmd() { $(SILENT) $(MAKE) -s $$* < /dev/null || { echo "make $$*: build failed. Please re-run make with V=s to see what's going on"; false; } } 8>&1 9>&2; cmd 
    5053  endif 
    5154 
  • trunk/scripts/feeds

    r31469 r31484  
    541541 
    542542        $ENV{SCAN_COOKIE} = $$; 
    543         $ENV{KBUILD_VERBOSE} = 99; 
     543        $ENV{OPENWRT_VERBOSE} = 's'; 
    544544 
    545545        getopts('ahi', \%opts); 
  • trunk/target/imagebuilder/files/Makefile

    r29877 r31484  
    1111LANG:=C 
    1212export TOPDIR LC_ALL LANG 
    13 export KBUILD_VERBOSE=99 
     13export OPENWRT_VERBOSE=s 
    1414all: help 
    1515 
Note: See TracChangeset for help on using the changeset viewer.