From: Andrew Waterman Date: Thu, 25 Apr 2013 04:23:39 +0000 (-0700) Subject: add range(start, end) method to Makefile X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=adb3e3df44f6a3288d957ec2a256eb2b2c02821f;p=riscv-isa-sim.git add range(start, end) method to Makefile --- diff --git a/Makefile.in b/Makefile.in index fecd5b0..2630dc4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -119,6 +119,16 @@ 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 -lt $(2) ]]; do \ + echo -n "$$_i "; \ + ((_i = _i + 1)); \ + done) + #------------------------------------------------------------------------- # Include subproject makefile fragments #-------------------------------------------------------------------------