Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1257524
| From | Olof Johansson <olof@lixom.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 01/10] merge_config.sh: factor out value parsing |
| Date | 2015-10-28 01:50 +0100 |
| Message-ID | <qon6a-3PX-13@gated-at.bofh.it> (permalink) |
| References | <qon69-3PX-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Since we want to adjust the line later on to deal with CONFIG_FOO=n,
let's make a function for it so we have only one place to change it in.
Signed-off-by: Olof Johansson <olof@lixom.net>
---
scripts/kconfig/merge_config.sh | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
index 67d1314..d8cd913 100755
--- a/scripts/kconfig/merge_config.sh
+++ b/scripts/kconfig/merge_config.sh
@@ -35,6 +35,10 @@ usage() {
echo " -O dir to put generated output files. Consider setting \$KCONFIG_CONFIG instead."
}
+getval() {
+ grep -w -e "$1" "$2"
+}
+
RUNMAKE=true
ALLTARGET=alldefconfig
WARNREDUN=false
@@ -116,8 +120,8 @@ for MERGE_FILE in $MERGE_LIST ; do
for CFG in $CFG_LIST ; do
grep -q -w $CFG $TMP_FILE || continue
- PREV_VAL=$(grep -w $CFG $TMP_FILE)
- NEW_VAL=$(grep -w $CFG $MERGE_FILE)
+ PREV_VAL=$(getval "$CFG" "$TMP_FILE")
+ NEW_VAL=$(getval "$CFG" "$MERGE_FILE")
if [ "x$PREV_VAL" != "x$NEW_VAL" ] ; then
echo Value of $CFG is redefined by fragment $MERGE_FILE:
echo Previous value: $PREV_VAL
@@ -157,8 +161,8 @@ make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
# Check all specified config values took (might have missed-dependency issues)
for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do
- REQUESTED_VAL=$(grep -w -e "$CFG" $TMP_FILE)
- ACTUAL_VAL=$(grep -w -e "$CFG" "$KCONFIG_CONFIG")
+ REQUESTED_VAL=$(getval "$CFG" "$TMP_FILE")
+ ACTUAL_VAL=$(getval "$CFG" "$KCONFIG_CONFIG")
if [ "x$REQUESTED_VAL" != "x$ACTUAL_VAL" ] ; then
echo "Value requested for $CFG not in final .config"
echo "Requested value: $REQUESTED_VAL"
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 01/10] merge_config.sh: factor out value parsing Olof Johansson <olof@lixom.net> - 2015-10-28 01:50 +0100 Re: [PATCH 01/10] merge_config.sh: factor out value parsing Darren Hart <dvhart@infradead.org> - 2015-10-28 06:30 +0100
csiph-web