summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2009-05-25 16:43:25 +0200
committerSam Ravnborg <sam@ravnborg.org>2009-06-14 22:48:08 +0200
commit47312d2cfd9b769c1739738602c163c4c9814c7b (patch)
tree029e0c3ff19b5a246bae472f36b19e9281293cfd /scripts
parent566432224731c3d8fa7925ce07953701f536a666 (diff)
downloadlinux-47312d2cfd9b769c1739738602c163c4c9814c7b.tar.bz2
kbuild: simplify argument loop in scripts/config
Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/config44
1 files changed, 16 insertions, 28 deletions
diff --git a/scripts/config b/scripts/config
index 30825a5677f6..640c6fe4d644 100755
--- a/scripts/config
+++ b/scripts/config
@@ -62,8 +62,7 @@ if [ "$1" = "--file" ]; then
if [ "$FN" = "" ] ; then
usage
fi
- shift
- shift
+ shift 2
else
FN=.config
fi
@@ -76,26 +75,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
@@ -108,37 +115,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)