summaryrefslogtreecommitdiff
path: root/tools/moveconfig.py
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2015-05-19 13:21:21 -0500
committerMasahiro Yamada <yamada.masahiro@socionext.com>2015-05-27 08:39:16 +0900
commit60727f5149acde2b596c4de3018ffa314f1b94c0 (patch)
tree32efc983c15292bcc23817dfa14abfec6fa90fde /tools/moveconfig.py
parent2144f880449812c2578dd9a49a9a46c12683707c (diff)
downloadu-boot-imx-60727f5149acde2b596c4de3018ffa314f1b94c0.zip
u-boot-imx-60727f5149acde2b596c4de3018ffa314f1b94c0.tar.gz
u-boot-imx-60727f5149acde2b596c4de3018ffa314f1b94c0.tar.bz2
moveconfig: Cleanup headers in arch and board
Some config.h files live in arch and board directories. They will need to be cleaned up as well, so run the same filters there. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'tools/moveconfig.py')
-rwxr-xr-xtools/moveconfig.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/moveconfig.py b/tools/moveconfig.py
index a05c12b..b1ea706 100755
--- a/tools/moveconfig.py
+++ b/tools/moveconfig.py
@@ -348,11 +348,12 @@ def cleanup_headers(config_attrs, dry_run):
patterns.append(re.compile(r'#\s*define\s+%s\W' % config))
patterns.append(re.compile(r'#\s*undef\s+%s\W' % config))
- for (dirpath, dirnames, filenames) in os.walk('include'):
- for filename in filenames:
- if not fnmatch.fnmatch(filename, '*~'):
- cleanup_one_header(os.path.join(dirpath, filename), patterns,
- dry_run)
+ for dir in 'include', 'arch', 'board':
+ for (dirpath, dirnames, filenames) in os.walk(dir):
+ for filename in filenames:
+ if not fnmatch.fnmatch(filename, '*~'):
+ cleanup_one_header(os.path.join(dirpath, filename),
+ patterns, dry_run)
### classes ###
class KconfigParser: