build: show make output in scripts/config when V=s
[openwrt/staging/dedeckeh.git] / include / toplevel.mk
index 133da9d830b5534ca39cc863b5be487252c635fb..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
@@ -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