diff options
author | Matthias Kaehlcke <mka@chromium.org> | 2017-04-12 12:43:52 -0700 |
---|---|---|
committer | Greg Hackmann <ghackmann@google.com> | 2017-10-09 14:00:12 -0700 |
commit | a3337e2374f1bddb7fcbc4d14a76b95989f949bb (patch) | |
tree | 31c5735a03d6212a6e89ffd6ebaa7e4337764a47 /scripts/mod | |
parent | 8a89d5fc7cce80477a8e8405d8f9c811758a16ed (diff) |
UPSTREAM: kbuild: Consolidate header generation from ASM offset information
Largely redundant code is used in different places to generate C headers
from offset information extracted from assembly language output.
Consolidate the code in Makefile.lib and use this instead.
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
(cherry picked from commit ebf003f0cfb3705e60d40dedc3ec949176c741af)
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Change-Id: I0acd54dd27c0cf0868f221bd63728a9b67320b25
Diffstat (limited to 'scripts/mod')
-rw-r--r-- | scripts/mod/Makefile | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/scripts/mod/Makefile b/scripts/mod/Makefile index c11212ff3510..e0cb2e4a3b15 100644 --- a/scripts/mod/Makefile +++ b/scripts/mod/Makefile @@ -5,32 +5,8 @@ modpost-objs := modpost.o file2alias.o sumversion.o devicetable-offsets-file := devicetable-offsets.h -define sed-y - "/^->/{s:->#\(.*\):/* \1 */:; \ - s:^->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; \ - s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \ - s:->::; p;}" -endef - -quiet_cmd_offsets = GEN $@ -define cmd_offsets - (set -e; \ - echo "#ifndef __DEVICETABLE_OFFSETS_H__"; \ - echo "#define __DEVICETABLE_OFFSETS_H__"; \ - echo "/*"; \ - echo " * DO NOT MODIFY."; \ - echo " *"; \ - echo " * This file was generated by Kbuild"; \ - echo " *"; \ - echo " */"; \ - echo ""; \ - sed -ne $(sed-y) $<; \ - echo ""; \ - echo "#endif" ) > $@ -endef - -$(obj)/$(devicetable-offsets-file): $(obj)/devicetable-offsets.s - $(call if_changed,offsets) +$(obj)/$(devicetable-offsets-file): $(obj)/devicetable-offsets.s FORCE + $(call filechk,offsets,__DEVICETABLE_OFFSETS_H__) targets += $(devicetable-offsets-file) devicetable-offsets.s |