From bda5257c385f7f0e8ab537c4aaf164298f00ca10 Mon Sep 17 00:00:00 2001 From: Hajime Tazaki Date: Fri, 1 Dec 2017 21:04:53 +0900 Subject: [PATCH] lkl: make a usage of sed portable across bsd and linux Signed-off-by: Hajime Tazaki --- arch/lkl/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/lkl/Makefile b/arch/lkl/Makefile index 3fc7e963f90dc9..34fc1bcde5c9a8 100644 --- a/arch/lkl/Makefile +++ b/arch/lkl/Makefile @@ -36,7 +36,8 @@ lkl.o: vmlinux arch/lkl/include/generated/uapi/asm/syscall_defs.h: vmlinux $(OBJCOPY) -j .syscall_defs -O binary --set-section-flags .syscall_defs=alloc $< $@ - sed -i 's/\x0//g' $@ + $(Q) export tmpfile=$(shell mktemp); \ + sed 's/\x0//g' $@ > $$tmpfile; mv $$tmpfile $@ ; rm -f $$tmpfile install: lkl.o __headers arch/lkl/include/generated/uapi/asm/syscall_defs.h @echo " INSTALL $(INSTALL_PATH)/lib/lkl.o"