diff options
author | John Stultz <john.stultz@linaro.org> | 2012-03-23 15:52:08 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2012-03-30 09:14:47 -0400 |
commit | 9875c42d6979a7db0b8d217e2a88095b753f482c (patch) | |
tree | 065ae9f46754f7719a9b2b2a932bd94fe0aa0031 /scripts | |
parent | 55cae3043a48e01f8fc31e8aecc3062c4767a27d (diff) |
merge_config.sh: Add option to display redundant configs
Provide a -r option to display when fragments contain redundant
options. This is really useful when breaking apart a config into
fragments, as well as cleaning up older fragments.
Signed-off-by: John Stultz <john.stultz@linaro.org>
Acked-by: Darren Hart <dvhart@linux.intel.com>
Acked-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/kconfig/merge_config.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh index 23d738a1acda..974d5cb7e30a 100755 --- a/scripts/kconfig/merge_config.sh +++ b/scripts/kconfig/merge_config.sh | |||
@@ -31,10 +31,12 @@ usage() { | |||
31 | echo " -h display this help text" | 31 | echo " -h display this help text" |
32 | echo " -m only merge the fragments, do not execute the make command" | 32 | echo " -m only merge the fragments, do not execute the make command" |
33 | echo " -n use allnoconfig instead of alldefconfig" | 33 | echo " -n use allnoconfig instead of alldefconfig" |
34 | echo " -r list redundant entries when merging fragments" | ||
34 | } | 35 | } |
35 | 36 | ||
36 | MAKE=true | 37 | MAKE=true |
37 | ALLTARGET=alldefconfig | 38 | ALLTARGET=alldefconfig |
39 | WARNREDUN=false | ||
38 | 40 | ||
39 | while true; do | 41 | while true; do |
40 | case $1 in | 42 | case $1 in |
@@ -52,6 +54,11 @@ while true; do | |||
52 | usage | 54 | usage |
53 | exit | 55 | exit |
54 | ;; | 56 | ;; |
57 | "-r") | ||
58 | WARNREDUN=true | ||
59 | shift | ||
60 | continue | ||
61 | ;; | ||
55 | *) | 62 | *) |
56 | break | 63 | break |
57 | ;; | 64 | ;; |
@@ -83,6 +90,8 @@ for MERGE_FILE in $MERGE_LIST ; do | |||
83 | echo Previous value: $PREV_VAL | 90 | echo Previous value: $PREV_VAL |
84 | echo New value: $NEW_VAL | 91 | echo New value: $NEW_VAL |
85 | echo | 92 | echo |
93 | elif [ "$WARNREDUN" = "true" ]; then | ||
94 | echo Value of $CFG is redundant by fragment $MERGE_FILE: | ||
86 | fi | 95 | fi |
87 | sed -i "/$CFG[ =]/d" $TMP_FILE | 96 | sed -i "/$CFG[ =]/d" $TMP_FILE |
88 | fi | 97 | fi |