diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-07-25 19:15:27 +0900 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-08-05 07:27:17 -0400 |
commit | a3a779f7f7b5e48672b4e049beadc0112ff1c342 (patch) | |
tree | 422eec4758f225fb3c9e00f50bdf2aa9fa0c2ddc /tools/moveconfig.py | |
parent | e9ea122159ae9b17355f7891f09530ed79940441 (diff) |
tools: moveconfig: fix cleanup of defines across multiple lines
Correct the clean-up of such defines that continue across multiple
lines, like follows:
#define CONFIG_FOO "this continues to the next line " \
"this line should be removed too" \
"this line should be removed as well"
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'tools/moveconfig.py')
-rwxr-xr-x | tools/moveconfig.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/moveconfig.py b/tools/moveconfig.py index 253507999c..a0837140e9 100755 --- a/tools/moveconfig.py +++ b/tools/moveconfig.py @@ -408,6 +408,9 @@ def cleanup_one_header(header_path, patterns, options): matched = [] for i, line in enumerate(lines): + if i - 1 in matched and lines[i - 1][-2:] == '\\\n': + matched.append(i) + continue for pattern in patterns: if pattern.search(line): matched.append(i) |