SUBDIRS = example tests .PHONY: subdirs $(SUBDIRS) subdirs: $(SUBDIRS) $(SUBDIRS): $(MAKE) -C $@ CLEANDIRS = $(SUBDIRS:%=clean-%) clean: $(CLEANDIRS) $(CLEANDIRS): $(MAKE) -C $(@:clean-%=%) clean test: $(MAKE) -C tests test .PHONY: subdirs $(INSTALLDIRS) .PHONY: clean test