OS := openbsd netbsd freebsd unix-v10 plan9-4e inferno OS_DIRS := $(patsubst %, static/%, $(OS)) all: $(OS_DIRS) manpage man.db manpage: main.go go build man.db: $(OS_DIRS) ./build-db $@ create.sql $(OS_DIRS) $(OS_DIRS): ifeq ($(MAKECMDGOALS), clean) $(MAKE) -C $@ clean else $(MAKE) -C $@ endif clean: $(OS_DIRS) go clean rm -f man.db .PHONY: all clean $(OS_DIRS)