From: Michal Marek <mmarek@suse.cz>
To: Andi Kleen <andi@firstfloor.org>
Cc: Sam Ravnborg <sam@ravnborg.org>, linux-kernel@vger.kernel.org
Subject: [PATCH 2/3] kbuild: simplify argument loop in scripts/config
Date: Mon, 25 May 2009 14:55:46 +0200 [thread overview]
Message-ID: <20090525125546.GC12943@sepie.suse.cz> (raw)
In-Reply-To: <cover.1243255664.git.mmarek@suse.cz>
Signed-off-by: Michal Marek <mmarek@suse.cz>
---
scripts/config | 44 ++++++++++++++++----------------------------
1 files changed, 16 insertions(+), 28 deletions(-)
diff --git a/scripts/config b/scripts/config
index 144e4b0..731c4a7 100755
--- a/scripts/config
+++ b/scripts/config
@@ -77,8 +77,7 @@ if [ "$1" = "--file" ]; then
if [ "$FN" = "" ] ; then
usage
fi
- shift
- shift
+ shift 2
else
FN=.config
fi
@@ -91,26 +90,34 @@ while [ "$1" != "" ] ; do
CMD="$1"
shift
case "$CMD" in
- --enable|-e)
+ --refresh)
+ ;;
+ --*-after)
+ checkarg "$1"
+ A=$ARG
+ checkarg "$2"
+ B=$ARG
+ shift 2
+ ;;
+ --*)
checkarg "$1"
- set_var "CONFIG_$ARG" "CONFIG_$ARG=y"
shift
;;
+ esac
+ case "$CMD" in
+ --enable|-e)
+ set_var "CONFIG_$ARG" "CONFIG_$ARG=y"
+ ;;
--disable|-d)
- checkarg "$1"
set_var "CONFIG_$ARG" "# CONFIG_$ARG is not set"
- shift
;;
--module|-m)
- checkarg "$1"
set_var "CONFIG_$ARG" "CONFIG_$ARG=m"
- shift
;;
--state|-s)
- checkarg "$1"
if grep -q "# CONFIG_$ARG is not set" $FN ; then
echo n
else
@@ -123,37 +130,18 @@ while [ "$1" != "" ] ; do
echo "$V"
fi
fi
- shift
;;
--enable-after|-E)
- checkarg "$1"
- A=$ARG
- checkarg "$2"
- B=$ARG
set_var "CONFIG_$B" "CONFIG_$B=y" "CONFIG_$A"
- shift
- shift
;;
--disable-after|-D)
- checkarg "$1"
- A=$ARG
- checkarg "$2"
- B=$ARG
set_var "CONFIG_$B" "# CONFIG_$B is not set" "CONFIG_$A"
- shift
- shift
;;
--module-after|-M)
- checkarg "$1"
- A=$ARG
- checkarg "$2"
- B=$ARG
set_var "CONFIG_$B" "CONFIG_$B=m" "CONFIG_$A"
- shift
- shift
;;
# undocumented because it ignores --file (fixme)
--
1.6.3
next prev parent reply other threads:[~2009-05-25 12:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1243255664.git.mmarek@suse.cz>
2009-05-25 12:55 ` [PATCH 1/3] kbuild: handle non-existing options in scripts/config Michal Marek
2009-05-25 13:11 ` Andi Kleen
2009-05-25 13:21 ` Michal Marek
2009-05-25 12:55 ` Michal Marek [this message]
2009-05-25 12:55 ` [PATCH 3/3] kbuild: add generic --set option to scripts/config Michal Marek
2009-05-25 13:13 ` Andi Kleen
2009-05-25 13:25 ` Michal Marek
[not found] <cover.1243262102.git.mmarek@suse.cz>
2009-05-25 14:43 ` [PATCH 2/3] kbuild: simplify argument loop in scripts/config Michal Marek
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=20090525125546.GC12943@sepie.suse.cz \
--to=mmarek@suse.cz \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
/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