]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
moveconfig: Cleanup headers in arch and board
authorJoe Hershberger <joe.hershberger@ni.com>
Tue, 19 May 2015 18:21:21 +0000 (13:21 -0500)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 20:46:07 +0000 (22:46 +0200)
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>
tools/moveconfig.py

index a05c12b7e700972fe5417dc6f933d419efcf6746..b1ea7069e20e7df10046bd4d04a778442386dbb4 100755 (executable)
@@ -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: