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

suitepairs = stretch:buster buster:bullseye
suites = $(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
