Add support for the new nconf configuration tool
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 21 Aug 2010 15:21:40 +0000 (17:21 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 1 Sep 2010 10:26:56 +0000 (12:26 +0200)
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Makefile
package/config/Makefile
package/config/patches/06-br-build-system-integration.patch

index 73d9335c2edf9f4033d77cfaf57a7a080c9f58b0..fd46972130df53aa747f4ece62754d3a5d7272ca 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -28,7 +28,7 @@ CONFIG_CONFIG_IN=Config.in
 CONFIG=package/config
 DATE:=$(shell date +%Y%m%d)
 
-noconfig_targets:=menuconfig gconfig xconfig config oldconfig randconfig \
+noconfig_targets:=menuconfig nconfig gconfig xconfig config oldconfig randconfig \
        defconfig %_defconfig allyesconfig allnoconfig release \
        randpackageconfig allyespackageconfig allnopackageconfig \
        source-check help
@@ -490,6 +490,14 @@ menuconfig: $(BUILD_DIR)/buildroot-config/mconf
                test -f $(CONFIG_DIR)/.config.cmd || rm -f $(CONFIG_DIR)/.config; \
        fi
 
+nconfig: $(BUILD_DIR)/buildroot-config/nconf
+       @mkdir -p $(BUILD_DIR)/buildroot-config
+       @if ! KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
+               KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
+               BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< $(CONFIG_CONFIG_IN); then \
+               test -f $(CONFIG_DIR)/.config.cmd || rm -f $(CONFIG_DIR)/.config; \
+       fi
+
 config: $(BUILD_DIR)/buildroot-config/conf
        @mkdir -p $(BUILD_DIR)/buildroot-config
        @KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
index 7e199bc9d0c7690db3db483e77b29f097d624325..d8d44b0429fa4c33545c8d552c68c883221417bf 100644 (file)
@@ -177,6 +177,9 @@ hostprogs-y := conf qconf gconf kxgettext
 ifeq ($(MAKECMDGOALS),nconfig)
        hostprogs-y += nconf
 endif
+ifeq ($(findstring nconf,$(MAKECMDGOALS)),nconf)
+       hostprogs-y += nconf
+endif
 
 ifeq ($(MAKECMDGOALS),menuconfig)
        hostprogs-y += mconf
index a2e634ffdaea2856ce873805eee2113a80100b57..128bbc02c4e7edc2bbd43bfceaa4f4bdad14c8ec 100644 (file)
@@ -1,12 +1,19 @@
 ---
- Makefile |   1++++++++++-
- 1 file changed, 10 insertions(+), 1 deletion(-)
+ Makefile |   14 +++++++++++++-
+ 1 file changed, 13 insertions(+), 1 deletion(-)
 
-Index: config.new/Makefile
+Index: config/Makefile
 ===================================================================
---- config.new.orig/Makefile
-+++ config.new/Makefile
-@@ -181,14 +181,23 @@
+--- config.orig/Makefile
++++ config/Makefile
+@@ -177,18 +177,30 @@
+ ifeq ($(MAKECMDGOALS),nconfig)
+       hostprogs-y += nconf
+ endif
++ifeq ($(findstring nconf,$(MAKECMDGOALS)),nconf)
++       hostprogs-y += nconf
++endif
  ifeq ($(MAKECMDGOALS),menuconfig)
        hostprogs-y += mconf
  endif