From b0df9df39ad76bdf89d1f58996cd4a1c2632b47c Mon Sep 17 00:00:00 2001 From: Alper Yildirim Date: Mon, 20 Jul 2009 19:17:10 +0200 Subject: config: Add support for xconfig It involved: * Modifying the top-level Makefile to create the xconfig target, and the $(CONFIG)/qconf target to compile the qconf utility * Modifying the package/config/Makefile magic so that C++ files and binaries gets linked properly, re-using the package/config/Makefile.kconfig logic inherited from the kernel * Hacking a little bit package/config/Makefile.kconfig in a way similar to the modifications done for the mconf (menuconfig interface) Signed-off-by: Alper Yildirim --- Makefile | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 76dd2cdf0..71a1ce5c4 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ CONFIG_DEFCONFIG=.defconfig CONFIG=package/config DATE:=$(shell date +%Y%m%d) -noconfig_targets:=menuconfig config oldconfig randconfig \ +noconfig_targets:=menuconfig xconfig config oldconfig randconfig \ defconfig allyesconfig allnoconfig release tags \ source-check help @@ -431,13 +431,29 @@ $(CONFIG)/conf: -@if [ ! -f .config ]; then \ cp $(CONFIG_DEFCONFIG) .config; \ fi + $(CONFIG)/mconf: @mkdir -p $(CONFIG)/buildroot-config - $(MAKE) CC="$(HOSTCC)" -C $(CONFIG) conf mconf + $(MAKE) CC="$(HOSTCC)" -C $(CONFIG) mconf + -@if [ ! -f .config ]; then \ + cp $(CONFIG_DEFCONFIG) .config; \ + fi + +$(CONFIG)/qconf: + @mkdir -p $(CONFIG)/buildroot-config + $(MAKE) CC="$(HOSTCC)" -C $(CONFIG) qconf -@if [ ! -f .config ]; then \ cp $(CONFIG_DEFCONFIG) .config; \ fi +xconfig: $(CONFIG)/qconf + @mkdir -p $(CONFIG)/buildroot-config + @if ! KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \ + KCONFIG_AUTOHEADER=$(CONFIG)/buildroot-config/autoconf.h \ + $(CONFIG)/qconf $(CONFIG_CONFIG_IN); then \ + test -f .config.cmd || rm -f .config; \ + fi + menuconfig: $(CONFIG)/mconf @mkdir -p $(CONFIG)/buildroot-config @if ! KCONFIG_AUTOCONFIG=$(CONFIG)/buildroot-config/auto.conf \ @@ -559,5 +575,5 @@ release: distclean rm -rf $$OUT .PHONY: dummy subdirs release distclean clean config oldconfig \ - menuconfig tags check test depend defconfig help + menuconfig xconfig tags check test depend defconfig help -- cgit v1.2.3