Skip to content

Commit

Permalink
moveconfig: Cleanup headers in arch and board
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Masahiro Yamada <[email protected]>
  • Loading branch information
jhershbe authored and masahir0y committed May 26, 2015
1 parent 2144f88 commit 60727f5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tools/moveconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 60727f5

Please sign in to comment.