From: Andrew Waterman Date: Mon, 6 May 2013 23:07:15 +0000 (-0700) Subject: make Makefile sh-friendly X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9c0fe41baa783f010481d0a08b91c0ebf978a8d4;p=riscv-isa-sim.git make Makefile sh-friendly --- diff --git a/Makefile.in b/Makefile.in index b6c0187..74bebeb 100644 --- a/Makefile.in +++ b/Makefile.in @@ -124,9 +124,9 @@ STOW := @stow@ #------------------------------------------------------------------------- range = $(shell _i=$(1); \ - while [[ $$_i -lt $(2) ]]; do \ + while [ $$_i -le $(2) ]; do \ echo -n "$$_i "; \ - ((_i = _i + 1)); \ + _i=`expr $$_i + 1`; \ done) #------------------------------------------------------------------------- diff --git a/riscv/riscv.mk.in b/riscv/riscv.mk.in index 7863e99..ea7b898 100644 --- a/riscv/riscv.mk.in +++ b/riscv/riscv.mk.in @@ -35,7 +35,7 @@ riscv_gen_hdrs: \ dispatch.h \ NDISPATCH := 9 -DISPATCH_SRCS = $(addsuffix .cc,$(addprefix dispatch,$(call range,0,$(NDISPATCH)+1))) +DISPATCH_SRCS = $(addsuffix .cc,$(addprefix dispatch,$(call range,0,$(NDISPATCH)))) $(DISPATCH_SRCS): %.cc: dispatch $(wildcard insns/*.h) opcodes.h $< $(subst dispatch,,$(subst .cc,,$@)) $(NDISPATCH) 1024 < $(src_dir)/riscv/opcodes.h > $@