From patchwork Wed Dec 19 23:25:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Manning X-Patchwork-Id: 207548 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 0022C2C008C for ; Thu, 20 Dec 2012 10:25:44 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id A8DD8A00B4; Wed, 19 Dec 2012 23:25:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d6Ioo9liTzJM; Wed, 19 Dec 2012 23:25:42 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 1E9DFA009C; Wed, 19 Dec 2012 23:25:42 +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 AF3198F753 for ; Wed, 19 Dec 2012 23:25:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1E08981C27 for ; Wed, 19 Dec 2012 23:25:40 +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 pQ0NKRYdSTI7 for ; Wed, 19 Dec 2012 23:25:39 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by whitealder.osuosl.org (Postfix) with ESMTPS id 64FD081BAD for ; Wed, 19 Dec 2012 23:25:39 +0000 (UTC) Received: by mail-pa0-f41.google.com with SMTP id bj3so1655567pad.28 for ; Wed, 19 Dec 2012 15:25:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=80fq7Fm+nlTEom7whzXIENHbSuDzehB95QvgZChGQG0=; b=zOsZLzRmINXu3z7kMjBwDKYJ6pAzxcZQLYFl5AT5uk8LYBRFcBC4NmXs4glbjxIRgz XC6WhJoDjEGSZ6atIv9hfpO7oBdGwD2MESUc0QXQPMs+PGSNlQet9TYLYFnSr9GPJEEd ssp4BZMzYwxiWJ5TQXBBRvJRBepKEnOLHXUe03WqOoPthX8Sc1Dm/fjcxht1C5EAiboD e/bPbyFUnWYG4BU0f7ZkE/Iuq4+hJUgGYvbWAzySdhCkCoQG5wW6V8ctQoNQPLpmULjz EqEJZXiR8EZIlbkWCiCR1toEbRC0T6YTFCKSPaBuSXtjihRXLwQqvs8BrE9iIb780KkE /mBw== X-Received: by 10.66.72.225 with SMTP id g1mr21587277pav.79.1355959539017; Wed, 19 Dec 2012 15:25:39 -0800 (PST) Received: from localhost.localdomain (125.118.124.202.static.snap.net.nz. [202.124.118.125]) by mx.google.com with ESMTPS id wh8sm3844216pbc.75.2012.12.19.15.25.36 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 19 Dec 2012 15:25:38 -0800 (PST) From: Charles Manning To: buildroot@busybox.net Date: Thu, 20 Dec 2012 12:25:19 +1300 Message-Id: <1355959519-11726-1-git-send-email-cdhmanning@gmail.com> X-Mailer: git-send-email 1.7.1 Subject: [Buildroot] [PATCH] Add a config override file capability. 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 This is similar to the package override capability and allows the overriding of configuration symbols without modifying .config. Why? Same reason as having package overriding... Examples: 1) Might need to override svn on a user-by-user basis to add --username 2) Might want to be able to set versions of code fetched from svn without changing the .config. Just put the overriding symbols in the override file. The override file is included straight after .config in the Makefile, so this limits what should be done there... Signed-off-by: Charles Manning --- Config.in | 7 +++++++ Makefile | 9 +++++++++ 2 files changed, 16 insertions(+), 0 deletions(-) diff --git a/Config.in b/Config.in index b319ac7..9f42a26 100644 --- a/Config.in +++ b/Config.in @@ -419,6 +419,13 @@ config BR2_PACKAGE_OVERRIDE_FILE as the source directory for a particular package. See the Buildroot documentation for more details on this feature. +config BR2_CONFIG_OVERRIDE_FILE + string "location of a configuration override file" + help + A configuration override file is a short makefile that contains + variable definitions of the form BR2_xxx to override configurations + in the .config configuration file. + endmenu source "toolchain/Config.in" diff --git a/Makefile b/Makefile index 4b09437..d133a27 100644 --- a/Makefile +++ b/Makefile @@ -94,6 +94,15 @@ endif # Pull in the user's configuration file ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) -include $(CONFIG_DIR)/.config + +# Include the config override file if one has been provided in the +# configuration. +CONFIG_OVERRIDE_FILE=$(call qstrip,$(BR2_CONFIG_OVERRIDE_FILE)) +ifneq ($(CONFIG_OVERRIDE_FILE),) +$(warning Overriding configuration with $(CONFIG_OVERRIDE_FILE)) +include $(CONFIG_OVERRIDE_FILE) +endif + endif # To put more focus on warnings, be less verbose as default