nullstring =
space = $(nullstring) # <- notice the trailing space (only leading is stripped)

suitepairs = wheezy-deprecated:jessie-deprecated
suitepairs += wheezy:jessie jessie:stretch stretch:buster
suites = $(filter-out %-deprecated,$(sort $(subst :,$(space),$(suitepairs))))

getnodes = $(basename $(notdir $(wildcard $1/nodes/*.yml)))

all: symlinkfarm

symlinkfarm:
	$(foreach pair,$(suitepairs),\
	shtool mkshadow $(subst :,$(space),$(pair)) 2>/dev/null;)
	touch $@

test: symlinkfarm
	set -e; $(foreach suite,$(suites),\
	boxer compose --datadir $(suite) $(call getnodes,$(suite));)
	touch $@

clean:
	find * -type l -delete
	find * -empty -delete
	rm -f symlinkfarm test preseed.cfg script.sh
