forked from json-schema-org/json-schema-spec
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
37 lines (27 loc) · 677 Bytes
/
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
XML2RFC ?= xml2rfc
VENV ?= .venv
OUT = \
relative-json-pointer.html relative-json-pointer.txt
all: $(VENV) $(OUT)
%.txt: %.xml
$(XML2RFC) --text $< -o $@
%.pdf: %.xml
$(XML2RFC) --pdf $< -o $@
%.html: %.xml
$(XML2RFC) --html $< -o $@
json-schema.tar.gz: $(OUT)
test ! -e json-schema
mkdir json-schema
git clone . json-schema
(cd json-schema && make)
tar -czf json-schema.tar.gz --exclude '.*' json-schema
rm -rf json-schema
$(VENV): requirements.txt
python -m venv $@
$@/bin/python -m pip install --upgrade pip
$@/bin/python -m pip install -r $<
spec-clean:
rm -f $(OUT) json-schema.tar.gz
clean: spec-clean
rm -rf $(VENV)
.PHONY: spec-clean clean all