summaryrefslogtreecommitdiff
path: root/Makefile
blob: 515b9cdb77feeb2f3c859c00c82055d5fc8269d0 (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
25
26
27
28
29
.PHONY: all clean check

# Can be replaced with 'wget'
HTTPGET = curl -O

all: http.7 html.7

http-status-codes-1.csv: 
	$(HTTPGET) https://www.iana.org/assignments/http-status-codes/$@

field-names.csv:
	$(HTTPGET) https://www.iana.org/assignments/http-fields/$@

entities.json:
	$(HTTPGET) https://html.spec.whatwg.org/$@

http.7: http.py http-status-codes-1.csv field-names.csv
	./$< > $@

html.7: html.py entities.json
	./$< > $@

check:
	-flake8 *.py
	-mypy *.py

# Downloaded files aren't removed to save on bandwidth
clean:
	-rm *.7