[U-Boot] [PATCH v5 5/9] moveconfig: Cleanup headers in arch and board
Joe Hershberger
joe.hershberger at ni.com
Tue May 19 20:21:21 CEST 2015
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 at ni.com>
---
Changes in v5:
-Consolidate code to clean up dirs
Changes in v4:
-New for version 4
Changes in v3: None
Changes in v2: None
tools/moveconfig.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/tools/moveconfig.py b/tools/moveconfig.py
index 561cd9a..f38dac1 100755
--- a/tools/moveconfig.py
+++ b/tools/moveconfig.py
@@ -347,11 +347,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:
--
1.7.11.5
More information about the U-Boot
mailing list