build: show make output in scripts/config when V=s
[openwrt/staging/dedeckeh.git] / include / toplevel.mk
index 36f790f8072a5fb9bf3f6f15adf26ca3e6896f43..ad8e5b8f20428e7b81054e367dbc782258f0d43a 100644 (file)
@@ -99,17 +99,16 @@ prepare-tmpinfo: FORCE
                $(_SINGLE)$(NO_TRACE_MAKE) menuconfig $(PREP_MK); \
        fi
 
-scripts/config/mconf:
-       @$(_SINGLE)$(SUBMAKE) -s -C scripts/config all CC="$(HOSTCC_WRAPPER)"
+ifneq ($(DISTRO_PKG_CONFIG),)
+scripts/config/%onf: export PATH:=$(dir $(DISTRO_PKG_CONFIG)):$(PATH)
+endif
+scripts/config/%onf: CFLAGS+= -O2
+scripts/config/%onf:
+       @$(_SINGLE)$(SUBMAKE) $(if $(findstring s,$(OPENWRT_VERBOSE)),,-s) \
+               -C scripts/config $(notdir $@) CC="$(HOSTCC_WRAPPER)"
 
 $(eval $(call rdep,scripts/config,scripts/config/mconf))
 
-scripts/config/qconf:
-       @$(_SINGLE)$(SUBMAKE) -s -C scripts/config qconf CC="$(HOSTCC_WRAPPER)"
-
-scripts/config/conf:
-       @$(_SINGLE)$(SUBMAKE) -s -C scripts/config conf CC="$(HOSTCC_WRAPPER)"
-
 config: scripts/config/conf prepare-tmpinfo FORCE
        [ -L .config ] && export KCONFIG_OVERWRITECONFIG=1; \
                $< Config.in
@@ -145,7 +144,7 @@ xconfig: scripts/config/qconf prepare-tmpinfo FORCE
        fi
        $< Config.in
 
-prepare_kernel_conf: .config FORCE
+prepare_kernel_conf: .config toolchain/install FORCE
 
 ifeq ($(wildcard staging_dir/host/bin/quilt),)
   prepare_kernel_conf:
@@ -157,6 +156,10 @@ endif
 kernel_oldconfig: prepare_kernel_conf
        $(_SINGLE)$(NO_TRACE_MAKE) -C target/linux oldconfig
 
+ifneq ($(DISTRO_PKG_CONFIG),)
+kernel_menuconfig: export PATH:=$(dir $(DISTRO_PKG_CONFIG)):$(PATH)
+kernel_nconfig: export PATH:=$(dir $(DISTRO_PKG_CONFIG)):$(PATH)
+endif
 kernel_menuconfig: prepare_kernel_conf
        $(_SINGLE)$(NO_TRACE_MAKE) -C target/linux menuconfig