summaryrefslogtreecommitdiff
path: root/tools/notsd-fixup--includes
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-10-25 01:55:19 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-10-26 21:23:21 -0400
commite4f65c8bb8468e4391c0b38b51e86001cd7e0ed8 (patch)
treee9664217813baf61de3a1097ca2d2f478983aabf /tools/notsd-fixup--includes
parent52443abf0074a859472a373113a183e0ba518f26 (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-xtools/notsd-fixup--includes4
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)):