diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-10-25 01:55:19 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-10-26 21:23:21 -0400 |
commit | e4f65c8bb8468e4391c0b38b51e86001cd7e0ed8 (patch) | |
tree | e9664217813baf61de3a1097ca2d2f478983aabf /tools/notsd-fixup--includes | |
parent | 52443abf0074a859472a373113a183e0ba518f26 (diff) |
tools/notsd-fixup: Merge the pre-includes pass the includes pass.
This shaves off a decent chunk of time, and simplifies the code.
Diffstat (limited to 'tools/notsd-fixup--includes')
-rwxr-xr-x | tools/notsd-fixup--includes | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/notsd-fixup--includes b/tools/notsd-fixup--includes index d16a3e6500..a82247e175 100755 --- a/tools/notsd-fixup--includes +++ b/tools/notsd-fixup--includes @@ -35,6 +35,10 @@ import sys # protected # private def classify(expensive, current_file, path): + if re.fullmatch('.*/include(-staging)?/.*/.*', current_file): + lib = os.path.basename(os.path.dirname(current_file)) + if path.startswith(lib+'/'): + path = re.sub('^'+lib+'/', path) if path.startswith('linux/'): return 'linux', path elif expensive.exists(os.path.join(os.path.dirname(current_file), path)): |