mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
kbuild: mips use generic asm-offsets.h support
Removed obsolete stuff from arch makefile. mips had a special rule for generating asm-offsets.h so preserved it using an architecture specific hook in top-level Kbuild file. Renamed .h file to asm-offsets.h Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
This commit is contained in:
9
Kbuild
9
Kbuild
@@ -13,6 +13,13 @@ always := $(offsets-file)
|
||||
targets := $(offsets-file)
|
||||
targets += arch/$(ARCH)/kernel/asm-offsets.s
|
||||
|
||||
# Default sed regexp - multiline due to syntax constraints
|
||||
define sed-y
|
||||
"/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"
|
||||
endef
|
||||
# Override default regexp for specific architectures
|
||||
sed-$(CONFIG_MIPS) := "/^@@@/s///p"
|
||||
|
||||
quiet_cmd_offsets = GEN $@
|
||||
define cmd_offsets
|
||||
cat $< | \
|
||||
@@ -26,7 +33,7 @@ define cmd_offsets
|
||||
echo " *"; \
|
||||
echo " */"; \
|
||||
echo ""; \
|
||||
sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; \
|
||||
sed -ne $(sed-y); \
|
||||
echo ""; \
|
||||
echo "#endif" ) > $@
|
||||
endef
|
||||
|
Reference in New Issue
Block a user