From patchwork Tue Feb 4 16:43:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 316667 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id D661E2C0097 for ; Wed, 5 Feb 2014 03:43:51 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 0C5898C35D; Tue, 4 Feb 2014 16:43:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7bwcGiHKAlqS; Tue, 4 Feb 2014 16:43:50 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 362ED8C33D; Tue, 4 Feb 2014 16:43:50 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 614C11BF94F for ; Tue, 4 Feb 2014 16:43:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 594688C33D for ; Tue, 4 Feb 2014 16:43:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tarxFePBO7mx for ; Tue, 4 Feb 2014 16:43:45 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from viper.mind.be (132.79-246-81.adsl-static.isp.belgacom.be [81.246.79.132]) by whitealder.osuosl.org (Postfix) with ESMTPS id 7074C89821 for ; Tue, 4 Feb 2014 16:43:45 +0000 (UTC) Received: from [172.16.2.6] (helo=vandecaa-laptop) by viper.mind.be with esmtp (Exim 4.69) (envelope-from ) id 1WAj9T-0001Pg-Iu; Tue, 04 Feb 2014 17:47:14 +0100 Received: from arnout by vandecaa-laptop with local (Exim 4.82) (envelope-from ) id 1WAj64-0006PE-53; Tue, 04 Feb 2014 17:43:40 +0100 From: "Arnout Vandecappelle (Essensium/Mind)" To: buildroot@busybox.net Date: Tue, 4 Feb 2014 17:43:39 +0100 Message-Id: <1391532219-24589-1-git-send-email-arnout@mind.be> X-Mailer: git-send-email 1.9.rc1 Subject: [Buildroot] [PATCH] Make BR2_DEFCONFIG a hidden option in Config.in X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net The manual says that BR2_DEFCONFIG can be set on the command line or in the configuration menu. However, the use case for setting it from the menu was somewhat vague to say the least. So make it a hidden option. With this change, it is no longer needed to do special quoting when passing BR2_DEFCONFIG through the environment. Also, in some cases (not clear how) it was possible that the value of BR2_DEFCONFIG did end up in the saved defconfig. When it is a hidden option, it is never saved. Since for hidden options, Kconfig discards whatever is already stored in the .config file when it is run, we always have to pass the correct value in the environment. Therefore, all the *config targets can no longer be in noconfig_targets. This makes 'make menuconfig' and friends a bit slower. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) Tested-by: Jérémy Rosen --- I wonder if the noconfig_targets hack makes any sense at all... Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- Config.in | 6 ++---- Makefile | 9 ++------- docs/manual/customize-store.txt | 9 ++++----- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/Config.in b/Config.in index 1dc1ffe..d6d5c0a 100644 --- a/Config.in +++ b/Config.in @@ -109,17 +109,15 @@ config BR2_TAR_OPTIONS endmenu +# This has to be a separate config option so BR2_DEFCONFIG is saved in .config. config BR2_DEFCONFIG_FROM_ENV string option env="BR2_DEFCONFIG" config BR2_DEFCONFIG - string "Location to save buildroot config" + string default BR2_DEFCONFIG_FROM_ENV if BR2_DEFCONFIG_FROM_ENV != "" default "$(CONFIG_DIR)/defconfig" - help - When running 'make savedefconfig', the defconfig file will be saved - in this location. config BR2_DL_DIR string "Download dir" diff --git a/Makefile b/Makefile index da3e148..ec359e3 100644 --- a/Makefile +++ b/Makefile @@ -55,10 +55,7 @@ DATE:=$(shell date +%Y%m%d) # Need to export it, so it can be got from environment in children (eg. mconf) export BR2_VERSION_FULL:=$(BR2_VERSION)$(shell $(TOPDIR)/support/scripts/setlocalversion) -noconfig_targets:=menuconfig nconfig gconfig xconfig config oldconfig randconfig \ - defconfig %_defconfig allyesconfig allnoconfig silentoldconfig release \ - randpackageconfig allyespackageconfig allnopackageconfig \ - source-check print-version olddefconfig +noconfig_targets = release source-check print-version # Strip quotes and then whitespaces qstrip=$(strip $(subst ",,$(1))) @@ -678,10 +675,8 @@ $(BUILD_DIR)/buildroot-config/%onf: DEFCONFIG = $(call qstrip,$(BR2_DEFCONFIG)) -# We don't want to fully expand BR2_DEFCONFIG here, so Kconfig will -# recognize that if it's still at its default $(CONFIG_DIR)/defconfig COMMON_CONFIG_ENV = \ - BR2_DEFCONFIG='$(call qstrip,$(value BR2_DEFCONFIG))' \ + BR2_DEFCONFIG="$(DEFCONFIG)" \ KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \ KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \ KCONFIG_TRISTATE=$(BUILD_DIR)/buildroot-config/tristate.config \ diff --git a/docs/manual/customize-store.txt b/docs/manual/customize-store.txt index 8fb5b57..e880803 100644 --- a/docs/manual/customize-store.txt +++ b/docs/manual/customize-store.txt @@ -28,11 +28,10 @@ following command: +make savedefconfig+. This strips the buildroot configuration down by removing configuration options that are at their default value. The result is stored in a file -called +defconfig+. If you want to save it in another place, change -the +BR2_DEFCONFIG+ option, or call make with +make savedefconfig -BR2_DEFCONFIG=+. The usual place is -+configs/_defconfig+. The configuration can then be rebuilt by -running +make _defconfig+. +called +defconfig+. If you want to save it in another place, call make +with +make savedefconfig BR2_DEFCONFIG=+. The usual +place is +configs/_defconfig+. The configuration can then be +rebuilt by running +make _defconfig+. Alternatively, you can copy the file to any other place and rebuild with +make defconfig BR2_DEFCONFIG=+.