.PHONY: all make_recursive clean clean_recursive restart DIRS=$(wildcard */) all: make_recursive restart: @if [ -e /service/tinydns ]; then \ for x in runsvctrl sv; do \ if [ -x /command/$$x ]; then \ /command/$$x h /service/tinydns; \ fi; \ done ; \ fi clean: clean_recursive make_recursive: @for x in $(DIRS); do if [ -d $$x ]; then make -C $$x; fi; done clean_recursive: @for x in $(DIRS); do if [ -d $$x ]; then make -C $$x clean; fi; done data.cdb: $(foreach dir,$(DIRS),$(wildcard $(dir)*.zone)) Makefile @if [ -n "$(filter-out Makefile,$^)" ]; then \ echo " [tinydns-data] $(filter-out Makefile,$^)"; \ /opt/djbdns/bin/tinydns-data $(filter-out Makefile,$^); \ fi