fix kernel configure target
[openwrt/staging/dedeckeh.git] / openwrt / include / verbose.mk
1 # OpenWrt.org 2006
2 # $Id:$
3
4 ifndef KBUILD_VERBOSE
5 ifeq ($(DUMP),)
6 KBUILD_VERBOSE=1
7 else
8 KBUILD_VERBOSE=99
9 endif
10 ifeq ("$(origin V)", "command line")
11 KBUILD_VERBOSE=$(V)
12 endif
13 endif
14
15
16 ifneq ($(KBUILD_VERBOSE),99)
17 ifeq ($(QUIET),1)
18 $(MAKECMDGOALS): trace
19 trace: FORCE
20 @[ -f "$(MAKECMDGOALS)" ] || { \
21 [ -z "$${PWD##$$TOPDIR}" ] || DIR=" -C $${PWD##$$TOPDIR/}"; \
22 echo -e "\33[33mmake[$$(($(MAKELEVEL)+1))]$$DIR $(MAKECMDGOALS)\33[m" >&3; \
23 }
24 else
25 export QUIET:=1
26 ifeq ($(KBUILD_VERBOSE),0)
27 MAKE:=&>/dev/null $(MAKE)
28 endif
29 MAKE:=3>&1 4>&2 $(MAKE)
30 endif
31
32 .SILENT: $(MAKECMDGOALS)
33 endif