diff options
author | Ben Cheng <bccheng@google.com> | 2013-10-16 22:32:11 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2013-10-16 22:32:12 +0000 |
commit | f0447ddb042150af0e13a364df98dd11673d95d3 (patch) | |
tree | f79aa40bf5642dc106cf4041402e935a4a92d165 /libc/kernel/tools/clean_header.py | |
parent | 1f29c2f51097b68110bc2766a7c1560d6a8831d0 (diff) | |
parent | 8bea2b6faca554a145bdafc6f3afafec1f3120b6 (diff) | |
download | android_bionic-f0447ddb042150af0e13a364df98dd11673d95d3.tar.gz android_bionic-f0447ddb042150af0e13a364df98dd11673d95d3.tar.bz2 android_bionic-f0447ddb042150af0e13a364df98dd11673d95d3.zip |
Merge "Tweaked the cleanup scripts to handle uapi and aarch64 headers."
Diffstat (limited to 'libc/kernel/tools/clean_header.py')
-rwxr-xr-x | libc/kernel/tools/clean_header.py | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/libc/kernel/tools/clean_header.py b/libc/kernel/tools/clean_header.py index 1a5471a83..e825ae092 100755 --- a/libc/kernel/tools/clean_header.py +++ b/libc/kernel/tools/clean_header.py @@ -43,15 +43,26 @@ def cleanupFile( path, original_path): # and the corresponding list of known static functions # arch = None - re_asm_arch = re.compile( r"asm-([\w\d_\+\.\-]+)(/.*)" ) - m = re_asm_arch.match(src_path) statics = kernel_known_generic_statics + m = re.match(r"asm-([\w\d_\+\.\-]+)(/.*)", src_path) if m and m.group(1) != 'generic': dst_path = "arch-%s/asm/%s" % m.groups() arch = m.group(1) statics = statics.union( kernel_known_statics.get( arch, set() ) ) else: - dst_path = "common/" + src_path + # process headers under the uapi directory + # note the "asm" level has been explicitly added in the original + # kernel header tree for architectural-dependent uapi headers + m_uapi = re.match(r"(uapi)/([\w\d_\+\.\-]+)(/.*)", src_path) + if m_uapi: + dst_path = src_path + m_uapi_arch = re.match(r"asm-([\w\d_\+\.\-]+)", m_uapi.group(2)) + if m_uapi_arch and m_uapi_arch.group(1) != 'generic': + arch = m_uapi_arch.group(1) + statics = statics.union( kernel_known_statics.get( arch, set() ) ) + # common headers (ie non-asm and non-uapi) + else: + dst_path = "common/" + src_path dst_path = os.path.normpath( kernel_cleaned_path + "/" + dst_path ) |