From adb3e3df44f6a3288d957ec2a256eb2b2c02821f Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Wed, 24 Apr 2013 21:23:39 -0700 Subject: [PATCH] add range(start, end) method to Makefile --- Makefile.in | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 #------------------------------------------------------------------------- -- 2.30.2