summaryrefslogtreecommitdiff
path: root/Makefile
blob: d56521e2ebcbbe1fc38d9ef89857f76bc4077631 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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)