From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759050AbZACCVG (ORCPT ); Fri, 2 Jan 2009 21:21:06 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758773AbZACCUT (ORCPT ); Fri, 2 Jan 2009 21:20:19 -0500 Received: from one.firstfloor.org ([213.235.205.2]:33539 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758566AbZACCUP (ORCPT ); Fri, 2 Jan 2009 21:20:15 -0500 From: Andi Kleen Message-Id: <20090103321.351399938@firstfloor.org> To: linux-kbuild@vger.kernel.org, sam@ravnborg.org, linux-kernel@vger.kernel.org Subject: [PATCH] [1/3] KBUILD: Add script to manipulate .config files on the command line Date: Sat, 3 Jan 2009 03:21:41 +0100 (CET) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I often change single options in .config files. Instead of using an editor or one of the frontends it's convenient to do this from the command line. It's also useful to do from automated build scripts when building different variants from a base config file. I extracted most of the CONFIG manipulation code from one of my build scripts into a new shell script scripts/config The script is not integrated with the normal Kconfig machinery and doesn't do any checking against Kconfig files, but just manipulates that text format. This is always done at make time anyways. I believe this script would be a useful standard addition for scripts/* Sample usage: ./scripts/config --disable smp Disable SMP in .config file ./scripts/config --file otherdir/.config --module e1000e Enable E1000E as module in otherdir/.config ./scripts/config --state smp y Check state of config option CONFIG_SMP After merging into git please make scripts/config executable Signed-off-by: Andi Kleen --- scripts/config | 150 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) Index: linux-2.6.28-kbuild/scripts/config =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.6.28-kbuild/scripts/config 2009-01-02 02:56:11.000000000 +0100 @@ -0,0 +1,150 @@ +#!/bin/bash +# Manipulate options in a .config file from the command line + +usage() { + cat >&2 <