From 01189a9395b0a1d996fdd4a96fd664d8147e0249 Mon Sep 17 00:00:00 2001 From: Albert Ou Date: Thu, 10 Sep 2015 17:01:59 -0700 Subject: [PATCH] Fix non-portable sed commands generating insn_list.h --- riscv/riscv.mk.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/riscv/riscv.mk.in b/riscv/riscv.mk.in index f35f200..6ddba1d 100644 --- a/riscv/riscv.mk.in +++ b/riscv/riscv.mk.in @@ -251,7 +251,9 @@ icache.h: mmu.h mv $@.tmp $@ insn_list.h: $(src_dir)/riscv/riscv.mk.in - echo $(riscv_insn_list) | sed 's/\s\+\|$$/\n/g' | sed '/^$$/d' | sed 's/\./_/g' | sed 's/\(.*\)/DEFINE_INSN(\1)/' > $@.tmp + for insn in $(foreach insn,$(riscv_insn_list),$(subst .,_,$(insn))) ; do \ + printf 'DEFINE_INSN(%s)\n' "$${insn}" ; \ + done > $@.tmp mv $@.tmp $@ $(riscv_gen_srcs): %.cc: insns/%.h insn_template.cc -- 2.30.2