[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [RFC XEN PATCH 08/23] xen, Kbuild: Change filechk_offsets
This functions will be use later to generate asm-offsets.h. Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> --- xen/scripts/Makefile.lib | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/xen/scripts/Makefile.lib b/xen/scripts/Makefile.lib index e022f053494e..19641e836dc3 100644 --- a/xen/scripts/Makefile.lib +++ b/xen/scripts/Makefile.lib @@ -413,29 +413,26 @@ quiet_cmd_xzmisc = XZMISC $@ # ASM offsets # --------------------------------------------------------------------------- -# Default sed regexp - multiline due to syntax constraints +# Default sed regexp # -# Use [:space:] because LLVM's integrated assembler inserts <tab> around -# the .ascii directive whereas GCC keeps the <space> as-is. define sed-offsets - 's:^[[:space:]]*\.ascii[[:space:]]*"\(.*\)".*:\1:; \ - /^->/{s:->#\(.*\):/* \1 */:; \ - s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \ - s:->::; p;}' + '/^[^#].*==>/{s:.*==>(.*)<==.*:\1:; s: [\$$#]: :; p;}' endef # Use filechk to avoid rebuilds when a header changes, but the resulting file # does not define filechk_offsets - echo "#ifndef $2"; \ - echo "#define $2"; \ echo "/*"; \ echo " * DO NOT MODIFY."; \ echo " *"; \ - echo " * This file was generated by Kbuild"; \ + echo " * This file was auto-generated from $<"; \ + echo " *"; \ echo " */"; \ echo ""; \ - sed -ne $(sed-offsets) < $<; \ + echo "#ifndef $2"; \ + echo "#define $2"; \ + echo ""; \ + sed -rne $(sed-offsets) < $<; \ echo ""; \ echo "#endif" endef -- Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |