summaryrefslogtreecommitdiffstats
path: root/libc/kernel/tools/kernel.py
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2010-10-11 22:11:06 +0200
committerDavid 'Digit' Turner <digit@google.com>2011-02-03 18:07:41 +0100
commitfc2693110ee8a2ba22a445ad9855fbe9e118d439 (patch)
tree6bbfcf0620780f454b5c0ac2dbd5341a00cfa157 /libc/kernel/tools/kernel.py
parent040e18f362716c0bab1d9c39a869b98d6c61584c (diff)
downloadbionic-fc2693110ee8a2ba22a445ad9855fbe9e118d439.zip
bionic-fc2693110ee8a2ba22a445ad9855fbe9e118d439.tar.gz
bionic-fc2693110ee8a2ba22a445ad9855fbe9e118d439.tar.bz2
libc: Update auto-gen scripts
Make the scripts use external/kernel-headers/original by default. clean_header.py: Document -k<path>, add -d<path> find_headers.py: Make kernel config files optional update_all.py: Allow setting the path to kernel headers on the command-line update_all.py: Better formatting of output on ttys update_all.py: Automatically perform "git add/rm" on affected files. SYSCALLS.TXT: Fix typo in __socketcall definition. checksyscalls.py: Add support for superH architecture in the checks. gensyscalls.py: Automatically perform "git add/rm" on affected files. cpp.py: Fixed a bug that prevented certain type definitions to be kept in the generated clean header (e.g. struct ethtool_drvinfo in <linux/ethtool.h>) All scripts will use the content of external/kernel-headers/original by default now. The generated code removes all empty lines and trailing whitespace. This is useful to ensure a unified output even if we change the parser again in the future. The top-level disclaimer has been edited with update instructions to regenerate the headers when needed. Also, a warning is now inserted every 8th line in the final output: /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ Changes under kernel/arch-arm and kernel/arch-x86 should correspond to whitespace differences and additionnal struct definitions that were missed by the previous parser implementation. Change-Id: Icd1c056bacd766759f3e9b7bb5d63a246f3d656a WARNING: If you run these script, do not submit the result to gerrit for now. It seems there are discrepancies between the content of original headers and those currently commited under bionic/libc/kernel/. (This problem is the main motivation to insert the warning repeatedly). Current list of issues: - Missing SuperH headers (i.e. external/kernel-headers/original/asm-sh)
Diffstat (limited to 'libc/kernel/tools/kernel.py')
-rw-r--r--libc/kernel/tools/kernel.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/libc/kernel/tools/kernel.py b/libc/kernel/tools/kernel.py
index 9d9b5f0..c203985 100644
--- a/libc/kernel/tools/kernel.py
+++ b/libc/kernel/tools/kernel.py
@@ -55,8 +55,11 @@ class HeaderScanner:
# <asm-generic/*>
# <mtd/*>
#
- re_combined =\
- re.compile(r"^.*<((%s)/[\d\w_\+\.\-/]*)>.*$" % string.join(kernel_dirs,"|") )
+ re_combined_str=\
+ r"^.*<((%s)/[\d\w_\+\.\-/]*)>.*$" % string.join(kernel_dirs,"|")
+
+ re_combined = re.compile(re_combined_str)
+
# some kernel files choose to include files with relative paths (x86 32/64
# dispatch for instance)
re_rel_dir = re.compile(r'^.*"([\d\w_\+\.\-/]+)".*$')