From 9c0fe41baa783f010481d0a08b91c0ebf978a8d4 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Mon, 6 May 2013 16:07:15 -0700 Subject: [PATCH] make Makefile sh-friendly --- Makefile.in | 4 ++-- riscv/riscv.mk.in | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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 > $@ -- 2.30.2