@@ -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
This functions will be use later to generate asm-offsets.h. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> --- xen/scripts/Makefile.lib | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-)