#-------------------------------------------------------------------------
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)
#-------------------------------------------------------------------------
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 > $@