+PROFILES = default net_2_0
+
+.PHONY: all-profiles $(STD_TARGETS:=-profiles)
+all-profiles $(STD_TARGETS:=-profiles): %-profiles: profiles-do--%
+ @:
+
+profiles-do--%:
+ $(MAKE) $(PROFILES:%=profile-do--%--$*)
+
+# The % below looks like profile-name--target-name
+profile-do--%:
+ $(MAKE) PROFILE=$(subst --, ,$*)
+
+# We don't want to run the tests in parallel. We want behaviour like -k.
+profiles-do--run-test:
+ ret=:; $(foreach p,$(PROFILES), { $(MAKE) PROFILE=$(p) run-test || ret=false; }; ) $$ret
+
+# Orchestrate the bootstrap here.
+profile-do--net_2_0--all: profile-do--net_2_0_bootstrap--all
+profile-do--net_2_0_bootstrap--all: profile-do--default--all
+profile-do--default--all: profile-do--net_1_1_bootstrap--all
+ifeq (linux, $(PLATFORM))
+profile-do--net_1_1_bootstrap--all: profile-do--basic--all
+endif
+