From: Albert Ou Date: Fri, 11 Sep 2015 00:01:59 +0000 (-0700) Subject: Fix non-portable sed commands generating insn_list.h X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=01189a9395b0a1d996fdd4a96fd664d8147e0249;p=riscv-isa-sim.git Fix non-portable sed commands generating insn_list.h --- 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