summaryrefslogtreecommitdiff
path: root/Kbuild
diff options
context:
space:
mode:
authorSam Ravnborg <sam@mars.(none)>2005-09-09 22:32:31 +0200
committerSam Ravnborg <sam@mars.(none)>2005-09-09 22:32:31 +0200
commit048eb582f3f89737d4a29668de9935e6feea7c36 (patch)
tree515b3a1b72769d181eed020e166ece0d31b77446 /Kbuild
parent39e01cb874cbf694bd0b0c44f54c4f270e2aa556 (diff)
downloadlinux-riscv-048eb582f3f89737d4a29668de9935e6feea7c36.tar.gz
linux-riscv-048eb582f3f89737d4a29668de9935e6feea7c36.tar.bz2
linux-riscv-048eb582f3f89737d4a29668de9935e6feea7c36.zip
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>
Diffstat (limited to 'Kbuild')
-rw-r--r--Kbuild9
1 files changed, 8 insertions, 1 deletions
diff --git a/Kbuild b/Kbuild
index 197ece85034b..1880e6f760aa 100644
--- a/Kbuild
+++ b/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