Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 09/10] uClibc: update-all-configs shouldn't update default uClibc config
Date: Thu,  8 Nov 2012 09:36:15 +0100	[thread overview]
Message-ID: <1352363776-23638-9-git-send-email-arnout@mind.be> (raw)
In-Reply-To: <1352363776-23638-1-git-send-email-arnout@mind.be>

From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>

The new update-all-configs starget will update the uClibc config file
if BR2_UCLIBC_CONFIG is set, even if it is set to the default value
in toolchain/uClibc/uClibc-xxx.config.

To avoid this, set the default BR2_UCLIBC_CONFIG to empty, and select
a default to use in the .mk file.

Note that uclibc-update-config will still overwrite the default file
in toolchain/uClibc/uClibc-xxx.config - presumably it's intentional.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
---
v3: update-all-config -> update-all-configs
---
 toolchain/uClibc/Config.in |    7 ++-----
 toolchain/uClibc/uclibc.mk |   23 +++++++++++------------
 2 files changed, 13 insertions(+), 17 deletions(-)

diff --git a/toolchain/uClibc/Config.in b/toolchain/uClibc/Config.in
index f46a415..9cce05d 100644
--- a/toolchain/uClibc/Config.in
+++ b/toolchain/uClibc/Config.in
@@ -42,15 +42,12 @@ config BR2_UCLIBC_VERSION_STRING
 
 config BR2_UCLIBC_CONFIG
 	string "uClibc configuration file to use?"
-	default "toolchain/uClibc/uClibc-0.9.31.config" if BR2_UCLIBC_VERSION_0_9_31
-	default "toolchain/uClibc/uClibc-0.9.32.config" if BR2_UCLIBC_VERSION_0_9_32
-	default "toolchain/uClibc/uClibc-0.9.33.config" if BR2_UCLIBC_VERSION_0_9_33
-	default "toolchain/uClibc/uClibc-snapshot.config" if BR2_UCLIBC_VERSION_SNAPSHOT
+	default ""
 	help
 	  Some people may wish to use their own modified uClibc configuration
 	  file and will specify their config file location with this option.
 	  See also docs/README in this package.
-	  If unsure, use the default.
+	  If left empty, a default configuration will be used.
 
 config BR2_PTHREAD_DEBUG
 	bool "Thread library debugging"
diff --git a/toolchain/uClibc/uclibc.mk b/toolchain/uClibc/uclibc.mk
index c6ee491..634966f 100644
--- a/toolchain/uClibc/uclibc.mk
+++ b/toolchain/uClibc/uclibc.mk
@@ -6,22 +6,21 @@
 
 ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
 
-# specifying UCLIBC_CONFIG_FILE on the command-line overrides the .config
-# setting.
-ifndef UCLIBC_CONFIG_FILE
-UCLIBC_CONFIG_FILE=$(call qstrip,$(BR2_UCLIBC_CONFIG))
-endif
-
-UCLIBC_VERSION:=$(call qstrip,$(BR2_UCLIBC_VERSION_STRING))
+UCLIBC_VERSION = $(call qstrip,$(BR2_UCLIBC_VERSION_STRING))
 
 ifeq ($(BR2_UCLIBC_VERSION_SNAPSHOT),y)
-UCLIBC_SITE:=http://www.uclibc.org/downloads/snapshots
-UCLIBC_DIR:=$(TOOLCHAIN_DIR)/uClibc
+UCLIBC_SITE = http://www.uclibc.org/downloads/snapshots
+UCLIBC_DIR  = $(TOOLCHAIN_DIR)/uClibc
+UCLIBC_CONFIG_VERSION = snapshot
 else
-UCLIBC_SITE:=http://www.uclibc.org/downloads
-UCLIBC_DIR:=$(TOOLCHAIN_DIR)/uClibc-$(UCLIBC_VERSION)
+UCLIBC_SITE = http://www.uclibc.org/downloads
+UCLIBC_DIR  = $(TOOLCHAIN_DIR)/uClibc-$(UCLIBC_VERSION)
+UCLIBC_CONFIG_VERSION = $(subst $(space),.,$(wordlist 1,3,$(subst .,$(space),$(UCLIBC_VERSION))))
 endif
 
+UCLIBC_CONFIG = $(call qstrip,$(BR2_UCLIBC_CONFIG))
+UCLIBC_CONFIG_FILE = $(or $(wildcard $(UCLIBC_CONFIG)),toolchain/uClibc/uClibc-$(UCLIBC_CONFIG_VERSION).config)
+
 UCLIBC_PATCH_DIR:=toolchain/uClibc/
 UCLIBC_SOURCE:=uClibc-$(UCLIBC_VERSION).tar.bz2
 
@@ -508,7 +507,7 @@ uclibc-oldconfig: $(UCLIBC_DIR)/.oldconfig
 uclibc-update-config: uclibc-config
 	cp -f $(UCLIBC_DIR)/.config $(UCLIBC_CONFIG_FILE)
 
-ifneq ($(UCLIBC_CONFIG_FILE),)
+ifneq ($(UCLIBC_CONFIG),)
 UPDATE_ALL_CONFIGS_TARGETS += uclibc-update-config
 endif
 
-- 
1.7.10.4

  parent reply	other threads:[~2012-11-08  8:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-08  8:36 [Buildroot] [PATCH v3 01/10] manual: add section about storing the configuration Arnout Vandecappelle
2012-11-08  8:36 ` [Buildroot] [PATCH v3 02/10] target/generic: add filesystem overlay option Arnout Vandecappelle
2012-11-08  8:36 ` [Buildroot] [PATCH v3 03/10] ctng: add ctng-update-config target Arnout Vandecappelle
2012-11-08  8:36 ` [Buildroot] [PATCH v3 04/10] busybox: busybox-update-config should depend on busybox-configure Arnout Vandecappelle
2012-11-08  8:36 ` [Buildroot] [PATCH v3 05/10] at91bootstrap3: add -update-config target Arnout Vandecappelle
2012-11-08  8:36 ` [Buildroot] [PATCH v3 06/10] Add update-all-configs target Arnout Vandecappelle
2012-11-08  8:36 ` [Buildroot] [PATCH v3 07/10] busybox: update-all-config shouldn't update default busybox config Arnout Vandecappelle
2012-11-08  8:36 ` [Buildroot] [PATCH v3 08/10] crosstool-ng: update-all-configs shouldn't update default crosstool-ng config Arnout Vandecappelle
2012-11-08  8:36 ` Arnout Vandecappelle [this message]
2012-11-08  8:36 ` [Buildroot] [PATCH v3 10/10] Make savedefconfig save to a configured file Arnout Vandecappelle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1352363776-23638-9-git-send-email-arnout@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox