include/toplevel.mk: Add xconfig target
authorAlif M. Ahmad <alive4ever@live.com>
Sun, 23 Jul 2017 03:08:56 +0000 (03:08 +0000)
committerFelix Fietkau <nbd@nbd.name>
Thu, 2 Nov 2017 14:58:45 +0000 (15:58 +0100)
Add xconfig target to include/toplevel.mk, so that ``make xconfig`` can
be invoked from $TOPDIR to use Qt based configuration tool to prepare
.config file.

The qconf related sources are taken from linux 4.9.13 archive.

Signed-off-by: Alif M. Ahmad <alive4ever@live.com>
include/toplevel.mk

index 658eb4ce475e738d43e7f6b8693f7cf408ffa6f4..3f5a75003085166c603385474a701398411359c1 100644 (file)
@@ -104,6 +104,9 @@ scripts/config/mconf:
 
 $(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)"
 
@@ -136,6 +139,12 @@ menuconfig: scripts/config/mconf prepare-tmpinfo FORCE
        [ -L .config ] && export KCONFIG_OVERWRITECONFIG=1; \
                $< Config.in
 
+xconfig: scripts/config/qconf prepare-tmpinfo FORCE
+       if [ \! -e .config -a -e $(HOME)/.openwrt/defconfig ]; then \
+               cp $(HOME)/.openwrt/defconfig .config; \
+       fi
+       $< Config.in
+
 prepare_kernel_conf: .config FORCE
 
 ifeq ($(wildcard staging_dir/host/bin/quilt),)