SUITE_LIST = $(shell cat misc/suites.list)

.PHONY: all
all: $(SUITE_LIST:=-all)

%-all: %/Makefile
	$(MAKE) -C $*

uname.out:
	uname -srm > uname.out

.PHONY: clean
test: uname.out $(SUITE_LIST:=-test)

%-test: %/Makefile
	$(MAKE) -C $* test

.PHONY: clean
clean: $(SUITE_LIST:=-clean)
	rm -f uname.out
	rm -f os-test.html

%-clean: %/Makefile
	$(MAKE) -C $* clean

.PHONY: clean-test
clean-test: $(SUITE_LIST:=-clean-test)

%-clean-test: %/Makefile
	$(MAKE) -C $* clean-test

.PHONY: html
html: os-test.html

os-test.html: test
	misc/html.sh --enable-legend --enable-suites-overview --suite-list "$(SUITE_LIST)" > os-test.html
