all: subdirs SUBDIRS = Chapter1 .PHONY: subdirs $(SUBDIRS) subdirs: $(SUBDIRS) $(SUBDIRS): $(MAKE) -C $@ .PHONY: clean clean: $(SUBDIRS) $(MAKE) -C $< clean