# top-level makefile for a package # # requires: # - TOPDIR # - SUBDIRS # # provides: # - target 'all' # - target 'clean' # - target 'distclean' # - target 'test' # - target 'dist' .PHONY: all all: @test -z "$(SUBDIRS)" || ( set -e; for d in $(SUBDIRS)""; do \ (set -e; $(MAKE) -C $$d all || exit 1); done) .PHONY: clean clean: @test -z "$(SUBDIRS)" || ( set -e; for d in $(SUBDIRS)""; do \ (set -e; $(MAKE) -C $$d clean || exit 1); done) .PHONY: distclean distclean: clean test -z "$(SUBDIRS)" || ( set -e; for d in $(SUBDIRS)""; do \ (set -e; $(MAKE) -C $$d distclean || exit 1); done) .PHONY: test test: all @$(MAKE) -C tests test -include $(TOPDIR)/makefiles/dist.mk