From: Joe Hershberger Date: Tue, 19 May 2015 18:21:21 +0000 (-0500) Subject: moveconfig: Cleanup headers in arch and board X-Git-Tag: KARO-TX6-2015-09-18~1911 X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-uboot.git;a=commitdiff_plain;h=762e8323e9a3ddba7d2947da7aab1aeba5dcdeac 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 Acked-by: Masahiro Yamada --- diff --git a/tools/moveconfig.py b/tools/moveconfig.py index a05c12b7e7..b1ea7069e2 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: