forked from yaml/yaml-spec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
80 lines (54 loc) · 1.34 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
include .common.mk
export SPEC
TESTS ?= $(wildcard test/test-*)
BPAN := .bpan
COMMON := ../yaml-common
QUICK := \
test/test-lint-shell.sh \
test/test-format-markdown.sh \
test/test-lint-spec.sh \
export PATH := $(ROOT)/bin:$(PATH)
ifneq (,$(DOCKER))
export RUN_OR_DOCKER := $(DOCKER)
endif
default:
files build html site serve publish force diff:
$(MAKE) -C www $@
format:
$(MAKE) -C $(SPEC) $@
.PHONY: test
test: $(TESTS)
$(MAKE) clean &>/dev/null
test-noclean: $(TESTS)
test-quick: $(QUICK)
test-docker:
export RUN_OR_DOCKER=force && \
$(MAKE) test TESTS='$(TESTS)'
edit-spec:
@$${EDITOR:-vim} $(SPEC)/spec.md
edit-spec-dir:
@$${EDITOR:-vim} $(SPEC)
grammar-report:
@grammar-report < $(SPEC)/spec.md | less -FReX
grammar-report-quiet:
@grammar-report -q < $(SPEC)/spec.md | less -FReX
$(TESTS): always
bash $@
always:
_:
git worktree prune
git worktree add $@ $@
$(MAKE) -C $@ all
docker-push-all: docker-push-jekyll docker-push-marky docker-push-tex
docker-push-jekyll:
RUN_OR_DOCKER_PUSH=true jekyll-runner
docker-push-marky:
RUN_OR_DOCKER_PUSH=true markydown-to-kramdown
docker-push-tex:
RUN_OR_DOCKER_PUSH=true tex-to-img
common:
cp $(COMMON)/bpan/run-or-docker.bash $(BPAN)/
clean:
@git worktree prune
$(MAKE) --no-print-directory -C $(SPEC) $@ &>/dev/null
$(MAKE) --no-print-directory -C www $@ &>/dev/null