Browse Source

use coreutils `seq' instead of hacky `range'

confprec
Andrew Waterman 13 years ago
parent
commit
3148ee1df5
  1. 10
      Makefile.in
  2. 2
      riscv/riscv.mk.in

10
Makefile.in

@ -119,16 +119,6 @@ INSTALL_LIB := $(INSTALL) -m 644
INSTALL_EXE := $(INSTALL) -m 555
STOW := @stow@
#-------------------------------------------------------------------------
# Range helper function. $(call range,3,6) generates the string 3 4 5
#-------------------------------------------------------------------------
range = $(shell _i=$(1); \
while [ $$_i -le $(2) ]; do \
echo -n "$$_i "; \
_i=`expr $$_i + 1`; \
done)
#-------------------------------------------------------------------------
# Include subproject makefile fragments
#-------------------------------------------------------------------------

2
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))))
DISPATCH_SRCS = $(addsuffix .cc,$(addprefix dispatch,$(shell seq 0 $(NDISPATCH))))
$(DISPATCH_SRCS): %.cc: dispatch $(wildcard insns/*.h) opcodes.h
$< $(subst dispatch,,$(subst .cc,,$@)) $(NDISPATCH) 1024 < $(src_dir)/riscv/opcodes.h > $@

Loading…
Cancel
Save